|
@@ -157,12 +157,12 @@
|
|
|
}
|
|
}
|
|
|
this.tableList.splice(index, 1);
|
|
this.tableList.splice(index, 1);
|
|
|
},
|
|
},
|
|
|
- handlCur(row) {
|
|
|
|
|
|
|
+ handlCur(row, num) {
|
|
|
if (![1, 2].includes(row.allocationStatus)) {
|
|
if (![1, 2].includes(row.allocationStatus)) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.cur = { ...row };
|
|
this.cur = { ...row };
|
|
|
-
|
|
|
|
|
|
|
+ console.log('==this.formData', this.formData);
|
|
|
// let shelfId=
|
|
// let shelfId=
|
|
|
const { area, shelves, warehouse } = this.formData;
|
|
const { area, shelves, warehouse } = this.formData;
|
|
|
let warehouseId = warehouse.id;
|
|
let warehouseId = warehouse.id;
|
|
@@ -194,7 +194,7 @@
|
|
|
shelfCode,
|
|
shelfCode,
|
|
|
cargoSpaceId,
|
|
cargoSpaceId,
|
|
|
cargoSpaceCode,
|
|
cargoSpaceCode,
|
|
|
- num: null
|
|
|
|
|
|
|
+ num: num ? num : this.row.outInNum
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -223,47 +223,82 @@
|
|
|
return item.goodsshelvesCode == id;
|
|
return item.goodsshelvesCode == id;
|
|
|
})[0].id;
|
|
})[0].id;
|
|
|
const res = await warehouseDefinition.getListByGoodId(goodsId);
|
|
const res = await warehouseDefinition.getListByGoodId(goodsId);
|
|
|
- // console.log(res);
|
|
|
|
|
this.locationList = res;
|
|
this.locationList = res;
|
|
|
},
|
|
},
|
|
|
getStatus: useDict(warehouseDefinition_locationStatus),
|
|
getStatus: useDict(warehouseDefinition_locationStatus),
|
|
|
async open(row, idx) {
|
|
async open(row, idx) {
|
|
|
- this.row = row;
|
|
|
|
|
- this.idx = idx;
|
|
|
|
|
- this.visible = true;
|
|
|
|
|
- await this._getWarehouseChildren();
|
|
|
|
|
- if (this.row?.warehouseId) {
|
|
|
|
|
- this.warehouse = this.row.warehouseId;
|
|
|
|
|
- this.formData.warehouse = this.warehouseList.find(
|
|
|
|
|
- (w) => w.id == this.row.warehouseId
|
|
|
|
|
- );
|
|
|
|
|
- const res = await warehouseDefinition.getById({
|
|
|
|
|
- id: this.row.warehouseId
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- this.areaList = res.reservoirAreaList || [];
|
|
|
|
|
|
|
+ this.locationList = [];
|
|
|
|
|
+ this.tableList = [];
|
|
|
|
|
+ if (row.houseList.length != 0) {
|
|
|
|
|
+ this.row = row;
|
|
|
|
|
+ this.idx = idx;
|
|
|
|
|
+ this.visible = true;
|
|
|
|
|
+ await this._getWarehouseChildren();
|
|
|
|
|
+ if (this.row?.warehouseId) {
|
|
|
|
|
+ this.warehouse = this.row.warehouseId;
|
|
|
|
|
+ this.formData.warehouse = this.warehouseList.find(
|
|
|
|
|
+ (w) => w.id == this.row.warehouseId
|
|
|
|
|
+ );
|
|
|
|
|
+ const res = await warehouseDefinition.getById({
|
|
|
|
|
+ id: this.row.warehouseId
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- this.formData.area = this.areaList.find(
|
|
|
|
|
- (w) => w.id == this.row.areaId
|
|
|
|
|
- ); // this.row.areaId
|
|
|
|
|
- this.area = this.row.areaCode;
|
|
|
|
|
|
|
+ // this.areaList = res.reservoirAreaList || [];
|
|
|
|
|
+ const rep = await warehouseDefinition.getListByWarehouseId(
|
|
|
|
|
+ this.row.warehouseId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.areaList = rep || [];
|
|
|
|
|
+ console.log('===', rep);
|
|
|
|
|
+ //
|
|
|
|
|
|
|
|
- this.areaGoodsshelvesList = res.goodsShelvesList || [];
|
|
|
|
|
- this.shelvesList = this.areaGoodsshelvesList.filter(
|
|
|
|
|
- (i) => i.reservoirAreaCode === this.area
|
|
|
|
|
- );
|
|
|
|
|
- this.formData.shelves = this.areaGoodsshelvesList.find(
|
|
|
|
|
- (w) => w.code == this.row.shelfCode
|
|
|
|
|
- );
|
|
|
|
|
- this.shelves = this.row.shelfCode;
|
|
|
|
|
|
|
+ this.formData.area = this.areaList.find(
|
|
|
|
|
+ (w) => w.id == this.row.houseList[0].areaId
|
|
|
|
|
+ ); // this.row.areaId
|
|
|
|
|
+ this.area = this.row.houseList[0].areaId;
|
|
|
|
|
|
|
|
- this.allocationReqList = res.goodsAllocationList || [];
|
|
|
|
|
- this.locationList = this.allocationReqList.filter(
|
|
|
|
|
- (i) => i.goodsAllocationCode === this.shelves
|
|
|
|
|
- );
|
|
|
|
|
- this.cur = this.allocationReqList.find(
|
|
|
|
|
- (w) => w.code === this.row.cargoSpaceCode
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ // ===============================
|
|
|
|
|
+ const result = await await warehouseDefinition.getListByAreaId(
|
|
|
|
|
+ this.row.houseList[0].areaId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.areaGoodsshelvesList = result || [];
|
|
|
|
|
+ this.shelvesList = this.areaGoodsshelvesList.filter(
|
|
|
|
|
+ (i) => i.id === this.row.houseList[0].shelfId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.formData.shelves = this.areaGoodsshelvesList.find(
|
|
|
|
|
+ (w) => w.id == this.row.houseList[0].shelfId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.shelves = this.row.houseList[0].shelfCode;
|
|
|
|
|
+ // =========================
|
|
|
|
|
+ const loca = await warehouseDefinition.getListByGoodId(
|
|
|
|
|
+ this.row.houseList[0].shelfId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.locationList = loca;
|
|
|
|
|
+ const items = loca.filter(
|
|
|
|
|
+ (item) => item.id == this.row.houseList[0].cargoSpaceId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.handlCur(items[0], this.row.houseList[0].num);
|
|
|
|
|
+ console.log('items111', items);
|
|
|
|
|
+ // this.allocationReqList = res.goodsAllocationList || [];
|
|
|
|
|
+ // this.locationList = this.allocationReqList.filter(
|
|
|
|
|
+ // (i) => i.goodsAllocationCode === this.shelves
|
|
|
|
|
+ // );
|
|
|
|
|
+ // this.cur = this.allocationReqList.find(
|
|
|
|
|
+ // (w) => w.code === this.row.cargoSpaceCode
|
|
|
|
|
+ // );
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.row = row;
|
|
|
|
|
+ this.idx = idx;
|
|
|
|
|
+ this.visible = true;
|
|
|
|
|
+ await this._getWarehouseChildren();
|
|
|
|
|
+ this.formData = {
|
|
|
|
|
+ warehouse: {},
|
|
|
|
|
+ area: {},
|
|
|
|
|
+ shelves: {}
|
|
|
|
|
+ };
|
|
|
|
|
+ this.warehouse = '';
|
|
|
|
|
+ this.area = '';
|
|
|
|
|
+ this.shelves = '';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async changeWarehouse(val) {
|
|
async changeWarehouse(val) {
|