feat: 功能开发

This commit is contained in:
huxuejian 2026-07-30 16:48:56 +08:00
parent 4e7d10a0b7
commit f417e6905f
21 changed files with 506 additions and 924 deletions

View File

@ -25,7 +25,8 @@
"API_BASE_URL": "http://192.168.170.62:8080", "API_BASE_URL": "http://192.168.170.62:8080",
"CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U", "CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U",
"APP_ID": "2021004129669493", "APP_ID": "2021004129669493",
"ORDER_SOURCE": "ALIPAY_MINI" "ORDER_SOURCE": "ALIPAY_MINI",
"HOSPITAL_ID": 100002
} }
}, },
"test": { "test": {
@ -35,7 +36,8 @@
"API_BASE_URL": "https://patient.youcan365.com/zyt", "API_BASE_URL": "https://patient.youcan365.com/zyt",
"CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U", "CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U",
"APP_ID": "2021004129669493", "APP_ID": "2021004129669493",
"ORDER_SOURCE": "ALIPAY_MINI" "ORDER_SOURCE": "ALIPAY_MINI",
"HOSPITAL_ID": 100002
} }
}, },
"yidong": { "yidong": {
@ -45,7 +47,8 @@
"API_BASE_URL": "https://hlw.zytzymz.com", "API_BASE_URL": "https://hlw.zytzymz.com",
"CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U0V1", "CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U0V1",
"APP_ID": "2021005110656858", "APP_ID": "2021005110656858",
"ORDER_SOURCE": "ALIPAY_MINI" "ORDER_SOURCE": "ALIPAY_MINI",
"HOSPITAL_ID": 100002
} }
} }
} }

View File

@ -275,6 +275,6 @@
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "震元堂中医院" "navigationBarTitleText": "海宁康华互联网医院"
} }
} }

View File

@ -17,7 +17,7 @@
</template> </template>
<!-- 医院和科室信息 --> <!-- 医院和科室信息 -->
<view class="doctor-info" :class="{ 'doctor-info--elder': elderMode }"> <view class="doctor-info" :class="{ 'doctor-info--elder': elderMode }">
<text class="doctor-hos" :class="{ 'doctor-hos--elder': elderMode }">震元堂中医院</text> <text class="doctor-hos" :class="{ 'doctor-hos--elder': elderMode }">海宁康华互联网医院</text>
<text v-if="consult.deptName" class="doctor-dept" :class="{ 'doctor-dept--elder': elderMode }"> <text v-if="consult.deptName" class="doctor-dept" :class="{ 'doctor-dept--elder': elderMode }">
| {{ consult.deptName }} | {{ consult.deptName }}
</text> </text>

View File

@ -3,7 +3,7 @@
<view class="info-card"> <view class="info-card">
<view class="info-card__header"> <view class="info-card__header">
<image src="/static/icon-hospital.svg" class="icon-hospital" /> <image src="/static/icon-hospital.svg" class="icon-hospital" />
<view class="header-tip">震元堂中医院</view> <view class="header-tip">海宁康华互联网医院</view>
</view> </view>
<view class="info-card__content"> <view class="info-card__content">
<view class="doctor-name"> {{ order.doctorName }}</view> <view class="doctor-name"> {{ order.doctorName }}</view>

View File

@ -6,7 +6,7 @@
<text class="doctor-title">{{ consult.doctorTitle }}</text> <text class="doctor-title">{{ consult.doctorTitle }}</text>
</div> </div>
<div class="doctor-info" style="margin-top: 10rpx;"> <div class="doctor-info" style="margin-top: 10rpx;">
<text class="doctor-hos">震元堂中医院</text> <text class="doctor-hos">海宁康华互联网医院</text>
<text v-if="consult.deptName" class="doctor-dept">| {{ consult.deptName }}</text> <text v-if="consult.deptName" class="doctor-dept">| {{ consult.deptName }}</text>
</div> </div>
</view> </view>

View File

@ -39,7 +39,7 @@
<view v-else-if="type === 'protocol'" class="agreement"> <view v-else-if="type === 'protocol'" class="agreement">
协议说明 协议说明
<view></view> <view></view>
1.1本协议是用户以下简称[绍兴市同源健康管理有限公司越城震元堂中医院互联网医院]以下简称我们之间关于使用绍兴市同源健康管理有限公司越城震元堂中医院互联网医院支付宝小程序以下简称小程序所订立的协议 1.1本协议是用户以下简称[海宁康华互联网医院]以下简称我们之间关于使用海宁康华互联网医院支付宝小程序以下简称小程序所订立的协议
请您在使用小程序前仔细阅读本协议如您不同意本协议内容请立即停止使用小程序如您继续使用小程序即视为您已阅读理解并同意本协议的全部内容 请您在使用小程序前仔细阅读本协议如您不同意本协议内容请立即停止使用小程序如您继续使用小程序即视为您已阅读理解并同意本协议的全部内容
<view></view> <view></view>
1.2我们保留随时修改本协议的权利修改后的协议将在小程序内发布并立即生效如您继续使用小程序视为接受修改后的协议 1.2我们保留随时修改本协议的权利修改后的协议将在小程序内发布并立即生效如您继续使用小程序视为接受修改后的协议
@ -102,9 +102,9 @@
<view></view> <view></view>
8.1如本用户服务协议中的任何条款无论因何种原因完全或部分无效或不具有执行力本用户服务协议的其余条款仍应有效并且具有约束力 8.1如本用户服务协议中的任何条款无论因何种原因完全或部分无效或不具有执行力本用户服务协议的其余条款仍应有效并且具有约束力
<view></view> <view></view>
8.2本协议的解释权归绍兴市同源健康管理有限公司越城震元堂中医院互联网医院所有 8.2本协议的解释权归海宁康华互联网医院所有
<view></view> <view></view>
感谢您使用绍兴市同源健康管理有限公司越城震元堂中医院互联网医院支付宝小程序 感谢您使用海宁康华互联网医院支付宝小程序

View File

@ -4,17 +4,19 @@
<view class="user-header shadow-lg"> <view class="user-header shadow-lg">
就诊人{{ form.name }} {{ form.sex }} {{ form.age ? `${form.age}` : '' }} 就诊人{{ form.name }} {{ form.sex }} {{ form.age ? `${form.age}` : '' }}
</view> </view>
<!-- <view class="relative mt-12 px-15 py-12 bg-white shadow-lg" @click="toAddDisease()"> <view v-if="medTypeList.length > 1"
<view class="section-title is-required">已在实体医疗机构确诊的疾病</view> class="med-type-section relative mt-12 px-15 py-12 bg-white shadow-lg">
<view class="disease-tags"> <view class="med-type-row">
<view v-for="(i, idx) in form.diseases" class="disease-tag" @click.stop="() => { }"> <view class="section-title med-type-title is-required">本次就诊类型</view>
<text>{{ i }}</text> <radio-group class="med-type-options">
<text class="disease-remove" @click.stop="removeDisease(idx)"> <uni-icons type="closeempty" color="#b8956a" <label v-for="item in medTypeList" :key="getMedTypeKey(item)" class="med-type-option">
size="14"></uni-icons> </text> <radio :value="getMedTypeKey(item)" :checked="isMedTypeSelected(item)"
@change="changeMedType(item)" class="custom-radio" color="#b8956a" />
<text>{{ item.diseType }}</text>
</label>
</radio-group>
</view> </view>
<view class="disease-tag add-tag">+ 添加</view>
</view> </view>
</view> -->
<view class="description-section relative mt-12 px-15 py-12 bg-white shadow-lg"> <view class="description-section relative mt-12 px-15 py-12 bg-white shadow-lg">
<view class="section-title is-required">请描述您的病情</view> <view class="section-title is-required">请描述您的病情</view>
<textarea v-model="form.description" :show-confirm-bar="false" auto-height="true" class="mt-10 description" <textarea v-model="form.description" :show-confirm-bar="false" auto-height="true" class="mt-10 description"
@ -69,6 +71,7 @@ import { ref } from "vue";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { onLoad, onUnload } from '@dcloudio/uni-app'; import { onLoad, onUnload } from '@dcloudio/uni-app';
import orderStore from '@/store/order'; import orderStore from '@/store/order';
import { get, remove } from "@/utils/cache";
import { uploadUrl, getFullPath } from '@/utils/http'; import { uploadUrl, getFullPath } from '@/utils/http';
import { toast, loading, hideLoading } from '@/utils/widget'; import { toast, loading, hideLoading } from '@/utils/widget';
@ -85,7 +88,7 @@ const guessList = [
'上次开的药已经用完,需要续药', '上次开的药已经用完,需要续药',
'储备的药品已用完,要求开方配药' '储备的药品已用完,要求开方配药'
] ]
const { order: form, histories, ybVisitRecord } = storeToRefs(orderStore()); const { order: form, histories, medTypeList } = storeToRefs(orderStore());
const { init: initOrder } = orderStore(); const { init: initOrder } = orderStore();
const visible = ref(false); const visible = ref(false);
const guessVisible = ref(false); const guessVisible = ref(false);
@ -103,6 +106,21 @@ function changeHistory(prop, value) {
form.value[prop] = value; form.value[prop] = value;
} }
function getMedTypeKey(item) {
return [item.med_type, item.diseType, item.dise_codg, item.dise_name].join('-');
}
function isMedTypeSelected(item) {
const medInfo = form.value.medInfo || {};
return getMedTypeKey(medInfo) === getMedTypeKey(item);
}
function changeMedType(item) {
if (!isMedTypeSelected(item)) {
form.value.medInfo = { ...item };
}
}
function showDescriptionGuess() { function showDescriptionGuess() {
if (guessCloseTimer) clearTimeout(guessCloseTimer); if (guessCloseTimer) clearTimeout(guessCloseTimer);
guessCloseTimer = null; guessCloseTimer = null;
@ -217,7 +235,9 @@ function onReachBottom() {
} }
onLoad((options) => { onLoad((options) => {
initOrder({ feeType: options.feeType, socialno: options.socialno }); const hisArchive = get("current-his-archive");
remove("current-his-archive");
initOrder({ feeType: options.feeType, socialno: options.socialno,hisArchive });
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: titleMap[options.feeType] || '' title: titleMap[options.feeType] || ''
}) })
@ -248,6 +268,31 @@ onUnload(() => {
font-size: 32rpx; font-size: 32rpx;
} }
.med-type-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.med-type-title {
flex-shrink: 0;
}
.med-type-options {
display: flex;
align-items: center;
justify-content: flex-end;
flex: 1;
}
.med-type-option {
display: flex;
align-items: center;
margin-left: 24rpx;
font-size: 28rpx;
white-space: nowrap;
}
.section-sub-title { .section-sub-title {
font-size: 28rpx; font-size: 28rpx;
color: #555; color: #555;
@ -457,6 +502,22 @@ onUnload(() => {
font-size: 42rpx !important; font-size: 42rpx !important;
} }
.med-type-row {
align-items: flex-start;
flex-direction: column;
}
.med-type-options {
width: 100%;
justify-content: space-between;
margin-top: 20rpx;
}
.med-type-option {
margin-left: 0;
font-size: 36rpx !important;
}
.section-sub-title { .section-sub-title {
font-size: 36rpx !important; font-size: 36rpx !important;

View File

@ -23,7 +23,7 @@
<text :class="{ 'title--elder': elderMode }">{{ i.title }}</text> <text :class="{ 'title--elder': elderMode }">{{ i.title }}</text>
</view> </view>
<view class="info-row" :class="{ 'info-row--elder': elderMode }"> <view class="info-row" :class="{ 'info-row--elder': elderMode }">
<text :class="{ 'hospital--elder': elderMode }">震元堂中医院</text> <text :class="{ 'hospital--elder': elderMode }">海宁康华互联网医院</text>
<text v-if="i.deptName" :class="{ 'dept--elder': elderMode }"> | {{ i.deptName }}</text> <text v-if="i.deptName" :class="{ 'dept--elder': elderMode }"> | {{ i.deptName }}</text>
</view> </view>
</view> </view>

View File

@ -49,7 +49,8 @@ import { computed, ref, watch } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad, onShow } from "@dcloudio/uni-app";
import useElder from "@/hooks/useElder"; import useElder from "@/hooks/useElder";
import useUser from "@/hooks/useUser"; import useUser from "@/hooks/useUser";
import { bindHisPatient, sm4Encrypt } from "@/utils/api"; import { bindHisPatient, getHisCustomer } from "@/utils/api";
import { set } from "@/utils/cache";
import { toast } from "@/utils/widget"; import { toast } from "@/utils/widget";
import reLogin from "@/components/re-login.vue"; import reLogin from "@/components/re-login.vue";
@ -132,66 +133,51 @@ async function nextStep() {
toast("请选择就诊人"); toast("请选择就诊人");
return; return;
} }
if (feeType.value === 'YB' && false) { let hisArchive = null;
// , if (feeType.value === 'YB') {
const self = currentProfile.value.isSelf;
const authCode = await getAuthCode("nhsamp"); const authCode = await getAuthCode("nhsamp");
let archiveParams = [authCode]; const psnToken = await ybPlugin.getArchiveToken(authCode);
if (!self) { if (psnToken) {
const encrypted = await getEncryptedPatientInfo(currentProfile.value); hisArchive = await bindInsurance(psnToken, currentProfile.value.certNo, currentProfile.value.name, currentProfile.value.mobile);
archiveParams = [authCode, encrypted.anotherIdNo, encrypted.anotherName]; } else {
} toast('获取医保授权失败');
const psnToken = await ybPlugin.getArchiveToken(...archiveParams); return
if (!psnToken) return;
try {
await bindInsurance(
psnToken,
currentProfile.value.certNo,
currentProfile.value.name,
currentProfile.value.mobile,
);
uni.navigateTo({
url: `/pages/consult/disease-description?socialno=${currentProfile.value.certNo}&type=${type.value}&authDrugRecord=${authDrugRecord.value}`,
});
} catch (error) {
toast(error.message || error);
} }
} else {
hisArchive = await getHisArchive(currentProfile.value.certNo);
} }
set("current-his-archive", hisArchive);
uni.navigateTo({ uni.navigateTo({
url: `/pages/consult/disease-description?socialno=${currentProfile.value.certNo}&feeType=${feeType.value}`, url: `/pages/consult/disease-description?socialno=${currentProfile.value.certNo}&feeType=${feeType.value}`,
}); });
} }
async function getEncryptedPatientInfo(patient) {
const res = await sm4Encrypt({ textGroup: [patient.certNo, patient.name] });
if (!res || !res.success || !Array.isArray(res.textGroup) || res.textGroup.length < 2) {
return Promise.reject((res && res.message) || "获取就诊人加密信息失败");
}
return {
anotherIdNo: res.textGroup[0],
anotherName: res.textGroup[1],
};
}
async function bindInsurance(psnToken, idCard, name, mobile) { async function bindInsurance(psnToken, idCard, name, mobile) {
const { success, list, message } = await bindHisPatient({ idCard, name, mobile, psnToken }); const { success, list, tmbxx, message } = await bindHisPatient({ idCard, name, mobile, psnToken });
const patients = Array.isArray(list) ? list : []; const patients = Array.isArray(list) ? list : [];
const patient = patients.find(item => item.socialno === idCard) || patients[0] || null; const patient = patients.find(item => item.socialno === idCard) || patients[0] || null;
if (!success || !patient) { if (!success || !patient) {
toast(message || "医保建档失败");
return Promise.reject(message || "医保建档失败"); return Promise.reject(message || "医保建档失败");
} }
if (patient.isyb !== "1") { if (patient.isyb !== "1") {
return Promise.reject("当前用户为非医保用户"); toast("医保建档失败");
return Promise.reject("医保建档失败");
}
patient.tmbxx = tmbxx;
return patient;
} }
if (myProfile.value && myProfile.value.socialno === patient.socialno) { async function getHisArchive(idCard) {
myProfile.value = getProfileData(patient); const { success, list, tmbxx, message } = await getHisCustomer(idCard);
return; const patients = Array.isArray(list) ? list : [];
const patient = patients.find(item => item.socialno === idCard);
if (!success || !patient) {
toast(message || "获取档案信息失败");
return Promise.reject(message || "获取档案信息失败");
} }
patient.tmbxx = tmbxx;
const index = familyProfile.value.findIndex(item => item.socialno === patient.socialno); return patient;
if (index >= 0) familyProfile.value[index] = getProfileData(patient);
} }
function toggle(patientId) { function toggle(patientId) {

View File

@ -8,7 +8,7 @@
<uni-icons type="download" :color="themeColor" :size="elderMode ? 24 : 16" /> <uni-icons type="download" :color="themeColor" :size="elderMode ? 24 : 16" />
<text>导入历史</text> <text>导入历史</text>
</view> </view>
<view class="apply-head-action text-base text-primary" @click="toAddDrug()"> <view class="apply-head-action text-base text-primary" @click="scanCode()">
<uni-icons type="scan" :color="themeColor" :size="elderMode ? 24 : 16" /> <uni-icons type="scan" :color="themeColor" :size="elderMode ? 24 : 16" />
<text>扫码</text> <text>扫码</text>
</view> </view>
@ -42,8 +42,8 @@
<input-number-box v-model="drug.quantity" :min="1" :elderMode="elderMode" <input-number-box v-model="drug.quantity" :min="1" :elderMode="elderMode"
:style="drug.quantity > drug.recommended_quantity ? 'color:red' : ''" /> :style="drug.quantity > drug.recommended_quantity ? 'color:red' : ''" />
<view class="drug-action" :class="{ 'drug-action--elder': elderMode }"> <view class="drug-action" :class="{ 'drug-action--elder': elderMode }">
<view class="drug-action-item drug-action-item--active" :class="{ 'drug-action-item--elder': elderMode }" <view class="drug-action-item drug-action-item--active"
@click="edit(drug)"> :class="{ 'drug-action-item--elder': elderMode }" @click="edit(drug)">
编辑 编辑
</view> </view>
<view class="drug-action-item" :class="{ 'drug-action-item--elder': elderMode }" @click="remove(idx)"> <view class="drug-action-item" :class="{ 'drug-action-item--elder': elderMode }" @click="remove(idx)">
@ -115,8 +115,8 @@
:showCancel="customConfirmData.showCancel" :cancelText="customConfirmData.cancelText" :showCancel="customConfirmData.showCancel" :cancelText="customConfirmData.cancelText"
:confirmText="customConfirmData.confirmText" @confirm="customConfirmData.onConfirm" :confirmText="customConfirmData.confirmText" @confirm="customConfirmData.onConfirm"
@cancel="customConfirmData.onCancel" @close="customConfirmVisible = false" /> @cancel="customConfirmData.onCancel" @close="customConfirmVisible = false" />
<confirm-import-popup :consultType="order.consultType" :drugs="displayDrugs" :visible="visible" @close="visible = false" <confirm-import-popup :consultType="order.consultType" :drugs="displayDrugs" :visible="visible"
@confirm="changeDrugs($event)" /> @close="visible = false" @confirm="changeDrugs($event)" />
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
@ -241,8 +241,16 @@ function remove(idx) {
customConfirmVisible.value = true; customConfirmVisible.value = true;
} }
function toAddDrug() { function toAddDrug(code ='') {
uni.navigateTo({ url: '/pages/consult/select-drug/select-drug' }) uni.navigateTo({ url: `/pages/consult/select-drug/select-drug?code=${code}` })
}
function scanCode() {
uni.scanCode({
success: (res) => {
toAddDrug(res.result)
}
})
} }
function toAddDisease() { function toAddDisease() {

View File

@ -123,7 +123,8 @@ const selectMap = computed(() => drugs.value.reduce((acc, cur) => {
}, {})) }, {}))
useRefChange(keyword, search); useRefChange(keyword, search);
onLoad(() => { onLoad((options) => {
keyword.value = options.keyword || ''
drugs.value = order.value && Array.isArray(order.value.drugs) ? order.value.drugs.map(i => ({ ...i })) : []; drugs.value = order.value && Array.isArray(order.value.drugs) ? order.value.drugs.map(i => ({ ...i })) : [];
search() search()
}) })

View File

@ -8,10 +8,10 @@
<view class="p-10 rounded mb-10 content-bg"> <view class="p-10 rounded mb-10 content-bg">
<scroll-view class="content-scroll"> <scroll-view class="content-scroll">
<view class="text-base leading-normal"> <view class="text-base leading-normal">
您正在使用震元堂中医院互联网医院在线诊疗服务平台 您正在使用海宁康华互联网医院在线诊疗服务平台
</view> </view>
<view class="pt-5 text-base leading-normal"> <view class="pt-5 text-base leading-normal">
接下来的问诊开方服务将由震元堂中医院互联网医院的注册医师提供药店工作人员仅提供操作辅助 接下来的问诊开方服务将由海宁康华互联网医院的注册医师提供药店工作人员仅提供操作辅助
</view> </view>
<view class="pt-5 text-base leading-normal"> <view class="pt-5 text-base leading-normal">
请确认您已了解并同意上述安排 请确认您已了解并同意上述安排

File diff suppressed because it is too large Load Diff

View File

@ -3,14 +3,14 @@
<template #header> <template #header>
<view v-if="logined" class="status-bar"> <view v-if="logined" class="status-bar">
<text v-for="(tab, index) in tabs" :key="index" <text v-for="(tab, index) in tabs" :key="index"
:class="['tab', { active: activeTab === index, 'tab--elder': elderMode }]" @click="switchTab(index, tab)"> :class="['tab', { active: activeTab === index, 'tab--elder': elderMode }]" @click="switchTab(index)">
{{ tab }} {{ tab }}
</text> </text>
</view> </view>
</template> </template>
<view v-if="logined" style="padding: 20rpx 0"> <view v-if="logined" style="padding: 20rpx 0">
<empty-data v-if="switchList.length === 0" /> <empty-data v-if="list.length === 0" />
<view v-for="item in switchList" class="card" :class="{ 'card--elder': elderMode }" @click="toRecord(item)"> <view v-for="item in list" class="card" :class="{ 'card--elder': elderMode }" @click="toRecord(item)">
<view class="card_head info-row" :class="{ 'card_head--elder': elderMode }"> <view class="card_head info-row" :class="{ 'card_head--elder': elderMode }">
<view class="doctor-info" :class="{ 'doctor-info--elder': elderMode }"> <view class="doctor-info" :class="{ 'doctor-info--elder': elderMode }">
<text>{{ item.doctorName }}</text> <text>{{ item.doctorName }}</text>
@ -73,7 +73,7 @@
</template> </template>
<script setup> <script setup>
import { ref, watch, computed, onMounted } from "vue"; import { ref, watch, onMounted } from "vue";
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
import dayjs from "dayjs"; import dayjs from "dayjs";
import useUser from "@/hooks/useUser"; import useUser from "@/hooks/useUser";
@ -101,7 +101,18 @@ const more = ref(false);
const loading = ref(false); const loading = ref(false);
// //
const tabs = ["全部", "待支付", "处理中", "已结束", "已取消"]; const tabs = ["全部", "待支付", "处理中", "已结束", "已取消"];
const tabFilters = [
{},
{ payStatus: "pending", orderStatus: "pending" },
{
payStatus: "success",
orderStatuses: ["pending", "processing", "completed"],
},
{ orderStatus: "finished" },
{ orderStatus: "cancelled" },
];
const activeTab = ref(0); // const activeTab = ref(0); //
let requestSequence = 0;
const pay = useYbPay(null, reload); const pay = useYbPay(null, reload);
// //
@ -123,31 +134,43 @@ function loadMore() {
} }
function reload() { function reload() {
list.value = [];
page.value = 1; page.value = 1;
getList(); more.value = false;
getList(true);
} }
async function getList() { async function getList(force = false) {
if (loading.value) return; if (loading.value && !force) return;
const requestId = ++requestSequence;
const requestedPage = page.value;
const filters = tabFilters[activeTab.value] || {};
loading.value = true; loading.value = true;
const { data, succes, pages } = await getConsultOrder({ try {
page: page.value, const { data, pages } = await getConsultOrder({
page: requestedPage,
pageSize: 20, pageSize: 20,
// patientId: myProfile.value.patientid, // patientId: myProfile.value.patientid,
accountId: userInfo.value.userId, accountId: userInfo.value.userId,
showPassdiagnostic: true, // showPassdiagnostic: true,
orderSource: OrderSource orderSource: OrderSource,
...filters,
}); });
if (requestId !== requestSequence) return;
const listData = Array.isArray(data) const listData = Array.isArray(data)
? data.map((item) => { ? data.map((item) => {
const res = getOrderStatus(item, true); const res = getOrderStatus(item, true);
return { ...item, ...res }; return { ...item, ...res };
}) })
: []; : [];
list.value = page.value === 1 ? listData : [...list.value, ...listData]; list.value = requestedPage === 1 ? listData : [...list.value, ...listData];
more.value = pages > page.value; more.value = pages > requestedPage;
} finally {
if (requestId === requestSequence) {
loading.value = false; loading.value = false;
} }
}
}
async function cancelOrder(item) { async function cancelOrder(item) {
uni.showModal({ uni.showModal({
@ -165,8 +188,7 @@ async function cancelOrder(item) {
title: "取消成功", title: "取消成功",
icon: "success", icon: "success",
}); });
page.value = 1; reload();
getList();
} else { } else {
uni.showToast({ uni.showToast({
title: message, title: message,
@ -263,37 +285,24 @@ async function toRefundPage(item) {
function refresh() { function refresh() {
if (loading.value) return; if (loading.value) return;
page.value = 1; reload();
list.value = [];
getList();
} }
watch(logined, (n) => { watch(logined, (n) => {
if (n) { if (n) {
page.value = 1; reload();
getList();
} }
}); });
const tab = ref("全部");
const switchList = computed(() => {
return list.value.filter((item) => {
if (tab.value === "全部") {
return true;
}
return item.text === tab.value;
});
});
// //
const switchTab = (index, item) => { const switchTab = (index) => {
activeTab.value = index; activeTab.value = index;
tab.value = item; reload();
}; };
onShow(() => { onShow(() => {
if (logined.value) { if (logined.value) {
page.value = 1; reload();
getList();
} }
}); });
</script> </script>

View File

@ -7,7 +7,7 @@
<text class="title" :class="{ 'title--elder': elderMode }">{{ order.title }}</text> <text class="title" :class="{ 'title--elder': elderMode }">{{ order.title }}</text>
</view> </view>
<view class="info-row" :class="{ 'info-row--elder': elderMode }"> <view class="info-row" :class="{ 'info-row--elder': elderMode }">
<text class="hospital" :class="{ 'hospital--elder': elderMode }">震元堂中医院</text> <text class="hospital" :class="{ 'hospital--elder': elderMode }">海宁康华互联网医院</text>
<text v-if="order.deptName" class="dept" :class="{ 'dept--elder': elderMode }"> | {{ order.deptName }}</text> <text v-if="order.deptName" class="dept" :class="{ 'dept--elder': elderMode }"> | {{ order.deptName }}</text>
</view> </view>
</view> </view>

View File

@ -12,7 +12,7 @@
<text :class="{ 'title-text--elder': elderMode }">{{ order.doctorTitle }}</text> <text :class="{ 'title-text--elder': elderMode }">{{ order.doctorTitle }}</text>
</view> </view>
<view class="info-row" :class="{ 'info-row--elder': elderMode }"> <view class="info-row" :class="{ 'info-row--elder': elderMode }">
<text :class="{ 'hospital-text--elder': elderMode }">震元堂中医院</text> <text :class="{ 'hospital-text--elder': elderMode }">海宁康华互联网医院</text>
<text v-if="order.deptName" :class="{ 'dept-text--elder': elderMode }"> | {{ order.deptName }}</text> <text v-if="order.deptName" :class="{ 'dept-text--elder': elderMode }"> | {{ order.deptName }}</text>
</view> </view>
</view> </view>

View File

@ -3,13 +3,13 @@
<view v-if="data" class="relative prescription-container"> <view v-if="data" class="relative prescription-container">
<view class="header"> <view class="header">
<view class="row"> <view class="row">
<view class="company">绍兴市同源健康管理有限公司越城</view> <view class="company">海宁康华互联网医院</view>
<view class="prescription-type"> <view class="prescription-type">
<view>普通</view> <view>普通</view>
<view>处方</view> <view>处方</view>
</view> </view>
</view> </view>
<view class="hospital">震元堂中医院互联网医院处方笺</view> <view class="hospital">海宁康华互联网处方笺</view>
<view class="sub-header"> <view class="sub-header">
<span class="no">NO:{{ data.medOrgOrderNo }}</span> <span class="no">NO:{{ data.medOrgOrderNo }}</span>
</view> </view>

View File

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

View File

@ -4,12 +4,12 @@ import { defineStore } from "pinia";
import userStore from "./user"; import userStore from "./user";
import { toast } from "@/utils/widget"; import { toast } from "@/utils/widget";
const orderSource = 'ALIPAY_MINI'; const orderSource = 'ALIPAY_MINI';
const hospitalId = process.env.HOSPITAL_ID;
const FeeType = ['YB', 'ZF']; const FeeType = ['YB', 'ZF'];
const ConsultTypeByFeeType = {
YB: 'onlineConsult', const outpatientMedType = { med_type: '11', diseType: '普通门诊', dise_codg: '', dise_name: '' };
ZF: 'onlineConsult',
};
const histories = [ const histories = [
{ {
label: "过往病史", label: "过往病史",
@ -67,8 +67,8 @@ const drugKeys = [
"memo", "memo",
"medication_proof_desc", "medication_proof_desc",
]; ];
const hospitalId = 100002;
export default defineStore("orderStore", () => { export default defineStore("orderStore", () => {
const medTypeList = ref([]);
const { userInfo, patientList } = storeToRefs(userStore()); const { userInfo, patientList } = storeToRefs(userStore());
const regFee = ref(undefined); const regFee = ref(undefined);
const ybVisitRecord = ref(null); const ybVisitRecord = ref(null);
@ -150,12 +150,29 @@ export default defineStore("orderStore", () => {
}); });
}); });
function init({ feeType, socialno }) { function init({ feeType, socialno, hisArchive }) {
if (!FeeType.includes(feeType)) { if (!FeeType.includes(feeType)) {
toast('不支持的费用类型'); toast('不支持的费用类型');
uni.navigateBack(); uni.navigateBack();
return; return;
} }
if (!hisArchive || hisArchive.socialno !== socialno) {
toast('档案与就诊人不匹配');
uni.navigateBack();
return;
}
const tmbxx = Array.isArray(hisArchive.tmbxx) ? hisArchive.tmbxx : [];
medTypeList.value = [outpatientMedType, {
"med_type": "140201", "diseType": "特病",
"dise_codg": "M01600",
"dise_name": "糖尿病"
},
{
"med_type": "140104", "diseType": "慢病",
"dise_codg": "M03900",
"dise_name": "高血压"
}
];
const profile = patientList.value.find((i) => i.socialno === socialno); const profile = patientList.value.find((i) => i.socialno === socialno);
regFee.value = 0; regFee.value = 0;
order.value = { order.value = {
@ -165,17 +182,18 @@ export default defineStore("orderStore", () => {
description: "", description: "",
images: [], images: [],
drugs: [], drugs: [],
patientId: profile.patientid, patientId: hisArchive.patientId,
idCard: profile.socialno, idCard: profile.socialno,
name: profile.name, name: profile.name,
mobile: profile.tel, mobile: profile.tel,
blhno: profile.blhno, blhno: hisArchive.blhno,
age: profile.age, age: profile.age,
sex: profile.sex, sex: profile.sex,
address: profile.address, address: profile.address,
orderSource, orderSource,
feeType, feeType,
consultType: ConsultTypeByFeeType[feeType], medInfo: { ...outpatientMedType },
// consultType: ConsultTypeByFeeType[feeType],
}; };
histories.forEach((item) => (order.value[item.prop] = item.options[1])); histories.forEach((item) => (order.value[item.prop] = item.options[1]));
order.value.pastHistoryStr = pastHistoryStr.value; order.value.pastHistoryStr = pastHistoryStr.value;
@ -223,6 +241,7 @@ export default defineStore("orderStore", () => {
order, order,
init, init,
ybVisitRecord, ybVisitRecord,
medTypeList,
regFee, regFee,
pastHistoryStr, pastHistoryStr,
histories: ref(histories), histories: ref(histories),

View File

@ -46,7 +46,7 @@ export default defineStore("userStore", () => {
} }
})) }))
async function login(remindTobind = true) { async function login() {
if (!userInfo.value.certNo) { if (!userInfo.value.certNo) {
const authCode = await getAuthCode(); const authCode = await getAuthCode();
const auth = authStore(); const auth = authStore();

View File

@ -1,8 +1,8 @@
import { loading, hideLoading } from "./widget"; import { loading, hideLoading } from "./widget";
const baseUrl = process.env.API_BASE_URL; const baseUrl = process.env.API_BASE_URL;
const corpId = process.env.CORP_ID; const corpId = process.env.CORP_ID;
const hospitalId = process.env.HOSPITAL_ID;
const hospitalId = 100001;
const defaultOptions = { const defaultOptions = {
header: { header: {
"Content-Type": "application/json", "Content-Type": "application/json",