From efb9d3f46eb0f05be19e8cf2df27df6806e7db5f Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 17 Feb 2023 14:02:03 +0800 Subject: [PATCH] bugfix --- public/index.html | 4 +- src/components/DialogJustForm.vue | 21 +- src/components/DialogWithMenu.vue | 17 +- .../operationComponent.js | 2 - .../uploadBtn/components/FileList.vue | 4 +- src/views/atomViews/ListViewWithHead.vue | 41 +-- src/views/modules/pms/blenderStep/config.js | 12 +- src/views/modules/pms/car/config.js | 6 +- src/views/modules/pms/customer/config.js | 37 +-- src/views/modules/pms/equipment/config.js | 13 +- src/views/modules/pms/equipmentType/config.js | 38 +-- src/views/modules/pms/factory/config.js | 5 +- .../pms/material/components/BaseListTable.vue | 239 +++++++++--------- .../material/components/DialogJustForm.vue | 8 +- .../material/components/ListViewWithHead.vue | 25 +- src/views/modules/pms/material/config.js | 16 +- .../modules/pms/materialStorage/config.js | 8 +- src/views/modules/pms/materialType/config.js | 119 +++++---- src/views/modules/pms/product/config.js | 18 +- .../modules/pms/productionLine/config.js | 10 +- src/views/modules/pms/shape/config.js | 10 +- src/views/modules/pms/supplier/config.js | 87 +++---- src/views/modules/pms/workSequence/config.js | 115 +++++---- 23 files changed, 442 insertions(+), 413 deletions(-) diff --git a/public/index.html b/public/index.html index d204e3c..2a3aa34 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/components/DialogJustForm.vue b/src/components/DialogJustForm.vue index 75f3507..c29dd48 100644 --- a/src/components/DialogJustForm.vue +++ b/src/components/DialogJustForm.vue @@ -52,7 +52,7 @@ :key="'upload_' + rowIndex + colIndex" :action="col.actionUrl" :file-list="dataForm['files']" - :disabled="detailMode || !dataForm.id" + :disabled="detailMode" v-bind="col.elparams" @update-file-list="handleFilelistUpdate" /> @@ -211,7 +211,14 @@ export default { typeCode: file.typeCode, })); // 更新请求 - this.addOrUpdate("PUT"); + if ("id" in this.dataForm && this.dataForm.id !== null && this.dataForm.id !== undefined) this.addOrUpdate("PUT"); + else + this.$notify({ + title: "等待保存", + message: "已添加文件,请手动点击保存!", + type: "warning", + duration: 2500, + }); }, /** utitilities */ @@ -322,11 +329,17 @@ export default { }) .then(({ data: res }) => { console.log("[add&update] res is: ", res); + this.loadingStatus = false; if (res.code === 0) { this.$message.success(method === "POST" ? "添加成功" : "更新成功"); this.$emit("refreshDataList"); - this.loadingStatus = false; if (method === "POST") this.handleClose(); + } else { + this.$message({ + message: `${res.code}: ${res.msg}`, + type: "error", + duration: 2000, + }); } }) .catch((errMsg) => { @@ -352,7 +365,7 @@ export default { break; case "add": case "update": - this.addOrUpdate((payload.name === "add" ? "POST" : "PUT")); + this.addOrUpdate(payload.name === "add" ? "POST" : "PUT"); break; } } else { diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue index ca1318a..d3ad580 100644 --- a/src/components/DialogWithMenu.vue +++ b/src/components/DialogWithMenu.vue @@ -653,10 +653,19 @@ export default { }) .then(({ data: res }) => { console.log("[add&update] res is: ", res); - this.$message.success(payload.name === "add" ? "添加成功" : "更新成功"); - this.$emit("refreshDataList"); - this.loadingStatus = false; - this.handleClose(); + if (res.code === 0) { + this.$message.success(payload.name === "add" ? "添加成功" : "更新成功"); + this.$emit("refreshDataList"); + this.loadingStatus = false; + this.handleClose(); + } else { + this.$message({ + message: `${res.code}: ${res.msg}`, + type: "error", + duration: 2000, + }); + this.loadingStatus = false; + } }) .catch((errMsg) => { this.$message.error("参数错误:" + errMsg); diff --git a/src/components/noTemplateComponents/operationComponent.js b/src/components/noTemplateComponents/operationComponent.js index f8ca39c..54e20e9 100644 --- a/src/components/noTemplateComponents/operationComponent.js +++ b/src/components/noTemplateComponents/operationComponent.js @@ -66,10 +66,8 @@ export default { const optIsObj = typeof opt === 'object' if (optIsObj) { - // 可能需要验证权限,如 opt.permission 选项 // 注意:为空字符串或null/undefined都会不验证权限 if (!opt.permission || (opt.permission && this.$hasPermission(opt.permission))) { - // console.log('[operation component]: ', opt.permission, this.$hasPermission(opt.permission)) btns.push( h('el-button', { diff --git a/src/components/uploadBtn/components/FileList.vue b/src/components/uploadBtn/components/FileList.vue index dba512a..8446e7b 100644 --- a/src/components/uploadBtn/components/FileList.vue +++ b/src/components/uploadBtn/components/FileList.vue @@ -71,7 +71,9 @@ export default { }, computed: { filteredList() { - return this.fileList.filter((item) => item.name.startsWith(this.searchCondition)); + // return this.fileList.filter((item) => item.name.startsWith(this.searchCondition)); + // 改为模糊查询 + return this.fileList.filter((item) => item.name.indexOf(this.searchCondition) !== -1); }, }, methods: { diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index 896901e..7d5a70b 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -12,6 +12,7 @@ @operate-event="handleOperate" :current-page="page" :current-size="size" + :refresh-layout-key="refreshLayoutKey" /> { - data.id = data._id; - delete data._id; - }); - return list; - }, - /** 获取 列表数据 */ getList(queryParams) { this.tableLoading = true; @@ -144,25 +137,18 @@ export default { if ("list" in res.data) { // real env: this.dataList = res.data.list.map((item) => { - // if (item.parentId || item.parendName) { /** && 也行 */ - // // 如果需要树形结构的列表 - // return this.reConstructDataList(res.data.list) - // } else { return { ...item, id: item._id ?? item.id, }; // } }); - // this.dataList = res.data.records; this.totalPage = res.data.total; } else if ("records" in res.data) { - // dev env: this.dataList = res.data.records.map((item) => ({ ...item, id: item._id ?? item.id, })); - // this.dataList = res.data.records; this.totalPage = res.data.total; } else { this.dataList.splice(0); @@ -172,15 +158,8 @@ export default { }); }, - /** 针对树形结构的列表,进行服务器端返回的数据重排 */ - reConstructDataList(list) { - // const parentIndex = list.forEach() - }, - - /** 处理 HeadForm 的操作 */ - handleHeadformOperate(payload) { - // 查询,导出,导入,等等 - console.log("headform operate: ", payload); + layoutTable() { + return Math.random(); }, /** 处理 表格操作 */ @@ -191,7 +170,7 @@ export default { switch (type) { case "delete": { // 确认是否删除 - return this.$confirm(`是否删除条目: ${data}`, "提示", { + return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", { confirmButtonText: "确认", cancelButtonText: "我再想想", type: "warning", @@ -201,7 +180,7 @@ export default { this.$http({ url: this.urls.base, method: "DELETE", - data: [`${data}`], + data: [`${data.id}`], }).then(({ data: res }) => { if (res.code === 0) { this.$message.success("删除成功!"); diff --git a/src/views/modules/pms/blenderStep/config.js b/src/views/modules/pms/blenderStep/config.js index a8875e2..b82ec3b 100644 --- a/src/views/modules/pms/blenderStep/config.js +++ b/src/views/modules/pms/blenderStep/config.js @@ -53,8 +53,8 @@ export default function () { url: '/pms/blenderStep', rows: [ [ - { input: true, label: '混料程序名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序名称' } }, - { input: true, label: '程序编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序编码' } }, + { 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: 'version', elparams: { placeholder: '请输入版本号' } }, ], [ @@ -69,7 +69,7 @@ export default function () { // ], // elparams: { placeholder: '请选择城市' } // }, - // { input: true, label: '程序号', prop: '', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, + // { input: true, label: '程序号', prop: '', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, ], // [{ switch: true, label: '状态', prop: 'enabled', default: 0 }], [{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } }], @@ -114,11 +114,11 @@ export default function () { extraParam: 'stepId', rows: [ [ - { input: true, label: '步骤', prop: 'sort', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入步骤' } }, - { input: true, label: '步骤描述', prop: 'description', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入描述' } }, + { input: true, label: '步骤', prop: 'sort', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入步骤' } }, + { input: true, label: '步骤描述', prop: 'description', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入描述' } }, ], [ { input: true, label: '参数名称', prop: 'name', elparams: { placeholder: '请输入参数名称' } }, - { input: true, label: '参数编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入描述' } }, + { input: true, label: '参数编码', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入描述' } }, ], [ { input: true, label: '参数值上限', prop: 'valueTop', elparams: { placeholder: '请输入参数值上限' } }, { input: true, label: '参数值下限', prop: 'valueFloor', elparams: { placeholder: '请输入参数值下限' } }, diff --git a/src/views/modules/pms/car/config.js b/src/views/modules/pms/car/config.js index 33c5c90..94226b1 100644 --- a/src/views/modules/pms/car/config.js +++ b/src/views/modules/pms/car/config.js @@ -22,7 +22,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:car:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:car:delete" }], }, ]; @@ -69,14 +69,14 @@ export default function () { input: true, label: "窑车号", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入窑车号" }, }, { input: true, label: "编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入料仓编码" }, }, ], diff --git a/src/views/modules/pms/customer/config.js b/src/views/modules/pms/customer/config.js index 2d69e9c..0c81b53 100644 --- a/src/views/modules/pms/customer/config.js +++ b/src/views/modules/pms/customer/config.js @@ -8,10 +8,10 @@ export default function () { { prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "name", label: "客户名称" }, { prop: "code", label: "编码" }, + { prop: "contact", label: "联系人" }, { prop: "tel", label: "联系电话" }, { prop: "email", label: "联系邮箱" }, { prop: "address", label: "地址" }, - { prop: "contact", label: "联系人" }, { prop: "description", label: "描述" }, { prop: "remark", label: "备注" }, { @@ -20,7 +20,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:customer:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:customer:delete" }], }, ]; @@ -65,17 +65,31 @@ export default function () { input: true, label: "客户名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入客户名称" }, }, { input: true, label: "编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入编码" }, }, ], + [ + { + input: true, + label: "联系人", + prop: "contact", + elparams: { placeholder: "请输入联系人" }, + }, + { + input: true, + label: "地址", + prop: "address", + elparams: { placeholder: "请输入客户地址" }, + }, + ], [ { input: true, @@ -90,20 +104,7 @@ export default function () { elparams: { placeholder: "请输入联系邮箱" }, }, ], - [ - { - input: true, - label: "地址", - prop: "address", - elparams: { placeholder: "请输入客户地址" }, - }, - { - input: true, - label: "联系人", - prop: "contact", - elparams: { placeholder: "请输入联系人" }, - }, - ], + [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }], [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], ], diff --git a/src/views/modules/pms/equipment/config.js b/src/views/modules/pms/equipment/config.js index cb15421..c77f168 100644 --- a/src/views/modules/pms/equipment/config.js +++ b/src/views/modules/pms/equipment/config.js @@ -21,7 +21,7 @@ export default function () { fixed: 'right', width: 120, subcomponent: TableOperaionComponent, - options: ['edit', { name: 'delete', permission: 'pms:equipment:delete' }] + options: ['edit', { name: 'delete', emitFull: true, permission: 'pms:equipment:delete' }] } ] @@ -56,13 +56,14 @@ export default function () { form: { rows: [ [ - { input: true, label: '设备名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称' } }, - { input: true, label: '设备名称编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, + { 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: 'version', elparams: { placeholder: '请输入版本号' } }, { select: true, label: '设备类型', - prop: 'equipmentTypeId', + prop: 'equipmentTypeId', + rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, options: [ // { label: '1', value: 1 }, // { label: '2', value: 2 }, @@ -118,8 +119,8 @@ export default function () { extraParam: 'equipmentId', rows: [ [ - { input: true, label: '属性名称', prop: 'attrName', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性名称' } }, - { input: true, label: '属性值', prop: 'attrValue', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } }, + { input: true, label: '属性名称', prop: 'attrName', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入属性名称' } }, + { input: true, label: '属性值', prop: 'attrValue', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } }, ], [ { textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '添加备注' } }, diff --git a/src/views/modules/pms/equipmentType/config.js b/src/views/modules/pms/equipmentType/config.js index a9c173f..185849b 100644 --- a/src/views/modules/pms/equipmentType/config.js +++ b/src/views/modules/pms/equipmentType/config.js @@ -18,7 +18,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:equipmentType:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:equipmentType:delete" }], }, ]; @@ -64,32 +64,32 @@ export default function () { input: true, label: "类型名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入类型名称" }, }, { input: true, label: "类型编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入类型编码" }, }, - { - prop: "parentId", - cascader: true, - options: [ - // {label: '父类1', value: '1'}, - // {label: '父类2', value: '2'}, - ], - // fetchData() 获取普通列表数据 - // fetchTreeData() 获取需要展示层级结构的数据 - fetchTreeData: () => { - return this.$http.get('/pms/equipmentType/getTree') - }, - label: "父类", - rules: { required: false, message: "not empty", trigger: "change" }, - elparams: { placeholder: "请输选择父类", 'show-all-levels': false, props: { checkStrictly: true, value: 'id', label: 'name' } }, - }, + // { + // prop: "parentId", + // cascader: true, + // options: [ + // // {label: '父类1', value: '1'}, + // // {label: '父类2', value: '2'}, + // ], + // // fetchData() 获取普通列表数据 + // // fetchTreeData() 获取需要展示层级结构的数据 + // fetchTreeData: () => { + // return this.$http.get('/pms/equipmentType/getTree') + // }, + // label: "父类", + // rules: { required: false, message: "必填项不能为空", trigger: "change" }, + // elparams: { placeholder: "请输选择父类", 'show-all-levels': false, props: { checkStrictly: true, value: 'id', label: 'name' } }, + // }, ], // [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }], [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], diff --git a/src/views/modules/pms/factory/config.js b/src/views/modules/pms/factory/config.js index e269635..d3bcfbc 100644 --- a/src/views/modules/pms/factory/config.js +++ b/src/views/modules/pms/factory/config.js @@ -24,6 +24,7 @@ export default function () { const headFormFields = [ { + prop: 'key', label: '工厂名称', input: true, default: { value: '' }, @@ -55,8 +56,8 @@ export default function () { form: { rows: [ [ - { input: true, label: '工厂名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入工厂名称' } }, - { input: true, label: '工厂编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入工厂编码' } }, + { 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: 'address', elparams: { placeholder: '' } }, // '请输入工厂所在地' } }, diff --git a/src/views/modules/pms/material/components/BaseListTable.vue b/src/views/modules/pms/material/components/BaseListTable.vue index b9238df..53b9c5a 100644 --- a/src/views/modules/pms/material/components/BaseListTable.vue +++ b/src/views/modules/pms/material/components/BaseListTable.vue @@ -1,82 +1,76 @@ diff --git a/src/views/modules/pms/material/components/DialogJustForm.vue b/src/views/modules/pms/material/components/DialogJustForm.vue index cf8fa1a..4e4479f 100644 --- a/src/views/modules/pms/material/components/DialogJustForm.vue +++ b/src/views/modules/pms/material/components/DialogJustForm.vue @@ -197,13 +197,17 @@ export default { }) .then(({ data: res }) => { console.log("[add&update] res is: ", res); + this.loadingStatus = false; if (res.code === 0) { this.$message.success(payload.name === "add" ? "添加成功" : "更新成功"); - this.loadingStatus = false; this.$emit("refreshDataList"); this.handleClose(); } else { - this.$message.error(res.msg); + this.$message({ + message: `${res.code}: ${res.msg}`, + type: "error", + duration: 2000, + }); } }) .catch((errMsg) => { diff --git a/src/views/modules/pms/material/components/ListViewWithHead.vue b/src/views/modules/pms/material/components/ListViewWithHead.vue index c577647..27abed6 100644 --- a/src/views/modules/pms/material/components/ListViewWithHead.vue +++ b/src/views/modules/pms/material/components/ListViewWithHead.vue @@ -16,6 +16,7 @@ :table-data="dataList" @operate-event="handleOperate" @load-sub="handleLoadSub" + :refresh-layout-key="refreshLayoutKey" /> ({ ..._, hasChildren: true })); + this.dataList = res.data.list.map((_) => ({ ..._, hasChildren: Array.isArray(_.children) && _.children.length > 0 ? true : false })); // this.dataList = res.data.records; this.totalPage = res.data.total; @@ -202,12 +211,6 @@ export default { }); }, - /** 处理 HeadForm 的操作 */ - handleHeadformOperate(payload) { - // 查询,导出,导入,等等 - console.log("headform operate: ", payload); - }, - /** 处理 表格操作 */ handleOperate({ type, data }) { console.log("payload", type, data); @@ -216,7 +219,7 @@ export default { switch (type) { case "delete": { // 确认是否删除 - return this.$confirm(`是否删除条目: ${data}`, "提示", { + return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", { confirmButtonText: "确认", cancelButtonText: "我再想想", type: "warning", @@ -226,7 +229,7 @@ export default { this.$http({ url: this.urls.base, method: "DELETE", - data: [`${data}`], + data: [`${data.id}`], }).then(({ data: res }) => { if (res.code === 0) { this.$message.success("删除成功!"); diff --git a/src/views/modules/pms/material/config.js b/src/views/modules/pms/material/config.js index 58212f4..c4d8826 100644 --- a/src/views/modules/pms/material/config.js +++ b/src/views/modules/pms/material/config.js @@ -24,7 +24,7 @@ export default function () { fixed: "right", width: 180, subcomponent: TableOperaionComponent, - options: [{ name: "add-sub", permission: "pms:material:save" }, "edit", { name: "delete", permission: "pms:material:save" },], + options: [{ name: "add-sub", permission: "pms:material:save" }, "edit", { name: "delete", emitFull: true, permission: "pms:material:save" },], }, ]; @@ -73,17 +73,17 @@ export default function () { input: true, label: "物料名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入物料名称" }, }, { input: true, label: "物料编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入物料编码" }, }, - { input: true, label: "堆积密度(g/cm3)", prop: "density", elparams: { placeholder: "堆积密度" } }, + { input: true, label: "堆积密度(g/cm³)", prop: "density", elparams: { placeholder: "堆积密度" } }, ], [ @@ -93,7 +93,7 @@ export default function () { prop: "parentId", // TODO: 待解决:DialogWithMenu 中设置default只在初始化的时候有效,一旦清空过就无效了 // default: '0', - // rules: { required: true, message: "not empty", trigger: "blur" }, + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, options: [{ id: '0', name: '无' }], // 手动注入额外选项,用到的场景不多... fetchData: () => this.$http.get('/pms/material/page', { params: { page: 1, limit: 999, key: '' } }), elparams: { placeholder: "请选择父级物料", filterable: true, clearable: true }, @@ -109,7 +109,7 @@ export default function () { select: true, label: "物料类型", prop: "typeId", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, options: [], fetchData: () => this.$http.get('/pms/materialType/page', { params: { page: 1, limit: 999 } }), elparams: { placeholder: "请输入物料类型" }, @@ -128,7 +128,7 @@ export default function () { // input: true, // label: "设备类型", // prop: "eqTypeId", - // rules: { required: true, message: "not empty", trigger: "blur" }, + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // elparams: { placeholder: "请输入设备类型" }, // }, ], @@ -183,7 +183,7 @@ export default function () { subcomponent: TableOperaionComponent, options: [ { name: "edit", permission: "pms:materialArrt:save" }, - { name: "delete", permission: "pms:materialArrt:save" }, + { name: "delete", emitFull: true, permission: "pms:materialArrt:save" }, ], }, ], diff --git a/src/views/modules/pms/materialStorage/config.js b/src/views/modules/pms/materialStorage/config.js index 5398678..db210f8 100644 --- a/src/views/modules/pms/materialStorage/config.js +++ b/src/views/modules/pms/materialStorage/config.js @@ -20,7 +20,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:materialStorage:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:materialStorage:delete" }], }, ]; @@ -66,14 +66,14 @@ export default function () { input: true, label: "料仓名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入料仓名称" }, }, { input: true, label: "料仓编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入料仓编码" }, }, { select: true, @@ -85,7 +85,7 @@ export default function () { { label: '中间仓', value: '0' }, { label: '日料仓', value: '1' }, ], - rules: { required: true, message: "not empty", trigger: "change" }, + rules: { required: true, message: "必填项不能为空", trigger: "change" }, }, ], [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }], diff --git a/src/views/modules/pms/materialType/config.js b/src/views/modules/pms/materialType/config.js index c248e23..4c66bb3 100644 --- a/src/views/modules/pms/materialType/config.js +++ b/src/views/modules/pms/materialType/config.js @@ -1,55 +1,53 @@ -import TableOperaionComponent from '@/components/noTemplateComponents/operationComponent' -import { timeFilter } from '@/utils/filters' +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import { timeFilter } from "@/utils/filters"; export default function () { - const tableProps = [ - { type: 'index', label: '序号' }, + { type: "index", label: "序号" }, { prop: "createTime", label: "添加时间", filter: timeFilter }, - { prop: 'name', label: '类型名称' }, - { prop: 'code', label: '类型编码' }, - { prop: 'enName', label: '英文名称' }, - { prop: 'enAb', label: '缩写' }, - { prop: 'description', label: '描述', }, - { prop: 'remark', label: '备注' }, + { prop: "name", label: "类型名称" }, + { prop: "code", label: "类型编码" }, + { prop: "enName", label: "英文名称" }, + { prop: "enAb", label: "缩写" }, + { prop: "description", label: "描述" }, + { prop: "remark", label: "备注" }, { - prop: 'operations', - name: '操作', - fixed: 'right', + prop: "operations", + name: "操作", + fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ['edit', { name: 'delete', permission: 'pms:materialType:delete' }] - } - ] - + options: ["edit", { name: "delete", emitFull: true, permission: "pms:materialType:delete" }], + }, + ]; const headFormFields = [ - // { - // prop: 'key', - // label: '工序名称/编码', - // input: true, - // default: { value: '' }, - // bind: { // v-bind keyValues - // placeholder: '请输入工序名称或编码' - // } - // }, { - button: { - type: 'primary', - name: '查询' + prop: 'key', + label: '类型名称/编码', + input: true, + default: { value: '' }, + bind: { // v-bind keyValues + placeholder: '请输入类型名称或编码' } }, { button: { - type: 'primary', - name: '新增', - permission: 'pms:materialType:save' + type: "primary", + name: "查询", + }, + }, + { + button: { + type: "primary", + name: "新增", + permission: "pms:materialType:save", }, bind: { plain: true, - } - } - ] + }, + }, + ]; /** * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件 @@ -60,12 +58,28 @@ export default function () { form: { rows: [ [ - { input: true, label: '物料类型名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入物料类型名称' } }, - { input: true, label: '物料类型编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入物料类型编码' } }, + { + 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: '请输入英文缩写' } }, + { 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: "描述" } }, ], [ // { @@ -83,24 +97,19 @@ export default function () { // 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: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, - ], - [ - // [{ switch: true, label: '状态', prop: 'enabled', default: 0 }], - { textarea: true, label: '描述', prop: 'description', elparams: { placeholder: '描述' } }, + { 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: "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: { @@ -109,14 +118,14 @@ export default function () { }, headFormConfigs: { rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 - fields: headFormFields // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 }, urls: { - base: '/pms/materialType', - page: '/pms/materialType/page', + base: "/pms/materialType", + page: "/pms/materialType/page", // subase: '/pms/blenderStepParam', // subpage: '/pms/blenderStepParam/page', // more... - } - } -} \ No newline at end of file + }, + }; +} diff --git a/src/views/modules/pms/product/config.js b/src/views/modules/pms/product/config.js index f4fc98b..42317c8 100644 --- a/src/views/modules/pms/product/config.js +++ b/src/views/modules/pms/product/config.js @@ -22,7 +22,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:product:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:product:delete" }], }, ]; @@ -68,14 +68,14 @@ export default function () { input: true, label: "产品名称/砖型名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入设备名称" }, }, { input: true, label: "产品编码/砖型编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入设备编码" }, }, // { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } }, @@ -88,7 +88,7 @@ export default function () { }, ], [ - // { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, + // { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, { select: true, label: "单位", @@ -100,14 +100,14 @@ export default function () { input: true, label: "规格", prop: "specifications", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入规格" }, }, { input: true, label: "产线完成单位产品用时(s)", prop: "processTime", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入规格" }, }, ], @@ -138,7 +138,7 @@ export default function () { subcomponent: TableOperaionComponent, options: [ { name: "edit", permission: "pms:productArrt:update" }, - { name: "delete", permission: "pms:productArrt:delete" }, + { name: "delete", emitFull: true, permission: "pms:productArrt:delete" }, ], }, ], @@ -156,14 +156,14 @@ export default function () { input: true, label: "属性名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入属性名称" }, }, { input: true, label: "属性值", prop: "value", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入属性值" }, }, ], diff --git a/src/views/modules/pms/productionLine/config.js b/src/views/modules/pms/productionLine/config.js index dde9a01..dd2feb6 100644 --- a/src/views/modules/pms/productionLine/config.js +++ b/src/views/modules/pms/productionLine/config.js @@ -21,7 +21,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:productionLine:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:productionLine:delete" }], }, ]; @@ -66,14 +66,14 @@ export default function () { input: true, label: "产线名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入产线名称" }, }, { input: true, label: "产线编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入产线编码" }, }, { @@ -82,7 +82,7 @@ export default function () { prop: "factoryId", fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }), option: [], - rules: { required: true, message: "not empty", trigger: "change" }, + rules: { required: true, message: "必填项不能为空", trigger: "change" }, }, ], // [ @@ -91,7 +91,7 @@ export default function () { // label: "产线TT值", // prop: "tvalue", // rules: [ - // { required: true, message: "not empty", trigger: "blur" }, + // { required: true, message: "必填项不能为空", trigger: "blur" }, // { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) }, // ], // elparams: { placeholder: "设定TT值(每小时下片数量)" }, diff --git a/src/views/modules/pms/shape/config.js b/src/views/modules/pms/shape/config.js index 9efa17c..61cfb04 100644 --- a/src/views/modules/pms/shape/config.js +++ b/src/views/modules/pms/shape/config.js @@ -17,7 +17,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:shape:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:shape:delete" }], }, ]; @@ -62,14 +62,14 @@ export default function () { input: true, label: "砖型名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入砖型名称" }, }, { input: true, label: "砖型编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入砖型编码" }, }, ], @@ -80,14 +80,14 @@ export default function () { // prop: "factoryId", // fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }), // option: [], - // rules: { required: true, message: "not empty", trigger: "change" }, + // rules: { required: true, message: "必填项不能为空", trigger: "change" }, // }, // { // input: true, // label: "产线TT值", // prop: "tvalue", // rules: [ - // { required: true, message: "not empty", trigger: "blur" }, + // { required: true, message: "必填项不能为空", trigger: "blur" }, // { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) }, // ], // elparams: { placeholder: "设定TT值(每小时下片数量)" }, diff --git a/src/views/modules/pms/supplier/config.js b/src/views/modules/pms/supplier/config.js index 66003e5..5942b13 100644 --- a/src/views/modules/pms/supplier/config.js +++ b/src/views/modules/pms/supplier/config.js @@ -9,10 +9,10 @@ export default function () { { prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "name", label: "供应商名称" }, { prop: "code", label: "编码" }, + { prop: "contact", label: "联系人" }, { prop: "tel", label: "联系电话" }, { prop: "email", label: "联系邮箱" }, { prop: "address", label: "地址" }, - { prop: "contact", label: "联系人" }, // { prop: "status", label: "产线状态", subcomponent: switchBtn }, // subcomponent { prop: "description", label: "描述" }, { prop: "remark", label: "备注" }, @@ -22,7 +22,7 @@ export default function () { fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ["edit", { name: "delete", permission: "pms:supplier:delete" }], + options: ["edit", { name: "delete", emitFull: true, permission: "pms:supplier:delete" }], }, ]; @@ -67,66 +67,67 @@ export default function () { input: true, label: "供应商名称", prop: "name", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入供应商名称" }, }, { input: true, label: "编码", prop: "code", - rules: { required: true, message: "not empty", trigger: "blur" }, + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入编码" }, }, ], [ { input: true, - label: "联系电话", - prop: "tel", - // rules: { required: true, message: "not empty", trigger: "blur" }, - elparams: { placeholder: "请输入联系电话" }, + label: "联系人", + prop: "contact", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入联系人" }, }, - { - input: true, - label: "联系邮箱", - prop: "email", - // rules: { required: true, message: "not empty", trigger: "blur" }, - elparams: { placeholder: "请输入联系邮箱" }, - }, - // { - // select: true, - // label: "所属工厂", - // prop: "factoryId", - // fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }), - // option: [], - // rules: { required: true, message: "not empty", trigger: "change" }, - // }, - // { - // input: true, - // label: "产线TT值", - // prop: "tvalue", - // rules: [ - // { required: true, message: "not empty", trigger: "blur" }, - // { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) }, - // ], - // elparams: { placeholder: "设定TT值(每小时下片数量)" }, - // }, - ], - [ { input: true, label: "地址", prop: "address", - // rules: { required: true, message: "not empty", trigger: "blur" }, + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入供应商地址" }, }, - { - input: true, - label: "联系人", - prop: "contact", - // rules: { required: true, message: "not empty", trigger: "blur" }, - elparams: { placeholder: "请输入联系人" }, - }, + [ + { + input: true, + label: "联系电话", + prop: "tel", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入联系电话" }, + }, + { + input: true, + label: "联系邮箱", + prop: "email", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入联系邮箱" }, + }, + // { + // select: true, + // label: "所属工厂", + // prop: "factoryId", + // fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }), + // option: [], + // rules: { required: true, message: "必填项不能为空", trigger: "change" }, + // }, + // { + // input: true, + // label: "产线TT值", + // prop: "tvalue", + // rules: [ + // { required: true, message: "必填项不能为空", trigger: "blur" }, + // { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) }, + // ], + // elparams: { placeholder: "设定TT值(每小时下片数量)" }, + // }, + ], + ], [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }], [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], diff --git a/src/views/modules/pms/workSequence/config.js b/src/views/modules/pms/workSequence/config.js index e0d6436..5ed717b 100644 --- a/src/views/modules/pms/workSequence/config.js +++ b/src/views/modules/pms/workSequence/config.js @@ -1,54 +1,53 @@ -import TableOperaionComponent from '@/components/noTemplateComponents/operationComponent' -import { timeFilter } from '@/utils/filters' +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import { timeFilter } from "@/utils/filters"; export default function () { - const tableProps = [ - { type: 'index', label: '序号' }, + { type: "index", label: "序号" }, { prop: "createTime", label: "添加时间", filter: timeFilter }, - { prop: 'name', label: '工序名称' }, - { prop: 'code', label: '工序编码' }, - { prop: 'prdLine', label: '产线名称' }, - { prop: 'description', label: '描述', }, - { prop: 'remark', label: '备注' }, + { prop: "name", label: "工序名称" }, + { prop: "code", label: "工序编码" }, + { prop: "prdLine", label: "产线名称" }, + { prop: "description", label: "描述" }, + { prop: "remark", label: "备注" }, { - prop: 'operations', - name: '操作', - fixed: 'right', + prop: "operations", + name: "操作", + fixed: "right", width: 120, subcomponent: TableOperaionComponent, - options: ['edit', { name: 'delete', permission: 'pms:workSequence:delete' }] - } - ] - + options: ["edit", { name: "delete", emitFull: true, permission: "pms:workSequence:delete" }], + }, + ]; const headFormFields = [ { - prop: 'key', - label: '工序名称/编码', + prop: "key", + label: "工序名称/编码", input: true, - default: { value: '' }, - bind: { // v-bind keyValues - placeholder: '请输入工序名称或编码' - } + default: { value: "" }, + bind: { + // v-bind keyValues + placeholder: "请输入工序名称或编码", + }, }, { button: { - type: 'primary', - name: '查询' - } + type: "primary", + name: "查询", + }, }, { button: { - type: 'primary', - name: '新增', - permission: 'pms:workSequence:save' + type: "primary", + name: "新增", + permission: "pms:workSequence:save", }, bind: { plain: true, - } - } - ] + }, + }, + ]; /** * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件 @@ -59,43 +58,57 @@ export default function () { form: { rows: [ [ - { input: true, label: '工序名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入工序名称' } }, - { input: true, label: '工序编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入工序编码' } }, + { + 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: "请输入工序编码" }, + }, ], [ { select: true, - label: '产线', - prop: 'prdLineId', + label: "产线", + prop: "prdLineId", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, options: [ // { label: '1', value: 1 }, // { label: '2', value: 2 }, // { label: '3', value: 3 }, ], - elparams: { placeholder: '请选择所属产线' }, + elparams: { placeholder: "请选择所属产线" }, // fetchData api fetchData: () => { - return this.$http('/pms/productionLine/page', { limit: 999, page: 1, key: '' }) - } + 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: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, + // { input: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } }, + { input: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }, + // { input: true, label: '程序号', prop: '', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } }, ], // [{ switch: true, label: '状态', prop: 'enabled', default: 0 }], [ - { textarea: true, label: '描述', prop: 'description', elparams: { placeholder: '描述' } }, + // { textarea: true, label: '描述', prop: 'description', elparams: { placeholder: '描述' } }, + { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }, ], ], operations: [ - { name: 'add', label: '保存', type: 'primary', permission: 'pms:workSequence:save', showOnEdit: false }, - { name: 'update', label: '更新', type: 'primary', permission: 'pms:workSequence:update', showOnEdit: true }, - { name: 'reset', label: '重置', type: 'warning', showAlways: true }, + { name: "add", label: "保存", type: "primary", permission: "pms:workSequence:save", showOnEdit: false }, + { name: "update", label: "更新", type: "primary", permission: "pms:workSequence:update", showOnEdit: true }, + { name: "reset", label: "重置", type: "warning", showAlways: true }, // { name: 'cancel', label: '取消', showAlways: true }, ], }, }; - return { dialogConfigs: dialogJustFormConfigs, tableConfig: { @@ -104,14 +117,14 @@ export default function () { }, headFormConfigs: { rules: null, // 名称是由 BaseSearchForm.vue 组件固定的 - fields: headFormFields // 名称是由 BaseSearchForm.vue 组件固定的 + fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的 }, urls: { - base: '/pms/workSequence', - page: '/pms/workSequence/page', + base: "/pms/workSequence", + page: "/pms/workSequence/page", // subase: '/pms/blenderStepParam', // subpage: '/pms/blenderStepParam/page', // more... - } - } -} \ No newline at end of file + }, + }; +}