退料新增接口调节
This commit is contained in:
parent
26e1e91d83
commit
297b91f20e
|
|
@ -855,11 +855,18 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
checkNum(row) {
|
checkNum(row) {
|
||||||
|
console.log(row)
|
||||||
let maxNum = row.num
|
let maxNum = row.num
|
||||||
if (row.preNum <= 1) {
|
if(row.unitValue==1){
|
||||||
row.preNum = 1
|
row.preNum=Number(String(row.preNum).replace(/[^\d.]/g,''))
|
||||||
} else if (row.preNum >= maxNum) {
|
}else{
|
||||||
row.preNum = maxNum
|
row.preNum=Number(String(row.preNum).replace(/[^\d]/g,''))
|
||||||
|
}
|
||||||
|
if (row.preNum <= 0) {
|
||||||
|
row.preNum = 0;
|
||||||
|
}
|
||||||
|
if (row.preNum > maxNum) {
|
||||||
|
row.preNum = maxNum;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,12 @@
|
||||||
prop="typeName"
|
prop="typeName"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="计量单位"
|
||||||
|
align="center"
|
||||||
|
prop="unitName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="待出库数量"
|
label="待出库数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -372,6 +378,12 @@
|
||||||
prop="typeName"
|
prop="typeName"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="计量单位"
|
||||||
|
align="center"
|
||||||
|
prop="unitName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="待出库数量"
|
label="待出库数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -818,12 +830,12 @@
|
||||||
prop="typeModelName"
|
prop="typeModelName"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column-->
|
<el-table-column
|
||||||
<!-- label="库存数量"-->
|
label="计量单位"
|
||||||
<!-- align="center"-->
|
align="center"
|
||||||
<!-- prop="num"-->
|
prop="unitName"
|
||||||
<!-- :show-overflow-tooltip="true"-->
|
:show-overflow-tooltip="true"
|
||||||
<!-- />-->
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="待出库数量"
|
label="待出库数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -839,13 +851,11 @@
|
||||||
<el-table-column label="出库数量" align="center">
|
<el-table-column label="出库数量" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.inputNum"
|
v-model.number="scope.row.inputNum"
|
||||||
placeholder="请输入出库数量"
|
controls-position="right" type="number"
|
||||||
type="number"
|
style="width: 100%" clearable placeholder="请输入出库数量"
|
||||||
@input="checkNum(scope.row)"
|
:min="0" @input="checkNum(scope.row)"
|
||||||
clearable
|
></el-input>
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -1081,6 +1091,8 @@ export default {
|
||||||
this.$set(obj, "outNum", row.outNum); //待出库数量
|
this.$set(obj, "outNum", row.outNum); //待出库数量
|
||||||
this.$set(obj, "inputNum", 1); //出库数量
|
this.$set(obj, "inputNum", 1); //出库数量
|
||||||
this.$set(obj, "num", row.num); //库存
|
this.$set(obj, "num", row.num); //库存
|
||||||
|
this.$set(obj, "unitValue", row.unitValue);
|
||||||
|
this.$set(obj, "unitName", row.unitName);
|
||||||
console.log("[obj]", [obj]);
|
console.log("[obj]", [obj]);
|
||||||
this.outNumList = [obj];
|
this.outNumList = [obj];
|
||||||
},
|
},
|
||||||
|
|
@ -1211,9 +1223,15 @@ export default {
|
||||||
|
|
||||||
//输入出库数量
|
//输入出库数量
|
||||||
checkNum(row) {
|
checkNum(row) {
|
||||||
|
console.log(row)
|
||||||
let maxNum = row.outNum;
|
let maxNum = row.outNum;
|
||||||
if (row.inputNum <= 1) {
|
if(row.unitValue==1){
|
||||||
row.inputNum = 1;
|
row.inputNum=Number(String(row.inputNum).replace(/[^\d.]/g,''))
|
||||||
|
}else{
|
||||||
|
row.inputNum=Number(String(row.inputNum).replace(/[^\d]/g,''))
|
||||||
|
}
|
||||||
|
if (row.inputNum <= 0) {
|
||||||
|
row.inputNum = 0;
|
||||||
}
|
}
|
||||||
if (row.inputNum > row.outNum) {
|
if (row.inputNum > row.outNum) {
|
||||||
row.inputNum = maxNum;
|
row.inputNum = maxNum;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue