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

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

parent 2a6e65b2
...@@ -609,6 +609,7 @@ export default { ...@@ -609,6 +609,7 @@ export default {
}, },
// force 为是否强制提交,在价格过期的时候需要确认后强制提交 // force 为是否强制提交,在价格过期的时候需要确认后强制提交
submitForm(force = false) { submitForm(force = false) {
console.log("this.$refs[\"form\"]", this.$refs["form"])
this.$refs["form"].validate(async (valid) => { this.$refs["form"].validate(async (valid) => {
if (!valid) { if (!valid) {
return; return;
...@@ -628,22 +629,27 @@ export default { ...@@ -628,22 +629,27 @@ export default {
// specialList: this.specialProducts, // specialList: this.specialProducts,
isAllProduct: 0 isAllProduct: 0
}) })
if(this.$refs.stepPrice){
let isValid = true let isValid = true
for (let stepPrice of this.$refs.stepPrice){ for (let stepPrice of this.$refs.stepPrice){
if(!stepPrice.validate()){ if(!stepPrice.validate()){
isValid = false isValid = false
break break
}
} }
if(!isValid)return
} }
if(!isValid)return
// 全包价 // 全包价
if(this.form.priceType == 1) { if(this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList) data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList)
delete data.clearancePriceStepList
delete data.freightPriceStepList
}else{ }else{
data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList) data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList)
data.freightPriceStepList = this.getPriceList(this.form.freightPriceStepList) data.freightPriceStepList = this.getPriceList(this.form.freightPriceStepList)
delete data.fullPriceStepList
} }
// 设置了有效期,且已过期则给提示 // 设置了有效期,且已过期则给提示
......
...@@ -579,9 +579,12 @@ export default { ...@@ -579,9 +579,12 @@ export default {
// 全包价 // 全包价
if(this.form.priceType == 1) { if(this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList) data.fullPriceStepList = this.getPriceList(this.form.fullPriceStepList)
delete data.freightPriceStepList
delete data.clearancePriceStepList
}else{ }else{
data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList) data.clearancePriceStepList = this.getPriceList(this.form.clearancePriceStepList)
data.freightPriceStepList = this.getPriceList(this.form.freightPriceStepList) 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