From 247cca284efac490883fc42db16ee43d8b7fc26b Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 6 Apr 2023 09:52:41 +0800 Subject: [PATCH] update 2023.4.6 --- src/views/modules/pms/equipment/config.js | 14 ++ src/views/modules/pms/material/config.js | 91 +++++++------ src/views/modules/pms/materialBase/config.js | 127 ++++++++++++++++++ src/views/modules/pms/materialBase/index.vue | 32 +++++ .../pms/materialStorageDynamic/config.js | 3 +- src/views/modules/pms/shape/config.js | 3 +- 6 files changed, 229 insertions(+), 41 deletions(-) create mode 100644 src/views/modules/pms/materialBase/config.js create mode 100644 src/views/modules/pms/materialBase/index.vue diff --git a/src/views/modules/pms/equipment/config.js b/src/views/modules/pms/equipment/config.js index 77e3c04..851afc3 100644 --- a/src/views/modules/pms/equipment/config.js +++ b/src/views/modules/pms/equipment/config.js @@ -34,6 +34,20 @@ export default function () { default: { value: '' }, bind: { placeholder: '请输入设备名称' } }, + { + label: '设备类型', + prop: 'code', + input: true, + default: { value: '' }, + bind: { placeholder: '请输入设备类型' } + }, + { + label: '设备ID', + prop: 'id', + input: true, + default: { value: '' }, + bind: { placeholder: '请输入设备ID' } + }, { button: { type: 'primary', diff --git a/src/views/modules/pms/material/config.js b/src/views/modules/pms/material/config.js index 39be707..b3ece3e 100644 --- a/src/views/modules/pms/material/config.js +++ b/src/views/modules/pms/material/config.js @@ -6,17 +6,19 @@ import { timeFilter, dictFilter } from "@/utils/filters"; export default function () { const tableProps = [ { type: 'index', label: '序号' }, - { prop: "name", label: "原料名称" }, { prop: "code", label: "原料编码" }, - { prop: "typeDictValue", label: "类别", filter: dictFilter("material_category") }, // subcomponent: {/** TODO: create a new component for this option */} }, - { prop: "type", label: "原料类型" }, - { prop: "brandsOwner", label: "品牌" }, + { prop: "description", label: "原料描述", }, + { prop: "name", label: "原料名称" }, + { prop: "typeDictValue", label: "类型", filter: dictFilter("material_category") }, // subcomponent: {/** TODO: create a new component for this option */} }, + { prop: "baseMaterialCode", label: "基础原料编码" }, + { prop: "baseMaterialDescription", label: "基础原料描述" }, + // { prop: "type", label: "原料类型" }, + { prop: "density", label: "堆积密度" }, + // { prop: "brandsOwner", label: "品牌" }, { prop: "dosLow", label: "加料下限" }, { prop: "dosHigh", label: "加料上限" }, - { prop: "density", label: "堆积密度" }, // { prop: "description", label: "详情", subcomponent: TableTextComponent }, - { prop: "description", label: "原料描述", }, - { prop: "remark", label: "中文描述" }, + // { prop: "remark", label: "中文描述" }, { prop: "createTime", label: "添加时间", filter: timeFilter }, /** TODO: parentId 是用来前端重构成树形结构的... */ { @@ -87,13 +89,8 @@ export default function () { rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入原料编码" }, }, - { - select: true, - label: "单位", - prop: "unitDictValue", - options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })), - elparams: { placeholder: "单位" }, - }, + { input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } }, + ], [ // { @@ -114,16 +111,17 @@ export default function () { // // }, // // elparams: { placeholder: "请选择父级原料", 'show-all-levels': false, props: { checkStrictly: true } }, // }, - { - select: true, - label: "原料类型", - prop: "typeId", - rules: { required: true, message: "必填项不能为空", trigger: "blur" }, - options: [], - fetchData: () => this.$http.get('/pms/materialType/page', { params: { page: 1, limit: 999 } }), - elparams: { placeholder: "请输入原料类型" }, - // autoDisabled: true, // 有某个条件触发后,自动变成 disabled 状态 - }, + // { + // select: true, + // label: "原料类型", + // prop: "typeId", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + // options: [], + // fetchData: () => this.$http.get('/pms/materialType/page', { params: { page: 1, limit: 999 } }), + // elparams: { placeholder: "请输入原料类型" }, + // // autoDisabled: true, // 有某个条件触发后,自动变成 disabled 状态 + // }, + { select: true, label: "原料类别", @@ -132,6 +130,14 @@ export default function () { elparams: { placeholder: "原料类别" }, // autoDisabled: true }, + { + select: true, + label: "基础原料", + prop: "baseMaterialId", + options: [], + fetchData: () => this.$http.get('/pms/baseMaterial/page', { params: { limit: 999, page: 1, key: '' } }), + elparams: { placeholder: "请选择基础原料" }, + }, { input: true, label: "堆积密度(g/cm³)", prop: "density", elparams: { placeholder: "堆积密度" } }, // { // input: true, @@ -162,24 +168,31 @@ export default function () { ], elparams: { placeholder: "请输入加料上限" }, }, - { - input: true, - label: "品牌", - prop: "brandsOwner", - elparams: { placeholder: "请输入品牌" }, - }, - ], - [ + { input: true, label: "备注", prop: "remark", elparams: { placeholder: "请输入备注" } }, // { - // input: true, - // label: "缩写", - // prop: "enAb", - // elparams: { placeholder: "请输入缩写" }, + // select: true, + // label: "单位", + // prop: "unitDictValue", + // options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })), + // elparams: { placeholder: "单位" }, // }, - { input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } }, - { input: true, label: "中文描述", prop: "remark", elparams: { placeholder: "备注" } }, - {} ], + // [ + // { + // input: true, + // label: "缩写", + // prop: "enAb", + // elparams: { placeholder: "请输入缩写" }, + // }, + // { + // input: true, + // label: "品牌", + // prop: "brandsOwner", + // elparams: { placeholder: "请输入品牌" }, + // }, + + // { input: true, label: "中文描述", prop: "remark", elparams: { placeholder: "备注" } }, + // ], ], operations: [ { name: "add", label: "保存", type: "primary", permission: "pms:material:save", showOnEdit: false }, diff --git a/src/views/modules/pms/materialBase/config.js b/src/views/modules/pms/materialBase/config.js new file mode 100644 index 0000000..4150403 --- /dev/null +++ b/src/views/modules/pms/materialBase/config.js @@ -0,0 +1,127 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import { timeFilter } from "@/utils/filters"; + +export default function () { + const tableProps = [ + { prop: "name", label: "名称" }, + { prop: "code", label: "编码" }, + // { prop: "enName", label: "英文名称" }, + // { prop: "enAb", label: "缩写" }, + { prop: "description", label: "描述" }, + { prop: "remark", label: "备注" }, + { type: "index", label: "序号" }, + { prop: "createTime", 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:materialType:delete" }], + }, + ]; + + const headFormFields = [ + { + prop: 'key', + label: '原料名称/编码', + input: true, + default: { value: '' }, + bind: { // v-bind keyValues + placeholder: '请输入原料名称或编码' + } + }, + { + button: { + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "primary", + name: "新增", + permission: "pms:materialType:save", + }, + bind: { + plain: true, + }, + }, + ]; + + + const dialogJustFormConfigs = { + form: { + rows: [ + [ + { + input: true, + label: "名称", + prop: "name", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入物料类型名称" }, + }, + { + input: true, + label: "编码", + prop: "code", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入物料类型编码" }, + }, + ], + // [ + // { input: true, label: "英文名称", prop: "enName", elparams: { placeholder: "请输入英文名称" } }, + // { input: true, label: "英文缩写", prop: "enAb", elparams: { placeholder: "请输入英文缩写" } }, + // ], + [ + // [{ switch: true, label: '状态', prop: 'enabled', default: 0 }], + { textarea: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }, + ], + [ + // { + // select: true, + // label: '产线', + // prop: 'prdLineId', + // options: [ + // // { label: '1', value: 1 }, + // // { label: '2', value: 2 }, + // // { label: '3', value: 3 }, + // ], + // elparams: { placeholder: '请选择所属产线' }, + // // fetchData api + // fetchData: () => { + // return this.$http('/pms/productionLine/page', { limit: 999, page: 1, key: '' }) + // } + // }, + { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }, + // { input: true, label: '程序号', prop: '', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, + ], + ], + operations: [ + { name: "add", label: "保存", type: "primary", permission: "pms:materialType:save", showOnEdit: false }, + { name: "update", label: "更新", type: "primary", permission: "pms:materialType: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/baseMaterial", + page: "/pms/baseMaterial/page", + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/materialBase/index.vue b/src/views/modules/pms/materialBase/index.vue new file mode 100644 index 0000000..d337d43 --- /dev/null +++ b/src/views/modules/pms/materialBase/index.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/modules/pms/materialStorageDynamic/config.js b/src/views/modules/pms/materialStorageDynamic/config.js index 284fe9d..d64581a 100644 --- a/src/views/modules/pms/materialStorageDynamic/config.js +++ b/src/views/modules/pms/materialStorageDynamic/config.js @@ -12,12 +12,13 @@ export default function () { { prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') }, // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent { prop: "material", label: "原料" }, + { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') }, { prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') }, { prop: "density", label: "原料堆积密度" }, { prop: "dosLow", label: "加料下限" }, { prop: "dosHigh", label: "加料上限" }, { prop: "description", label: "描述" }, - { prop: "remark", label: "备注" }, + // { prop: "remark", label: "备注" }, { prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "operations", diff --git a/src/views/modules/pms/shape/config.js b/src/views/modules/pms/shape/config.js index 405c8b9..902f652 100644 --- a/src/views/modules/pms/shape/config.js +++ b/src/views/modules/pms/shape/config.js @@ -1,7 +1,7 @@ import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; // import switchBtn from "@/components/noTemplateComponents/switchBtn"; import request from "@/utils/request"; -import { timeFilter } from "@/utils/filters"; +import { timeFilter, dictFilter } from "@/utils/filters"; export default function () { const tableProps = [ @@ -9,6 +9,7 @@ export default function () { { prop: "name", label: "砖型名称" }, { prop: "code", label: "砖型编码" }, { prop: "externalCode", label: "砖型ID" }, + { prop: "line", label: "中心线颜色", filter: dictFilter('line') }, { prop: "description", label: "长描述" }, { prop: "shortDesc", label: "短描述" }, { prop: "remark", label: "备注" },