This commit is contained in:
SelfRidicule 2024-08-14 12:00:14 +08:00
parent eb8f4d0c3d
commit fbd901a3e7
2 changed files with 31 additions and 4 deletions

View File

@ -1,5 +1,10 @@
const app = getApp() const app = getApp()
import {
getDetailRq,
getStatusName
} from "../../../../api/repair/repair.js"
Page({ Page({
/** /**
@ -7,19 +12,41 @@ Page({
*/ */
data: { data: {
IMG_NAME: app.IMG_NAME, IMG_NAME: app.IMG_NAME,
id: '',
detail: {},
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log('onLoad', options);
let _this = this
_this.setData({
...options
})
_this.getDetail(options.id)
}, },
back(){ back(){
wx.navigateBack() wx.navigateBack()
}, },
getDetail(id) {
let _this = this
getDetailRq({
id
}).then(res => {
console.log("getDetailRq", res);
// 详情
let detail = res.repair
detail.statusName = getStatusName(detail.status)
_this.setData({
detail,
})
})
},
// 确认损坏 // 确认损坏
jumpAffirm(){ jumpAffirm(){

View File

@ -16,9 +16,9 @@
<view class="mainView"> <view class="mainView">
<view class="statusView"> <view class="statusView">
<view class="label">YG123081273812</view> <view class="label">{{detail.sn}}</view>
<view class="time">空调</view> <view class="time">{{detail.typeName + '/' + detail.deviceName}}</view>
<view class="tag">待审核</view> <view class="tag">{{detail.statusName}}</view>
</view> </view>
<view class="reportView"> <view class="reportView">