1
This commit is contained in:
parent
ec0c028ff7
commit
84b4e6e9a3
@ -63,9 +63,6 @@
|
|||||||
<!-- <view @click="doOrder(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='04' && roleCanSg" class="btn qc">-->
|
<!-- <view @click="doOrder(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='04' && roleCanSg" class="btn qc">-->
|
||||||
<!-- 开始施工-->
|
<!-- 开始施工-->
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<view v-if="order.ticketsStatus == '06' && roleCanQc" class="btn qc">
|
|
||||||
告知取车
|
|
||||||
</view>
|
|
||||||
<view v-if="userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection')" @click="doVoid(order)" class="btn pg">
|
<view v-if="userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection')" @click="doVoid(order)" class="btn pg">
|
||||||
<!-- 在什么都不能操作的情况下,可以查看详情-->
|
<!-- 在什么都不能操作的情况下,可以查看详情-->
|
||||||
作废
|
作废
|
||||||
|
@ -560,7 +560,7 @@ export default {
|
|||||||
this.ticketType = event.detail.value;
|
this.ticketType = event.detail.value;
|
||||||
},
|
},
|
||||||
|
|
||||||
getCarList() {
|
getCarList(carId) {
|
||||||
const params = {
|
const params = {
|
||||||
userId: this.userInfo.userId,
|
userId: this.userInfo.userId,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -606,17 +606,23 @@ export default {
|
|||||||
break
|
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) {
|
editCarInfo(index) {
|
||||||
bus.$off('updateCarInfo')
|
bus.$off('updateCarInfo')
|
||||||
bus.$on('updateCarInfo', (carInfo) => {
|
bus.$on('updateCarInfo', (carId) => {
|
||||||
if (index) {
|
this.$nextTick(()=>{
|
||||||
this.carList[index] = carInfo
|
//重新查车辆信息
|
||||||
} else {
|
this.getCarList(carId)
|
||||||
this.carList.push(carInfo)
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
if (this.userInfo == null) {
|
if (this.userInfo == null) {
|
||||||
//弹窗提示请选择客户
|
//弹窗提示请选择客户
|
||||||
|
@ -479,17 +479,17 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if((item.itemPrice && item.itemPrice>0) && (item.itemCount && item.itemCount>0) && (item.itemDiscount && item.itemDiscount>0 && item.itemDiscount<=1)){
|
//不校验项目金额、折扣、数量必填,但是为null的设置为0
|
||||||
//数据符合要求重新计算
|
if(!item.itemPrice){
|
||||||
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
item.itemPrice = 0
|
||||||
}else{
|
|
||||||
canSubmit=false
|
|
||||||
uni.showToast({
|
|
||||||
title: '维修项目'+item.itemName+'价格有误!',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
if(!item.itemCount){
|
||||||
|
item.itemCount = 0
|
||||||
|
}
|
||||||
|
if(!item.itemDiscount){
|
||||||
|
item.itemDiscount = 1
|
||||||
|
}
|
||||||
|
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//APP暂时不修改配件的信息--
|
//APP暂时不修改配件的信息--
|
||||||
@ -598,7 +598,7 @@ export default {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
})
|
})
|
||||||
}else if("callCus"==this.nowChooseOperate){
|
}else if("callCus"==this.nowChooseOperate){
|
||||||
//服务顾问通知客户取车
|
//服务顾问通知客户取车,
|
||||||
let dataObj = {
|
let dataObj = {
|
||||||
id: this.ticketInfo.id,
|
id: this.ticketInfo.id,
|
||||||
name:this.callServiceInfo.name,
|
name:this.callServiceInfo.name,
|
||||||
@ -642,8 +642,7 @@ export default {
|
|||||||
if(this.loginUser.roleCodes.includes("service_advisor")){
|
if(this.loginUser.roleCodes.includes("service_advisor")){
|
||||||
//服务顾问
|
//服务顾问
|
||||||
this.canOpenCus = true
|
this.canOpenCus = true
|
||||||
if(this.ticketInfo.nowRepairId==this.loginUser.id){
|
//服务顾问可以进行出厂检验 和通知客户取车
|
||||||
//当前用户就是处理人,可以进行出厂检验 和通知客户取车
|
|
||||||
if("05"==this.ticketInfo.ticketsStatus) {
|
if("05"==this.ticketInfo.ticketsStatus) {
|
||||||
this.content.push({
|
this.content.push({
|
||||||
text: '出厂检验', active: false, code: "out"
|
text: '出厂检验', active: false, code: "out"
|
||||||
@ -655,7 +654,6 @@ export default {
|
|||||||
text: '通知取车', active: false,code:"callCus"
|
text: '通知取车', active: false,code:"callCus"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//设置服务顾问默认的姓名联系方式
|
//设置服务顾问默认的姓名联系方式
|
||||||
this.callServiceInfo.name = this.loginUser.nickname
|
this.callServiceInfo.name = this.loginUser.nickname
|
||||||
this.callServiceInfo.tel = this.loginUser.mobile
|
this.callServiceInfo.tel = this.loginUser.mobile
|
||||||
|
@ -130,6 +130,7 @@
|
|||||||
import VNavigationBar from '@/components/VNavigationBar.vue';
|
import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
|
import {bus} from "@/utils/eventBus";
|
||||||
import upload from "@/utils/upload";
|
import upload from "@/utils/upload";
|
||||||
import {getDictByCode} from "@/utils/utils";
|
import {getDictByCode} from "@/utils/utils";
|
||||||
|
|
||||||
@ -177,6 +178,7 @@ export default {
|
|||||||
//可选车辆性质范围
|
//可选车辆性质范围
|
||||||
natureList: [],
|
natureList: [],
|
||||||
natureIndex: 0,
|
natureIndex: 0,
|
||||||
|
index:null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -194,6 +196,7 @@ export default {
|
|||||||
url: config.baseImageUrl + this.car.carLicenseImg
|
url: config.baseImageUrl + this.car.carLicenseImg
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.index = options.index
|
||||||
} else {
|
} else {
|
||||||
// 没有数据 需要赋值一下初始化
|
// 没有数据 需要赋值一下初始化
|
||||||
this.bo1 = false;
|
this.bo1 = false;
|
||||||
@ -303,8 +306,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
async submit() {
|
async submit() {
|
||||||
|
|
||||||
// bus.$emit('updateCarInfo', this.car)
|
|
||||||
this.car.brandAndModel = [this.brandId, this.car.carModel]
|
this.car.brandAndModel = [this.brandId, this.car.carModel]
|
||||||
//将日期转为时间戳
|
//将日期转为时间戳
|
||||||
if (this.car.nextInspectionDate) {
|
if (this.car.nextInspectionDate) {
|
||||||
@ -329,6 +330,7 @@ export default {
|
|||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: this.car,
|
data: this.car,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
bus.$emit('updateCarInfo',this.car.id)
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user