diff --git a/components/orderCard.vue b/components/orderCard.vue
index 0cf19d9..7e876a4 100644
--- a/components/orderCard.vue
+++ b/components/orderCard.vue
@@ -63,9 +63,6 @@
-
- 告知取车
-
作废
diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue
index 616b78c..98a5207 100644
--- a/pages-order/addOrder/addOrder.vue
+++ b/pages-order/addOrder/addOrder.vue
@@ -29,10 +29,10 @@
-
-
+
+
- 添加车辆信息
+ 添加车辆信息
@@ -98,8 +98,8 @@
-
- 添加客户信息
+
+ 客户信息
@@ -338,11 +338,6 @@ export default {
this.initDict("repair_part_disposal")
},
onShow() {
- if (this.phone != '') {
- setTimeout(() => {
- this.listUserInfo()
- }, 500)
- }
},
methods: {
@@ -565,7 +560,7 @@ export default {
this.ticketType = event.detail.value;
},
- getCarList() {
+ getCarList(carId) {
const params = {
userId: this.userInfo.userId,
pageNo: 1,
@@ -611,17 +606,23 @@ export default {
break
}
}
+ }else if(carId){
+ for (let i = 0; i < this.carList.length; i++) {
+ if (carId == this.carList[i].id) {
+ this.activeCarIndex = i
+ break
+ }
+ }
}
})
},
editCarInfo(index) {
bus.$off('updateCarInfo')
- bus.$on('updateCarInfo', (carInfo) => {
- if (index) {
- this.carList[index] = carInfo
- } else {
- this.carList.push(carInfo)
- }
+ bus.$on('updateCarInfo', (carId) => {
+ this.$nextTick(()=>{
+ //重新查车辆信息
+ this.getCarList(carId)
+ })
})
if (this.userInfo == null) {
//弹窗提示请选择客户
@@ -634,7 +635,14 @@ export default {
url: `/pages/myCar/carDetail?car=${index >= 0 ? encodeURIComponent(JSON.stringify(this.carList[index])) : ''}&userInfo=${encodeURIComponent(JSON.stringify(this.userInfo))}`
});
}
-
+ },
+ /**
+ * 添加车辆和客户信息
+ */
+ addCarUserInfo(){
+ uni.navigateTo({
+ url: `/pages/myCar/addCarUser`
+ })
},
editUserInfo(userInfo) {
if (this.phone == '') return uni.showToast({
diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue
index 11951e0..57b2c01 100644
--- a/pages-order/orderDetail/orderDetail.vue
+++ b/pages-order/orderDetail/orderDetail.vue
@@ -120,7 +120,7 @@
-
+
{{ item.itemName }}
¥{{ item.itemMoney }}
@@ -479,17 +479,17 @@ export default {
})
return
}
- if((item.itemPrice && item.itemPrice>0) && (item.itemCount && item.itemCount>0) && (item.itemDiscount && item.itemDiscount>0 && item.itemDiscount<=1)){
- //数据符合要求重新计算
- item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
- }else{
- canSubmit=false
- uni.showToast({
- title: '维修项目'+item.itemName+'价格有误!',
- icon: 'none'
- })
- return
+ //不校验项目金额、折扣、数量必填,但是为null的设置为0
+ if(!item.itemPrice){
+ item.itemPrice = 0
}
+ if(!item.itemCount){
+ item.itemCount = 0
+ }
+ if(!item.itemDiscount){
+ item.itemDiscount = 1
+ }
+ item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
})
}
//APP暂时不修改配件的信息--
@@ -598,7 +598,7 @@ export default {
}).then((res) => {
})
}else if("callCus"==this.nowChooseOperate){
- //服务顾问通知客户取车
+ //服务顾问通知客户取车,
let dataObj = {
id: this.ticketInfo.id,
name:this.callServiceInfo.name,
@@ -610,14 +610,27 @@ export default {
data:dataObj
}).then((res) => {
})
+ }else if("over"==this.nowChooseOperate){
+ //服务顾问交车
+ let dataObj = {
+ id: this.ticketInfo.id,
+ remark: "交车",
+ image: fileStr
+ }
+ request({
+ url: '/admin-api/repair/tickets/overOrder',
+ method: 'POST',
+ data:dataObj
+ }).then((res) => {
+ })
}
this.$refs.popup.close()
uni.showToast({
title: '操作成功',
icon: 'none'
})
- if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate || "callCus"==this.nowChooseOperate || "out"==this.nowChooseOperate){
- //移交总检需要返回| 总检拍照后需要返回
+ if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate || "callCus"==this.nowChooseOperate || "out"==this.nowChooseOperate || "over"==this.nowChooseOperate){
+ //移交总检需要返回| 总检拍照后需要返回 | 服务顾问交车后返回
setTimeout(() => {
uni.navigateBack()
},500)
@@ -642,8 +655,7 @@ export default {
if(this.loginUser.roleCodes.includes("service_advisor")){
//服务顾问
this.canOpenCus = true
- if(this.ticketInfo.nowRepairId==this.loginUser.id){
- //当前用户就是处理人,可以进行出厂检验 和通知客户取车
+ //服务顾问可以进行出厂检验 和通知客户取车
if("05"==this.ticketInfo.ticketsStatus) {
this.content.push({
text: '出厂检验', active: false, code: "out"
@@ -655,7 +667,12 @@ export default {
text: '通知取车', active: false,code:"callCus"
})
}
- }
+ if("06"==this.ticketInfo.ticketsStatus || "02"==this.ticketInfo.ticketsStatus ){
+ //工单状态是已结算或者挂账,可以交车
+ this.content.push({
+ text: '交车', active: false,code:"over"
+ })
+ }
//设置服务顾问默认的姓名联系方式
this.callServiceInfo.name = this.loginUser.nickname
this.callServiceInfo.tel = this.loginUser.mobile
@@ -720,8 +737,8 @@ export default {
console.log(e)
this.content[e.index].active = !e.item.active
this.nowChooseOperate = e.item.code
- if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code || "other"==e.item.code || "check"==e.item.code || "out"==e.item.code){
- //维修过程中拍照上传、阶段完成、移交其他班组、移交总检、出厂检验
+ if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code || "other"==e.item.code || "check"==e.item.code || "out"==e.item.code || "over"==e.item.code){
+ //维修过程中拍照上传、阶段完成、移交其他班组、移交总检、出厂检验、交车
this.fileList=[]
this.$refs.popup.open("bottom")
}else if("start" == e.item.code){
diff --git a/pages-repair/sign/sign.vue b/pages-repair/sign/sign.vue
index f3d0646..9217be4 100644
--- a/pages-repair/sign/sign.vue
+++ b/pages-repair/sign/sign.vue
@@ -92,7 +92,7 @@
},
bgColor: { //背景色
type: String,
- default: ''
+ default: '#ffffff'
},
},
onLoad(data) {
diff --git a/pages.json b/pages.json
index f1248f3..403e450 100644
--- a/pages.json
+++ b/pages.json
@@ -34,6 +34,12 @@
"navigationBarTitleText": ""
}
},
+ {
+ "path": "pages/myCar/addCarUser",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
{
"path": "pages/my/register",
"style": {
diff --git a/pages/myCar/addCarUser.vue b/pages/myCar/addCarUser.vue
new file mode 100644
index 0000000..f947c48
--- /dev/null
+++ b/pages/myCar/addCarUser.vue
@@ -0,0 +1,530 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ natureList[natureIndex].value}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/myCar/carDetail.vue b/pages/myCar/carDetail.vue
index 9cae93c..2405dab 100644
--- a/pages/myCar/carDetail.vue
+++ b/pages/myCar/carDetail.vue
@@ -130,6 +130,7 @@
import VNavigationBar from '@/components/VNavigationBar.vue';
import request from "@/utils/request";
import config from '@/config'
+import {bus} from "@/utils/eventBus";
import upload from "@/utils/upload";
import {getDictByCode} from "@/utils/utils";
@@ -177,6 +178,7 @@ export default {
//可选车辆性质范围
natureList: [],
natureIndex: 0,
+ index:null,
};
},
onLoad(options) {
@@ -194,6 +196,7 @@ export default {
url: config.baseImageUrl + this.car.carLicenseImg
})
}
+ this.index = options.index
} else {
// 没有数据 需要赋值一下初始化
this.bo1 = false;
@@ -303,8 +306,6 @@ export default {
},
// 新增
async submit() {
-
- // bus.$emit('updateCarInfo', this.car)
this.car.brandAndModel = [this.brandId, this.car.carModel]
//将日期转为时间戳
if (this.car.nextInspectionDate) {
@@ -329,6 +330,7 @@ export default {
method: 'PUT',
data: this.car,
}).then(res => {
+ bus.$emit('updateCarInfo',this.car.id)
uni.navigateBack();
})
} else {
diff --git a/uni_modules/uni-steps/components/uni-steps/uni-steps.vue b/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
index 6117006..1a84b71 100644
--- a/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
+++ b/uni_modules/uni-steps/components/uni-steps/uni-steps.vue
@@ -32,7 +32,7 @@
v-for="(item,index) in options" :key="index" :style="{height: direction === 'column'?heightArr[index]+'px':'14px'}">
+ >
@@ -278,7 +278,7 @@
.uni-steps__column-line {
width: 1px;
- background-color: #B7BDC6;
+ //background-color: #B7BDC6;
}
.uni-steps__row-line--after {
diff --git a/utils/utils.js b/utils/utils.js
index 9122e26..b4aaac1 100644
--- a/utils/utils.js
+++ b/utils/utils.js
@@ -46,13 +46,16 @@ export function getOrderStatusText(ticketsStatus,workStatus){
str = "待取车结算"
}else if("06"==ticketsStatus){
//挂单/记账
- str = "挂单/记账"
+ str = "已挂单/记账待交车"
}else if("07"==ticketsStatus){
//待通知客户取车
str = "待通知客户取车"
+ }else if("08"==ticketsStatus){
+ //已交车
+ str = "已交车"
}else if("02"==ticketsStatus){
//已结账
- str = "已结账"
+ str = "已结账待交车"
}else if("03"==ticketsStatus){
//已作废
str = "已作废"