diff --git a/apps/web-antd/src/views/business/product/health-food/index.vue b/apps/web-antd/src/views/business/product/health-food/index.vue
index dde26e00..28754e19 100644
--- a/apps/web-antd/src/views/business/product/health-food/index.vue
+++ b/apps/web-antd/src/views/business/product/health-food/index.vue
@@ -25,7 +25,10 @@ import DrugFreeShippingCell from '#/views/business/product/_shared/drug-free-shi
import ProductInfoCell from '#/views/business/product/_shared/product-info-cell.vue';
import WarehouseDrugPriceModal from '#/views/business/warehouse-drug-management/admin/components/modal.vue';
import BindListModal from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
// 导入保健食品管理相关API
import {
@@ -135,17 +138,20 @@ function handleSyncPinyin() {
}
/**
- * 打开某产品的配送仓绑定列表(带总仓售价供费用封顶/默认平台费)
+ * 打开某产品的配送仓绑定列表(带总仓售价/供货价供费用封顶与自动算费)
* @param autoCreate 为 true 时打开后立刻弹出新增绑定表单
*/
function openBindList(row: any, autoCreate = false) {
const price = resolveCentralPrice(row);
+ const market = resolveCentralMarketPrice(row);
bindListModalApi.setData({
drug_id: row.id,
drug_name: row.drug_name,
specification: row.specification,
image: row.image,
central_price: price,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/business/product/medical-device/index.vue b/apps/web-antd/src/views/business/product/medical-device/index.vue
index f091aa2b..45699142 100644
--- a/apps/web-antd/src/views/business/product/medical-device/index.vue
+++ b/apps/web-antd/src/views/business/product/medical-device/index.vue
@@ -18,7 +18,10 @@ import DrugFreeShippingCell from '#/views/business/product/_shared/drug-free-shi
import ProductInfoCell from '#/views/business/product/_shared/product-info-cell.vue';
import WarehouseDrugPriceModal from '#/views/business/warehouse-drug-management/admin/components/modal.vue';
import BindListModal from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
import {
deleteMedicalDevice,
@@ -113,17 +116,20 @@ function handleSyncPinyin() {
}
/**
- * 打开某产品的配送仓绑定列表(带总仓售价供费用封顶/默认平台费)
+ * 打开某产品的配送仓绑定列表(带总仓售价/供货价供费用封顶与自动算费)
* @param autoCreate 为 true 时打开后立刻弹出新增绑定表单
*/
function openBindList(row: any, autoCreate = false) {
const price = resolveCentralPrice(row);
+ const market = resolveCentralMarketPrice(row);
bindListModalApi.setData({
drug_id: row.id,
drug_name: row.drug_name,
specification: row.specification,
image: row.image,
central_price: price,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/business/product/non-drug/index.vue b/apps/web-antd/src/views/business/product/non-drug/index.vue
index 14fb2659..ae7b9700 100644
--- a/apps/web-antd/src/views/business/product/non-drug/index.vue
+++ b/apps/web-antd/src/views/business/product/non-drug/index.vue
@@ -18,7 +18,10 @@ import DrugFreeShippingCell from '#/views/business/product/_shared/drug-free-shi
import ProductInfoCell from '#/views/business/product/_shared/product-info-cell.vue';
import WarehouseDrugPriceModal from '#/views/business/warehouse-drug-management/admin/components/modal.vue';
import BindListModal from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
import { deleteNonDrug, exportNonDrugApi, syncNonDrugPinyin } from './api';
import FormModalDemo from './components/modal.vue';
@@ -109,17 +112,20 @@ function handleSyncPinyin() {
}
/**
- * 打开某产品的配送仓绑定列表(带总仓售价供费用封顶/默认平台费)
+ * 打开某产品的配送仓绑定列表(带总仓售价/供货价供费用封顶与自动算费)
* @param autoCreate 为 true 时打开后立刻弹出新增绑定表单
*/
function openBindList(row: any, autoCreate = false) {
const price = resolveCentralPrice(row);
+ const market = resolveCentralMarketPrice(row);
bindListModalApi.setData({
drug_id: row.id,
drug_name: row.drug_name,
specification: row.specification,
image: row.image,
central_price: price,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/business/product/service-pack/index.vue b/apps/web-antd/src/views/business/product/service-pack/index.vue
index a34e34b5..08c9bd0b 100644
--- a/apps/web-antd/src/views/business/product/service-pack/index.vue
+++ b/apps/web-antd/src/views/business/product/service-pack/index.vue
@@ -17,7 +17,10 @@ import DrugFreeShippingCell from '#/views/business/product/_shared/drug-free-shi
import ProductInfoCell from '#/views/business/product/_shared/product-info-cell.vue';
import WarehouseDrugPriceModal from '#/views/business/warehouse-drug-management/admin/components/modal.vue';
import BindListModal from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
import { deleteServicePack, syncServicePackPinyin } from './api';
import FormModalDemo from './components/modal.vue';
@@ -105,17 +108,20 @@ function handleSyncPinyin() {
}
/**
- * 打开某产品的配送仓绑定列表(带总仓售价供费用封顶/默认平台费)
+ * 打开某产品的配送仓绑定列表(带总仓售价/供货价供费用封顶与自动算费)
* @param autoCreate 为 true 时打开后立刻弹出新增绑定表单
*/
function openBindList(row: any, autoCreate = false) {
const price = resolveCentralPrice(row);
+ const market = resolveCentralMarketPrice(row);
bindListModalApi.setData({
drug_id: row.id,
drug_name: row.drug_name,
specification: row.specification,
image: row.image,
central_price: price,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/business/product/western-medicine/index.vue b/apps/web-antd/src/views/business/product/western-medicine/index.vue
index 7ccd7998..05b8c2cc 100644
--- a/apps/web-antd/src/views/business/product/western-medicine/index.vue
+++ b/apps/web-antd/src/views/business/product/western-medicine/index.vue
@@ -18,7 +18,10 @@ import DrugFreeShippingCell from '#/views/business/product/_shared/drug-free-shi
import ProductInfoCell from '#/views/business/product/_shared/product-info-cell.vue';
import WarehouseDrugPriceModal from '#/views/business/warehouse-drug-management/admin/components/modal.vue';
import BindListModal from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
import {
deleteWesternMedicine,
@@ -125,17 +128,20 @@ function handleSyncPinyin() {
}
/**
- * 打开某药的配送仓绑定列表(带总仓售价供费用封顶/默认平台费)
+ * 打开某药的配送仓绑定列表(带总仓售价/供货价供费用封顶与自动算费)
* @param autoCreate 为 true 时打开后立刻弹出新增绑定表单
*/
function openBindList(row: any, autoCreate = false) {
const price = resolveCentralPrice(row);
+ const market = resolveCentralMarketPrice(row);
bindListModalApi.setData({
drug_id: row.id,
drug_name: row.drug_name,
specification: row.specification,
image: row.image,
central_price: price,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/business/warehouse-drug-management/admin/components/delivery-fee-reallocate-modal.vue b/apps/web-antd/src/views/business/warehouse-drug-management/admin/components/delivery-fee-reallocate-modal.vue
index f2870c71..d7c3c2b3 100644
--- a/apps/web-antd/src/views/business/warehouse-drug-management/admin/components/delivery-fee-reallocate-modal.vue
+++ b/apps/web-antd/src/views/business/warehouse-drug-management/admin/components/delivery-fee-reallocate-modal.vue
@@ -11,6 +11,7 @@ import { Alert, InputNumber, Table, message } from 'ant-design-vue';
import {
calcFeeSum,
+ calcPlatformFee,
calcPromoFee,
} from '#/views/system/delivery-warehouse-drug/config/form';
@@ -34,6 +35,9 @@ const gridApi = ref
(null);
const onSuccess = ref<(() => void) | null>(null);
const saleText = computed(() => `¥${Number(salePrice.value || 0).toFixed(4)}`);
+const marketText = computed(
+ () => `¥${Number(marketPrice.value || 0).toFixed(4)}`,
+);
const columns = [
{ title: '配送仓', dataIndex: 'warehouse_name', key: 'warehouse_name', ellipsis: true },
@@ -44,15 +48,18 @@ const columns = [
];
/**
- * 售价变化后自动回填推广费 = 售价 − 报价 − 平台费
+ * 按新公式回填:推广费=售价−供货价,平台费=供货价−报价
*/
-function syncPromo(row: BindRow) {
- row.promo_fee = calcPromoFee({
+function syncFees(row: BindRow) {
+ const base = {
sale_price: salePrice.value,
+ market_price: marketPrice.value,
quote: row.quote,
- platform_fee: row.platform_fee,
promo_fee: row.promo_fee,
- });
+ platform_fee: row.platform_fee,
+ };
+ row.platform_fee = calcPlatformFee(base);
+ row.promo_fee = calcPromoFee(base);
}
function feeSum(row: BindRow) {
@@ -139,12 +146,9 @@ const [Modal, modalApi] = useVbenModal({
platform_fee: Number(b.platform_fee || 0),
promo_fee: Number(b.promo_fee || 0),
};
- // 按新售价重算推广费默认值
- if (salePrice.value > 0) {
- if (!(row.platform_fee > 0)) {
- row.platform_fee = Number((salePrice.value * 0.05).toFixed(4));
- }
- syncPromo(row);
+ // 按新售价/供货价重算两费默认值
+ if (salePrice.value > 0 || marketPrice.value > 0) {
+ syncFees(row);
}
return row;
});
@@ -159,7 +163,7 @@ const [Modal, modalApi] = useVbenModal({
show-icon
class="mb-3"
message="该药品已绑定配送仓,总仓改价后必须重新填写各仓报价/平台费/推广费后才能保存"
- :description="`新建议售价 ${saleText};推广费默认=售价−报价−平台费,可微调`"
+ :description="`新建议售价 ${saleText},平台供货价 ${marketText};推广费=售价−供货价,平台费=供货价−报价,可微调`"
/>
@@ -187,7 +191,6 @@ const [Modal, modalApi] = useVbenModal({
:precision="4"
class="w-full"
size="small"
- @change="syncPromo(record)"
/>
diff --git a/apps/web-antd/src/views/business/warehouse-drug-management/admin/index.vue b/apps/web-antd/src/views/business/warehouse-drug-management/admin/index.vue
index a17a9fc8..d15d9064 100644
--- a/apps/web-antd/src/views/business/warehouse-drug-management/admin/index.vue
+++ b/apps/web-antd/src/views/business/warehouse-drug-management/admin/index.vue
@@ -20,7 +20,10 @@ import {
updateWarehouseDrugManagementStatusApi
} from './api';
import BindListModalDemo from '#/views/system/delivery-warehouse-drug/components/bind-list-modal.vue';
-import { resolveCentralPrice } from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
+import {
+ resolveCentralMarketPrice,
+ resolveCentralPrice,
+} from '#/views/system/delivery-warehouse-drug/utils/resolve-central-price';
import FormModalDemo from './components/modal.vue';
import ExcelUpload from './components/ExcelUpload.vue';
@@ -128,6 +131,8 @@ function openBindList(row: Record, autoCreate = false) {
message.warning('无法识别药品');
return;
}
+ const market =
+ (resolveCentralMarketPrice(row) ?? Number(row.market_price || 0)) || null;
bindListModalApi.setData({
drug_id: drugId,
drug_name: drug.drug_name || row.drug_name || '',
@@ -135,6 +140,8 @@ function openBindList(row: Record, autoCreate = false) {
image: drug.image || '',
// ?? 与 || 混用必须加括号,否则 vue/compiler-sfc 打包报错
central_price: (resolveCentralPrice(row) ?? Number(row.price || 0)) || null,
+ central_market_price: market,
+ market_price: market,
values: row,
gridApi,
autoCreate,
diff --git a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts
index c12bf6a8..064a8e5f 100644
--- a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts
+++ b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts
@@ -582,6 +582,47 @@ export async function getUserPatientClaimQrcodeApi(userPatientId: number) {
});
}
+/** 医生创建过的全部就诊人(分页) */
+export async function getDoctorCreatedUserPatientListApi(params: {
+ keyword?: string;
+ page?: number;
+ page_size?: number;
+}) {
+ return requestClient.get<{
+ items: Array<{
+ id: number;
+ user_id: number;
+ name: string;
+ mobile?: string;
+ sex?: number;
+ age?: number;
+ created_at?: string;
+ is_claimed: number;
+ latest_register_id: number;
+ latest_register_status: number;
+ latest_register_is_pay: number;
+ }>;
+ total: number;
+ page: number;
+ page_size: number;
+ }>(`${prefix}doctor-created-user-patient-list`, { params });
+}
+
+/** 选择医生创建的就诊人开始线下接诊 */
+export async function startOfflineReceptionByPatientApi(data: {
+ user_patient_id: number;
+ waive_register_fee?: number;
+}) {
+ return requestClient.post<{
+ user_patient_id: number;
+ register_id: number;
+ is_pay: number;
+ status: number;
+ action: 'claim_qrcode' | 'proxy_pay' | 'reception';
+ price: string;
+ }>(`${prefix}start-offline-reception-by-patient`, data);
+}
+
/** 医生代支付小程序码(患者端扫码付) */
export async function getProxyPayQrcodeApi(orderId: number) {
return requestClient.post(`${prefix}proxy-pay-qrcode`, {
diff --git a/apps/web-antd/src/views/doctor/doctor-reception/components/DoctorCreatedPatientModal.vue b/apps/web-antd/src/views/doctor/doctor-reception/components/DoctorCreatedPatientModal.vue
new file mode 100644
index 00000000..b3e16661
--- /dev/null
+++ b/apps/web-antd/src/views/doctor/doctor-reception/components/DoctorCreatedPatientModal.vue
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ record.is_claimed ? '已认领' : '未认领' }}
+
+
+
+ {{ registerStatusText(record.latest_register_status) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/doctor/doctor-reception/index.vue b/apps/web-antd/src/views/doctor/doctor-reception/index.vue
index 9a93abbf..7d4deab1 100644
--- a/apps/web-antd/src/views/doctor/doctor-reception/index.vue
+++ b/apps/web-antd/src/views/doctor/doctor-reception/index.vue
@@ -26,6 +26,7 @@ import {
UserOutlined,
} from '@ant-design/icons-vue';
import {
+ Badge,
Button,
Card,
Col,
@@ -42,6 +43,7 @@ import {
SelectOption,
Modal as AntModal,
Tag,
+ Tooltip,
Tabs,
TabPane,
Textarea,
@@ -74,6 +76,7 @@ import {
getPrescriptionTypeOptionsApi,
getPatientItem,
getPatientList,
+ getDoctorCreatedUserPatientListApi,
getPrescriptionInfoApi,
getProcessRuleList,
getProductListDoctorReception,
@@ -95,8 +98,11 @@ import RefusalOfTreatmentModal
from "#/views/doctor/doctor-reception/components/RefusalOfTreatmentModal.vue";
import CreateUserPatientModal from './components/CreateUserPatientModal.vue';
import ClaimQrcodeModal from './components/ClaimQrcodeModal.vue';
+import DoctorCreatedPatientModal from './components/DoctorCreatedPatientModal.vue';
+import type { DoctorCreatedPatientStartResult } from './components/DoctorCreatedPatientModal.vue';
import ProxyPayQrcodeModal from './components/ProxyPayQrcodeModal.vue';
import ApplyPublicAccountPayModal from '#/views/finance/public-account-pay/components/apply-modal.vue';
+import { applyPublicAccountPay } from '#/views/finance/public-account-pay/api';
// 常用方选择弹窗组件
import CommonPrescriptionModal from './components/CommonPrescriptionModal.vue';
import GoldenFormulaModal from './components/GoldenFormulaModal.vue';
@@ -229,6 +235,20 @@ function restoreRxMrTab(registerId: number) {
const category = ref(1);
const listType = ref(1);
const receptionStatus = ref(0);
+/** 医生创建就诊人记录总数(用于侧栏「创建记录」角标,未支付挂号不在左侧列表) */
+const doctorCreatedRecordTotal = ref(0);
+/**
+ * 拉取医生创建记录总数:侧栏角标提示,避免医生以为创建失败
+ */
+async function loadDoctorCreatedRecordTotal() {
+ try {
+ const res = await getDoctorCreatedUserPatientListApi({ page: 1, page_size: 1 });
+ doctorCreatedRecordTotal.value = Number(res?.total || 0);
+ } catch {
+ doctorCreatedRecordTotal.value = 0;
+ }
+}
+
const updateTabType = ref(false);
// 患者数据
const patients = ref([]);
@@ -336,7 +356,9 @@ const allowInsuranceCategory = ref(0);
/** 是否开启订单百分比调价 */
const priceAdjustEnabled = ref(false);
const publicAccountPayEnabled = ref(false);
-const publicAccountDailyMode = ref(false);
+const publicAccountPayTrigger = ref<'immediate' | 'doctor_confirm'>('immediate');
+const publicAccountBillMode = ref<'order' | 'daily'>('order');
+const publicAccountPaySubmitting = ref(false);
/** 开方购物车整单价格比例,100=原价 */
const priceDiscount = ref(100);
const { config: priceAdjustConfig, loadByStoreId, applyRatioToDrugs: applyRatioDrugs } = useOrderPriceAdjust();
@@ -411,7 +433,12 @@ async function fetchStoreSeeRate() {
allowInsuranceCategory.value = Number(res?.allow_insurance_category ?? 0);
priceAdjustEnabled.value = Number(res?.enable_order_price_percent_adjust ?? 0) === 1;
publicAccountPayEnabled.value = Number(res?.public_account_pay_enabled ?? 0) === 1;
- publicAccountDailyMode.value = String(res?.public_account_bill_mode || '') === 'daily';
+ publicAccountPayTrigger.value =
+ String(res?.public_account_pay_trigger || '') === 'doctor_confirm'
+ ? 'doctor_confirm'
+ : 'immediate';
+ publicAccountBillMode.value =
+ String(res?.public_account_bill_mode || '') === 'daily' ? 'daily' : 'order';
// 有挂号时 vip 已按履约诊所返回,供病历/AI/金方门控
receptionVip.value = res?.vip ?? null;
await loadByStoreId(myStoreId.value);
@@ -503,6 +530,7 @@ async function handleFloatTransferImport(payload: {
onMounted(() => {
registerDoctorTransferImportHandler(handleFloatTransferImport);
+ loadDoctorCreatedRecordTotal();
});
onBeforeUnmount(() => {
@@ -804,6 +832,14 @@ const setVisible = (value, instruction = ''): void => {
*/
const sentPrescriptionInfo = ref(null);
+/** 开方成功页默认可结束接诊;工作台仅在接诊中展示 */
+const canEndReception = computed(() => {
+ if (tabType.value === 3 && sentPrescriptionInfo.value) {
+ return true;
+ }
+ return receptionStatus.value === 2;
+});
+
/**
* 选择患者:已接诊直接进开方工作台;未接诊进轻量接诊操作区(不再进旧患者信息大页)
*/
@@ -1387,6 +1423,11 @@ const [ClaimQrcodeModals, ClaimQrcodeModalApi] = useVbenModal({
connectedComponent: ClaimQrcodeModal,
});
+/** 医生创建就诊人记录弹窗 */
+const [DoctorCreatedPatientModals, DoctorCreatedPatientModalApi] = useVbenModal({
+ connectedComponent: DoctorCreatedPatientModal,
+});
+
/** 医生代支付码弹窗 */
const [ProxyPayQrcodeModals, ProxyPayQrcodeModalApi] = useVbenModal({
connectedComponent: ProxyPayQrcodeModal,
@@ -1454,6 +1495,7 @@ function openCreateUserPatientModal() {
} else {
message.warning('已创建,请在列表中手动选择');
}
+ loadDoctorCreatedRecordTotal();
})
.catch((e: any) => {
message.error(e?.message || '刷新患者列表失败');
@@ -1466,11 +1508,51 @@ function openCreateUserPatientModal() {
});
ClaimQrcodeModalApi.open();
refreshPatientList();
+ loadDoctorCreatedRecordTotal();
},
});
CreateUserPatientModalApi.open();
}
+/**
+ * 处理「创建记录」选择接诊后的分流:可接诊进列表;未支付弹认领码
+ */
+async function handleDoctorCreatedPatientStart(res: DoctorCreatedPatientStartResult) {
+ const registerId = Number(res?.register_id || 0);
+ const userPatientId = Number(res?.user_patient_id || 0);
+ if (res?.action === 'claim_qrcode' && userPatientId > 0) {
+ ClaimQrcodeModalApi.setData({ user_patient_id: userPatientId });
+ ClaimQrcodeModalApi.open();
+ refreshPatientList();
+ return;
+ }
+ if (registerId < 1) {
+ message.warning('未获取到挂号信息');
+ return;
+ }
+ listType.value = 1;
+ try {
+ const list = await getPatientList({ type: listType.value });
+ patients.value = Array.isArray(list) ? list : [];
+ const hit = patients.value.find((p) => Number(p.id) === registerId);
+ if (hit) {
+ selectPatient(hit);
+ } else {
+ message.warning('已创建挂号,请在列表中手动选择');
+ }
+ } catch (e: any) {
+ message.error(e?.message || '刷新患者列表失败');
+ }
+}
+
+/** 打开医生创建记录弹窗 */
+function openDoctorCreatedPatientModal() {
+ DoctorCreatedPatientModalApi.setData({
+ onStart: handleDoctorCreatedPatientStart,
+ });
+ DoctorCreatedPatientModalApi.open();
+}
+
/**
* 当前就诊人是否未认领(user_id=0)
* 认领码入口仅在未认领时出现在右侧工具栏
@@ -1498,7 +1580,7 @@ function openProxyPayQrcode(orderId: number) {
ProxyPayQrcodeModalApi.open();
}
-/** 开方成功页申请公账支付(付款凭证选填) */
+/** 开方成功页申请公账支付(一单一结:弹窗可选凭证) */
function openApplyPublicAccountPay() {
const info = sentPrescriptionInfo.value || {};
const oid = Number(info.order_id || 0);
@@ -1510,10 +1592,46 @@ function openApplyPublicAccountPay() {
order_id: oid,
order_no: info.order_no,
total_pay_price: info.total_pay_price,
+ bill_mode: 'order',
});
ApplyPublicAccountPayModalApi.open();
}
+/** 按天先用后付:一键确认公账已支付,无需上传凭证 */
+function confirmDailyPublicAccountPay() {
+ const info = sentPrescriptionInfo.value || {};
+ const oid = Number(info.order_id || 0);
+ if (!oid) {
+ message.error('订单ID无效');
+ return;
+ }
+ AntModal.confirm({
+ title: '确认公账已支付',
+ content: `订单 ${info.order_no || oid} 将标记为已支付,并计入当日日汇总。`,
+ okText: '确认已支付',
+ cancelText: '取消',
+ async onOk() {
+ publicAccountPaySubmitting.value = true;
+ try {
+ const res = await applyPublicAccountPay({
+ order_id: oid,
+ apply_remark: '医生确认公账已支付',
+ });
+ message.success(
+ res?.bill_mode === 'daily'
+ ? '订单已标记为已支付,将计入当日日汇总'
+ : '已提交公账支付申请',
+ );
+ if (sentPrescriptionInfo.value && res?.bill_mode === 'daily') {
+ sentPrescriptionInfo.value = { ...sentPrescriptionInfo.value, is_pay: 1 };
+ }
+ } finally {
+ publicAccountPaySubmitting.value = false;
+ }
+ },
+ });
+}
+
/**
* 打开金方导入弹窗(VIP:golden_formula);仅中药处方可用
*/
@@ -2164,18 +2282,33 @@ function refuseReception() {
}
/**
- * 结束诊断
+ * 结束接诊(线下接诊结束诊断,挂号 status → 已结束)
*/
function endOfDiagnosis() {
- endOfDiagnosisApi(localStorage.getItem(`doctorReception-id`)).then(
- (value) => {
- message.success('接诊成功');
+ const registerId = localStorage.getItem(`doctorReception-id`);
+ if (!registerId) {
+ message.warning('未找到当前挂号,无法结束接诊');
+ return;
+ }
+ const patientName =
+ activePatient.value?.name ||
+ sentPrescriptionInfo.value?.patient_name ||
+ '患者';
+ AntModal.confirm({
+ title: '确认结束接诊',
+ content: `确定要结束${patientName}的接诊吗?`,
+ okText: '确定',
+ cancelText: '取消',
+ onOk: async () => {
+ await endOfDiagnosisApi(registerId);
+ message.success('结束接诊成功');
updateTabType.value = false;
+ sentPrescriptionInfo.value = null;
+ receptionStatus.value = 3;
getPatientListByReception();
- receptionStatus.value = 2;
tabType.value = 0;
},
- );
+ });
}
// 基础配置
@@ -3259,7 +3392,11 @@ const leftShow = computed(() => leftPinned.value || leftHover.value);
function getDoctorReceptionLeftPinned() {
const v = localStorage.getItem('doctorReceptionLeftPinned');
- leftPinned.value = v === 'true';
+ // 无本地偏好时默认固定展开,避免「当前/历史」就诊人列表默认被侧栏收起藏住
+ leftPinned.value = v === null ? true : v === 'true';
+ if (leftPinned.value) {
+ leftHover.value = true;
+ }
}
getDoctorReceptionLeftPinned();
@@ -3313,6 +3450,7 @@ function onStoreSelectOpenChange(open: boolean) {
+
@@ -3382,6 +3520,23 @@ function onStoreSelectOpenChange(open: boolean) {
就诊人
+
+
+
+
+
+