价格参数修改
This commit is contained in:
parent
e141ea8090
commit
3b9c006730
|
|
@ -1302,8 +1302,8 @@
|
|||
this.baseForm.arr = this.checkUrlList;
|
||||
let param = {...this.baseForm}
|
||||
if(param.sizeType==1){
|
||||
param.price = Number(param.price)*100;
|
||||
param.materialCost = Number(param.materialCost)*100;
|
||||
param.price = Number(param.price);
|
||||
param.materialCost = Number(param.materialCost);
|
||||
param.dishesMaterialList=[]
|
||||
this.dishesMaterialList.forEach(item=>{
|
||||
if(item.materialId!=null){
|
||||
|
|
@ -1316,10 +1316,10 @@
|
|||
})
|
||||
}else{
|
||||
//littleWeight largeWeight baseForm.littleWeight baseForm.largeWeight
|
||||
param.littlePrice = Number(param.littlePrice)*100;
|
||||
param.largePrice = Number(param.largePrice)*100;
|
||||
param.littleMaterialCost = Number(param.littleMaterialCost)*100;
|
||||
param.materialCost = Number(param.materialCost)*100;
|
||||
param.littlePrice = Number(param.littlePrice);
|
||||
param.largePrice = Number(param.largePrice);
|
||||
param.littleMaterialCost = Number(param.littleMaterialCost);
|
||||
param.materialCost = Number(param.materialCost);
|
||||
param.dishesMaterialList=[]
|
||||
param.littleMaterialList=[]
|
||||
this.dishesMaterialList.forEach(item=>{
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ export default {
|
|||
submitForm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.form.unitPrice = Number(this.form.unitPrice)*100
|
||||
this.form.unitPrice = Number(this.form.unitPrice)
|
||||
this.$emit('submit', this.form);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -328,13 +328,8 @@ export default {
|
|||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading=true
|
||||
this.form.salePrice = Number(this.form.salePrice)*100;
|
||||
this.form.unitPrice = Number(this.form.unitPrice)*100;
|
||||
setTimeout(()=>{
|
||||
this.$set(this.form,"salePrice",Number((this.form.salePrice/100).toFixed(2)))
|
||||
this.$set(this.form,"unitPrice",Number((this.form.unitPrice/100).toFixed(2)))
|
||||
this.loading=false
|
||||
},500)
|
||||
this.form.salePrice = Number(this.form.salePrice);
|
||||
this.form.unitPrice = Number(this.form.unitPrice);
|
||||
this.$emit('submit', this.form);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue