diff --git a/klp-ui/src/views/wms/report/zha.vue b/klp-ui/src/views/wms/report/zha.vue index 57d4fb04..994b6e03 100644 --- a/klp-ui/src/views/wms/report/zha.vue +++ b/klp-ui/src/views/wms/report/zha.vue @@ -19,8 +19,11 @@ @keyup.enter.native="handleQuery" /> - + + + + num.toString().padStart(2, '0') const now = new Date() // 当前本地北京时间 @@ -148,6 +151,40 @@ export default { itemManufacturer: '', }, loading: false, + warehouseIds: [ + '1988150099140866050', + '1988150263284953089', + '1988150545175736322', + '1988150150521090049', + ], + warehouseOptions: [ + { label: '酸连轧成品库', value: '1988150099140866050' }, + { label: '镀锌原料库', value: '1988150263284953089' }, + { label: '脱脂原料库', value: '1988150545175736322' }, + { label: '酸连轧纵剪分条原料库', value: '1988150150521090049' }, + ], + warehouseQueryMap: { + '1988150099140866050': { + selectType: 'product', + createBy: 'suanzhakuguan', + warehouseId: '1988150099140866050' + }, + '1988150263284953089': { + selectType: 'raw_material', + createBy: 'suanzhakuguan', + warehouseId: '1988150263284953089' + }, + '1988150545175736322': { + selectType: 'raw_material', + createBy: 'suanzhakuguan', + warehouseId: '1988150545175736322' + }, + '1988150150521090049': { + selectType: 'raw_material', + createBy: 'suanzhakuguan', + warehouseId: '1988150150521090049' + }, + } } }, computed: { @@ -166,49 +203,61 @@ export default { methods: { getList() { this.loading = true - Promise.all([ - // 酸连轧成品库 - listCoilWithIds({ - ...this.queryParams, - pageSize: 9999, - pageNum: 1, - // dataType: 1, - createBy: 'suanzhakuguan', - warehouseId: '1988150099140866050' - }), - // 镀锌原料库 - listCoilWithIds({ - ...this.queryParams, - pageSize: 9999, - pageNum: 1, - // dataType: 1, - selectType: 'raw_material', - createBy: 'suanzhakuguan', - warehouseId: '1988150263284953089' - }), - // 脱脂原料库 - listCoilWithIds({ - ...this.queryParams, - pageSize: 9999, - pageNum: 1, - // dataType: 1, - selectType: 'raw_material', - createBy: 'suanzhakuguan', - warehouseId: '1988150545175736322' - }), - // 酸连轧纵剪分条原料库1988150150521090049 - listCoilWithIds({ - ...this.queryParams, - pageSize: 9999, - pageNum: 1, - // dataType: 1, - selectType: 'raw_material', - createBy: 'suanzhakuguan', - warehouseId: '1988150150521090049' - }), - ]).then(([res1, res2, res3, res4]) => { - console.log(res1, res2, res3, res4) - const list = [...res1.rows, ...res2.rows, ...res3.rows, ...res4.rows] + Promise.all( + this.warehouseIds.map(warehouseId => { + const params = this.warehouseQueryMap[warehouseId] + return listCoilWithIds({ + ...this.queryParams, + pageSize: 9999, + pageNum: 1, + // dataType: 1, + ...params + }) + }) + // [ + // // 酸连轧成品库 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // createBy: 'suanzhakuguan', + // warehouseId: '1988150099140866050' + // }), + // // 镀锌原料库 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // selectType: 'raw_material', + // createBy: 'suanzhakuguan', + // warehouseId: '1988150263284953089' + // }), + // // 脱脂原料库 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // selectType: 'raw_material', + // createBy: 'suanzhakuguan', + // warehouseId: '1988150545175736322' + // }), + // // 酸连轧纵剪分条原料库1988150150521090049 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // selectType: 'raw_material', + // createBy: 'suanzhakuguan', + // warehouseId: '1988150150521090049' + // }), + // ] + ).then((resList) => { + console.log(resList) + const list = resList.flatMap(res => res.rows) // 按照createTime 降序排序 this.list = list.sort( (a, b) => new Date(b.createTime) - new Date(a.createTime) diff --git a/klp-ui/src/views/wms/report/zinc.vue b/klp-ui/src/views/wms/report/zinc.vue index 04698203..850f2d5b 100644 --- a/klp-ui/src/views/wms/report/zinc.vue +++ b/klp-ui/src/views/wms/report/zinc.vue @@ -19,8 +19,11 @@ @keyup.enter.native="handleQuery" /> - + + + + { - console.log(res1, res2) - const list = [...res1.rows, ...res2.rows] + ...this.warehouseIds.map(warehouseId => listCoilWithIds({ + ...this.queryParams, + ...this.warehouseQueryMap[warehouseId], + pageSize: 9999, + pageNum: 1, + // dataType: 1, + })) + // // 镀锌成品库 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // selectType: 'product', + // // createBy: 'suanzhakuguan', + // warehouseId: '1988150323162836993' + // }), + // // 镀锌纵剪分条原料库 + // listCoilWithIds({ + // ...this.queryParams, + // pageSize: 9999, + // pageNum: 1, + // // dataType: 1, + // selectType: 'raw_material', + // // createBy: 'suanzhakuguan', + // warehouseId: '1988150487185289217' + // }), + ]).then((resList) => { + console.log(resList) + const list = resList.flatMap(res => res.rows) // 按照createTime 降序排序 this.list = list.sort( (a, b) => new Date(b.createTime) - new Date(a.createTime)