From d4b1884849bb8cc7cf774dabd75f3c5941dfddba Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Sat, 21 Sep 2024 20:42:56 +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/api/repair/other/index.js | 29 +++ src/api/repair/tickets/Tickets.js | 8 + src/utils/dict.js | 2 + src/views/repair/Components/CarChoose.vue | 10 +- src/views/repair/Components/OtherChoose.vue | 62 +++++ src/views/repair/Components/PartChoose.vue | 18 +- src/views/repair/Components/ProjectChoose.vue | 63 +++++ src/views/repair/Components/ServerChoose.vue | 1 - src/views/repair/Components/UserChoose.vue | 6 +- src/views/repair/other/OtherForm.vue | 75 ++++++ src/views/repair/other/index.vue | 102 ++++++++ .../tickets/Components/TicketChoose.vue | 71 ++++++ .../repair/tickets/Components/TicketItem.vue | 116 ++++++++-- .../tickets/Components/TicketSearch.vue | 42 ++-- .../repair/tickets/Components/TicketTable.vue | 217 ++++++++++-------- .../repair/tickets/Components/UserInfo.vue | 84 ++++--- 16 files changed, 745 insertions(+), 161 deletions(-) create mode 100644 src/api/repair/other/index.js create mode 100644 src/views/repair/Components/OtherChoose.vue create mode 100644 src/views/repair/Components/ProjectChoose.vue create mode 100644 src/views/repair/other/OtherForm.vue create mode 100644 src/views/repair/other/index.vue create mode 100644 src/views/repair/tickets/Components/TicketChoose.vue diff --git a/src/api/repair/other/index.js b/src/api/repair/other/index.js new file mode 100644 index 0000000..9b75613 --- /dev/null +++ b/src/api/repair/other/index.js @@ -0,0 +1,29 @@ +import request from '@/utils/request' + +const preUrl = "/repair/other" + +// 分页 +export function getOtherPage(params){ + return request({ + url: preUrl + "/page", + method: "get", + params + }) +} + +// 新增、修改 +export function updateOther(data){ + return request({ + url: preUrl + "/update", + method: "post", + data + }) +} + +// 删除 +export function deleteOther(id){ + return request({ + url: preUrl + "/delete?id=" + id, + method: "delete" + }) +} diff --git a/src/api/repair/tickets/Tickets.js b/src/api/repair/tickets/Tickets.js index 69557c2..4abf587 100644 --- a/src/api/repair/tickets/Tickets.js +++ b/src/api/repair/tickets/Tickets.js @@ -19,3 +19,11 @@ export function getTicketsPage(params){ params }) } + +// 查看单个工单 +export function getTicketsById(id){ + return request({ + url: preUrl + "/get?id=" + id, + method: "get" + }) +} diff --git a/src/utils/dict.js b/src/utils/dict.js index eb9e85e..c6fbb38 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -204,6 +204,8 @@ export const DICT_TYPE = { REPAIR_WARES_DATA_FORM: 'wares_data_form', //维修工单状态 REPAIR_TICKETS_STATUS: 'repair_tickets_status', + //维修工单配件状态 + REPAIR_PART_STATUS: 'repair_part_status', // ---------会员相关---------member_coupon_type,member_coupon_out_rule,member_car,member_active //卡券类型 diff --git a/src/views/repair/Components/CarChoose.vue b/src/views/repair/Components/CarChoose.vue index 3dd5fce..0d83f5d 100644 --- a/src/views/repair/Components/CarChoose.vue +++ b/src/views/repair/Components/CarChoose.vue @@ -22,15 +22,17 @@ export default { }, watch: { carSelected(val) { - const car = this.carList.find(item => item.id === val); - this.$emit('input', car); + if (val) { + const car = this.carList.find(item => item.id === val); + this.$emit('input', car); + } }, value(val) { this.carSelected = val ? val.id : null; }, cusName(val, old) { - if (val !== old){ - this.carSelected = null + if (val !== old) { + // this.carSelected = null this.getCarList() } } diff --git a/src/views/repair/Components/OtherChoose.vue b/src/views/repair/Components/OtherChoose.vue new file mode 100644 index 0000000..64cf251 --- /dev/null +++ b/src/views/repair/Components/OtherChoose.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/views/repair/Components/PartChoose.vue b/src/views/repair/Components/PartChoose.vue index a86780a..bed5bf9 100644 --- a/src/views/repair/Components/PartChoose.vue +++ b/src/views/repair/Components/PartChoose.vue @@ -1,7 +1,7 @@