Commit 44f41b72 authored by dragondean@qq.com's avatar dragondean@qq.com

阶梯价格空值提示异常

parent ec9cb7ce
......@@ -732,14 +732,20 @@ export default {
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
this.form.priceStepList.forEach((item, index) => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
// 第一个阶梯的起始值不判断0
if(index === 0 && field == 'startNum' && item[field] == 0) return
if(!item[field] || item[field].toString().trim() == ''){
console.warn('notEmptyFields', field, item[field])
stepPriceEmpty = true
}
})
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
console.warn('运费或者全包价未设置', index, item.transportPrice, item.allPrice)
stepPriceEmpty = true
}
})
......
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