修改
This commit is contained in:
parent
a09141faa8
commit
d06d9d2cec
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
|
||||
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="timeshow" length="auto"
|
||||
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex">
|
||||
<view class="u-datetime-picker">
|
||||
<view class="u-picker-header" @touchmove.stop.prevent="">
|
||||
@ -32,11 +32,9 @@
|
||||
<text class="u-text" v-if="showTimeTag"></text>
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column style="flex:2">
|
||||
<view class="u-column-item">
|
||||
<text class="u-text">一</text>
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<view class="u-column-item">
|
||||
<text class="u-text">一</text>
|
||||
</view>
|
||||
<picker-view-column v-if="!reset && params.endmonth" style="flex:5">
|
||||
<view class="u-column-item" v-for="(item, index) in months" :key="index">
|
||||
{{ formatNumber(item) }}
|
||||
@ -56,34 +54,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* picker picker弹出选择器
|
||||
* @description 此选择器有两种弹出模式:一是时间模式,可以配置年,日,月,时,分,秒参数 二是地区模式,可以配置省,市,区参数
|
||||
* @tutorial https://www.uviewui.com/components/picker.html
|
||||
* @property {Object} params 需要显示的参数,见官网说明
|
||||
* @property {String} mode 模式选择,region-地区类型,time-时间类型(默认time)
|
||||
* @property {String Number} start-year 可选的开始年份,mode=time时有效(默认1950)
|
||||
* @property {String Number} end-year 可选的结束年份,mode=time时有效(默认2050)
|
||||
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
|
||||
* @property {Boolean} show-time-tag 时间模式时,是否显示后面的年月日中文提示
|
||||
* @property {String} cancel-color 取消按钮的颜色(默认#606266)
|
||||
* @property {String} confirm-color 确认按钮的颜色(默认#2979ff)
|
||||
* @property {String} default-time 默认选中的时间,mode=time时有效
|
||||
* @property {String} confirm-text 确认按钮的文字
|
||||
* @property {String} cancel-text 取消按钮的文字
|
||||
* @property {String} default-region 默认选中的地区,中文形式,mode=region时有效
|
||||
* @property {String} default-code 默认选中的地区,编号形式,mode=region时有效
|
||||
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker(默认true)
|
||||
* @property {String Number} z-index 弹出时的z-index值(默认1075)
|
||||
* @property {Array} default-selector 数组形式,其中每一项表示选择了range对应项中的第几个
|
||||
* @property {Array} range 自定义选择的数据,mode=selector或mode=multiSelector时有效
|
||||
* @property {String} range-key 当range参数的元素为对象时,指定Object中的哪个key的值作为选择器显示内容
|
||||
* @event {Function} confirm 点击确定按钮,返回当前选择的值
|
||||
* @event {Function} cancel 点击取消按钮,返回当前选择的值
|
||||
* @example <u-picker v-model="show" mode="time"></u-picker>
|
||||
*/
|
||||
export default {
|
||||
name: 'u-picker',
|
||||
name: 'timepicker',
|
||||
props: {
|
||||
// picker中需要显示的参数
|
||||
params: {
|
||||
@ -93,35 +65,11 @@
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
endday: true,
|
||||
endmonth: true,
|
||||
endhour: false,
|
||||
minute: false,
|
||||
endminute: false,
|
||||
second: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
// 当mode=selector或者mode=multiSelector时,提供的数组
|
||||
range: {
|
||||
type: Array,
|
||||
default () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
|
||||
defaultSelector: {
|
||||
type: Array,
|
||||
default () {
|
||||
return [0];
|
||||
}
|
||||
},
|
||||
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
|
||||
rangeKey: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 模式选择,region-地区类型,time-时间类型,selector-单列模式,multiSelector-多列模式
|
||||
mode: {
|
||||
type: String,
|
||||
@ -167,7 +115,7 @@
|
||||
default: true
|
||||
},
|
||||
// 通过双向绑定控制组件的弹出与收起
|
||||
value: {
|
||||
timepicker: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
@ -179,7 +127,7 @@
|
||||
// 顶部标题
|
||||
title: {
|
||||
type: String,
|
||||
default: '预约时间区间'
|
||||
default: ''
|
||||
},
|
||||
// 取消按钮的文字
|
||||
cancelText: {
|
||||
@ -194,6 +142,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timeshow: false,
|
||||
years: [],
|
||||
months: [],
|
||||
days: [],
|
||||
@ -214,14 +163,6 @@
|
||||
this.init();
|
||||
},
|
||||
computed: {
|
||||
propsChange() {
|
||||
// 引用这几个变量,是为了监听其变化
|
||||
return `${this.mode}-${this.defaultTime}-${this.startYear}-${this.endYear}-${this.defaultRegion}-${this.areaCode}`;
|
||||
},
|
||||
regionChange() {
|
||||
// 引用这几个变量,是为了监听其变化
|
||||
return `${this.province}-${this.city}`;
|
||||
},
|
||||
yearAndMonth() {
|
||||
return `${this.year}-${this.month}`;
|
||||
},
|
||||
@ -231,18 +172,9 @@
|
||||
uZIndex() {
|
||||
// 如果用户有传递z-index值,优先使用
|
||||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
propsChange() {
|
||||
this.reset = true;
|
||||
setTimeout(() => this.init(), 10);
|
||||
},
|
||||
// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
|
||||
regionChange(val) {
|
||||
this.citys = citys[this.province];
|
||||
this.areas = areas[this.province][this.city];
|
||||
},
|
||||
// watch监听月份的变化,实时变更日的天数,因为不同月份,天数不一样
|
||||
// 一个月可能有30,31天,甚至闰年2月的29天,平年2月28天
|
||||
yearAndMonth(val) {
|
||||
@ -256,7 +188,8 @@
|
||||
}
|
||||
},
|
||||
// 微信和QQ小程序由于一些奇怪的原因(故同时对所有平台均初始化一遍),需要重新初始化才能显示正确的值
|
||||
value(n) {
|
||||
timepicker(n) {
|
||||
this.timeshow = this.timepicker
|
||||
if (n) {
|
||||
this.reset = true;
|
||||
setTimeout(() => this.init(), 10);
|
||||
@ -276,14 +209,6 @@
|
||||
this.moving = false;
|
||||
// #endif
|
||||
},
|
||||
// 对单列和多列形式的判断是否有传入变量的情况
|
||||
getItemValue(item, mode) {
|
||||
// 目前(2020-05-25)uni-app对微信小程序编译有错误,导致v-if为false中的内容也执行,错误导致
|
||||
// 单列模式或者多列模式中的getItemValue同时被执行,故在这里再加一层判断
|
||||
if (this.mode == mode) {
|
||||
return typeof item == 'object' ? item[this.rangeKey] : item;
|
||||
}
|
||||
},
|
||||
// 小于10前面补0,用于月份,日期,时分秒等
|
||||
formatNumber(num) {
|
||||
return +num < 10 ? '0' + num : String(num);
|
||||
@ -378,7 +303,6 @@
|
||||
},
|
||||
setendDays() {
|
||||
let totalDays = new Date(this.year, this.endmonth, 0).getDate();
|
||||
console.log(totalDays, 'total2')
|
||||
this.enddays = this.generateArray(1, totalDays);
|
||||
let index = 0;
|
||||
// 这里不能使用类似setMonths()中的this.valueArr.splice(this.valueArr.length - 1, xxx)做法
|
||||
@ -392,10 +316,6 @@
|
||||
if (this.endday > this.enddays.length) this.endday = this.enddays.length;
|
||||
this.valueArr.splice(index, 1, this.getIndex(this.enddays, this.endday));
|
||||
},
|
||||
// setSeconds() {
|
||||
// this.seconds = this.generateArray(0, 59);
|
||||
// this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.seconds, this.second));
|
||||
// },
|
||||
close() {
|
||||
this.$emit('input', false);
|
||||
},
|
||||
@ -403,41 +323,30 @@
|
||||
change(e) {
|
||||
this.valueArr = e.detail.value;
|
||||
let i = 0;
|
||||
let result = {};
|
||||
if (this.mode == 'time') {
|
||||
// 这里使用i++,是因为this.valueArr数组的长度是不确定长度的,它根据this.params的值来配置长度
|
||||
// 进入if规则,i会加1,保证了能获取准确的值
|
||||
if (this.params.year) result.year = this.years[this.valueArr[i++]];
|
||||
if (this.params.month) result.month = this.months[this.valueArr[i++]];
|
||||
if (this.params.day) result.day = this.days[this.valueArr[i++]];
|
||||
i++
|
||||
if (this.params.endmonth) result.endmonth = this.months[this.valueArr[i++]];
|
||||
if (this.params.endday) result.endday = this.enddays[this.valueArr[i++]];
|
||||
// if (this.params.year) result.year = this.formatNumber(this.year || 0);
|
||||
// if (this.params.month) result.month = this.formatNumber(this.month || 0);
|
||||
// if (this.params.endmonth) result.endmonth = this.formatNumber(this.endmonth || 0);
|
||||
// if (this.params.day) result.day = this.formatNumber(this.day || 0);
|
||||
// if (this.params.endday) result.endday = this.formatNumber(this.endday || 0);
|
||||
// this.$emit('confirm', result);
|
||||
}
|
||||
// 这里使用i++,是因为this.valueArr数组的长度是不确定长度的,它根据this.params的值来配置长度
|
||||
// 进入if规则,i会加1,保证了能获取准确的值
|
||||
if (this.params.year) this.year = this.years[this.valueArr[i++]];
|
||||
if (this.params.month) this.month = this.months[this.valueArr[i++]];
|
||||
if (this.params.day) this.day = this.days[this.valueArr[i++]];
|
||||
if (this.params.endmonth) this.endmonth = this.months[this.valueArr[i++]];
|
||||
if (this.params.endday) this.endday = this.enddays[this.valueArr[i++]];
|
||||
},
|
||||
// 用户点击确定按钮
|
||||
getResult(event = null) {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (this.moving) return;
|
||||
// #endif
|
||||
let result = {};
|
||||
// 只返回用户在this.params中配置了为true的字段
|
||||
if (this.mode == 'time') {
|
||||
if (this.params.year) result.year = this.formatNumber(this.year || 0);
|
||||
if (this.params.month) result.month = this.formatNumber(this.month || 0);
|
||||
if (this.params.endmonth) result.endmonth = this.formatNumber(this.endmonth || 0);
|
||||
if (this.params.day) result.day = this.formatNumber(this.day || 0);
|
||||
if (this.params.endday) result.endday = this.formatNumber(this.endday || 0);
|
||||
// if (this.params.second) result.second = this.formatNumber(this.second || 0);
|
||||
// if (this.params.timestamp) result.timestamp = this.getTimestamp();
|
||||
}
|
||||
if (event) this.$emit(event, result);
|
||||
if (this.params.year) result.year = this.formatNumber(this.year || 0);
|
||||
if (this.params.month) result.month = this.formatNumber(this.month || 0);
|
||||
if (this.params.day) result.day = this.formatNumber(this.day || 0);
|
||||
if (this.params.endmonth) result.endmonth = this.formatNumber(this.endmonth || 0);
|
||||
if (this.params.endday) result.endday = this.formatNumber(this.endday || 0);
|
||||
// const newObj = {};
|
||||
// for (let prop in result) {
|
||||
// if (result.hasOwnProperty(prop) && (prop === 'year' || prop === 'month')) {
|
||||
// newObj[prop] = result[prop];
|
||||
// }
|
||||
// }
|
||||
this.$emit('timeconfirm', result);
|
||||
this.close();
|
||||
},
|
||||
// 获取时间戳
|
||||
@ -451,7 +360,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||
@mixin vue-flex($direction: row) {
|
||||
/* #ifndef APP-NVUE */
|
||||
@ -501,7 +410,7 @@
|
||||
.u-picker-body {
|
||||
padding-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
height: 500rpx;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
22
pages.json
22
pages.json
@ -9,6 +9,18 @@
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/hospitalcare/hospitalcare",
|
||||
"style": {
|
||||
"navigationBarTitleText": "院内陪护",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/appointmenttime/appointmenttime",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约时间",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/information/information",
|
||||
"style": {
|
||||
@ -22,12 +34,6 @@
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/appointmenttime/appointmenttime",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约时间",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/medicine/medicine",
|
||||
"style": {
|
||||
@ -85,8 +91,7 @@
|
||||
"navigationBarTitleText": "修改地址",
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "pages/lookrate/lookrate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "查看评价",
|
||||
@ -310,7 +315,6 @@
|
||||
"navigationBarTitleText": "护理机构",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -37,11 +37,24 @@
|
||||
<view class="drug">·{{list.nurseItemName}} </view>
|
||||
</view>
|
||||
<view class="content">服务信息
|
||||
<view class="contacts">·联系人:{{list.patientName}}</view>
|
||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
||||
<view class="contacts">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}</view>
|
||||
<view class="contacts">·下单时间:{{list.createTime}}</view>
|
||||
<view class="" v-if="list.orderType=='COMPANION_IN_HOSPITAL'">
|
||||
<view class="contacts" v-if="list.caregiverName">·姓名:{{list.caregiverName}}</view>
|
||||
<view class="contacts" v-if="list.caregiverPhone">·电话:{{list.caregiverPhone}}</view>
|
||||
<view class="contacts" v-if="list.hospitalName">·医院:{{list.hospitalName}}</view>
|
||||
<view class="contacts" v-if="list.departmentName">·科室:{{list.departmentName}}</view>
|
||||
<view class="contacts" v-if="list.hospitalBedNumber">·病床号:{{list.hospitalBedNumber}}</view>
|
||||
<view class="contacts" v-if="list.companionStartDate&&list.companionEndDate">
|
||||
·时间:{{list.companionStartDate}} - {{list.companionEndDate}}</view>
|
||||
<view class="contacts" v-if="list.createTime">·下单时间:{{list.createTime}}</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="contacts" v-if="list.patientName">·姓名:{{list.patientName}}</view>
|
||||
<view class="contacts" v-if="list.patientPhone">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts" v-if="list.serviceAddress">·地址:{{list.serviceAddress}}</view>
|
||||
<view class="contacts" v-if="list.serviceDate">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}
|
||||
</view>
|
||||
<view class="contacts" v-if="list.createTime">·下单时间:{{list.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Package">套餐信息:
|
||||
<span>¥{{list.nurseItemPrice}}</span>
|
||||
@ -49,7 +62,7 @@
|
||||
·{{list.nurseItemName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList.length>0'>耗材包详情:
|
||||
<span v-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-else>¥0</span>
|
||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
||||
@ -58,7 +71,7 @@
|
||||
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
<view class="remarks" v-if="list.orderType!='COMPANION_IN_HOSPITAL'">
|
||||
<view>备注:</view>
|
||||
<input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
|
||||
</view>
|
||||
|
||||
@ -334,7 +334,8 @@
|
||||
//跳转
|
||||
gopzyh() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/nursestation/nursestation?nurseStationId=${13}&hospitalcare=${true}`
|
||||
// url: `/pages/nursestation/nursestation?nurseStationId=${13}&hospitalcare=${true}`
|
||||
url: `/pages/nursestation/nursestation?nurseStationId=${3}&hospitalcare=${true}`
|
||||
})
|
||||
},
|
||||
//跳转贴心智养
|
||||
|
||||
@ -1,55 +1,186 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="app" v-if="orderlist.totalPrice">
|
||||
<view class="userinfo">
|
||||
<view class="item">
|
||||
<span>姓名:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='5' />
|
||||
<u-input :clearable='false' v-model="orderlist.patientName" type="text" placeholder='请输入'
|
||||
maxlength='5' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>电话:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='11' />
|
||||
<u-input :clearable='false' v-model="orderlist.caregiverPhone" type="text" placeholder='请输入'
|
||||
maxlength='11' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>医院:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='20' />
|
||||
<u-input :clearable='false' v-model="orderlist.hospitalName" type="text" placeholder='请输入'
|
||||
maxlength='20' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>科室:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='20' />
|
||||
<u-input :clearable='false' v-model="orderlist.departmentName" type="text" placeholder='请输入'
|
||||
maxlength='20' />
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>病床号:</span>
|
||||
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='20' />
|
||||
<u-input :clearable='false' v-model="orderlist.hospitalBedNumber" type="text" placeholder='请输入'
|
||||
maxlength='20' />
|
||||
</view>
|
||||
<view class="item" style="border: none;" @tap='timepicker=true'>
|
||||
<view class="item" style="border: none;" @tap='timepickertrue'>
|
||||
<span>时间:</span>
|
||||
<u-input :clearable='false' disabled type="text" placeholder='请选择服务时间' />
|
||||
<p v-if="timevalue" style='color: black;'>{{timevalue}}</p>
|
||||
<p v-else>请选择服务时间</p>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottomitem">
|
||||
<view class="item">
|
||||
<span>数量:</span>
|
||||
<u-number-box v-model="companionDays" @change="numbervalChange" bg-color='#557BC2' :min='1'
|
||||
color='#fff'>
|
||||
</u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<timepicker :timepicker="timepicker" @timeconfirm='timeconfirm' @input='timeclose'></timepicker>
|
||||
<u-toast ref="uToast" />
|
||||
<view class="updata">
|
||||
<view class="price">
|
||||
¥{{orderlist.totalPrice}}
|
||||
</view>
|
||||
<view class="purchase" @click="updata">
|
||||
购买
|
||||
</view>
|
||||
</view>
|
||||
<picker v-model="timepicker" @confirm='confirm'></picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import picker from '../picker/picker.vue'
|
||||
import timepicker from '../../components/timepicker/timepicker.vue'
|
||||
import {
|
||||
getAppStationItemInfo,
|
||||
appletAppointmentOrderPay
|
||||
} from '@/api/appointmenttime/appointmenttime.js'
|
||||
import {
|
||||
accompanyingDiagnosis
|
||||
} from '@/api/hospitalcare/index.js'
|
||||
export default {
|
||||
components: {
|
||||
picker
|
||||
timepicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
companionDays: 1,
|
||||
orderlist: {
|
||||
patientName: undefined,
|
||||
caregiverPhone: undefined,
|
||||
hospitalName: undefined,
|
||||
departmentName: undefined,
|
||||
hospitalBedNumber: undefined,
|
||||
nurseStationItemId: undefined,
|
||||
companionStartDate: undefined,
|
||||
companionEndDate: undefined,
|
||||
totalPrice: undefined
|
||||
},
|
||||
timevalue: undefined,
|
||||
timepicker: false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
onLoad(options) {
|
||||
|
||||
this.orderlist.nurseStationItemId = options.stationItemId
|
||||
this.orderlist.nurseStationItemPriceId = options.stationItemPriceId
|
||||
this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
|
||||
},
|
||||
watch: {
|
||||
companionDays() {
|
||||
this.orderlist.totalPrice = this.companionDays * this.orderlist.nurseItemPrice
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
updata() {
|
||||
var that = this
|
||||
this.orderlist.companionDays = this.companionDays
|
||||
this.orderlist.orderType = 'COMPANION_IN_HOSPITAL'
|
||||
this.orderlist.patientId = uni.getStorageSync('patientId');
|
||||
this.orderlist.orderCount = 1;
|
||||
this.orderlist.orderChannel = 'WECHAT_APPLET'
|
||||
accompanyingDiagnosis(this.orderlist).then(res => {
|
||||
if (res.code == 500) {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
} else if (res.code == 200) {
|
||||
let obj = {
|
||||
patientId: uni.getStorageSync('patientId'),
|
||||
openid: uni.getStorageSync('openid'),
|
||||
orderNo: res.data.orderNo,
|
||||
orderChannel: 'WECHAT_APPLET',
|
||||
paymentPrice: res.data.totalPrice,
|
||||
payType: "WECHAT_PAY",
|
||||
buySource: "NURSE_STATION",
|
||||
}
|
||||
appletAppointmentOrderPay(obj).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) {
|
||||
that.$refs.uToast.show({
|
||||
title: '预约成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消预约',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取耗材包详情
|
||||
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
|
||||
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
|
||||
res.data.nurseItemContent = ''
|
||||
this.orderlist.totalPrice = res.data.totalPrice
|
||||
this.orderlist.nurseItemName = res.data.nurseItemName
|
||||
this.orderlist.nurseItemPrice = res.data.nurseItemPrice
|
||||
this.orderlist.itemServeDurationUnit = res.data.serveDurationUnit;
|
||||
})
|
||||
},
|
||||
numbervalChange(e) {
|
||||
this.orderlist.orderCount = e.value
|
||||
},
|
||||
timeclose(e) {
|
||||
this.timepicker = false
|
||||
},
|
||||
timepickertrue() {
|
||||
this.timepicker = true
|
||||
},
|
||||
timeconfirm(e) {
|
||||
console.log(e)
|
||||
this.orderlist.companionStartDate = e.year + '-' + e.month + '-' + e.day
|
||||
this.orderlist.companionEndDate = e.year + '-' + e.endmonth + '-' + e.endday
|
||||
var starttime = e.year + '.' + e.month + '.' + e.day
|
||||
var endtime = e.year + '.' + e.endmonth + '.' + e.endday
|
||||
this.timevalue = starttime + ' - ' + endtime
|
||||
this.timepicker = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -58,7 +189,54 @@
|
||||
.app {
|
||||
padding: 10rpx 0 0;
|
||||
|
||||
.userinfo {
|
||||
.updata {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
||||
.purchase {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 190rpx;
|
||||
height: 60rpx;
|
||||
background: #F44B2F;
|
||||
border-radius: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.price {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 48rpx;
|
||||
font-weight: 500;
|
||||
color: #F44B2F;
|
||||
}
|
||||
}
|
||||
|
||||
.bottomitem {
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
position: relative;
|
||||
|
||||
.u-numberbox {
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo,
|
||||
.bottomitem {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
@ -74,23 +252,17 @@
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
position: relative;
|
||||
|
||||
::v-deep .u-radio__label {
|
||||
width: 150rpx !important;
|
||||
height: 120rpx !important;
|
||||
p {
|
||||
color: #c0c4cc;
|
||||
display: inline-block;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-radio-group {
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 50%;
|
||||
width: 75%;
|
||||
transform: translateY(-50%);
|
||||
left: 170rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding-left: 10rpx;
|
||||
width: 150rpx !important;
|
||||
height: 120rpx !important;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.address {
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
import gkcity from "../m-city/m-city.vue";
|
||||
import gkcity from "../../components/m-city/m-city.vue";
|
||||
export default {
|
||||
components: {
|
||||
contenttext,
|
||||
|
||||
@ -37,11 +37,24 @@
|
||||
<view class="drug">·{{list.nurseItemName}} </view>
|
||||
</view>
|
||||
<view class="content">服务信息
|
||||
<view class="contacts">·联系人:{{list.patientName}}</view>
|
||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
||||
<view class="contacts">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}</view>
|
||||
<view class="contacts">·下单时间:{{list.createTime}}</view>
|
||||
<view class="" v-if="list.orderType=='COMPANION_IN_HOSPITAL'">
|
||||
<view class="contacts" v-if="list.caregiverName">·姓名:{{list.caregiverName}}</view>
|
||||
<view class="contacts" v-if="list.caregiverPhone">·电话:{{list.caregiverPhone}}</view>
|
||||
<view class="contacts" v-if="list.hospitalName">·医院:{{list.hospitalName}}</view>
|
||||
<view class="contacts" v-if="list.departmentName">·科室:{{list.departmentName}}</view>
|
||||
<view class="contacts" v-if="list.hospitalBedNumber">·病床号:{{list.hospitalBedNumber}}</view>
|
||||
<view class="contacts" v-if="list.companionStartDate&&list.companionEndDate">
|
||||
·时间:{{list.companionStartDate}} - {{list.companionEndDate}}</view>
|
||||
<view class="contacts" v-if="list.createTime">·下单时间:{{list.createTime}}</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="contacts" v-if="list.patientName">·姓名:{{list.patientName}}</view>
|
||||
<view class="contacts" v-if="list.patientPhone">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts" v-if="list.serviceAddress">·地址:{{list.serviceAddress}}</view>
|
||||
<view class="contacts" v-if="list.serviceDate">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}
|
||||
</view>
|
||||
<view class="contacts" v-if="list.createTime">·下单时间:{{list.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Package">套餐信息:
|
||||
<span>¥{{list.nurseItemPrice}}</span>
|
||||
@ -49,7 +62,7 @@
|
||||
·{{list.nurseItemName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList.length>0'>耗材包详情:
|
||||
<span v-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-else>¥0</span>
|
||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
||||
@ -58,7 +71,7 @@
|
||||
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
<view class="remarks" v-if="list.orderType!='COMPANION_IN_HOSPITAL'">
|
||||
<view>备注:</view>
|
||||
<input placeholder="请输入" v-model='list.remark'>
|
||||
</view>
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
import gkcity from "../m-city/m-city.vue";
|
||||
import gkcity from "../../components/m-city/m-city.vue";
|
||||
export default {
|
||||
components: {
|
||||
contenttext,
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
updateDefaultAddress
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import gkcity from "../m-city/m-city.vue";
|
||||
import gkcity from "../../components/m-city/m-city.vue";
|
||||
export default {
|
||||
components: {
|
||||
"m-city": gkcity
|
||||
@ -166,6 +166,7 @@
|
||||
},
|
||||
// 三级地址联动回调
|
||||
getpickerParentValue(e) {
|
||||
console.log(e)
|
||||
e = e.filter(ele => ele.localName != '暂不选择')
|
||||
e = e.filter(ele => ele.localName != '暂无需选择')
|
||||
this.addresslength = e
|
||||
|
||||
@ -310,15 +310,15 @@
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
if (this.hospitalcare) {
|
||||
if (that.hospitalcare) {
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
if (scenenurseStationId) {
|
||||
// if (scenenurseStationId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/hospitalcare/hospitalcare'
|
||||
url: `/pages/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
that.goAppIdentification(value2, item)
|
||||
}
|
||||
// } else {
|
||||
// that.goAppIdentification(value2, item)
|
||||
// }
|
||||
} else {
|
||||
that.goAppIdentification(value2, item)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user