2023-09-22 11:08:14 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="app">
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="item">
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
现住址所在区
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="input" @tap='showPicker'>
|
|
|
|
|
|
<view class="inputtext"
|
|
|
|
|
|
:style="address=='请选择所属地区'?'font-size:22rpx;font-weight: 400;color: #8E8E8E !important;':''">
|
|
|
|
|
|
{{address}}
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="text">
|
|
|
|
|
|
患者姓名
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input">
|
|
|
|
|
|
<input v-model="formdata.patientName" class="uinput noimageuinput" placeholder="请输入患者姓名" type="text"
|
|
|
|
|
|
placeholder-class="phsy" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
患者身份证号
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input">
|
|
|
|
|
|
<input v-model="formdata.cardNo" class="uinput noimageuinput" placeholder="请输入患者身份证号" type="text"
|
|
|
|
|
|
placeholder-class="phsy" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
患者联系电话
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="input">
|
|
|
|
|
|
<input v-model="formdata.phone" class="uinput noimageuinput" placeholder="请输入患者联系电话" type="text"
|
|
|
|
|
|
placeholder-class="phsy" />
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="text">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
预约时间
|
|
|
|
|
|
<text>请选择时间</text>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-17 11:02:14 +08:00
|
|
|
|
<tabs :list="appointmentTimeList" :current="timecurrent" @change="timechange" active-color="#26A888">
|
|
|
|
|
|
</tabs>
|
2023-10-17 11:42:24 +08:00
|
|
|
|
<view class="timeyear">
|
|
|
|
|
|
<view class="toptext">
|
|
|
|
|
|
<view :class="Soonerorlater=='morning'?'Soonerorlaterclass':'Soonerorlater'"
|
|
|
|
|
|
@tap="tapSoonerorlater('morning')">
|
|
|
|
|
|
上午
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="">
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view :class="Soonerorlater=='after'?'Soonerorlaterclass':'Soonerorlater'"
|
|
|
|
|
|
@tap="tapSoonerorlater('after')">
|
|
|
|
|
|
下午
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bottomtext">
|
|
|
|
|
|
<view class="items" v-if="Soonerorlater=='morning'">
|
|
|
|
|
|
<view @tap='taptime(item,index)'
|
|
|
|
|
|
v-for="(item ,index) in appointmentTimeList[timecurrent].morningList"
|
|
|
|
|
|
:class="timeindex==index?'timeitemtap':'timeitem'"
|
|
|
|
|
|
:style="item.status?'':'background: #FFFFFF;color: #AAABB0;'">
|
|
|
|
|
|
<view class="itemstext">
|
|
|
|
|
|
{{item.scheduleTimeSlot}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="itemstexttwo">
|
|
|
|
|
|
{{item.status?'(可预约)':'(不可预约)'}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="items" v-if="Soonerorlater=='after'">
|
|
|
|
|
|
<view @tap='taptime(item,index)'
|
|
|
|
|
|
v-for="(item ,index) in appointmentTimeList[timecurrent].afternoonList"
|
2023-10-27 17:02:33 +08:00
|
|
|
|
:class="timeindex==index?'timeitemtap':'timeitem'"
|
|
|
|
|
|
:style="item.status?'':'background: #FFFFFF;color: #AAABB0;'">
|
|
|
|
|
|
<view class="itemstext">
|
|
|
|
|
|
{{item.scheduleTimeSlot}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="itemstexttwo">
|
|
|
|
|
|
{{item.status?'(可预约)':'(不可预约)'}}
|
|
|
|
|
|
</view>
|
2023-10-17 11:42:24 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="text">
|
|
|
|
|
|
问题简述
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input">
|
|
|
|
|
|
<input v-model="formdata.problemDescription" class="uinput noimageuinput" placeholder="不多于五个字"
|
|
|
|
|
|
type="text" placeholder-class="phsy" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
患者个体情况说明
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
|
|
|
|
|
|
<u-input v-model="formdata.situationDescription" class="uinput noimageuinput" placeholder=" "
|
|
|
|
|
|
type="textarea" :maxlength="100" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
问题描述
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
|
|
|
|
|
|
<u-input v-model="formdata.problemStatement" class="uinput noimageuinput" placeholder=" "
|
|
|
|
|
|
type="textarea" :maxlength="500" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
|
|
|
|
|
既往疾病史
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
|
|
|
|
|
|
<u-input v-model="formdata.medicalRecord" class="uinput noimageuinput" placeholder=" " type="textarea"
|
|
|
|
|
|
:maxlength="100" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
上传检查单/患处照片
|
|
|
|
|
|
<text>(最多8张)</text>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<u-upload ref="uUpload" :max-count='9' :action="uoloadaction" :auto-upload="false" upload-text=' '
|
|
|
|
|
|
@on-choose-complete='onchoosecomplete' @on-success='onsuccess' @on-uploaded='onuploaded'></u-upload>
|
|
|
|
|
|
<view class="textarea">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
<view class="title">
|
|
|
|
|
|
温馨提示:
|
|
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
1.下单后24h内我们会和您确认具体时间点
|
2023-10-16 15:11:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
2.请提前准备好健康资料,以备专家参考
|
2023-10-16 15:11:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="">
|
2023-10-17 11:02:14 +08:00
|
|
|
|
3.请提前下载“腾讯会议”APP
|
2023-10-16 15:11:26 +08:00
|
|
|
|
</view>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="btns">
|
|
|
|
|
|
<view class="btnleft">
|
2023-11-10 13:57:07 +08:00
|
|
|
|
¥<text>{{formdata.price}}</text>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
</view>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<view class="btnright" @tap='updata'>
|
|
|
|
|
|
保存
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="">
|
|
|
|
|
|
<m-city style='z-index: 10076;' :provinceData="list" headTitle="请选择所属地区" ref="cityPicker"
|
|
|
|
|
|
@funcValue="getpickerParentValue" pickerSize="4">
|
|
|
|
|
|
</m-city>
|
|
|
|
|
|
</view>
|
2023-10-31 15:49:29 +08:00
|
|
|
|
<!-- 弹框 -->
|
|
|
|
|
|
<u-popup v-model="buyshow" mode="bottom" length="45%" border-radius="30" :closeable='true'>
|
|
|
|
|
|
<view class="payment">
|
|
|
|
|
|
请选择支付方式
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="chat">
|
2023-11-16 11:57:19 +08:00
|
|
|
|
<image src="/pagesB/static/chat.png" mode=""></image>
|
2023-10-31 15:49:29 +08:00
|
|
|
|
<span>微信支付</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="submits" @tap='buy'>
|
|
|
|
|
|
确认支付¥{{formdata.price}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</u-popup>
|
2023-09-22 11:08:14 +08:00
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
2023-10-16 15:11:26 +08:00
|
|
|
|
|
2023-09-22 11:08:14 +08:00
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
2023-10-16 15:11:26 +08:00
|
|
|
|
getSubordinateRegions,
|
|
|
|
|
|
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
|
|
|
|
|
import gkcity from "../../components/m-city/m-city.vue";
|
|
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
2023-09-22 11:08:14 +08:00
|
|
|
|
import {
|
2023-10-16 15:11:26 +08:00
|
|
|
|
consultationInfo
|
|
|
|
|
|
} from '@/api/pagesB/createnewconsultation/createnewconsultation.js'
|
2023-10-17 11:02:14 +08:00
|
|
|
|
import {
|
2023-10-31 15:49:29 +08:00
|
|
|
|
getListByDoctor,
|
|
|
|
|
|
addHealthConsultationOrder,
|
|
|
|
|
|
appletGoodsOrderPay
|
2023-10-17 11:02:14 +08:00
|
|
|
|
} from '@/api/pagesB/confirmation/index.js'
|
|
|
|
|
|
import tabs from '@/components/utabs/u-tabs.vue'
|
2023-09-22 11:08:14 +08:00
|
|
|
|
export default {
|
2023-10-16 15:11:26 +08:00
|
|
|
|
components: {
|
2023-10-17 11:02:14 +08:00
|
|
|
|
"m-city": gkcity,
|
|
|
|
|
|
tabs
|
2023-10-16 15:11:26 +08:00
|
|
|
|
},
|
2023-09-22 11:08:14 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-10-31 15:49:29 +08:00
|
|
|
|
buyshow: false,
|
2023-10-17 11:02:14 +08:00
|
|
|
|
uoloadaction: '', // 非真实地址
|
2023-10-16 15:11:26 +08:00
|
|
|
|
list: [],
|
|
|
|
|
|
addresslength: null,
|
|
|
|
|
|
imglistlength: null,
|
|
|
|
|
|
address: '请选择所属地区', //页面所属区域
|
2023-10-17 11:42:24 +08:00
|
|
|
|
Soonerorlater: 'morning',
|
2023-10-17 11:02:14 +08:00
|
|
|
|
timecurrent: 0, //时间下标
|
2023-10-17 14:13:17 +08:00
|
|
|
|
timeindex: 0,
|
2023-10-17 11:02:14 +08:00
|
|
|
|
appointmentTimeList: [],
|
2023-10-30 10:36:26 +08:00
|
|
|
|
timer: null,
|
2023-10-16 15:11:26 +08:00
|
|
|
|
formdata: {
|
2023-10-17 11:42:24 +08:00
|
|
|
|
address: null,
|
|
|
|
|
|
patientId: null,
|
|
|
|
|
|
patientName: null,
|
|
|
|
|
|
cardNo: null,
|
|
|
|
|
|
phone: null,
|
2023-10-17 11:02:14 +08:00
|
|
|
|
address: null,
|
|
|
|
|
|
doctorId: null,
|
|
|
|
|
|
doctorName: null,
|
2023-11-15 09:47:23 +08:00
|
|
|
|
schedulePlanDetailId: null,
|
2023-10-17 11:02:14 +08:00
|
|
|
|
consultationType: 'VIDEO_CONSULTATION',
|
|
|
|
|
|
problemDescription: null,
|
|
|
|
|
|
situationDescription: null,
|
|
|
|
|
|
problemStatement: null,
|
|
|
|
|
|
medicalRecord: null,
|
|
|
|
|
|
fileUrls: [],
|
|
|
|
|
|
appointmentDate: null,
|
|
|
|
|
|
appointmentStartTime: null,
|
|
|
|
|
|
appointmentEndTime: null,
|
2023-10-27 09:36:30 +08:00
|
|
|
|
orderChannel: "WECHAT_APPLET",
|
2023-10-31 15:49:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
updatalist: {
|
|
|
|
|
|
consultationInfoId: '',
|
|
|
|
|
|
totalPrice: null,
|
|
|
|
|
|
receiver: null,
|
|
|
|
|
|
hospitalPersonId: null,
|
|
|
|
|
|
hospitalPersonName: '',
|
|
|
|
|
|
orderChannel: "WECHAT_APPLET",
|
|
|
|
|
|
patientId: null,
|
|
|
|
|
|
phone: null,
|
|
|
|
|
|
healthAppointDate: null,
|
|
|
|
|
|
appointmentStartTime: null,
|
|
|
|
|
|
appointmentEndTime: null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// "healthConsultationContent": '',
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2023-11-15 09:47:23 +08:00
|
|
|
|
id: '',
|
2023-10-16 15:11:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
2023-10-17 11:42:24 +08:00
|
|
|
|
let userinfo = uni.getStorageSync('userinfo');
|
|
|
|
|
|
this.formdata.patientId = userinfo.id
|
|
|
|
|
|
this.formdata.patientName = userinfo.patientName
|
|
|
|
|
|
this.formdata.cardNo = userinfo.cardNo
|
|
|
|
|
|
this.formdata.phone = userinfo.phone
|
2023-10-17 11:02:14 +08:00
|
|
|
|
this.formdata.doctorName = options.doctorName
|
|
|
|
|
|
this.formdata.doctorId = options.doctorId
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.formdata.price = options.price
|
2023-10-16 15:11:26 +08:00
|
|
|
|
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
|
|
|
|
|
|
this.areaInfo();
|
2023-10-17 11:02:14 +08:00
|
|
|
|
this.getListByDoctorinfo();
|
2023-09-22 11:08:14 +08:00
|
|
|
|
},
|
2023-10-17 11:02:14 +08:00
|
|
|
|
onShow() {},
|
2023-09-22 11:08:14 +08:00
|
|
|
|
methods: {
|
2023-10-17 11:42:24 +08:00
|
|
|
|
//切换上下午
|
|
|
|
|
|
tapSoonerorlater(item) {
|
|
|
|
|
|
this.Soonerorlater = item
|
|
|
|
|
|
this.timeindex = 0
|
|
|
|
|
|
if (item == 'morning') {
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.formdata.appointmentStartTime = this.appointmentTimeList[this.timecurrent].morningList[0]
|
2023-10-17 11:42:24 +08:00
|
|
|
|
.starttime
|
2023-11-16 15:08:07 +08:00
|
|
|
|
if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0]
|
|
|
|
|
|
.schedulePlanDetailId
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = ''
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-10-17 11:42:24 +08:00
|
|
|
|
} else if (item == 'after') {
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.formdata.appointmentEndTime = this.appointmentTimeList[this.timecurrent].morningList[0]
|
2023-10-17 11:42:24 +08:00
|
|
|
|
.endtime
|
2023-11-16 15:08:07 +08:00
|
|
|
|
if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].afternoonList[0]
|
|
|
|
|
|
.schedulePlanDetailId
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = ''
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-11-15 17:21:21 +08:00
|
|
|
|
|
2023-10-17 11:42:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
//选择时间
|
|
|
|
|
|
taptime(item, index) {
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.formdata.appointmentStartTime = item.starttime
|
|
|
|
|
|
this.formdata.appointmentEndTime = item.endtime
|
2023-11-14 15:14:40 +08:00
|
|
|
|
this.formdata.schedulePlanDetailId = item.schedulePlanDetailId
|
2023-10-17 11:42:24 +08:00
|
|
|
|
this.timeindex = index
|
|
|
|
|
|
},
|
2023-10-17 11:02:14 +08:00
|
|
|
|
timechange(index) {
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.formdata.appointmentDate = this.appointmentTimeList[index].scheduleDate
|
2023-10-17 11:42:24 +08:00
|
|
|
|
if (this.timecurrent != index) {
|
|
|
|
|
|
this.timecurrent = index
|
2023-10-17 14:13:17 +08:00
|
|
|
|
this.timeindex = 0
|
|
|
|
|
|
this.formdata.appointmentStartTime = this.appointmentTimeList[this.timecurrent].morningList[0]
|
|
|
|
|
|
.starttime
|
|
|
|
|
|
this.formdata.appointmentEndTime = this.appointmentTimeList[this.timecurrent].morningList[0]
|
|
|
|
|
|
.endtime
|
2023-11-16 15:08:07 +08:00
|
|
|
|
if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0]
|
|
|
|
|
|
.schedulePlanDetailId
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formdata.schedulePlanDetailId = ''
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-10-17 11:42:24 +08:00
|
|
|
|
}
|
2023-10-17 11:02:14 +08:00
|
|
|
|
},
|
2023-10-16 15:11:26 +08:00
|
|
|
|
updata() {
|
|
|
|
|
|
if (this.imglistlength > 0) {
|
|
|
|
|
|
this.$refs.uUpload.upload()
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.info();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onchoosecomplete(lists, name) {
|
|
|
|
|
|
this.imglistlength = lists.length
|
2023-09-22 11:08:14 +08:00
|
|
|
|
},
|
2023-10-16 15:11:26 +08:00
|
|
|
|
onsuccess(data, index, lists, name) {
|
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
|
this.formdata.fileUrls.push(data.fileUrl)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onuploaded() {
|
|
|
|
|
|
this.info();
|
|
|
|
|
|
},
|
2023-10-31 15:49:29 +08:00
|
|
|
|
// 支付
|
|
|
|
|
|
buy() {
|
2023-11-15 09:47:23 +08:00
|
|
|
|
var that = this
|
2023-10-31 15:49:29 +08:00
|
|
|
|
that.updatalist.hospitalPersonId = that.formdata.doctorId
|
|
|
|
|
|
that.updatalist.hospitalPersonName = that.formdata.doctorName
|
|
|
|
|
|
that.updatalist.totalPrice = that.formdata.price
|
|
|
|
|
|
that.updatalist.receiver = that.formdata.patientName
|
|
|
|
|
|
that.updatalist.patientId = that.formdata.patientId
|
|
|
|
|
|
that.updatalist.phone = that.formdata.phone
|
|
|
|
|
|
that.updatalist.healthAppointDate = that.formdata.appointmentDate
|
|
|
|
|
|
that.updatalist.appointmentStartTime = that.formdata.appointmentStartTime
|
|
|
|
|
|
that.updatalist.appointmentEndTime = that.formdata.appointmentEndTime
|
|
|
|
|
|
addHealthConsultationOrder(that.updatalist).then(res => {
|
|
|
|
|
|
res.data.payType = "WECHAT_PAY"
|
|
|
|
|
|
res.data.paymentPrice = res.data.totalPrice
|
|
|
|
|
|
res.data.openid = uni.getStorageSync('openid');
|
|
|
|
|
|
that.id = res.data.id
|
|
|
|
|
|
appletGoodsOrderPay(res.data).then(response => {
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
uni.requestPayment({
|
|
|
|
|
|
timeStamp: response.data.timeStamp,
|
|
|
|
|
|
nonceStr: response.data.nonceStr,
|
|
|
|
|
|
package: response.data.prepayId,
|
|
|
|
|
|
signType: response.data.signType,
|
|
|
|
|
|
paySign: response.data.paySign,
|
|
|
|
|
|
success: function(res) {
|
2023-11-15 09:47:23 +08:00
|
|
|
|
pushMeg({
|
|
|
|
|
|
orderId: item.goodsOrderId,
|
|
|
|
|
|
patientId: item.patientId
|
|
|
|
|
|
}).then(respp => {
|
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
|
title: '支付成功',
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
duration: 1500,
|
2023-10-31 15:49:29 +08:00
|
|
|
|
})
|
2023-11-15 09:47:23 +08:00
|
|
|
|
if (that.timer) {
|
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
|
}
|
|
|
|
|
|
that.timer = setTimeout(e => {
|
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
|
url: '/pagesB/paysuccess/paysuccess'
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 1500)
|
|
|
|
|
|
})
|
2023-10-31 15:49:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
fail: function(err) {
|
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
|
title: '取消支付',
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
duration: 1500,
|
|
|
|
|
|
})
|
|
|
|
|
|
if (that.timer) {
|
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
|
}
|
|
|
|
|
|
that.timer = setTimeout(e => {
|
|
|
|
|
|
uni.redirectTo({
|
2023-11-02 14:14:43 +08:00
|
|
|
|
url: `/pagesB/orderDetails/orderDetails?goodsOrderId=${that.id}&delta=${2}`
|
2023-10-31 15:49:29 +08:00
|
|
|
|
})
|
|
|
|
|
|
}, 1500)
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
|
title: response.msg,
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
duration: 2000
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 保存
|
2023-10-16 15:11:26 +08:00
|
|
|
|
info() {
|
2023-10-17 14:13:17 +08:00
|
|
|
|
consultationInfo(this.formdata).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
2023-10-31 15:49:29 +08:00
|
|
|
|
this.buyshow = true
|
|
|
|
|
|
this.updatalist.consultationInfoId = res.data.id
|
|
|
|
|
|
} else if (res.code == 500) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: res.msg,
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
duration: 1500,
|
2023-10-17 14:13:17 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2023-10-17 11:02:14 +08:00
|
|
|
|
},
|
|
|
|
|
|
getListByDoctorinfo() {
|
|
|
|
|
|
getListByDoctor(this.formdata.doctorId).then(res => {
|
|
|
|
|
|
res.data.forEach(e => {
|
|
|
|
|
|
e.dates = e.scheduleDate.slice(5, 10)
|
|
|
|
|
|
e.name = e.week
|
2023-10-17 14:13:17 +08:00
|
|
|
|
e.morningList.length > 0 ? e.morningList.forEach(el => {
|
2023-10-17 11:42:24 +08:00
|
|
|
|
el.starttime = el.scheduleTimeSlot.split('~')[0]
|
|
|
|
|
|
el.endtime = el.scheduleTimeSlot.split('~')[1]
|
2023-10-17 14:13:17 +08:00
|
|
|
|
}) : ''
|
|
|
|
|
|
e.afternoonList.length > 0 ? e.afternoonList.forEach(el => {
|
2023-10-17 11:42:24 +08:00
|
|
|
|
el.starttime = el.scheduleTimeSlot.split('~')[0]
|
|
|
|
|
|
el.endtime = el.scheduleTimeSlot.split('~')[1]
|
2023-10-17 14:13:17 +08:00
|
|
|
|
}) : ''
|
2023-10-17 11:02:14 +08:00
|
|
|
|
})
|
2023-10-17 11:42:24 +08:00
|
|
|
|
this.formdata.appointmentDate = res.data[0].scheduleDate
|
2023-10-17 14:13:17 +08:00
|
|
|
|
res.data[0]?.morningList[0]?.starttime ? this.formdata.appointmentStartTime = res.data[0]
|
|
|
|
|
|
.morningList[0].starttime : ''
|
|
|
|
|
|
res.data[0]?.morningList[0]?.endtime ? this.formdata.appointmentEndTime = res.data[0]
|
|
|
|
|
|
.morningList[0].endtime : ''
|
2023-11-16 15:08:07 +08:00
|
|
|
|
if (res.data[0]?.morningList[0]?.status == true) {
|
|
|
|
|
|
res.data[0]?.morningList[0]?.scheduleDetailId ? this.formdata.scheduleDetailId = res.data[
|
|
|
|
|
|
0]
|
|
|
|
|
|
.morningList[0].scheduleDetailId : ''
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formdata.scheduleDetailId = ''
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-17 11:02:14 +08:00
|
|
|
|
this.appointmentTimeList = res.data
|
2023-11-16 15:08:07 +08:00
|
|
|
|
console.log(this.appointmentTimeList, '0000')
|
2023-09-22 11:08:14 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-10-16 15:11:26 +08:00
|
|
|
|
// 显示三级地址联动
|
|
|
|
|
|
showPicker() {
|
|
|
|
|
|
this.$refs.cityPicker.show();
|
|
|
|
|
|
},
|
|
|
|
|
|
//区街道
|
|
|
|
|
|
areaInfo() {
|
|
|
|
|
|
getSubordinateRegions().then(res => {
|
|
|
|
|
|
this.list = res.data;
|
2023-09-22 11:08:14 +08:00
|
|
|
|
})
|
2023-10-16 15:11:26 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 三级地址联动回调
|
|
|
|
|
|
getpickerParentValue(e) {
|
|
|
|
|
|
e = e.filter(ele => ele.localName != '暂不选择')
|
|
|
|
|
|
e = e.filter(ele => ele.localName != '暂无需选择')
|
|
|
|
|
|
this.addresslength = e
|
|
|
|
|
|
this.formdata.address = ''
|
|
|
|
|
|
this.address = ''
|
|
|
|
|
|
if (e && e.length >= 1) {
|
|
|
|
|
|
e.forEach(el => {
|
|
|
|
|
|
this.formdata.address = this.formdata.address + el.localName
|
|
|
|
|
|
this.address = this.address + el.localName
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formdata.address = ''
|
|
|
|
|
|
this.address = '请选择所属地区'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-09-22 11:08:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2023-10-16 15:11:26 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
@import './confirmation.scss';
|
2023-11-16 15:08:07 +08:00
|
|
|
|
</style>
|