|
|
|
@ -150,7 +150,7 @@ |
|
|
|
:visible.sync="editPrintQtyVisible" |
|
|
|
width="400px" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<el-form :model="editPrintQtyForm" ref="editPrintQtyForm" :rules="editPrintQtyRules" class="edit-print-qty-form"> |
|
|
|
<el-form :model="editPrintQtyForm" :rules="editPrintQtyRules" class="edit-print-qty-form"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料编码" class="form-item-vertical"> |
|
|
|
@ -334,12 +334,7 @@ export default { |
|
|
|
unPrintQty: 0, |
|
|
|
newPrintQty: 0 |
|
|
|
}, |
|
|
|
editPrintQtyRules: { |
|
|
|
newPrintQty: [ |
|
|
|
{ required: true, message: '新的已打印数量不能为空', trigger: 'blur' }, |
|
|
|
{ type: 'number', min: 0, message: '已打印数量不能小于0', trigger: 'blur' } |
|
|
|
] |
|
|
|
}, |
|
|
|
|
|
|
|
createHuVisible: false, |
|
|
|
createHuLoading: false, |
|
|
|
createHuForm: { |
|
|
|
@ -435,8 +430,10 @@ export default { |
|
|
|
|
|
|
|
// 提交修改已打印数量 |
|
|
|
editPrintQtySubmit () { |
|
|
|
this.$refs['editPrintQtyForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (this.editPrintQtyForm.newPrintQty < 0) { |
|
|
|
this.$message.error('已打印数量不能小于0') |
|
|
|
return |
|
|
|
} |
|
|
|
// 验证新的已打印数量不能超过现有库存 |
|
|
|
if (this.editPrintQtyForm.newPrintQty > this.editPrintQtyForm.qtyOnHand) { |
|
|
|
this.$message.error('已打印数量不能超过现有库存') |
|
|
|
@ -470,8 +467,6 @@ export default { |
|
|
|
}).catch(() => { |
|
|
|
this.editPrintQtyLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 创建HU |
|
|
|
|