互联网医院问诊开发

master
gongfuxiang 2025-01-31 23:51:39 +08:00
parent 1f0047123f
commit 273074cea6
11 changed files with 591 additions and 29 deletions

View File

@ -221,6 +221,9 @@
//
cache_realstore_detail_choice_key: 'cache_realstore_detail_choice_key',
//
cache_hospital_patient_choice_value_key: 'cache_hospital_patient_choice_value_key',
//
default_user_head_src: '/static/images/common/user.png',

View File

@ -748,7 +748,6 @@
var type = (e == null) ? this.buy_event_type : (e.currentTarget.dataset.type || this.buy_event_type);
var value = (e == null) ? null : (e.currentTarget.dataset.value || null);
var business = (e == null) ? null : (e.currentTarget.dataset.business || null);
console.log(business)
switch (type) {
//
case 'show':

View File

@ -1720,6 +1720,20 @@
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
}
},
{
"path": "patient/patient",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
}
},
{
"path": "patient-list/patient-list",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
}
}
]
}

View File

@ -0,0 +1,210 @@
<template>
<view :class="theme_view">
<view class="page-bottom-fixed padding-main">
<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">
<view>
<text>{{item.name}}</text>
<block v-if="(item.gender_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{item.gender_text}}</text>
</block>
<block v-if="(item.age_text || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{item.age_text}}</text>
</block>
</view>
<view>{{item.idcard}}</view>
<view class="pa top-0 right-0 margin-top-xl">
<view class="dis-inline-block va-m" :data-value="'/pages/plugins/hospital/patient/patient?id='+item.id" @tap.stop="url_event">
<iconfont name="icon-edit-o" size="48rpx" color="#999"></iconfont>
</view>
<view class="dis-inline-block va-m margin-left" :data-index="index" @tap.stop="del_event">
<iconfont name="icon-delete-o" size="48rpx" color="#999"></iconfont>
</view>
</view>
</view>
</block>
</view>
<block v-else>
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
</block>
</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" hover-class="none" data-value="/pages/plugins/hospital/patient/patient" @tap="url_event"></button>
</view>
</view>
<!-- 公共 -->
<component-common ref="common"></component-common>
</view>
</template>
<script>
const app = getApp();
import componentCommon from '@/components/common/common';
import componentNoData from '@/components/no-data/no-data';
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
data_list_loding_status: 1,
data_list_loding_msg: '',
params: {},
data_list: [],
};
},
components: {
componentCommon,
componentNoData
},
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
//
this.setData({
params: params,
});
},
onShow() {
//
app.globalData.page_event_onshow_handle();
//
this.get_data();
//
this.init_config();
// onshow
if ((this.$refs.common || null) != null) {
this.$refs.common.on_show();
}
//
app.globalData.page_share_handle();
},
//
onPullDownRefresh() {
this.init();
},
methods: {
//
init_config(status) {
if ((status || false) == true) {
this.setData({
currency_symbol: app.globalData.get_config('currency_symbol'),
});
} else {
app.globalData.is_config(this, 'init_config');
}
},
//
get_data() {
uni.request({
url: app.globalData.get_request_url('index', 'patient', 'hospital'),
method: 'POST',
data: this.params,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: '',
data_list: data.data_list || [],
});
} else {
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: res.data.msg,
});
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
}
});
},
//
del_event(e) {
var data = this.data_list[e.currentTarget.dataset.index];
uni.showModal({
title: this.$t('common.warm_tips'),
content: this.$t('recommend-list.recommend-list.54d418'),
confirmText: this.$t('common.confirm'),
cancelText: this.$t('recommend-list.recommend-list.w9460o'),
success: (result) => {
if (result.confirm) {
// loding
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
//
uni.request({
url: app.globalData.get_request_url('delete', 'patient', 'hospital'),
method: 'POST',
data: {
ids: data.id,
},
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, 'success');
//
this.get_data();
} else {
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: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
}
});
},
//
item_event(e) {
if(parseInt(this.params.is_choice || 0) == 1) {
var data = this.data_list[e.currentTarget.dataset.index];
uni.setStorageSync(app.globalData.data.cache_hospital_patient_choice_value_key, data.id);
app.globalData.page_back_prev_event();
}
},
// url
url_event(e) {
app.globalData.url_event(e);
}
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,175 @@
<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="请输入真实姓名" />
</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>
</view>
</view>
</form>
</view>
<!-- 提示信息 -->
<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>
</view>
</template>
<script>
const app = getApp();
import base64 from '@/common/js/lib/base64.js';
import componentCommon from '@/components/common/common';
import componentPopup from '@/components/popup/popup';
import componentNoData from '@/components/no-data/no-data';
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
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,
};
},
components: {
componentCommon,
componentPopup,
componentNoData
},
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
//
this.setData({
params: params,
});
},
onShow() {
//
app.globalData.page_event_onshow_handle();
//
this.get_data();
// onshow
if ((this.$refs.common || null) != null) {
this.$refs.common.on_show();
}
//
app.globalData.page_share_handle();
},
//
onPullDownRefresh() {
this.init();
},
methods: {
//
get_data() {
uni.request({
url: app.globalData.get_request_url('saveinfo', 'patient', 'hospital'),
method: 'POST',
data: this.params,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_list_loding_status: 3,
data_list_loding_msg: '',
data: data.data || {},
});
console.log(data)
} else {
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: res.data.msg,
});
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
}
});
},
//
popup_health_event(e) {
this.setData({
popup_health_status: true
});
},
//
popup_health_close_event(e) {
this.setData({
popup_health_status: false
});
},
//
form_submit(e) {
//
var form_data = e.detail.value;
console.log(form_data)
}
}
};
</script>
<style>
@import './patient.css';
</style>

View File

@ -0,0 +1,7 @@
.buy-goods-list .goods-images {
width: 60rpx;
height: 60rpx;
}
.buy-goods-list .goods-title {
width: calc(100% - 300rpx);
}

View File

@ -1,6 +1,75 @@
<template>
<view :class="theme_view">
hello
<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>
</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">
<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-user-group" size="28rpx" :color="theme_color"></iconfont>
<text class="margin-left-xs">选择用药人</text>
</button>
</view>
</view>
<view class="padding-horizontal-main">
<view class="br-t-f5"></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个字符" />
</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-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
<!-- 公共 -->
<component-common ref="common"></component-common>
</view>
@ -9,23 +78,25 @@
const app = getApp();
import base64 from '@/common/js/lib/base64.js';
import componentCommon from '@/components/common/common';
import componentPopup from '@/components/popup/popup';
import componentNoData from '@/components/no-data/no-data';
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
theme_view: app.globalData.get_theme_value_view(),
theme_color: app.globalData.get_theme_color(),
data_list_loding_status: 1,
data_list_loding_msg: '',
buy_submit_disabled_status: false,
params: null,
form_submit_disabled_status: false,
params: null,
goods_data: [],
patient_data: null,
patient_list: []
};
},
components: {
componentCommon,
componentPopup,
componentNoData
},
@ -44,9 +115,7 @@
this.setData({
params: params,
});
}
console.log(this.params);
}
},
onShow() {
@ -88,15 +157,13 @@
//
init() {
uni.request({
url: app.globalData.get_request_url('index', 'buy'),
url: app.globalData.get_request_url('saveinit', 'prescription', 'hospital'),
method: 'POST',
data: this.params,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
success: (res) => {
if (res.data.code == 0) {
var data = res.data.data;
console.log(data)
this.get_data();
} else {
this.setData({
data_list_loding_status: 0,
@ -108,18 +175,110 @@
}
},
fail: () => {
uni.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
}
});
},
},
//
get_data() {
var patient_id = uni.getStorageSync(app.globalData.data.cache_hospital_patient_choice_value_key) || 0;
uni.request({
url: app.globalData.get_request_url('saveinfo', 'prescription', 'hospital'),
method: 'POST',
data: {...this.params, ...{id: patient_id}},
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_list_loding_status: 3,
data_list_loding_msg: '',
goods_data: data.goods_data || [],
patient_data: data.patient_data || null,
});
console.log(data)
} else {
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: res.data.msg,
});
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
}
});
},
// url
url_event(e) {
app.globalData.url_event(e);
},
//
form_submit(e) {
//
var form_data = e.detail.value;
//
form_data['id'] = ((this.patient_data || null) == null) ? 0 : (this.patient_data.id || 0);
//
var validation = [
{ fields: 'id', msg: '请选择就诊人' },
];
//
if (app.globalData.fields_check(form_data, validation)) {
//
this.setData({
form_submit_disabled_status: true,
});
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
uni.request({
url: app.globalData.get_request_url('created', 'prescription', 'hospital'),
method: 'POST',
data: form_data,
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.open_web_view(res.data.data, true);
} 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'));
},
});
}
}
}
};
</script>
<style>
@import './prescription.css';
</style>

View File

@ -460,8 +460,6 @@
app.globalData.showToast(this.$t('user-address-save.user-address-save.7w01kd'));
return false;
}
var self = this;
uni.showModal({
title: this.$t('common.warm_tips'),
content: this.$t('order.order.psi67g'),
@ -801,8 +799,6 @@
app.globalData.showToast(this.$t('user-address-save.user-address-save.620370'));
return false;
}
var self = this;
uni.showModal({
title: this.$t('common.warm_tips'),
content: this.$t('recommend-list.recommend-list.54d418'),

View File

@ -32,7 +32,7 @@
</view>
<!-- 底部操作 -->
<view class="bottom-fixed" :style="bottom_fixed_style">
<view class="bottom-fixed">
<view class="bottom-line-exclude">
<block v-if="common_user_address_platform_import_list.length > 0 && common_user_address_platform_import_list.indexOf(client_value) != -1">
<view class="flex-row jc-sb align-c gap-10">
@ -67,7 +67,6 @@
theme_color_light: theme_color_light,
btn_bg_color: 'background:linear-gradient(107deg, ' + theme_color_light + ' 0%, ' + theme_color + ' 100%)',
common_static_url: common_static_url,
bottom_fixed_style: '',
data_list_loding_status: 1,
data_bottom_line_status: false,
common_user_address_platform_import_list: [],

File diff suppressed because one or more lines are too long