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="60" prop="toolQuantity" show-overflow-tooltip/>
<el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip> <el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip>
<template slot-scope="scope"> <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> style="width:98%"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -698,7 +698,14 @@
}; };
this.visible=true; 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 this.dataForm.applySumQty =0
for (const item of this.toolData) { for (const item of this.toolData) {
// null undefined 0 // null undefined 0
@ -706,6 +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;
}
}
if(this.dataForm.applySumQty===0){ if(this.dataForm.applySumQty===0){
this.$alert('未填写申请数量!', '错误', { this.$alert('未填写申请数量!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'

Loading…
Cancel
Save