Commit 1062afc8 authored by dragondean@qq.com's avatar dragondean@qq.com

删掉冗余代码和阶梯价校验

parent 780dbb93
......@@ -373,14 +373,14 @@ export default {
data.lineChannelList = this.selectedRoutes
let isValid = true
/* let isValid = true
for (let stepPrice of this.$refs.stepPrice){
if(!stepPrice.validate()){
isValid = false
break
}
}
if(!isValid)return
if(!isValid)return */
// 全包价
if(this.form.priceType == 1) {
......@@ -407,17 +407,6 @@ export default {
})
.finally(res => this.loading = false)
});
},
// 快捷设置,只更新默认运费
quickSet(){
// 字段,根据是否全包价来取
let field = this.form.priceType == 1 ? 'allPrice' : 'transportPrice'
// 取得要加的数额(减少则是负数)
let amount = Decimal(this.quickForm.plus || -this.quickForm.minus)
this.form.priceStepList.forEach(item => {
// 加上对应的价格,但是不能小于0
this.$set(item, field, Math.max(0, Decimal(item[field] || 0).plus(amount).toNumber()))
})
}
}
}
......
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