From d84a2d7dbf309889bd80e26fbfaaa14d8eaf2a8c Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 24 Mar 2023 11:16:59 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=AA=91=E7=82=89=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E5=AE=A4=E5=92=8C=E6=A3=80=E6=B5=8B=E5=B9=B3=E5=8F=B0=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/pms/carHistory/config.js | 2 +- .../pms/currentCarLocation/carPayload.vue | 28 - .../modules/pms/currentCarLocation/config.js | 5 +- .../components/ListViewWithHead.vue | 540 ++++++++++++++++++ .../modules/pms/detectionPlatform/config.js | 253 ++++++++ .../modules/pms/detectionPlatform/index.vue | 45 ++ .../components/ListViewWithHead.vue | 540 ++++++++++++++++++ .../modules/pms/kilnWaitingRoom/config.js | 244 ++++++++ .../modules/pms/kilnWaitingRoom/index.vue | 45 ++ 9 files changed, 1669 insertions(+), 33 deletions(-) delete mode 100644 src/views/modules/pms/currentCarLocation/carPayload.vue create mode 100644 src/views/modules/pms/detectionPlatform/components/ListViewWithHead.vue create mode 100644 src/views/modules/pms/detectionPlatform/config.js create mode 100644 src/views/modules/pms/detectionPlatform/index.vue create mode 100644 src/views/modules/pms/kilnWaitingRoom/components/ListViewWithHead.vue create mode 100644 src/views/modules/pms/kilnWaitingRoom/config.js create mode 100644 src/views/modules/pms/kilnWaitingRoom/index.vue diff --git a/src/views/modules/pms/carHistory/config.js b/src/views/modules/pms/carHistory/config.js index 5129d4d..fcd76e1 100644 --- a/src/views/modules/pms/carHistory/config.js +++ b/src/views/modules/pms/carHistory/config.js @@ -64,7 +64,7 @@ export default function () { // }, ]; - const dialogJustFormConfigs = {} + const dialogJustFormConfigs = null; const carPayloadDialogConfigs = { carPayloadDialog: true, diff --git a/src/views/modules/pms/currentCarLocation/carPayload.vue b/src/views/modules/pms/currentCarLocation/carPayload.vue deleted file mode 100644 index 5760791..0000000 --- a/src/views/modules/pms/currentCarLocation/carPayload.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/src/views/modules/pms/currentCarLocation/config.js b/src/views/modules/pms/currentCarLocation/config.js index 31315d2..54e493f 100644 --- a/src/views/modules/pms/currentCarLocation/config.js +++ b/src/views/modules/pms/currentCarLocation/config.js @@ -56,10 +56,7 @@ export default function () { // }, ]; - const dialogJustFormConfigs = { - - }; - + const dialogJustFormConfigs = null; const carPayloadDialogConfigs = { carPayloadDialog: true, diff --git a/src/views/modules/pms/detectionPlatform/components/ListViewWithHead.vue b/src/views/modules/pms/detectionPlatform/components/ListViewWithHead.vue new file mode 100644 index 0000000..aabcdb3 --- /dev/null +++ b/src/views/modules/pms/detectionPlatform/components/ListViewWithHead.vue @@ -0,0 +1,540 @@ + + + + + + diff --git a/src/views/modules/pms/detectionPlatform/config.js b/src/views/modules/pms/detectionPlatform/config.js new file mode 100644 index 0000000..41245d1 --- /dev/null +++ b/src/views/modules/pms/detectionPlatform/config.js @@ -0,0 +1,253 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; + +import request from "@/utils/request"; +import { timeFilter } from '@/utils/filters' +import { getDictDataList } from '@/utils' + +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' }, + { name: "edit-payload", label: "输入载砖详情", icon: 'edit' }, + ], + }, + ]; + + 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: "" + }, + bind: { + plain: true, + } + }, + ]; + + const dialogJustFormConfigs = { + clickModalToClose: true, + form: { + rows: [ + [ + { + select: true, + prop: "carId", + label: "窑车号", + options: [], + fetchData: () => this.$http.get('/pms/car/page', { params: { limit: 999, page: 1, code: '' } }), + optionLabel: 'code', + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { filterable: true, placeholder: "请选择窑车" }, + }, + { + select: true, + label: "位置", + prop: "pos", + options: [], + fetchData: () => this.$http.post('/pms/carHandle/listPos', { limit: 999, page: 1, pos: [5, 6] }), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择窑车位置" }, + }, + ], + [ + { + datetime: true, + label: "开始时间", + prop: "startTime", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择开始时间" }, + }, + { + datetime: true, + label: "结束时间", + prop: "endTime", + default: null, + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择结束时间" }, + }, + ], + [ + { + select: true, + label: "窑车状态", + prop: "stateDictValue", + options: getDictDataList('car_state').map(_ => ({ label: _.dictLabel, value: _.dictValue })), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择窑车状态" }, + }, + {} + ], + ], + operations: [ + { name: "add-pos-manually", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + // { name: 'cancel', label: '取消', showAlways: true }, + ], + }, + }; + + const carPayloadAddConfigs = { + clickModalToClose: true, + form: { + rows: [ + [ + { + select: true, + prop: "orderId", + label: "订单号", + options: [], + fetchData: () => this.$http.post('/pms/order/pageCom', { limit: 999, page: 1, code: '', type: 1 }), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { filterable: true, placeholder: "请选择订单" }, + }, + // { + // input: true, + // label: "窑车载量", + // prop: "qty", + // rules: [ + // { required: true, message: "必填项不能为空", trigger: "blur" }, + // { type: 'number', message: "请输入大于0的整数", trigger: "blur", transform: val => Number(val) > 0 && Number.isInteger(Number(val)) && Number(val) }, + // ], + // elparams: { placeholder: "请输入窑车载量" }, + // }, + ], + [ + { + input: true, + label: "合格砖数", + prop: "goodqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { type: 'number', message: "请输入大于0的整数", trigger: "blur", transform: val => Number(val) > 0 && Number.isInteger(Number(val)) && Number(val) }, + ], + // 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: "请输入大于0的整数", trigger: "blur", transform: val => Number(val) > 0 && Number.isInteger(Number(val)) && Number(val) }, + ], + // rules: [ + // { required: true, message: "必填项不能为空", trigger: "blur" }, + // { type: 'number', message: "请输入正确的数字类型", trigger: "blur", transform: val => Number(val) }, + // ], + elparams: { placeholder: "请输入废砖数" }, + }, + ], + // [ + // { + // input: true, + // label: "备注", + // prop: "remark", + // elparams: { placeholder: "请输入备注" }, + // } + // ], + ], + operations: [ + { name: "add-car-payload", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + // { name: 'cancel', label: '取消', showAlways: true }, + ], + }, + }; + + const carPayloadDialogConfigs = { + carPayloadDialog: true, + clickModalToClose: true, + tableConfig: { + table: null, + column: [ + // 窑车的 装载详情 + // tableProps + { type: "index", label: "序号" }, + { prop: "orderCode", label: "订单号" }, + { prop: "bomCode", label: "配方号" }, + { prop: "shapeCode", label: "砖型编码" }, + { width: 160, prop: "qty", label: "订单对应数量" }, + { prop: "goodqty", label: "合格数量" }, + { prop: "badqty", label: "废砖数量" }, + { prop: "startTime", label: "开始时间" }, + { prop: "endTime", label: "结束时间" }, + // { prop: "remark", label: "备注" }, + ], + }, + }; + + + return { + carPayloadAddConfigs, + 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/carHandle", + page: "/pms/carHandle/pageHis", + pageIsPostApi: true, + posFormUrl: "/pms/trans/inputCurrent", + payloadFormUrl: '/pms/trans/inputDetail', // 载砖详情 url + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/detectionPlatform/index.vue b/src/views/modules/pms/detectionPlatform/index.vue new file mode 100644 index 0000000..624ea51 --- /dev/null +++ b/src/views/modules/pms/detectionPlatform/index.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/views/modules/pms/kilnWaitingRoom/components/ListViewWithHead.vue b/src/views/modules/pms/kilnWaitingRoom/components/ListViewWithHead.vue new file mode 100644 index 0000000..aabcdb3 --- /dev/null +++ b/src/views/modules/pms/kilnWaitingRoom/components/ListViewWithHead.vue @@ -0,0 +1,540 @@ + + + + + + diff --git a/src/views/modules/pms/kilnWaitingRoom/config.js b/src/views/modules/pms/kilnWaitingRoom/config.js new file mode 100644 index 0000000..4e63eed --- /dev/null +++ b/src/views/modules/pms/kilnWaitingRoom/config.js @@ -0,0 +1,244 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; + +import request from "@/utils/request"; +import { timeFilter } from '@/utils/filters' +import { getDictDataList } from '@/utils' + +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' }, + // { name: "edit-payload", label: "输入载砖详情", icon: 'edit' }, + ], + }, + ]; + + 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: "" + }, + bind: { + plain: true, + } + }, + ]; + + const dialogJustFormConfigs = { + clickModalToClose: true, + form: { + rows: [ + [ + { + select: true, + prop: "carId", + label: "窑车号", + options: [], + fetchData: () => this.$http.get('/pms/car/page', { params: { limit: 999, page: 1, code: '' } }), + optionLabel: 'code', + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { filterable: true, placeholder: "请选择窑车" }, + }, + { + select: true, + label: "位置", + prop: "pos", + options: [], + fetchData: () => this.$http.post('/pms/carHandle/listPos', { limit: 999, page: 1, pos: [2] }), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择窑车位置" }, + }, + ], + [ + { + datetime: true, + label: "开始时间", + prop: "startTime", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择开始时间" }, + }, + { + datetime: true, + label: "结束时间", + prop: "endTime", + default: null, + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择结束时间" }, + }, + ], + [ + { + select: true, + label: "窑车状态", + prop: "stateDictValue", + options: getDictDataList('car_state').map(_ => ({ label: _.dictLabel, value: _.dictValue })), + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择窑车状态" }, + }, + {} + ], + ], + operations: [ + { name: "add-pos-manually", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // { name: "reset", label: "重置", type: "warning", showAlways: true }, + // { name: 'cancel', label: '取消', showAlways: true }, + ], + }, + }; + + const carPayloadAddConfigs = null + // const carPayloadAddConfigs = { + // clickModalToClose: true, + // form: { + // rows: [ + // [ + // { + // select: true, + // prop: "orderId", + // label: "订单号", + // options: [], + // fetchData: () => this.$http.post('/pms/order/pageCom', { limit: 999, page: 1, code: '', type: 1 }), + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + // elparams: { filterable: true, placeholder: "请选择订单" }, + // }, + // { + // input: true, + // label: "窑车载量", + // prop: "qty", + // rules: [ + // { required: true, message: "必填项不能为空", trigger: "blur" }, + // { type: 'number', message: "请输入大于0的整数", trigger: "blur", transform: val => Number(val) > 0 && Number.isInteger(Number(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: "请输入废砖数" }, + // // }, + // // ], + // // [ + // // { + // // input: true, + // // label: "备注", + // // prop: "remark", + // // elparams: { placeholder: "请输入备注" }, + // // } + // // ], + // ], + // operations: [ + // { name: "add-car-payload", label: "保存", type: "primary", permission: "", showOnEdit: false }, + // // { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, + // // { name: "reset", label: "重置", type: "warning", showAlways: true }, + // // { name: 'cancel', label: '取消', showAlways: true }, + // ], + // }, + // }; + + const carPayloadDialogConfigs = { + carPayloadDialog: true, + clickModalToClose: true, + tableConfig: { + table: null, + column: [ + // 窑车的 装载详情 + // tableProps + { type: "index", label: "序号" }, + { prop: "orderCode", label: "订单号" }, + { prop: "bomCode", label: "配方号" }, + { prop: "shapeCode", label: "砖型编码" }, + { width: 160, prop: "qty", label: "订单对应数量" }, + { prop: "goodqty", label: "合格数量" }, + { prop: "badqty", label: "废砖数量" }, + { prop: "startTime", label: "开始时间" }, + { prop: "endTime", label: "结束时间" }, + // { prop: "remark", label: "备注" }, + ], + }, + }; + + + return { + carPayloadAddConfigs, + 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/carHandle", + page: "/pms/carHandle/pageHis", + pageIsPostApi: true, + posFormUrl: "/pms/trans/inputCurrent", + payloadFormUrl: '/pms/trans/inputDetail', // 载砖详情 url + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/kilnWaitingRoom/index.vue b/src/views/modules/pms/kilnWaitingRoom/index.vue new file mode 100644 index 0000000..1fa7179 --- /dev/null +++ b/src/views/modules/pms/kilnWaitingRoom/index.vue @@ -0,0 +1,45 @@ + + + + +