This commit is contained in:
Vinjor 2024-10-24 16:43:13 +08:00
parent 222adba081
commit 329fb41324
2 changed files with 83 additions and 22 deletions

View File

@ -200,7 +200,7 @@
<template> <template>
<view v-for="item in ticketInfo.records" :key="item.id" class="projItem"> <view v-for="item in ticketInfo.records" :key="item.id" class="projItem">
<view class="projTop"> <view class="projTop">
<text class="projName">{{ item.typeStr }}{{item.dealUserName}}</text> <text class="projName">{{ item.type }}{{item.dealUserName}}</text>
<!-- <text class="projAmount">${{ item.amount }}</text>--> <!-- <text class="projAmount">${{ item.amount }}</text>-->
</view> </view>
<view class="projBody"> <view class="projBody">
@ -244,10 +244,27 @@
<!-- 普通弹窗---拍照上传 --> <!-- 普通弹窗---拍照上传 -->
<uni-popup ref="popup" background-color="#fff"> <uni-popup ref="popup" background-color="#fff">
<view class="popup-content"> <view class="popup-content">
<view class="dl-avatar-box"> <view v-if="!ifCallCus">
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="最多选择9张图片"></uni-file-picker> <view class="dl-avatar-box">
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="最多选择9张图片"></uni-file-picker>
</view>
<button type="primary" @click="saveWorkingItem">保存</button>
</view>
<view v-else>
<view class="formItem">
<view class="formLabel">姓名</view>
<view class="formContainer">
<input placeholder="请填写联系人姓名" v-model="callServiceInfo.name" type="text"/>
</view>
</view>
<view class="formItem">
<view class="formLabel">手机号</view>
<view class="formContainer">
<input placeholder="请填写联系人联系方式" v-model="callServiceInfo.tel" type="number"/>
</view>
</view>
<button type="primary" @click="saveWorkingItem">通知客户取车</button>
</view> </view>
<button type="primary" @click="saveWorkingItem">保存</button>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@ -353,7 +370,14 @@ export default {
// constructor: [] // constructor: []
// } // }
], ],
submitData:[] submitData:[],
//
ifCallCus:false,
//
callServiceInfo:{
name:"",
tel:""
},
}; };
}, },
onLoad(data) { onLoad(data) {
@ -451,13 +475,26 @@ export default {
data:dataObj data:dataObj
}).then((res) => { }).then((res) => {
}) })
}else if("callCus"==this.nowChooseOperate){
//
let dataObj = {
id: this.ticketInfo.id,
name:this.callServiceInfo.name,
mobile:this.callServiceInfo.tel,
}
request({
url: '/admin-api/repair/tickets/noticeCus',
method: 'POST',
data:dataObj
}).then((res) => {
})
} }
this.$refs.popup.close() this.$refs.popup.close()
uni.showToast({ uni.showToast({
title: '操作成功', title: '操作成功',
icon: 'none' icon: 'none'
}) })
if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate){ if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate || "callCus"==this.nowChooseOperate){
//| //|
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
@ -483,15 +520,23 @@ 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 && "05"==this.ticketInfo.ticketsStatus){ if(this.ticketInfo.nowRepairId==this.loginUser.id){
// //
this.content.push({ if("05"==this.ticketInfo.ticketsStatus) {
text: '出厂检验', active: false,code:"out" this.content.push({
}) text: '出厂检验', active: false, code: "out"
this.content.push({ })
text: '通知取车', active: false,code:"callCus" }
}) if("07"==this.ticketInfo.ticketsStatus){
//
this.content.push({
text: '通知取车', active: false,code:"callCus"
})
}
} }
//
this.callServiceInfo.name = this.loginUser.nickname
this.callServiceInfo.tel = this.loginUser.mobile
} }
if(this.loginUser.roleCodes.includes("weixiu")){ if(this.loginUser.roleCodes.includes("weixiu")){
// //
@ -544,6 +589,8 @@ export default {
* 操作按钮点击事件 * 操作按钮点击事件
*/ */
trigger(e) { trigger(e) {
//
this.ifCallCus = false
console.log(e) console.log(e)
this.content[e.index].active = !e.item.active this.content[e.index].active = !e.item.active
this.nowChooseOperate = e.item.code this.nowChooseOperate = e.item.code
@ -559,6 +606,10 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: '/pages-repair/apply/applyForm?ticketId='+this.ticketId url: '/pages-repair/apply/applyForm?ticketId='+this.ticketId
}) })
}else if("callCus"==e.item.code){
//
this.ifCallCus = true
this.$refs.popup.open("bottom")
} }
// uni.showModal({ // uni.showModal({
// title: '', // title: '',
@ -685,15 +736,9 @@ export default {
} else { } else {
resultObj.birthday = '未知' resultObj.birthday = '未知'
} }
// //
if (null != resultObj.records){ if (null != resultObj.records){
resultObj.records.map((item)=>{ resultObj.records.map((item)=>{
getDictTextByCodeAndValue("repair_records_type",item.type).then(value => {
item.typeStr = value
}).catch(error => {
item.typeStr = "未知"
console.error(error);
});
item.createTime = formatTimestamp(item.createTime) item.createTime = formatTimestamp(item.createTime)
}) })
} }
@ -1225,5 +1270,18 @@ export default {
color: #FFFFFF; color: #FFFFFF;
} }
} }
.formItem {
padding: 40rpx 0;
margin: 0 32rpx;
border-bottom: 1rpx solid #EEEEEE;
}
.formLabel {
font-weight: 500;
font-size: 28rpx;
color: #333333;
padding-bottom: 20rpx;
}
} }
</style> </style>

View File

@ -42,11 +42,14 @@ export function getOrderStatusText(ticketsStatus,workStatus){
//维修中 //维修中
str = "维修中" str = "维修中"
}else if("01"==ticketsStatus){ }else if("01"==ticketsStatus){
//待结算 //待取车结算
str = "待结算" str = "待取车结算"
}else if("06"==ticketsStatus){ }else if("06"==ticketsStatus){
//挂单/记账 //挂单/记账
str = "挂单/记账" str = "挂单/记账"
}else if("07"==ticketsStatus){
//待通知客户取车
str = "待通知客户取车"
}else if("02"==ticketsStatus){ }else if("02"==ticketsStatus){
//已结账 //已结账
str = "已结账" str = "已结账"