2023-03-28 10:02:47 +08:00
|
|
|
|
<template>
|
2023-04-03 14:55:17 +08:00
|
|
|
|
<view class="app" v-if="baseurl">
|
|
|
|
|
|
<view class="top">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
<image src="../../static/fuwu.png" mode=""></image>
|
|
|
|
|
|
<view class="text">
|
2023-03-28 10:02:47 +08:00
|
|
|
|
{{list.nurseItemName}}
|
|
|
|
|
|
</view>
|
2023-04-07 15:34:32 +08:00
|
|
|
|
<view class="righttext">
|
2023-04-11 09:53:41 +08:00
|
|
|
|
¥{{list.orderCommissionAmount}}
|
2023-04-03 14:55:17 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="content">
|
2023-03-28 10:02:47 +08:00
|
|
|
|
<view class="time">
|
2023-04-03 14:55:17 +08:00
|
|
|
|
时间:{{list.serviceDate}}
|
|
|
|
|
|
<span style='padding-left: 10rpx;'>{{list.serviceStartTime}}</span>
|
2023-03-28 10:02:47 +08:00
|
|
|
|
</view>
|
2023-04-03 14:55:17 +08:00
|
|
|
|
<view class="address">
|
|
|
|
|
|
地点:{{list.serviceAddress}}
|
2023-03-28 10:02:47 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2023-04-03 14:55:17 +08:00
|
|
|
|
<view class="top">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
<image src="../../static/user.png" mode=""></image>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
用户信息
|
|
|
|
|
|
</view>
|
2023-03-28 10:02:47 +08:00
|
|
|
|
</view>
|
2023-04-03 14:55:17 +08:00
|
|
|
|
<view class="content" style="margin-top: 20rpx;">
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
姓名:{{list.patientName}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
年龄:{{list.age}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
电话:{{list.phone}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item address" @tap='getlocations'>
|
|
|
|
|
|
<view class="text" style="line-height: 60rpx;">
|
|
|
|
|
|
住址:{{list.address}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="daohang">
|
|
|
|
|
|
<image src="../../static/daohang.png" mode=""></image>
|
|
|
|
|
|
<span class='p'>导航</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
是否失能:{{list.disablingCondition=="NOT_DISABLED"?'未失能':''}}
|
|
|
|
|
|
{{list.disablingCondition=="DISABLED"?'已失能':''}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item" v-if="list.disablingCondition=='DISABLED'">
|
|
|
|
|
|
失能情况:{{list.disablingReason}}
|
|
|
|
|
|
</view>
|
2023-03-28 10:02:47 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2023-04-07 15:34:32 +08:00
|
|
|
|
<span v-if="list.orderStatus=='NOT_FINISH'||list.orderStatus=='WAIT_RECEIVE'">
|
|
|
|
|
|
<view class="btnsuccess" @tap='goconfirmCompletion' v-if="list.orderStatus=='NOT_FINISH'">
|
|
|
|
|
|
去完成
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="btnsuccess" @tap='Receivingorders' v-if="list.orderStatus=='WAIT_RECEIVE'">
|
|
|
|
|
|
接单
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="btnreturn" @tap='gotaskReturn'>
|
|
|
|
|
|
退回
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</span>
|
2023-04-10 10:54:46 +08:00
|
|
|
|
<u-toast ref="uToast" />
|
2023-03-28 10:02:47 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
taskDetails
|
2023-04-03 14:55:17 +08:00
|
|
|
|
} from '@/api/taskDetails/taskDetails.js'
|
2023-04-07 15:34:32 +08:00
|
|
|
|
import {
|
|
|
|
|
|
receiveOrders
|
|
|
|
|
|
} from '@/api/Mymission/Mymission.js'
|
2023-03-28 10:02:47 +08:00
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-04-07 15:34:32 +08:00
|
|
|
|
nursePersonId: null, //护理员id
|
2023-04-03 14:55:17 +08:00
|
|
|
|
baseurl: null,
|
|
|
|
|
|
list: {}, //详情对象
|
|
|
|
|
|
tude: { //经纬度
|
|
|
|
|
|
latitude: null,
|
|
|
|
|
|
longitude: null,
|
|
|
|
|
|
},
|
|
|
|
|
|
orderDetailsId: null, //工单id
|
2023-03-28 10:02:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
//详情接口
|
|
|
|
|
|
taskDetailsinfo(orderDetailsId) {
|
|
|
|
|
|
taskDetails(orderDetailsId).then(res => {
|
2023-04-03 14:55:17 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.list = res.data
|
|
|
|
|
|
}
|
|
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-04-07 15:34:32 +08:00
|
|
|
|
//接单
|
|
|
|
|
|
Receivingorders() {
|
|
|
|
|
|
var obj = {
|
|
|
|
|
|
"appointmentOrderId": this.list.orderDetailsId,
|
|
|
|
|
|
"stationPersonId": this.nursePersonId,
|
|
|
|
|
|
"appointmentOrderNo": this.list.orderNo
|
|
|
|
|
|
}
|
|
|
|
|
|
receiveOrders(obj).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: '接单成功',
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
duration: '1500'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.taskDetailsinfo(this.orderDetailsId)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-04-03 14:55:17 +08:00
|
|
|
|
//经纬度
|
|
|
|
|
|
getlocations() {
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
uni.request({
|
|
|
|
|
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=',
|
|
|
|
|
|
method: 'GET',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
key: '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37', //高德地图key
|
|
|
|
|
|
address: that.list.address // 详细地址
|
|
|
|
|
|
},
|
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
that.tude.latitude = res.data.result.location.lat
|
|
|
|
|
|
that.tude.longitude = res.data.result.location.lng
|
|
|
|
|
|
that.goaddress();
|
|
|
|
|
|
},
|
|
|
|
|
|
fail(err) {}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//跳转地图
|
|
|
|
|
|
goaddress() {
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
uni.openLocation({
|
|
|
|
|
|
latitude: Number(that.tude.latitude),
|
|
|
|
|
|
longitude: Number(that.tude.longitude),
|
2023-03-28 10:02:47 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-04-03 14:55:17 +08:00
|
|
|
|
//退回
|
|
|
|
|
|
gotaskReturn() {
|
2023-03-28 10:02:47 +08:00
|
|
|
|
uni.navigateTo({
|
2023-04-03 14:55:17 +08:00
|
|
|
|
url: `/pages/taskReturn/taskReturn?item=${JSON.stringify(this.list)}`
|
2023-03-28 10:02:47 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-04-03 14:55:17 +08:00
|
|
|
|
//去完成
|
|
|
|
|
|
goconfirmCompletion() {
|
2023-03-28 10:02:47 +08:00
|
|
|
|
uni.navigateTo({
|
2023-04-03 14:55:17 +08:00
|
|
|
|
url: `/pages/confirmCompletion/confirmCompletion?list=${JSON.stringify(this.list)}&&orderDetailsId=${this.list.orderDetailsId}`
|
2023-03-28 10:02:47 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
this.orderDetailsId = options.orderDetailsId
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
2023-04-07 15:34:32 +08:00
|
|
|
|
var that = this
|
|
|
|
|
|
const value = uni.getStorageSync('nursePersonId');
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
that.nursePersonId = value
|
|
|
|
|
|
} else {}
|
2023-03-28 10:02:47 +08:00
|
|
|
|
this.taskDetailsinfo(this.orderDetailsId)
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
@import './taskDetails.scss';
|
|
|
|
|
|
</style>
|