From 4336b6e9141f2544363f4880fbd0d67f095e7074 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期六, 19 八月 2023 19:53:39 +0800 Subject: [PATCH] 面板需求 --- src/components/bomDialog.vue | 43 +++++++++++++++---------------------------- 1 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/components/bomDialog.vue b/src/components/bomDialog.vue index 64afbd2..a7804d1 100644 --- a/src/components/bomDialog.vue +++ b/src/components/bomDialog.vue @@ -58,9 +58,16 @@ </template> <script> -import { addMaterial, updateMaterial } from "@/api/ProductiveTask/inventory"; -import { getCodeStandardList } from "@/api/basic/standard"; +import { getCodeStandardList } from "@/api/basic/standard"; +import { + NetworkCard, + getMiniDictList, + addMiniDict, + deleteMiniDict, + updateMiniDict, + sendProcessParams +} from "@/api/home/index"; export default { name: "", props: { @@ -131,11 +138,13 @@ watch: { editDialogVisible(newVal){ if(newVal){ - this.BomTableData=this.workList; + this.BomTableData= JSON.parse( + JSON.stringify(this.workList)) } }, workList(newVal){ - this.BomTableData=this.workList; + this.BomTableData=JSON.parse( + JSON.stringify(this.workList)) } }, mounted() { @@ -145,6 +154,7 @@ this.BomTableData.push({name:'',isDefault:false}); }, handleDelete(id) { + this.BomTableData=this.BomTableData.filter(i=>{ return i.id!=id }) @@ -203,30 +213,7 @@ this.$emit('handleConfirmSave',this.BomTableData) } }, - async validate() { - try { - if (this.flag == "add") - this.form.id = this.codenumberList.replace(/,/g, ""); - this.form.explain = this.explain; - let fn = this.flag == "set" ? updateMaterial : addMaterial; - const res = await fn(this.form); - this.shutdown(); - this.$sucessSet('sucessSet') - if(res.code==200){ - this.$message({ - message: this.flag == "set"?'淇敼鎴愬姛锛�':'娣诲姞鎴愬姛锛�', - type: "success", - }); - } - - } catch (err) { - console.log(err); - this.$message({ - message: err.message.data.data, - type: "warning", - }); - } - }, + shutdown() { this.editDialogVisible = false; -- Gitblit v1.8.0