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