diff --git a/public/index.html b/public/index.html index 6823c82..d9bcd9d 100644 --- a/public/index.html +++ b/public/index.html @@ -38,8 +38,8 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> + + diff --git a/src/views/modules/pms/palletOrderReport/config.js b/src/views/modules/pms/palletOrderReport/config.js new file mode 100644 index 0000000..50d5c99 --- /dev/null +++ b/src/views/modules/pms/palletOrderReport/config.js @@ -0,0 +1,220 @@ +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 = [ + // 多选框 + { type: "selection", width: 60, align: "center" }, + { width: 128, prop: "createTime", label: "记录时间", filter: timeFilter }, + { width: 90, prop: "updaterName", label: "更改人" }, + { width: 90, prop: "code", label: "托盘号" }, + { width: 128, prop: "typeDictValue", label: "托盘类型", filter: dictFilter("pallet_type") }, + { width: 128, prop: "orderCode", label: "订单号" }, + { width: 128, prop: "orderCate", label: "订单子号" }, + { width: 128, prop: "description", label: "HU" }, + { width: 128, prop: "shapeCode", label: "砖型" }, + { width: 128, prop: "brand", label: "配方" }, + { width: 128, prop: "packTechCode", label: "包装代码" }, + { width: 128, prop: "saleNo", label: "销售订单" }, + { width: 128, prop: "saleOrderItem", label: "销售订单Item" }, + { width: 128, prop: "realQty", label: "数量" }, + { + width: 128, + prop: "insTeam", + label: "班次", + filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"), + }, + { + width: 128, + prop: "insReport", + label: "报工", + filter: (val) => (val != null ? ["未报工", "已报工"][val] : "-"), + }, + { width: 128, prop: "insRtime", label: "报工时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "edit", label: "编辑", icon: "edit-outline", enable: (row) => row.insReport == 0 }, + // { + // name: "delete", + // icon: "delete", + // label: "删除", + // emitFull: true, + // permission: "pms:carOrderReport: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: "orderCode", + label: "订单号", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入订单号", + }, + }, + { + prop: "code", + label: "托盘号", + input: true, + default: { value: "" }, + bind: { + placeholder: "请输入托盘号", + }, + }, + { + prop: "insTeam", + label: "班次", + select: [ + { label: "早班", value: "0" }, + { label: "中班", value: "1" }, + { label: "晚班", value: "2" }, + ], + default: { value: "" }, + bind: { + placeholder: "请输入班次", + }, + }, + { + prop: "insReport", + label: "报工", + select: [ + { label: "未报工", value: "0" }, + { label: "已报工", value: "1" }, + ], + default: { value: "0" }, + 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:palletOrderReport:report", + }, + bind: { + plain: true, + }, + }, + ]; + + 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: "realQty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { + type: "number", + message: "请输入正确的数字类型", + trigger: "blur", + transform: (val) => Number(val), + }, + ], + elparams: { placeholder: "请输入合格数量" }, + }, + ], + ], + operations: [ + { + name: "add", + label: "保存", + type: "primary", + permission: "pms:palletOrderReport:save", + showOnEdit: false, + }, + { + name: "update", + label: "更新", + type: "primary", + permission: "pms:palletOrderReport: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/palletOrderReport", + page: "/pms/palletOrderReport/pageView", + pageIsPostApi: true, + reportPre: '/pms/workReport/insReportPre', + report: '/pms/workReport/insReport', + }, + }; +} diff --git a/src/views/modules/pms/palletOrderReport/index.vue b/src/views/modules/pms/palletOrderReport/index.vue new file mode 100644 index 0000000..c9bdaae --- /dev/null +++ b/src/views/modules/pms/palletOrderReport/index.vue @@ -0,0 +1,51 @@ + + + + +