1111
This commit is contained in:
Vendored
+44
@@ -18,22 +18,66 @@ declare module 'vue' {
|
|||||||
CropUpload: typeof import('./src/components/CropUpload/index.vue')['default']
|
CropUpload: typeof import('./src/components/CropUpload/index.vue')['default']
|
||||||
DatePicker: typeof import('./src/components/Form/DatePicker/index.vue')['default']
|
DatePicker: typeof import('./src/components/Form/DatePicker/index.vue')['default']
|
||||||
ECharts: typeof import('./src/components/ECharts/index.vue')['default']
|
ECharts: typeof import('./src/components/ECharts/index.vue')['default']
|
||||||
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
|
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||||
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||||
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
|
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||||
|
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||||
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
|
ElFooter: typeof import('element-plus/es')['ElFooter']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
|
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
|
ElLink: typeof import('element-plus/es')['ElLink']
|
||||||
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
|
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
|
ElStep: typeof import('element-plus/es')['ElStep']
|
||||||
|
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||||
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
|
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||||
ESign: typeof import('./src/components/ESign/index.vue')['default']
|
ESign: typeof import('./src/components/ESign/index.vue')['default']
|
||||||
FormContainer: typeof import('./src/components/Form/FormContainer/index.vue')['default']
|
FormContainer: typeof import('./src/components/Form/FormContainer/index.vue')['default']
|
||||||
Grid: typeof import('./src/components/Grid/index.vue')['default']
|
Grid: typeof import('./src/components/Grid/index.vue')['default']
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ const globalStore = useGlobalStore();
|
|||||||
|
|
||||||
// init theme
|
// init theme
|
||||||
const { initTheme } = useTheme();
|
const { initTheme } = useTheme();
|
||||||
console.log(11)
|
|
||||||
initTheme();
|
initTheme();
|
||||||
// element assemblySize
|
// element assemblySize
|
||||||
const assemblySize = computed(() => globalStore.assemblySize);
|
const assemblySize = computed(() => globalStore.assemblySize);
|
||||||
|
|||||||
@@ -144,6 +144,11 @@ const prescriptionApi = {
|
|||||||
/** 获取关系类型 */
|
/** 获取关系类型 */
|
||||||
getRelationTypes() {
|
getRelationTypes() {
|
||||||
return http.get<RelationTypeDto[]>("relation-types");
|
return http.get<RelationTypeDto[]>("relation-types");
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 获取处方总价 */
|
||||||
|
getTotalCost() {
|
||||||
|
return http.get<number>("gettotalcost");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<el-pagination
|
<el-pagination :background="true" :current-page="pageable.pageNum" :page-size="pageable.pageSize"
|
||||||
:background="true"
|
:pager-count="pagerCount" :page-sizes="[10, 25, 50, 100]" :total="pageable.total"
|
||||||
:current-page="pageable.pageNum"
|
:size="globalStore?.assemblySize ?? 'default'" layout="total, sizes, prev, pager, next, jumper"
|
||||||
:page-size="pageable.pageSize"
|
@size-change="handleSizeChange" @current-change="handleCurrentChange"></el-pagination>
|
||||||
:pager-count="pagerCount"
|
|
||||||
:page-sizes="[10, 25, 50, 100]"
|
|
||||||
:total="pageable.total"
|
|
||||||
:size="globalStore?.assemblySize ?? 'default'"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
></el-pagination>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="Pagination">
|
<script setup lang="ts" name="Pagination">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- unitPrice 列:只展示单价,不编辑 -->
|
<!-- unitPrice 列:只展示单价,不编辑 -->
|
||||||
<template #unitPrice="{ row }">
|
<template #unitPrice="{ row }">
|
||||||
{{ (row.unitPrice ?? 0).toFixed(2) }}
|
{{ (row.unitPrice ?? 0).toFixed(5) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- totalPrice 列:查看时显示合计,编辑时可以修改 -->
|
<!-- totalPrice 列:查看时显示合计,编辑时可以修改 -->
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<!-- 原有:表格头部按钮(不变) -->
|
<!-- 原有:表格头部按钮(不变) -->
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<s-button suffix="处方" type="success" @click="handleAddPrescription" />
|
<s-button suffix="处方" type="success" @click="handleAddPrescription" />
|
||||||
|
<el-button type="primary" @click="handleViewTotalCost">查看处方总价</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 原有:就诊人类型自定义插槽(不变) -->
|
<!-- 原有:就诊人类型自定义插槽(不变) -->
|
||||||
@@ -33,12 +34,25 @@
|
|||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
|
|
||||||
<!-- 原有:处方详情/编辑弹窗(不变) -->
|
<!--处方详情/编辑弹窗 -->
|
||||||
<PrescriptionDetailDialog v-model:visible="showDetailDialog" :prescription-id="currentPrescriptionId"
|
<PrescriptionDetailDialog v-model:visible="showDetailDialog" :prescription-id="currentPrescriptionId"
|
||||||
:is-edit="isEdit" @refresh-list="handleRefresh" />
|
:is-edit="isEdit" @refresh-list="handleRefresh" />
|
||||||
|
|
||||||
<!-- 关键改动:引入独立的报告弹窗组件 -->
|
<!-- 报告弹窗组件 -->
|
||||||
<PrescriptionReportDialog v-model="showReportDialog" :prescription-id="currentReportId" />
|
<PrescriptionReportDialog v-model="showReportDialog" :prescription-id="currentReportId" />
|
||||||
|
|
||||||
|
<!-- 处方总价弹窗 -->
|
||||||
|
<el-dialog v-model="showTotalCostDialog" title="查看处方总价" width="400px" :close-on-click-modal="false">
|
||||||
|
<div style="padding: 20px; text-align: center;">
|
||||||
|
<div style="font-size: 16px; color: #606266; margin-bottom: 10px;">预估总药材成本</div>
|
||||||
|
<div style="color: #f56c6c; font-size: 32px; font-weight: bold;">
|
||||||
|
¥{{ totalCostData || 0 }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="showTotalCostDialog = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -63,6 +77,10 @@ const isEdit = ref(false);
|
|||||||
const showReportDialog = ref(false); // 报告弹窗显隐
|
const showReportDialog = ref(false); // 报告弹窗显隐
|
||||||
const currentReportId = ref<number | undefined>(undefined); // 当前报告对应的处方ID
|
const currentReportId = ref<number | undefined>(undefined); // 当前报告对应的处方ID
|
||||||
|
|
||||||
|
// 新增:处方总价弹窗相关状态
|
||||||
|
const showTotalCostDialog = ref(false); // 总价弹窗显隐
|
||||||
|
const totalCostData = ref<number>(0); // 总价数据
|
||||||
|
|
||||||
// 原有:就诊人类型选项、表格列配置(不变)
|
// 原有:就诊人类型选项、表格列配置(不变)
|
||||||
const personTypeOptions = [
|
const personTypeOptions = [
|
||||||
{ label: "公司员工", value: 1 },
|
{ label: "公司员工", value: 1 },
|
||||||
@@ -79,7 +97,8 @@ const columns: ColumnProps<any>[] = [
|
|||||||
search: { el: "select" }
|
search: { el: "select" }
|
||||||
},
|
},
|
||||||
{ prop: "visitDate", label: "就诊时间" },
|
{ prop: "visitDate", label: "就诊时间" },
|
||||||
{ prop: "totalMedicineCost", label: "预估处方药材成本(元)" },
|
{ prop: "createTime", label: "添加时间" },
|
||||||
|
{ prop: "totalMedicineCost", label: "预估药材成本" },
|
||||||
{ prop: "operation", label: "操作", width: 280, fixed: "right" }
|
{ prop: "operation", label: "操作", width: 280, fixed: "right" }
|
||||||
];
|
];
|
||||||
const rowKey = "id";
|
const rowKey = "id";
|
||||||
@@ -87,7 +106,7 @@ const getPrescriptionListApi = (params: any) => {
|
|||||||
return prescriptionApi.getList(params);
|
return prescriptionApi.getList(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 原有:新增、查看详情、编辑、刷新逻辑(不变)
|
//新增、查看详情、编辑、刷新
|
||||||
const handleAddPrescription = () => {
|
const handleAddPrescription = () => {
|
||||||
currentPrescriptionId.value = undefined;
|
currentPrescriptionId.value = undefined;
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
@@ -107,16 +126,21 @@ const handleRefresh = () => {
|
|||||||
proTable.value?.refresh?.();
|
proTable.value?.refresh?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 关键改动:新增“打开报告弹窗”方法
|
// 打开报告弹窗
|
||||||
const handleOpenReport = (id: number) => {
|
const handleOpenReport = (id: number) => {
|
||||||
currentReportId.value = id; // 传递当前处方ID给报告组件
|
currentReportId.value = id; // 传递当前处方ID给报告组件
|
||||||
showReportDialog.value = true; // 显示报告弹窗
|
showReportDialog.value = true; // 显示报告弹窗
|
||||||
};
|
};
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
// 新增:查看处方总价
|
||||||
/* 原有样式(不变):确保操作列按钮不换行 */
|
const handleViewTotalCost = async () => {
|
||||||
.table-box {
|
showTotalCostDialog.value = true;
|
||||||
padding: 16px;
|
try {
|
||||||
|
const { data } = await prescriptionApi.getTotalCost();
|
||||||
|
totalCostData.value = data || 0;
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取处方总价失败:", error);
|
||||||
|
totalCostData.value = 0;
|
||||||
}
|
}
|
||||||
</style>
|
};
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user