From 37d1d4f4a45ee4c25137d748b96710be821d4293 Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Wed, 25 Sep 2024 18:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/repair/project/form/RepairProjectForm.vue | 8 ++++---- src/views/repair/tickets/Components/TicketItem.vue | 12 +++++++----- src/views/repair/wares/WaresForm.vue | 12 ++++++------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/views/repair/project/form/RepairProjectForm.vue b/src/views/repair/project/form/RepairProjectForm.vue index 8f2a6bf..c2e3994 100644 --- a/src/views/repair/project/form/RepairProjectForm.vue +++ b/src/views/repair/project/form/RepairProjectForm.vue @@ -18,12 +18,12 @@ - + - + @@ -197,14 +197,14 @@ export default { await RepairProjectApi.updateRepairProject(data); this.$modal.msgSuccess("修改成功"); this.dialogVisible = false; - this.$emit('success', this.formData.name); + this.$emit('success'); return; } // 添加的提交 const res = await RepairProjectApi.createRepairProject(data); this.$modal.msgSuccess("新增成功"); this.dialogVisible = false; - this.$emit('success',res.data); + this.$emit('success', this.formData.name); } finally { this.formLoading = false; } diff --git a/src/views/repair/tickets/Components/TicketItem.vue b/src/views/repair/tickets/Components/TicketItem.vue index 6cd385b..e142249 100644 --- a/src/views/repair/tickets/Components/TicketItem.vue +++ b/src/views/repair/tickets/Components/TicketItem.vue @@ -131,7 +131,7 @@ import OtherForm from "@/views/repair/other/OtherForm.vue"; import request from "@/utils/request"; import {getOtherByName} from "@/api/repair/other"; import {getProjectByName} from "@/api/repair/project"; -import {getWares, getWaresByName} from "@/api/repair/wares"; +import {getWaresByName} from "@/api/repair/wares"; export default { name: "TicketItem", @@ -348,20 +348,21 @@ export default { this.list.splice(this.list.length - 1, 0, { ...data, count: 1, - totalPrice: data.price + totalPrice: data.price, + type: null }) } // this.list.push(row) }, async returnPart(name) { - const res = await getWaresByName(name) const data = res.data if (data) { this.list.splice(this.list.length - 1, 0, { ...data, count: 1, - totalPrice: data.price + totalPrice: data.price, + type: null }) } // this.list.push(row) @@ -373,7 +374,8 @@ export default { this.list.splice(this.list.length - 1, 0, { ...data, count: 1, - totalPrice: data.price + totalPrice: data.price, + type: null }) } }, diff --git a/src/views/repair/wares/WaresForm.vue b/src/views/repair/wares/WaresForm.vue index 49e3ceb..df611f9 100644 --- a/src/views/repair/wares/WaresForm.vue +++ b/src/views/repair/wares/WaresForm.vue @@ -55,7 +55,7 @@ - + @@ -73,12 +73,12 @@ - + - + @@ -86,7 +86,7 @@ - + @@ -290,14 +290,14 @@ export default { await WaresApi.updateWares(data); this.$modal.msgSuccess("修改成功"); this.dialogVisible = false; - this.$emit('success', this.formData.name); + this.$emit('success'); return; } // 添加的提交 const res = await WaresApi.createWares(data); this.$modal.msgSuccess("新增成功"); this.dialogVisible = false; - this.$emit('success',res.data); + this.$emit('success',this.formData.name); } finally { this.formLoading = false; }