领料数量问题修改
This commit is contained in:
parent
939f3c3dd2
commit
69d95f2707
|
|
@ -133,10 +133,10 @@
|
|||
<el-table-column label="预领数量" prop="preNum" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.preNum"
|
||||
v-model.number="scope.row.preNum"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="1" @input="checkNum(scope.row)"
|
||||
:min="1" :max="scope.row.storageNum"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -457,7 +457,7 @@ export default {
|
|||
if (z.data.typeId === i) {
|
||||
const obj = JSON.parse(JSON.stringify(z.data));
|
||||
obj.preNum = 1;
|
||||
if(obj.storageNum==0){
|
||||
if(obj.storageNum<=0){
|
||||
let index = this.deviceType.length;
|
||||
if(index==1){
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -466,7 +466,7 @@ export default {
|
|||
}else{
|
||||
this.deviceType=this.deviceType.splice(0,1)
|
||||
}
|
||||
this.$modal.msgError("所选物资规格类型库存量为0!");
|
||||
this.$modal.msgError("所选物资规格类型库存量为空!");
|
||||
}else{
|
||||
tempList.push(obj);
|
||||
}
|
||||
|
|
@ -513,12 +513,12 @@ export default {
|
|||
// await this.projectInfoList();
|
||||
},
|
||||
checkNum(row) {
|
||||
let maxNum = row.storageNum
|
||||
if (row.preNum <= 1) {
|
||||
row.preNum = 1
|
||||
} else if (row.preNum >= maxNum) {
|
||||
row.preNum = maxNum-1
|
||||
}
|
||||
// let maxNum = row.storageNum
|
||||
// if (row.preNum <= 1) {
|
||||
// row.preNum = 1
|
||||
// } else if (row.preNum > maxNum) {
|
||||
// row.preNum = maxNum-1
|
||||
// }
|
||||
},
|
||||
//单位,工程树结构数据获取父
|
||||
treeParentsById(list, id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue