This commit is contained in:
Vinjor 2024-12-03 11:11:40 +08:00
parent 7d9f7e6005
commit 0b05a021a7
3 changed files with 65 additions and 4 deletions

View File

@ -71,7 +71,7 @@
修改项目 修改项目
</view> </view>
<view @click="editWaresPrice" v-if="userInfo.roleCodes.includes('repair_warehouse')" class="btn pg"> <view @click="editWaresPrice" v-if="userInfo.roleCodes.includes('repair_warehouse')" class="btn pg">
修改价格 配件列表
</view> </view>
<view @click="gotoDetail" class="btn pg"> <view @click="gotoDetail" class="btn pg">
<!-- 在什么都不能操作的情况下可以查看详情--> <!-- 在什么都不能操作的情况下可以查看详情-->

View File

@ -143,6 +143,16 @@
<template> <template>
<view class="userTitle">工单信息</view> <view class="userTitle">工单信息</view>
<view class="userContainer" style="padding-bottom: 20rpx"> <view class="userContainer" style="padding-bottom: 20rpx">
<view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1">
<text class="label">经办人姓名</text>
<input type="text" style="text-align: left" v-model="formData.handleName" placeholder="请填写经办人姓名"/>
</view>
<view class="infoItem" style="flex: 1">
<text class="label">经办人电话</text>
<input type="text" style="text-align: left" v-model="formData.handleMobile" placeholder="请填写经办人电话"/>
</view>
</view>
<view style="display: flex;align-items: center"> <view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1"> <view class="infoItem" style="flex: 1">
<text class="label">进场时间</text> <text class="label">进场时间</text>
@ -305,6 +315,8 @@ export default {
formData:{ formData:{
inTime: null, inTime: null,
outTime: null, outTime: null,
handleName: null,
handleMobile: null,
mileageTraveled:null, mileageTraveled:null,
threePackUnits:null, threePackUnits:null,
insuranceName:null, insuranceName:null,
@ -325,6 +337,20 @@ export default {
pageData:{}, pageData:{},
} }
}, },
watch: {
'userInfo': {
handler: function (newVal, oldVal) {
if(!this.formData.handleName){
this.formData.handleName = newVal.cusName
}
if(!this.formData.handleMobile){
this.formData.handleMobile = newVal.phoneNumber
}
console.log('obj changed:', newVal, oldVal)
},
deep: true
}
},
onLoad(data) { onLoad(data) {
this.pageData = data this.pageData = data
this.formData.inTime = formatDate(Date.now()) this.formData.inTime = formatDate(Date.now())

View File

@ -85,6 +85,16 @@
<text class="value">{{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }}</text> <text class="value">{{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }}</text>
</view> </view>
</view> </view>
<view v-if="ticketInfo.userName!=ticketInfo.handleName" style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1">
<text class="label">经办人姓名</text>
<text class="value">{{ ticketInfo.handleName }}</text>
</view>
<view class="infoItem" style="flex: 1">
<text class="label">经办人电话</text>
<text class="value">{{ ticketInfo.handleMobile }}</text>
</view>
</view>
<template v-if="userInfo.showAll"> <template v-if="userInfo.showAll">
<view style="display: flex;align-items: center"> <view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1"> <view class="infoItem" style="flex: 1">
@ -116,7 +126,7 @@
</view> </view>
</view> </view>
<view v-if="ticketInfo.projects && ticketInfo.projects.length > 0" class="card cardInfo projCard"> <view v-if="ticketInfo.projects && ticketInfo.projects.length > 0" class="card cardInfo projCard">
<view class="projTitle">维修项目</view> <view class="projTitle">维修工时项目</view>
<view class="projList"> <view class="projList">
<template> <template>
<view v-for="(item,index) in ticketInfo.projects" :key="item.id" class="projEditItem"> <view v-for="(item,index) in ticketInfo.projects" :key="item.id" class="projEditItem">
@ -183,7 +193,7 @@
</view> </view>
</view> </view>
<view v-if="ticketInfo.waresGroupList && ticketInfo.waresGroupList.length > 0" class="card cardInfo projCard"> <view v-if="ticketInfo.waresGroupList && ticketInfo.waresGroupList.length > 0" class="card cardInfo projCard">
<view class="projTitle">维修配件 <view class="dl-ifcus" v-if="canOpenCus"><text>是否开放给客户</text><switch :checked="ticketInfo.partShow == '1'" style="transform:scale(0.7)" @change="toPartShow" /></view></view> <view class="projTitle">更换配件清单 <view class="dl-ifcus" v-if="canOpenCus"><text>是否开放给客户</text><switch :checked="ticketInfo.partShow == '1'" style="transform:scale(0.7)" @change="toPartShow" /></view></view>
<view class="projList"> <view class="projList">
<uni-collapse ref="collapse" > <uni-collapse ref="collapse" >
<uni-collapse-item v-for="(groupItem,groupIndex) in ticketInfo.waresGroupList" :key="groupItem.groupId" :title="groupItem.groupName+'('+groupItem.nums+'类配件,合计:'+groupItem.totalAmount+'元)'" > <uni-collapse-item v-for="(groupItem,groupIndex) in ticketInfo.waresGroupList" :key="groupItem.groupId" :title="groupItem.groupName+'('+groupItem.nums+'类配件,合计:'+groupItem.totalAmount+'元)'" >
@ -870,8 +880,33 @@ export default {
}, },
phone(){ phone(){
let that = this
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.ticketInfo.userMobile phoneNumber: that.ticketInfo.userMobile,
success: function (res) {
console.log('拨号成功', res);
//
let dataObj = {
id: that.ticketInfo.id,
name:that.ticketInfo.userName
}
request({
url: '/admin-api/repair/tickets/noticeCus',
method: 'POST',
data:dataObj
}).then((res) => {
setTimeout(() => {
uni.navigateBack()
},500)
})
},
fail: function (err) {
if (err.errMsg.includes('cancel')) {
console.log('用户取消拨号');
} else {
console.log('拨号失败', err);
}
}
}); });
}, },