diff --git a/src/views/repair/tickets/Components/TicketItemShow.vue b/src/views/repair/tickets/Components/TicketItemShow.vue
index be26ca7..692bbab 100644
--- a/src/views/repair/tickets/Components/TicketItemShow.vue
+++ b/src/views/repair/tickets/Components/TicketItemShow.vue
@@ -31,14 +31,10 @@
-
-
- {{scope.row.itemDiscount === 1 ? "无折扣" : scope.row.itemDiscount}}
-
-
+
-
+
@@ -68,7 +64,7 @@
-
+
diff --git a/src/views/repair/tickets/Components/TicketTable.vue b/src/views/repair/tickets/Components/TicketTable.vue
index 2eaaabb..187f53f 100644
--- a/src/views/repair/tickets/Components/TicketTable.vue
+++ b/src/views/repair/tickets/Components/TicketTable.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/src/views/repair/tickets/Components/TicketWares.vue b/src/views/repair/tickets/Components/TicketWares.vue
index 474c941..2f7cef1 100644
--- a/src/views/repair/tickets/Components/TicketWares.vue
+++ b/src/views/repair/tickets/Components/TicketWares.vue
@@ -62,7 +62,8 @@
查看
审核
diff --git a/src/views/repair/tickets/Components/TicketWaresShow.vue b/src/views/repair/tickets/Components/TicketWaresShow.vue
index 6007a9b..39df452 100644
--- a/src/views/repair/tickets/Components/TicketWaresShow.vue
+++ b/src/views/repair/tickets/Components/TicketWaresShow.vue
@@ -71,11 +71,31 @@
+
+
+
+ 配件申请表
+
+
+
+
+
+
+
+
@@ -94,14 +114,19 @@
-
-
- °
+
+
+ √
-
+
+
+ √
+
+
+
- °
+ √
@@ -113,14 +138,19 @@
-
-
- °
+
+
+ √
-
+
+
+ √
+
+
+
- °
+ √
@@ -129,11 +159,13 @@
+
+
@@ -144,10 +176,12 @@ import {listTwItem, updateIsShow} from "@/api/repair/tickets/TWItem";
import DiscountInput from "@/views/repair/tickets/Components/DiscountInput.vue";
import item from "@/layout/components/Sidebar/Item.vue";
import {DICT_TYPE} from "@/utils/dict";
+import TWOperate from "@/views/repair/tickets/form/TWOperate.vue";
+import TWIAdd from "@/views/repair/tickets/Components/TWIAdd.vue";
export default {
name: "TicketWaresShow",
- components: {DiscountInput},
+ components: {TWIAdd, DiscountInput},
props: {
userRole: String,
type: Boolean
@@ -168,10 +202,21 @@ export default {
clickCellMap: {},
editProp: ['wares.price'],
dialogLoading: null,
- selectRow:[]
+ selectRow:[],
+ imageUrls: []
}
},
methods: {
+ handleSuccess(){
+ this.open(this.formData)
+ },
+ handleAddWares(){
+ this.dialogVisible = false
+ this.$refs.twiAdd.open(this.formData)
+ },
+ getImages(images){
+ this.imageUrls = images.split(",").map(item => process.env.VUE_APP_FILE_API + item)
+ },
async open(row) {
try {
this.dialogVisible = true
@@ -186,6 +231,9 @@ export default {
this.queryParams.twId = row.id
await this.getTwItem()
}
+ if (this.formData.images){
+ this.getImages(this.formData.images)
+ }
} finally {
this.dialogLoading.close()
}
@@ -194,15 +242,17 @@ export default {
try {
this.loading = true
const res = await listTwItem(this.queryParams)
- this.items = res.data
- this.items = [...this.items.map(item => {
- return {
- ...item,
- itemDiscount: 1,
+ if (res.data && res.data.length > 0){
+ this.items = res.data
+ this.items = [...this.items.map(item => {
+ return {
+ ...item,
+ itemDiscount: 1,
+ }
+ })]
+ if (this.type){
+ this.items = [...this.items.filter(item => item.waresStatus === "")]
}
- })]
- if (this.type){
- this.items = [...this.items.filter(item => item.waresStatus === "")]
}
} finally {
this.loading = false
diff --git a/src/views/repair/tickets/Components/TicketsShow.vue b/src/views/repair/tickets/Components/TicketsShow.vue
index 6f09554..743c870 100644
--- a/src/views/repair/tickets/Components/TicketsShow.vue
+++ b/src/views/repair/tickets/Components/TicketsShow.vue
@@ -174,12 +174,12 @@
材料信息
@@ -199,6 +199,29 @@
+
+
+
+
+ 合计
+
+
+
+
+
+ 总数量
+
+ {{ totalCount }}
+
+
+
+ 总金额
+
+ {{ totalMoney}}
+
+
+
+
@@ -212,7 +235,7 @@ import {getTicketsById, updateShow} from "@/api/repair/tickets/Tickets";
export default {
name: "TicketsShow",
- props:{
+ props: {
userRole: String
},
components: {TicketItemShow},
@@ -222,23 +245,44 @@ export default {
info: {},
projects: [],
wares: [],
- others: []
+ others: [],
+ allList: [],
+ totalCount: 0,
+ totalMoney: 0
}
},
methods: {
async open(row) {
+ this.reset()
const res = await getTicketsById(row.id)
- const data = res.data.items
- this.projects = data.filter(item => item.project)
- this.wares = data.filter(item => item.ware)
- this.others = data.filter(item => item.other)
+ this.allList = res.data.items
+ this.computed()
+ this.projects = this.allList.filter(item => item.project)
+ this.wares = this.allList.filter(item => item.ware)
+ this.others = this.allList.filter(item => item.other)
this.info = row
this.dialogVisible = true
},
- async changeShow(){
+ async changeShow() {
try {
await updateShow(this.info.id, this.info.partShow)
- }catch {}
+ } catch {
+ }
+ },
+ reset() {
+ this.info = {}
+ this.projects = []
+ this.wares = []
+ this.others = []
+ this.allList = []
+ },
+ computed(){
+ this.totalCount = 0
+ this.totalMoney = 0
+ if (this.allList && this.allList.length > 0){
+ this.totalCount = this.allList.reduce((acc, cur) => {return acc + cur.itemCount}, 0)
+ this.totalMoney = this.allList.reduce((acc, cur) => {return acc + cur.itemMoney}, 0)
+ }
}
}
}
diff --git a/src/views/repair/tickets/Components/UserInfo.vue b/src/views/repair/tickets/Components/UserInfo.vue
index ad1703b..7a81d9f 100644
--- a/src/views/repair/tickets/Components/UserInfo.vue
+++ b/src/views/repair/tickets/Components/UserInfo.vue
@@ -556,7 +556,7 @@ export default {
}
this.selectUser = {}
this.selectCar = {}
- this.selectStaff = {}
+ // this.selectStaff = {}
this.projectList = []
this.partList = []
this.otherList = []
@@ -619,7 +619,7 @@ export default {
case "03":
message += "其他:"
}
- this.$modal.msgError(message + item.itemName + (!item.repairIds ? "施工人员" : "销售人员") + "不能为空")
+ this.$modal.msgError(message + item.itemName + (!item.repairIds ? "施工人员" : "服务顾问") + "不能为空")
count++
}
})
diff --git a/src/views/repair/tickets/form/TWOperate.vue b/src/views/repair/tickets/form/TWOperate.vue
index a04a408..56b7d1a 100644
--- a/src/views/repair/tickets/form/TWOperate.vue
+++ b/src/views/repair/tickets/form/TWOperate.vue
@@ -1,120 +1,120 @@
-
-
-
-
- 工单信息
-
-
-
-
-
-
- 订单编号
-
- {{ info.ticketNo }}
-
-
-
- 维修类别
-
-
-
-
-
- 状态
-
-
-
-
-
- 客户名称
-
- {{ info.userName }}
-
-
-
- 车牌号
-
- {{ info.carNo }}
-
-
-
- 车系
-
- {{ info.carBrandName }}
-
-
-
- 手机号
-
- {{ info.userMobile }}
-
-
-
- 创建时间
-
- {{ parseTime(info.createTime, '{y}-{m}-{d}') }}
-
-
-
- 预计完工
-
- {{ parseTime(info.outTime, '{y}-{m}-{d}') }}
-
-
-
- 合计金额
-
- {{ info.totalPrice }}
-
-
-
- 参考成本
-
- {{ info.cost }}
-
-
-
- 参考毛利
-
- {{ info.profit }}
-
-
-
- 领料状态
-
-
-
-
-
- 服务顾问
-
- {{ info.adviserName }}
-
-
-
- 所属门店
-
- {{ info.corpId }}
-
-
-
- 工单状态
-
-
-
-
-
- 备注
-
- {{ info.remark }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -130,7 +130,6 @@
-
@@ -168,6 +167,19 @@
+
+
+
+
+
+ 上传配件申请单
+
+
+
+
+
+
+