描述:报修

This commit is contained in:
SelfRidicule 2024-08-08 09:16:37 +08:00
parent 42ba79b626
commit 1abeb66086
6 changed files with 67 additions and 28 deletions

View File

@ -11,3 +11,11 @@ export function dispatcherListRq(data) {
data
});
}
// 报修详情
export function reportDetailRq(id) {
return request({
url: `/repair/get/` + id,
method: "get",
});
}

View File

@ -1,5 +1,10 @@
const app = getApp()
import {
reportDetailRq
} from "../../../../api/repair/distributionCase.js"
Page({
/**
@ -7,37 +12,51 @@ Page({
*/
data: {
IMG_NAME: app.IMG_NAME,
id: '',
detail: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('onLoad', options);
let _this = this
_this.setData({
...options
})
_this.getDetail(options.id)
},
back(){
back() {
wx.navigateBack()
},
getDetail(id) {
reportDetailRq(id).then(res=>{
console.log("reportDetailRq" , res);
let detail = res.data
})
},
// 确认损坏
jumpAffirm(){
// 确认损坏
jumpAffirm() {
wx.navigateTo({
url: '/pages/reportRepair/assign/affirm/affirm',
url: '/pages/reportRepair/assign/affirm/affirm',
})
},
// 提交反馈
jumpFeedback(){
jumpFeedback() {
wx.navigateTo({
url: '/pages/reportRepair/assign/feedback/feedback',
url: '/pages/reportRepair/assign/feedback/feedback',
})
},
// 无效
invalid(){
invalid() {
wx.navigateBack()
},

View File

@ -131,7 +131,7 @@ Page({
userId,
pageNum,
pageSize,
statusValue : status
statusValue: status
}
// 查询数据
dispatcherListRq(param).then(res => {
@ -179,15 +179,15 @@ Page({
// 格式化数据
return dataList.map(item => {
let repairImages = item.repairImages
if(repairImages){
if (repairImages) {
let fileList = JSON.parse(repairImages)
let file = fileList.find(item=> checkIsImg(item.url))
if(file){
let file = fileList.find(item => checkIsImg(item.url))
if (file) {
item.visibleImg = file.url
}else{
} else {
item.visibleImg = '/profile/static/repair/index/noneImg.png'
}
}else{
} else {
item.visibleImg = '/profile/static/repair/index/noneImg.png'
}
return item;
@ -204,9 +204,11 @@ Page({
},
// 跳转-详情
jumpDetail() {
jumpDetail(e) {
console.log('detail', e);
let id = e.currentTarget.dataset.obj.id
wx.navigateTo({
url: '/pages/reportRepair/assign/detail/detail',
url: '/pages/reportRepair/assign/detail/detail?id=' + id,
})
},

View File

@ -24,7 +24,7 @@
</van-tab>
<van-tab title="待派单">
<view class="itemView" wx:for="{{pendingOrderDataList}}" wx:for-item="item" wx:key="*this" bind:tap="jumpDetail">
<view class="itemView" wx:for="{{pendingOrderDataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
<view class="topTitle">编号: T123123123</view>
<view class="selfLine"></view>
<view class="centerView">
@ -40,11 +40,11 @@
<view class="bottomView">
<view class="name">
<van-icon name="manager-o" size="28rpx" color="#4e96f8"/>
王军18300011120
{{item.userName}}18300011120
</view>
<view class="time">
<van-icon name="calendar-o" size="30rpx" color="#4e96f8"/>
2024-01-01 12:12:00
{{item.createTime}}
</view>
</view>
</view>

View File

@ -549,6 +549,16 @@ Page({
if (!detail.area) {
_this.showErrMsg('请输入门牌号!')
return;
}
// 联系电话
if (!detail.phone) {
_this.showErrMsg('请输入联系电话!')
return;
}
// 报修人姓名
if (!detail.name) {
_this.showErrMsg('请输入报修人姓名!')
return;
}
// 故障描述
if (!detail.content) {

View File

@ -16,14 +16,6 @@
<view class="label must">故障类型</view>
<van-field value="{{ typeName }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" border="{{ false }}" input-align="right" bind:tap="showType" />
</view>
<view class="rowView">
<view class="label ">联系电话</view>
<van-field value="{{ detail.phone }}" bind:input="fieldInput" data-name="phone" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label ">报修人姓名</view>
<van-field value="{{ detail.name }}" bind:input="fieldInput" data-name="name" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">故障地点</view>
<van-field value="{{ addressName }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" border="{{ false }}" input-align="right" bind:tap="showAddress" />
@ -32,6 +24,14 @@
<view class="label must">门牌号</view>
<van-field value="{{ detail.area }}" bind:input="fieldInput" data-name="area" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">联系电话</view>
<van-field value="{{ detail.phone }}" bind:input="fieldInput" data-name="phone" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">报修人姓名</view>
<van-field value="{{ detail.name }}" bind:input="fieldInput" data-name="name" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowColumnView">
<view class="label must">故障描述</view>
<view class="contentView">