diff --git a/src/views/modules/pms/bomTechAndFiring/components/edit.vue b/src/views/modules/pms/bomTechAndFiring/components/edit.vue index 5f47eaa..78fd866 100644 --- a/src/views/modules/pms/bomTechAndFiring/components/edit.vue +++ b/src/views/modules/pms/bomTechAndFiring/components/edit.vue @@ -22,8 +22,13 @@ - - + + + + + + + @@ -43,7 +48,7 @@
- 更新 + 更新 取消
@@ -60,14 +65,17 @@ export default { loading: false, dataForm: { id: null, - bomId: null, - techId: null, + code: null, + name: null, }, rules: { - bom: [], - tech: [{ required: true, message: "必填项不能为空", trigger: "blur" }], + code: [], + name: [], + tech: [] + // name: [{ required: true, message: "必填项不能为空", trigger: "blur" }], }, techList: [], + btnLoading: false, }; }, computed: {}, @@ -78,10 +86,12 @@ export default { }, methods: { // 初始化 - init({ id, bomId, techId }) { + init({ id, code, name, techId, bomId }) { this.$set(this.dataForm, "id", id); - this.$set(this.dataForm, "bomId", bomId); + this.$set(this.dataForm, "code", code); + this.$set(this.dataForm, "name", name); this.$set(this.dataForm, "techId", techId); + this.$set(this.dataForm, "bomId", bomId); }, // 获取工艺列表 async getTechList() { @@ -103,13 +113,6 @@ export default { } }, - // 提交更新 - async push(type = "add") { - if (type == "add") { - } else if (type == "update") { - } - }, - // 按钮事件 handleBtnClick(type) { switch (type) { @@ -123,14 +126,22 @@ export default { case "更新": this.$refs.dataForm.validate((valid) => { if (valid) { - this.$http.put("/pms/bomTech", this.dataForm).then((res) => { - if (res.data.code == 0) { - this.$message.success("更新成功"); - this.handleClose(true); - } else { - this.$message.error(res.data.msg); - } - }); + this.btnLoading = true; + this.$http + .put("/pms/bomTech", { + id: this.dataForm.id, + techId: this.dataForm.techId, + bomId: this.dataForm.bomId, + }) + .then((res) => { + if (res.data.code == 0) { + this.$message.success("更新成功"); + this.handleClose(true); + } else { + this.$message.error(res.data.msg); + } + this.btnLoading = false; + }); } }); break; diff --git a/src/views/modules/pms/bomTechAndFiring/index.vue b/src/views/modules/pms/bomTechAndFiring/index.vue index 0e2ed4c..d7828af 100644 --- a/src/views/modules/pms/bomTechAndFiring/index.vue +++ b/src/views/modules/pms/bomTechAndFiring/index.vue @@ -201,9 +201,11 @@ export default { this.editVisible = true; this.$nextTick(() => { this.$refs.edit.init({ - id: data.bomTechId, - bomId: data.id, - techId: data.techId, + id: data.bomTechId, // 只提交,不展示 + code: data.code, // 不提交,只展示 + name: data.name, // 不提交,只展示 + techId: data.techId, // 及提交,也展示 + bomId: data.id // 只提交,不展示 }); }); break; diff --git a/src/views/modules/pms/materialStorageDynamic/config.js b/src/views/modules/pms/materialStorageDynamic/config.js index 96f8940..3b29b35 100644 --- a/src/views/modules/pms/materialStorageDynamic/config.js +++ b/src/views/modules/pms/materialStorageDynamic/config.js @@ -11,7 +11,7 @@ export default function () { { prop: "code", label: "料仓编码" }, { prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') }, // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent - { prop: "material", label: "原料" }, + { prop: "materialDescription", label: "原料" }, { prop: "qty", label: "料位" }, // { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') }, { prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') }, diff --git a/src/views/modules/pms/order/config.js b/src/views/modules/pms/order/config.js index 8f9b57b..261e92f 100644 --- a/src/views/modules/pms/order/config.js +++ b/src/views/modules/pms/order/config.js @@ -26,20 +26,20 @@ export default function () { // { name: 'confirm-order', label: '确认', icon: 'success', showText: true }, { name: "view-ongoing", label: "查看详情", icon: "view", emitFull: true }, { name: "end-order", label: "结束", icon: "finished" }, - { name: "move-up", label: "上移", icon: "arrow-up" }, - { name: "move-down", label: "下移", icon: "arrow-down" }, - { name: "move-to-top", label: "至顶", icon: "upload2" }, - { name: "move-to-bottom", label: "至底", icon: "download" }, - { name: "destroy-order", label: "废除", icon: "close" }, + // { name: "move-up", label: "上移", icon: "arrow-up" }, + // { name: "move-down", label: "下移", icon: "arrow-down" }, + // { name: "move-to-top", label: "至顶", icon: "upload2" }, + // { name: "move-to-bottom", label: "至底", icon: "download" }, + // { name: "destroy-order", label: "废除", icon: "close" }, ], pending: [ { name: "edit", label: "编辑", icon: "edit-outline" }, { name: "view", label: "查看详情", icon: "view" }, { name: "confirm-order", label: "确认订单", icon: "success" }, - { name: "move-up", label: "上移", icon: "arrow-up" }, - { name: "move-down", label: "下移", icon: "arrow-down" }, - { name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true }, - { name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true }, + // { name: "move-up", label: "上移", icon: "arrow-up" }, + // { name: "move-down", label: "下移", icon: "arrow-down" }, + // { name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true }, + // { name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true }, { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" }, ], finished: [ @@ -98,7 +98,7 @@ export default function () { fixed: "right", subcomponent: TableOperaionComponent, options: operations[type], - width: operations[type].length > 1 ? operations[type].length * 40 : 90, + width: operations[type].length > 2 ? operations[type].length * 40 : 90, }, // type !== "finished" diff --git a/src/views/modules/pms/product/config.js b/src/views/modules/pms/product/config.js index e3686c1..5a51920 100644 --- a/src/views/modules/pms/product/config.js +++ b/src/views/modules/pms/product/config.js @@ -101,42 +101,42 @@ export default function () { }, { input: true, - label: "物料编码/砖型编码", + label: "物料编码", prop: "code", rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入设备编码" }, }, // { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } }, - { - select: true, - label: "物料类型", - prop: "typeDictValue", - options: - "product_type" in dictList - ? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel })) - : [], - elparams: { placeholder: "选择一个物料类型" }, - }, + // { + // select: true, + // label: "物料类型", + // prop: "typeDictValue", + // options: + // "product_type" in dictList + // ? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel })) + // : [], + // elparams: { placeholder: "选择一个物料类型" }, + // }, ], [ // { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } }, - { - select: true, - label: "单位", - prop: "unitDictValue", - options: - "unit" in dictList - ? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel })) - : [], - elparams: { placeholder: "选择单位" }, - }, - { - input: true, - label: "规格", - prop: "specifications", - rules: { required: true, message: "必填项不能为空", trigger: "blur" }, - elparams: { placeholder: "请输入规格" }, - }, + // { + // select: true, + // label: "单位", + // prop: "unitDictValue", + // options: + // "unit" in dictList + // ? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel })) + // : [], + // elparams: { placeholder: "选择单位" }, + // }, + // { + // input: true, + // label: "规格", + // prop: "specifications", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + // elparams: { placeholder: "请输入规格" }, + // }, { input: true, label: "产线完成单位产品用时", @@ -147,8 +147,6 @@ export default function () { ], elparams: { placeholder: "请输入规格" }, }, - ], - [ { input: true, label: "重量", @@ -159,7 +157,6 @@ export default function () { ], elparams: { placeholder: "请输入重量" }, }, - ], [{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], ],