From 141d39263f05b9f62e87979bed396b633f008428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Mon, 2 Mar 2026 10:50:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8A=A5=E8=A1=A8):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=84=E5=B7=A5=E5=BA=8F=E6=8A=A5=E8=A1=A8=E7=9A=84=E6=8D=9F?= =?UTF-8?q?=E8=80=97=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将getLossList方法改为异步方式,同时获取酸轧/镀锌和分条工序的数据 合并两个工序的数据后再查询钢卷信息,提高数据完整性和准确性 添加updateBy参数区分不同工序的管理员 --- klp-ui/src/views/wms/report/zha/day.vue | 63 ++++---- klp-ui/src/views/wms/report/zha/month.vue | 56 +++++--- klp-ui/src/views/wms/report/zha/team.vue | 56 +++++--- klp-ui/src/views/wms/report/zha/year.vue | 58 ++++---- klp-ui/src/views/wms/report/zha_.vue | 56 +++++--- klp-ui/src/views/wms/report/zinc/day.vue | 59 ++++---- klp-ui/src/views/wms/report/zinc/month.vue | 56 +++++--- klp-ui/src/views/wms/report/zinc/team.vue | 158 +++++++++++---------- klp-ui/src/views/wms/report/zinc/year.vue | 58 ++++---- klp-ui/src/views/wms/report/zinc_.vue | 56 +++++--- 10 files changed, 389 insertions(+), 287 deletions(-) diff --git a/klp-ui/src/views/wms/report/zha/day.vue b/klp-ui/src/views/wms/report/zha/day.vue index 48ba02fc..946a298a 100644 --- a/klp-ui/src/views/wms/report/zha/day.vue +++ b/klp-ui/src/views/wms/report/zha/day.vue @@ -63,9 +63,10 @@ {{ summary.abRate }} - + - {{ item.value }} + {{ item.value + }} @@ -268,7 +269,7 @@ export default { summary() { return calcSummary(this.list, this.lossList) }, - abSummary() { + abSummary() { return calcAbSummary(this.list) } }, @@ -312,36 +313,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 11, // 酸轧工序 pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.lossList = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'suanzhakuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.lossList = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zha/month.vue b/klp-ui/src/views/wms/report/zha/month.vue index 9aab130d..8955a84a 100644 --- a/klp-ui/src/views/wms/report/zha/month.vue +++ b/klp-ui/src/views/wms/report/zha/month.vue @@ -334,36 +334,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 11, // 酸轧工序 pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.lossList = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'suanzhakuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.lossList = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zha/team.vue b/klp-ui/src/views/wms/report/zha/team.vue index 8771cc09..bbc28ab6 100644 --- a/klp-ui/src/views/wms/report/zha/team.vue +++ b/klp-ui/src/views/wms/report/zha/team.vue @@ -389,36 +389,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 11, // 酸轧工序 pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.list = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'suanzhakuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.lossList = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zha/year.vue b/klp-ui/src/views/wms/report/zha/year.vue index 50454f8b..f0fc65b9 100644 --- a/klp-ui/src/views/wms/report/zha/year.vue +++ b/klp-ui/src/views/wms/report/zha/year.vue @@ -318,36 +318,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 11, // 酸轧工序 - pageSize: 9999, + pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.lossList = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'suanzhakuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.lossList = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zha_.vue b/klp-ui/src/views/wms/report/zha_.vue index cce07f00..ae4c6713 100644 --- a/klp-ui/src/views/wms/report/zha_.vue +++ b/klp-ui/src/views/wms/report/zha_.vue @@ -179,9 +179,9 @@ export default { this.planList = res.rows }) }, - getList() { + async getList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ // actionStatus: 2, warehouseId: this.queryParams.planId, // actionType: 401, @@ -190,28 +190,38 @@ export default { pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.list = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.list = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'suanzhakuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.list = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.list = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zinc/day.vue b/klp-ui/src/views/wms/report/zinc/day.vue index 3aa6d401..28643833 100644 --- a/klp-ui/src/views/wms/report/zinc/day.vue +++ b/klp-ui/src/views/wms/report/zinc/day.vue @@ -65,7 +65,8 @@ - {{ item.value }} + {{ item.value + }} @@ -298,36 +299,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 501, // 镀锌工序 pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.list = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'duxinkuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.list = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zinc/month.vue b/klp-ui/src/views/wms/report/zinc/month.vue index 3d1b64ea..cf4be4ad 100644 --- a/klp-ui/src/views/wms/report/zinc/month.vue +++ b/klp-ui/src/views/wms/report/zinc/month.vue @@ -320,36 +320,46 @@ export default { this.loading = false }) }, - getLossList() { + async getLossList() { this.loading = true - listPendingAction({ + const res1 = await listPendingAction({ actionType: 501, // 镀锌工序 pageSize: 999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, - }).then(res => { - const actions = res.rows - const coilIds = actions.map(item => item.coilId).join(',') - console.log(coilIds) - if (!coilIds) { - this.$message({ - message: '暂无数据', - type: 'warning', - }) - this.lossList = [] - this.loading = false - return - } - listCoilWithIds({ - ...this.queryParams, - byCreateTimeStart: undefined, - byCreateTimeEnd: undefined, - coilIds: coilIds, - }).then(res => { - this.lossList = res.rows - this.loading = false + }) + const res2 = await listPendingAction({ + // actionStatus: 2, + warehouseId: this.queryParams.planId, + // actionType: 401, + actionType: 200, // 分条工序 + pageSize: 999, + pageNum: 1, + startTime: this.queryParams.byCreateTimeStart, + endTime: this.queryParams.byCreateTimeEnd, + updateBy: 'duxinkuguan', + }) + const actions = res1.rows.concat(res2.rows) + const coilIds = actions.map(item => item.coilId).join(',') + console.log(coilIds) + if (!coilIds) { + this.$message({ + message: '暂无数据', + type: 'warning', }) + this.list = [] + this.loading = false + return + } + listCoilWithIds({ + ...this.queryParams, + byCreateTimeStart: undefined, + byCreateTimeEnd: undefined, + coilIds: coilIds, + }).then(res => { + this.lossList = res.rows + this.loading = false }) }, // 导出 diff --git a/klp-ui/src/views/wms/report/zinc/team.vue b/klp-ui/src/views/wms/report/zinc/team.vue index cd69c44b..d4877d4d 100644 --- a/klp-ui/src/views/wms/report/zinc/team.vue +++ b/klp-ui/src/views/wms/report/zinc/team.vue @@ -94,62 +94,62 @@ - - -