Commit 20bc325c authored by jingnan's avatar jingnan 👀

领用出库报废数量校验修改

parent fab5134f
......@@ -95,8 +95,10 @@ export default {
submitEvent(addContinue) {
this.$refs['applyForm'].validate((valid) => {
if (valid && this.selection) {
if (this.applyForm.reqAmount > this.selection.unableAmount) return this.$utils.showMessageWarning('申领数量不能大于当前选中物料的可用数量!')
const typeName = this.basicData.useRequestType
const maxAmount = typeName === 'scrapUse' ? this.selection.reqAmountOri : this.selection.unableAmount
const maxWarning = typeName === 'scrapUse' ? '出库数量' : '可用数量'
if (this.applyForm.reqAmount > maxAmount) return this.$utils.showMessageWarning(`申领数量不能大于当前选中物料的${maxWarning}!`)
const data = [{
'subTypeName': 'OutStorageUseItem',
'extMaterial': this.selection.extMaterial,
......
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