处方问诊插件开发

master
gongfuxiang 2025-02-04 23:43:06 +08:00
parent 273074cea6
commit 302f5946f8
8 changed files with 522 additions and 138 deletions

View File

@ -6,19 +6,19 @@
<text class="cr-blue" @tap="sub_ragion_event">{{$t('common.confirm')}}</text>
</view>
<view class="g-dp-ctt-wrapper">
<picker-view style="width: 32%; height: 240px" :indicator-style="indicatorStyle" :value="columns_index[0]" data-column="0" @change="changeHandler">
<picker-view class="picker-view" :indicator-style="indicatorStyle" :value="columns_index[0]" data-column="0" @change="changeHandler">
<picker-view-column>
<view class="g-dp-ctt-wp-item" v-for="(item, a) in columns[0]" :key="item.id">{{ item.name }}</view>
</picker-view-column>
</picker-view>
<picker-view style="width: 32%; height: 240px" :indicator-style="indicatorStyle" :value="columns_index[1]" data-column="1" @change="changeHandler">
<picker-view class="picker-view" :indicator-style="indicatorStyle" :value="columns_index[1]" data-column="1" @change="changeHandler">
<picker-view-column>
<view class="g-dp-ctt-wp-item" v-for="(item, b) in columns[1]" :key="item.id">{{ item.name }}</view>
</picker-view-column>
</picker-view>
<picker-view style="width: 32%; height: 240px" :indicator-style="indicatorStyle" :value="columns_index[2]" data-column="2" @change="changeHandler">
<picker-view class="picker-view" :indicator-style="indicatorStyle" :value="columns_index[2]" data-column="2" @change="changeHandler">
<picker-view-column>
<view class="g-dp-ctt-wp-item" v-for="(item, c) in columns[2]" :key="item.id">{{ item.name }}</view>
</picker-view-column>
@ -205,27 +205,30 @@ export default {
};
</script>
<style scoped>
::v-deep .popup-bottom {
border-radius: 0;
}
.picker-view-column {
height: 480rpx !important;
}
.g-dp-ctt-wrapper {
height: 480upx;
width: 100%;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.g-dp-ctt-wp-item {
width: 100%;
height: 88upx;
line-height: 88upx;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 30upx;
}
::v-deep .popup-bottom {
border-radius: 0;
}
.picker-view {
width: 32%; height: 480rpx
}
.picker-view-column {
height: 480rpx !important;
}
.g-dp-ctt-wrapper {
height: 480upx;
width: 100%;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.g-dp-ctt-wp-item {
width: 100%;
height: 88upx;
line-height: 88upx;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 30upx;
}
</style>

View File

@ -258,7 +258,10 @@
"plugins-givegift-receive": "Gift collection",
"plugins-givegift-gift": "My gift",
"plugins-givegift-code": "Gift Link",
"plugins-orderresources-orderannex": "Order Resources"
"plugins-orderresources-orderannex": "Order Resources",
"plugins-hospital-patient": "Add/Edit Patient",
"plugins-hospital-patient-list": "Patient List",
"plugins-hospital-prescription": "Consultation and prescription"
},
"login": {
"login": {

View File

@ -256,7 +256,10 @@
"plugins-givegift-receive": "礼品领取",
"plugins-givegift-gift": "我的送礼",
"plugins-givegift-code": "礼品链接",
"plugins-orderresources-orderannex": "订单资源"
"plugins-orderresources-orderannex": "订单资源",
"plugins-hospital-patient": "就诊人添加/编辑",
"plugins-hospital-patient-list": "就诊人列表",
"plugins-hospital-prescription": "问诊开方"
},
"login": {
"login": {

View File

@ -8,9 +8,4 @@
*/
.form-container .form-gorup:not(:last-child) {
border-bottom: 2rpx solid #F5F5F5;
}
.bottom-fixed button {
height: 88rpx;
line-height: 88rpx;
}

View File

@ -1,6 +1,12 @@
<template>
<view :class="theme_view">
<view class="page-bottom-fixed padding-main">
<view v-if="patient_tips != null" class="cr-yellow margin-bottom">
<view class="dis-inline-block va-m margin-right-xs">
<iconfont name="icon-sigh-o" size="28rpx" color="#f6c133"></iconfont>
</view>
<text class="va-m">{{patient_tips}}</text>
</view>
<view v-if="(data_list || null) != null && data_list.length > 0" class="bg-white padding-horizontal-main border-radius-main">
<block v-for="(item, index) in data_list" :key="index">
<view class="item padding-vertical-main oh pr" :class="index > 0 ? 'br-t-f5' : ''" :data-index="index" @tap="item_event">
@ -53,7 +59,8 @@
data_list_loding_status: 1,
data_list_loding_msg: '',
params: {},
data_list: [],
data_list: [],
patient_tips: null,
};
},
@ -122,6 +129,7 @@
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: '',
patient_tips: data.patient_tips || null,
data_list: data.data_list || [],
});
} else {

View File

@ -0,0 +1,3 @@
.health-tips {
width: calc(100% - 100rpx);
}

View File

@ -1,53 +1,151 @@
<template>
<view :class="theme_view">
<view v-if="data_list_loding_status == 3" class="padding-main">
<form @submit="form_submit" class="form-container">
<view class="form-gorup">
<view class="form-gorup-title">真实姓名<text class="form-group-tips-must">*</text></view>
<input type="text" name="name" :value="data.name || ''" maxlength="30" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入真实姓名" />
<block v-if="data_list_loding_status == 3">
<view class="page-bottom-fixed padding-main">
<view v-if="patient_tips != null" class="cr-yellow margin-bottom">
<view class="dis-inline-block va-m margin-right-xs">
<iconfont name="icon-sigh-o" size="28rpx" color="#f6c133"></iconfont>
</view>
<text class="va-m">{{patient_tips}}</text>
</view>
<view class="form-gorup">
<view class="form-gorup-title">身份证号码<text class="form-group-tips-must">*</text></view>
<input type="text" name="idcard" :value="data.idcard || ''" maxlength="60" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入身份证号码" />
</view>
<view class="form-gorup">
<view class="form-gorup-title">手机号码<text class="form-group-tips-must">*</text></view>
<input type="text" name="mobile" :value="data.mobile || ''" maxlength="30" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入手机号码" />
</view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size wh-auto" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">{{$t('common.save')}}</button>
<form @submit="form_submit" class="form-container">
<view class="oh border-radius-main tr">
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">真实姓名<text class="form-group-tips-must">*</text></view>
<view class="flex-row align-c flex-1 flex-width">
<input type="text" name="name" :value="data.name || ''" maxlength="30" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入真实姓名" />
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">身份证号码<text class="form-group-tips-must">*</text></view>
<view class="flex-row align-c flex-1 flex-width">
<input type="idcard" name="idcard" :value="data.idcard || ''" maxlength="60" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入身份证号码" />
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">手机号码<text class="form-group-tips-must">*</text></view>
<view class="flex-row align-c flex-1 flex-width">
<input type="text" name="mobile" :value="data.mobile || ''" maxlength="30" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入手机号码" />
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">性别<text class="form-group-tips-must">*</text></view>
<view class="flex-row align-c flex-1 flex-width">
<picker class="picker" name="gender" data-field="gender_index" @change="select_change_event" :value="select_index.gender_index" :range="common_gender_list" range-key="name">
<text v-if="select_index.gender_index === ''" class="cr-grey-9"></text>
<text v-else class="cr-base">{{common_gender_list[select_index.gender_index].name}}</text>
<view class="dis-inline-block margin-left-xs">
<iconfont name="icon-arrow-right" size="28rpx" color="#ccc"></iconfont>
</view>
</picker>
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">年龄</view>
<view class="flex-row align-c flex-1 flex-width">
<input type="number" name="age" :value="data.age || ''" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入年龄" />
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">体重</view>
<view class="flex-row align-c flex-1 flex-width">
<input type="digit" name="weight" :value="data.weight || ''" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入体重" />
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">健康信息</view>
<view class="flex-row align-c flex-1 flex-width">
<view class="form-gorup-value" @tap="popup_health_event">
<view class="dis-inline-block single-text va-m health-tips">
<text v-if="(health_tips || null) != null" class="cr-base">{{health_tips}}</text>
<text v-else class="cr-grey-9">可填写健康信息</text>
</view>
<view class="dis-inline-block margin-left-xs va-m">
<iconfont name="icon-arrow-right" size="28rpx" color="#ccc"></iconfont>
</view>
</view>
</view>
</view>
<view class="form-gorup flex-row jc-sb align-c br-b-f9">
<view class="form-gorup-title">关系标签</view>
<view class="flex-row align-c flex-1 flex-width">
<picker class="picker" name="relation_tags" data-field="relation_tags_index" @change="select_change_event" :value="select_index.relation_tags_index" :range="hospital_relation_tags_list" range-key="name">
<text v-if="select_index.relation_tags_index === ''" class="cr-grey-9"></text>
<text v-else class="cr-base">{{hospital_relation_tags_list[select_index.relation_tags_index].name}}</text>
<view class="dis-inline-block margin-left-xs">
<iconfont name="icon-arrow-right" size="28rpx" color="#ccc"></iconfont>
</view>
</picker>
</view>
</view>
</view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size wh-auto" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">{{$t('common.save')}}</button>
</view>
</view>
</form>
</view>
<!-- 健康信息弹窗 -->
<component-popup :propShow="popup_health_status" propPosition="bottom" @onclose="popup_health_close_event">
<view class="padding-horizontal-main padding-top-main bg-white">
<view class="close oh">
<view class="fr" @tap.stop="popup_health_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view class="page-bottom-fixed">
<view class="form-container">
<view class="form-gorup">
<view class="flex-row jc-sb align-c">
<view class="form-gorup-title">过敏史</view>
<switch :color="theme_color" :checked="(health.is_history_of_allergy || 0) == 1" data-field="is_history_of_allergy" @change="health_switch_value_event" style="transform:scale(0.7)" />
</view>
<input v-if="(health.is_history_of_allergy || 0) == 1" type="text" :value="health.is_history_of_allergy_value || ''" data-field="history_of_allergy_value" @input="health_input_value_event" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入过敏史项" />
</view>
<view class="form-gorup br-t-f9">
<view class="flex-row jc-sb align-c">
<view class="form-gorup-title">疾病史</view>
<switch :color="theme_color" :checked="(health.is_history_of_sickness || 0) == 1" data-field="is_history_of_sickness" @change="health_switch_value_event" style="transform:scale(0.7)" />
</view>
<input v-if="(health.is_history_of_sickness || 0) == 1" type="text" :value="health.is_history_of_sickness_value || ''" data-field="history_of_sickness_value" @input="health_input_value_event" placeholder-class="cr-grey-9" class="cr-base" placeholder="请输入疾病史项" />
</view>
<view class="form-gorup flex-row jc-sb align-c br-t-f9">
<view class="form-gorup-title">肝功能异常</view>
<switch :color="theme_color" :checked="(health.liver_type || 0) == 1" data-field="liver_type" @change="health_switch_value_event" style="transform:scale(0.7)" />
</view>
<view class="form-gorup flex-row jc-sb align-c br-t-f9">
<view class="form-gorup-title">肾功能异常</view>
<switch :color="theme_color" :checked="(health.renal_type || 0) == 1" data-field="renal_type" @change="health_switch_value_event" style="transform:scale(0.7)" />
</view>
<view v-if="(data.gender || 0) == 1" class="form-gorup flex-row jc-sb align-c br-t-f9">
<view class="form-gorup-title">妊娠哺乳</view>
<view class="flex-row align-c flex-1 flex-width tr">
<picker class="picker" data-field="pregnancy" @change="health_input_value_event" :value="health.pregnancy || 0" :range="hospital_pregnancy_list" range-key="name">
<text class="cr-base">{{hospital_pregnancy_list[health.pregnancy || 0].name}}</text>
<view class="dis-inline-block margin-left-xs">
<iconfont name="icon-arrow-right" size="28rpx" color="#ccc"></iconfont>
</view>
</picker>
</view>
</view>
</view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size-sm wh-auto" type="default" hover-class="none" @tap="popup_health_confirm_event">{{$t('common.confirm')}}</button>
</view>
</view>
</view>
</view>
</form>
</view>
</component-popup>
</block>
<!-- 提示信息 -->
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
<!-- 公共 -->
<component-common ref="common"></component-common>
<!-- 健康信息弹窗 -->
<component-popup :propShow="popup_health_status" propPosition="bottom" @onclose="popup_health_close_event">
<view class="padding-horizontal-main padding-top-main bg-white">
<view class="close oh">
<view class="fr" @tap.stop="popup_health_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view class="page-bottom-fixed">
<view>
健康信息填写处理
</view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size-sm wh-auto" type="default" hover-class="none" @tap="popup_patient_save_event">{{$t('common.confirm')}}</button>
</view>
</view>
</view>
</view>
</component-popup>
<component-common ref="common"></component-common>
</view>
</template>
<script>
@ -64,11 +162,20 @@
theme_color: app.globalData.get_theme_color(),
data_list_loding_status: 1,
data_list_loding_msg: '',
buy_submit_disabled_status: false,
params: {},
data: {},
popup_health_status: false,
form_submit_disabled_status: false,
params: {},
data: {},
health: {},
health_tips: '',
patient_tips: null,
common_gender_list: [],
hospital_pregnancy_list: [],
hospital_relation_tags_list: [],
select_index: {
gender_index: '',
relation_tags_index: '',
}
};
},
@ -121,12 +228,40 @@
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
var temp_data = data.data || null;
//
var temp_gender_list = data.common_gender_list || [];
temp_gender_list.splice(0, 1);
this.setData({
data_list_loding_status: 3,
data_list_loding_msg: '',
data: data.data || {},
data: temp_data || {},
patient_tips: data.patient_tips || null,
common_gender_list: temp_gender_list,
hospital_pregnancy_list: data.hospital_pregnancy_list || [],
hospital_relation_tags_list: data.hospital_relation_tags_list || [],
});
console.log(data)
//
var health = this.data.health || {};
this.setData({
health: health,
health_tips: health.map(function(v){return v.msg;}).join(';')
});
//
if(temp_data !== null) {
var temp_select_index = this.select_index;
for(var i in this.common_gender_list) {
if(this.common_gender_list[i]['id'] == temp_data.gender) {
temp_select_index['gender_index'] = i;
}
}
for(var i in this.hospital_relation_tags_list) {
if(this.hospital_relation_tags_list[i]['value'] == temp_data.relation_tags) {
temp_select_index['relation_tags_index'] = i;
}
}
this.setData({select_index: temp_select_index});
}
} else {
this.setData({
data_list_loding_status: 0,
@ -147,9 +282,141 @@
});
},
//
select_change_event(e) {
//
var temp = this.select_index || {};
var field = e.currentTarget.dataset.field;
var value = e.detail.value;
temp[field] = value;
this.setData({ select_index: temp });
//
if(field == 'gender_index') {
var temp_data = this.data;
temp_data['gender'] = this.common_gender_list[value]['id'];
this.setData({ data: temp_data });
}
},
//
health_switch_value_event(e) {
var temp = this.health || {};
var field = e.currentTarget.dataset.field;
var value = e.detail.value;
temp[field] = value ? 1 : 0;
this.setData({ health: temp });
},
//
health_input_value_event(e) {
var temp = this.health || {};
var field = e.currentTarget.dataset.field;
var value = e.detail.value;
temp[field] = value;
this.setData({ health: temp });
},
//
popup_health_confirm_event() {
var health = this.health_handle_data();
if(health !== false) {
this.setData({
popup_health_status: false,
health_tips: health.map(function(v){return v.msg;}).join(';')
});
}
},
//
health_handle_data() {
var arr = [];
//
var is_history_of_allergy = parseInt(this.health.is_history_of_allergy || 0);
if(is_history_of_allergy == 1) {
var value = this.health.is_history_of_allergy_value || '';
if(value === '') {
app.globalData.showToast('请填写过敏史');
return false;
}
var msg = '过敏史:'+value;
} else {
var msg = '无过敏史';
var value = '';
}
arr.push({
type: 'is_history_of_allergy',
status: is_history_of_allergy,
value: value,
msg: msg
});
//
var is_history_of_sickness = parseInt(this.health.is_history_of_sickness || 0);
if(is_history_of_sickness == 1) {
var value = this.health.is_history_of_sickness_value || '';
if(value === '') {
app.globalData.showToast('请填写疾病史');
return false;
}
var msg = '疾病史:'+value;
} else {
var msg = '无疾病史';
var value = '';
}
arr.push({
type: 'is_history_of_sickness',
status: is_history_of_sickness,
value: value,
msg: msg
});
//
var liver_type = parseInt(this.health.liver_type || 0);
arr.push({
type: 'liver_type',
status: liver_type,
msg: '无肝功能'+((liver_type == 1) ? '异常' : '正常'),
});
//
var renal_type = parseInt(this.health.renal_type || 0);
arr.push({
type: 'renal_type',
status: renal_type,
msg: '无肾功能'+((renal_type == 1) ? '异常' : '正常'),
});
//
var pregnancy = parseInt(this.health.pregnancy || 0);
//
if(parseInt(this.data.gender || 0) == 2) {
pregnancy = 0;
}
var temp_pregnancy = this.hospital_pregnancy_list[pregnancy];
arr.push({
type: 'pregnancy',
status: temp_pregnancy.value,
msg: '妊娠哺乳:'+temp_pregnancy.name,
});
return arr;
},
//
popup_health_event(e) {
var health = this.health || {};
for(var i in health) {
switch(health[i]['type']) {
//
case 'is_history_of_allergy' :
case 'is_history_of_sickness' :
health[health[i]['type']+'_value'] = health[i]['value'] || '';
break;
}
health[health[i]['type']] = parseInt(health[i]['status'] || 0);
}
this.setData({
health: health,
popup_health_status: true
});
},
@ -165,7 +432,74 @@
form_submit(e) {
//
var form_data = e.detail.value;
console.log(form_data)
//
form_data['gender'] = this.select_index.gender_index;
if(form_data['gender'] !== '') {
form_data['gender'] = this.common_gender_list[form_data['gender']]['id'];
}
//
form_data['relation_tags'] = this.select_index.relation_tags_index;
if(form_data['relation_tags'] !== '') {
form_data['relation_tags'] = this.hospital_relation_tags_list[form_data['relation_tags']]['value'];
}
//
var validation = [
{ fields: 'name', msg: '请输入真实姓名' },
{ fields: 'idcard', msg: '请输入身份证号码' },
{ fields: 'mobile', msg: '请输入手机号码' },
{ fields: 'gender', msg: '请选择请别', is_can_zero: 1 },
];
//
if (app.globalData.fields_check(form_data, validation)) {
//
form_data['health'] = this.health_handle_data();
if(form_data['health'] === false) {
return false;
}
form_data['health'] = encodeURIComponent(base64.encode(JSON.stringify(form_data['health'])));
// id
form_data['id'] = this.data.id || 0;
//
this.setData({
form_submit_disabled_status: true,
});
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
uni.request({
url: app.globalData.get_request_url('save', 'patient', 'hospital'),
method: 'POST',
data: form_data,
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, 'success');
setTimeout(function() {
app.globalData.page_back_prev_event();
}, 1000);
} else {
this.setData({
form_submit_disabled_status: false,
});
if (app.globalData.is_login_check(res.data)) {
app.globalData.showToast(res.data.msg);
} else {
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
}
}
},
fail: () => {
this.setData({
form_submit_disabled_status: false,
});
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
}
}
};

View File

@ -1,71 +1,87 @@
<template>
<view :class="theme_view">
<view v-if="data_list_loding_status == 3" class="page-bottom-fixed padding-main">
<form @submit="form_submit" class="form-container">
<!-- 购买商品 -->
<view v-if="(goods_data || null) != null && goods_data.length > 0" class="bg-white padding-main border-radius-main">
<block v-for="(item, index) in goods_data" :key="index">
<view class="buy-goods-list oh">
<image :src="item.images" mode="aspectFit" class="goods-images radius dis-inline-block va-m"></image>
<view class="single-text dis-inline-block va-m margin-left-xs goods-title">{{item.title}}</view>
<view class="fr">
<text class="cr-price">{{item.show_price_symbol}}{{item.price}}</text>
<text class="cr-grey margin-left-xs">x{{item.stock}}</text>
<block v-if="data_list_loding_status == 3">
<view class="page-bottom-fixed padding-main">
<form @submit="form_submit" class="form-container">
<!-- 购买商品 -->
<view v-if="(goods_data || null) != null && goods_data.length > 0" class="bg-white padding-main border-radius-main">
<block v-for="(item, index) in goods_data" :key="index">
<view class="buy-goods-list oh">
<image :src="item.images" mode="aspectFit" class="goods-images radius dis-inline-block va-m"></image>
<view class="single-text dis-inline-block va-m margin-left-xs goods-title">{{item.title}}</view>
<view class="fr">
<text class="cr-price">{{item.show_price_symbol}}{{item.price}}</text>
<text class="cr-grey margin-left-xs">x{{item.stock}}</text>
</view>
</view>
</view>
</block>
</view>
<!-- 用药人 -->
<view class="bg-white border-radius-main spacing-mt">
<view class="padding-main">
<view>
<text class="fw-b va-m">用药人</text>
<view class="dis-inline-block va-m margin-left-sm">
<iconfont name="icon-sigh-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view v-if="(patient_data || null) != null" class="oh pr margin-top">
</block>
</view>
<!-- 用药人 -->
<view class="bg-white border-radius-main oh spacing-mt">
<view class="padding-main">
<view>
<text>{{patient_data.name}}</text>
<block v-if="(patient_data.gender_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.gender_text}}</text>
</block>
<block v-if="(patient_data.age_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.age_text}}</text>
</block>
<text class="fw-b va-m">用药人</text>
<view class="dis-inline-block va-m margin-left-sm" @tap="popup_patient_tips_event">
<iconfont name="icon-sigh-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view>{{patient_data.idcard}}</view>
<view class="pa top-0 right-0">
<view v-if="(patient_data || null) != null" class="oh pr margin-top">
<view>
<text>{{patient_data.name}}</text>
<block v-if="(patient_data.gender_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.gender_text}}</text>
</block>
<block v-if="(patient_data.age_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.age_text}}</text>
</block>
</view>
<view>{{patient_data.idcard}}</view>
<view class="pa top-0 right-0">
<button type="default" size="mini" class="cr-main br-main bg-white round text-size-sm" hover-class="none" data-value="/pages/plugins/hospital/patient-list/patient-list?is_choice=1" @tap="url_event">
<iconfont name="icon-transfer" size="28rpx" :color="theme_color"></iconfont>
<text class="margin-left-xs">切换用药人</text>
</button>
</view>
</view>
<view v-else class="tc padding-vertical-xxl">
<button type="default" size="mini" class="cr-main br-main bg-white round text-size-sm" hover-class="none" data-value="/pages/plugins/hospital/patient-list/patient-list?is_choice=1" @tap="url_event">
<iconfont name="icon-transfer" size="28rpx" :color="theme_color"></iconfont>
<text class="margin-left-xs">切换用药人</text>
<iconfont name="icon-user-group" size="28rpx" :color="theme_color"></iconfont>
<text class="margin-left-xs">选择用药人</text>
</button>
</view>
</view>
<view v-else class="tc padding-vertical-xxl">
<button type="default" size="mini" class="cr-main br-main bg-white round text-size-sm" hover-class="none" data-value="/pages/plugins/hospital/patient-list/patient-list?is_choice=1" @tap="url_event">
<iconfont name="icon-user-group" size="28rpx" :color="theme_color"></iconfont>
<text class="margin-left-xs">选择用药人</text>
</button>
<view class="form-gorup br-t-f5">
<view class="form-gorup-title">主诉<text class="form-group-tips">例如: 感冒, 胃炎, 头疼, 肚子疼</text></view>
<input type="text" name="ill_desc" maxlength="230" placeholder-class="cr-grey-9" class="cr-base" placeholder="主诉格式1230个字符" />
</view>
</view>
<view class="padding-horizontal-main">
<view class="br-t-f5"></view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size wh-auto" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">免费问诊开方</button>
</view>
</view>
<view class="form-gorup">
<view class="form-gorup-title">主诉<text class="form-group-tips">例如: 感冒, 胃炎, 头疼, 肚子疼</text></view>
<input type="text" name="ill_desc" maxlength="230" placeholder-class="cr-grey-9" class="cr-base" placeholder="主诉格式1230个字符" />
</form>
</view>
<!-- 提示弹窗 -->
<component-popup :propShow="popup_patient_tips_status" propPosition="bottom" @onclose="popup_patient_tips_close_event">
<view class="padding-horizontal-main padding-top-main bg-white">
<view class="close oh">
<view class="fr" @tap.stop="popup_patient_tips_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view class="padding-vertical-main">
<block v-if="patient_tips != null">{{patient_tips}}</block>
<block v-else>
<component-no-data propStatus="0"></component-no-data>
</block>
</view>
</view>
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="item bg-main br-main cr-white round text-size wh-auto" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">免费问诊开方</button>
</view>
</view>
</form>
</view>
</component-popup>
</block>
<!-- 提示信息 -->
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
@ -78,7 +94,8 @@
const app = getApp();
import base64 from '@/common/js/lib/base64.js';
import componentCommon from '@/components/common/common';
import componentNoData from '@/components/no-data/no-data';
import componentNoData from '@/components/no-data/no-data';
import componentPopup from '@/components/popup/popup';
export default {
data() {
@ -91,13 +108,17 @@
params: null,
goods_data: [],
patient_data: null,
patient_list: []
patient_list: [],
popup_patient_tips_status: false,
patient_tips: null
};
},
components: {
componentCommon,
componentNoData
componentNoData,
componentPopup
},
onLoad(params) {
@ -200,8 +221,8 @@
data_list_loding_msg: '',
goods_data: data.goods_data || [],
patient_data: data.patient_data || null,
patient_tips: data.patient_tips || null
});
console.log(data)
} else {
this.setData({
data_list_loding_status: 0,
@ -227,6 +248,20 @@
app.globalData.url_event(e);
},
//
popup_patient_tips_event(e) {
this.setData({
popup_patient_tips_status: true
});
},
//
popup_patient_tips_close_event(e) {
this.setData({
popup_patient_tips_status: false
});
},
//
form_submit(e) {
//