<route lang="json5" type="page">
|
{
|
layout: 'default',
|
needLogin: true,
|
style: {
|
navigationBarTitleText: '维修评价',
|
'app-plus': {
|
titleNView: {
|
buttons: [
|
{
|
text: '提交',
|
fontSize: '14px',
|
color: '#FFFFFF',
|
},
|
{
|
text: '',
|
fontSize: '14px',
|
color: '#FFFFFF',
|
},
|
],
|
},
|
},
|
},
|
}
|
</route>
|
<template>
|
<view class="bg-base">
|
<wd-card type="rectangle">
|
<template #title>
|
<view class="flex items-center menu-title-box">
|
<view class="menu-indicator"></view>
|
<view class="ml-1 text-xs">维修概览</view>
|
</view>
|
</template>
|
<wd-steps :active="repairRecordList.length" vertical class="px-4">
|
<wd-step v-for="(item,index) in repairRecordList" >
|
<template #title>
|
<view class="flex items-center menu-title-box">
|
<view class="ml-1 text-xs">{{ item?.operaResult }}</view>
|
</view>
|
</template>
|
<template #description>
|
<view class="flex items-center menu-title-box">
|
<view class="ml-1 text-xs">{{ item?.operaUserName }}</view>
|
<view class="ml-1 text-xs">{{ item?.handleTime }}</view>
|
</view>
|
</template>
|
</wd-step>
|
|
</wd-steps>
|
</wd-card>
|
|
<wd-cell-group use-slot border>
|
<template #title>
|
<view class="flex items-center menu-title-box">
|
<view class="menu-indicator"></view>
|
<view class="ml-1 text-xs">维修概览</view>
|
</view>
|
</template>
|
<wd-cell title="维修满意度">
|
<wd-rate v-model="repairFb.repairSatisfaction" change="handleChange"></wd-rate>
|
</wd-cell>
|
<wd-cell title="维修及时性">
|
<wd-rate v-model="repairFb.repairTimeliness" change="handleChange"></wd-rate>
|
</wd-cell>
|
<wd-cell title="维修及态度">
|
<wd-rate v-model="repairFb.serviceAttitude" change="handleChange"></wd-rate>
|
</wd-cell>
|
<wd-cell title="维修现场6S">
|
<wd-rate v-model="repairFb.repairSs" change="handleChange"></wd-rate>
|
</wd-cell>
|
|
<wd-textarea
|
label="结果反馈"
|
label-width="200rpx"
|
type="textarea"
|
v-model="repairFb.fbResult"
|
auto-height
|
:maxlength="200"
|
show-word-limit
|
placeholder="请输入结果反馈"
|
clearable
|
/>
|
<wd-textarea
|
label="意见或建议"
|
label-width="200rpx"
|
type="textarea"
|
v-model="repairFb.suggestions"
|
auto-height
|
:maxlength="200"
|
show-word-limit
|
placeholder="请输入意见或建议"
|
clearable
|
/>
|
</wd-cell-group>
|
</view>
|
</template>
|
<script setup lang="ts">
|
import { getRepairRes, getRepairFb, getRepairRecordList } from '@/service/repair'
|
import { reactive } from 'vue'
|
import { RepairResVO, RepairFbVO, RepairRecordVO } from '@/service/repair.d'
|
|
const repairRes = reactive<RepairResVO>({
|
id: '',
|
resCode: '',
|
reqType: '',
|
reqDesc: '',
|
equName: '',
|
assetNo: '',
|
fixtureName: '',
|
resReason: '',
|
status: '',
|
resHandle: '',
|
resPrevent: '',
|
fbId: '',
|
remark: '',
|
})
|
|
const repairFb = reactive<RepairFbVO>({
|
id: '',
|
resCode: '',
|
fbResult: '',
|
suggestions: '',
|
repairSatisfaction: 0,
|
repairTimeliness: 0,
|
serviceAttitude: 0,
|
repairSs: 0,
|
})
|
|
const repairRecordList = ref<RepairRecordVO[]>([])
|
|
function handleChange({ value }) {
|
console.log(value)
|
}
|
|
function getRepairRecord() {
|
if(!repairRes.id){
|
return false
|
}
|
const params = {
|
resId: repairRes.id,
|
}
|
getRepairRecordList(params)
|
.then((res: any) => {
|
console.error(res)
|
if(res?.code === 200){
|
repairRecordList.value = res?.rows?.sort((a, b) => {
|
if (a.handleTime < b.handleTime) {
|
return -1
|
}
|
if (a.handleTime > b.handleTime) {
|
return 1
|
}
|
return 0
|
})
|
}
|
})
|
.catch((res) => {})
|
}
|
|
|
function initRepairRes(id: any) {
|
getRepairRes(id)
|
.then((res: any) => {
|
Object.assign(repairRes, res)
|
if (repairRes.fbId != null) {
|
getFeedBack(repairRes.fbId)
|
}
|
getRepairRecord()
|
})
|
.catch((res) => {})
|
}
|
|
function getFeedBack(id: any) {
|
getRepairFb(id)
|
.then((res: any) => {
|
Object.assign(repairFb, res)
|
})
|
.catch((res) => {})
|
}
|
async function initData(options: any) {
|
initRepairRes(options.id)
|
|
}
|
|
onLoad((options) => {
|
initData(options)
|
})
|
</script>
|
|
<style scoped lang="scss">
|
.menu-indicator {
|
width: 6rpx;
|
height: 24rpx;
|
border-radius: 10rpx;
|
background-color: $uni-color-primary;
|
}
|
</style>
|