完善连续保存限制

This commit is contained in:
2024-09-12 16:07:53 +08:00
parent 94e6cda152
commit 8a27e78d9e
10 changed files with 64 additions and 19 deletions

View File

@@ -121,6 +121,7 @@
longitude: '', longitude: '',
latitude: '', latitude: '',
lngAndLat: '', lngAndLat: '',
belongingPlace: '',
usageStatus: 1, usageStatus: 1,
address: '', address: '',
squareMeter: '', squareMeter: '',
@@ -182,7 +183,7 @@
return return
} }
this.submitdisabled = true
req.saveWarehouse(this.formobj) req.saveWarehouse(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -194,9 +195,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
}, },
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@@ -211,6 +215,7 @@
longitude: '', longitude: '',
latitude: '', latitude: '',
lngAndLat: '', lngAndLat: '',
belongingPlace: '',
usageStatus: 1, usageStatus: 1,
address: '', address: '',
squareMeter: '', squareMeter: '',
@@ -222,6 +227,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() {}, showAdd() {},
@@ -248,6 +254,7 @@
console.log('backData', value) console.log('backData', value)
this.formobj.address = value.address this.formobj.address = value.address
this.formobj.lngAndLat = value.lngAndLat this.formobj.lngAndLat = value.lngAndLat
this.formobj.belongingPlace = value.belongingPlace
} }
} }

View File

@@ -44,7 +44,8 @@
geocoder: null, geocoder: null,
addressInfo: { addressInfo: {
lngAndLat: "", lngAndLat: "",
address: "" address: "",
belongingPlace: ""
}, },
pointList: [], pointList: [],
geolocation: null, geolocation: null,
@@ -270,6 +271,7 @@
console.log('getAddress', result.regeocode) console.log('getAddress', result.regeocode)
that.addressInfo.address = result.regeocode.formattedAddress; that.addressInfo.address = result.regeocode.formattedAddress;
that.addressInfo.lngAndLat = lng + ',' + lat that.addressInfo.lngAndLat = lng + ',' + lat
that.addressInfo.belongingPlace = result.regeocode.addressComponent.province
that.showInfoWindow(marker); //自定义信息窗体 that.showInfoWindow(marker); //自定义信息窗体
// let thisPosition = { // let thisPosition = {
// address: that.address, // address: that.address,

View File

@@ -146,7 +146,7 @@
}) })
return return
} }
this.submitdisabled = true
req.saveWarehousearea(this.formobj) req.saveWarehousearea(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -158,9 +158,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
}, },
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@@ -181,6 +184,7 @@
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -64,7 +64,7 @@
}) })
return return
} }
this.submitdisabled = true
req.saveWarehousearea(this.formobj) req.saveWarehousearea(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -76,9 +76,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
}, },
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@@ -91,6 +94,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() {}, showAdd() {},

View File

@@ -61,7 +61,7 @@
<div class="span-sty">品牌Logo</div> <div class="span-sty">品牌Logo</div>
<el-form-item> <el-form-item>
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map" <upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map"
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }" @change="backData" /> :upload-data="{ type: '0001' }" :class="{'hide': hideUploadBtn}" @change="backData" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -126,7 +126,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
}, },
hideUploadBtn: false, hideUploadBtn: true,
hideUploadBtn2: false, hideUploadBtn2: false,
rules: { rules: {
brandName: [{ brandName: [{
@@ -198,6 +198,7 @@
// } // }
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveBrands(this.formobj) req.saveBrands(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -209,14 +210,15 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
}, },
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@@ -234,6 +236,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -270,6 +270,7 @@
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveTypes(this.formobj) req.saveTypes(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -281,9 +282,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
@@ -307,6 +311,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -153,6 +153,7 @@
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveFacturer(this.formobj) req.saveFacturer(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -164,9 +165,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
@@ -185,6 +189,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -889,6 +889,7 @@
console.log('>>>>>>>>>saveOrUpdate', this.formobj) console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveGoods(this.formobj) req.saveGoods(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -900,9 +901,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
}, },
@@ -935,6 +939,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -371,9 +371,10 @@
console.log('>>>>>>>>>saveOrUpdate', this.formobj) console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveGoods(this.formobj) req.saveGoods(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
showClose: true, showClose: true,
@@ -383,9 +384,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
@@ -423,6 +427,7 @@
"agencyPrice": "", "agencyPrice": "",
"picPath": [] "picPath": []
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {

View File

@@ -94,6 +94,7 @@
// } // }
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true
req.saveUnits(this.formobj) req.saveUnits(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
@@ -105,9 +106,12 @@
this.handleReturn('true') this.handleReturn('true')
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.submitdisabled = false
} }
}) })
.catch(() => {}) .catch(() => {
this.submitdisabled = false
})
} }
}) })
@@ -124,6 +128,7 @@
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'), createOrgSid: window.sessionStorage.getItem('orgSid'),
} }
this.submitdisabled = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {