Commit 48d1625e by wuwx

修改编辑定向礼包库存验证问题

1 parent 95d6fc5d
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
labelWidth: '144px', labelWidth: '144px',
receiveWay: 1, receiveWay: 1,
curStock: 0, curStock: 0,
curReceiveRule: 0,
editForm: { editForm: {
name: '', name: '',
remarkName: '', remarkName: '',
...@@ -218,7 +219,7 @@ export default { ...@@ -218,7 +219,7 @@ export default {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入库存数量')) return callback(new Error('请输入库存数量'))
} else if (this.routeInfo.id && +this.curStock > +value) { } else if (this.routeInfo.id && +this.curStock > +value && this.curReceiveRule != 4) {
return callback(new Error('二次编辑,库存数量不能减少')) return callback(new Error('二次编辑,库存数量不能减少'))
} else { } else {
return callback() return callback()
...@@ -497,6 +498,7 @@ export default { ...@@ -497,6 +498,7 @@ export default {
this.approvalStatus = res.data.approveStatus - 1 this.approvalStatus = res.data.approveStatus - 1
this.editForm = res.data this.editForm = res.data
this.curStock = res.data.stock this.curStock = res.data.stock
this.curReceiveRule = res.data.receiveRule
this.receiveWay = res.data.receiveWay || 1 this.receiveWay = res.data.receiveWay || 1
if (res.data && res.data.receiveDetails) { if (res.data && res.data.receiveDetails) {
this.phone = res.data.receiveDetails.replaceAll(',', '\n') this.phone = res.data.receiveDetails.replaceAll(',', '\n')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!