From 75aaca3a95314be8c384df18dba23c661dea742c Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期一, 27 十一月 2023 19:05:38 +0800 Subject: [PATCH] feat: --- admin-web/src/views/stock/inventorycount/inventorytask/edit.vue | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue index 7708d9f..7a661e7 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue @@ -1,6 +1,6 @@ <template> <win-sm :title="`${setting.title}鐩樼偣`" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> + <el-form v-loading="loading" ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> <el-form-item label="鐩樼偣鍗曞悕" prop="businessFormName"> <el-input v-model="formData.businessFormName" @@ -62,13 +62,20 @@ }, data() { return { - loading:true, + count: 0, + loading: true, checkAll: false, checkedList: [], warehouseOptions: [], // 浠撳簱鍒楄〃 operatorOptions: [], operatorOptions2: [], - formData: {}, + formData: { + businessFormName: '', + warehouseId: '', + operatorUserId: '', + monitorUserId: '', + remark: '', + }, rules: { businessFormName: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }], warehouseId: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }], @@ -97,19 +104,31 @@ // 鑾峰彇浠撳簱鍒楄〃 handleSelectTenantWarehouse() { selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { + this.count++ this.warehouseOptions = res; + if(this.count>1){ + this.loading = false + } }); }, // 鑾峰彇鐩樼偣浜� getPdr() { warehouseManagerList({ tenantId: this.userInfo.tenantId }).then((res) => { + this.count++ this.operatorOptions = res; + if(this.count>1){ + this.loading = false + } }); }, // 鑾峰彇鐩戠洏浜� getJpr() { tenantUserQueryUser({ tenantId: this.userInfo.tenantId }).then((res) => { + this.count++ this.operatorOptions2 = res; + if(this.count>1){ + this.loading = false + } }); }, getEditInfo(id) {}, @@ -120,18 +139,25 @@ this.$refs.ruleForm.validate((valid) => { if (valid) { const params = Object.assign({}, this.formData); + this.loading = true if (this.setting.id) { // 缂栬緫鎺ュ彛 inventoryEdit(params).then((res) => { + this.loading = false this.$message.success('淇濆瓨鎴愬姛锛�'); this.close(); this.$emit('search'); + }).catch(()=>{ + this.loading = false }); } else { inventoryAdd(params).then((res) => { + this.loading = false this.$message.success('淇濆瓨鎴愬姛锛�'); this.close(); this.$emit('search'); + }).catch(()=>{ + this.loading = false }); } } else { -- Gitblit v1.9.1