2022-10-14 19:48:48 +08:00
|
|
|
|
<template>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="app">
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<!-- <view class="message">请填写下面的信息</view> -->
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="user">
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
<span>姓名:</span>
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<span class='addition'>{{personInfo.patientName}}</span>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
<span>电话:</span>
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<span class='addition'>{{personInfo.phone}}</span>
|
2022-10-14 19:48:48 +08:00
|
|
|
|
</view>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="item">
|
|
|
|
|
|
<span>地址:</span>
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<span class='addition'>{{personInfo.address}}</span>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
</view>
|
2022-10-21 11:01:04 +08:00
|
|
|
|
<view class="selecttime" @tap='timeshow=true'>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<span>时间:</span>
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<text v-if="usertime==''" class='addition'>请选择时间
|
|
|
|
|
|
<image src="../../static/jiantou.png"></image>
|
|
|
|
|
|
</text>
|
|
|
|
|
|
<text v-else class='addition'>{{usertime}}</text>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="remarks">
|
2022-10-31 09:04:45 +08:00
|
|
|
|
服务时长:
|
|
|
|
|
|
<span style='padding-left: 30rpx;' class='addition'>{{orderlist.serveDurationUnit}}</span>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
</view>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="Package">套餐信息:
|
|
|
|
|
|
<text class="money">¥{{orderlist.nurseItemPrice}}</text>
|
|
|
|
|
|
<text class="detail">
|
2022-10-31 09:04:45 +08:00
|
|
|
|
·<span style='padding-left: 10rpx;'>{{orderlist.nurseItemName}}</span>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
</text>
|
2022-10-14 19:48:48 +08:00
|
|
|
|
</view>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="Consumablespackage">耗材包详情:
|
|
|
|
|
|
<text class="money">¥{{orderlist.consumableTotalPrice}}</text>
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<view class="detail" v-for="(item,index) in orderlist.itemConsumableList">
|
|
|
|
|
|
·<span style='padding-left: 10rpx;'>{{item.consumableDetail}}</span>
|
|
|
|
|
|
</view>
|
2022-10-14 19:48:48 +08:00
|
|
|
|
</view>
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="remarks">
|
2022-10-17 18:35:58 +08:00
|
|
|
|
<span>备注:</span>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
<input placeholder="">
|
|
|
|
|
|
</view>
|
2022-11-15 15:36:29 +08:00
|
|
|
|
<view class="radio-content" >
|
|
|
|
|
|
<view class="radio-right" @tap="changeRadio">
|
2022-10-31 09:04:45 +08:00
|
|
|
|
<view class="radio" :class="radio == 2 ? 'radio-default':''">
|
|
|
|
|
|
<view :class="radio == 2 ? 'radio-active':''"></view>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-11-15 15:36:29 +08:00
|
|
|
|
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'
|
|
|
|
|
|
style="color: #000000;border-bottom: 1rpx solid #000000;">《用户协议》</text></view>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="priceback">
|
2022-10-20 18:38:18 +08:00
|
|
|
|
<view class="prices">¥{{orderlist.totalPrice}}</view>
|
2022-11-01 16:26:34 +08:00
|
|
|
|
<view class="xiugai" @tap='goaddress'>修改信息</view>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
<view class="queren" @tap='updata'>确认预约</view>
|
2022-10-17 18:35:58 +08:00
|
|
|
|
</view>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
<u-toast ref="uToast" />
|
2022-10-21 11:01:04 +08:00
|
|
|
|
<upicker v-model="timeshow" mode="time" start-year='2022' :params="timeparams" @confirm='timeconfirm'></upicker>
|
2022-11-15 15:36:29 +08:00
|
|
|
|
<!-- //用户协议 -->
|
|
|
|
|
|
<u-mask :show="maskshow" class='mask' @click='maskshow=false'>
|
|
|
|
|
|
<view class="Agreement">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
护理站上门服务知情同意书
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<scroll-view scroll-y="true" class="scroll-Y">
|
|
|
|
|
|
<appointmenttext></appointmenttext>
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
<view class="cancel" @tap='maskshow=false'>
|
|
|
|
|
|
取消
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="determine" @tap='tapradio'>
|
|
|
|
|
|
确定并同意
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</u-mask>
|
2022-10-14 19:48:48 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
import {
|
|
|
|
|
|
getAppStationItemInfo,
|
|
|
|
|
|
getAppPatientList,
|
2022-10-20 18:38:18 +08:00
|
|
|
|
submitAppointment
|
2022-10-20 09:15:48 +08:00
|
|
|
|
} from '@/api/appointmenttime/appointmenttime.js'
|
|
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
2022-10-31 09:04:45 +08:00
|
|
|
|
import upicker from '../picker/picker.vue'
|
2022-11-15 15:36:29 +08:00
|
|
|
|
import appointmenttext from './text.vue'
|
2022-10-14 19:48:48 +08:00
|
|
|
|
export default {
|
2022-10-21 11:01:04 +08:00
|
|
|
|
components: {
|
2022-11-15 15:36:29 +08:00
|
|
|
|
upicker,
|
|
|
|
|
|
appointmenttext
|
2022-10-21 11:01:04 +08:00
|
|
|
|
},
|
2022-10-14 19:48:48 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
timeparams: { //picker组件所需
|
2022-10-20 09:15:48 +08:00
|
|
|
|
year: true,
|
|
|
|
|
|
month: true,
|
|
|
|
|
|
day: true,
|
2022-10-20 18:38:18 +08:00
|
|
|
|
hour: true,
|
2022-10-21 11:01:04 +08:00
|
|
|
|
endhour: true,
|
2022-10-20 18:38:18 +08:00
|
|
|
|
minute: true,
|
2022-10-21 11:01:04 +08:00
|
|
|
|
endminute: true,
|
2022-10-20 09:15:48 +08:00
|
|
|
|
},
|
2022-10-31 09:04:45 +08:00
|
|
|
|
timeshow: false, //时间开关
|
|
|
|
|
|
maskshow: false, //用户协议开关
|
|
|
|
|
|
radio: 1, //用户协议
|
|
|
|
|
|
personInfo: [], //用户信息
|
|
|
|
|
|
patientId: null,
|
|
|
|
|
|
usertime: '', //页面展示时间
|
2022-10-20 09:15:48 +08:00
|
|
|
|
orderlist: {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
orderCount: 1,
|
|
|
|
|
|
patientId: '',
|
|
|
|
|
|
stationId: '',
|
|
|
|
|
|
stationItemId: '',
|
|
|
|
|
|
stationItemPriceId: '',
|
|
|
|
|
|
serviceAddress: "",
|
|
|
|
|
|
serviceDate: "",
|
|
|
|
|
|
serviceStartTime: "",
|
|
|
|
|
|
serviceEndTime: "",
|
|
|
|
|
|
nurseItemName: "",
|
|
|
|
|
|
nurseItemPrice: '',
|
|
|
|
|
|
serveDurationUnit: "",
|
|
|
|
|
|
consumableTotalPrice: '',
|
|
|
|
|
|
totalPrice: '',
|
|
|
|
|
|
remark: "",
|
2022-11-09 16:38:05 +08:00
|
|
|
|
orderConsumableList: [],
|
2022-10-20 09:15:48 +08:00
|
|
|
|
},
|
2022-10-14 19:48:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-11-09 16:38:05 +08:00
|
|
|
|
onShow() {
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
uni.$on('updata', function(data) {
|
|
|
|
|
|
if (data.updata) {
|
|
|
|
|
|
that.orderlist = JSON.parse(data.updata)
|
|
|
|
|
|
}
|
|
|
|
|
|
if (data.useritem) {
|
|
|
|
|
|
that.useritem = JSON.parse(data.useritem)
|
|
|
|
|
|
that.orderlist.serviceAddress = that.useritem.address
|
|
|
|
|
|
that.personInfo.patientName = that.useritem.receiveName
|
|
|
|
|
|
that.personInfo.phone = that.useritem.receivePhone
|
|
|
|
|
|
that.personInfo.address = that.useritem.address
|
|
|
|
|
|
} else {}
|
|
|
|
|
|
})
|
|
|
|
|
|
setTimeout(e => {
|
|
|
|
|
|
if (!that.useritem) {
|
|
|
|
|
|
that.userinfo();
|
|
|
|
|
|
}
|
|
|
|
|
|
}, 500)
|
|
|
|
|
|
},
|
2022-10-20 18:38:18 +08:00
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
//耗材包详情方法调用
|
2022-10-31 09:04:45 +08:00
|
|
|
|
this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
|
2022-10-20 09:15:48 +08:00
|
|
|
|
},
|
2022-10-14 19:48:48 +08:00
|
|
|
|
methods: {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
userinfo() {
|
|
|
|
|
|
//取出patientId
|
|
|
|
|
|
var that = this
|
2022-11-09 16:38:05 +08:00
|
|
|
|
try {
|
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
that.patientId = value
|
2022-10-31 09:04:45 +08:00
|
|
|
|
//被护理人信息
|
2022-11-09 16:38:05 +08:00
|
|
|
|
getAppPatientList(value).then(response => {
|
2022-11-03 17:26:15 +08:00
|
|
|
|
that.personInfo = response.data
|
|
|
|
|
|
that.personInfo.address = response.data.provinceName + response.data
|
|
|
|
|
|
.cityName + response.data.regionName + response.data.streetName +
|
|
|
|
|
|
response.data.address
|
2022-11-01 16:26:34 +08:00
|
|
|
|
that.orderlist.patientId = response.data.patientId
|
2022-11-03 17:26:15 +08:00
|
|
|
|
that.orderlist.serviceAddress = response.data.provinceName + response.data
|
|
|
|
|
|
.cityName + response.data.regionName + response.data.streetName +
|
|
|
|
|
|
response.data.address
|
2022-10-31 09:04:45 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2022-11-09 16:38:05 +08:00
|
|
|
|
} catch (e) {
|
|
|
|
|
|
// error
|
|
|
|
|
|
}
|
2022-10-20 09:15:48 +08:00
|
|
|
|
},
|
2022-10-20 18:38:18 +08:00
|
|
|
|
//获取耗材包详情
|
|
|
|
|
|
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
let that = this;
|
|
|
|
|
|
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.orderlist = res.data
|
|
|
|
|
|
}
|
2022-10-20 09:15:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-10-20 18:38:18 +08:00
|
|
|
|
//确认预约
|
2022-10-20 09:15:48 +08:00
|
|
|
|
updata() {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
if (this.radio == 1) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: '请阅读用户协议并同意',
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
2022-11-09 16:38:05 +08:00
|
|
|
|
this.orderlist.orderChannel = "MOBILE_APP"
|
|
|
|
|
|
this.orderlist.buySource = "NURSE_STATION"
|
2022-10-31 09:04:45 +08:00
|
|
|
|
this.orderlist.orderCount = 1;
|
2022-11-11 14:19:07 +08:00
|
|
|
|
this.orderlist.orderConsumableList = this.orderlist.itemConsumableList
|
2022-11-15 15:36:29 +08:00
|
|
|
|
// submitAppointment(this.orderlist).then(res => {
|
|
|
|
|
|
// if (res.code == 500) {
|
|
|
|
|
|
// this.$refs.uToast.show({
|
|
|
|
|
|
// title: res.msg,
|
|
|
|
|
|
// type: 'error',
|
|
|
|
|
|
// })
|
|
|
|
|
|
// } else if (res.code == 200) {
|
|
|
|
|
|
// this.$refs.uToast.show({
|
|
|
|
|
|
// title: '预约成功',
|
|
|
|
|
|
// type: 'success',
|
|
|
|
|
|
// url: '/pages/paysuccess/paysuccess',
|
|
|
|
|
|
// toast: 1500
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
2022-10-31 09:04:45 +08:00
|
|
|
|
}
|
2022-10-20 18:38:18 +08:00
|
|
|
|
},
|
2022-10-31 09:04:45 +08:00
|
|
|
|
changeRadio() {
|
|
|
|
|
|
if (this.radio == 1) {
|
|
|
|
|
|
this.radio = 2;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.radio = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
//获取时间
|
|
|
|
|
|
timeconfirm(e) {
|
|
|
|
|
|
this.orderlist.serviceDate = e.year + '-' + e.month + '-' + e.day
|
|
|
|
|
|
this.orderlist.serviceStartTime = e.hour + ":" + e.minute
|
|
|
|
|
|
this.orderlist.serviceEndTime = e.endhour + ":" + e.endminute
|
|
|
|
|
|
this.usertime = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + ":" + e.minute + '至' + e.endhour +
|
|
|
|
|
|
":" + e.endminute
|
|
|
|
|
|
console.log(this.orderlist, this.usertime)
|
2022-10-20 18:38:18 +08:00
|
|
|
|
},
|
2022-11-01 16:26:34 +08:00
|
|
|
|
goaddress() {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/modifyAddress/modifyAddress?url=${'appointmenttime'}&updata=${JSON.stringify(this.orderlist)}`
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-11-15 15:36:29 +08:00
|
|
|
|
tapradio() {
|
|
|
|
|
|
this.radio = 2;
|
|
|
|
|
|
this.maskshow = false;
|
|
|
|
|
|
},
|
2022-10-20 18:38:18 +08:00
|
|
|
|
}
|
2022-10-17 18:35:58 +08:00
|
|
|
|
}
|
2022-10-20 18:38:18 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
2022-10-25 08:58:53 +08:00
|
|
|
|
@import './appointmenttime.scss'
|
2022-10-14 19:48:48 +08:00
|
|
|
|
</style>
|