This commit is contained in:
Vinjor 2024-10-18 22:20:10 +08:00
parent 0ed86df78b
commit cceb78d499
2 changed files with 44 additions and 47 deletions

View File

@ -54,7 +54,7 @@
<view @click="doOrder(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='04' && roleCanSg" class="btn qc">
开始施工
</view>
<view @click="gotoDetail" v-if="order.ticketsStatus == '06' && roleCanQc" class="btn qc">
<view v-if="order.ticketsStatus == '06' && roleCanQc" class="btn qc">
告知取车
</view>
<view @click="gotoDetail" class="btn pg">
@ -164,17 +164,12 @@ export default {
doOrder(id){
this.$emit('startWork',id);
},
gotoDetail() {
uni.navigateTo({
url: '/pages-order/orderDetail/orderDetail?id=' + this.order.id + '&isDetail=' + '1'
})
},
/**
* 查看详情
*/
viewDetail() {
gotoDetail() {
uni.navigateTo({
url: '/pages-order/orderDetail/orderDetail?id=' + this.order.id
url: '/pages-order/orderDetail/orderDetail?id=' + this.order.id + '&isDetail=' + '1'
})
},
/**

View File

@ -2,7 +2,7 @@
<view class="container">
<view class="containerBody">
<VNavigationBar background-color="#fff" title="工单详情" title-color="#333"></VNavigationBar>
<view class="body">
<view class="body" v-if="null!=ticketInfo">
<view class="card cardInfo carCard">
<view :class="{'end': ticketInfo.ticketsStatus == '02'}" class="orderFlag">
<template>
@ -24,7 +24,7 @@
<view class="carTitle">车辆信息</view>
<view class="carDetail">
<view class="carHeader">
<image :src="imgUrlPrex + ticketInfo.carInfo.logoImg" class="carImage" mode="aspectFill"></image>
<image v-show="ticketInfo.carInfo.logoImg" :src="imgUrlPrex + ticketInfo.carInfo.logoImg" class="carImage" mode="aspectFill"></image>
<view class="carHeaderRight">
<text class="carNumber">{{ ticketInfo.carNo }}</text>
<text class="carType">{{ ticketInfo.carBrandName }}</text>
@ -122,9 +122,9 @@
<view class="projEditLine1">
<text>{{ item.itemName }}</text>
<text class="projAmount">{{ item.itemMoney }}</text>
<text v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" class="projAmount">{{ item.itemMoney }}</text>
</view>
<view class="projBaseInfo">
<view class="projBaseInfo" v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" >
<view>规格{{item.project.spec}}</view>
<view>售价{{ item.itemPrice }}</view>
<view>数量{{ item.itemCount }}</view>
@ -261,7 +261,7 @@ export default {
// role: 'yewu',
ticketId: '',
//
ticketInfo: {},
ticketInfo: null,
carInfo: {},
userInfo: {},
loginUser:{},
@ -337,37 +337,38 @@ export default {
method: 'get',
params:{id:this.ticketId}
}).then((res)=>{
this.ticketInfo = res.data;
this.ticketInfo.statusStr = getOrderStatusText(res.data.ticketsStatus)
let resultObj = res.data
resultObj.statusStr = getOrderStatusText(res.data.ticketsStatus)
//
if (null != this.ticketInfo.carInfo.carRegisterDate){
this.ticketInfo.carRegisterDate = formatDate(this.ticketInfo.carInfo.carRegisterDate)
if (null != resultObj.carInfo.carRegisterDate){
resultObj.carRegisterDate = formatDate(resultObj.carInfo.carRegisterDate)
}
//
if (null != this.ticketInfo.carInfo.inspectionDate){
this.ticketInfo.inspectionDate = formatDate(this.ticketInfo.carInfo.inspectionDate)
if (null != resultObj.carInfo.inspectionDate){
resultObj.inspectionDate = formatDate(resultObj.carInfo.inspectionDate)
} else {
this.ticketInfo.inspectionDate = '未知'
resultObj.inspectionDate = '未知'
}
//
if (null != this.ticketInfo.carInfo.insuranceDate) {
this.ticketInfo.insuranceDate = formatDate(this.ticketInfo.carInfo.insuranceDate)
if (null != resultObj.carInfo.insuranceDate) {
resultObj.insuranceDate = formatDate(resultObj.carInfo.insuranceDate)
} else {
this.ticketInfo.insuranceDate = '未知'
resultObj.insuranceDate = '未知'
}
//
if (null != this.ticketInfo.customerInfo.birthday) {
this.ticketInfo.birthday = formatDate(this.ticketInfo.customerInfo.birthday)
if (null != resultObj.customerInfo.birthday) {
resultObj.birthday = formatDate(resultObj.customerInfo.birthday)
} else {
this.ticketInfo.birthday = '未知'
resultObj.birthday = '未知'
}
//
if (null != this.ticketInfo.records){
this.ticketInfo.records.map((item)=>{
if (null != resultObj.records){
resultObj.records.map((item)=>{
item.typeStr = getDictTextByCodeAndValue('repair_records_type',item.type)
item.createTime = formatTimestamp(item.createTime)
})
}
this.ticketInfo = resultObj
})
},
@ -470,6 +471,25 @@ export default {
}
.cardInfo {
.noReviewPart {
padding: 10rpx 36rpx 10rpx 36rpx;
display: flex;
align-items: center;
column-gap: 10rpx;
margin-top: 10rpx;
background: #FFF6E7;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-weight: 500;
font-size: 28rpx;
color: #E8A321;
.messageText {
flex: 1;
width: 0;
}
}
&.none {
position: relative;
display: flex;
@ -664,25 +684,6 @@ export default {
}
}
.noReviewPart {
padding: 10rpx 36rpx 10rpx 10rpx;
display: flex;
align-items: center;
column-gap: 10rpx;
margin-top: 10rpx;
background: #FFF6E7;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-weight: 500;
font-size: 28rpx;
color: #E8A321;
.messageText {
flex: 1;
width: 0;
}
}
.projEditItem {
padding: 0 20rpx;
background: #F2F2F7;
@ -774,6 +775,7 @@ export default {
flex-direction: column;
row-gap: 30rpx;
margin: 0 30rpx;
padding-bottom: 10rpx;
}
}