维修工单详情

This commit is contained in:
Zy
2026-05-19 18:25:10 +08:00
parent abc8086ad0
commit 0de58216f0
2 changed files with 124 additions and 54 deletions

View File

@@ -16,12 +16,15 @@
</view>
<view class="flex justify-between">
<span class="subtitle">{{ data.desc }}</span>
<span class="subtime" v-if="currentStep > index">2026/08/01 10:30:35</span>
<span class="subtime" v-if="currentStep == index + 1">{{
repairInfo.updateTime
}}</span>
</view>
</view>
</template>
</Stops>
</view>
<view class="info">
<view class="info_title">
<text>保修信息</text>
@@ -36,19 +39,19 @@
<view class="item">
<view class="label"> <text>维修项目</text> </view>
<view class="value">
<text>{{ repairInfo.repairProject }} </text>
<text>{{ repairInfo.maintenanceItemName }} </text>
</view>
</view>
<view class="item">
<view class="label"> <text>标题</text> </view>
<view class="value">
<text> {{ repairInfo.title }}</text>
<text> {{ repairInfo.item }}</text>
</view>
</view>
<view class="item descrition">
<view class="label"> <text>问题描述</text> </view>
<view class="value">
<text>{{ repairInfo.descrtion }}</text>
<text>{{ repairInfo.problem }}</text>
</view>
</view>
<view class="item">
@@ -60,14 +63,14 @@
<view class="item">
<view class="label"> <text>报修时间</text> </view>
<view class="value">
<text> {{ repairInfo.time }} </text>
<text> {{ repairInfo.createTime }} </text>
</view>
</view>
<view class="item photobox">
<view class="label"> <text>问题照片</text> </view>
<view class="value">
<view class="value" v-if="problemImageUrl.length > 0">
<image
v-for="(item, index) in repairInfo.photo"
v-for="(item, index) in problemImageUrl"
:key="index"
class="images"
:src="item"
@@ -78,37 +81,44 @@
</view>
</view>
<view class="info" v-if="(currentStep >= 2 && prevPath === 'hall') || currentStep > 2">
<view
class="info"
v-if="
(currentStep >= 2 && prevPath === 'hall') || (currentStep >= 2 && prevPath === 'myticket')
"
>
<view class="info_title">
<text>维修信息</text>
</view>
<view class="info_body">
<view class="item">
<view class="label"> <text>姓名</text> </view>
<view class="value"> {{ repairInfo.repairUser.name }} </view>
<view class="value"> {{ repairInfo.repairName }} </view>
</view>
<view class="item">
<view class="label"> <text>状态</text> </view>
<view class="value"> {{ repairInfo.repairUser.status }} </view>
<view class="value"> {{ repairInfo.problemStatus }} </view>
</view>
<view class="item">
<view class="label"> <text>角色</text> </view>
<view class="value"> {{ repairInfo.repairUser.role }} </view>
<!-- <view class="value"> {{ repairInfo.repairUser.role }} </view> -->
</view>
<view class="item">
<view class="label"> <text>手机号</text> </view>
<view class="value"> {{ repairInfo.repairUser.phone }} </view>
<!-- <view class="value"> {{ repairInfo.repairUser.phone }} </view> -->
</view>
<view class="" v-if="currentStep >= 3">
<view class="item descrition flex-col">
<view class="label"> <text>问题描述</text> </view>
<view class="value"> {{ repairInfo.repairUser.descrtion }} </view>
<view class="value" v-if="repairInfo.repairDes && repairInfo.repairDes.trim()">
{{ repairInfo.repairDes }}
</view>
</view>
<view class="item photobox">
<view class="label"> <text>问题照片</text> </view>
<view class="value">
<view class="value" v-if="repairImageUrl.length > 0">
<image
v-for="(item, index) in repairInfo.repairUser.photo"
v-for="(item, index) in repairImageUrl"
:key="index"
class="images"
:src="item"
@@ -137,47 +147,52 @@ import { getTicketMainById } from '@/api/ticket.js'
// --------------------------------------
/** 维修步骤:0提交 1分配 2维修完成 / 待解决 3记录完成 完成*/
const currentStep = ref(2)
// 步骤数据
const stepList = ref([
{ title: '提交维修信息', desc: '提交报修成功', time: '2026/08/01 10:30:26' },
{ title: '待分配', desc: '等待物业派单中', time: '2026/08/01 10:32:21' },
{ title: '维修/待解决', desc: '维修人员进行维修', time: '2026/08/01 10:38:07' },
{ title: '维修完成', desc: '填写维修记录', time: '2026/08/01 10:40:33' }
{ title: '提交维修信息', desc: '等待提交报修' },
{ title: '待分配', desc: '等待物业派单中' },
{ title: '待解决', desc: '等待维修人员' },
{ title: '维修完成', desc: '填写维修记录' }
])
// --------------------------------------
const queryParams = ref({
id: null
})
// 展示 button
const Showbtn = ref(false)
// 上一个页面地址
const prevPath = ref('')
// 工单信息
const repairInfo = ref({
houseName: '桂花园(别墅)2号楼2层',
repairProject: '照明-路灯',
title: '1栋楼下道路灯不亮了',
descrtion: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
phone: '15688888888',
time: '2023-08-01 15:30',
photo: [
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80'
],
repairUser: {
name: '盘下但',
status: '正常',
role: '维修人员',
phone: '15688888888',
descrtion: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
photo: [
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80'
]
}
createTime: null,
houseId: null,
houseName: '',
id: '',
isCheckStr: null,
item: '',
maintenanceItemId: '',
maintenanceItemName: '',
manageIsCheck: '',
orderDate: '',
phone: '',
problem: '',
problemImageUrl: '',
problemStatus: '1',
projectType: null,
projectTypeStr: '',
repairDes: '',
repairId: '',
repairImageUrl: '',
repairIsCheck: '',
repairName: '',
residentId: '',
residentName: '',
updateTime: ''
})
// 报修图片
const problemImageUrl = ref([])
// 维修图片
const repairImageUrl = ref([])
onLoad(options => {
queryParams.value.id = options.id
@@ -191,7 +206,16 @@ onShow(() => {
function getTicketById() {
getTicketMainById(queryParams.value.id)
.then(res => {
console.log(res)
repairInfo.value = res.data
problemImageUrl.value = repairInfo.value.problemImageUrl
? repairInfo.value.problemImageUrl.split(',')
: []
repairImageUrl.value = repairInfo.value.repairImageUrl
? repairInfo.value.repairImageUrl.split(',')
: []
handleStop(res.data)
})
.catch(err => {
console.log(err)
@@ -199,6 +223,27 @@ function getTicketById() {
}
// --------------------------------------
function handleStop(row) {
// 0 已提交 1 已分配 2已解决
let status = row.problemStatus
// 维修步骤:0提交 1分配 2维修完成 / 待解决 3记录完成 完成
if (status === '0') {
currentStep.value = 1
stepList.value[0].desc = '提交报修成功'
} else if (status === '1') {
currentStep.value = 2
stepList.value[1].title = '已派单'
stepList.value[1].desc = '物业已派单'
stepList.value[2].title = '待解决'
stepList.value[2].desc = `维修人员(${row.repairName})维修中`
} else if (status === '2') {
currentStep.value = 4
stepList.value[2].title = '已解决'
stepList.value[2].desc = `维修人员(${row.repairName})已解决`
} else {
currentStep.value = 0
}
}
/** 选择维修人员 */
function handleSelecthouse() {
uni.navigateTo({
@@ -254,12 +299,12 @@ function handleRepairCompluted() {
}
.subtitle {
font-weight: 400;
font-size: 24rpx;
font-size: 22rpx;
line-height: 40rpx;
}
.subtime {
font-weight: 400;
font-size: 24rpx;
font-size: 22rpx;
color: #999999;
line-height: 40rpx;
}
@@ -330,7 +375,7 @@ function handleRepairCompluted() {
font-size: 28rpx;
color: #222222;
line-height: 36rpx;
width: 45%;
width: 35%;
}
.value {
flex: 1;