diff --git a/apps/web-antd/src/store/prescription.ts b/apps/web-antd/src/store/prescription.ts index 0e1d4ec2..efd2daca 100644 --- a/apps/web-antd/src/store/prescription.ts +++ b/apps/web-antd/src/store/prescription.ts @@ -373,14 +373,8 @@ export const usePrescriptionStore = defineStore('prescription', () => { selectedStoreId.value = res.delegate_store_id; sendMode.value = 1; // 使用自定义模式,但使用承接方诊所ID } else if (res && res.store_id) { - // 非转诊挂号,默认选择挂号诊所 selectedStoreId.value = res.store_id; - // 如果挂号诊所与医生当前诊所不同,设置为自定义模式 - if (res.can_change) { - sendMode.value = 1; - } else { - sendMode.value = 0; - } + sendMode.value = 1; } console.log('获取挂号诊所信息成功:', res); } catch (error) { diff --git a/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue b/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue index 632008c3..eb806ec6 100644 --- a/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue +++ b/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue @@ -50,7 +50,6 @@ import WesternModal from '#/views/doctor/doctor-reception/components/WesternModa import SimpleProductModal from '#/views/doctor/doctor-reception/components/SimpleProductModal.vue'; // 常用方选择弹窗组件 import CommonPrescriptionModal from '#/views/doctor/doctor-reception/components/CommonPrescriptionModal.vue'; -import StoreConfirmModal from './StoreConfirmModal.vue'; // 信息提示模态框 import InfoModal from '#/components/modal/InfoModal.vue'; // 药品搜索选择组件 @@ -168,11 +167,6 @@ const [InfoModalComponent, infoModalApi] = useVbenModal({ connectedComponent: InfoModal, }); -// 诊所确认弹窗 -const [StoreConfirmModalComponent, storeConfirmModalApi] = useVbenModal({ - connectedComponent: StoreConfirmModal, -}); - // ==================== 常用方选择弹窗 ==================== const [CommonPrescriptionModals, CommonPrescriptionModalApi] = useVbenModal({ connectedComponent: CommonPrescriptionModal, @@ -212,27 +206,13 @@ const handleSendPrescription = async (doctorSecondSignValue = 0) => { // 获取挂号诊所信息 await prescriptionStore.fetchRegisterStoreInfo(); - const canChange = prescriptionStore.canChangeStore; const storeInfo = prescriptionStore.registerStoreInfo; - // 如果是转诊挂号,自动使用承接方诊所ID,不需要弹出诊所选择弹窗 if (storeInfo?.is_from_transfer === 1 && storeInfo?.delegate_store_id) { - // 转接方开处方时,自动使用承接方诊所ID await executeSendPrescription(doctorSecondSignValue, 1, storeInfo.delegate_store_id); - } else if (canChange) { - // 弹出诊所确认弹窗 - 直接从 registerStoreInfo 获取诊所信息 - storeConfirmModalApi.setData({ - registerStoreName: storeInfo?.store_name || '挂号诊所', - registerStoreId: storeInfo?.store_id, - currentStoreName: storeInfo?.current_store_name || '当前诊所', // 直接从后端数据获取 - canChange: true, - onConfirm: async (mode: number, customStoreId: number | null) => { - await executeSendPrescription(doctorSecondSignValue, mode, customStoreId); - }, - }); - storeConfirmModalApi.open(); + } else if (storeInfo?.store_id) { + await executeSendPrescription(doctorSecondSignValue, 1, storeInfo.store_id); } else { - // 直接发送 await executeSendPrescription(doctorSecondSignValue, 0, null); } }; @@ -1626,7 +1606,6 @@ const cancelSaveCommonPrescription = () => { - diff --git a/apps/web-antd/src/views/business/chat/components/StoreConfirmModal.vue b/apps/web-antd/src/views/business/chat/components/StoreConfirmModal.vue deleted file mode 100644 index a2fc7668..00000000 --- a/apps/web-antd/src/views/business/chat/components/StoreConfirmModal.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - diff --git a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescriptionDetail.vue b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescriptionDetail.vue index 0fd622ae..0166b5c5 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescriptionDetail.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescriptionDetail.vue @@ -131,6 +131,17 @@ const getImageSource = (imageString) => { 科室: {{ item.content?.doctor.depart?.name }} 诊断: {{ item.content?.clinical_diagnose }} + diff --git a/apps/web-antd/src/views/log/hy-transit-log/api/index.ts b/apps/web-antd/src/views/log/hy-transit-log/api/index.ts new file mode 100644 index 00000000..fbb84a01 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/api/index.ts @@ -0,0 +1,15 @@ +import { requestClient } from '#/api/request'; + +const prefix = 'log/'; + +export async function getHyTransitBatchList(params: Record) { + return requestClient.get(`${prefix}hy-transit-batch-list`, { params }); +} + +export async function getHyTransitRecordList(params: Record) { + return requestClient.get(`${prefix}hy-transit-record-list`, { params }); +} + +export async function getHyTransitRecordDetail(params: { id: number }) { + return requestClient.get(`${prefix}hy-transit-record-detail`, { params }); +} diff --git a/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/search.ts b/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/search.ts new file mode 100644 index 00000000..f51ae0ef --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/search.ts @@ -0,0 +1,61 @@ +import type { VbenFormProps } from '#/adapter/form'; + +export const formOptions: VbenFormProps = { + collapsed: false, + schema: [ + { + component: 'VbenSelect', + fieldName: 'callback_status', + label: '回调状态', + componentProps: { + allowClear: true, + placeholder: '全部', + options: [ + { label: '等待回调', value: 'waiting' }, + { label: '成功', value: 'success' }, + { label: '失败', value: 'failed' }, + ], + }, + }, + { + component: 'VbenInput', + fieldName: 'anchor_date', + label: '锚定日', + componentProps: { placeholder: 'YYYY-MM-DD' }, + }, + { + component: 'VbenInput', + fieldName: 'buss_id', + label: '业务ID', + }, + { + component: 'VbenInput', + fieldName: 'batch_id', + label: '批次ID', + }, + { + component: 'VbenInput', + fieldName: 'register_id', + label: '挂号ID', + }, + { + component: 'VbenInput', + fieldName: 'prescription_id', + label: '处方ID', + }, + { + component: 'VbenInput', + fieldName: 'order_id', + label: '订单ID', + }, + { + component: 'VbenInput', + fieldName: 'prescription_no', + label: '处方编号', + }, + ], + showCollapseButton: true, + submitButtonOptions: { content: '查询' }, + submitOnChange: false, + submitOnEnter: true, +}; diff --git a/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/table.ts b/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/table.ts new file mode 100644 index 00000000..0bc066d4 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/callback-result/config/table.ts @@ -0,0 +1,47 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { getHyTransitRecordList } from '../../api'; + +export const gridOptions: VxeGridProps = { + columns: [ + { field: 'id', title: 'ID', width: 80 }, + { field: 'batch_id', title: '批次', width: 80 }, + { field: 'step_txt', title: '类型', width: 100 }, + { field: 'register_id', title: '挂号ID', width: 90 }, + { field: 'prescription_id', title: '处方ID', width: 90 }, + { field: 'order_id', title: '订单ID', width: 90 }, + { field: 'prescription_no', title: '处方编号', width: 140 }, + { field: 'patient_name', title: '患者', width: 90 }, + { field: 'push_status_txt', title: '上报', width: 90 }, + { field: 'callback_status_txt', title: '回调', width: 90, slots: { default: 'callback_status' } }, + { + field: 'error_summary', + title: '校验/报错', + minWidth: 200, + showOverflow: true, + slots: { default: 'error_summary' }, + }, + { field: 'callback_at', title: '回调时间', width: 160, slots: { default: 'callback_at' } }, + { type: 'html', title: '操作', width: 100, slots: { default: 'action' } }, + ], + keepSource: true, + pagerConfig: {}, + proxyConfig: { + ajax: { + query: async ({ page }, formValues) => { + return await getHyTransitRecordList({ + page: page.currentPage, + pageSize: page.pageSize, + ...formValues, + }); + }, + }, + }, + height: 'auto', + border: false, + toolbarConfig: { + search: true, + refresh: true, + zoom: true, + }, +}; diff --git a/apps/web-antd/src/views/log/hy-transit-log/callback-result/index.vue b/apps/web-antd/src/views/log/hy-transit-log/callback-result/index.vue new file mode 100644 index 00000000..ff275627 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/callback-result/index.vue @@ -0,0 +1,197 @@ + + + + + + diff --git a/apps/web-antd/src/views/log/hy-transit-log/components/fail-detail-modal.vue b/apps/web-antd/src/views/log/hy-transit-log/components/fail-detail-modal.vue new file mode 100644 index 00000000..b96c47e5 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/components/fail-detail-modal.vue @@ -0,0 +1,104 @@ + + + diff --git a/apps/web-antd/src/views/log/hy-transit-log/components/record-list-modal.vue b/apps/web-antd/src/views/log/hy-transit-log/components/record-list-modal.vue new file mode 100644 index 00000000..a5b8e06f --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/components/record-list-modal.vue @@ -0,0 +1,180 @@ + + + + + + diff --git a/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/search.ts b/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/search.ts new file mode 100644 index 00000000..ea0f68c1 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/search.ts @@ -0,0 +1,37 @@ +import type { VbenFormProps } from '#/adapter/form'; + +export const formOptions: VbenFormProps = { + collapsed: false, + schema: [ + { + component: 'VbenInput', + fieldName: 'anchor_date', + label: '锚定日', + componentProps: { placeholder: 'YYYY-MM-DD' }, + }, + { + component: 'VbenSelect', + fieldName: 'step', + label: '接口类型', + componentProps: { + allowClear: true, + options: [ + { label: '咨询', value: 'consult' }, + { label: '复诊', value: 'referral' }, + { label: '处方', value: 'recipe' }, + { label: '核销', value: 'verification' }, + { label: '全部', value: 'all' }, + ], + }, + }, + { + component: 'VbenInput', + fieldName: 'batch_id', + label: '批次ID', + }, + ], + showCollapseButton: true, + submitButtonOptions: { content: '查询' }, + submitOnChange: false, + submitOnEnter: true, +}; diff --git a/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/table.ts b/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/table.ts new file mode 100644 index 00000000..f5b25b76 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/pull-record/config/table.ts @@ -0,0 +1,44 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { getHyTransitBatchList } from '../../api'; + +export const gridOptions: VxeGridProps = { + columns: [ + { field: 'id', title: '批次ID', width: 90 }, + { field: 'anchor_date', title: '锚定日', width: 120 }, + { field: 'step_txt', title: '类型', width: 110 }, + { field: 'pull_status_txt', title: '拉取状态', width: 100 }, + { field: 'total_count', title: '总数', width: 80 }, + { field: 'success_count', title: '成功', width: 80 }, + { + field: 'failed_count', + title: '失败', + width: 80, + slots: { default: 'failed_count' }, + }, + { field: 'skipped_count', title: '跳过', width: 80 }, + { field: 'callback_status_txt', title: '回调状态', width: 100 }, + { field: 'started_at', title: '开始时间', width: 160, slots: { default: 'started_at' } }, + { type: 'html', title: '操作', width: 120, slots: { default: 'action' } }, + ], + keepSource: true, + pagerConfig: {}, + proxyConfig: { + ajax: { + query: async ({ page }, formValues) => { + return await getHyTransitBatchList({ + page: page.currentPage, + pageSize: page.pageSize, + ...formValues, + }); + }, + }, + }, + height: 'auto', + border: false, + toolbarConfig: { + search: true, + refresh: true, + zoom: true, + }, +}; diff --git a/apps/web-antd/src/views/log/hy-transit-log/pull-record/index.vue b/apps/web-antd/src/views/log/hy-transit-log/pull-record/index.vue new file mode 100644 index 00000000..1d80b637 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/pull-record/index.vue @@ -0,0 +1,165 @@ + + + + + + diff --git a/apps/web-antd/src/views/log/hy-transit-log/utils.ts b/apps/web-antd/src/views/log/hy-transit-log/utils.ts new file mode 100644 index 00000000..8d02d998 --- /dev/null +++ b/apps/web-antd/src/views/log/hy-transit-log/utils.ts @@ -0,0 +1,9 @@ +/** 计数类字段:大于 0 时标红(适配亮/暗主题) */ +export function countErrorClass(count?: number) { + return Number(count) > 0 ? 'text-destructive font-semibold' : ''; +} + +/** 有错误文案时标红 */ +export function hasErrorTextClass(text?: string) { + return text?.trim() ? 'text-destructive' : ''; +}