Browse Source

plm BM

master
ruanqi 2 years ago
parent
commit
d4d05739b8
  1. 19
      src/views/modules/tooling/toolingInfo.vue

19
src/views/modules/tooling/toolingInfo.vue

@ -282,7 +282,7 @@
<el-table-column label="工具数量" width="60" prop="toolQuantity" show-overflow-tooltip/>
<el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</template>
</el-table-column>
@ -698,7 +698,14 @@
};
this.visible=true;
},
changeSum(){
changeSum(row){
if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){
row.applyQty=''
this.$alert('实际申请数量大于表单工具数量!', '错误', {
confirmButtonText: '确定'
})
return false;
}
this.dataForm.applySumQty =0
for (const item of this.toolData) {
// null undefined 0
@ -706,6 +713,14 @@
}
},
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;
}
}
if(this.dataForm.applySumQty===0){
this.$alert('未填写申请数量!', '错误', {
confirmButtonText: '确定'

Loading…
Cancel
Save