Browse Source

完成服务,确认服务,已完成详情

test
mk 1 year ago
parent
commit
625f403b02
  1. BIN
      epmet-work-h5-staging.zip
  2. 1
      public/index.html
  3. 3
      src/api/index.js
  4. 8
      src/api/service.js
  5. 4
      src/assets/css/common.less
  6. 4
      src/plugins/vant.js
  7. 2
      src/utils/request.js
  8. 34
      src/views/assistance/card.vue
  9. 96
      src/views/assistance/index.vue
  10. 187
      src/views/assistanceDetail/index.vue

BIN
epmet-work-h5-staging.zip

Binary file not shown.

1
public/index.html

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="format-detection" content="telephone=yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <% for (var i in <!-- <% for (var i in

3
src/api/index.js

@ -11,7 +11,8 @@ const api = {
ListMyIdentities: '/governance/service/rcvAndProcess/listMyIdentities', ListMyIdentities: '/governance/service/rcvAndProcess/listMyIdentities',
receiveService: '/governance/service/rcvAndProcess/receive', receiveService: '/governance/service/rcvAndProcess/receive',
serviceScopeTree :'/gov/org/icServiceProject/service/serviceScopeTree', serviceScopeTree :'/gov/org/icServiceProject/service/serviceScopeTree',
ServiceConfirm: '/governance/service/rcvAndProcess/confirm' ServiceConfirm: '/governance/service/rcvAndProcess/confirm',
ServiceComplete: '/governance/service/rcvAndProcess/complete'
} }
export default api export default api

8
src/api/service.js

@ -72,6 +72,14 @@ export function serviceConfirm(data) {
data data
}) })
} }
//完成服务
export function serviceComplete(data) {
return request({
url: api.ServiceComplete,
method: 'post',
data
})
}

4
src/assets/css/common.less

@ -120,4 +120,8 @@
padding: 6px 26px; padding: 6px 26px;
box-sizing: border-box; box-sizing: border-box;
text-align: right; text-align: right;
}
.font-bold{
font-weight: bold;
} }

4
src/plugins/vant.js

@ -27,7 +27,8 @@ import {
CellGroup, CellGroup,
Form, Form,
DatetimePicker, DatetimePicker,
Cascader Cascader,
Rate
} from 'vant' } from 'vant'
Vue.use(Button) Vue.use(Button)
@ -57,3 +58,4 @@ Vue.use(Button)
.use(Form) .use(Form)
.use(DatetimePicker) .use(DatetimePicker)
.use(Cascader) .use(Cascader)
.use(Rate)

2
src/utils/request.js

@ -9,7 +9,7 @@ import { Tips } from '@/utils/index'
const service = axios.create({ const service = axios.create({
baseURL: baseApi, // url = base api url + request url baseURL: baseApi, // url = base api url + request url
withCredentials: true, // send cookies when cross-domain requests withCredentials: true, // send cookies when cross-domain requests
timeout: 5000 // request timeout timeout: 10000 // request timeout
}) })
// request拦截器 request interceptor // request拦截器 request interceptor

34
src/views/assistance/card.vue

@ -8,15 +8,22 @@
{{ item.categoryName }} {{ item.categoryName }}
</div> </div>
</div> </div>
<div class="m-top5 flex flex-center"> <div class="m-top5 flex flex-center font-bold" v-if="item.source === 1">
{{ item.title || '--' }}<br>
</div>
<div class="m-top5 flex flex-center" v-if="item.source !== 1">
<img src="@/assets/images/icon/address.png" class="small_img m-right7"> <img src="@/assets/images/icon/address.png" class="small_img m-right7">
{{ item.serviceTargetName || '--' }} {{ item.serviceTargetMobile }}<br> {{ item.serviceTargetName || '--' }} {{ item.serviceTargetMobile }}<br>
</div> </div>
<div class="m-top5 flex flex-center" v-else>
<img src="@/assets/images/icon/address.png" class="small_img m-right7">
{{ item.serviceTargetName || '--' }}<br>
</div>
<div class="opacity5 font-size13 m-top5" style="margin-left: 29px;">{{ item.serviceTargetAddresses }} <div class="opacity5 font-size13 m-top5" style="margin-left: 29px;">{{ item.serviceTargetAddresses }}
</div> </div>
<div class="m-top5 flex flex-center"> <div class="m-top5 flex flex-center" v-if="active== 2 || item.source === 4">
<img src="@/assets/images/icon/time.png" class="small_img m-right7"> <img src="@/assets/images/icon/time.png" class="small_img m-right7">
<div style="font-size: 15px;"> <div style="font-size: 15px;" >
{{ item.serviceTimeStart || '--'}} <span v-if="item.source === 1"> {{item.serviceTimeEnd || '--'}}</span> {{ item.serviceTimeStart || '--'}} <span v-if="item.source === 1"> {{item.serviceTimeEnd || '--'}}</span>
</div> </div>
</div> </div>
@ -30,9 +37,9 @@
<hr class="m-top12-right opacity5"> <hr class="m-top12-right opacity5">
<div class="flex flex-fend m-top12-right"> <div class="flex flex-fend m-top12-right">
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 10" @click="$emit('handleCLickReceive',item)">接单</van-button> <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 10" @click="$emit('handleCLickReceive',item)">接单</van-button>
<van-button size="small" type="default" round class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.source === 4 ">联系需求人</van-button> <a :href='`tel:${item.serviceTargetMobile}`' v-if="item.processStatus === 20 && item.source === 4 ">联系需求人</a>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 &&!item.confirmedFlag" @click="$emit('handelServiceConfirm',item)">确认服务</van-button> <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 &&!item.confirmedFlag" @click="$emit('handelServiceConfirm',item)">确认服务</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.confirmedFlag">完成服务</van-button> <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.confirmedFlag" @click="$emit('handelServiceComplete',item)">完成服务</van-button>
</div> </div>
</div> </div>
@ -50,6 +57,10 @@ export default {
tableData: { tableData: {
type: Array, type: Array,
default: () => [] default: () => []
},
active:{
type: Number,
default: 0
} }
}, },
created() { }, created() { },
@ -60,9 +71,20 @@ export default {
} }
</script> </script>
<style lang='less'> <style lang='less' scoped>
/deep/ .van-tabs__content{ /deep/ .van-tabs__content{
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
} }
a{
border: 1px solid #ebedf0;
color: #333333;
padding: 0 10px;
border-radius: 10px;
height: 24px;
line-height: 24px;
display: inline-block;
margin-left: 10px;
font-size: 12px;
}
</style> </style>

96
src/views/assistance/index.vue

@ -8,10 +8,10 @@
</van-tab> </van-tab>
<van-tab title="待处理"> <van-tab title="待处理">
<card :tableData="list" @handelServiceConfirm="handelServiceConfirm" <card :tableData="list" @handelServiceConfirm="handelServiceConfirm"
@handelTodetail="handelTodetail"></card> @handelTodetail="handelTodetail" @handelServiceComplete="handelServiceComplete"></card>
</van-tab> </van-tab>
<van-tab title="已完成"> <van-tab title="已完成">
<card :tableData="list" @handelTodetail="handelTodetail"></card> <card :tableData="list" @handelTodetail="handelTodetail" :active="active"></card>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
@ -22,6 +22,7 @@
}}</van-radio> }}</van-radio>
</van-radio-group> </van-radio-group>
</van-dialog> </van-dialog>
<van-dialog v-model="showScope" title="" show-cancel-button @confirm="receiveService"> <van-dialog v-model="showScope" title="" show-cancel-button @confirm="receiveService">
<p>服务时间</p> <p>服务时间</p>
<span @click="showStart = true, showPopup = true" class="font-size13">{{ serviceTimeStart || '开始时间' <span @click="showStart = true, showPopup = true" class="font-size13">{{ serviceTimeStart || '开始时间'
@ -37,6 +38,13 @@
}}</van-radio> }}</van-radio>
</van-radio-group> </van-radio-group>
</van-dialog> </van-dialog>
<van-dialog v-model="showComplete" title="我已完成需求人的需求" show-cancel-button :before-close="onBeforeClose">
<p>服务开始时间</p>
<span @click="showStart = true, showPopup = true" class="font-size13">{{ actualServiceStartTime || '服务开始时间'
}}</span><span class="tag-date"></span><span @click="showEnd = true, showPopup = true"
class="font-size13">{{ actualServiceEndTime || '服务结束时间' }}</span>
</van-dialog>
<van-popup v-model="showPopup" position="bottom"> <van-popup v-model="showPopup" position="bottom">
<van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间" <van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间"
@confirm="handelCLickConfirmStart" @cancel="showPopup = false" :min-date="minDate" /> @confirm="handelCLickConfirmStart" @cancel="showPopup = false" :min-date="minDate" />
@ -51,7 +59,9 @@
<script> <script>
import card from './card.vue' import card from './card.vue'
import throttle from 'lodash/debounce' import throttle from 'lodash/debounce'
import { getServiceListRcv, getServiceListProcess, getServiceListCompleted, getCommonalityDetail, getMeasureDetail, getListMyIdentities, receiveService, getServiceScopeTree, serviceConfirm } from '@/api/service' import { getServiceListRcv, getServiceListProcess, getServiceListCompleted, getCommonalityDetail, getMeasureDetail, getListMyIdentities, receiveService, getServiceScopeTree, serviceConfirm, serviceComplete } from '@/api/service'
import { Dialog } from 'vant';
export default { export default {
data() { data() {
return { return {
@ -59,7 +69,7 @@ export default {
clientHeight: false, clientHeight: false,
scroll: null, scroll: null,
pageNo: 1, pageNo: 1,
pageSize: 4, pageSize: 10,
list: [], list: [],
total: 0, total: 0,
requestFlag: false, requestFlag: false,
@ -78,7 +88,11 @@ export default {
treeOptions: null, treeOptions: null,
cascaderValue: null, cascaderValue: null,
serviceScopeName: null, serviceScopeName: null,
formData:{}, formData: {},
showComplete:false,
actualServiceStartTime:null,//
actualServiceEndTime:null,//
selfObj:{}
}; };
}, },
created() { created() {
@ -88,21 +102,65 @@ export default {
}, },
mounted() { mounted() {
this.clientHeight = document.documentElement.clientHeight; // this.clientHeight = document.documentElement.clientHeight; //
console.log(this.clientHeight);
this.$nextTick(() => { this.$nextTick(() => {
this.scroll = this.$refs.scroll; this.scroll = this.$refs.scroll;
this.scroll.addEventListener('scroll', this.bottomScroll); // this.scroll.addEventListener('scroll', this.bottomScroll); //
}) })
}, },
methods: { methods: {
async handelTodetail(item){ handelServiceComplete(item) {
if(item.source === 1){
Dialog.confirm({
message: `确定已完成“${item.title}”服务吗?`,
}).then( () => {
this.serviceComplete(item.source,item.id)
}).catch(() => {
})
}else if(item.source === 4){
this.showComplete= true;
this.selfObj = item;
}
},
onBeforeClose(action, done) {
//
if (action === "confirm") {
if (this.selfObj.source === 4) {
if (!this.actualServiceStartTime) {
this.$tips.warning('请选择服务开始时间')
return done(false)
}
if (!this.actualServiceEndTime) {
this.$tips.warning('请选择服务结束时间')
return done(false)
}
this.serviceComplete(this.selfObj.source, this.selfObj.id, this.actualServiceStartTime, this.actualServiceEndTime)
done(true)
}
}
else {
done(true);
}
},
async serviceComplete(source,id,actualServiceStartTime,actualServiceEndTime){
let { code } = await serviceComplete({ source, id, actualServiceStartTime, actualServiceEndTime})
if (code === 0) {
this.$toast.success('服务完成')
this.pageNo = 1;
this.requestFlag = true;
this.list = [];
this.getTableData();
}
},
async handelTodetail(item) {
this.serverId = item.id; this.serverId = item.id;
if (item.source === 4) { if (item.source === 4) {
await this.getMeasureDetail() await this.getMeasureDetail()
} else { } else {
await this.getCommonalityDetail() await this.getCommonalityDetail()
} }
this.$router.push({name:'assistanceDetail',params:{detail:this.formData,selfObj:item}}) this.$router.push({ name: 'assistanceDetail', params: { detail: this.formData, selfObj: item } })
}, },
onFinish(value) { onFinish(value) {
this.showTree = false; this.showTree = false;
@ -111,12 +169,20 @@ export default {
this.serviceScopeName = value.selectedOptions.map(item => item.objectName).join('-') this.serviceScopeName = value.selectedOptions.map(item => item.objectName).join('-')
}, },
handelCLickConfirmStart(val) { handelCLickConfirmStart(val) {
this.serviceTimeStart = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss'); if (this.selfObj.processStatus === 20) {
this.actualServiceStartTime = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
} else {
this.serviceTimeStart = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
}
this.showPopup = false; this.showPopup = false;
this.showStart = false; this.showStart = false;
}, },
handelCLickConfirmEnd(val) { handelCLickConfirmEnd(val) {
this.serviceTimeEnd = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss'); if (this.selfObj.processStatus === 20) {
this.actualServiceEndTime = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
} else {
this.serviceTimeEnd = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
}
this.showPopup = false; this.showPopup = false;
this.showEnd = false; this.showEnd = false;
}, },
@ -261,7 +327,7 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}).then(res => { }).then(res => {
this.total = res.total; this.total = res.total;
this.requestFlag = res.data.list === this.pageSize; this.requestFlag = res.data.list.length === this.pageSize;
this.list = this.list.concat(res.data.list) this.list = this.list.concat(res.data.list)
}).catch(err => { }).catch(err => {
}) })
@ -276,6 +342,4 @@ export default {
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped></style>
</style>

187
src/views/assistanceDetail/index.vue

@ -1,19 +1,31 @@
<template> <template>
<div class='pages'> <div class='pages' v-if="detail">
<section> <section>
<div class="card m-top12"> <div class="card m-top12">
<div class="m-top5 flex flex-center font-bold" v-if="this.selfObj.source === 1">
{{ this.detail.title || '--' }}<br>
</div>
<div class="m-top5 flex flex-center"> <div class="m-top5 flex flex-center">
<img src="@/assets/images/icon/address.png" class="small_img m-right7"> <img src="@/assets/images/icon/address.png" class="small_img m-right7">
{{ detail.serviceTargetName || '--' }} {{ detail.serviceTargetMobile }}<br> {{ detail.serviceTargetName || '--' }} {{ detail.serviceTargetMobile }}<br>
</div> </div>
<div class="opacity5 font-size13 m-top5" style="margin-left: 29px;">{{ detail.serviceTargetAddress }}
<div class="opacity5 font-size13 m-top5" style="margin-left: 29px;" v-if="selfObj.source != 1">{{ detail.serviceTargetAddress }}
</div>
<div class="opacity5 font-size13 m-top5" style="margin-left: 29px;" v-else>{{ detail.serviceTargetAddresses.join('') }}
</div> </div>
<div class="m-top5 flex flex-center"> <div class="m-top5 flex flex-center" v-if="selfObj.source != 1">
<img src="@/assets/images/icon/time.png" class="small_img m-right7"> <img src="@/assets/images/icon/time.png" class="small_img m-right7">
<div> <div>
{{ detail.serviceStartTime || '--' }} {{ detail.serviceStartTime || '--' }}
</div> </div>
</div> </div>
<div class="m-top5 flex flex-center" v-else>
<img src="@/assets/images/icon/time.png" class="small_img m-right7">
<div style="font-size: 15px;">
{{ detail.serviceTimeStart || '--' }} {{detail.serviceTimeEnd || '--'}}
</div>
</div>
<div class="m-top5 "> <div class="m-top5 ">
<div class="flex flex-center3"> <div class="flex flex-center3">
<img src="@/assets/images/icon/content.png" style="vertical-align: top;" <img src="@/assets/images/icon/content.png" style="vertical-align: top;"
@ -22,15 +34,38 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card m-top12" style="padding: 5px;"> <div class="card m-top12" style="padding: 5px;">
<van-cell title="服务类型" :value="sourceName" /> <van-cell title="服务类型" :value="sourceName" />
<van-cell title="需求分类" :value="detail.categoryName" /> <van-cell title="需求分类" :value="detail.categoryName" />
<van-cell title="上报人" :value="detail.serviceTargetName + detail.serviceTargetMobile" /> <van-cell title="上报人" :value="detail.serviceTargetName + detail.serviceTargetMobile"
<van-cell title="上报时间" :value="detail.reportTime" /> v-if="selfObj.source != 1" />
<van-cell title="上报时间" :value="detail.reportTime" v-if="selfObj.source != 1" />
<van-cell title="创建时间" :value="detail.createdTime" v-if="selfObj.source == 1 && selfObj.processStatus === 10" />
<van-cell title="指派时间" :value="detail.assignTime" v-if="selfObj.source == 1 && (selfObj.processStatus === 30 ||selfObj.processStatus === 20 )"/>
<van-cell title="完成时间" :value="detail.assignTime" v-if="selfObj.source == 1 && selfObj.processStatus === 30"/>
</div> </div>
</section> </section>
<div class="bto_btn"> <div class="bto_btn flex flex-center" style="justify-content: end;">
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="selfObj.processStatus === 10" @click="showRole = true">接单</van-button> <!-- source: 0:公共服务 1:共性需求 2:政策找人 3:服务找人 4:个性需求 5:温暖找人 6:技能找人 7:岗位找人 -->
<!--processStatus: 10待接单/待指派20待处理30已完成 -->
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom"
v-if="selfObj.processStatus === 10 && selfObj.source === 1" @click="showScope = true">接单</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom"
v-if="selfObj.processStatus === 20 && selfObj.source === 1 && selfObj.confirmedFlag === 1"
@click="handelClickComplete">完成服务</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom"
v-if="selfObj.processStatus === 10 && selfObj.source === 4" @click="showRole = true">接单</van-button>
<a :href='`tel:${selfObj.serviceTargetMobile}`'
v-if="selfObj.processStatus === 20 && selfObj.source === 4">联系需求人</a>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom"
v-if="selfObj.processStatus === 20 && selfObj.confirmedFlag !== 1"
@click="confirmService">确认服务</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom"
v-if="selfObj.processStatus === 20 && selfObj.source === 4 && selfObj.confirmedFlag === 1"
@click="showComplete = true">完成服务</van-button>
</div> </div>
<van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button @confirm="receiveService"> <van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button @confirm="receiveService">
<van-radio-group v-model="serviceOrgType"> <van-radio-group v-model="serviceOrgType">
@ -39,20 +74,25 @@
}}</van-radio> }}</van-radio>
</van-radio-group> </van-radio-group>
</van-dialog> </van-dialog>
<van-dialog v-model="showScope" title="" show-cancel-button @confirm="receiveService"> <!-- 个性需求完成弹框 -->
<p>服务时间</p> <van-dialog v-model="showComplete" title="我已完成需求人的需求" show-cancel-button :before-close="onBeforeClose">
<span @click="showStart = true, showPopup = true" class="font-size13">{{ serviceTimeStart || '开始时间' <p>服务开始时间</p>
<span @click="showStart = true, showPopup = true" class="font-size13">{{ actualServiceStartTime || '服务开始时间'
}}</span><span class="tag-date"></span><span @click="showEnd = true, showPopup = true" }}</span><span class="tag-date"></span><span @click="showEnd = true, showPopup = true"
class="font-size13">{{ serviceTimeEnd || '结束时间' }}</span> class="font-size13">{{ actualServiceEndTime || '服务结束时间' }}</span>
<p>服务范围</p> <p>完成情况</p>
<span class="font-size13" @click="showTree = true, showPopup = true">{{ serviceScopeName || '请选择范围' <van-radio-group v-model="rdFinishResult">
}}</span> <van-radio name="resolved">已解决</van-radio>
<p>接单身份</p> <van-radio name="unresolved">未解决</van-radio>
<van-radio-group v-model="serviceOrgType">
<van-radio :name="item.serviceOrgType" v-for="(item) in roleList" :key="item.id"
@click="handelChangeRole(item.serviceOrgId)">{{ item.serviceOrgName
}}</van-radio>
</van-radio-group> </van-radio-group>
<p>评价</p>
<van-rate
v-model="rdScore"
:size="25"
color="#ffd21e"
void-icon="star"
void-color="#eee"
/>
</van-dialog> </van-dialog>
<van-popup v-model="showPopup" position="bottom"> <van-popup v-model="showPopup" position="bottom">
<van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间" <van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间"
@ -67,13 +107,14 @@
</template> </template>
<script> <script>
import {receiveService,getListMyIdentities,getServiceScopeTree } from '@/api/service' import { receiveService, getListMyIdentities, getServiceScopeTree, serviceComplete, serviceConfirm } from '@/api/service'
import { Dialog } from 'vant';
export default { export default {
data() { data() {
return { return {
detail: null, detail: null,
typeList:['公共服务','共性需求','政策找人','服务找人','个性需求','温暖找人','技能找人','岗位找人'], typeList: ['公共服务', '共性需求', '政策找人', '服务找人', '个性需求', '温暖找人', '技能找人', '岗位找人'],
id:null, id: null,
showPopup: false, showPopup: false,
showStart: false, showStart: false,
showEnd: false, showEnd: false,
@ -89,7 +130,11 @@ export default {
serviceOrgType: null, serviceOrgType: null,
serviceOrgId: null, serviceOrgId: null,
showRole: false, showRole: false,
actualServiceStartTime: null,//
actualServiceEndTime: null,//
showComplete: false,
rdFinishResult:null,
rdScore:5
}; };
}, },
created() { created() {
@ -104,6 +149,51 @@ export default {
this.sourceName = this.typeList[this.source] this.sourceName = this.typeList[this.source]
}, },
methods: { methods: {
async confirmService() {
let { data, code, msg } = await serviceConfirm({ id: this.id })
if (code === 0) {
this.selfObj.confirmedFlag = 1
}
},
onBeforeClose(action, done) {
if (action === "confirm") {
if (this.selfObj.source === 4) {
if (!this.actualServiceStartTime) {
this.$tips.warning('请选择服务开始时间')
return done(false)
}
if (!this.actualServiceEndTime) {
this.$tips.warning('请选择服务结束时间')
return done(false)
}
this.serviceComplete(this.selfObj.source, this.selfObj.id, this.actualServiceStartTime, this.actualServiceEndTime)
done(true)
}
}
//
else {
done(true);
}
},
handelClickComplete() {
if (this.selfObj.source === 1) {
Dialog.confirm({
message: `确定已完成${this.detail.title}服务吗?`,
}).then(() => {
this.serviceComplete(this.selfObj.source, this.selfObj.id)
}).catch(() => {
});
}
},
async serviceComplete(source, id, actualServiceStartTime, actualServiceEndTime) {
let { code } = await serviceComplete({ source, id, actualServiceStartTime, actualServiceEndTime })
if (code === 0) {
this.$toast.success('服务完成')
this.$router.go(-1)
}
},
handelChangeRole(val) { handelChangeRole(val) {
this.serviceOrgId = val; this.serviceOrgId = val;
}, },
@ -113,8 +203,8 @@ export default {
this.serviceScopeList = value.selectedOptions.map(item => ({ objectType: item.objectType, objectId: item.objectId, objectName: item.objectName })) this.serviceScopeList = value.selectedOptions.map(item => ({ objectType: item.objectType, objectId: item.objectId, objectName: item.objectName }))
this.serviceScopeName = value.selectedOptions.map(item => item.objectName).join('-') this.serviceScopeName = value.selectedOptions.map(item => item.objectName).join('-')
}, },
// //
async receiveService() { async receiveService() {
let parm = { let parm = {
...this.selfObj, ...this.selfObj,
id: this.id, id: this.id,
@ -138,6 +228,24 @@ export default {
this.$router.back() this.$router.back()
} }
}, },
handelCLickConfirmStart(val) {
if (this.selfObj.processStatus === 20) {
this.actualServiceStartTime = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
} else {
this.serviceTimeStart = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
}
this.showPopup = false;
this.showStart = false;
},
handelCLickConfirmEnd(val) {
if (this.selfObj.processStatus === 20) {
this.actualServiceEndTime = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
} else {
this.serviceTimeEnd = this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss');
}
this.showPopup = false;
this.showEnd = false;
},
async getListMyIdentities() { async getListMyIdentities() {
let { data, code, msg } = await getListMyIdentities() let { data, code, msg } = await getListMyIdentities()
if (code === 0) { if (code === 0) {
@ -158,17 +266,32 @@ export default {
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
.pages{ .pages {
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
} }
:deep(.van-cell__value){
text-align:left; :deep(.van-cell__value) {
text-align: left;
} }
:deep(.van-cell__title){
:deep(.van-cell__title) {
max-width: 80px; max-width: 80px;
} }
:deep(.van-button--small){
:deep(.van-button--small) {
padding: 12px 30px; padding: 12px 30px;
} }
a {
border: 1px solid #ebedf0;
color: #333333;
padding: 0 10px;
border-radius: 15px;
height: 26px;
line-height: 26px;
display: inline-block;
margin-left: 10px;
font-size: 12px;
}
</style> </style>

Loading…
Cancel
Save