From 84a4b2999de94aa1652e8f6fc0a424028ba4dce0 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 15 Aug 2023 11:27:06 +0800 Subject: [PATCH 01/12] =?UTF-8?q?add=20=E5=8E=8B=E6=9C=BA=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/pms/carOrderReport/config.js | 231 ++++++++++++++++++ .../modules/pms/carOrderReport/index.vue | 32 +++ 2 files changed, 263 insertions(+) create mode 100644 src/views/modules/pms/carOrderReport/config.js create mode 100644 src/views/modules/pms/carOrderReport/index.vue diff --git a/src/views/modules/pms/carOrderReport/config.js b/src/views/modules/pms/carOrderReport/config.js new file mode 100644 index 0000000..1703eed --- /dev/null +++ b/src/views/modules/pms/carOrderReport/config.js @@ -0,0 +1,231 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +// import switchBtn from "@/components/noTemplateComponents/switchBtn"; +import QuillRichInput from "@/components/noTemplateComponents/richInput"; +import request from "@/utils/request"; +import { timeFilter } from "@/utils/filters"; + +export default function () { + const tableProps = [ + // 多选框 + // { type: 'index', label: '序号' }, + { width: 128, prop: "createTime", label: "添加时间", filter: timeFilter }, + { width: 128, prop: "updaterName", label: "更改人" }, + { width: 128, prop: "code", label: "窑车号" }, + { width: 128, prop: "orderCode", label: "订单号" }, + { width: 128, prop: "orderCate", label: "订单子号" }, + { width: 128, prop: "shapeCode", label: "砖型" }, + { width: 128, prop: "brand", label: "配方" }, + { width: 128, prop: "goodqty", label: "合格数量" }, + { width: 128, prop: "badqty", label: "报废数量" }, + // { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] }, + // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent + { width: 128, prop: "team", label: "班次", filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-") }, + { width: 128, prop: "report", label: "报工", filter: (val) => (val != null ? ["未报工", "已报工"][val] : "-") }, + { width: 128, prop: "rtime", label: "报工时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "edit", label: "编辑", icon: "edit-outline" }, + // { + // name: "delete", + // icon: "delete", + // label: "删除", + // emitFull: true, + // permission: "pms:carOrderReport:delete", + // }, + ], + }, + ]; + + const headFormFields = [ + { + prop: "orderCode", + label: "订单号", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入订单号", + }, + }, + { + prop: "carCode", + label: "窑车号", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入窑车号", + }, + }, + { + prop: "team", + label: "班次", + select: [ + { label: "早班", value: "0" }, + { label: "中班", value: "1" }, + { label: "晚班", value: "2" }, + ], + default: { value: "" }, + bind: { + placeholder: "请输入班次", + }, + }, + { + prop: "report", + label: "报工", + select: [ + { label: "未报工", value: "0" }, + { label: "已报工", value: "1" }, + ], + default: { value: "0" }, + bind: { + placeholder: "请输入班次", + }, + }, + { + timerange: true, + prop: "timerange", + label: "时间段", + bind: { + placeholder: "请选择时间段", + type: "datetimerange", + "start-placeholder": "开始时间", + "end-placeholder": "结束时间", + }, + }, + { + button: { + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "primary", + name: "报工", + permission: "pms:carOrderReport:report", + }, + bind: { + plain: true, + }, + }, + ]; + + /** + * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件 + * 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js + * 此为后者的配置: + */ + const dialogJustFormConfigs = { + clickModalToClose: false, + form: { + rows: [ + [ + { + forceDisabled: true, + label: "窑车号", + prop: "code", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入窑车号" }, + }, + ], + [ + { + forceDisabled: true, + label: "订单号", + prop: "orderCode", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入订单号" }, + }, + ], + [ + { + forceDisabled: true, + label: "订单子号", + prop: "orderCate", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入订单子号" }, + }, + ], + [ + { + input: true, + label: "合格数量", + prop: "goodqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入合格数量" }, + }, + ], + [ + { + input: true, + label: "报废数量", + prop: "badqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入报废数量" }, + }, + ], + [ + { + richInput: true, + label: "描述信息", + prop: "description", + }, + ], + [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], + ], + operations: [ + { + name: "add", + label: "保存", + type: "primary", + permission: "pms:carOrderReport:save", + showOnEdit: false, + }, + { + name: "update", + label: "更新", + type: "primary", + permission: "pms:carOrderReport:update", + showOnEdit: true, + }, + { name: "reset", label: "重置", type: "warning", showAlways: true }, + ], + }, + }; + + return { + dialogConfigs: dialogJustFormConfigs, + tableConfig: { + table: null, // 此处可省略,el-table 上的配置项 + column: tableProps, // el-column-item 上的配置项 + }, + headFormConfigs: { + rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 + }, + urls: { + base: "/pms/carOrderReport", + page: "/pms/carOrderReport/pageView", + }, + }; +} diff --git a/src/views/modules/pms/carOrderReport/index.vue b/src/views/modules/pms/carOrderReport/index.vue new file mode 100644 index 0000000..da21189 --- /dev/null +++ b/src/views/modules/pms/carOrderReport/index.vue @@ -0,0 +1,32 @@ + + + + + From cdaa2c1f6c69685c9fe25a5f3266db68b7a45e14 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 16 Aug 2023 11:30:16 +0800 Subject: [PATCH 02/12] =?UTF-8?q?update=20=E5=8E=8B=E6=9C=BA=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E7=9A=84search=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/atomViews/ListViewWithHead.vue | 31 +++++----- .../modules/pms/carOrderReport/config.js | 19 +++++- .../modules/pms/carOrderReport/index.vue | 58 ++++++++++++------- 3 files changed, 68 insertions(+), 40 deletions(-) diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index 89f14fe..7f7201c 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -216,6 +216,7 @@ export default { this.cachedSearchCondition = Object.assign({}, params); } + console.log("[http request] params is: ", params); this.$http[this.urls.pageIsPostApi ? "post" : "get"]( this.urls.page, this.urls.pageIsPostApi @@ -664,7 +665,21 @@ export default { } case "查询": { if (typeof payload === "object") { - // BaseSearchForm 给这个组件传递了数据 + /** 必须先处理 listQueryExtra 里的数据 */ + this.listQueryExtra?.map((cond) => { + if (typeof cond === "string") { + if (!!payload[cond]) { + this.cachedSearchCondition[cond] = payload[cond]; + } else { + this.cachedSearchCondition[cond] = ""; + } + } else if (typeof cond === "object") { + Object.keys(cond).forEach((key) => { + this.cachedSearchCondition[key] = cond[key]; + }); + } + }); + // 再处理 payload 里的数据,用于刷新 上面的 数据 Object.assign(this.cachedSearchCondition, payload); if ("timerange" in payload) { if (!!payload.timerange) { @@ -679,20 +694,6 @@ export default { } } - /** 处理 listQueryExtra 里的数据 */ - this.listQueryExtra?.map((cond) => { - if (typeof cond === "string") { - if (!!payload[cond]) { - this.cachedSearchCondition[cond] = payload[cond]; - } else { - this.cachedSearchCondition[cond] = ""; - } - } else if (typeof cond === "object") { - Object.keys(cond).forEach((key) => { - this.cachedSearchCondition[key] = cond[key]; - }); - } - }); console.log("查询", this.cachedSearchCondition); this.getList(this.cachedSearchCondition); break; diff --git a/src/views/modules/pms/carOrderReport/config.js b/src/views/modules/pms/carOrderReport/config.js index 1703eed..7d26ab5 100644 --- a/src/views/modules/pms/carOrderReport/config.js +++ b/src/views/modules/pms/carOrderReport/config.js @@ -7,7 +7,7 @@ import { timeFilter } from "@/utils/filters"; export default function () { const tableProps = [ // 多选框 - // { type: 'index', label: '序号' }, + { type: "selection", width: 60, align: "center" }, { width: 128, prop: "createTime", label: "添加时间", filter: timeFilter }, { width: 128, prop: "updaterName", label: "更改人" }, { width: 128, prop: "code", label: "窑车号" }, @@ -19,8 +19,18 @@ export default function () { { width: 128, prop: "badqty", label: "报废数量" }, // { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] }, // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent - { width: 128, prop: "team", label: "班次", filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-") }, - { width: 128, prop: "report", label: "报工", filter: (val) => (val != null ? ["未报工", "已报工"][val] : "-") }, + { + width: 128, + prop: "team", + label: "班次", + filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"), + }, + { + width: 128, + prop: "report", + label: "报工", + filter: (val) => (val != null ? ["未报工", "已报工"][val] : "-"), + }, { width: 128, prop: "rtime", label: "报工时间", filter: timeFilter }, { prop: "operations", @@ -41,6 +51,7 @@ export default function () { }, ]; + const now = new Date().getTime(); const headFormFields = [ { prop: "orderCode", @@ -89,6 +100,7 @@ export default function () { timerange: true, prop: "timerange", label: "时间段", + default: { value: [now - 3600 * 24 * 7 * 1000, now] }, bind: { placeholder: "请选择时间段", type: "datetimerange", @@ -226,6 +238,7 @@ export default function () { urls: { base: "/pms/carOrderReport", page: "/pms/carOrderReport/pageView", + pageIsPostApi: true, }, }; } diff --git a/src/views/modules/pms/carOrderReport/index.vue b/src/views/modules/pms/carOrderReport/index.vue index da21189..64a7f8f 100644 --- a/src/views/modules/pms/carOrderReport/index.vue +++ b/src/views/modules/pms/carOrderReport/index.vue @@ -1,31 +1,45 @@ From 725fa19bd1de756196d102b8cd9c30a62afb3eef Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 16 Aug 2023 16:56:16 +0800 Subject: [PATCH 03/12] =?UTF-8?q?update=20=E6=89=B9=E9=87=8F=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PrintDom.vue | 8 ++-- src/views/atomViews/ListViewWithHead.vue | 37 +++++++++++++--- src/views/modules/pms/pallet/config.js | 55 +++++++++++++----------- 3 files changed, 66 insertions(+), 34 deletions(-) diff --git a/src/components/PrintDom.vue b/src/components/PrintDom.vue index 0f4f876..dcd5c84 100644 --- a/src/components/PrintDom.vue +++ b/src/components/PrintDom.vue @@ -193,6 +193,7 @@ export default { this.dataForm = res.data; await this.printByLocalData(res.data); + await this.getPrintStatus(id); }, async printByLocalData(data) { @@ -201,7 +202,6 @@ export default { // 绘制HU号 await this.paintQrCode(data.hu || "- 无HU数据 -"); await this.handlePrint(); - await this.getPrintStatus(); }, initPrintPlugin() { @@ -267,7 +267,7 @@ export default { }); }, - getPrintStatus() { + getPrintStatus(id) { return new Promise((resolve, reject) => { if (!this.jobId || !this.lodop) reject(-1); this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true); @@ -278,7 +278,7 @@ export default { // 打印成功 this.sendSuccess() .then(() => { - this.$message.success("打印成功"); + this.$message.success(`打印 ${id} 成功`); this.$emit("refresh-list"); resolve(); }) @@ -287,7 +287,7 @@ export default { reject(err); }); } else { - this.$message.error("打印失败"); + this.$message.error(`打印 ${id} 失败`); } }; this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId); diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index 7f7201c..fee7d5e 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -622,12 +622,7 @@ export default { cancelButtonText: "我再想想", type: "warning", }) - .then(() => { - this.printDOMmount = true; - this.$nextTick(() => { - this.$refs["print"].print(data); - }); - }) + .then(this.printOnce.bind(null, data)) .catch((err) => { // console.log("cancel ", err); }); @@ -719,9 +714,39 @@ export default { }); }); break; + case "打印": + return this.$confirm("开始打印么", "提示", { + confirmButtonText: "确认", + cancelButtonText: "我再想想", + type: "warning", + }) + .then(() => { + console.log("打印如下这些 ids:", this.tableSelectedIds); + // this.tableSelectedIds.reduce(async (id, _) => { + // await this.printOnce(id); + // }) + this.tableSelectedIds.forEach(async (id) => { + await this.printOnce(id); + }) + }) + .catch((err) => { + this.$message.error(`批量打印出错: ${err}`); + }); } }, + /** 打印一次 */ + printOnce(id) { + return new Promise((resolve) => { + this.printDOMmount = true; + this.$nextTick(async () => { + console.log("[Print] 打印项:", id); + await this.$refs["print"].print(id); + resolve(); + }); + }); + }, + /** 导航器的操作 */ handleSizeChange(val) { // val 是新值 diff --git a/src/views/modules/pms/pallet/config.js b/src/views/modules/pms/pallet/config.js index 75582c4..41c3fb9 100644 --- a/src/views/modules/pms/pallet/config.js +++ b/src/views/modules/pms/pallet/config.js @@ -1,20 +1,20 @@ import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; import request from "@/utils/request"; import { timeFilter, dictFilter } from "@/utils/filters"; -import { getDictDataList } from '@/utils'; - +import { getDictDataList } from "@/utils"; // import StateSelect from '@/components/StateSelect.vue'; export default function () { const tableProps = [ { type: "index", label: "序号" }, + { type: "selection" }, { prop: "code", label: "流水号" }, { prop: "carCode", label: "窑车号" }, { prop: "orderCode", label: "订单号" }, { prop: "realQty", label: "数量" }, - { prop: "typeDictValue", label: "类型", filter: dictFilter('pallet_type') }, - { prop: "stifling", label: "熏蒸", filter: val => val != null ? ['非熏蒸', '熏蒸'][val] : '-' }, + { prop: "typeDictValue", label: "类型", filter: dictFilter("pallet_type") }, + { prop: "stifling", label: "熏蒸", filter: (val) => (val != null ? ["非熏蒸", "熏蒸"][val] : "-") }, { prop: "printTime", label: "打印时间", filter: timeFilter }, { prop: "createTime", label: "添加时间", filter: timeFilter }, { @@ -25,7 +25,7 @@ export default function () { subcomponent: TableOperaionComponent, options: [ { name: "print", label: "打印", icon: "printer" }, - { name: "view-car-record", label: "窑车记录", emitField: 'hisId', icon: "shopping-cart-1" }, + { name: "view-car-record", label: "窑车记录", emitField: "hisId", icon: "shopping-cart-1" }, ], }, ]; @@ -38,19 +38,19 @@ export default function () { fn: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }), bind: { placeholder: "请选择窑车号", - filterable: true + filterable: true, }, }, { prop: "orderId", label: "订单号", - fieldOptionLabel: 'code', + fieldOptionLabel: "code", // fieldOptionValue: 'id', select: [], fn: () => this.$http.post("/pms/order/pageView", { page: 1, limit: 999 }), bind: { placeholder: "请选择订单号", - filterable: true + filterable: true, }, }, { @@ -59,6 +59,15 @@ export default function () { name: "查询", }, }, + { + button: { + type: "primary", + name: "打印", + }, + bind: { + plain: true, + }, + }, ]; const dialogJustFormConfigs = { @@ -74,17 +83,17 @@ export default function () { rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { disabled: true, - } + }, }, { select: true, label: "状态", prop: "stateDictValue", - options: getDictDataList('car_state').map(i => ({ label: i.dictLabel, value: i.dictValue })), + options: getDictDataList("car_state").map((i) => ({ label: i.dictLabel, value: i.dictValue })), rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { - fliterable: true - } + fliterable: true, + }, }, ], [ @@ -97,16 +106,16 @@ export default function () { rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { // fliterable: true - - } + }, }, { label: "查看载砖详情", button: true, - onClick: function (id) { // 必须用 function 形式 - console.log(`查看载砖详情`, id) - this.$emit('emit-data', { type: 'to-car-payload', data: id }) - } + onClick: function (id) { + // 必须用 function 形式 + console.log(`查看载砖详情`, id); + this.$emit("emit-data", { type: "to-car-payload", data: id }); + }, }, ], ], @@ -119,7 +128,7 @@ export default function () { }; const carPayloadDialogConfigs = { - dialogWidth: '70%', + dialogWidth: "70%", carPayloadDialog: true, clickModalToClose: false, tableConfig: { @@ -142,8 +151,6 @@ export default function () { }, }; - - return { carPayloadDialogConfigs, dialogConfigs: dialogJustFormConfigs, @@ -156,11 +163,11 @@ export default function () { fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 }, urls: { - base: '/pms/carHistory', - payload: '/pms/carHandle', // hisId 查询 载砖详情 + base: "/pms/carHistory", + payload: "/pms/carHandle", // hisId 查询 载砖详情 page: "/pms/pallet/pageView", pageIsPostApi: true, - printLog: '/pms/pallet/print', // post + printLog: "/pms/pallet/print", // post }, }; } From 3adabb68b8a28b22185d672d63fc1262795965f5 Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 17 Aug 2023 16:28:36 +0800 Subject: [PATCH 04/12] =?UTF-8?q?add=20=E6=8A=A5=E5=B7=A5=E9=A2=84?= =?UTF-8?q?=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReportDialog.vue | 201 ++++++++++++++++++ src/views/atomViews/ListViewWithHead.vue | 124 +++++------ .../modules/pms/carOrderReport/config.js | 18 +- .../modules/pms/carOrderReport/index.vue | 17 +- 4 files changed, 285 insertions(+), 75 deletions(-) create mode 100644 src/components/ReportDialog.vue diff --git a/src/components/ReportDialog.vue b/src/components/ReportDialog.vue new file mode 100644 index 0000000..05f2785 --- /dev/null +++ b/src/components/ReportDialog.vue @@ -0,0 +1,201 @@ + + + + + + + + + diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index fee7d5e..f17c156 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -63,6 +63,12 @@ + + @@ -77,6 +83,7 @@ import Overlay from "@/components/Overlay.vue"; import moment from "moment"; import AttachmentDialog from "@/components/attachmentDialog.vue"; import PrintDom from "../../components/PrintDom.vue"; +import ReportDialog from "../../components/ReportDialog.vue"; const DIALOG_WITH_MENU = "DialogWithMenu"; const DIALOG_JUST_FORM = "DialogJustForm"; @@ -94,6 +101,7 @@ export default { Overlay, AttachmentDialog, PrintDom, + ReportDialog, }, props: { navigator: { @@ -181,6 +189,8 @@ export default { needAttachmentDialog: false, tableSelectedIds: [], printDOMmount: false, + queryParams: {}, + carReportDialogVisible: false, }; }, inject: ["urls"], @@ -190,6 +200,20 @@ export default { "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20; this.size = size; + // 如果设置了 listQueryExtra,就合并到 queryParams + if (this.listQueryExtra && Array.isArray(this.listQueryExtra)) { + this.listQueryExtra.map((item) => { + if (typeof item === "string") this.$set(this.queryParams, item, ""); + else if (typeof item === "object") { + Object.keys(item).forEach((key) => { + this.$set(this.queryParams, key, item[key]); + }); + } + }); + } + + console.log("this.queryParams is: ", JSON.stringify(this.queryParams)); + this.initDataWhenLoad && this.getList(); }, methods: { @@ -204,27 +228,18 @@ export default { limit: this.size, }; - if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) { - this.listQueryExtra.map((nameOrObj) => { - if (typeof nameOrObj === "string") params[nameOrObj] = ""; - else if (typeof nameOrObj === "object") { - Object.keys(nameOrObj).forEach((key) => { - params[key] = nameOrObj[key]; - }); - } - }); - this.cachedSearchCondition = Object.assign({}, params); - } - - console.log("[http request] params is: ", params); this.$http[this.urls.pageIsPostApi ? "post" : "get"]( this.urls.page, this.urls.pageIsPostApi ? { + ...this.queryParams, ...params, } : { - params, + params: { + ...this.queryParams, + ...params, + }, } ) .then(({ data: res }) => { @@ -233,14 +248,6 @@ export default { if (res.code === 0) { // page 场景: if ("list" in res.data) { - // if (res.data.list.length == 0 && res.data.total != 0) { - // // refresh list - // if (this.page > 1) { - // this.page -= 1 - // this.getList() - // return - // } else return - // } /** 破碎记录的特殊需求:数据要结合单位 material + materialUnitDictValue */ if ("attachDictValue" in this.tableConfig.column) { this.dataList = res.data.list.map((row) => { @@ -249,12 +256,6 @@ export default { }); } else this.dataList = res.data.list; - this.totalPage = res.data.total; - } else if ("records" in res.data) { - this.dataList = res.data.records.map((item) => ({ - ...item, - id: item._id ?? item.id, - })); this.totalPage = res.data.total; } else if (Array.isArray(res.data)) { this.dataList = res.data; @@ -659,38 +660,34 @@ export default { return; } case "查询": { - if (typeof payload === "object") { - /** 必须先处理 listQueryExtra 里的数据 */ - this.listQueryExtra?.map((cond) => { - if (typeof cond === "string") { - if (!!payload[cond]) { - this.cachedSearchCondition[cond] = payload[cond]; - } else { - this.cachedSearchCondition[cond] = ""; - } - } else if (typeof cond === "object") { - Object.keys(cond).forEach((key) => { - this.cachedSearchCondition[key] = cond[key]; - }); - } - }); - // 再处理 payload 里的数据,用于刷新 上面的 数据 - Object.assign(this.cachedSearchCondition, payload); - if ("timerange" in payload) { - if (!!payload.timerange) { - const [startTime, endTime] = payload["timerange"]; - this.cachedSearchCondition.startTime = moment(startTime).format("YYYY-MM-DDTHH:mm:ss"); - this.cachedSearchCondition.endTime = moment(endTime).format("YYYY-MM-DDTHH:mm:ss"); - } else { - delete this.cachedSearchCondition.startTime; - delete this.cachedSearchCondition.endTime; - } - delete this.cachedSearchCondition.timerange; + const params = Object.assign({}, payload); + + if ("timerange" in params) { + if (!!params.timerange) { + const [startTime, endTime] = params["timerange"]; + params.startTime = moment(startTime).format("YYYY-MM-DDTHH:mm:ss"); + params.endTime = moment(endTime).format("YYYY-MM-DDTHH:mm:ss"); + } else { + params.startTime = null; + params.endTime = null; } + delete params.timerange; } - console.log("查询", this.cachedSearchCondition); - this.getList(this.cachedSearchCondition); + // console.log( + // "查询 params", + // JSON.stringify({ + // // ...this.queryParams, + // ...params, + // }) + // ); + + this.queryParams = { + ...this.queryParams, + ...params, + }; + + this.getList(); break; } case "同步": @@ -727,11 +724,18 @@ export default { // }) this.tableSelectedIds.forEach(async (id) => { await this.printOnce(id); - }) + }); }) .catch((err) => { this.$message.error(`批量打印出错: ${err}`); }); + case "报工": + console.log("报工ids:", this.tableSelectedIds); + this.carReportDialogVisible = true; + this.$nextTick(() => { + this.$refs['car-report-dialog'].init(); + }); + break; } }, @@ -752,12 +756,12 @@ export default { // val 是新值 this.page = 1; this.size = val; - this.getList(this.cachedSearchCondition); + this.getList(); }, handlePageChange(val) { // val 是新值 - this.getList(this.cachedSearchCondition); + this.getList(); }, /** 打开对话框 */ diff --git a/src/views/modules/pms/carOrderReport/config.js b/src/views/modules/pms/carOrderReport/config.js index 7d26ab5..d69b78f 100644 --- a/src/views/modules/pms/carOrderReport/config.js +++ b/src/views/modules/pms/carOrderReport/config.js @@ -39,7 +39,7 @@ export default function () { width: 90, subcomponent: TableOperaionComponent, options: [ - { name: "edit", label: "编辑", icon: "edit-outline" }, + { name: "edit", label: "编辑", icon: "edit-outline", enable: row => row.report == 0 }, // { // name: "delete", // icon: "delete", @@ -196,14 +196,14 @@ export default function () { elparams: { placeholder: "请输入报废数量" }, }, ], - [ - { - richInput: true, - label: "描述信息", - prop: "description", - }, - ], - [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], + // [ + // { + // richInput: true, + // label: "描述信息", + // prop: "description", + // }, + // ], + // [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], ], operations: [ { diff --git a/src/views/modules/pms/carOrderReport/index.vue b/src/views/modules/pms/carOrderReport/index.vue index 64a7f8f..c9bdaae 100644 --- a/src/views/modules/pms/carOrderReport/index.vue +++ b/src/views/modules/pms/carOrderReport/index.vue @@ -9,6 +9,7 @@ diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index cf279c4..841c5ea 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -734,7 +734,7 @@ export default { console.log("报工ids:", this.tableSelectedIds); this.carReportDialogVisible = true; this.$nextTick(() => { - this.$refs['car-report-dialog'].init(); + this.$refs["car-report-dialog"].init(); }); break; } diff --git a/src/views/modules/pms/bom/config.js b/src/views/modules/pms/bom/config.js index 0f36d8a..1a0c327 100644 --- a/src/views/modules/pms/bom/config.js +++ b/src/views/modules/pms/bom/config.js @@ -63,10 +63,13 @@ export default function () { }, { button: { - type: "plain", + type: "success", name: "导入", permission: "", }, + bind: { + plain: true, + }, }, // { // button: { diff --git a/src/views/modules/pms/order/config.js b/src/views/modules/pms/order/config.js index 63259c7..e1f7950 100644 --- a/src/views/modules/pms/order/config.js +++ b/src/views/modules/pms/order/config.js @@ -173,6 +173,7 @@ export default function () { button: { type: "success", name: "导入订单", + permission :'' }, bind: { plain: true, diff --git a/src/views/modules/pms/stockOrder/config.js b/src/views/modules/pms/stockOrder/config.js new file mode 100644 index 0000000..1af0e53 --- /dev/null +++ b/src/views/modules/pms/stockOrder/config.js @@ -0,0 +1,394 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import request from "@/utils/request"; +import { timeFilter, dictFilter } from "@/utils/filters"; +import { getDictDataList } from "@/utils"; + +// import StateSelect from '@/components/StateSelect.vue'; + +export default function () { + const tableProps = [ + { width: 60, type: "index", label: "序号", fixed: true }, + { width: 120, prop: "code", label: "订单号", fixed: "left" }, + { width: 100, prop: "productCode", label: "物料" }, + { width: 100, prop: "shapeCode", label: "砖型" }, + { width: 160, prop: "brand", label: "牌号" }, + { width: 100, prop: "bomCode", label: "配方编码" }, + { width: 60, prop: "prodqty", label: "数量" }, + { width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter }, + { width: 200, prop: "packTechCode", label: "包装工艺代码" }, + { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, + { width: 120, prop: "customerCode", label: "客户" }, + { width: 120, prop: "specifications", label: "生产订单类型" }, + { width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") }, + { 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: "shortDesc", label: "喷码描述" }, + { width: 120, prop: "yieldqty", label: "已生产数量" }, + // { prop: "description", label: "详情", subcomponent: TableTextComponent }, + { width: 120, prop: "remark", label: "备注" }, + { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [{ name: "view", label: "查看详情", icon: "view" }], + }, + ]; + + const headFormFields = [ + { + prop: "code", + label: "订单号", + input: true, + bind: { + placeholder: "请输入订单号", + }, + }, + { + prop: "types", + label: "状态", + select: [ + { label: "生产", value: "2" }, + { label: "结束", value: "4" }, + ], + bind: { + placeholder: "请选择状态", + multiple: true, + filterable: true, + }, + }, + { + button: { + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "success", + name: "导入", + permission: "", + }, + bind: { + plain: true, + }, + }, + ]; + + const textOnlyComponent = { + props: { + modelValue: { + type: String | Number, + required: true, + }, + useBuiltin: { + type: Boolean, + default: true, + }, + }, + data() { + return { + orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"], + }; + }, + render: function (h) { + return h( + "span", + { style: { display: "block", marginTop: "0" } }, + this.useBuiltin + ? this.orderStatusMap[this.modelValue] ?? "-" + : this.modelValue.toString().trim() === "" + ? "-" + : this.modelValue.toString() + ); + }, + }; + + const dialogJustFormConfigs = { + width: "80%", + form: { + rows: [ + [ + { + label: "订单状态", + prop: "statusDictValue", + component: textOnlyComponent, + }, + { + input: true, + label: "订单号", + prop: "code", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "输入订单号" }, + }, + { + datetime: true, + label: "计划开始时间", + prop: "planStartTime", + elparams: { + placeholder: "选择计划开始时间", + type: "datetime", + "value-format": "yyyy-MM-ddTHH:mm:ss", + }, + }, + { + input: true, + label: "Add on", + prop: "sapParam1", + elparams: { placeholder: "输入addon" }, + }, + ], + [ + { + select: true, + label: "牌号", + prop: "bomId", + options: [], + fetchData: () => + this.$http.get("/pms/bom/page", { + params: { limit: 999, page: 1, key: "", externalCode: "" }, + }), + elparams: { placeholder: "选择牌号", filterable: true }, + injectTo: [ + ["bomCode", "code"], + ["ai", "externalCode"], + ], + }, + { + label: "配方号", + prop: "bomCode", + component: textOnlyComponent, + bind: { + useBuiltin: false, + }, + }, + { + select: true, + label: "包装代码", + prop: "packTech", + options: [], + optionLabel: "code", + fetchData: () => + this.$http.post("/pms/equipmentTech/pageView", { + limit: 999, + page: 1, + key: "", + shape: "", + wsId: 5, + }), + elparams: { placeholder: "选择包装代码", filterable: true }, + }, + { + select: true, + label: "物料", + prop: "productId", + options: [], + optionLabel: "code", + fetchData: () => + this.$http.get("/pms/product/page", { params: { limit: 999, page: 1, key: "" } }), + elparams: { placeholder: "选择物料", filterable: true }, + }, + ], + [ + { + select: true, + label: "砖型", + prop: "shape", + optionLabel: "code", + options: [], + fetchData: () => + this.$http.get("/pms/shape/page", { params: { limit: 999, page: 1, key: "" } }), + elparams: { placeholder: "选择砖型", filterable: true }, + }, + { + input: true, + label: "烧成温度", + prop: "sapParam6", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入烧成温度" }, + }, + { + input: true, + label: "烧成时间(min)", + prop: "sapParam7", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入烧成时间" }, + }, + { + input: true, + label: "生产订单类型", + prop: "specifications", + elparams: { placeholder: "输入生产订单类型" }, + }, + ], + [ + { + input: true, + label: "生产订单砖数", + prop: "prodqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入要求生产的数量" }, + }, + { + input: true, + label: "已生产数", + prop: "yieldqty", + rules: [ + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入已经生产的数量" }, + }, + { + input: true, + label: "托盘码放砖数", + prop: "pcsKilnCar", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入托盘码放砖数" }, + }, + { + input: true, + label: "销售订单号", + prop: "saleNo", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "输入销售订单号" }, + }, + ], + [ + { + input: true, + label: "销售订单item号", + prop: "saleOrderItem", + elparams: { placeholder: "输入销售订单item号" }, + }, + { + input: true, + label: "销售订单砖数", + prop: "soqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "输入销售订单砖数" }, + }, + { + datetime: true, + label: "销售时间", + prop: "deliveryTime", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "选择销售时间" }, + }, + { + label: "物料号销售文本", + prop: "shortDesc", + component: textOnlyComponent, + bind: { + useBuiltin: false, + }, + }, + ], + [ + { + select: true, + label: "客户", + prop: "customerId", + options: [], + optionLabel: "name", + fetchData: () => + this.$http.get("/pms/customer/page", { params: { limit: 999, page: 1, name: "" } }), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "选择客户" }, + }, + { + label: "托板类型", + prop: "palletType", + select: true, + options: getDictDataList("pallet_type").map((item) => ({ + label: item.dictLabel, + value: item.dictValue, + })), + }, + { + label: "贴纸板", + prop: "paperboard", + select: true, + options: [ + { label: "否", value: "0" }, + { label: "是", value: "1" }, + ], + }, + { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }, + ], + ], + operations: [ + // { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + ], + }, + }; + + return { + dialogConfigs: dialogJustFormConfigs, + tableConfig: { + table: null, // 此处可省略,el-table 上的配置项 + column: tableProps, // el-column-item 上的配置项 + }, + headFormConfigs: { + rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 + }, + urls: { + base: "/pms/stockOrder", + page: "/pms/stockOrder/pageView", + pageIsPostApi: true, + templateUrl: '/importTemplates/PPVPImport.xlsx' + }, + }; +} diff --git a/src/views/modules/pms/stockOrder/index.vue b/src/views/modules/pms/stockOrder/index.vue new file mode 100644 index 0000000..781b72b --- /dev/null +++ b/src/views/modules/pms/stockOrder/index.vue @@ -0,0 +1,46 @@ + + + + + From 02c8538d476cdcbdb5f418d1f2577da39026f58a Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 21 Aug 2023 13:30:42 +0800 Subject: [PATCH 09/12] update dialog style --- src/components/DialogUpload.vue | 8 ++--- src/components/DialogWithMenu.vue | 57 +++++++++++++++++-------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/components/DialogUpload.vue b/src/components/DialogUpload.vue index c4e08e5..e03a3f1 100644 --- a/src/components/DialogUpload.vue +++ b/src/components/DialogUpload.vue @@ -4,6 +4,7 @@ element-loading-text="处理中,请耐心等待..." element-loading-background="rgba(0,0,0,0.1)" class="dialog-just-form" + custom-class="pms-dialog" :visible="visible" @close="handleClose" width="30%" @@ -229,7 +230,7 @@ export default { /* padding-top: 16px !important; padding-bottom: 16px !important; */ padding-top: 0 !important; - padding-bottom: 0 !important; + padding-bottom: 12px !important; } .el-select, @@ -238,11 +239,6 @@ export default { width: 100% !important; } -.dialog-just-form >>> .el-dialog__header { - padding: 10px 20px 10px; - /* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */ -} - .h0 { height: 0; width: 0; diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue index 869182f..27bfdc0 100644 --- a/src/components/DialogWithMenu.vue +++ b/src/components/DialogWithMenu.vue @@ -12,12 +12,9 @@ :destroy-on-close="false" @close="handleClose" :close-on-click-modal="configs.clickModalToClose ?? false"> - -
-

- {{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }} -

-
+

+ {{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }} +

@@ -100,7 +97,9 @@ :label="opt.label" :value="opt.value"> {{ opt.label }} - + {{ opt[col.customLabel] || "无描述" }} @@ -169,7 +168,9 @@
-
文件大小不要超过 2MB
+
+ 文件大小不要超过 2MB +
    @@ -297,7 +298,8 @@ export default { if (res.code === 0) { if (col.cacheFetchedData) { // cache fetched data - cached[col.prop] = "list" in res.data ? res.data.list : Array.isArray(res.data) ? res.data : []; + cached[col.prop] = + "list" in res.data ? res.data.list : Array.isArray(res.data) ? res.data : []; } if (!col.options || !col.options.length) { @@ -329,7 +331,9 @@ export default { } // col.options = res.data.list; else if (col.options.length) { - "list" in res.data ? res.data.list.unshift(...col.options) : res.data.unshift(...col.options); + "list" in res.data + ? res.data.list.unshift(...col.options) + : res.data.unshift(...col.options); this.$set( col, "options", @@ -438,11 +442,16 @@ export default { () => this.dataForm[col.prop], (val) => { if (val && col.prop in this.cached) { - console.log("here changeReflects", col.prop, col.changeReflects.toProp, this.cached[col.prop]); + console.log( + "here changeReflects", + col.prop, + col.changeReflects.toProp, + this.cached[col.prop] + ); if (typeof col.changeReflects.fromKey === "string") { - this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find((item) => item.id === val)?.[ - col.changeReflects.fromKey - ]; + this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find( + (item) => item.id === val + )?.[col.changeReflects.fromKey]; } else if (Array.isArray(col.changeReflects.fromKey) && col.changeReflects.delimiter) { const foundItem = (this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find( (item) => item.id === val @@ -510,7 +519,9 @@ export default { const addMode = !operate.showOnEdit && !this.dataForm.id; const permission = operate.permission ? this.$hasPermission(operate.permission) : true; const currentMenuKey = this.configs.menu.find((item) => item.name === this.activeMenu)?.key; - return notDetailMode && (showAlways || ((editMode || addMode) && permission)) && currentMenuKey === "info"; + return ( + notDetailMode && (showAlways || ((editMode || addMode) && permission)) && currentMenuKey === "info" + ); }, resetForm(excludeId = false, immediate = false) { @@ -975,7 +986,8 @@ export default { case "delete": { // 确认是否删除 console.log("delete....", data); - const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data; + const itemName = + typeof data === "object" ? data.attrName || data.name || data.material || data.id : data; return this.$confirm(`是否删除条目: ${itemName}`, "提示", { confirmButtonText: "确认", cancelButtonText: "我再想想", @@ -1024,10 +1036,6 @@ export default { /* background: #0f02 !important; */ } -/* .el-menu--horizontal > .el-menu-item.is-active { */ -/* border-bottom-color: #0b58ff; */ -/* } */ - .dialog-with-menu >>> .el-dialog__body { /* padding-top: 16px !important; padding-bottom: 16px !important; */ @@ -1035,16 +1043,15 @@ export default { padding-bottom: 0 !important; } +/* .dialog-with-menu >>> .dialog-body__inner { + padding: 16px; +} */ + .el-select, .el-cascader { width: 100% !important; } -.dialog-with-menu >>> .el-dialog__header { - padding: 10px 20px 10px; - /* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */ -} - .relative { position: relative; } From 7513d82d4def67436286fc770ee2536094ce7145 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 21 Aug 2023 16:16:23 +0800 Subject: [PATCH 10/12] =?UTF-8?q?add=20=E6=8A=A5=E5=B7=A5=E5=8E=86?= =?UTF-8?q?=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../components/ListViewWithHead.vue | 34 ++- src/views/modules/pms/blenderPress/config.js | 2 +- src/views/modules/pms/workReport/config.js | 273 ++++++++++++++++++ src/views/modules/pms/workReport/index.vue | 51 ++++ 5 files changed, 347 insertions(+), 14 deletions(-) create mode 100644 src/views/modules/pms/workReport/config.js create mode 100644 src/views/modules/pms/workReport/index.vue diff --git a/package.json b/package.json index 34b036d..18f6b73 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "babel-plugin-component": "^1.1.1", "code-brick-zj": "^0.0.7", "core-js": "^3.6.5", + "dayjs": "^1.11.9", "echarts": "^5.3.3", "element-theme": "^2.0.1", "element-ui": "^2.15.7", diff --git a/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue b/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue index dc888b4..dc9bc5f 100644 --- a/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue +++ b/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue @@ -86,10 +86,23 @@ export default { dialogBomCode: "", overlayVisible: false, cachedSearchCondition: {}, + queryParams: {}, }; }, inject: ["urls"], mounted() { + // 如果设置了 listQueryExtra,就合并到 queryParams + if (this.listQueryExtra && Array.isArray(this.listQueryExtra)) { + this.listQueryExtra.map((item) => { + if (typeof item === "string") this.$set(this.queryParams, item, ""); + else if (typeof item === "object") { + Object.keys(item).forEach((key) => { + this.$set(this.queryParams, key, item[key]); + }); + } + }); + } + this.initDataWhenLoad && this.getList(); }, methods: { @@ -104,17 +117,6 @@ export default { limit: this.size, }; - if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) { - this.listQueryExtra.map((nameOrObj) => { - if (typeof nameOrObj === "string") params[nameOrObj] = ""; - else if (typeof nameOrObj === "object") { - Object.keys(nameOrObj).forEach((key) => { - params[key] = nameOrObj[key]; - }); - } - }); - } - // if (this.urls.pageIsPostApi) { // } else { // 默认是 get 方式请求 page @@ -122,10 +124,14 @@ export default { this.urls.page, this.urls.pageIsPostApi ? { + ...this.queryParams, ...params, } : { - params, + params: { + ...this.queryParams, + ...params + }, } ) .then(({ data: res }) => { @@ -253,7 +259,9 @@ export default { .then(({ data: res }) => { if (res.code === 0) { this.$message({ - message: `${type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"}成功`, + message: `${ + type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始" + }成功`, type: "success", duration: 1500, onClose: () => { diff --git a/src/views/modules/pms/blenderPress/config.js b/src/views/modules/pms/blenderPress/config.js index e2ef1c8..6cbed7e 100644 --- a/src/views/modules/pms/blenderPress/config.js +++ b/src/views/modules/pms/blenderPress/config.js @@ -33,7 +33,7 @@ export default function () { prop: "operations", name: "操作", fixed: "right", - width: 188, + width: 196, subcomponent: TableOperaionComponent, options: [ { diff --git a/src/views/modules/pms/workReport/config.js b/src/views/modules/pms/workReport/config.js new file mode 100644 index 0000000..b4acde6 --- /dev/null +++ b/src/views/modules/pms/workReport/config.js @@ -0,0 +1,273 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +// import switchBtn from "@/components/noTemplateComponents/switchBtn"; +// import QuillRichInput from "@/components/noTemplateComponents/richInput"; +// import request from "@/utils/request"; +import { timeFilter, dictFilter } from "@/utils/filters"; + +export default function () { + const tableProps = [ + { width: 120, prop: "orderCode", label: "订单号", fixed: "left" }, + { width: 60, prop: "orderCate", label: "子号" }, + { width: 100, prop: "productCode", label: "物料" }, + { width: 100, prop: "shapeCode", label: "砖型" }, + { width: 160, prop: "brand", label: "牌号" }, + { width: 100, prop: "bomCode", label: "配方编码" }, + // { width: 60, prop: "ai", label: "版本" }, + { width: 60, prop: "prodqty", 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: 200, prop: "packTechCode", label: "包装工艺代码" }, + { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, + { width: 120, prop: "customerCode", label: "客户" }, + { width: 120, prop: "specifications", label: "生产订单类型" }, + // { width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") }, + { 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: dictFilter("pallet_type") }, + { width: 128, prop: "goodqty", label: "合格数量" }, + { width: 128, prop: "badqty", label: "报废数量" }, + { width: 120, prop: "remark", label: "备注" }, + { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter }, + { + width: 128, + prop: "team", + label: "班次", + filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"), + }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "edit", label: "编辑", icon: "edit-outline" }, // enable: (row) => row.report == 0 }, + // { + // name: "delete", + // icon: "delete", + // label: "删除", + // emitFull: true, + // permission: "pms:workReport:delete", + // }, + ], + }, + ]; + + const now = new Date(); + const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; + const today = new Date(y, m, d, 0, 0, 0, 0).getTime(); + const headFormFields = [ + { + prop: "team", + label: "班次", + select: [ + { label: "早班", value: "0" }, + { label: "中班", value: "1" }, + { label: "晚班", value: "2" }, + ], + default: { value: "" }, + bind: { + placeholder: "请选择班次", + }, + }, + { + prop: "externalCode", + label: "工序", + select: [ + { label: "压机", value: "0" }, + { label: "检测线", value: "1" }, + { label: "包装", value: "2" }, + ], + default: { value: "" }, + bind: { + placeholder: "请选择工序", + }, + }, + { + prop: "orderCode", + label: "订单号", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入订单号", + }, + }, + { + timerange: true, + prop: "timerange", + label: "时间段", + default: { value: [today - 3600 * 24 * 6 * 1000, today + 3600 * 24 * 1000] }, + bind: { + placeholder: "请选择时间段", + type: "datetimerange", + "start-placeholder": "开始时间", + "end-placeholder": "结束时间", + }, + }, + { + button: { + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "primary", + name: "新增", + permission: "pms:workReport:save", + }, + bind: { + plain: true, + }, + }, + ]; + + /** + * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件 + * 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js + * 此为后者的配置: + */ + const dialogJustFormConfigs = { + clickModalToClose: false, + form: { + rows: [ + [ + { + select: true, + label: "订单", + prop: "orderId", + options: [], + optionLabel: "code", + customLabel: "cate", + fetchData: () => this.$http.post("/pms/order/listForReport"), + elparams: { placeholder: "请选择订单" }, + rules: [{ required: true, message: "必填项不能为空", trigger: "blur" }], + }, + { + select: true, + label: "工序", + prop: "externalCode", + options: [ + { label: "压机", value: '0' }, + { label: "检测线", value: '1' }, + { label: "包装", value: '2' }, + ], + elparams: { placeholder: "请选择工序" }, + }, + ], + [ + { + select: true, + label: "班次", + prop: "team", + options: [ + { label: "早班", value: '0' }, + { label: "中班", value: '1' }, + { label: "晚班", value: '2' }, + ], + elparams: { placeholder: "请选择班次" }, + }, + { + input: true, + label: "数量", + prop: "qty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入数量" }, + }, + ], + [ + { + input: true, + label: "合格数量", + prop: "goodqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入合格数量" }, + }, + { + input: true, + label: "报废数量", + prop: "badqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入报废数量" }, + }, + ], + // [ + // { + // richInput: true, + // label: "描述信息", + // prop: "description", + // }, + // ], + // [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], + ], + operations: [ + { + name: "add", + label: "保存", + type: "primary", + permission: "pms:workReport:save", + showOnEdit: false, + }, + { + name: "update", + label: "更新", + type: "primary", + permission: "pms:workReport:update", + showOnEdit: true, + }, + { name: "reset", label: "重置", type: "warning", showAlways: true }, + ], + }, + }; + + return { + dialogConfigs: dialogJustFormConfigs, + tableConfig: { + table: null, // 此处可省略,el-table 上的配置项 + column: tableProps, // el-column-item 上的配置项 + }, + headFormConfigs: { + rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 + }, + urls: { + base: "/pms/workReport", + page: "/pms/workReport/pageView", + pageIsPostApi: true, + }, + }; +} diff --git a/src/views/modules/pms/workReport/index.vue b/src/views/modules/pms/workReport/index.vue new file mode 100644 index 0000000..51b75cf --- /dev/null +++ b/src/views/modules/pms/workReport/index.vue @@ -0,0 +1,51 @@ + + + + + From a28544b671cb3d622f978b4623871eb4f55acfcc Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 22 Aug 2023 10:36:46 +0800 Subject: [PATCH 11/12] =?UTF-8?q?add=20=E7=94=9F=E6=88=90=E6=89=98?= =?UTF-8?q?=E7=9B=98=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/palletDialog.vue | 185 ++++++++++++++++++++ src/views/atomViews/ListViewWithHead.vue | 38 ++++ src/views/modules/pms/pallet/config.js | 10 ++ src/views/modules/pms/palletPrint/config.js | 147 ++++++++++++++++ src/views/modules/pms/palletPrint/index.vue | 47 +++++ 5 files changed, 427 insertions(+) create mode 100644 src/components/palletDialog.vue create mode 100644 src/views/modules/pms/palletPrint/config.js create mode 100644 src/views/modules/pms/palletPrint/index.vue diff --git a/src/components/palletDialog.vue b/src/components/palletDialog.vue new file mode 100644 index 0000000..ba88299 --- /dev/null +++ b/src/components/palletDialog.vue @@ -0,0 +1,185 @@ + + + + + + + + + diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index 841c5ea..bb40dae 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -70,6 +70,13 @@ @destroy="carReportDialogVisible = false" @refresh-list="getList" :ids="tableSelectedIds" /> + +
@@ -85,6 +92,7 @@ import moment from "moment"; import AttachmentDialog from "@/components/attachmentDialog.vue"; import PrintDom from "../../components/PrintDom.vue"; import ReportDialog from "../../components/ReportDialog.vue"; +import PalletDialog from "../../components/palletDialog.vue"; const DIALOG_WITH_MENU = "DialogWithMenu"; const DIALOG_JUST_FORM = "DialogJustForm"; @@ -103,6 +111,7 @@ export default { AttachmentDialog, PrintDom, ReportDialog, + PalletDialog, }, props: { navigator: { @@ -192,6 +201,7 @@ export default { printDOMmount: false, queryParams: {}, carReportDialogVisible: false, + palletDialogVisible: false, }; }, inject: ["urls"], @@ -713,6 +723,13 @@ export default { }); break; case "打印": + if (this.tableSelectedIds.length === 0) { + return this.$message({ + message: "请先选择要打印的项", + type: "warning", + duration: 1500, + }); + } return this.$confirm("开始打印么", "提示", { confirmButtonText: "确认", cancelButtonText: "我再想想", @@ -737,6 +754,27 @@ export default { this.$refs["car-report-dialog"].init(); }); break; + case "生成托盘": + if (this.tableSelectedIds.length > 1) { + return this.$message({ + message: "只能选择一项", + type: "warning", + duration: 1500, + }); + } + // 尾托检测 + if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") { + return this.$message({ + message: "只能选择尾托", + type: "warning", + duration: 1500, + }); + } + this.palletDialogVisible = true; + this.$nextTick(() => { + this.$refs["pallet-dialog"].init(); + }); + break; } }, diff --git a/src/views/modules/pms/pallet/config.js b/src/views/modules/pms/pallet/config.js index 41c3fb9..398d84b 100644 --- a/src/views/modules/pms/pallet/config.js +++ b/src/views/modules/pms/pallet/config.js @@ -15,6 +15,7 @@ export default function () { { prop: "realQty", label: "数量" }, { prop: "typeDictValue", label: "类型", filter: dictFilter("pallet_type") }, { prop: "stifling", label: "熏蒸", filter: (val) => (val != null ? ["非熏蒸", "熏蒸"][val] : "-") }, + { prop: "externalCode", label: "提库单" }, { prop: "printTime", label: "打印时间", filter: timeFilter }, { prop: "createTime", label: "添加时间", filter: timeFilter }, { @@ -68,6 +69,15 @@ export default function () { plain: true, }, }, + { + button: { + type: "warning", + name: "生成托盘", + }, + bind: { + plain: true, + }, + }, ]; const dialogJustFormConfigs = { diff --git a/src/views/modules/pms/palletPrint/config.js b/src/views/modules/pms/palletPrint/config.js new file mode 100644 index 0000000..0bd927f --- /dev/null +++ b/src/views/modules/pms/palletPrint/config.js @@ -0,0 +1,147 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import request from "@/utils/request"; +import { timeFilter, dictFilter } from "@/utils/filters"; +import { getDictDataList } from "@/utils"; + +// import StateSelect from '@/components/StateSelect.vue'; + +export default function () { + const tableProps = [ + { type: "index", label: "序号" }, + { type: "selection" }, + { prop: "code", label: "流水号" }, + { prop: "carCode", label: "窑车号" }, + { prop: "orderCode", label: "订单号" }, + { prop: "realQty", label: "数量" }, + { prop: "typeDictValue", label: "类型", filter: dictFilter("pallet_type") }, + { prop: "stifling", label: "熏蒸", filter: (val) => (val != null ? ["非熏蒸", "熏蒸"][val] : "-") }, + { prop: "externalCode", label: "提库单" }, + { prop: "printTime", label: "打印时间", filter: timeFilter }, + { prop: "createTime", label: "添加时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "print", label: "打印", icon: "printer" }, + { name: "view-car-record", label: "窑车记录", emitField: "hisId", icon: "shopping-cart-1" }, + ], + }, + ]; + tableProps.defaultPageSize = 999; + + const headFormFields = [ + { + button: { + type: "primary", + name: "打印", + }, + bind: { + plain: true, + }, + }, + ]; + + const dialogJustFormConfigs = { + form: { + rows: [ + [ + { + select: true, + label: "窑车号", + prop: "carId", + options: [], + fetchData: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { + disabled: true, + }, + }, + { + select: true, + label: "状态", + prop: "stateDictValue", + options: getDictDataList("car_state").map((i) => ({ label: i.dictLabel, value: i.dictValue })), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { + fliterable: true, + }, + }, + ], + [ + { + // select: true, + input: true, + label: "位置", + prop: "pos", + // options: getDictDataList(), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { + // fliterable: true + }, + }, + { + label: "查看载砖详情", + button: true, + onClick: function (id) { + // 必须用 function 形式 + console.log(`查看载砖详情`, id); + this.$emit("emit-data", { type: "to-car-payload", data: id }); + }, + }, + ], + ], + operations: [ + // { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + ], + }, + }; + + const carPayloadDialogConfigs = { + dialogWidth: "70%", + carPayloadDialog: true, + clickModalToClose: false, + tableConfig: { + table: null, + column: [ + // 窑车的 装载详情 + // tableProps + { width: 56, type: "index", label: "序号" }, + { prop: "orderCode", label: "订单号" }, + { width: 80, prop: "orderCate", label: "订单子号" }, + { prop: "bomCode", label: "配方" }, + { prop: "shapeCode", label: "砖型" }, + { width: 80, prop: "qty", label: "订单数量" }, + { width: 72, prop: "goodqty", label: "合格数" }, + { width: 72, prop: "badqty", label: "废砖数" }, + // { prop: "startTime", label: "开始时间" }, + // { prop: "endTime", label: "结束时间" }, + // { prop: "remark", label: "备注" }, + ], + }, + }; + + return { + carPayloadDialogConfigs, + dialogConfigs: dialogJustFormConfigs, + tableConfig: { + table: null, // 此处可省略,el-table 上的配置项 + column: tableProps, // el-column-item 上的配置项 + }, + headFormConfigs: { + rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 + }, + urls: { + base: "/pms/carHistory", + payload: "/pms/carHandle", // hisId 查询 载砖详情 + page: "/pms/pallet/listForPrint", + pageIsPostApi: true, + printLog: "/pms/pallet/print", // post + }, + }; +} diff --git a/src/views/modules/pms/palletPrint/index.vue b/src/views/modules/pms/palletPrint/index.vue new file mode 100644 index 0000000..ac9e422 --- /dev/null +++ b/src/views/modules/pms/palletPrint/index.vue @@ -0,0 +1,47 @@ + + + + + From d4a427ec5e4e853d51044cc30f582b556e896eae Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 23 Aug 2023 16:30:59 +0800 Subject: [PATCH 12/12] update docs_0822 --- src/assets/scss/common.scss | 5 ++- src/components/DialogJustForm.vue | 2 +- src/views/atomViews/ListViewWithHead.vue | 52 ++++++++++++++++++---- src/views/modules/pms/workReport/config.js | 39 +++++++++++----- 4 files changed, 76 insertions(+), 22 deletions(-) diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index f54edbc..1db8a79 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -538,7 +538,7 @@ img { .aui-content { position: relative; padding: $content--padding; - min-height: calc(100vh - #{$navbar--height}); + min-height: calc(100vh - 30px - #{$navbar--height}); &__wrapper { position: relative; margin-left: $sidebar--width; @@ -673,7 +673,8 @@ img { z-index: 830; } > .el-tab-pane { - min-height: calc(#{$content--fill-height-tabs}); + // min-height: calc(#{$content--fill-height-tabs}); + min-height: calc(100vh - 144px); > .aui-card--fill > .el-card__body { min-height: calc(#{$content--fill-height-tabs} - 2px); } diff --git a/src/components/DialogJustForm.vue b/src/components/DialogJustForm.vue index 4d2d636..8bfd160 100644 --- a/src/components/DialogJustForm.vue +++ b/src/components/DialogJustForm.vue @@ -792,7 +792,7 @@ export default { .dialog-just-form >>> .el-form { padding: 16px; - max-height: 55vh; + max-height: 56vh; overflow-y: auto; } diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index bb40dae..98a2071 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -238,7 +238,9 @@ export default { page: this.page, limit: this.size, }; - + // this.dataList = [{}]; + // this.tableLoading = false; + // return; this.$http[this.urls.pageIsPostApi ? "post" : "get"]( this.urls.page, this.urls.pageIsPostApi @@ -666,6 +668,38 @@ export default { case "导入": this.openUploadDialog(); break; + case "导出": + this.$http({ + method: "post", + url: this.urls.export, + data: { page: this.page }, + responseType: "blob", + }).then((res) => { + // console.log("导出", res); + const filename = res.headers['content-disposition'].split('filename=')[1]; + const blob = new Blob([res.data]); + /** 通知 */ + this.$notify({ + title: "成功", + message: "开始下载", + type: "success", + duration: 1200, + }); + if ("download" in document.createElement("a")) { + const alink = document.createElement("a"); + alink.download = filename; + alink.style.display = "none"; + alink.target = "_blank"; + alink.href = URL.createObjectURL(blob); + document.body.appendChild(alink); + alink.click(); + URL.revokeObjectURL(alink.href); + document.body.removeChild(alink); + } else { + navigator.msSaveBlob(blob, filename); + } + }); + break; case "手动添加": { this.openDialog(); return; @@ -762,14 +796,14 @@ export default { duration: 1500, }); } - // 尾托检测 - if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") { - return this.$message({ - message: "只能选择尾托", - type: "warning", - duration: 1500, - }); - } + // // 尾托检测 - 由后端限制 + // if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") { + // return this.$message({ + // message: "只能选择尾托", + // type: "warning", + // duration: 1500, + // }); + // } this.palletDialogVisible = true; this.$nextTick(() => { this.$refs["pallet-dialog"].init(); diff --git a/src/views/modules/pms/workReport/config.js b/src/views/modules/pms/workReport/config.js index b4acde6..8fa6ce9 100644 --- a/src/views/modules/pms/workReport/config.js +++ b/src/views/modules/pms/workReport/config.js @@ -8,12 +8,15 @@ export default function () { const tableProps = [ { width: 120, prop: "orderCode", label: "订单号", fixed: "left" }, { width: 60, prop: "orderCate", label: "子号" }, + { width: 60, 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: 60, prop: "ai", label: "版本" }, - { width: 60, prop: "prodqty", label: "数量" }, { width: 80, prop: "blenderCode", label: "混料机号" }, { width: 80, prop: "pressCode", label: "压机号" }, { width: 80, prop: "kilnCode", label: "隧道窑号" }, @@ -34,16 +37,21 @@ export default function () { { width: 120, prop: "prodqty", label: "要求生产数量" }, { width: 128, prop: "paperboard", label: "是否贴纸板", filter: (val) => ["否", "是"][val] }, { width: 128, prop: "palletType", label: "托盘类型", filter: dictFilter("pallet_type") }, - { width: 128, prop: "goodqty", label: "合格数量" }, - { width: 128, prop: "badqty", label: "报废数量" }, { width: 120, prop: "remark", label: "备注" }, - { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter }, + { 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] : "-"), + }, { prop: "operations", name: "操作", @@ -130,6 +138,16 @@ export default function () { plain: true, }, }, + { + button: { + type: "warning", + name: "导出", + permission: "pms:workReport:export", + }, + bind: { + plain: true, + }, + }, ]; /** @@ -158,9 +176,9 @@ export default function () { label: "工序", prop: "externalCode", options: [ - { label: "压机", value: '0' }, - { label: "检测线", value: '1' }, - { label: "包装", value: '2' }, + { label: "压机", value: "0" }, + { label: "检测线", value: "1" }, + { label: "包装", value: "2" }, ], elparams: { placeholder: "请选择工序" }, }, @@ -171,9 +189,9 @@ export default function () { label: "班次", prop: "team", options: [ - { label: "早班", value: '0' }, - { label: "中班", value: '1' }, - { label: "晚班", value: '2' }, + { label: "早班", value: "0" }, + { label: "中班", value: "1" }, + { label: "晚班", value: "2" }, ], elparams: { placeholder: "请选择班次" }, }, @@ -268,6 +286,7 @@ export default function () { base: "/pms/workReport", page: "/pms/workReport/pageView", pageIsPostApi: true, + export: '/pms/workReport/export', }, }; }