mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-27 00:20:03 +08:00
优化报修 已办功能
This commit is contained in:
parent
acd54faf71
commit
e08756060a
@ -73,6 +73,10 @@ const listRepairStaffs = baseUrl + "app/ownerRepair.listRepairStaffs";
|
||||
//查询员工报修单
|
||||
const listStaffRepairs = baseUrl + "app/ownerRepair.listStaffRepairs";
|
||||
|
||||
//查询完成报修单
|
||||
const listStaffFinishRepairs = baseUrl +"app/ownerRepair.listStaffFinishRepairs";
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
baseUrl: baseUrl,
|
||||
@ -108,5 +112,6 @@ module.exports = {
|
||||
listInspectionTaskDetails:listInspectionTaskDetails,
|
||||
updateInspectionTaskDetail:updateInspectionTaskDetail,
|
||||
listRepairStaffs:listRepairStaffs,
|
||||
listStaffRepairs:listStaffRepairs
|
||||
listStaffRepairs:listStaffRepairs,
|
||||
listStaffFinishRepairs:listStaffFinishRepairs
|
||||
};
|
||||
13
pages.json
13
pages.json
@ -188,6 +188,19 @@
|
||||
"navigationBarTitleText": "选择类型"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/repairHandle/repairHandle",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "订单处理"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/repairDispatchFinish/repairDispatchFinish",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "维修已办"
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
@ -24,6 +24,12 @@
|
||||
<text class="text-grey">个人信息</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item arrow" @tap="_repairFinish()">
|
||||
<view class="content">
|
||||
<text class="lg text-gray cuIcon-order"></text>
|
||||
<text class="text-grey">维修已办</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item arrow" @tap="_changePwd()">
|
||||
<view class="content">
|
||||
<text class="lg text-gray cuIcon-lock"></text>
|
||||
@ -113,6 +119,11 @@
|
||||
url:"/pages/userInfo/userInfo"
|
||||
});
|
||||
},
|
||||
_repairFinish:function(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/repairDispatchFinish/repairDispatchFinish"
|
||||
})
|
||||
},
|
||||
//修改密码
|
||||
_changePwd:function(){
|
||||
uni.navigateTo({
|
||||
|
||||
@ -1,24 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="margin-top" >
|
||||
<view class="cu-list menu-avatar">
|
||||
<view class="cu-item arrow" v-for="(item,index) in myOrders" :key="index" @tap="_toModifyMyOrder(item,communityId)">
|
||||
<view class="cu-avatar round lg" :style="'background-image:url('+orderImg+');'">
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="text-grey">{{item.repairId}}</view>
|
||||
<view class="text-gray text-sm flex">
|
||||
<view class="text-cut">
|
||||
{{item.repairTypeName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="text-grey text-xs">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-for="(item,index) in myOrders" :key="index" class="bg-white margin-top margin-right-xs radius margin-left-xs padding">
|
||||
<view class="flex padding-bottom-xs solid-bottom justify-between">
|
||||
@ -51,7 +32,10 @@
|
||||
</view>
|
||||
<view class="solid-top flex justify-end margin-top padding-top-sm ">
|
||||
<button class="cu-btn sm line-gray" @click="repairDetail(item)">详情</button>
|
||||
<button class="cu-btn sm bg-red margin-left" @click="deleteRepair(item)">处理</button>
|
||||
<button class="cu-btn sm bg-orange margin-left" @click="dealRepair(item,'transfer')">转单</button>
|
||||
<button class="cu-btn sm bg-red margin-left" @click="dealRepair(item,'back')">退单</button>
|
||||
<button class="cu-btn sm bg-green margin-left" @click="dealRepair(item,'finish')">办结</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -122,7 +106,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
_toModifyMyOrder:function(_item){
|
||||
repairDetail:function(_item){
|
||||
console.log('_item',_item);
|
||||
//wx.setStorageSync("_toModifyComplaint_"+_item.complaintId, _item);
|
||||
uni.navigateTo({
|
||||
@ -130,12 +114,12 @@
|
||||
|
||||
});
|
||||
},
|
||||
_toModifyHistoryOrder:function(_item){
|
||||
console.log('_item',_item);
|
||||
uni.setStorageSync("_complaintOrderDetail_"+_item.complaintId, _item);
|
||||
dealRepair:function(item,action){
|
||||
uni.navigateTo({
|
||||
url:"/pages/repairDetail/repairDetail?repairId=" + _item.repairId+'&storeId='+this.storeId
|
||||
});
|
||||
url:'/pages/repairHandle/repairHandle?action='
|
||||
+action+"&repairId="+item.repairId
|
||||
+"&repairType="+item.repairType
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
119
pages/repairDispatchFinish/repairDispatchFinish.vue
Normal file
119
pages/repairDispatchFinish/repairDispatchFinish.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view v-for="(item,index) in myOrders" :key="index" class="bg-white margin-top margin-right-xs radius margin-left-xs padding">
|
||||
<view class="flex padding-bottom-xs solid-bottom justify-between">
|
||||
<view>{{item.repairId}}</view>
|
||||
<view class="text-gray">{{item.tel}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top justify-between">
|
||||
<view class="text-gray">报修类型</view>
|
||||
<view class="text-gray">{{item.repairTypeName}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs justify-between">
|
||||
<view class="text-gray">报修人</view>
|
||||
<view class="text-gray">{{item.repairName}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs justify-between">
|
||||
<view class="text-gray">位置</view>
|
||||
<view class="text-gray">{{item.repairObjName}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs justify-between">
|
||||
<view class="text-gray">预约时间</view>
|
||||
<view class="text-gray">{{item.appointmentTime }}</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs justify-between">
|
||||
<view class="text-gray">状态</view>
|
||||
<view class="text-gray">{{item.stateName}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs justify-between">
|
||||
<view class="text-gray">报修内容</view>
|
||||
<view class="text-gray">{{item.context}}</view>
|
||||
</view>
|
||||
<view class="solid-top flex justify-end margin-top padding-top-sm ">
|
||||
<button class="cu-btn sm line-gray" @click="repairDetail(item)">详情</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderImg:this.java110Constant.url.baseUrl + 'img/order.png',
|
||||
myOrders:[],
|
||||
orders:[],
|
||||
storeId:''
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
|
||||
let _userInfo = this.java110Context.getUserInfo();
|
||||
let _storeId = _userInfo.storeId;
|
||||
this.storeId = _storeId;
|
||||
this._loadMyModify();
|
||||
},
|
||||
methods: {
|
||||
_loadMyModify:function(){
|
||||
//
|
||||
let _that = this;
|
||||
let _userInfo = this.java110Context.getUserInfo();
|
||||
let storeId = _userInfo.storeId;
|
||||
let _objData = {
|
||||
page: 1,
|
||||
row: 15,
|
||||
userId:_userInfo.userId,
|
||||
communityId:_that.java110Context.getCurrentCommunity().communityId
|
||||
};
|
||||
|
||||
this.java110Context.request({
|
||||
url: _that.java110Constant.url.listStaffFinishRepairs,
|
||||
header: _that.java110Context.getHeaders(),
|
||||
method: "GET",
|
||||
data: _objData, //动态数据
|
||||
success: function(res) {
|
||||
console.log("请求返回信息:", res);
|
||||
let _json = res.data;
|
||||
if (_json.code != 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: _json.msg
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _data = _json.data;
|
||||
_that.myOrders = _data;
|
||||
|
||||
_that.myOrders.forEach(function(item) {
|
||||
let dateStr = item.appointmentTime;
|
||||
console.log(dateStr);
|
||||
let _date = new Date(dateStr);
|
||||
item.appointmentTime = (_date.getMonth() + 1) + '-' + _date.getDate();
|
||||
});
|
||||
// _that.orders = _data.ownerRepairs;
|
||||
},
|
||||
fail: function(e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
repairDetail:function(_item){
|
||||
console.log('_item',_item);
|
||||
//wx.setStorageSync("_toModifyComplaint_"+_item.complaintId, _item);
|
||||
uni.navigateTo({
|
||||
url:"/pages/repairDetail/repairDetail?repairId=" + _item.repairId+'&storeId='+this.storeId
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
107
pages/repairHandle/repairHandle.vue
Normal file
107
pages/repairHandle/repairHandle.vue
Normal file
@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">维修师傅</view>
|
||||
<picker bindchange="PickerChange" :value="index" :range="staffCloums" @change="staffChange">
|
||||
<view class="picker">
|
||||
{{roomName?roomName:'请选择'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group margin-top">
|
||||
<textarea v-model="context" placeholder="请输入报修内容"></textarea>
|
||||
</view>
|
||||
|
||||
<view class="cu-bar bg-white margin-top">
|
||||
<view class="action">
|
||||
图片上传
|
||||
</view>
|
||||
<view class="action">
|
||||
{{imgList.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group ">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(img,index) in imgList" bindtap="ViewImage" :data-url="imgList[index]">
|
||||
<image :src='imgList[index]' mode='aspectFill'></image>
|
||||
<view class="cu-tag bg-red" @tap="deleteImage(index)" :data-index="index">
|
||||
<text class="cuIcon-close"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
|
||||
<text class="cuIcon-cameraadd"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-direction margin-top">
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="submitRepair()">提交</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
staffCloums:[],
|
||||
action:'',
|
||||
repairId:'',
|
||||
repairType:'',
|
||||
imgList:[]
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.action = options.action;
|
||||
this.repairId = options.repairId;
|
||||
this.repairType=options.repairType;
|
||||
this._loadRepairStaff();
|
||||
},
|
||||
methods: {
|
||||
|
||||
_loadRepairStaff:function(){
|
||||
let _that = this;
|
||||
let _data={
|
||||
repairType:this.repairType,
|
||||
communtiyId:this.java110Context.getCurrentCommunity().communityId,
|
||||
page:1,
|
||||
row:50
|
||||
}
|
||||
this.java110Context.request({
|
||||
url: _that.java110Constant.url.listRepairStaffs,
|
||||
header: _that.java110Context.getHeaders(),
|
||||
method: "GET",
|
||||
data: _data, //动态数据
|
||||
success: function(res) {
|
||||
console.log("请求返回信息:", res);
|
||||
let _json = res.data;
|
||||
if (_json.code != 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: _json.msg
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _data = _json.data;
|
||||
_that.staffCloums = _data;
|
||||
},
|
||||
fail: function(e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user