|
|
|
@ -114,7 +114,18 @@
|
|
|
|
|
<el-table-column label="物料描述" align="center" prop="materialDesc" />
|
|
|
|
|
<el-table-column label="物料编号" align="center" prop="materialCode" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="数量" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="计划数量" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="出库数量" align="center" prop="outNumber" />
|
|
|
|
|
<el-table-column label="剩余数量" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.planNumber - scope.row.outNumber }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作数量" align="center" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="包装线" align="center" prop="stationNo" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable
|
|
|
|
@ -169,6 +180,7 @@ export default {
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
planDate: null,
|
|
|
|
|
planNumber: null,
|
|
|
|
|
qty: null,
|
|
|
|
|
Unit: null,
|
|
|
|
|
outNumber: null,
|
|
|
|
|
locCode: null,
|
|
|
|
@ -325,6 +337,7 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.queryForm = {}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
@ -335,6 +348,7 @@ export default {
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
planDate: null,
|
|
|
|
|
planNumber: null,
|
|
|
|
|
qty: null,
|
|
|
|
|
Unit: null,
|
|
|
|
|
outNumber: null,
|
|
|
|
|
locCode: null,
|
|
|
|
@ -387,6 +401,14 @@ export default {
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleQtyChange(row, event) {
|
|
|
|
|
// 在这里处理输入变化,你可以更新 row 对象中的 qty 属性
|
|
|
|
|
row.qty = event;
|
|
|
|
|
// 或者调用后端接口保存数据
|
|
|
|
|
// this.saveQtyToServer(row.id, event);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
@ -424,6 +446,18 @@ export default {
|
|
|
|
|
_this.$modal.msgError("请选择");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let tem=""
|
|
|
|
|
_this.selectedRows.forEach(function(row) {
|
|
|
|
|
// 在这里对每个 row 进行操作
|
|
|
|
|
|
|
|
|
|
if (row.outNumber === row.planNumber) {
|
|
|
|
|
_this.$modal.msgError("已经出完");
|
|
|
|
|
tem="0"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (tem=="0"){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var bull = _this.selectedRows.some((item) => {
|
|
|
|
|
// console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo)
|
|
|
|
|
return item.stationNo == undefined || item.stationNo == ''
|
|
|
|
|