|
@@ -48,7 +48,7 @@
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:needPage="false"
|
|
:needPage="false"
|
|
|
- :columns="formData.splitBatch == 1 ? columns3 : columns"
|
|
|
|
|
|
|
+ :columns="columns"
|
|
|
:datasource="form.surplusUnpack"
|
|
:datasource="form.surplusUnpack"
|
|
|
>
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
@@ -199,7 +199,6 @@
|
|
|
deviceId: ''
|
|
deviceId: ''
|
|
|
},
|
|
},
|
|
|
requiredFormingNum: 0,
|
|
requiredFormingNum: 0,
|
|
|
- showNum: 0,
|
|
|
|
|
|
|
|
|
|
form: {
|
|
form: {
|
|
|
surplusUnpack: [],
|
|
surplusUnpack: [],
|
|
@@ -281,7 +280,7 @@
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- columns3: []
|
|
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -289,28 +288,17 @@
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.formData = deepClone(row);
|
|
this.formData = deepClone(row);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ console.log(this.formData);
|
|
|
|
|
|
|
|
if (this.formData.splitBatch == 1) {
|
|
if (this.formData.splitBatch == 1) {
|
|
|
-
|
|
|
|
|
- this.columns3 = deepClone(this.columns);
|
|
|
|
|
-
|
|
|
|
|
- this.columns3.splice(3, 0, {
|
|
|
|
|
- prop: 'splitResidue',
|
|
|
|
|
- label: '剩余数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- slot: 'splitResidue',
|
|
|
|
|
- minWidth: 100
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.columns[2].label = '剩余数量'
|
|
|
this.requiredFormingNum = this.formData.splitResidue;
|
|
this.requiredFormingNum = this.formData.splitResidue;
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.requiredFormingNum = this.formData.requiredFormingNum;
|
|
this.requiredFormingNum = this.formData.requiredFormingNum;
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
- this.showNum = this.formData.requiredFormingNum;
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
this.form.surplusUnpack = [];
|
|
this.form.surplusUnpack = [];
|
|
|
this.form.unpackList = [];
|
|
this.form.unpackList = [];
|
|
@@ -320,7 +308,7 @@
|
|
|
setSurplus() {
|
|
setSurplus() {
|
|
|
this.form.surplusUnpack.push({
|
|
this.form.surplusUnpack.push({
|
|
|
joinPlanCode: this.formData.code,
|
|
joinPlanCode: this.formData.code,
|
|
|
- requiredFormingNum: this.formData.requiredFormingNum,
|
|
|
|
|
|
|
+ requiredFormingNum: this.formData.splitBatch == 1 ? this.formData.splitResidue : this.formData.requiredFormingNum,
|
|
|
batchNo: this.formData.batchNo,
|
|
batchNo: this.formData.batchNo,
|
|
|
reqMoldTime: '',
|
|
reqMoldTime: '',
|
|
|
isCopy: 1
|
|
isCopy: 1
|
|
@@ -337,7 +325,7 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
changeNum(index) {
|
|
changeNum(index) {
|
|
|
- let num = this.formData.requiredFormingNum;
|
|
|
|
|
|
|
+ let num = this.formData.splitBatch == 1 ? this.formData.splitResidue : this.formData.requiredFormingNum
|
|
|
this.form.unpackList.forEach((e) => {
|
|
this.form.unpackList.forEach((e) => {
|
|
|
if (
|
|
if (
|
|
|
e.requiredFormingNum != null &&
|
|
e.requiredFormingNum != null &&
|
|
@@ -361,7 +349,7 @@
|
|
|
remove(index) {
|
|
remove(index) {
|
|
|
this.form.unpackList.splice(index, 1);
|
|
this.form.unpackList.splice(index, 1);
|
|
|
if (this.form.unpackList.length == 0) {
|
|
if (this.form.unpackList.length == 0) {
|
|
|
- this.requiredFormingNum = this.formData.requiredFormingNum;
|
|
|
|
|
|
|
+ this.requiredFormingNum = this.formData.splitBatch == 1 ? this.formData.splitResidue : this.formData.requiredFormingNum
|
|
|
} else {
|
|
} else {
|
|
|
this.changeNum(index);
|
|
this.changeNum(index);
|
|
|
}
|
|
}
|