领料数量问题修改

This commit is contained in:
zzyuan 2024-12-04 11:06:23 +08:00
parent 939f3c3dd2
commit 69d95f2707
1 changed files with 10 additions and 10 deletions

View File

@ -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) {