From fd08cc9356762d6b890125c978eaecdfcc281bba Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 13:29:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=E6=97=A0=E8=81=8A=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E8=81=8A=E7=B3=BB=E5=88=97=E7=9A=84=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/mtm.js | 6 ++++++ src/views/mtm/materials_form.vue | 29 ++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index fe3ac67f..487664b2 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -147,6 +147,12 @@ export default { ); }, }, + cates: { + name: "产品系列", + req: async function (data) { + return await http.get(`${config.API_URL}/mtm/material/cates/`, data); + }, + }, }, // 工段 mgroup: { diff --git a/src/views/mtm/materials_form.vue b/src/views/mtm/materials_form.vue index 84c98889..e376b116 100644 --- a/src/views/mtm/materials_form.vue +++ b/src/views/mtm/materials_form.vue @@ -55,13 +55,17 @@ v-model="form.cate" placeholder="物料系列" clearable + allow-create + filterable + default-first-option + :reserve-keyword="false" style="width: 100%" > @@ -244,12 +248,12 @@ export default { }, visible: false, isSaveing: false, - cateOptions: [ - { id: "bang", name: "棒" }, - { id: "guan", name: "管" }, - { id: "bangguan", name: "棒管" }, - { id: "huiliao", name: "混料" }, - ], + // cateOptions: [ + // { id: "bang", name: "棒" }, + // { id: "guan", name: "管" }, + // { id: "bangguan", name: "棒管" }, + // { id: "huiliao", name: "混料" }, + // ], options: [ { id: 0, name: "电/水/气" }, { id: 10, name: "成品" }, @@ -270,8 +274,15 @@ export default { }, mounted() { this.getProcessOptions(); + this.getMaterialCate(); + }, methods: { + getMaterialCate() { + this.$API.mtm.material.cates.req({ page: 0 }).then((res) => { + this.cateOptions = res; + }); + }, getProcessOptions() { this.$API.mtm.process.list.req({ page: 0 }).then((res) => { this.processOptions = res; From 0bb5da3c3d5c7b2716aeca468b26f7774a44519b Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 13:30:27 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=E6=80=A7=E8=83=BD=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E4=B8=ADtestitems=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qm/behavior.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/qm/behavior.vue b/src/views/qm/behavior.vue index 59095f63..866669eb 100644 --- a/src/views/qm/behavior.vue +++ b/src/views/qm/behavior.vue @@ -304,7 +304,7 @@ export default { getTextItem() { let that = this; that.$API.qm.getTestItem - .get({ tag: "performance", page: 0 }) + .get({ tags__contains: "performance", page: 0 }) .then((res) => { that.behaviors = res; that.query.testitem = res[0].id; From 766b3d0704ee122dda0d42364419b84110616c0f Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 13:31:02 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=E9=A6=96=E4=BB=B6=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E4=B8=ADtestitem=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qm/first_check.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/qm/first_check.vue b/src/views/qm/first_check.vue index 0f785e9f..8257e605 100644 --- a/src/views/qm/first_check.vue +++ b/src/views/qm/first_check.vue @@ -252,7 +252,7 @@ export default { getTextItem() { let that = this; that.$API.qm.getTestItem - .get({ tag: "first", page: 0 }) + .get({ tags__contains: "first", page: 0 }) .then((res) => { console.log(res); let ftestitems = []; From a7d02670d9ed762b99afbd510fda0e74e95e6aee Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 14:27:07 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:=E6=A3=80=E6=B5=8B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_base/testItem_form.vue | 156 ++++++++++++++++++++------- 1 file changed, 115 insertions(+), 41 deletions(-) diff --git a/src/views/enm_base/testItem_form.vue b/src/views/enm_base/testItem_form.vue index e0d2ae1d..bf783814 100644 --- a/src/views/enm_base/testItem_form.vue +++ b/src/views/enm_base/testItem_form.vue @@ -13,7 +13,7 @@ :model="form" :rules="rules" label-position="right" - label-width="80px" + label-width="100px" style="padding: 0 10px" > @@ -25,6 +25,93 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加 + + + + + + - - - - - 添加 - - - - - @@ -91,7 +146,9 @@ const defaultForm = { name: "", description: "", sort: 1, - tags: [""], + tags: [], + mcate_tags: [], + choices: [""], }; export default { emits: ["success", "closed"], @@ -114,19 +171,36 @@ export default { }, visible: false, isSaveing: false, - options: [], + options: [ + {value:"input-number",name:"数字"}, + {value:"input-text",name:"文字"}, + {value:"select",name:"单选"}, + {value:"selects",name:"多选"}, + ], + tagsOptions: [ + {value:"first",name:"首件检验"}, + {value:"prod",name:"成品检验"}, + {value:"performance",name:"性能检验"}, + ], + mcateTagsOptions: [], processOptions: [], setFiltersVisible: false, }; }, - mounted() {}, + mounted() { + this.getmcateTagsOptions(); + }, methods: { - addComponent() { - this.form.tags.push(""); + getmcateTagsOptions() { + this.$API.mtm.material.cates.req().then((res) => { + this.mcateTagsOptions = res; + }); }, - delComponent(index) { - this.form.tags.splice(index, 1); - console.log("this.form.tags:", this.form.tags); + addComponent(type) { + this.form[type].push(""); + }, + delComponent(index,type) { + this.form[type].splice(index, 1); }, //显示 open(mode = "add") { From 1951eae6794b8694988efd12d5fae1f6d457368a Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 14:41:25 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9Etestitem=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=9C=A8=E5=8D=95=E9=80=89=E6=88=96=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_base/testItem_form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/enm_base/testItem_form.vue b/src/views/enm_base/testItem_form.vue index bf783814..ad87c77e 100644 --- a/src/views/enm_base/testItem_form.vue +++ b/src/views/enm_base/testItem_form.vue @@ -82,7 +82,7 @@ - + From 7f6a675a2957b670036a21ec037fa311bf19731d Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 14:52:29 +0800 Subject: [PATCH 6/7] fix: --- src/views/enm_base/testItem_form.vue | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/views/enm_base/testItem_form.vue b/src/views/enm_base/testItem_form.vue index ad87c77e..102dbe5f 100644 --- a/src/views/enm_base/testItem_form.vue +++ b/src/views/enm_base/testItem_form.vue @@ -43,28 +43,27 @@ - + - - + - - + :value="item.value"/> + - + - + + + From 34838c76b36c803c7618ed55d1a8b153734d097b Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 15:58:29 +0800 Subject: [PATCH 7/7] fix:testitem --- src/views/enm_base/testItem.vue | 46 ++++++++++++++++++++-------- src/views/enm_base/testItem_form.vue | 13 ++++++-- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/views/enm_base/testItem.vue b/src/views/enm_base/testItem.vue index 2a8a1358..90951850 100644 --- a/src/views/enm_base/testItem.vue +++ b/src/views/enm_base/testItem.vue @@ -35,13 +35,31 @@ prop="name" min-width="100" > - + + + + + + + + + + +