From 675f1f705436ac9b85d9096d113d488098c36e9a Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 22 Mar 2023 15:53:36 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=AA=91=E8=BD=A6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/pms/carHistory/config.js | 122 ++++++++++++++++++ src/views/modules/pms/carHistory/index.vue | 53 ++++++++ .../modules/pms/currentCarLocation/config.js | 5 +- 3 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 src/views/modules/pms/carHistory/config.js create mode 100644 src/views/modules/pms/carHistory/index.vue diff --git a/src/views/modules/pms/carHistory/config.js b/src/views/modules/pms/carHistory/config.js new file mode 100644 index 0000000..0fa33b3 --- /dev/null +++ b/src/views/modules/pms/carHistory/config.js @@ -0,0 +1,122 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; + +import request from "@/utils/request"; +import { timeFilter } from '@/utils/filters' + +export default function () { + const tableProps = [ + { type: 'index', label: '序号' }, + { prop: "createTime", label: "添加时间", filter: timeFilter }, + { prop: "code", label: "窑车号" }, + { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent + { prop: "orderCode", label: "订单号" }, + { prop: "posCode", label: "位置" }, + { prop: "startTime", label: "开始时间", filter: timeFilter }, + { prop: "endTime", label: "结束时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "to-car-payload", label: "装载详情", icon: 'document' } + ], + }, + ]; + + const headFormFields = [ + // { + // prop: 'code', + // label: "窑车号", + // input: true, + // default: { value: "" }, + // 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:materialStorage:save" + // }, + // bind: { + // plain: true, + // } + // }, + ]; + + const dialogJustFormConfigs = { + clickModalToClose: true, + form: { + rows: [ + [ + { + input: true, + label: "窑车号", + prop: "code", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入窑车号" }, + }, + // { + // input: true, + // label: "编码", + // prop: "code", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + // elparams: { placeholder: "请输入料仓编码" }, + // }, + ], + // [{ component: QuillRichInput, label: "描述信息", prop: "description" }], + [{ + richInput: true, label: "描述信息", prop: "description" + }], + [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], + ], + operations: [ + { name: "add", label: "保存", type: "primary", permission: "pms:car:save", showOnEdit: false }, + { name: "update", label: "更新", type: "primary", permission: "pms:car:update", showOnEdit: true }, + { name: "reset", label: "重置", type: "warning", showAlways: true }, + // { name: 'cancel', label: '取消', 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/car", + page: "/pms/carHandle/pageHis", + pageIsPostApi: true + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/carHistory/index.vue b/src/views/modules/pms/carHistory/index.vue new file mode 100644 index 0000000..1e38492 --- /dev/null +++ b/src/views/modules/pms/carHistory/index.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/views/modules/pms/currentCarLocation/config.js b/src/views/modules/pms/currentCarLocation/config.js index a752000..0231a93 100644 --- a/src/views/modules/pms/currentCarLocation/config.js +++ b/src/views/modules/pms/currentCarLocation/config.js @@ -12,9 +12,8 @@ export default function () { { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent { prop: "orderCode", label: "订单号" }, { prop: "posCode", label: "位置" }, - { prop: "startTime", label: "开始时间" }, - { prop: "endTime", label: "结束时间" }, - // { prop: "remark", label: "备注" }, + { prop: "startTime", label: "开始时间", filter: timeFilter }, + { prop: "endTime", label: "结束时间", filter: timeFilter }, { prop: "operations", name: "操作",