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