维修工单详情
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-19 16:29:20
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-19 17:15:09
|
||||
* @LastEditTime: 2026-05-19 17:39:23
|
||||
*/
|
||||
import request, {
|
||||
get,
|
||||
@@ -52,13 +52,38 @@ export function getUserTicketlist(data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @typedef TicketMainInfoTyp 维修工单信息
|
||||
* @property {String} id = [工单ID]
|
||||
* @property {String} houseId = [维修房屋ID]
|
||||
* @property {String} houseName = [维修房屋地址]
|
||||
* @property {String} isCheckStr = [状态已读]
|
||||
* @property {String} item = [标题]
|
||||
* @property {String} maintenanceItemId = [维修项目ID]
|
||||
* @property {String} maintenanceItemName = [维修项目名称]
|
||||
* @property {String} manageIsCheck = [管理人员 已读]
|
||||
* @property {String} orderDate = [工单日期]
|
||||
* @property {String} phone = [报修用户 联系方式]
|
||||
* @property {String} problem = [报修描述]
|
||||
* @property {String} problemImageUrl = [报修图片]
|
||||
* @property {String} problemStatus = [报修状态]
|
||||
* @property {String} projectType = [报修项目类型]
|
||||
* @property {String} projectTypeStr = [报修 项目 名称]
|
||||
* @property {String} repairDes = [维修描述]
|
||||
* @property {String} repairId = [维修ID]
|
||||
* @property {String} repairImageUrl = [维修描述]
|
||||
* @property {String} repairIsCheck = [维修人员 已读]
|
||||
* @property {String} residentName = [报修用户名称]
|
||||
* @property {String} residentId = [报修用户ID]
|
||||
* @property {String} repairName = [维修人员名称]
|
||||
*/
|
||||
/**
|
||||
* @description: 获取工单详细信息 by id
|
||||
* @param {string} id
|
||||
* @return
|
||||
* @return { Promise<DataResult<TicketMainInfoTyp>>}
|
||||
*/
|
||||
export function getTicketMainById(id) {
|
||||
return get('/manage/repair/order/orderdetail', data)
|
||||
return get('/manage/repair/order/orderdetail', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user