From ef139f50bb486e5a7750f2d144952950a6b70419 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Thu, 24 Oct 2024 20:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=BE=E9=97=AE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=8F=96=E8=BD=A6=E5=89=8D=E7=9A=84=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E7=BC=96=E8=BE=91=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/repair/tickets/Tickets.js | 9 + src/api/repair/tickets/TicketsItem.js | 25 ++ .../repair/tickets/Components/TicketItem.vue | 16 +- .../tickets/Components/TicketItemShow.vue | 96 ++++- src/views/repair/tickets/form/EditTickets.vue | 342 +++++++++++++++++- .../tickets/form/TicketFinishManager.vue | 25 +- 6 files changed, 480 insertions(+), 33 deletions(-) diff --git a/src/api/repair/tickets/Tickets.js b/src/api/repair/tickets/Tickets.js index 4df93e4..1babdd4 100644 --- a/src/api/repair/tickets/Tickets.js +++ b/src/api/repair/tickets/Tickets.js @@ -149,3 +149,12 @@ export function noticeCus(data){ data }) } + +// 新增工单子项 +export function addItems(data){ + return request({ + url: preUrl + "/addItems", + method: 'post', + data + }) +} diff --git a/src/api/repair/tickets/TicketsItem.js b/src/api/repair/tickets/TicketsItem.js index 5d6ae96..868a03c 100644 --- a/src/api/repair/tickets/TicketsItem.js +++ b/src/api/repair/tickets/TicketsItem.js @@ -18,3 +18,28 @@ export function getProjectList(ticketId){ method: 'get' }) } + +// 查看单个维修子表的数据 +export function getItemById(id){ + return request({ + url: preUrl + "/getById?id=" + id, + method: 'get' + }) +} + +// 修改单个工单子项的内容 +export function updateById(data){ + return request({ + url: preUrl + "/updateById", + method: 'post', + data + }) +} + +// 维修工单单个子项 +export function removeItemById(id){ + return request({ + url: preUrl + "/removeById?id=" + id, + method: 'delete' + }) +} diff --git a/src/views/repair/tickets/Components/TicketItem.vue b/src/views/repair/tickets/Components/TicketItem.vue index b8e49db..297d3ce 100644 --- a/src/views/repair/tickets/Components/TicketItem.vue +++ b/src/views/repair/tickets/Components/TicketItem.vue @@ -1,6 +1,6 @@ diff --git a/src/views/repair/tickets/form/EditTickets.vue b/src/views/repair/tickets/form/EditTickets.vue index 32fd63b..1e5dab2 100644 --- a/src/views/repair/tickets/form/EditTickets.vue +++ b/src/views/repair/tickets/form/EditTickets.vue @@ -1,28 +1,350 @@ diff --git a/src/views/repair/tickets/form/TicketFinishManager.vue b/src/views/repair/tickets/form/TicketFinishManager.vue index 251d382..9aed402 100644 --- a/src/views/repair/tickets/form/TicketFinishManager.vue +++ b/src/views/repair/tickets/form/TicketFinishManager.vue @@ -44,7 +44,7 @@ 查看 - + 编辑工单 @@ -97,20 +97,6 @@ - - - - - - - - @@ -140,6 +126,7 @@ + @@ -148,10 +135,11 @@ import {getPageByRole, inspection, confirm, noticeCus} from "@/api/repair/ticket import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue"; import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue"; import {getUserProfile} from "@/api/system/user"; +import EditTickets from "@/views/repair/tickets/form/EditTickets.vue"; export default { name: "TicketFinishManager", - components: {UpdateRepair, TicketsShow}, + components: {EditTickets, UpdateRepair, TicketsShow}, props:{ userRole: String }, @@ -176,14 +164,12 @@ export default { formRules:{}, formLoading:{}, noticeData:{ - time: [], name: null, mobile: null, id: null, remark: null, }, noticeRules:{ - time: [{required: true, message: '时间不能为空', trigger: 'blur'}], mobile: [{required: true, message: '联系电话不能为空', trigger: 'blur'}] }, noticeLoading: false, @@ -283,6 +269,9 @@ export default { this.$modal.msgSuccess("操作成功") await this.getList() }catch {} + }, + handleEdit(row){ + this.$refs.editTickets.open(row) } } }