Commit 953c20b7 authored by dragondean@qq.com's avatar dragondean@qq.com

提交的时候删除无用字段,避免报错

parent 2a6e65b2
......@@ -609,6 +609,7 @@ export default {
},
// force 为是否强制提交,在价格过期的时候需要确认后强制提交
submitForm(force = false) {
console.log("this.$refs[\"form\"]", this.$refs["form"])
this.$refs["form"].validate(async (valid) => {
if (!valid) {
return;
......@@ -628,7 +629,7 @@ export default {
// specialList: this.specialProducts,
isAllProduct: 0
})
if(this.$refs.stepPrice){
let isValid = true
for (let stepPrice of this.$refs.stepPrice){
if(!stepPrice.validate()){
......@@ -637,13 +638,18 @@ export default {
}
}
if(!isValid)return
}
// 全包价
if(this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList)
delete data.clearancePriceStepList
delete data.freightPriceStepList
}else{
data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList)
data.freightPriceStepList = this.getPriceList(this.form.freightPriceStepList)
delete data.fullPriceStepList
}
// 设置了有效期,且已过期则给提示
......
......@@ -579,9 +579,12 @@ export default {
// 全包价
if(this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList)
delete data.freightPriceStepList
delete data.clearancePriceStepList
}else{
data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList)
data.freightPriceStepList = this.getPriceList(this.form.freightPriceStepList)
delete data.freightPriceStepList
}
// 设置了有效期,且已过期则给提示
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment