From 3aaa6f7afedd7acff87bf248f4db79105d670d4c Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 4 Jul 2025 14:54:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E5=B8=82=E5=95=86=E5=93=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MaterialDialog.vue | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/canteen/superstore/shopMaterial/components/MaterialDialog.vue b/src/views/canteen/superstore/shopMaterial/components/MaterialDialog.vue index c12894ab..2574ba43 100644 --- a/src/views/canteen/superstore/shopMaterial/components/MaterialDialog.vue +++ b/src/views/canteen/superstore/shopMaterial/components/MaterialDialog.vue @@ -240,8 +240,9 @@ export default { handelOpen(){ this.fileList=[] this.checkUrlList=[] - this.getAreaTreeData();//获取区域树 - this.getDrpUnitList();//获取单位类型下拉 + this.getAreaTreeData();//获取区域树 + this.getTypeTreeData() + this.getDrpUnitList() }, handleClose() { this.$emit('update:visible', false); @@ -252,20 +253,19 @@ export default { //区域树 getAreaTreeData() { systemAreaTreeApi({}).then((response) => { - this.treeAreaOptions = response.data; - this.getTypeTreeData() + this.treeAreaOptions = response.data; }); }, //基础设置-选择区域 handleAreaChange(val){ - console.log(this.form) + console.log(this.form,'1111') this.getTypeTreeData() this.getDrpUnitList() }, //类型树 getTypeTreeData() { shopMaterialTreeApi({areaId:this.form.areaId,goodsType:2}).then((response) => { - this.treeTypeOptions = response.data; + this.treeTypeOptions = response.data; }); }, //单位类型拉下选 @@ -293,15 +293,17 @@ export default { this.$set(this.form,"areaId",row.areaId) this.getTypeTreeData() this.getDrpUnitList() - this.$set(this.form,"areaName",row.areaName) - this.$set(this.form,"materialTypeId",row.materialTypeId) + this.$set(this.form,"areaName",row.areaName) this.$set(this.form,"categoryName",row.categoryName) this.$set(this.form,"materialCode",row.materialCode) this.$set(this.form,"materialId",row.materialId) this.$set(this.form,"materialName",row.materialName) this.$set(this.form,"materialType",row.materialType) this.$set(this.form,"salesMode",row.salesMode+'') - this.$set(this.form,"unitId",row.unitId) + setTimeout(()=>{ + this.$set(this.form,"unitId",row.unitId) + this.$set(this.form,"materialTypeId",row.materialTypeId) + },500) this.$set(this.form,"salePrice",Number((row.salePrice/100).toFixed(2))) this.$set(this.form,"unitPrice",Number((row.unitPrice/100).toFixed(2))) this.$set(this.form,"barCode",row.barCode) @@ -331,7 +333,9 @@ export default { this.form.salePrice = Number(this.form.salePrice); this.form.unitPrice = Number(this.form.unitPrice); this.$emit('submit', this.form); - + setTimeout(()=>{ + this.loading=false + },800) } }); },