mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
完成结束报修
This commit is contained in:
parent
1d562e3161
commit
de449eb1fe
@ -381,3 +381,28 @@ export function replyRepairAppraise(_data,_that){
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修任务暂停
|
||||||
|
* @param {Object} _that 上下文对象
|
||||||
|
* @param {Object} _data 请求报文
|
||||||
|
*/
|
||||||
|
export function repairEnd(_that,_data){
|
||||||
|
console.log(_that,_data)
|
||||||
|
return new Promise(function(reslove,reject){
|
||||||
|
_that.context.post({
|
||||||
|
url: url.repairEnd,
|
||||||
|
data:_data,
|
||||||
|
success: function(res) {
|
||||||
|
reslove(res.data);
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
wx.showToast({
|
||||||
|
title: "服务器异常了",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -63,6 +63,8 @@ export default {
|
|||||||
repairDispatch: baseUrl + "app/ownerRepair.repairDispatch",
|
repairDispatch: baseUrl + "app/ownerRepair.repairDispatch",
|
||||||
//报修办结
|
//报修办结
|
||||||
repairFinish: baseUrl + "app/ownerRepair.repairFinish",
|
repairFinish: baseUrl + "app/ownerRepair.repairFinish",
|
||||||
|
repairEnd: baseUrl + "app/ownerRepair.repairEnd",
|
||||||
|
|
||||||
//报修评价
|
//报修评价
|
||||||
appraiseRepair: baseUrl + 'app/repair/appraiseRepair',
|
appraiseRepair: baseUrl + 'app/repair/appraiseRepair',
|
||||||
appraiseRepairNew: baseUrl + 'callComponent/ownerRepair.appraiseRepair',
|
appraiseRepairNew: baseUrl + 'callComponent/ownerRepair.appraiseRepair',
|
||||||
|
|||||||
@ -948,6 +948,13 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/repairOrder/repairEnd",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "结束订单"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
50
pages/repairOrder/repairEnd.vue
Normal file
50
pages/repairOrder/repairEnd.vue
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="cu-form-group margin-top">
|
||||||
|
<textarea v-model="content" placeholder="请输入结束原因,比如缺材料"></textarea>
|
||||||
|
</view>
|
||||||
|
<view class="flex flex-direction margin-top">
|
||||||
|
<button class="cu-btn bg-blue margin-tb-sm lg" :disabled="!content" @click="_doEndRepair()">结束工单</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
repairEnd
|
||||||
|
} from '@/api/repair/repair.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
repairId: '',
|
||||||
|
content: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.java110Context.onLoad();
|
||||||
|
this.repairId = options.repairId;
|
||||||
|
this.communityId = options.communityId;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_doEndRepair: async function() {
|
||||||
|
const {code,msg} = await repairEnd(this,{
|
||||||
|
repairId: this.repairId,
|
||||||
|
communityId: this.communityId,
|
||||||
|
context: this.content
|
||||||
|
});
|
||||||
|
if(code != 0 ){
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title:msg
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -5,43 +5,58 @@
|
|||||||
<text class="cuIcon-search"></text>
|
<text class="cuIcon-search"></text>
|
||||||
<input type="text" placeholder="输入报修人" v-model="repairName" confirm-type="search"></input>
|
<input type="text" placeholder="输入报修人" v-model="repairName" confirm-type="search"></input>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="search-form round">
|
<view class="search-form round">
|
||||||
<text class="cuIcon-search"></text>
|
<text class="cuIcon-search"></text>
|
||||||
<picker :value="repairStatesIndex" :range="repairStates" :range-key="'name'" @change="repairStatesChange">
|
<picker :value="repairStatesIndex" :range="repairStates" :range-key="'name'" @change="repairStatesChange">
|
||||||
<view>{{repairStates[repairStatesIndex].name}}</view>
|
<view>{{repairStates[repairStatesIndex].name}}</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="$preventClick(_searchRepair)">搜索</button>
|
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="$preventClick(_searchRepair)">搜索</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top" v-if="noData==false">
|
<view class="margin-top" v-if="noData==false">
|
||||||
<view class="text-df text-gray text-right">
|
<view class="text-df text-gray text-right margin-right-sm">
|
||||||
共{{totalRecords}}条记录
|
共{{totalRecords}}条记录
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu-avatar " v-for="(item,index) in repairOrders" :key="index" @tap="_toRepairDetail(item)">
|
<view v-for="(item,index) in repairOrders" :key="index" class="bg-white margin-bottom-sm margin-right-sm radius margin-left-sm padding">
|
||||||
<view class="cu-item arrow">
|
<view class="flex padding-bottom-xs solid-bottom justify-between">
|
||||||
<view class="content content-left">
|
<view>{{item.repairId}}</view>
|
||||||
<view class="text-grey">
|
<view class="text-gray">{{item.stateName}}</view>
|
||||||
<text class="cuIcon-notification text-cut text-green margin-right-xs"></text>
|
</view>
|
||||||
<text class="ellip">{{item.repairObjName}}-{{item.stateName}}({{item.repairSettingTypeName}})</text>
|
<view class="flex margin-top justify-between">
|
||||||
</view>
|
<view class="text-gray">报修类型</view>
|
||||||
<view class="text-gray text-sm flex">
|
<view class="text-gray">{{item.repairTypeName}}</view>
|
||||||
<view class="text-cut">
|
</view>
|
||||||
报修人:{{item.repairName}}-{{item.tel}}
|
<view class="flex margin-top-xs justify-between">
|
||||||
</view>
|
<view class="text-gray">报修人</view>
|
||||||
</view>
|
<view class="text-gray">{{item.repairName}}({{item.tel}})</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.state == 1000 && checkAuth('502019101946430010')" class="rob-order text-df text-white bg-green text-center" @tap.stop="dealRepair(item,'DISPATCH')">
|
<view class="flex margin-top-xs justify-between">
|
||||||
派单
|
<view class="text-gray">位置</view>
|
||||||
</view>
|
<view class="text-gray">{{item.repairObjName}}</view>
|
||||||
<view v-if="item.repairWay == 100 && item.state == 1000 && checkAuth('502021012099350016')" class="rob-order text-df text-white bg-green text-center" @tap.stop="_robOrder(item)">
|
</view>
|
||||||
抢单
|
<view class="flex margin-top-xs justify-between">
|
||||||
</view>
|
<view class="text-gray">预约时间</view>
|
||||||
<view v-else class="action">
|
<view class="text-gray">{{item.appointmentTime }}</view>
|
||||||
<view class="text-grey text-xs">{{item.appointmentTime}}
|
</view>
|
||||||
<text class="lg text-gray cuIcon-right margin-left-xs"></text>
|
<view class="flex margin-top-xs justify-between">
|
||||||
</view>
|
<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="_toRepairDetail(item)">详情</button>
|
||||||
|
<view>
|
||||||
|
<button class="cu-btn sm bg-orange margin-left"
|
||||||
|
v-if="item.state == 1000 && checkAuth('502019101946430010')"
|
||||||
|
@click="dealRepair(item,'DISPATCH')">派单</button>
|
||||||
|
<button class="cu-btn sm bg-red margin-left"
|
||||||
|
v-if="item.state != '1700' && item.state != '1800' && item.state != '1900' && checkAuth('502019101946430010')"
|
||||||
|
@click="endRepair(item)">结束</button>
|
||||||
|
<button class="cu-btn sm bg-orange margin-left"
|
||||||
|
v-if="item.repairWay == 100 && item.state == 1000 && checkAuth('502021012099350016')"
|
||||||
|
@click="_robOrder(item)">抢单</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -79,12 +94,12 @@
|
|||||||
contentrefresh: '加载中',
|
contentrefresh: '加载中',
|
||||||
contentnomore: '没有更多'
|
contentnomore: '没有更多'
|
||||||
},
|
},
|
||||||
totalRecords: 0
|
totalRecords: 0,
|
||||||
// repairStates: [{
|
repairStates: [{
|
||||||
// name: '请选择'
|
name: '请选择'
|
||||||
// }],
|
}],
|
||||||
// repairStatesIndex: 0,
|
repairStatesIndex: 0,
|
||||||
// repairState: '',
|
repairState: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -93,7 +108,7 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.java110Context.onLoad();
|
this.java110Context.onLoad();
|
||||||
// this.loadRepairState();
|
this.loadRepairState();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let _userInfo = this.java110Context.getUserInfo();
|
let _userInfo = this.java110Context.getUserInfo();
|
||||||
@ -149,7 +164,7 @@
|
|||||||
userId: _userInfo.userId,
|
userId: _userInfo.userId,
|
||||||
communityId: getCurrentCommunity().communityId,
|
communityId: getCurrentCommunity().communityId,
|
||||||
repairName: _that.repairName,
|
repairName: _that.repairName,
|
||||||
// state: _that.repairState,
|
state: _that.repairState,
|
||||||
reqSource: 'mobile'
|
reqSource: 'mobile'
|
||||||
};
|
};
|
||||||
this.java110Context.request({
|
this.java110Context.request({
|
||||||
@ -267,13 +282,26 @@
|
|||||||
"&preStaffName=" + item.preStaffName +
|
"&preStaffName=" + item.preStaffName +
|
||||||
"&repairObjType=" + item.repairObjType
|
"&repairObjType=" + item.repairObjType
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
endRepair:function(repair){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/repairOrder/repairEnd?repairId=' + repair.repairId +
|
||||||
|
"&communityId=" + repair.communityId
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
|
.cu-list{
|
||||||
|
|
||||||
|
border-radius: 10px;
|
||||||
|
.cu-item{
|
||||||
|
margin:20px
|
||||||
|
}
|
||||||
|
}
|
||||||
.cu-list.menu-avatar>.cu-item .content-left {
|
.cu-list.menu-avatar>.cu-item .content-left {
|
||||||
left: 30upx;
|
left: 30upx;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user