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-10-31 09:04:45 +08:00
|
|
|
|
<view class="radio-content" @tap="changeRadio">
|
2022-10-20 09:15:48 +08:00
|
|
|
|
<view class="radio-right">
|
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-10-31 09:04:45 +08:00
|
|
|
|
<text class="agreement">我已阅读并同意</text>
|
2022-10-20 09:15:48 +08:00
|
|
|
|
<text @tap='maskshow=true;showRegectAgreeButton=false'>《用户协议》</text>
|
|
|
|
|
|
</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-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-10-14 19:48:48 +08:00
|
|
|
|
export default {
|
2022-10-21 11:01:04 +08:00
|
|
|
|
components: {
|
|
|
|
|
|
upicker
|
|
|
|
|
|
},
|
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: "",
|
|
|
|
|
|
orderConsumableList: []
|
2022-10-20 09:15:48 +08:00
|
|
|
|
},
|
2022-10-14 19:48:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-10-20 18:38:18 +08:00
|
|
|
|
onLoad(options) {
|
2022-10-31 09:04:45 +08:00
|
|
|
|
if (options.updata) {
|
|
|
|
|
|
this.orderlist = JSON.parse(options.updata)
|
|
|
|
|
|
}
|
|
|
|
|
|
if (options.useritem) {
|
|
|
|
|
|
let useritem = JSON.parse(options.useritem)
|
|
|
|
|
|
this.orderlist.serviceAddress = useritem.address
|
|
|
|
|
|
this.personInfo.patientName = useritem.receiveName
|
|
|
|
|
|
this.personInfo.phone = useritem.receivePhone
|
|
|
|
|
|
this.personInfo.address = useritem.address
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.userinfo();
|
|
|
|
|
|
}
|
2022-10-20 18:38:18 +08:00
|
|
|
|
//耗材包详情方法调用
|
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
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
|
|
key: 'patientId',
|
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
that.patientId = res.data
|
|
|
|
|
|
//被护理人信息
|
|
|
|
|
|
getAppPatientList(that.patientId).then(response => {
|
|
|
|
|
|
// response.data.forEach(e => {
|
|
|
|
|
|
// e.address = e.sysAreaVOList[0].provinceName + e.sysAreaVOList[
|
|
|
|
|
|
// 0].cityName + e.sysAreaVOList[0].regionName + e
|
|
|
|
|
|
// .sysAreaVOList[0].streetName + e.receiveAddress
|
|
|
|
|
|
// })
|
2022-11-01 16:26:34 +08:00
|
|
|
|
that.personInfo = response.data;
|
|
|
|
|
|
that.personInfo.address = response.data.provinceName + response.data.cityName +response.data.regionName + response.data.streetName + response.data.address;
|
|
|
|
|
|
that.orderlist.patientId = response.data.patientId
|
|
|
|
|
|
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-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 {
|
|
|
|
|
|
this.orderlist.orderCount = 1;
|
|
|
|
|
|
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',
|
|
|
|
|
|
toast: 1500
|
|
|
|
|
|
})
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: `/pages/Personal/Personal`
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 1500)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
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-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>
|