|
@@ -244,6 +244,7 @@
|
|
|
:selection.sync="selection"
|
|
:selection.sync="selection"
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
:initLoad="false"
|
|
:initLoad="false"
|
|
|
|
|
+ @done="onDone"
|
|
|
>
|
|
>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -813,10 +814,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
|
- const code = await getCode('transfer_no');
|
|
|
|
|
- const name = await getCode('inventory_allocation_name');
|
|
|
|
|
- this.params.name = name;
|
|
|
|
|
- this.params.code = code;
|
|
|
|
|
|
|
+
|
|
|
// this.getTreeData();
|
|
// this.getTreeData();
|
|
|
await this.getFactoryList();
|
|
await this.getFactoryList();
|
|
|
if (this.$route.query.isEdit) {
|
|
if (this.$route.query.isEdit) {
|
|
@@ -824,6 +822,10 @@
|
|
|
this.isEdit = true;
|
|
this.isEdit = true;
|
|
|
this.getEditInfo();
|
|
this.getEditInfo();
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ const code = await getCode('transfer_no');
|
|
|
|
|
+ const name = await getCode('inventory_allocation_name');
|
|
|
|
|
+ this.params.name = name;
|
|
|
|
|
+ this.params.code = code;
|
|
|
if(this.factoryList.find(item => item.id == this.userInfo.factoryId)?.id) {
|
|
if(this.factoryList.find(item => item.id == this.userInfo.factoryId)?.id) {
|
|
|
this.factoryId = this.userInfo.factoryId;
|
|
this.factoryId = this.userInfo.factoryId;
|
|
|
this.params.targetFactoriesId = this.factoryId
|
|
this.params.targetFactoriesId = this.factoryId
|
|
@@ -837,6 +839,7 @@
|
|
|
watch: {
|
|
watch: {
|
|
|
productList() {
|
|
productList() {
|
|
|
this.doLayout();
|
|
this.doLayout();
|
|
|
|
|
+ this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -863,6 +866,14 @@
|
|
|
});
|
|
});
|
|
|
return data;
|
|
return data;
|
|
|
},
|
|
},
|
|
|
|
|
+ onDone(res) {
|
|
|
|
|
+ console.log('res:', res);
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ // 回显选中的数据的复选框
|
|
|
|
|
+ console.log('data------data', this.selectionIds);
|
|
|
|
|
+ this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
this.$refs.table.reload({ page: 1, where });
|
|
@@ -938,9 +949,10 @@
|
|
|
// return this.selectionIds.includes(item.id);
|
|
// return this.selectionIds.includes(item.id);
|
|
|
// });
|
|
// });
|
|
|
this.selection = dataList;
|
|
this.selection = dataList;
|
|
|
- this.selection.forEach((item) => {
|
|
|
|
|
- this.$refs.table.toggleRowSelection(item);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.selection.forEach((item) => {
|
|
|
|
|
+ // this.$refs.table.toggleRowSelection(item);
|
|
|
|
|
+ // });
|
|
|
|
|
+ this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
|
console.log('this.selection------', this.selection);
|
|
console.log('this.selection------', this.selection);
|
|
|
this.tableData = this.selection.map((item, index) => {
|
|
this.tableData = this.selection.map((item, index) => {
|
|
|
// let filterObj = dataList.filter(
|
|
// let filterObj = dataList.filter(
|
|
@@ -1401,7 +1413,7 @@
|
|
|
deleted(row, index) {
|
|
deleted(row, index) {
|
|
|
console.log('deleted~~~', row.id, index);
|
|
console.log('deleted~~~', row.id, index);
|
|
|
this.tableData.splice(index, 1);
|
|
this.tableData.splice(index, 1);
|
|
|
- this.selectionIds = this.selectionIds.filter((item) => item != row.id);
|
|
|
|
|
|
|
+ this.selectionIds = this.selectionIds.filter((item) => item != row.outInDetailRecordId);
|
|
|
this.selection = this.selection.filter((item) => item.id != row.id);
|
|
this.selection = this.selection.filter((item) => item.id != row.id);
|
|
|
this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
@@ -1443,7 +1455,7 @@
|
|
|
goodsAllocationName: item.goodsAllocationName,
|
|
goodsAllocationName: item.goodsAllocationName,
|
|
|
goodsShelfId: item.goodsShelfId,
|
|
goodsShelfId: item.goodsShelfId,
|
|
|
goodsShelfName: item.goodsShelfName,
|
|
goodsShelfName: item.goodsShelfName,
|
|
|
- outInDetailRecordId: item.id,
|
|
|
|
|
|
|
+ outInDetailRecordId: item.outInDetailRecordId,
|
|
|
targetAreaId: item.targetAreaId,
|
|
targetAreaId: item.targetAreaId,
|
|
|
targetAreaName: item.targetAreaName,
|
|
targetAreaName: item.targetAreaName,
|
|
|
targetGoodsAllocationId: item.targetGoodsAllocationId,
|
|
targetGoodsAllocationId: item.targetGoodsAllocationId,
|
|
@@ -1689,6 +1701,7 @@
|
|
|
console.log('this.params---------', this.params);
|
|
console.log('this.params---------', this.params);
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
|
|
|
+ outInDetailRecordId: item.id,
|
|
|
quantity: item.quantity || item.measureQuantity,
|
|
quantity: item.quantity || item.measureQuantity,
|
|
|
categoryId: item.categoryId,
|
|
categoryId: item.categoryId,
|
|
|
warehouseId: this.params.outWarehouseId,
|
|
warehouseId: this.params.outWarehouseId,
|