-
- 新增客户信息
- 完善更多客户信息
- 选择业务
-
+
+
+
+
+
用户选择
@@ -30,12 +30,12 @@
-
-
- 车牌
-
-
-
+
+
+
+
+
+
品牌车系
@@ -113,8 +113,8 @@
质保说明
- 终检
- 不终检
+ 终检
+ 不终检
@@ -129,20 +129,19 @@
-
-
-
+
+
+
-
-
- 工单号
-
-
-
-
+
+
+
+
+
+
时间
@@ -188,12 +187,11 @@
- 登记保存
+ 完成
结算
- 完成
- 通知施工
- 领料
- 退料
+
+
+
@@ -208,13 +206,14 @@ import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import TicketItem from "@/views/repair/tickets/Components/TicketItem.vue";
import CarChoose from "@/views/repair/Components/CarChoose.vue";
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
-import {createTickets} from "@/api/repair/tickets/Tickets";
+import {createTickets, getTicketsById} from "@/api/repair/tickets/Tickets";
import RepairAdvice from "@/views/repair/tickets/form/RepairAdvice.vue";
import QualityExplain from "@/views/repair/tickets/form/QualityExplain.vue";
+import TicketChoose from "@/views/repair/tickets/Components/TicketChoose.vue";
export default {
name: "UserInfo",
- components: {QualityExplain, RepairAdvice, CarChoose, TicketItem, StaffChoose, UserChoose},
+ components: {TicketChoose, QualityExplain, RepairAdvice, CarChoose, TicketItem, StaffChoose, UserChoose},
props: {
createTicketType: {
type: Boolean,
@@ -270,6 +269,7 @@ export default {
qualityDay: null,
ticketType: null,
itemList: [],
+ ticketStatus: "01"
},
selectUser: {},
selectCar: {},
@@ -384,6 +384,7 @@ export default {
qualityDay: null,
ticketType: null,
itemList: [],
+ ticketStatus: "01"
}
this.selectUser ={}
this.selectCar = {}
@@ -401,12 +402,12 @@ export default {
// 新增基础信息init
createInit() {
// 生成工单号
- this.formData.ticketNo = createUniqueCodeByHead("GD")
+ this.formData.ticketNo = this.formData.ticketNo || createUniqueCodeByHead("GD")
// 质保说明
this.formData.qualityMileage = this.formData.quality.qualityMileage
this.formData.qualityDay = this.formData.quality.qualityDay
// 选择的用户
- this.formData.userId = this.selectUser?.userId
+ this.formData.userId = this.selectUser?.id
this.formData.userName = this.selectUser?.cusName
this.formData.userMobile = this.selectUser?.phoneNumber
@@ -440,7 +441,7 @@ export default {
const temp = {
...item,
itemName: item.name,
- itemCount: item.count,
+ itemCount: item?.count,
itemUnit: item.unit,
itemPrice: item.price,
itemDiscount: item.discount,
@@ -471,6 +472,23 @@ export default {
return temp;
})
},
+ // 查看工单
+ async getTickets(id){
+ try {
+ const res = await getTicketsById(id)
+ const data= res.data
+ this.formData = {
+ ...data,
+ quality: {qualityMileage: data.qualityMileage, qualityDay: data.qualityDay}
+ }
+ const itemList = this.formData.itemList
+ this.selectUser = {id: data.userId}
+ this.selectCar = {id: data.carId}
+ this.projectList = [itemList.find(item => item.itemType === '01')]
+ this.partList = [itemList.find(item => item.itemType === '02')]
+ this.otherList = [itemList.find(item => item.itemType === '03')]
+ }catch{}
+ }
}
}