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 @@