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) } } }