|
@@ -151,9 +151,9 @@ export default {
|
|
|
addParamrter() {
|
|
addParamrter() {
|
|
|
// console.log(this.$refs.ProductionCom?.selection);
|
|
// console.log(this.$refs.ProductionCom?.selection);
|
|
|
let arr = this.$refs.ProductionCom.selection;
|
|
let arr = this.$refs.ProductionCom.selection;
|
|
|
-
|
|
|
|
|
|
|
+ let len = this.$refs.table.getData().length + 1
|
|
|
let arrM = arr.map((item, index) => {
|
|
let arrM = arr.map((item, index) => {
|
|
|
- return { ...item.detail };
|
|
|
|
|
|
|
+ return { ...item.detail, orderNum: len + index };
|
|
|
});
|
|
});
|
|
|
arrM.forEach((element) => {
|
|
arrM.forEach((element) => {
|
|
|
if (element.id) {
|
|
if (element.id) {
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.$refs.table.setData([...arrM, ...this.$refs.table.getData()]);
|
|
|
|
|
|
|
+ this.$refs.table.setData([ ...this.$refs.table.getData(), ...arrM,]);
|
|
|
this.$emit('taskList', this.$refs.table.getData())
|
|
this.$emit('taskList', this.$refs.table.getData())
|
|
|
this.closeAdd();
|
|
this.closeAdd();
|
|
|
},
|
|
},
|