mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化代码
This commit is contained in:
parent
f5099d5ecf
commit
ba15a2ea7a
@ -357,3 +357,27 @@ export function repairStart(_that,_data){
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复评价
|
||||||
|
* @param {Object} _that 上下文对象
|
||||||
|
* @param {Object} _data 请求报文
|
||||||
|
*/
|
||||||
|
export function replyRepairAppraise(_data,_that){
|
||||||
|
return new Promise(function(reslove,reject){
|
||||||
|
_that.context.post({
|
||||||
|
url: url.replyRepairAppraise,
|
||||||
|
data:_data,
|
||||||
|
success: function(res) {
|
||||||
|
reslove(res.data);
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
wx.showToast({
|
||||||
|
title: "服务器异常了",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -10,6 +10,8 @@ export default {
|
|||||||
listMyEnteredCommunitys: baseUrl + 'app/community.listMyEnteredCommunitys', //查看员工小区
|
listMyEnteredCommunitys: baseUrl + 'app/community.listMyEnteredCommunitys', //查看员工小区
|
||||||
listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查看报修
|
listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查看报修
|
||||||
saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //维修
|
saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //维修
|
||||||
|
replyRepairAppraise: baseUrl + 'app/repair.replyRepairAppraise', //维修
|
||||||
|
|
||||||
queryStaffInfos: baseUrl + 'app/query.staff.infos', //查询员工信息
|
queryStaffInfos: baseUrl + 'app/query.staff.infos', //查询员工信息
|
||||||
changeStaffPwd: baseUrl + 'app/user.changeStaffPwd', //修改密码
|
changeStaffPwd: baseUrl + 'app/user.changeStaffPwd', //修改密码
|
||||||
listAuditHistoryComplaints: baseUrl + 'app/auditUser.listAuditHistoryComplaints', //查询历史单
|
listAuditHistoryComplaints: baseUrl + 'app/auditUser.listAuditHistoryComplaints', //查询历史单
|
||||||
|
|||||||
@ -875,6 +875,14 @@
|
|||||||
"navigationBarTitleText" : "回复评价",
|
"navigationBarTitleText" : "回复评价",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/repairOrder/replyRepairAppraise",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -73,13 +73,13 @@
|
|||||||
<text class="text-grey text-sm">{{repairDetailInfo.context}}</text>
|
<text class="text-grey text-sm">{{repairDetailInfo.context}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.repairPhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.repairPhotos&& repairDetailInfo.repairPhotos.length > 0">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text class="cuIcon-pic text-green"></text>
|
<text class="cuIcon-pic text-green"></text>
|
||||||
<text class="text-grey">业主报修图片</text>
|
<text class="text-grey">业主报修图片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.repairPhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.repairPhotos&&repairDetailInfo.repairPhotos.length > 0">
|
||||||
<!-- <view class="repair-img-title">业主报修图片</view> -->
|
<!-- <view class="repair-img-title">业主报修图片</view> -->
|
||||||
<view class="margin-top grid text-center col-4 grid-square" >
|
<view class="margin-top grid text-center col-4 grid-square" >
|
||||||
<view class="" v-for="(_item,index) in repairDetailInfo.repairPhotos" :key="index">
|
<view class="" v-for="(_item,index) in repairDetailInfo.repairPhotos" :key="index">
|
||||||
@ -87,13 +87,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.beforePhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.beforePhotos&&repairDetailInfo.beforePhotos.length > 0">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text class="cuIcon-pic text-green"></text>
|
<text class="cuIcon-pic text-green"></text>
|
||||||
<text class="text-grey">维修前图片</text>
|
<text class="text-grey">维修前图片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.beforePhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.beforePhotos&&repairDetailInfo.beforePhotos.length > 0">
|
||||||
<!-- <view class="repair-img-title">维修前图片</view> -->
|
<!-- <view class="repair-img-title">维修前图片</view> -->
|
||||||
<view class="margin-top grid text-center col-4 grid-square" >
|
<view class="margin-top grid text-center col-4 grid-square" >
|
||||||
<view class="" v-for="(_item,index) in repairDetailInfo.beforePhotos" :key="index">
|
<view class="" v-for="(_item,index) in repairDetailInfo.beforePhotos" :key="index">
|
||||||
@ -101,13 +101,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.afterPhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.afterPhotos&&repairDetailInfo.afterPhotos.length > 0">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text class="cuIcon-pic text-green"></text>
|
<text class="cuIcon-pic text-green"></text>
|
||||||
<text class="text-grey">维修后图片</text>
|
<text class="text-grey">维修后图片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item" v-if="repairDetailInfo.afterPhotos.length > 0">
|
<view class="cu-item" v-if="repairDetailInfo.afterPhotos&&repairDetailInfo.afterPhotos.length > 0">
|
||||||
<!-- <view class="repair-img-title">维修后图片</view> -->
|
<!-- <view class="repair-img-title">维修后图片</view> -->
|
||||||
<view class="margin-top grid text-center col-4 grid-square" >
|
<view class="margin-top grid text-center col-4 grid-square" >
|
||||||
<view class="" v-for="(_item,index) in repairDetailInfo.afterPhotos" :key="index">
|
<view class="" v-for="(_item,index) in repairDetailInfo.afterPhotos" :key="index">
|
||||||
@ -117,18 +117,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="cu-timeline margin-top">
|
<view class="cu-timeline margin-top">
|
||||||
<view class="cu-time">工单</view>
|
<view class="cu-time">工单</view>
|
||||||
<view class="cu-item " v-for="(item,index) in staffs" :key="index">
|
<view class="cu-item " v-for="(item,index) in staffs" :key="index">
|
||||||
<view class="bg-cyan content">
|
<view class="bg-cyan content">
|
||||||
<text>{{item.startTime}} </text> 到达 {{item.staffName}} 工位 - {{item.stateName}}
|
<text>{{item.startTime}} </text> 到达 {{item.staffName}} 工位 - {{item.stateName}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="bg-cyan content" v-if="item.endTime != undefined">
|
|
||||||
<text>{{item.endTime}} </text> 处理完成
|
|
||||||
</view> -->
|
|
||||||
<view class="bg-cyan content" v-if="item.endTime != undefined">
|
<view class="bg-cyan content" v-if="item.endTime != undefined">
|
||||||
<text>处理意见:</text> {{item.context}}
|
<text>处理意见:</text> {{item.context}}
|
||||||
<block v-if="item.state == '12000' && item.payTypeName != undefined">
|
<block v-if="item.state == '12000' && item.payTypeName != undefined">
|
||||||
@ -140,6 +134,12 @@
|
|||||||
<text>处理意见:</text> {{item.context}}
|
<text>处理意见:</text> {{item.context}}
|
||||||
<block v-if="item.payTypeName != undefined">({{item.payTypeName}})</block>
|
<block v-if="item.payTypeName != undefined">({{item.payTypeName}})</block>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="item.state == '10007'" class="flex justify-between margin-top-sm">
|
||||||
|
<view></view>
|
||||||
|
<view class="rob-order text-df text-white bg-green text-center" @click="_replyRepairAppraise(item)">
|
||||||
|
回复
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -245,10 +245,6 @@
|
|||||||
}
|
}
|
||||||
let _data = _json.data;
|
let _data = _json.data;
|
||||||
_that.repairDetailInfo = _data[0];
|
_that.repairDetailInfo = _data[0];
|
||||||
// let dateStr = _that.repairDetailInfo.appointmentTime;
|
|
||||||
// let _date = new Date(dateStr.replace(/-/g, "/"));
|
|
||||||
// _that.repairDetailInfo.appointmentTime = (_date.getMonth() + 1) + '-' + _date.getDate();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: function(e) {
|
fail: function(e) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
@ -268,10 +264,20 @@
|
|||||||
closeViewImage: function() {
|
closeViewImage: function() {
|
||||||
this.viewImage = false;
|
this.viewImage = false;
|
||||||
},
|
},
|
||||||
|
_replyRepairAppraise:function(_repairUser){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/repairOrder/replyRepairAppraise?ruId=" + _repairUser.ruId + '&repairId=' + _repairUser.repairId
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.rob-order{
|
||||||
|
width: 80upx;
|
||||||
|
height: 60upx;
|
||||||
|
line-height: 60upx;
|
||||||
|
border-radius: 10upx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -254,16 +254,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 跳转新增页
|
|
||||||
*/
|
|
||||||
// _addRecord: function(){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/repairAdd/repairAdd'
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 派单
|
* 派单
|
||||||
* @param {Object} _item
|
* @param {Object} _item
|
||||||
|
|||||||
58
pages/repairOrder/replyRepairAppraise.vue
Normal file
58
pages/repairOrder/replyRepairAppraise.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
|
<view class="cu-form-group margin-top">
|
||||||
|
<textarea v-model="replyContext" placeholder="请输入回复说明"></textarea>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex flex-direction margin-top">
|
||||||
|
<button class="cu-btn bg-green margin-tb-sm lg" @click="_reply()">提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {replyRepairAppraise} from '../../api/repair/repair.js'
|
||||||
|
import {getCommunity,getCurrentCommunity} from '../../api/community/community.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
replyContext: '',
|
||||||
|
repairId:'',
|
||||||
|
ruId:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.java110Context.onLoad();
|
||||||
|
this.ruId = options.ruId;
|
||||||
|
this.repairId = options.repairId;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_reply: function() {
|
||||||
|
replyRepairAppraise({
|
||||||
|
replyContext:this.replyContext,
|
||||||
|
communityId:getCurrentCommunity().communityId,
|
||||||
|
ruId:this.ruId,
|
||||||
|
repairId:this.repairId
|
||||||
|
},this)
|
||||||
|
.then(function(res){
|
||||||
|
if (res.code != 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title:res.data
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:1
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user