超市商品页面修改
This commit is contained in:
parent
cc16858e3f
commit
3aaa6f7afe
|
|
@ -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)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue