|
|
@ -202,6 +202,17 @@ export default { |
|
|
|
return index + 1 |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
if (this.formobj.smsPricestrategyBillDetailList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { |
|
|
|
if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
@ -223,12 +234,15 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
if (this.formobj.smsPricestrategyBillDetailList.length == 0) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'warning', |
|
|
|
message: '请添加商品类别' |
|
|
|
}) |
|
|
|
if (this.formobj.smsPricestrategyBillDetailList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { |
|
|
|
if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|