超市商品页面修改

This commit is contained in:
zzyuan 2025-07-04 14:54:49 +08:00
parent cc16858e3f
commit 3aaa6f7afe
1 changed files with 14 additions and 10 deletions

View File

@ -240,8 +240,9 @@ export default {
handelOpen(){ handelOpen(){
this.fileList=[] this.fileList=[]
this.checkUrlList=[] this.checkUrlList=[]
this.getAreaTreeData();// this.getAreaTreeData();//
this.getDrpUnitList();// this.getTypeTreeData()
this.getDrpUnitList()
}, },
handleClose() { handleClose() {
this.$emit('update:visible', false); this.$emit('update:visible', false);
@ -252,20 +253,19 @@ export default {
// //
getAreaTreeData() { getAreaTreeData() {
systemAreaTreeApi({}).then((response) => { systemAreaTreeApi({}).then((response) => {
this.treeAreaOptions = response.data; this.treeAreaOptions = response.data;
this.getTypeTreeData()
}); });
}, },
//- //-
handleAreaChange(val){ handleAreaChange(val){
console.log(this.form) console.log(this.form,'1111')
this.getTypeTreeData() this.getTypeTreeData()
this.getDrpUnitList() this.getDrpUnitList()
}, },
// //
getTypeTreeData() { getTypeTreeData() {
shopMaterialTreeApi({areaId:this.form.areaId,goodsType:2}).then((response) => { 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.$set(this.form,"areaId",row.areaId)
this.getTypeTreeData() this.getTypeTreeData()
this.getDrpUnitList() this.getDrpUnitList()
this.$set(this.form,"areaName",row.areaName) this.$set(this.form,"areaName",row.areaName)
this.$set(this.form,"materialTypeId",row.materialTypeId)
this.$set(this.form,"categoryName",row.categoryName) this.$set(this.form,"categoryName",row.categoryName)
this.$set(this.form,"materialCode",row.materialCode) this.$set(this.form,"materialCode",row.materialCode)
this.$set(this.form,"materialId",row.materialId) this.$set(this.form,"materialId",row.materialId)
this.$set(this.form,"materialName",row.materialName) this.$set(this.form,"materialName",row.materialName)
this.$set(this.form,"materialType",row.materialType) this.$set(this.form,"materialType",row.materialType)
this.$set(this.form,"salesMode",row.salesMode+'') 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,"salePrice",Number((row.salePrice/100).toFixed(2)))
this.$set(this.form,"unitPrice",Number((row.unitPrice/100).toFixed(2))) this.$set(this.form,"unitPrice",Number((row.unitPrice/100).toFixed(2)))
this.$set(this.form,"barCode",row.barCode) this.$set(this.form,"barCode",row.barCode)
@ -331,7 +333,9 @@ export default {
this.form.salePrice = Number(this.form.salePrice); this.form.salePrice = Number(this.form.salePrice);
this.form.unitPrice = Number(this.form.unitPrice); this.form.unitPrice = Number(this.form.unitPrice);
this.$emit('submit', this.form); this.$emit('submit', this.form);
setTimeout(()=>{
this.loading=false
},800)
} }
}); });
}, },