From eafb0f7c2aa03f90fd01025adc23f573e89807d6 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 15 Sep 2023 09:20:22 +0800 Subject: [PATCH] update --- src/views/modules/pms/packReport/index.vue | 60 ++++++++++++++++++++-- src/views/modules/pms/workReport/config.js | 2 +- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/src/views/modules/pms/packReport/index.vue b/src/views/modules/pms/packReport/index.vue index fa27d26..4049bd3 100644 --- a/src/views/modules/pms/packReport/index.vue +++ b/src/views/modules/pms/packReport/index.vue @@ -46,6 +46,7 @@ // import BaseSearchForm from "@/components/BaseSearchForm.vue"; import BaseListTable from "@/components/BaseListTable.vue"; import moment from "moment"; +import { timeFilter, dictFilter } from "@/utils/filters"; export default { name: "PackReport", @@ -58,7 +59,56 @@ export default { tableLoading: false, tableConfig: { table: null, - column: [], + column: [ + { width: 120, prop: "orderCode", label: "订单号", fixed: "left" }, + { width: 60, prop: "orderCate", label: "子号" }, + { width: 90, prop: "qty", label: "生产数量" }, + { width: 128, prop: "goodqty", label: "合格数量" }, + { width: 128, prop: "badqty", label: "报废数量" }, + { width: 128, prop: "badratio", label: "报废率" }, + { width: 100, prop: "productCode", label: "物料" }, + { width: 100, prop: "shapeCode", label: "砖型" }, + { width: 160, prop: "brand", label: "牌号" }, + { width: 100, prop: "bomCode", label: "配方编码" }, + { width: 80, prop: "blenderCode", label: "混料机号" }, + { width: 80, prop: "pressCode", label: "压机号" }, + { width: 80, prop: "kilnCode", label: "隧道窑号" }, + { width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter }, + { width: 120, prop: "sapParam6", label: "烧成温度" }, + { width: 120, prop: "sapParam7", label: "烧成时间(min)" }, + { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, + { width: 120, prop: "customerCode", label: "客户" }, + { width: 120, prop: "specifications", label: "生产订单类型" }, + { width: 200, prop: "saleNo", label: "销售订单号" }, + { width: 200, prop: "saleOrderItem", label: "销售订单item号" }, + { width: 120, prop: "soqty", label: "销售订单数" }, + { width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter }, + { width: 65, prop: "sapParam1", label: "addon" }, + { width: 200, prop: "shapeShortDesc", label: "喷码描述" }, + { width: 120, prop: "prodqty", label: "要求生产数量" }, + { width: 128, prop: "paperboard", label: "是否贴纸板", filter: (val) => ["否", "是"][val] }, + { + width: 128, + prop: "palletType", + label: "托盘类型", + filter: (val) => (val != null ? ["非熏蒸", "熏蒸"][val] : "-"), + }, + { width: 120, prop: "remark", label: "备注" }, + { width: 120, prop: "createTime", label: "报工时间", filter: timeFilter }, + { width: 120, prop: "creatorName", label: "报工人" }, + { + width: 128, + prop: "team", + label: "班次", + filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"), + }, + { + width: 120, + prop: "externalCode", + label: "工序", + filter: (val) => (val != null ? ["压机", "检测线", "包装"][val] : "-"), + }, + ], }, dataList: [], listQuery: { @@ -80,11 +130,12 @@ export default { handleReport() {}, async getList() { + this.tableLoading = true; const now = new Date(); const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; const today = new Date(y, m, d, 0, 0, 0).getTime(); - const { data: res } = await this.$axios({ - url: "/pms-am/pms/workReport/pageView", + const { data: res } = await this.$http({ + url: "/pms/workReport/pageView", method: "post", data: { externalCode: 2, @@ -95,6 +146,7 @@ export default { }, }); + this.tableLoading = false; if (res.code == 0) { this.dataList = res.data; } else { @@ -117,6 +169,8 @@ export default { if (res.code == 0) { this.$message.success("报工成功"); this.getList(); + this.hu = ""; + this.$refs.hu.focus(); } else { this.$message.error(res.msg); } diff --git a/src/views/modules/pms/workReport/config.js b/src/views/modules/pms/workReport/config.js index c058447..e68d1e7 100644 --- a/src/views/modules/pms/workReport/config.js +++ b/src/views/modules/pms/workReport/config.js @@ -8,7 +8,7 @@ export default function () { const tableProps = [ { width: 120, prop: "orderCode", label: "订单号", fixed: "left" }, { width: 60, prop: "orderCate", label: "子号" }, - { width: 60, prop: "qty", label: "生产数量" }, + { width: 90, prop: "qty", label: "生产数量" }, { width: 128, prop: "goodqty", label: "合格数量" }, { width: 128, prop: "badqty", label: "报废数量" }, { width: 128, prop: "badratio", label: "报废率" },