|
|
@ -699,13 +699,13 @@ |
|
|
this.visible=true; |
|
|
this.visible=true; |
|
|
}, |
|
|
}, |
|
|
changeSum(row){ |
|
|
changeSum(row){ |
|
|
if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){ |
|
|
|
|
|
row.applyQty='' |
|
|
|
|
|
this.$alert('实际申请数量大于表单工具数量!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){ |
|
|
|
|
|
// row.applyQty='' |
|
|
|
|
|
// this.$alert('实际申请数量大于表单工具数量!', '错误', { |
|
|
|
|
|
// confirmButtonText: '确定' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
this.dataForm.applySumQty =0 |
|
|
this.dataForm.applySumQty =0 |
|
|
for (const item of this.toolData) { |
|
|
for (const item of this.toolData) { |
|
|
// 累加之前先确保值存在,并将 null 或 undefined 转换为0 |
|
|
// 累加之前先确保值存在,并将 null 或 undefined 转换为0 |
|
|
@ -713,14 +713,14 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
saveData(){ |
|
|
saveData(){ |
|
|
for (let i = 0; i < this.toolData.length; i++) { |
|
|
|
|
|
if(this.toolData[i].toolQuantity<this.toolData[i].applyQty){ |
|
|
|
|
|
this.$alert( '工具:'+this.toolData[i].toolNo +' 实际申请数量大于表单工具数量!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// for (let i = 0; i < this.toolData.length; i++) { |
|
|
|
|
|
// if(this.toolData[i].toolQuantity<this.toolData[i].applyQty){ |
|
|
|
|
|
// this.$alert( '工具:'+this.toolData[i].toolNo +' 实际申请数量大于表单工具数量!', '错误', { |
|
|
|
|
|
// confirmButtonText: '确定' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
if(this.dataForm.applySumQty===0){ |
|
|
if(this.dataForm.applySumQty===0){ |
|
|
this.$alert('未填写申请数量!', '错误', { |
|
|
this.$alert('未填写申请数量!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
|