修改
This commit is contained in:
parent
a09141faa8
commit
d06d9d2cec
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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">
|
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex">
|
||||||
<view class="u-datetime-picker">
|
<view class="u-datetime-picker">
|
||||||
<view class="u-picker-header" @touchmove.stop.prevent="">
|
<view class="u-picker-header" @touchmove.stop.prevent="">
|
||||||
@ -32,11 +32,9 @@
|
|||||||
<text class="u-text" v-if="showTimeTag"></text>
|
<text class="u-text" v-if="showTimeTag"></text>
|
||||||
</view>
|
</view>
|
||||||
</picker-view-column>
|
</picker-view-column>
|
||||||
<picker-view-column style="flex:2">
|
<view class="u-column-item">
|
||||||
<view class="u-column-item">
|
<text class="u-text">一</text>
|
||||||
<text class="u-text">一</text>
|
</view>
|
||||||
</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<picker-view-column v-if="!reset && params.endmonth" style="flex:5">
|
<picker-view-column v-if="!reset && params.endmonth" style="flex:5">
|
||||||
<view class="u-column-item" v-for="(item, index) in months" :key="index">
|
<view class="u-column-item" v-for="(item, index) in months" :key="index">
|
||||||
{{ formatNumber(item) }}
|
{{ formatNumber(item) }}
|
||||||
@ -56,34 +54,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 {
|
export default {
|
||||||
name: 'u-picker',
|
name: 'timepicker',
|
||||||
props: {
|
props: {
|
||||||
// picker中需要显示的参数
|
// picker中需要显示的参数
|
||||||
params: {
|
params: {
|
||||||
@ -93,35 +65,11 @@
|
|||||||
year: true,
|
year: true,
|
||||||
month: true,
|
month: true,
|
||||||
day: true,
|
day: true,
|
||||||
hour: false,
|
|
||||||
endday: true,
|
endday: true,
|
||||||
endmonth: 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-多列模式
|
// 模式选择,region-地区类型,time-时间类型,selector-单列模式,multiSelector-多列模式
|
||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -167,7 +115,7 @@
|
|||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
// 通过双向绑定控制组件的弹出与收起
|
// 通过双向绑定控制组件的弹出与收起
|
||||||
value: {
|
timepicker: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
@ -179,7 +127,7 @@
|
|||||||
// 顶部标题
|
// 顶部标题
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '预约时间区间'
|
default: ''
|
||||||
},
|
},
|
||||||
// 取消按钮的文字
|
// 取消按钮的文字
|
||||||
cancelText: {
|
cancelText: {
|
||||||
@ -194,6 +142,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timeshow: false,
|
||||||
years: [],
|
years: [],
|
||||||
months: [],
|
months: [],
|
||||||
days: [],
|
days: [],
|
||||||
@ -214,14 +163,6 @@
|
|||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
propsChange() {
|
|
||||||
// 引用这几个变量,是为了监听其变化
|
|
||||||
return `${this.mode}-${this.defaultTime}-${this.startYear}-${this.endYear}-${this.defaultRegion}-${this.areaCode}`;
|
|
||||||
},
|
|
||||||
regionChange() {
|
|
||||||
// 引用这几个变量,是为了监听其变化
|
|
||||||
return `${this.province}-${this.city}`;
|
|
||||||
},
|
|
||||||
yearAndMonth() {
|
yearAndMonth() {
|
||||||
return `${this.year}-${this.month}`;
|
return `${this.year}-${this.month}`;
|
||||||
},
|
},
|
||||||
@ -231,18 +172,9 @@
|
|||||||
uZIndex() {
|
uZIndex() {
|
||||||
// 如果用户有传递z-index值,优先使用
|
// 如果用户有传递z-index值,优先使用
|
||||||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
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监听月份的变化,实时变更日的天数,因为不同月份,天数不一样
|
// watch监听月份的变化,实时变更日的天数,因为不同月份,天数不一样
|
||||||
// 一个月可能有30,31天,甚至闰年2月的29天,平年2月28天
|
// 一个月可能有30,31天,甚至闰年2月的29天,平年2月28天
|
||||||
yearAndMonth(val) {
|
yearAndMonth(val) {
|
||||||
@ -256,7 +188,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 微信和QQ小程序由于一些奇怪的原因(故同时对所有平台均初始化一遍),需要重新初始化才能显示正确的值
|
// 微信和QQ小程序由于一些奇怪的原因(故同时对所有平台均初始化一遍),需要重新初始化才能显示正确的值
|
||||||
value(n) {
|
timepicker(n) {
|
||||||
|
this.timeshow = this.timepicker
|
||||||
if (n) {
|
if (n) {
|
||||||
this.reset = true;
|
this.reset = true;
|
||||||
setTimeout(() => this.init(), 10);
|
setTimeout(() => this.init(), 10);
|
||||||
@ -276,14 +209,6 @@
|
|||||||
this.moving = false;
|
this.moving = false;
|
||||||
// #endif
|
// #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,用于月份,日期,时分秒等
|
// 小于10前面补0,用于月份,日期,时分秒等
|
||||||
formatNumber(num) {
|
formatNumber(num) {
|
||||||
return +num < 10 ? '0' + num : String(num);
|
return +num < 10 ? '0' + num : String(num);
|
||||||
@ -378,7 +303,6 @@
|
|||||||
},
|
},
|
||||||
setendDays() {
|
setendDays() {
|
||||||
let totalDays = new Date(this.year, this.endmonth, 0).getDate();
|
let totalDays = new Date(this.year, this.endmonth, 0).getDate();
|
||||||
console.log(totalDays, 'total2')
|
|
||||||
this.enddays = this.generateArray(1, totalDays);
|
this.enddays = this.generateArray(1, totalDays);
|
||||||
let index = 0;
|
let index = 0;
|
||||||
// 这里不能使用类似setMonths()中的this.valueArr.splice(this.valueArr.length - 1, xxx)做法
|
// 这里不能使用类似setMonths()中的this.valueArr.splice(this.valueArr.length - 1, xxx)做法
|
||||||
@ -392,10 +316,6 @@
|
|||||||
if (this.endday > this.enddays.length) this.endday = this.enddays.length;
|
if (this.endday > this.enddays.length) this.endday = this.enddays.length;
|
||||||
this.valueArr.splice(index, 1, this.getIndex(this.enddays, this.endday));
|
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() {
|
close() {
|
||||||
this.$emit('input', false);
|
this.$emit('input', false);
|
||||||
},
|
},
|
||||||
@ -403,41 +323,30 @@
|
|||||||
change(e) {
|
change(e) {
|
||||||
this.valueArr = e.detail.value;
|
this.valueArr = e.detail.value;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let result = {};
|
// 这里使用i++,是因为this.valueArr数组的长度是不确定长度的,它根据this.params的值来配置长度
|
||||||
if (this.mode == 'time') {
|
// 进入if规则,i会加1,保证了能获取准确的值
|
||||||
// 这里使用i++,是因为this.valueArr数组的长度是不确定长度的,它根据this.params的值来配置长度
|
if (this.params.year) this.year = this.years[this.valueArr[i++]];
|
||||||
// 进入if规则,i会加1,保证了能获取准确的值
|
if (this.params.month) this.month = this.months[this.valueArr[i++]];
|
||||||
if (this.params.year) result.year = this.years[this.valueArr[i++]];
|
if (this.params.day) this.day = this.days[this.valueArr[i++]];
|
||||||
if (this.params.month) result.month = this.months[this.valueArr[i++]];
|
if (this.params.endmonth) this.endmonth = this.months[this.valueArr[i++]];
|
||||||
if (this.params.day) result.day = this.days[this.valueArr[i++]];
|
if (this.params.endday) this.endday = this.enddays[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);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 用户点击确定按钮
|
// 用户点击确定按钮
|
||||||
getResult(event = null) {
|
getResult(event = null) {
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
if (this.moving) return;
|
|
||||||
// #endif
|
|
||||||
let result = {};
|
let result = {};
|
||||||
// 只返回用户在this.params中配置了为true的字段
|
// 只返回用户在this.params中配置了为true的字段
|
||||||
if (this.mode == 'time') {
|
if (this.params.year) result.year = this.formatNumber(this.year || 0);
|
||||||
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.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.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.endday) result.endday = this.formatNumber(this.endday || 0);
|
// const newObj = {};
|
||||||
// if (this.params.second) result.second = this.formatNumber(this.second || 0);
|
// for (let prop in result) {
|
||||||
// if (this.params.timestamp) result.timestamp = this.getTimestamp();
|
// if (result.hasOwnProperty(prop) && (prop === 'year' || prop === 'month')) {
|
||||||
}
|
// newObj[prop] = result[prop];
|
||||||
if (event) this.$emit(event, result);
|
// }
|
||||||
|
// }
|
||||||
|
this.$emit('timeconfirm', result);
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
// 获取时间戳
|
// 获取时间戳
|
||||||
@ -451,7 +360,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||||
@mixin vue-flex($direction: row) {
|
@mixin vue-flex($direction: row) {
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
@ -501,7 +410,7 @@
|
|||||||
.u-picker-body {
|
.u-picker-body {
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300rpx;
|
height: 500rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
22
pages.json
22
pages.json
@ -9,6 +9,18 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/hospitalcare/hospitalcare",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "院内陪护",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/appointmenttime/appointmenttime",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "预约时间",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/information/information",
|
"path": "pages/information/information",
|
||||||
"style": {
|
"style": {
|
||||||
@ -22,12 +34,6 @@
|
|||||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||||
"enablePullDownRefresh": true //设置参数为true
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/appointmenttime/appointmenttime",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "预约时间",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/medicine/medicine",
|
"path": "pages/medicine/medicine",
|
||||||
"style": {
|
"style": {
|
||||||
@ -85,8 +91,7 @@
|
|||||||
"navigationBarTitleText": "修改地址",
|
"navigationBarTitleText": "修改地址",
|
||||||
"enablePullDownRefresh": true //设置参数为true
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
"path": "pages/lookrate/lookrate",
|
"path": "pages/lookrate/lookrate",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "查看评价",
|
"navigationBarTitleText": "查看评价",
|
||||||
@ -310,7 +315,6 @@
|
|||||||
"navigationBarTitleText": "护理机构",
|
"navigationBarTitleText": "护理机构",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -37,11 +37,24 @@
|
|||||||
<view class="drug">·{{list.nurseItemName}} </view>
|
<view class="drug">·{{list.nurseItemName}} </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">服务信息
|
<view class="content">服务信息
|
||||||
<view class="contacts">·联系人:{{list.patientName}}</view>
|
<view class="" v-if="list.orderType=='COMPANION_IN_HOSPITAL'">
|
||||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
<view class="contacts" v-if="list.caregiverName">·姓名:{{list.caregiverName}}</view>
|
||||||
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
<view class="contacts" v-if="list.caregiverPhone">·电话:{{list.caregiverPhone}}</view>
|
||||||
<view class="contacts">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}</view>
|
<view class="contacts" v-if="list.hospitalName">·医院:{{list.hospitalName}}</view>
|
||||||
<view class="contacts">·下单时间:{{list.createTime}}</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>
|
||||||
<view class="Package">套餐信息:
|
<view class="Package">套餐信息:
|
||||||
<span>¥{{list.nurseItemPrice}}</span>
|
<span>¥{{list.nurseItemPrice}}</span>
|
||||||
@ -49,7 +62,7 @@
|
|||||||
·{{list.nurseItemName}}
|
·{{list.nurseItemName}}
|
||||||
</view>
|
</view>
|
||||||
</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-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||||
<span v-else>¥0</span>
|
<span v-else>¥0</span>
|
||||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
<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>
|
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="remarks">
|
<view class="remarks" v-if="list.orderType!='COMPANION_IN_HOSPITAL'">
|
||||||
<view>备注:</view>
|
<view>备注:</view>
|
||||||
<input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
|
<input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -334,7 +334,8 @@
|
|||||||
//跳转
|
//跳转
|
||||||
gopzyh() {
|
gopzyh() {
|
||||||
uni.navigateTo({
|
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>
|
<template>
|
||||||
<view class="app">
|
<view class="app" v-if="orderlist.totalPrice">
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<span>姓名:</span>
|
<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>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<span>电话:</span>
|
<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>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<span>医院:</span>
|
<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>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<span>科室:</span>
|
<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>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<span>病床号:</span>
|
<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>
|
||||||
<view class="item" style="border: none;" @tap='timepicker=true'>
|
<view class="item" style="border: none;" @tap='timepickertrue'>
|
||||||
<span>时间:</span>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<picker v-model="timepicker" @confirm='confirm'></picker>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import baseurl from '@/api/baseurl.js'
|
import timepicker from '../../components/timepicker/timepicker.vue'
|
||||||
import picker from '../picker/picker.vue'
|
import {
|
||||||
|
getAppStationItemInfo,
|
||||||
|
appletAppointmentOrderPay
|
||||||
|
} from '@/api/appointmenttime/appointmenttime.js'
|
||||||
|
import {
|
||||||
|
accompanyingDiagnosis
|
||||||
|
} from '@/api/hospitalcare/index.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
picker
|
timepicker
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
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,
|
timepicker: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {},
|
||||||
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
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: {
|
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)
|
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 {
|
.app {
|
||||||
padding: 10rpx 0 0;
|
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;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
@ -74,23 +252,17 @@
|
|||||||
border-bottom: 1rpx solid #D8D4D4;
|
border-bottom: 1rpx solid #D8D4D4;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
::v-deep .u-radio__label {
|
p {
|
||||||
width: 150rpx !important;
|
color: #c0c4cc;
|
||||||
height: 120rpx !important;
|
display: inline-block;
|
||||||
|
height: 120rpx;
|
||||||
line-height: 120rpx;
|
line-height: 120rpx;
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .u-radio-group {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
left: 25%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
width: 75%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
left: 170rpx;
|
font-size: 30rpx;
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .u-radio {
|
|
||||||
padding-left: 10rpx;
|
|
||||||
width: 150rpx !important;
|
|
||||||
height: 120rpx !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.address {
|
.address {
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
import {
|
import {
|
||||||
getSubordinateRegions,
|
getSubordinateRegions,
|
||||||
} from '@/api/modifyAddress/modifyAddress.js';
|
} from '@/api/modifyAddress/modifyAddress.js';
|
||||||
import gkcity from "../m-city/m-city.vue";
|
import gkcity from "../../components/m-city/m-city.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
contenttext,
|
contenttext,
|
||||||
|
|||||||
@ -37,11 +37,24 @@
|
|||||||
<view class="drug">·{{list.nurseItemName}} </view>
|
<view class="drug">·{{list.nurseItemName}} </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">服务信息
|
<view class="content">服务信息
|
||||||
<view class="contacts">·联系人:{{list.patientName}}</view>
|
<view class="" v-if="list.orderType=='COMPANION_IN_HOSPITAL'">
|
||||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
<view class="contacts" v-if="list.caregiverName">·姓名:{{list.caregiverName}}</view>
|
||||||
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
<view class="contacts" v-if="list.caregiverPhone">·电话:{{list.caregiverPhone}}</view>
|
||||||
<view class="contacts">·预约时间:{{list.serviceDate}} {{list.serviceStartTime}}</view>
|
<view class="contacts" v-if="list.hospitalName">·医院:{{list.hospitalName}}</view>
|
||||||
<view class="contacts">·下单时间:{{list.createTime}}</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>
|
||||||
<view class="Package">套餐信息:
|
<view class="Package">套餐信息:
|
||||||
<span>¥{{list.nurseItemPrice}}</span>
|
<span>¥{{list.nurseItemPrice}}</span>
|
||||||
@ -49,7 +62,7 @@
|
|||||||
·{{list.nurseItemName}}
|
·{{list.nurseItemName}}
|
||||||
</view>
|
</view>
|
||||||
</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-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||||
<span v-else>¥0</span>
|
<span v-else>¥0</span>
|
||||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
<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>
|
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="remarks">
|
<view class="remarks" v-if="list.orderType!='COMPANION_IN_HOSPITAL'">
|
||||||
<view>备注:</view>
|
<view>备注:</view>
|
||||||
<input placeholder="请输入" v-model='list.remark'>
|
<input placeholder="请输入" v-model='list.remark'>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -116,7 +116,7 @@
|
|||||||
import {
|
import {
|
||||||
getSubordinateRegions,
|
getSubordinateRegions,
|
||||||
} from '@/api/modifyAddress/modifyAddress.js';
|
} from '@/api/modifyAddress/modifyAddress.js';
|
||||||
import gkcity from "../m-city/m-city.vue";
|
import gkcity from "../../components/m-city/m-city.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
contenttext,
|
contenttext,
|
||||||
|
|||||||
@ -95,7 +95,7 @@
|
|||||||
updateDefaultAddress
|
updateDefaultAddress
|
||||||
} from '@/api/modifyAddress/modifyAddress.js';
|
} from '@/api/modifyAddress/modifyAddress.js';
|
||||||
import baseurl from '@/api/baseurl.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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
"m-city": gkcity
|
"m-city": gkcity
|
||||||
@ -166,6 +166,7 @@
|
|||||||
},
|
},
|
||||||
// 三级地址联动回调
|
// 三级地址联动回调
|
||||||
getpickerParentValue(e) {
|
getpickerParentValue(e) {
|
||||||
|
console.log(e)
|
||||||
e = e.filter(ele => ele.localName != '暂不选择')
|
e = e.filter(ele => ele.localName != '暂不选择')
|
||||||
e = e.filter(ele => ele.localName != '暂无需选择')
|
e = e.filter(ele => ele.localName != '暂无需选择')
|
||||||
this.addresslength = e
|
this.addresslength = e
|
||||||
|
|||||||
@ -310,15 +310,15 @@
|
|||||||
const value = uni.getStorageSync('openid');
|
const value = uni.getStorageSync('openid');
|
||||||
const value2 = uni.getStorageSync('patientId');
|
const value2 = uni.getStorageSync('patientId');
|
||||||
if (value && value2) {
|
if (value && value2) {
|
||||||
if (this.hospitalcare) {
|
if (that.hospitalcare) {
|
||||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||||
if (scenenurseStationId) {
|
// if (scenenurseStationId) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/hospitalcare/hospitalcare'
|
url: `/pages/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||||
})
|
})
|
||||||
} else {
|
// } else {
|
||||||
that.goAppIdentification(value2, item)
|
// that.goAppIdentification(value2, item)
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
that.goAppIdentification(value2, item)
|
that.goAppIdentification(value2, item)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user