2025-12-06 发版,具体发版内容见发版记录
This commit is contained in:
@@ -79,6 +79,9 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="属性代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入属性代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体温单类型编码" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="请输入体温单属性编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位顺序" prop="displayOrder">
|
||||
<el-input-number v-model="form.displayOrder" controls-position="right" :min="0" />
|
||||
@@ -197,6 +200,7 @@ function reset() {
|
||||
displayOrder: 0, // 显示顺序
|
||||
dictName: '', //字典名称
|
||||
dictType: '', //字典类型
|
||||
typeCode:'',//体温单类型编码
|
||||
};
|
||||
proxy.resetForm('statisticsRef');
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column
|
||||
label="取药科室"
|
||||
label="开立科室"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
@@ -64,6 +64,29 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
key="itemCode"
|
||||
prop="itemCode"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.itemCode"
|
||||
placeholder="项目类型"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option label="药品" value="1" />
|
||||
<el-option label="耗材" value="2" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
@@ -81,12 +104,22 @@
|
||||
style="width: 200px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in distribution_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<template v-if="scope.row.itemCode == '1'">
|
||||
<el-option
|
||||
v-for="dict in med_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="scope.row.itemCode == '2'">
|
||||
<el-option
|
||||
v-for="dict in device_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
@@ -184,7 +217,11 @@ import {
|
||||
deletePharmacyDepartment,
|
||||
} from './components/pharmacyDepartment';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { distribution_category_code } = proxy.useDict('distribution_category_code');
|
||||
const { distribution_category_code, med_category_code, device_category_code } = proxy.useDict(
|
||||
'distribution_category_code',
|
||||
'med_category_code',
|
||||
'device_category_code'
|
||||
);
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
@@ -293,10 +330,6 @@ function handleSelectionChange(selection) {
|
||||
}
|
||||
|
||||
function openAddPharmacyDepartment() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning('请先保存当前行后再新增!');
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
id: '',
|
||||
organizationId: '',
|
||||
|
||||
@@ -36,7 +36,8 @@ export function updateWarehouse(data) {
|
||||
// 删除
|
||||
export function deleteWarehouse(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location?locationId=' + data.locationId,
|
||||
// url: '/base-data-manage/location/location?locationId=' + data.locationId,
|
||||
url: '/base-data-manage/location/location?busNo=' + data.busNo,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -295,7 +295,8 @@ function submitForm() {
|
||||
// 删除
|
||||
function handelDelete(data) {
|
||||
loading.value = true;
|
||||
deleteWarehouse({ locationId: data.id }).then((res) => {
|
||||
console.log(data, 'data');
|
||||
deleteWarehouse({ busNo: data.busNo }).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
getPageList();
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
@click="
|
||||
() => {
|
||||
form.ybNo = item.ybNo;
|
||||
form.busNo = item.busNo;
|
||||
form.price = item.retailPrice;
|
||||
}
|
||||
"
|
||||
@@ -679,6 +680,7 @@ const transformFormData = (form) => {
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
busNo,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
@@ -696,6 +698,7 @@ const transformFormData = (form) => {
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
busNo,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
@@ -734,6 +737,7 @@ const transformFormEditData = (form) => {
|
||||
ybNo,
|
||||
title,
|
||||
comment,
|
||||
busNo,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
@@ -751,6 +755,7 @@ const transformFormEditData = (form) => {
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
busNo,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材名称"
|
||||
@@ -119,7 +119,15 @@
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装规格"
|
||||
align="center"
|
||||
key="size"
|
||||
prop="size"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="拼音"
|
||||
@@ -152,14 +160,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装规格"
|
||||
align="center"
|
||||
key="size"
|
||||
prop="size"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
@@ -182,7 +182,7 @@
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="所属科室"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -201,12 +201,9 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select
|
||||
v-model="form.itemTypeCode"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
>
|
||||
<el-select v-model="form.itemTypeCode" clearable filterable>
|
||||
<!-- :disabled="form.isEditInfoDisable === 1" -->
|
||||
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -248,8 +245,13 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="诊疗子项">
|
||||
<div v-if="form.isEditInfoDisable === 0" style="position: relative">
|
||||
<PopoverList @search="handleSearch" :width="1000" :modelValue="item.name">
|
||||
<div style="position: relative">
|
||||
<PopoverList
|
||||
@search="handleSearch"
|
||||
:width="1000"
|
||||
:modelValue="item.name"
|
||||
@focus="popoverListhandleFocus(item.name)"
|
||||
>
|
||||
<template #popover-content="{}">
|
||||
<medicineList
|
||||
@selectRow="(row) => selectRow(row, index)"
|
||||
@@ -275,7 +277,7 @@
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<span v-else>{{ item.name || '' }}</span>
|
||||
<!-- <span v-else>{{ item.name || '' }}</span> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -364,6 +366,7 @@ const { unit_code, med_chrgitm_type, fin_type_code, activity_category_code, chrg
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
const isTemplateActive = ref(true);
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
@@ -420,6 +423,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
isEditInfoDisable: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 表单数组,初始一条记录
|
||||
@@ -484,6 +491,7 @@ function show() {
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
form.value.isEditInfoDisable = props.isEditInfoDisable;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
@@ -638,10 +646,20 @@ function handleSearch(value) {
|
||||
medicineSearchKey.value = value;
|
||||
}
|
||||
|
||||
function popoverListhandleFocus(value) {
|
||||
// debugger;
|
||||
console.log(value);
|
||||
if (value === '') {
|
||||
return;
|
||||
}
|
||||
medicineSearchKey.value = value;
|
||||
}
|
||||
|
||||
function selectRow(row, index) {
|
||||
treatmentItems.value[index].name = row.name;
|
||||
treatmentItems.value[index].adviceDefinitionId = row.id;
|
||||
treatmentItems.value[index].retailPrice = row.retailPrice || 0;
|
||||
medicineSearchKey.value = '';
|
||||
calculateTotalPrice();
|
||||
}
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:exeOrganizations="exeOrganizations"
|
||||
:typeEnumOptions="typeEnumOptions"
|
||||
:isEditInfoDisable="isEditInfoDisable"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
@submit="getList()"
|
||||
|
||||
@@ -114,11 +114,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input
|
||||
v-model="form.totalVolume"
|
||||
placeholder=""
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="form.totalVolume" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -453,7 +449,7 @@
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:disabled="form.isEditInfoDisable === 1"
|
||||
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
@@ -970,7 +966,6 @@ function reset() {
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
|
||||
form.value.activeFlag == true ? (form.value.activeFlag = 1) : (form.value.activeFlag = 0); //是否为活性
|
||||
form.value.ybMatchFlag == true ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0); //医保是否对码
|
||||
form.value.skinTestFlag == true ? (form.value.skinTestFlag = 1) : (form.value.skinTestFlag = 0); //是否皮试
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
:show-overflow-tooltip="true"
|
||||
min-width="110"
|
||||
width="200px"
|
||||
sortable
|
||||
:sort-by="(row) => getPinyinFirstLetter(row)"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
@@ -588,6 +590,13 @@ function submitForm(formData) {
|
||||
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
|
||||
// 药品名称按照第一个汉字首字母排序
|
||||
function getPinyinFirstLetter(row){
|
||||
const firstChar = row.merchandisePyStr.charAt(0);
|
||||
return firstChar.toUpperCase();
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
|
||||
@@ -129,4 +129,25 @@ export function getChargeInfo(param) {
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function wxPay (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-query'+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
@change="(value) => clearAmount(index, value)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
@@ -94,6 +94,17 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
<el-table-column prop="payEnumText" label="支付类型" align="center" />
|
||||
@@ -137,13 +148,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables, getChargeInfo } from './api';
|
||||
import {
|
||||
savePayment,
|
||||
unprecharge,
|
||||
dispenseMedicalConsumables,
|
||||
wxPay,
|
||||
WxPayResult,
|
||||
getChargeInfo,
|
||||
} from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import templateJson from './template.json';
|
||||
import { pa } from 'element-plus/es/locales.mjs';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
@@ -168,34 +188,37 @@ const props = defineProps({
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
consumablesIdList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargedItems: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { charge_discount } = proxy.useDict('charge_discount');
|
||||
// 单位字典
|
||||
const { unit_code } = proxy.useDict('unit_code');
|
||||
|
||||
const userStore = useUserStore();
|
||||
const discountRadio = ref(undefined);
|
||||
const discountRadio = ref();
|
||||
const discountAmount = ref(0);
|
||||
const txtCode = ref('');
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -211,6 +234,7 @@ const dialogLoading = ref(false);
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newValue) => {
|
||||
nextTick(() => {});
|
||||
formData.totalAmount = newValue;
|
||||
formData.selfPay[0].amount = newValue;
|
||||
}
|
||||
@@ -219,121 +243,363 @@ watch(
|
||||
const emit = defineEmits(['close']);
|
||||
let displayAmountTemp = 0;
|
||||
|
||||
// 打印小票
|
||||
function printReceipt(param) {
|
||||
let total = 0;
|
||||
props.chargedItems.forEach((item) => {
|
||||
total += item.totalPrice || 0;
|
||||
});
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 100000)?.amount.toFixed(2) + ' 元' ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
// 获取单位字典数据的方法
|
||||
const getUnitLabel = (unitCode) => {
|
||||
if (!unitCode) return '';
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 110000)?.amount.toFixed(2) + ' 元' ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 120000)?.amount.toFixed(2) + ' 元' ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 130000)?.amount.toFixed(2) + ' 元' ?? 0, // 医疗救助基金支出
|
||||
// YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
// 从已加载的 unit_code 字典中查找对应项
|
||||
const unit = unit_code.value?.find((item) => item.value === unitCode);
|
||||
return unit ? unit.label : ''; // 如果找不到则返回空字符串
|
||||
};
|
||||
|
||||
// 职工基本医疗保险
|
||||
// YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
// YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
async function printReceipt(param) {
|
||||
// 打印收费小票数据
|
||||
console.log('打印收费小票数据:', param.chargeItem);
|
||||
// console.log('!!!!!!!!!选中的收费项目:', param.chargedItems);
|
||||
console.log('患者信息:', props.patientInfo);
|
||||
// formData.totalAmount = props.totalAmount;
|
||||
// 确保第一个支付方式的金额与总金额一致;
|
||||
if (formData.selfPay.length > 0) {
|
||||
formData.selfPay[0].amount = props.totalAmount;
|
||||
}
|
||||
formData.selfPay = [
|
||||
{
|
||||
payEnum: 220100, // 现金支付
|
||||
amount: props.totalAmount,
|
||||
payLevelEnum: 2,
|
||||
},
|
||||
];
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
// YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
// YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
// YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
// YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
try {
|
||||
// 处理param.chargedItems,添加quantityWithUnit字段
|
||||
const processedChargeItems = (param.chargeItem || []).map((item) => {
|
||||
// 获取单位标签
|
||||
const unitLabel = getUnitLabel(item.quantityUnit);
|
||||
// 拼接数量和单位
|
||||
const quantityWithUnit = unitLabel
|
||||
? `${item.quantityValue} ${unitLabel}`
|
||||
: item.quantityValue;
|
||||
|
||||
// 其他支出细分
|
||||
// OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
// OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
// OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
// OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
// OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
// OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
// OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
// OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
// OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
// OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
// HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
return {
|
||||
...item,
|
||||
quantityWithUnit, // 添加带单位的数量字段供打印使用
|
||||
};
|
||||
});
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT:
|
||||
param.detail?.find((t) => t.payEnum === 1)?.amount.toFixed(2) + ' 元' ?? 0, // 全自费金额
|
||||
// OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
// PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail?.find((t) => t.payEnum === 5)?.amount.toFixed(2) + ' 元' ?? 0, // 符合政策范围金额
|
||||
// ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
// POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
// BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
// 构造打印数据,整合选中行信息
|
||||
const printData = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 210000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人医保账户支付
|
||||
// SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
// SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
// SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
// SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
// 收费项目列表
|
||||
chargeItemsList: processedChargeItems,
|
||||
// chargeItemsList: param.chargeItem,
|
||||
|
||||
// 现金支付细分
|
||||
// SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
// SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
// SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
// SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// 基础支付类型
|
||||
|
||||
// 基金类型(扩展)
|
||||
// BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
// RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
// URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
// URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
// MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
// GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
// ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
// CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
// FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
// HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
// SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
// HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
itemTotalAmount: total.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmountTemp + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
};
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// 金额大于0时显示金额和单位,等于0时不显示单位
|
||||
YB_FUND_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基金支付总额
|
||||
SELF_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人负担总金额
|
||||
OTHER_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 其他(如医院负担金额)
|
||||
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
printer: 'xp',
|
||||
title: '门诊收费结算单',
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 居民基本医疗保险
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 1)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 全自费金额
|
||||
OVERLMT_SELFPAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 3)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 超限价自费费用
|
||||
PRESELFPAY_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 4)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 先行自付金额
|
||||
INSCP_SCP_AMT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 5)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 符合政策范围金额
|
||||
ACT_PAY_DEDC: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 6)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 7)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 基本医疗保险统筹基金支付比例
|
||||
BALC: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 8)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 账户共济支付金额
|
||||
SELF_CASH_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额
|
||||
SELF_VX_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 微信支付金额
|
||||
SELF_ALI_PAY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 生育基金
|
||||
RETIREE_MEDICAL: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 意外伤害基金
|
||||
CARE_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 照护保险基金
|
||||
FINANCIAL_FUND: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 财政基金
|
||||
HOSPITAL_ADVANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: (() => {
|
||||
const amount = param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0;
|
||||
return amount > 0 ? amount + ' 元' : amount;
|
||||
})(), // 保健预支基金
|
||||
//微信刷卡支付
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return vxValue + unionValue + aliValue + ' 元';
|
||||
})(),
|
||||
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo?.genderEnum_enumText || '',
|
||||
age: props.patientInfo?.age || '',
|
||||
|
||||
personType: param.contractName,
|
||||
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
|
||||
//电子收据二维码
|
||||
pictureUrl: param.pictureUrl || 'https://chinaebill.com/img/xiaochengxu.png',
|
||||
|
||||
// 添加本地患者信息,注意安全访问
|
||||
name: props.patientInfo?.patientName || '',
|
||||
gender: props.patientInfo?.genderEnum_enumText || '',
|
||||
encounterBusNo: props.patientInfo?.encounterBusNo || '',
|
||||
currentDate: currentDate.value,
|
||||
// chargedItems: props.chargedItems,
|
||||
// 优先使用选中行的金额字段值(从图片中获取)
|
||||
totalAmount:
|
||||
(param.selectedRow?.receivableAmount
|
||||
? param.selectedRow.receivableAmount.toFixed(2)
|
||||
: props.totalAmount.toFixed(2)) + ' 元',
|
||||
displayAmount:
|
||||
(param.selectedRow?.receivedAmount
|
||||
? param.selectedRow.receivedAmount.toFixed(2)
|
||||
: displayAmount.value) + ' 元',
|
||||
returnedAmount: returnedAmount.value + ' 元',
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// 使用printUtils进行打印
|
||||
// 选择门诊收费打印模板并传递正确的数据格式
|
||||
console.log('789797987897', printData.data[0]);
|
||||
await printUtils.print(PRINT_TEMPLATE.OUTPATIENT_CHARGE, printData.data[0]);
|
||||
|
||||
console.log('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
proxy.$modal.msgError('打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
|
||||
function handleWxPay() {
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
formData.totalAmount = props.totalAmount;
|
||||
@@ -342,8 +608,6 @@ function handleOpen() {
|
||||
|
||||
async function submit() {
|
||||
displayAmountTemp = displayAmount.value;
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
|
||||
let amount = formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
@@ -366,12 +630,13 @@ async function submit() {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
getChargeInfo({ paymentId: props.paymentId }).then((res) => {
|
||||
printReceipt(res.data);
|
||||
// 传递完整的选中数据信息到打印方法
|
||||
printReceipt({ ...res.data, chargedItems: props.chargedItems });
|
||||
});
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success', res.msg);
|
||||
emit('refresh'); // 发送刷新事件给父组件
|
||||
// 长春大学自动发耗材
|
||||
// 长春市朝阳区中医院自动发耗材
|
||||
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
|
||||
dispenseMedicalConsumables(props.consumablesIdList);
|
||||
}
|
||||
@@ -422,11 +687,11 @@ async function print() {
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '优惠', value: 220500 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
{ label: '优惠', value: 220500, isWebPay: false },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -459,8 +724,25 @@ function handleDiscountChange(value) {
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
@@ -478,8 +760,18 @@ const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index, value) => {
|
||||
const selectedOption = selfPayMethods.find((item) => item.value === value);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
|
||||
@@ -430,4 +430,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,63 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between" class="app-container" v-loading="readCardLoading"
|
||||
:element-loading-text="loadingText">
|
||||
<div
|
||||
style="display: flex; justify-content: space-between"
|
||||
class="app-container"
|
||||
v-loading="readCardLoading"
|
||||
:element-loading-text="loadingText"
|
||||
>
|
||||
<el-card style="width: 30%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">患者列表</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="请输入患者名/病历号" clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px" @keyup.enter="getPatientList">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名/病历号"
|
||||
clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
@keyup.enter="getPatientList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态" @change="getPatientList">
|
||||
<el-option v-for="item in chargeStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getPatientList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in chargeStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<div style="width: 100%">
|
||||
<el-date-picker v-model="receptionTime" type="daterange" range-separator="~" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom" value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px" @change="getPatientList" />
|
||||
<el-date-picker
|
||||
v-model="receptionTime"
|
||||
type="daterange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
@change="getPatientList"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table ref="patientListRef" height="620" :data="patientList" row-key="encounterId" @cell-click="clickRow"
|
||||
highlight-current-row>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
height="620"
|
||||
:data="patientList"
|
||||
row-key="encounterId"
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
@@ -70,31 +102,64 @@
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
电子凭证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px" :disabled="true">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleReadCard('02')"
|
||||
style="width: 65px"
|
||||
:disabled="true"
|
||||
>
|
||||
身份证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||
医保卡
|
||||
</el-button>
|
||||
<el-button type="primary" @click="payToSelt()" style="margin-left: 20px" :disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="payToSelt()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
医保转自费
|
||||
</el-button>
|
||||
<el-button type="primary" @click="patToMedicalInsurance()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="patToMedicalInsurance()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
自费转医保
|
||||
</el-button>
|
||||
<el-button type="primary" @click="studentPayTosStudentSelf()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentPayTosStudentSelf()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生医保转学生自费
|
||||
</el-button>
|
||||
<el-button type="primary" @click="studentSelfToStudentPay()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentSelfToStudentPay()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生自费转学生医保
|
||||
</el-button>
|
||||
<span style="float: right">合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span>
|
||||
<span style="float: right"
|
||||
>合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span
|
||||
>
|
||||
</div>
|
||||
<el-table ref="chargeListRef" height="530" :data="chargeList" row-key="id"
|
||||
@selection-change="handleSelectionChange" v-loading="chargeLoading" :span-method="objectSpanMethod" border>
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="530"
|
||||
:data="chargeList"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
|
||||
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
|
||||
@@ -104,7 +169,16 @@
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.statusEnum === 1 ? 'default' : 'success'" disable-transitions>
|
||||
<el-tag v-if="scope.row.statusEnum === 1" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 5" type="success" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 8" type="danger" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -115,9 +189,20 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<el-table-column label="操作" align="center" fixed="right" header-align="center" class-name="no-hover-column">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button :disabled="!scope.row.paymentId" link type="primary" @click="printCharge(scope.row)">
|
||||
<el-button
|
||||
:disabled="!scope.row.paymentId"
|
||||
link
|
||||
type="primary"
|
||||
@click="printCharge(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -125,10 +210,22 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<ChargeDialog ref="chargeDialogRef" :open="openDialog" @close="handleClose" :category="patientInfo.categoryEnum"
|
||||
:totalAmount="totalAmount" :patientInfo="patientInfo" :chargeItemIds="chargeItemIdList"
|
||||
:consumablesIdList="consumablesIdList" :chrgBchnoList="chrgBchnoList" :userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId" :details="details" :chargedItems="chargedItems" @refresh="getPatientList" />
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
:totalAmount="totalAmount"
|
||||
:patientInfo="patientInfo"
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:consumablesIdList="consumablesIdList"
|
||||
:chrgBchnoList="chrgBchnoList"
|
||||
:userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId"
|
||||
:details="details"
|
||||
:chargedItems="chargedItems"
|
||||
@refresh="getPatientList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -212,7 +309,6 @@ function handleTotalAmount() {
|
||||
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, new Decimal(0));
|
||||
|
||||
} else {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
@@ -282,7 +378,6 @@ const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
console.log('selectRows:', selectRows);
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
@@ -299,6 +394,9 @@ function confirmCharge() {
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// 将选中的行数据赋值给chargedItems
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
// }, 0);
|
||||
@@ -567,6 +665,19 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// function printCharge(row) {
|
||||
// // 打印功能实现
|
||||
// let rows = [];
|
||||
// chargeList.value.forEach((item, index) => {
|
||||
// if (item.paymentId === row.paymentId) {
|
||||
// rows.push(item);
|
||||
// }
|
||||
// });
|
||||
// chargedItems.value = rows;
|
||||
// getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
// proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
// });
|
||||
// }
|
||||
function printCharge(row) {
|
||||
// 打印功能实现
|
||||
let rows = [];
|
||||
@@ -577,7 +688,37 @@ function printCharge(row) {
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
// 设置实收金额
|
||||
if (res.data && res.data.detail) {
|
||||
const amountDetail = res.data.detail.find((item) => item.payEnum == 220000);
|
||||
if (amountDetail) {
|
||||
totalAmount.value = amountDetail.amount;
|
||||
|
||||
// 为合并的行设置金额相关字段值
|
||||
rows.forEach((item) => {
|
||||
if (item.actualPrice === undefined || item.actualPrice === null) {
|
||||
item.actualPrice = 0;
|
||||
}
|
||||
if (item.discountAmount === undefined || item.discountAmount === null) {
|
||||
item.discountAmount = 0;
|
||||
}
|
||||
if (item.discountRate === undefined || item.discountRate === null) {
|
||||
item.discountRate = 100;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 增强打印数据,包含选中行的完整信息
|
||||
const enhancedPrintData = {
|
||||
...res.data,
|
||||
selectedRow: row, // 添加选中行的完整数据
|
||||
chargedItems: rows, // 添加所有相关的收费项目
|
||||
};
|
||||
// 通知子组件更新内部状态
|
||||
// 通过 nextTick 确保 DOM 更新后再调用打印
|
||||
nextTick(() => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(enhancedPrintData);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -589,4 +730,4 @@ function printCharge(row) {
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -189,8 +189,15 @@ const emit = defineEmits(['close']);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
console.log(
|
||||
displayAmount.value,
|
||||
parseFloat(displayAmount.value),
|
||||
formData.totalAmount,
|
||||
formData,
|
||||
'feeRefund'
|
||||
);
|
||||
//比较时,将金额都转换为两位小数的字符串再转换为浮点数,避免浮点数精度问题
|
||||
if (parseFloat(displayAmount.value) < parseFloat(formData.totalAmount.toFixed(2))) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
@@ -247,7 +254,7 @@ function submit() {
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 长春大学自动退耗材
|
||||
// 长春市朝阳区中医院自动退耗材
|
||||
|
||||
emit('close', 'success');
|
||||
}
|
||||
@@ -432,4 +439,4 @@ function close() {
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -139,16 +139,6 @@
|
||||
prop="chargeStatus_enumText"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="发药/执行状态"
|
||||
align="center"
|
||||
prop="dispenseStatus_enumText"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.dispenseStatus_enumText || scope.row.serviceStatus_enumText }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantityValue + ' ' + scope.row.quantityUnit_dictText }}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<el-dialog title="确认收费" v-model="props.open" width="700px" append-to-body destroy-on-close>
|
||||
<el-dialog
|
||||
title="确认收费"
|
||||
v-model="props.open"
|
||||
@close="close"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
收费日期:{{ currentDate }}
|
||||
@@ -27,7 +34,7 @@
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
@@ -66,6 +73,17 @@
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
@@ -90,12 +108,13 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { savePayment } from './outpatientregistration';
|
||||
import { savePayment, wxPay, WxPayResult } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
@@ -130,10 +149,19 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
orgId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
orgName: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogLoading = ref(false);
|
||||
const txtCode = ref('');
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -157,114 +185,229 @@ watch(
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
// 根据printUtils实现的打印方法
|
||||
async function printReceipt(param) {
|
||||
console.log(param, 'param');
|
||||
console.log(props.patientInfo, 'props.patientInfo');
|
||||
console.log('打印收费小票数据:', param);
|
||||
console.log('患者信息:', props.patientInfo);
|
||||
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
try {
|
||||
// 构造打印数据
|
||||
const printData = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
// 医保结算返回值 - 修复运算符优先级问题,添加括号确保正确拼接'元'
|
||||
FULAMT_OWNPAY_AMT: (param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0) + '元', // 全自费金额
|
||||
OVERLMT_SELFPAY: (param.detail?.find((t) => t.payEnum === 3)?.amount ?? 0) + '元', // 超限价自费费用
|
||||
PRESELFPAY_AMT: (param.detail?.find((t) => t.payEnum === 4)?.amount ?? 0) + '元', // 先行自付金额
|
||||
INSCP_SCP_AMT: (param.detail?.find((t) => t.payEnum === 5)?.amount ?? 0) + '元', // 符合政策范围金额
|
||||
ACT_PAY_DEDC: (param.detail?.find((t) => t.payEnum === 6)?.amount ?? 0) + '元', // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: (param.detail?.find((t) => t.payEnum === 7)?.amount ?? 0) + '元', // 基本医疗保险统筹基金支付比例
|
||||
BALC: (param.detail?.find((t) => t.payEnum === 8)?.amount ?? 0) + '元', // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0) + '元'
|
||||
: '', // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0) + '元'
|
||||
: '', // 账户共济支付金额
|
||||
SELF_CASH_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额
|
||||
SELF_VX_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0) + '元'
|
||||
: '', // 微信支付金额
|
||||
SELF_ALI_PAY:
|
||||
(param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0) + '元'
|
||||
: '', // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE:
|
||||
(param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0) + '元'
|
||||
: '', // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND:
|
||||
(param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0) + '元'
|
||||
: '', // 生育基金
|
||||
RETIREE_MEDICAL:
|
||||
(param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0) + '元'
|
||||
: '', // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL:
|
||||
(param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS:
|
||||
(param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0) + '元'
|
||||
: '', // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY:
|
||||
(param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0) + '元'
|
||||
: '', // 政府兜底基金
|
||||
ACCIDENT_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0) + '元'
|
||||
: '', // 意外伤害基金
|
||||
CARE_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0) + '元'
|
||||
: '', // 照护保险基金
|
||||
FINANCIAL_FUND:
|
||||
(param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0) + '元'
|
||||
: '', // 财政基金
|
||||
HOSPITAL_ADVANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0) + '元'
|
||||
: '', // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE:
|
||||
(param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0) + '元'
|
||||
: '', // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT:
|
||||
(param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0) > 0
|
||||
? (param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0) + '元'
|
||||
: '', // 保健预支基金
|
||||
//微信刷卡支付
|
||||
SELF_CASH_VX_VALUE: (() => {
|
||||
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
|
||||
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
|
||||
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
|
||||
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
|
||||
return vxValue + unionValue + aliValue + '元';
|
||||
})(),
|
||||
|
||||
// 患者信息
|
||||
patientName: param.patientName || '',
|
||||
sex: param.sex === 1 ? '女' : param.sex === 0 ? '男' : param.sex || '',
|
||||
age: param.age ? param.age + '岁' : '',
|
||||
personType: param.contractName, //病人类型
|
||||
|
||||
// 挂号和就诊信息
|
||||
encounterId: props.patientInfo?.encounterId || '',
|
||||
busNo: props.patientInfo?.busNo || '',
|
||||
Mr_QR_Code: param.regNo || props.registerBusNo,
|
||||
// 科室和医生信息
|
||||
organizationName: props.orgName || props.patientInfo?.organizationName || '',
|
||||
practitionerName: props.patientInfo?.practitionerName || '',
|
||||
healthcareName: props.patientInfo?.healthcareName || '',
|
||||
// 费用信息
|
||||
fixmedinsName: param.fixmedinsName
|
||||
? param.fixmedinsName + '门诊收费明细'
|
||||
: '门诊收费明细',
|
||||
// 收费员
|
||||
cashier: param.paymentEmployee,
|
||||
|
||||
// 收费时间
|
||||
chargeTime: new Date().toLocaleString(),
|
||||
},
|
||||
],
|
||||
};
|
||||
// 选择门诊挂号打印模板
|
||||
console.log('printDataprintDataprintDataprintDataprintData', printData.data[0]);
|
||||
await printUtils.print(PRINT_TEMPLATE.OUTPATIENT_REGISTRATION, printData.data[0]);
|
||||
console.log('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
proxy.$modal.msgError('打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
function handleWxPay() {
|
||||
console.log('开始微信支付,当前支付详情:', formData.selfPay);
|
||||
console.log(
|
||||
'支付金额详情:',
|
||||
formData.selfPay.map((item) => ({ payEnum: item.payEnum, amount: item.amount }))
|
||||
);
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
//chargeItemIds: props.chargeItemIds,
|
||||
//encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
// ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
// busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
})
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
console.log('微信支付请求成功:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
console.error('微信支付请求失败:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
@@ -288,8 +431,8 @@ function submit() {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
printReceipt(res.data);
|
||||
(formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]),
|
||||
emit('close', 'success');
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success');
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -300,10 +443,10 @@ function submit() {
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -326,10 +469,27 @@ const getMax = (index) => {
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
debugger;
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
@@ -344,9 +504,21 @@ const addPayment = () => {
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const selectedOption = selfPayMethods.find(
|
||||
(item) => item.value === formData.selfPay[index].payEnum
|
||||
);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
@@ -364,6 +536,8 @@ const returnedAmount = computed(() => {
|
||||
});
|
||||
|
||||
function close() {
|
||||
//清空表单数据
|
||||
txtCode.value = '';
|
||||
emit('close', 'cancel');
|
||||
}
|
||||
</script>
|
||||
@@ -463,4 +637,4 @@ function close() {
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
import request from '@/utils/request';
|
||||
import { parseStrEmpty } from '@/utils/openhis';
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者信息
|
||||
@@ -14,16 +14,16 @@ export function getOutpatientRegistrationList(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/patient-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询费用性质
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询诊断信息
|
||||
@@ -31,8 +31,8 @@ export function getConditionDefinitionMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// // 查询就诊位置
|
||||
@@ -49,8 +49,8 @@ export function getLocationTree(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/org-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据位置id筛选医生
|
||||
@@ -58,8 +58,8 @@ export function getPractitionerMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/practitioner-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据机构id筛选服务项目
|
||||
@@ -67,8 +67,8 @@ export function getHealthcareMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/healthcare-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 门诊挂号查询
|
||||
@@ -76,8 +76,8 @@ export function getOutpatientRegistrationCurrent(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/current-day-encounter',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增门诊挂号信息
|
||||
@@ -85,8 +85,8 @@ export function addOutpatientRegistration(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pre-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 新增病人信息
|
||||
@@ -94,83 +94,79 @@ export function addPatient(data) {
|
||||
return request({
|
||||
url: '/patient-manage/information/patient-information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function listmaritalstatus() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-maritalstatus',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listoccupationtype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-occupationtype',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function lisadministrativegender() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-administrativegender',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listbloodtypeabo() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypeabo',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function listbloodtypearh() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypearh',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export function listfamilyrelationshiptype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 患者退号
|
||||
export function returnRegister(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
// 患者退号
|
||||
export function returnRegister(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return?encounterId=' + encounterId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
*/
|
||||
@@ -178,8 +174,8 @@ export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,8 +185,20 @@ export function refund(data) {
|
||||
return request({
|
||||
url: '/payment/payment/uncharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 退费预检(挂号预取消)
|
||||
* GET /payment/payment/pre-cancel-reg?encounterId=xxx
|
||||
*/
|
||||
export function preCancelReg(encounterId) {
|
||||
return request({
|
||||
url: '/payment/payment/pre-cancel-reg',
|
||||
method: 'get',
|
||||
params: { encounterId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,8 +208,8 @@ export function cancelRegister(data) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,6 +219,28 @@ export function gerPreInfo(userMaessage) {
|
||||
return request({
|
||||
url: '/yb-request/per-info',
|
||||
method: 'post',
|
||||
params: userMaessage
|
||||
})
|
||||
}
|
||||
params: userMaessage,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function wxPay(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-query',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,57 +7,40 @@
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
退费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ '自费' }}</el-text>
|
||||
<el-text size="large">费用性质:{{ props.category || '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应退金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.toFixed(2) + ' 元' }}
|
||||
{{ (calculatedTotalAmount || 0) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
<div class="amount-row" v-if="calculatedReturnAmount > 0">
|
||||
<el-text size="large">退费金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ (calculatedReturnAmount || 0) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<!-- 退费方式列表(从接口数据中筛选) -->
|
||||
<div class="payment-container">
|
||||
<div v-for="(item, index) in formData.selfPay" :key="index" class="payment-item">
|
||||
<div v-for="(item, index) in refundMethodsFromApi" :key="index" class="payment-item">
|
||||
<span>退费方式:</span>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择退费方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input :value="getPayMethodLabel(item.payEnum)" readonly style="width: 160px" />
|
||||
<span>退费金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:model-value="(Number(item.amount) || 0) - (Number(item.returnAmount) || 0)"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
disabled
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
</div>
|
||||
<div class="payment-container" style="position: relative">
|
||||
<span style="position: absolute; top: 5px">退费原因:</span>
|
||||
@@ -67,29 +50,26 @@
|
||||
v-model="reason"
|
||||
placeholder="退费原因"
|
||||
class="reason-textarea"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
<!-- 添加退费方式功能暂时注释 -->
|
||||
<!-- <div class="add-payment">
|
||||
<el-button type="primary" plain @click="addPayment" :disabled="canAddPayment">
|
||||
添加退费方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应退,不可继续添加
|
||||
<el-text v-if="canAddPayment" type="danger" class="tip">
|
||||
退费金额已等于应退金额,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实退合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
<el-text type="success">{{
|
||||
displayAmount > 0 ? displayAmount + ' 元' : props.totalAmount + ' 元'
|
||||
}}</el-text>
|
||||
</div>
|
||||
<!-- <div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
@@ -97,6 +77,28 @@
|
||||
</div> -->
|
||||
</el-space>
|
||||
</div>
|
||||
|
||||
<!-- 退费明细表格 -->
|
||||
<div v-if="preCancelData && preCancelData.length > 0" class="pre-cancel-table-wrapper">
|
||||
<el-table :data="preCancelData" border stripe max-height="300" style="width: 100%">
|
||||
<el-table-column prop="payEnum_dictText" label="支付方式" min-width="200" />
|
||||
<el-table-column prop="amount" label="金额" width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.amount ? Number(row.amount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="returnAmount" label="退费金额" width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.returnAmount ? Number(row.returnAmount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="chargeAmount" label="收费金额" min-width="120" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.chargeAmount ? Number(row.chargeAmount) : '0.00' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -108,7 +110,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { cancelRegister } from './outpatientregistration';
|
||||
import { cancelRegister, preCancelReg } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
|
||||
@@ -139,6 +141,8 @@ const props = defineProps({
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const reason = ref('');
|
||||
const preCancelData = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -160,13 +164,51 @@ watch(
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
watch(
|
||||
() => props.open,
|
||||
async (val) => {
|
||||
if (val && props.patientInfo && props.patientInfo.encounterId) {
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await preCancelReg(props.patientInfo.encounterId);
|
||||
if (res && res.code === 200 && res.data) {
|
||||
preCancelData.value = res.data;
|
||||
// 计算应退金额并更新表单数据
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = res.data
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((total, item) => total + (Number(item.amount) || 0), 0);
|
||||
if (sum > 0) {
|
||||
formData.totalAmount = sum;
|
||||
// 如果第一个退费方式的金额为0或等于原来的totalAmount,则自动填充
|
||||
if (
|
||||
formData.selfPay[0].amount === 0 ||
|
||||
formData.selfPay[0].amount === props.totalAmount
|
||||
) {
|
||||
formData.selfPay[0].amount = sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('pre-cancel-reg error', err);
|
||||
preCancelData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
} else {
|
||||
preCancelData.value = [];
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
// if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
// proxy.$modal.msgError('请输入正确的金额');
|
||||
// return;
|
||||
// }
|
||||
cancelRegister({
|
||||
paymentEnum: 0,
|
||||
kindEnum: 1,
|
||||
@@ -195,23 +237,16 @@ const selfPayMethods = [
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
(sum, item, i) => (i !== index ? sum + (Number(item.amount) || 0) : sum),
|
||||
0
|
||||
);
|
||||
const maxAmount = calculatedTotalAmount.value - otherSum;
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
return maxAmount + 100;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
return maxAmount;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
@@ -224,10 +259,11 @@ const handleAmountChange = () => {
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
if (canAddPayment.value) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
// 添加新的退费方式,初始金额为0,由用户输入
|
||||
formData.selfPay.push({ payEnum: '', amount: 0 });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
@@ -238,9 +274,16 @@ const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
// 计算属性 - 实退合计(使用接口返回的退费方式数据)
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
|
||||
return sum.toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
@@ -252,6 +295,72 @@ const returnedAmount = computed(() => {
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
const calculatedTotalAmount = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return props.totalAmount || 0;
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
// 应退金额 = (amount - returnAmount) 的总和,即剩余应退金额
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce(
|
||||
(total, item) => total + ((Number(item.amount) || 0) - (Number(item.returnAmount) || 0)),
|
||||
0
|
||||
);
|
||||
return sum > 0 ? sum : props.totalAmount || 0;
|
||||
});
|
||||
|
||||
const calculatedReturnAmount = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
const sum = preCancelData.value
|
||||
.filter((item) => targetPayEnums.includes(item.payEnum))
|
||||
.reduce((total, item) => total + (Number(item.returnAmount) || 0), 0);
|
||||
return sum || 0;
|
||||
});
|
||||
|
||||
// 从接口数据中筛选符合条件的退费方式
|
||||
const refundMethodsFromApi = computed(() => {
|
||||
if (!preCancelData.value || preCancelData.value.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
|
||||
return preCancelData.value.filter(
|
||||
(item) =>
|
||||
targetPayEnums.includes(item.payEnum) &&
|
||||
item.payEnum_dictText &&
|
||||
item.payEnum_dictText.trim() !== ''
|
||||
);
|
||||
});
|
||||
|
||||
// 根据 payEnum 获取支付方式标签
|
||||
const getPayMethodLabel = (payEnum) => {
|
||||
const method = selfPayMethods.find((m) => m.value === payEnum);
|
||||
if (method) {
|
||||
return method.label;
|
||||
}
|
||||
// 如果找不到,尝试从接口返回的 dictText 中获取
|
||||
const apiItem = preCancelData.value?.find((item) => item.payEnum === payEnum);
|
||||
return apiItem?.payEnum_dictText || `支付方式${payEnum}`;
|
||||
};
|
||||
|
||||
// 计算所有退费方式的总和
|
||||
const totalRefundAmount = computed(() => {
|
||||
return refundMethodsFromApi.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
|
||||
});
|
||||
|
||||
// 计算剩余可输入金额(应退金额 - 已输入的退费金额总和)
|
||||
const remainingAmount = computed(() => {
|
||||
return calculatedTotalAmount.value - totalRefundAmount.value;
|
||||
});
|
||||
|
||||
// 判断是否可以添加退费方式:退费金额总和等于或大于应退金额时不能添加
|
||||
const canAddPayment = computed(() => {
|
||||
return totalRefundAmount.value >= calculatedTotalAmount.value || formData.selfPay.length >= 10;
|
||||
});
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
@@ -361,4 +470,21 @@ function close() {
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
.pre-cancel-table-wrapper {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
|
||||
:deep(.el-table) {
|
||||
width: 100%;
|
||||
|
||||
.el-table__body-wrapper {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -730,9 +730,9 @@ const data = reactive({
|
||||
serviceTypeId: [{ required: true, message: '挂号类型不能为空', trigger: 'blur' }],
|
||||
organizationId: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
|
||||
// practitionerId: [
|
||||
// { required: true, message: "医生不能为空", trigger: "blur" },
|
||||
// ],
|
||||
practitionerId: [
|
||||
{ required: true, message: "医生不能为空", trigger: "blur" },
|
||||
],
|
||||
typeCode: [{ required: true, message: '账户类型不能为空', trigger: 'blur' }],
|
||||
definitionId: [{ required: true, message: '费用定价不能为空', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: "总价不能为空", trigger: "blur" }],
|
||||
@@ -1146,7 +1146,23 @@ function handleAdd() {
|
||||
transformedData.value = transformFormData(form.value);
|
||||
console.log(transformedData, 'transformedData门诊挂号');
|
||||
chargeItemIdList.value = [];
|
||||
patientInfo.value.patientId = form.value.patientId;
|
||||
// patientInfo.value.patientId = form.value.patientId;
|
||||
patientInfo.value = {
|
||||
patientId: form.value.patientId,
|
||||
patientName: form.value.name,
|
||||
genderEnum_enumText: form.value.genderEnum_enumText,
|
||||
age: form.value.age,
|
||||
contractName: form.value.contractNo
|
||||
? contractList.value.find((item) => item.busNo === form.value.contractNo)?.contractName ||
|
||||
'自费'
|
||||
: '自费',
|
||||
idCard: form.value.idCard,
|
||||
phone: form.value.phone,
|
||||
categoryEnum: form.value.categoryEnum || '门诊',
|
||||
organizationName: form.value.locationId_dictText || '',
|
||||
practitionerName: form.value.doctorName || '',
|
||||
healthcareName: '', // 可根据实际情况补充
|
||||
};
|
||||
proxy.$refs['outpatientRegistrationRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
readCardLoading.value = true;
|
||||
@@ -1157,10 +1173,13 @@ function handleAdd() {
|
||||
addOutpatientRegistration(transformedData.value)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log('78989798', 'res', res);
|
||||
// proxy.$modal.msgSuccess('挂号成功');
|
||||
chrgBchno.value = res.data.chrgBchno;
|
||||
registerBusNo.value = res.data.busNo;
|
||||
totalAmount.value = res.data.psnCashPay;
|
||||
patientInfo.value.encounterId = res.data.encounterId || '';
|
||||
patientInfo.value.busNo = res.data.busNo || '';
|
||||
readCardLoading.value = false;
|
||||
openDialog.value = true;
|
||||
// chargeItemIdList.value = res.data;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request';
|
||||
import { dateEquals } from 'element-plus';
|
||||
|
||||
// 获取网银支付参数列表
|
||||
export function getList (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/page',
|
||||
method: 'get',
|
||||
params:data,
|
||||
});
|
||||
}
|
||||
|
||||
export function getPayinfo (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/pay-query?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnfee (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-bill?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnFeednext (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-goods?paymentId='+data.paymentId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function returnResult (data) {
|
||||
return request ({
|
||||
url: '/three-part/pay/return-query?id='+data.id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
119
openhis-ui-vue3/src/views/charge/threePayRecord/index.vue
Normal file
119
openhis-ui-vue3/src/views/charge/threePayRecord/index.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="app-continer">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true">
|
||||
<el-form-item label="患者姓名" prop="patientName">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="请输入患者姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="recordList" v-loading="loading" border ref="tableRef">
|
||||
<el-table-column label="患者姓名" align="center" prop="patientName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="支付单号" align="center" prop="paymentBusNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易金额(元)" align="right" prop="txnAmt" header-align="center" width="100"
|
||||
:show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="交易类型" align="center" prop="tranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="支付方式" align="center" prop="payType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易时间" align="center" prop="txnTime" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.txnTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原交易类型" align="center" prop="orgTranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="原交易类型" align="center" prop="orgTranType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="第三方优惠说明" align="center" prop="otherMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="错误信息" align="center" prop="errMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="查询结果" align="center" prop="queryResult" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="查询结果说明" align="center" prop="queryResultMsg" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" prop="paymentEnum_enumText" width="340">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link :disabled="!scope.row.paymentId"
|
||||
@click="getPayInfo(scope.row.paymentId)">支付结果查询</el-button>
|
||||
<el-button type="warning" link :disabled="!scope.row.paymentId"
|
||||
@click="returnFee(scope.row.paymentId)">退费</el-button>
|
||||
<el-button type="danger" link auto-insert-space :disabled="!scope.row.paymentId"
|
||||
@click="returnFeeNext(scope.row.paymentId)">隔天退费</el-button>
|
||||
<el-button type="success" link @click="returnFeeResultQuery(scope.row.id)">退费结果查询</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicRecord">
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getList, getPayinfo, returnfee, returnFeednext, returnResult } from './components/api.js';
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
searchKey: '',
|
||||
});
|
||||
const recordList = ref([]);
|
||||
const loading = ref(false);
|
||||
const getPayInfo = (paymentId) => {
|
||||
console
|
||||
getPayinfo({ paymentId }).then((res) => {
|
||||
proxy.$message.success('支付结果查询成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFee = (paymentId) => {
|
||||
returnfee({ paymentId }).then((res) => {
|
||||
proxy.$message.success('退费成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFeeNext = (paymentId) => {
|
||||
returnFeednext({ paymentId }).then((res) => {
|
||||
proxy.$message.success('隔天退费成功');
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const returnFeeResultQuery = (id) => {
|
||||
returnResult({ id }).then((res) => {
|
||||
proxy.$message.success(res.data);
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const handleQuery = () => {
|
||||
//queryParams.value.pageNum = 1;
|
||||
getList(queryParams.value);
|
||||
};
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm('queryRef');
|
||||
handleQuery();
|
||||
};
|
||||
const getLists = async () => {
|
||||
loading.value = true;
|
||||
getList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
recordList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
getLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.app-continer {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
height: 90vh !important;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -357,7 +357,7 @@ async function print() {
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: '长春大学医院',
|
||||
fixmedinsName: '长春市朝阳区中医院医院',
|
||||
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
|
||||
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
|
||||
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
|
||||
@@ -433,4 +433,4 @@ getPharmacyCabinetLists();
|
||||
.el-col {
|
||||
margin-right: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -218,13 +218,13 @@
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['229900reg'] ? reportValue['229900reg'] + ' 人' : '0 人' }}
|
||||
{{ reportValue['229900reg'] ? reportValue['229900reg'] + '人' : '0 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['220100reg'] ? reportValue['220100reg'] + ' 人' : '0 人' }}
|
||||
{{ (reportValue['220100reg'] || 0) + (reportValue['220199reg'] || 0) + ' 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">
|
||||
@@ -273,19 +273,27 @@
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100cash']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100cash'] || 0) + (reportValue['220199cash'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保统筹:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100tcSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100tcSum'] || 0) + (reportValue['220199tcSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保账户:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100zhSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100zhSum'] || 0) + (reportValue['220199zhSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保基金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100fundSum']) }}</span>
|
||||
<span class="value">{{
|
||||
formatValue((reportValue['220100fundSum'] || 0) + (reportValue['220199fundSum'] || 0))
|
||||
}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
@@ -329,6 +337,7 @@
|
||||
{{
|
||||
formatValue(
|
||||
(reportValue['220100cash'] || 0) +
|
||||
(reportValue['220199cash'] || 0) +
|
||||
(reportValue['229900cash'] || 0) +
|
||||
(reportValue['0000cash'] || 0)
|
||||
)
|
||||
@@ -443,16 +452,33 @@ function processObjectWithFinType(obj) {
|
||||
async function print() {
|
||||
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
console.log(reportValue.value, '==reportValue.value==');
|
||||
// 计算市医保相关字段
|
||||
const municipalYbReg =
|
||||
(reportValue.value['220100reg'] || 0) + (reportValue.value['220199reg'] || 0);
|
||||
const municipalYbCash =
|
||||
(reportValue.value['220100cash'] || 0) + (reportValue.value['220199cash'] || 0);
|
||||
const municipalYbTcSum =
|
||||
(reportValue.value['220100tcSum'] || 0) + (reportValue.value['220199tcSum'] || 0);
|
||||
const municipalYbZhSum =
|
||||
(reportValue.value['220100zhSum'] || 0) + (reportValue.value['220199zhSum'] || 0);
|
||||
const municipalYbFundSum =
|
||||
(reportValue.value['220100fundSum'] || 0) + (reportValue.value['220199fundSum'] || 0);
|
||||
const municipalYbTotal = municipalYbZhSum + municipalYbFundSum;
|
||||
const totalCash =
|
||||
municipalYbCash + (reportValue.value['229900cash'] || 0) + (reportValue.value['0000cash'] || 0);
|
||||
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: userStore.hospitalName,
|
||||
fixmedinsName: userStore.hospitalName,
|
||||
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
|
||||
scheduler: userStore.nickName,
|
||||
timeRange: queryTime.value[0] + '~' + queryTime.value[1],
|
||||
|
||||
// 计算字段
|
||||
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
|
||||
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
|
||||
.add(reportValue.value.CHECK_FEE || 0)
|
||||
@@ -465,14 +491,23 @@ async function print() {
|
||||
.add(reportValue.value.REGISTRATION_FEE || 0)
|
||||
.add(reportValue.value.OTHER_FEE || 0)
|
||||
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
|
||||
|
||||
// 省医保相关
|
||||
provinceYbTotal:
|
||||
(reportValue.value['229900zhSum'] || 0) + (reportValue.value['229900fundSum'] || 0),
|
||||
municipalYbTotal:
|
||||
(reportValue.value['220100zhSum'] || 0) + (reportValue.value['220100fundSum'] || 0),
|
||||
totalCash:
|
||||
(reportValue.value['220100cash'] || 0) +
|
||||
(reportValue.value['229900cash'] || 0) +
|
||||
(reportValue.value['0000cash'] || 0),
|
||||
(reportValue.value['229900fundSum'] || 0) + (reportValue.value['229900zhSum'] || 0),
|
||||
|
||||
// 市医保相关(220100和220199)
|
||||
municipalYbReg,
|
||||
municipalYbCash,
|
||||
municipalYbTcSum,
|
||||
municipalYbZhSum,
|
||||
municipalYbFundSum,
|
||||
municipalYbTotal,
|
||||
|
||||
// 现金收入总额
|
||||
totalCash,
|
||||
|
||||
// 体检人次
|
||||
physicalExaminationCount: getPhysicalExaminationCount(),
|
||||
},
|
||||
],
|
||||
@@ -546,4 +581,4 @@ function formatValue(value) {
|
||||
background-color: #000;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -92,3 +92,15 @@ export function printBloodCode (query) {
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取本次就诊处方单
|
||||
*/
|
||||
export function getEnPrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
"paperType": "A5",
|
||||
"height": 210,
|
||||
"width": 148,
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 592.4409448818898,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {
|
||||
"content": "",
|
||||
"opacity": 0.7,
|
||||
@@ -24,20 +27,19 @@
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
"panelLayoutOptions": {},
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 841.8897637795277,
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 169.5,
|
||||
"left": 0,
|
||||
"top": 22.5,
|
||||
"height": 12,
|
||||
"width": 88.5,
|
||||
"title": "长春大学医院",
|
||||
"width": 420,
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 13.5,
|
||||
"qrCodeLevel": 0
|
||||
"qrCodeLevel": 0,
|
||||
"textAlign": "center"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
@@ -46,15 +48,16 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 189,
|
||||
"left": 0,
|
||||
"top": 45,
|
||||
"height": 9.75,
|
||||
"width": 42,
|
||||
"width": 420,
|
||||
"title": "处置单",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 11.25,
|
||||
"qrCodeLevel": 0
|
||||
"qrCodeLevel": 0,
|
||||
"textAlign": "center"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
@@ -331,4 +334,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@close="close"
|
||||
>
|
||||
<el-table :data="recordList" highlight-current-row max-height="650" style="width: 100%" border>
|
||||
<el-table-column prop="occurrenceTime" label="执行时间" align="center" />
|
||||
<el-table-column prop="recordTime" label="执行时间" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="执行状态" align="center" />
|
||||
<el-table-column prop="orgName" label="执行科室" align="center" />
|
||||
<el-table-column prop="practitionerName" label="执行人" align="center" />
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"top": 16.5,
|
||||
"height": 22.5,
|
||||
"width": 120,
|
||||
"title": "长春大学医院",
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontFamily": "Microsoft YaHei",
|
||||
@@ -637,4 +637,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,9 @@
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@pagination="getPatientList"
|
||||
:pager-count="1"
|
||||
:layout="'total, prev, pager, next'"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -96,6 +97,13 @@
|
||||
>
|
||||
打印处置单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="getEnPrescription()"
|
||||
>
|
||||
处方单
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="6">
|
||||
<el-form
|
||||
@@ -301,6 +309,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<PerformRecordDialog :open="openDialog" :recordList="recordList" @close="openDialog = false" />
|
||||
<PrescriptionInfo
|
||||
:open="openPrescriptionDialog"
|
||||
:precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -311,20 +324,24 @@ import {
|
||||
getDisposalList,
|
||||
execute,
|
||||
cancel,
|
||||
getEnPrescriptionInfo,
|
||||
getPerformRecord,
|
||||
listWesternmedicine,
|
||||
printBloodCode,
|
||||
} from './components/api';
|
||||
import PerformRecordDialog from './components/performRecordDialog';
|
||||
import PrescriptionInfo from '../../doctorstation/components/prescription/prescriptionInfo.vue';
|
||||
import templateJson from './components/template.json';
|
||||
import prescriptionTemplate from './components/prescriptionTemplate.json';
|
||||
import bloodTemplate from './components/bloodTemplate.json';
|
||||
import disposalTemplate from './components/disposalTemplate.json';
|
||||
import { advicePrint, getAdjustPriceSwitchState, lotNumberMatch } from '@/api/public';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import { advicePrint } from '@/api/public';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { getGroupMarkers } from '@/utils/his';
|
||||
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
// 患者搜索
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
@@ -334,6 +351,10 @@ const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
|
||||
const openPrescriptionDialog = ref(false);
|
||||
const prescriptionInfo = ref([]);
|
||||
|
||||
const total = ref(0);
|
||||
// 患者数据
|
||||
const patientList = ref([]);
|
||||
@@ -424,6 +445,18 @@ function handleServiceCategoryChange(value) {
|
||||
function handlePatientSelect(row) {
|
||||
loading.value = true;
|
||||
currentPatient.value = row;
|
||||
getAdjustPriceSwitchState().then((res) => {
|
||||
if (res.data) {
|
||||
lotNumberMatch({ encounterIdList: row.encounterId }).then(() => {
|
||||
getAllList(row);
|
||||
});
|
||||
} else {
|
||||
getAllList(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getAllList(row) {
|
||||
getDisposalList(row.encounterId).then((res) => {
|
||||
deviceList.value = res.data.records.filter((item) => {
|
||||
return item.requestTable == 'wor_device_request';
|
||||
@@ -440,6 +473,7 @@ function handlePatientSelect(row) {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 批量操作校验
|
||||
function handleBatchValidate(type) {
|
||||
let params = [];
|
||||
@@ -642,6 +676,23 @@ function printPrescription() {
|
||||
}); //开始打印
|
||||
});
|
||||
}
|
||||
// 查看本次就诊处方单
|
||||
function getEnPrescription() {
|
||||
getEnPrescriptionInfo({ encounterId: currentPatient.value.encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
// 打印处置单
|
||||
function printDisposal() {
|
||||
let requestIds = deviceActivityList.value
|
||||
@@ -749,7 +800,100 @@ function handleCancel(row) {
|
||||
});
|
||||
}
|
||||
// 打印瓶贴
|
||||
function printBottleLabel() {
|
||||
// function printBottleLabel() {
|
||||
// let result = [];
|
||||
// // 过滤出全部输液药品
|
||||
// let selectRows = activityListRef.value.getSelectionRows();
|
||||
// let printLiist = [];
|
||||
// // 有选中的优先打印选中行,没有的话打印全部的输液药品
|
||||
// if (selectRows.length > 0) {
|
||||
// printLiist = selectRows.filter((item) => {
|
||||
// return item.medCategory == '2' || item.medCategory == '1';
|
||||
// });
|
||||
// } else {
|
||||
// printLiist = activityList.value.filter((item) => {
|
||||
// return item.medCategory == '2' || item.medCategory == '1';
|
||||
// });
|
||||
// }
|
||||
// // 按照groupId分组,但将多天的项目展开为独立项目
|
||||
// let expandedList = [];
|
||||
|
||||
// printLiist.forEach((item) => {
|
||||
// // 如果用药天数大于1,则创建多个项目
|
||||
// if (item.dispensePerDuration && item.dispensePerDuration > 1) {
|
||||
// // 为每一天创建一个项目
|
||||
// for (let i = 0; i < item.dispensePerDuration; i++) {
|
||||
// // 克隆项目并调整数量
|
||||
// const clonedItem = {
|
||||
// ...item,
|
||||
// // 数量除以天数
|
||||
// quantity: item.quantity ? item.quantity / item.dispensePerDuration : item.quantity,
|
||||
// // 可以添加一个字段表示是第几天
|
||||
// dayIndex: i + 1,
|
||||
// totalDays: item.dispensePerDuration,
|
||||
// data: item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText,
|
||||
// };
|
||||
|
||||
// // 获取当前时间做执行日期,如果用药天数大于1,依次累加
|
||||
// const date = new Date();
|
||||
// date.setDate(date.getDate() + i);
|
||||
// clonedItem.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
|
||||
|
||||
// // 将克隆的项目添加到展开列表中,不按groupId分组
|
||||
// expandedList.push(clonedItem);
|
||||
// }
|
||||
// } else {
|
||||
// // 天数为1或没有设置天数,直接使用原项目
|
||||
// item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
|
||||
// expandedList.push(item);
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 重新按groupId分组,但每个展开的项目都是独立的
|
||||
// const groupedByGroupId = expandedList.reduce((acc, item) => {
|
||||
// // 为展开的项目生成新的唯一groupId
|
||||
// const groupId = item.dayIndex
|
||||
// ? `${item.groupId || item.requestId}_day${item.dayIndex}`
|
||||
// : item.groupId || item.requestId;
|
||||
|
||||
// if (!acc[groupId]) {
|
||||
// acc[groupId] = [];
|
||||
// }
|
||||
// acc[groupId].push(item);
|
||||
// return acc;
|
||||
// }, {});
|
||||
// const resultList = Object.values(groupedByGroupId);
|
||||
// console.log(resultList, '23456789');
|
||||
|
||||
// result = resultList.map((item) => {
|
||||
// return {
|
||||
// patientName: currentPatient.value.patientName,
|
||||
// prepareName: userStore.nickName,
|
||||
// genderEnum_enumText: currentPatient.value.genderEnum_enumText,
|
||||
// age: currentPatient.value.age,
|
||||
// date: item[0].performDateTime,
|
||||
// infuseData: item,
|
||||
// };
|
||||
// });
|
||||
// const printElements = templateJson;
|
||||
// var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// console.log(result, '打印机列表');
|
||||
// hiprintTemplate.print2(result, {
|
||||
// // printer: 'Xprinter XP-365B',
|
||||
// height: 210,
|
||||
// width: 148,
|
||||
// });
|
||||
// // 直接打印回调
|
||||
// // 发送任务到打印机成功
|
||||
// hiprintTemplate.on('printSuccess', function (e) {
|
||||
// console.log('打印成功');
|
||||
// });
|
||||
// // 发送任务到打印机失败
|
||||
// hiprintTemplate.on('printError', function (e) {
|
||||
// console.log('打印失败');
|
||||
// });
|
||||
// }
|
||||
async function printBottleLabel() {
|
||||
let result = [];
|
||||
// 过滤出全部输液药品
|
||||
let selectRows = activityListRef.value.getSelectionRows();
|
||||
@@ -795,6 +939,9 @@ function printBottleLabel() {
|
||||
// 天数为1或没有设置天数,直接使用原项目
|
||||
item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
|
||||
expandedList.push(item);
|
||||
//将当前时间传到expandedList中
|
||||
const date = new Date();
|
||||
item.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -815,6 +962,7 @@ function printBottleLabel() {
|
||||
console.log(resultList, '23456789');
|
||||
|
||||
result = resultList.map((item) => {
|
||||
console.log(item, '111323item');
|
||||
return {
|
||||
patientName: currentPatient.value.patientName,
|
||||
prepareName: userStore.nickName,
|
||||
@@ -824,23 +972,25 @@ function printBottleLabel() {
|
||||
infuseData: item,
|
||||
};
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
console.log(result, '打印机列表');
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'Xprinter XP-365B',
|
||||
height: 210,
|
||||
width: 148,
|
||||
});
|
||||
console.log(result, '打印数据');
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_INFUSION, result);
|
||||
// console.log('打印成功');
|
||||
// const printElements = templateJson;
|
||||
// var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
// console.log(result, '打印机列表');
|
||||
// hiprintTemplate.print2(result, {
|
||||
// height: 210,
|
||||
// width: 148,
|
||||
// });
|
||||
// 直接打印回调
|
||||
// 发送任务到打印机成功
|
||||
hiprintTemplate.on('printSuccess', function (e) {
|
||||
console.log('打印成功');
|
||||
});
|
||||
// 发送任务到打印机失败
|
||||
hiprintTemplate.on('printError', function (e) {
|
||||
console.log('打印失败');
|
||||
});
|
||||
// hiprintTemplate.on('printSuccess', function (e) {
|
||||
// console.log('打印成功');
|
||||
// });
|
||||
// // 发送任务到打印机失败
|
||||
// hiprintTemplate.on('printError', function (e) {
|
||||
// console.log('打印失败');
|
||||
// });
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
@@ -1039,4 +1189,4 @@ function getRecord(row) {
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="门诊号" align="center" prop="iptOtpNo" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" />
|
||||
<el-table-column label="诊断名" align="center" prop="conditionName" />
|
||||
<el-table-column
|
||||
label="慢性诊断名"
|
||||
align="center"
|
||||
prop="specialConditionName"
|
||||
width="180"
|
||||
/>
|
||||
|
||||
<el-table-column label="请求数量" align="center" prop="quantity" />
|
||||
<el-table-column label="请求单位" align="center" prop="unitCode" />
|
||||
<el-table-column label="审核状态" align="center" prop="statusEnum_enumText" />
|
||||
@@ -38,8 +48,7 @@
|
||||
<el-table-column label="给药间隔" align="center" prop="dispenseInterval" />
|
||||
<el-table-column label="单次发药数" align="center" prop="dispensePerQuantity" />
|
||||
<el-table-column label="每次发药供应天数" align="center" prop="dispensePerDuration" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" />
|
||||
|
||||
<el-table-column label="开方医生名" align="center" prop="practitionerName" />
|
||||
<el-table-column label="挂号科室" align="center" prop="mdtrtDeptName" />
|
||||
<el-table-column label="开单科室" align="center" prop="prscDeptName" />
|
||||
@@ -53,7 +62,6 @@
|
||||
{{ formatDate(scope.row.prscTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断名" align="center" prop="conditionName" />
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>CF0000000001</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
@@ -235,4 +235,4 @@ getList();
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,32 +8,73 @@
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px" @keyup.enter="getEncounterList">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
|
||||
@keyup.enter="getEncounterList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getEncounterList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select v-model="queryParams.refundEnum" style="width: 48%; margin-bottom: 10px" placeholder="收费状态"
|
||||
@change="getEncounterList">
|
||||
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-select
|
||||
v-model="queryParams.refundEnum"
|
||||
style="width: 48%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getEncounterList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px" value-format="YYYY-MM-DD" placement="bottom"
|
||||
@change="getEncounterList" />
|
||||
<el-button type="primary" @click="getEncounterList" style="margin-bottom: 10px; margin-left: 18px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placement="bottom"
|
||||
@change="getEncounterList"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="getEncounterList"
|
||||
style="margin-bottom: 10px; margin-left: 18px"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="encounterList" border style="width: 100%" height="calc(100vh - 300px)" highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList">
|
||||
<el-table-column prop="patientName" align="center" label="姓名" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="genderEnum_enumText" align="center" label="性别" show-overflow-tooltip />
|
||||
<el-table
|
||||
:data="encounterList"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList"
|
||||
>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="genderEnum_enumText"
|
||||
align="center"
|
||||
label="性别"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
|
||||
@@ -52,16 +93,35 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-button type="primary" :disabled="!selectedMedicines.length" @click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!selectedMedicines.length"
|
||||
@click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
确认退药
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
|
||||
<el-table ref="returnDrugRef" :data="returDrugList" style="width: 100%" height="calc(100vh - 300px)" border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table
|
||||
ref="returnDrugRef"
|
||||
:data="returDrugList"
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
border
|
||||
@select="handleSelection"
|
||||
@selection-change="handelSelectRows"
|
||||
:span-method="handelSpanMethod"
|
||||
class="no-hover-table"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" header-align="center">
|
||||
<el-table-column
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="100"
|
||||
align="right"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
|
||||
</template>
|
||||
@@ -74,29 +134,30 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.reqStatus_enumText == null
|
||||
? scope.row.refundEnum_enumText
|
||||
: scope.row.reqStatus_enumText
|
||||
}}
|
||||
{{ scope.row.refundEnum_enumText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity)
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity) + ' ' + scope.row.unitCode_dictText
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-popconfirm width="150" hide-after="10" title="操作确认" placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)">
|
||||
<el-popconfirm
|
||||
width="150"
|
||||
hide-after="10"
|
||||
title="操作确认"
|
||||
placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" link :disabled="scope.row.reqStatus != 11">
|
||||
<el-button type="primary" link :disabled="scope.row.refundEnum != 16">
|
||||
退药
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -113,13 +174,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<TraceNoDialog :ypName="ypName" :openDialog="openTraceNoDialog" @submit="submit"
|
||||
@cancel="openTraceNoDialog = false" />
|
||||
<TraceNoDialog
|
||||
:ypName="ypName"
|
||||
:openDialog="openTraceNoDialog"
|
||||
@submit="submit"
|
||||
@cancel="openTraceNoDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ReturnDrug">
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getCurrentInstance, nextTick } from 'vue';
|
||||
import { getList, getReturnDrugList, returnDrug, init, itemTraceNo } from './components/api';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { debounce } from 'lodash-es';
|
||||
@@ -128,7 +193,7 @@ import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
refundEnum: 5,
|
||||
refundEnum: 16,
|
||||
});
|
||||
const openTraceNo = ref(false);
|
||||
const traceNoList = ref([]);
|
||||
@@ -138,8 +203,10 @@ const encounterId = ref('');
|
||||
const returDrugList = ref([]);
|
||||
const selectedMedicines = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const dateRange = ref([formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),]);
|
||||
const dateRange = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const traceNoTemp = ref('');
|
||||
const traceNoTempRef = ref();
|
||||
const totalAmount = ref(0);
|
||||
@@ -226,14 +293,16 @@ function handleReturnDrug(row) {
|
||||
console.log(row);
|
||||
let saveList = [];
|
||||
if (row) {
|
||||
saveList = [
|
||||
{
|
||||
requestId: row.requestId,
|
||||
dispenseId: row.dispenseId,
|
||||
tableName: row.serviceTable,
|
||||
traceNo: row.traceNo,
|
||||
},
|
||||
];
|
||||
saveList = returDrugList.value
|
||||
.filter((item) => item.requestId == row.requestId)
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
saveList = proxy.$refs.returnDrugRef.getSelectionRows().map((item) => {
|
||||
return {
|
||||
@@ -248,7 +317,7 @@ function handleReturnDrug(row) {
|
||||
returnDrug(saveList).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('退药成功');
|
||||
getEncounterList()
|
||||
getEncounterList();
|
||||
getReturnDrugList({
|
||||
encounterId: encounterId.value,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
@@ -259,12 +328,79 @@ function handleReturnDrug(row) {
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange(selectRows) {
|
||||
selectedMedicines.value = selectRows;
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// 选择框改变时的处理
|
||||
function handleSelection(selection, row) {
|
||||
const isSelected = selection.some((item) => item.dispenseId === row.dispenseId);
|
||||
returDrugList.value
|
||||
.filter((item) => {
|
||||
return item.requestId == row.requestId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
proxy.$refs['returnDrugRef'].toggleRowSelection(row, isSelected);
|
||||
});
|
||||
nextTick(() => {
|
||||
selectedMedicines.value = proxy.$refs['returnDrugRef'].getSelectionRows();
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function handelSelectRows(selection) {
|
||||
selectedMedicines.value = selection;
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 根据 requestId 合并相同行的方法(只合并药品名称和总价列)
|
||||
function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 定义需要合并的列索引
|
||||
// 1: 药品名称列, 2: 总价列
|
||||
const mergeColumns = [1, 2, 5, 7, 8];
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
const currentRequestId = row.requestId;
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
let rowspan = 1;
|
||||
let colspan = 1;
|
||||
|
||||
// 向上查找相同 requestId 的行
|
||||
let startIndex = rowIndex;
|
||||
while (startIndex > 0 && returDrugList.value[startIndex - 1].requestId === currentRequestId) {
|
||||
startIndex--;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
let endIndex = rowIndex;
|
||||
while (
|
||||
endIndex < returDrugList.value.length - 1 &&
|
||||
returDrugList.value[endIndex + 1].requestId === currentRequestId
|
||||
) {
|
||||
endIndex++;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 只有当 rowspan > 1 时才进行合并
|
||||
return rowspan > 1 ? [rowspan, colspan] : [1, 1];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -339,4 +475,8 @@ function handleSelectionChange(selectRows) {
|
||||
::v-deep.el-textarea .el-textarea__inner {
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
:deep(.no-hover-table) .el-table__body tr:hover > td {
|
||||
background: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,34 +1,77 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function listSkinRecord(query) {
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-page',
|
||||
url: '/outpatient-manage/treatment/encounter-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取皮试记录列表
|
||||
*/
|
||||
export function listSkinRecord(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/record-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**后台没有对应接口,暂无
|
||||
* 更新护士签名
|
||||
*/
|
||||
export function updateNurseSign(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/nurse-sign',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新皮试记录
|
||||
*/
|
||||
export function updateSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/save-record-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化选项
|
||||
*/
|
||||
export function lists() {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取护士列表
|
||||
*/
|
||||
export function getNurseList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/nurse-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-skin-test',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function updateNurseSign(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/outpatient-record-sign-check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 新增皮试记录
|
||||
*/
|
||||
export function addSkinTestRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/skin-test/save-record-info',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 病历相关接口
|
||||
/**
|
||||
* 获取患者列表
|
||||
@@ -7,8 +7,8 @@ export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/main/patient-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@ export function getEmrHistoryList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,8 +29,8 @@ export function getEmrTemplateList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ export function receiveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/receive-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ export function leaveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/leave-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ export function completeEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/complete-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,39 +70,39 @@ export function saveEmr(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病历模板
|
||||
*/
|
||||
export function deleteEmrTemplate(id){
|
||||
export function deleteEmrTemplate(id) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病历详情
|
||||
*/
|
||||
export function getEmrDetail(encounterId){
|
||||
export function getEmrDetail(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-detail?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历模板
|
||||
*/
|
||||
export function saveEmrTemplate(data){
|
||||
export function saveEmrTemplate(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
@@ -111,10 +111,10 @@ export function saveEmrTemplate(data){
|
||||
*/
|
||||
export function saveDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosisnew',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,8 +124,8 @@ export function saveDiagnosisBind(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除诊断绑定
|
||||
@@ -134,7 +134,7 @@ export function deleteDiagnosisBind(id) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,8 +144,8 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,7 +155,7 @@ export function getConditionDefinitionInfo(patientId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,40 +165,51 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断回显数据
|
||||
*/
|
||||
export function getEncounterDiagnosis(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisListEle(searchKey,encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis-ele?searchKey=' + searchKey+'&encounterId='+encounterId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取诊断集合数据
|
||||
*/
|
||||
export function getDiagnosisList(searchKey) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-diagnosis-list?searchKey=' + searchKey,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 删除就诊诊断
|
||||
*/
|
||||
export function delEncounterDiagnosis(conditionId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/encounter-diagnosis?conditionId=' + conditionId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 处方相关接口
|
||||
@@ -209,8 +220,8 @@ export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存处方(单条)
|
||||
@@ -219,8 +230,8 @@ export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/save-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 签发处方
|
||||
@@ -229,8 +240,8 @@ export function savePrescriptionSign(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 处方签退
|
||||
@@ -239,8 +250,8 @@ export function singOut(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-off',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
@@ -249,7 +260,7 @@ export function getPrescriptionList(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-base-info?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取科室列表
|
||||
@@ -258,7 +269,7 @@ export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取退费账单
|
||||
@@ -267,7 +278,7 @@ export function getEncounterPatientPayment(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/patient-payment?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 申请退费
|
||||
@@ -276,11 +287,10 @@ export function refundPayment(data) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/refund-payment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 电子处方相关接口
|
||||
/**
|
||||
* 电子处方查询
|
||||
@@ -289,8 +299,8 @@ export function getVeriPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 处方开立相关接口
|
||||
@@ -301,16 +311,16 @@ export function getAllMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 当返回的list为空时在调用get-allMedicationInfo
|
||||
export function getAllMedicationUsualInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationUsualInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 电子处方下拉框
|
||||
@@ -318,8 +328,8 @@ export function getAllMedicationUsualInfo(queryParams) {
|
||||
export function elepPrescriptionInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,8 +339,8 @@ export function getPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-prescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -340,8 +350,8 @@ export function getMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-medicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,8 +360,8 @@ export function getMedicationInfo(queryParams) {
|
||||
export function prescriptionNoInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/prescriptionNoInit',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,8 +371,8 @@ export function savePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/save-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,8 +382,8 @@ export function updatePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/update-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -383,8 +393,8 @@ export function deletePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/delete-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,8 +404,8 @@ export function issuancePrescription(prescriptionNoList) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/issuance-prescription',
|
||||
method: 'post',
|
||||
data: prescriptionNoList
|
||||
})
|
||||
data: prescriptionNoList,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,8 +415,8 @@ export function getAdviceHistoryInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-history-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,8 +426,8 @@ export function updateGroupId(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/update-groupid',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -427,8 +437,8 @@ export function getOrderGroupList(params) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -438,11 +448,10 @@ export function getContract(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/get-encounter-contract',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取得药品最新数据
|
||||
*/
|
||||
@@ -450,8 +459,8 @@ export function queryYbCatalogue(params) {
|
||||
return request({
|
||||
url: '/yb-request/query-yb-catalogue',
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,8 +470,8 @@ export function getChronicDisease(params) {
|
||||
return request({
|
||||
url: '/yb-request/getConditionDefinition',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -472,8 +481,8 @@ export function getTcmMedicine(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-advice-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -483,8 +492,8 @@ export function getTcmCondition(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/condition-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -494,8 +503,8 @@ export function getTcmSyndrome(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/syndrome-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -505,8 +514,8 @@ export function getTcmDiagnosis(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/get-tcm-encounter-diagnosis',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -516,8 +525,20 @@ export function saveTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存中医诊断
|
||||
*/
|
||||
export function updateTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/update-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -527,7 +548,7 @@ export function deleteTcmDiagnosis(syndromeGroupNo) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-diagnosis?syndromeGroupNo=' + syndromeGroupNo,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -537,8 +558,8 @@ export function saveTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -548,8 +569,8 @@ export function signTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -559,8 +580,8 @@ export function signOutTcmAdvice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/sign-tcm-off',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -570,11 +591,10 @@ export function getTcmAdviceList(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/tcm-request-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取预约记录
|
||||
*/
|
||||
@@ -582,8 +602,8 @@ export function getReservationInfo(params) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/reservation-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -593,8 +613,8 @@ export function addReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/save-reservation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -604,8 +624,8 @@ export function editReservationInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/edit-reservation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -615,17 +635,16 @@ export function delReservationInfo(id) {
|
||||
return request({
|
||||
url: '/doctor-station/reservation-record/del-reservation',
|
||||
method: 'delete',
|
||||
params: id
|
||||
})
|
||||
params: id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -635,8 +654,8 @@ export function queryParticipantList(params) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -646,7 +665,7 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -656,8 +675,8 @@ export function wardList(params) {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -667,8 +686,8 @@ export function handleHospitalization(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-doctor',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -678,8 +697,8 @@ export function getEnPrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -689,8 +708,8 @@ export function getOrderGroup(data) {
|
||||
return request({
|
||||
url: '/personalization/orders-group-package/group-package-for-order',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -700,8 +719,8 @@ export function getBindDevice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/order-bind-info',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -711,6 +730,46 @@ export function isFoodDiseasesNew(params) {
|
||||
return request({
|
||||
url: '/external-integration/foodborne-acquisition/is-food-diseases-new',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 是否入院登记
|
||||
export function isHospitalization(params) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/isRegister',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 校验三十天内是否开过相同检查检验项目
|
||||
export function checkServicesHistory(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-test-history',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验报告 url
|
||||
*/
|
||||
export function getProofResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查报告 url
|
||||
*/
|
||||
export function getTestResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/test-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,7 +91,9 @@ import {
|
||||
getTcmCondition,
|
||||
getTcmSyndrome,
|
||||
saveTcmDiagnosis,
|
||||
updateTcmDiagnosis,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import { update } from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
openAddDiagnosisDialog: {
|
||||
@@ -102,6 +104,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
updateZy: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const conditionList = ref([]);
|
||||
@@ -118,64 +124,183 @@ function handleOpen() {
|
||||
getTcmCondition().then((res) => {
|
||||
conditionList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value == 0) {
|
||||
selectedDisease.value = true;
|
||||
syndromeSelected.value = false;
|
||||
timestamp.value = Date.now();
|
||||
getTcmSyndrome().then((res) => {
|
||||
syndromeList.value = res.data.records;
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
tcmDiagonsisSaveList.value=[];
|
||||
tcmDiagonsisList.value=[];
|
||||
debugger;
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
let name=item.name.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
conditionId: updateIds[0],
|
||||
definitionId: item.illnessDefinitionId,
|
||||
ybNo: item.ybNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: name[0],
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
});
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
conditionId: updateIds[1],
|
||||
definitionId: item.symptomDefinitionId,
|
||||
ybNo: item.symptomYbNo,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = name[1];
|
||||
console.log("这是修改时带入的数据");
|
||||
console.log(tcmDiagonsisList.value);
|
||||
console.log(tcmDiagonsisSaveList.value);
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value.length == 0) {
|
||||
syndromeSelected.value = false;
|
||||
selectedDisease.value = true;
|
||||
timestamp.value = Date.now();
|
||||
getTcmSyndrome().then((res) => {
|
||||
syndromeList.value = res.data.records;
|
||||
});
|
||||
|
||||
if (props.updateZy.length>0) {
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[0],
|
||||
conditionId: updateIds[0],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
diagSrtNo:item.diagSrtNo,
|
||||
});
|
||||
debugger;
|
||||
if(tcmDiagonsisList.value.length>0){
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName = row.name;
|
||||
}else{
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: '11',
|
||||
});
|
||||
tcmDiagonsisList.value.push({
|
||||
conditionName: row.name,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// tcmDiagonsisList.value.push({
|
||||
// conditionName: row.name,
|
||||
// syndromeGroupNo: timestamp.value,
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
function clickSyndromeRow(row) {
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
debugger;
|
||||
let flag=true;
|
||||
tcmDiagonsisList.value.forEach( item => {
|
||||
if(tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName==item.conditionName){
|
||||
if(item.syndromeName==row.name ){
|
||||
proxy.$modal.msgWarning('不能存在完全相同的诊断和证侯');
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
if(flag){
|
||||
if(props.updateZy.length>0){
|
||||
props.updateZy.forEach((item) => {
|
||||
let updateIds=item.updateId.split("-");
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
updateId:updateIds[1],
|
||||
conditionId: updateIds[1],
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
});
|
||||
|
||||
}else{
|
||||
tcmDiagonsisSaveList.value.push({
|
||||
definitionId: row.id,
|
||||
ybNo: row.ybNo,
|
||||
syndromeGroupNo: timestamp.value,
|
||||
});
|
||||
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
syndromeSelected.value = true;
|
||||
}
|
||||
|
||||
|
||||
// tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
|
||||
// syndromeSelected.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 删除诊断
|
||||
function removeDiagnosis(row, index) {
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.filter((item) => {
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function save() {
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
if(props.updateZy.length>0){
|
||||
updateTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (tcmDiagonsisSaveList.value.length > 0 && syndromeSelected.value) {
|
||||
debugger;
|
||||
if (
|
||||
tcmDiagonsisSaveList.value.length > 0 &&
|
||||
(syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0)
|
||||
) {
|
||||
save();
|
||||
} else {
|
||||
proxy.$modal.msgWarning('请选择证候');
|
||||
|
||||
@@ -2,33 +2,64 @@
|
||||
<div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-input v-model="diagnosis" placeholder="诊断名称" clearable style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse">
|
||||
<el-input
|
||||
v-model="diagnosis"
|
||||
placeholder="诊断名称"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-tree ref="treeRef" :data="tree" node-key="id" :props="{ label: 'name', children: 'children' }"
|
||||
highlight-current default-expand-all :filter-node-method="filterNode" @node-click="handleNodeClick">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
node-key="id"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:filter-node-method="filterNode"
|
||||
class="tree-with-scrollbar"
|
||||
@node-click="handleNodeClick"
|
||||
max-height="650"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
<template v-if="node.level === 1 && data.name != '常用' && data.name != '历史'">
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="addChild(data)"
|
||||
>
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<el-popconfirm width="200" :hide-after="10" title="确认删除此常用诊断吗" placement="top-start"
|
||||
@confirm="deleteChild(data)">
|
||||
<el-popconfirm
|
||||
width="200"
|
||||
:hide-after="10"
|
||||
title="确认删除此常用诊断吗"
|
||||
placement="top-start"
|
||||
@confirm="deleteChild(data)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button style="color: #000000" v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
" type="text" size="small" @click.stop="">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop=""
|
||||
>
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
@@ -46,6 +77,9 @@
|
||||
<el-button type="primary" plain @click="handleSaveDiagnosis()"> 保存诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleImport()"> 导入慢性病诊断 </el-button>
|
||||
<span style="font-size: 12px; margin-left: 10px"
|
||||
>注意 : 若使用电子处方,请不要导入慢性病诊断</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
@@ -53,17 +87,32 @@
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
|
||||
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
|
||||
style="width: 80px" />
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||
:rules="rules.diagSrtNo"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.diagSrtNo"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 80px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.medTypeCode`"
|
||||
:rules="rules.medTypeCode"
|
||||
>
|
||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||
<el-option v-for="item in med_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -71,12 +120,26 @@
|
||||
<el-table-column label="诊断名称" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
trigger="manual" :width="800">
|
||||
<diagnosislist :diagnosisSearchkey="diagnosisSearchkey" @selectDiagnosis="handleSelsectDiagnosis" />
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="handleSelsectDiagnosis"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
<el-input
|
||||
v-model="scope.row.name"
|
||||
placeholder="请选择诊断"
|
||||
@input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
@@ -86,18 +149,37 @@
|
||||
<el-table-column label="类别" align="center" prop="typeName" width="100" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
<template #default="scope">
|
||||
<el-checkbox label="主诊断" :trueLabel="1" :falseLabel="0" v-model="scope.row.maindiseFlag" border
|
||||
size="small" @change="(value) => handleMaindise(value, scope.$index)" />
|
||||
<el-select v-model="scope.row.verificationStatusEnum" placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px" size="small">
|
||||
<el-option v-for="item in diagnosisOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
:trueLabel="1"
|
||||
:falseLabel="0"
|
||||
v-model="scope.row.maindiseFlag"
|
||||
border
|
||||
size="small"
|
||||
@change="(value) => handleMaindise(value, scope.$index)"
|
||||
/>
|
||||
<el-select
|
||||
v-model="scope.row.verificationStatusEnum"
|
||||
placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleDeleteDiagnosis(scope.row, scope.$index)">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDeleteDiagnosis(scope.row, scope.$index)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -106,9 +188,17 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
:radio="orgOrUser"
|
||||
/>
|
||||
<AddDiagnosisDialog
|
||||
:openAddDiagnosisDialog="openAddDiagnosisDialog"
|
||||
:updateZy="updateZy"
|
||||
:patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -130,10 +220,12 @@ import {
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
|
||||
import diagnosislist from '../diagnosis/diagnosislist.vue';
|
||||
import { onMounted, onBeforeUnmount } from 'vue';
|
||||
// const diagnosisList = ref([]);
|
||||
const allowAdd = ref(false);
|
||||
const tree = ref([]);
|
||||
const openDiagnosis = ref(false);
|
||||
const updateZy = ref([]);
|
||||
const openAddDiagnosisDialog = ref(false);
|
||||
const diagnosisSearchkey = ref('');
|
||||
const diagnosisOptions = ref([]);
|
||||
@@ -142,6 +234,7 @@ const diagnosis = ref();
|
||||
const orgOrUser = ref();
|
||||
const form = ref({
|
||||
diagnosisList: [],
|
||||
isDataLoaded: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
@@ -172,29 +265,46 @@ function getDetail(encounterId) {
|
||||
});
|
||||
}
|
||||
|
||||
function refreshData() {
|
||||
getList();
|
||||
}
|
||||
let maxNo = 99;
|
||||
function getList() {
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.diagnosisList = res.data;
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
typeName: '中医诊断',
|
||||
});
|
||||
});
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.diagnosisList = res.data;
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
maxNo = form.value.diagnosisList.length;
|
||||
})
|
||||
.then(() => {
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
if (item.diagSrtNo <= maxNo) {
|
||||
return;
|
||||
}
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
syndromeGroupNo: item.syndromeGroupNo,
|
||||
typeName: '中医诊断',
|
||||
updateId:item.encounterDiagnosisId+'-'+res.data.symptom[index].encounterDiagnosisId,
|
||||
illnessDefinitionId : item.definitionId,
|
||||
symptomDefinitionId : res.data.symptom[index].definitionId,
|
||||
symptomYbNo: res.data.symptom[index].ybNo,
|
||||
});
|
||||
maxNo = item.diagSrtNo;
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -302,10 +412,10 @@ function getTree() {
|
||||
function handleAddDiagnosis() {
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
form.value.diagnosisList.push({
|
||||
showPopover: false,
|
||||
name: undefined,
|
||||
@@ -324,6 +434,7 @@ function handleAddDiagnosis() {
|
||||
|
||||
// 添加中医诊断
|
||||
function handleAddTcmDiagonsis() {
|
||||
updateZy.value = [];
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -410,13 +521,13 @@ function closeDiagnosisDialog(str) {
|
||||
if (str === 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
|
||||
openAddDiagnosisDialog.value = false;
|
||||
openDiagnosis.value = false;
|
||||
getList();
|
||||
getTree();
|
||||
}
|
||||
|
||||
function queryDiagnosisUse(value) { }
|
||||
function queryDiagnosisUse(value) {}
|
||||
|
||||
function handleChange(value) {
|
||||
diagnosisSearchkey.value = value;
|
||||
@@ -432,8 +543,24 @@ function handleSelsectDiagnosis(row) {
|
||||
}
|
||||
/**获取焦点时 打开列表 */
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
if(row.typeName==='中医诊断'){
|
||||
updateZy.value = [];
|
||||
updateZy.value.push({
|
||||
illnessDefinitionId: row.illnessDefinitionId,
|
||||
symptomDefinitionId: row.symptomDefinitionId,
|
||||
syndromeGroupNo: row.syndromeGroupNo,
|
||||
symptomYbNo:row.symptomYbNo,
|
||||
ybNo:row.ybNo,
|
||||
updateId: row.updateId,
|
||||
diagSrtNo: row.diagSrtNo,
|
||||
name:row.name,
|
||||
});
|
||||
openAddDiagnosisDialog.value = true;
|
||||
}else{
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
}
|
||||
|
||||
}
|
||||
/**失去焦点时 关闭列表 */
|
||||
function handleBlur(row) {
|
||||
@@ -447,10 +574,10 @@ function handleNodeClick(data) {
|
||||
// 如果是根节点,不执行任何操作
|
||||
return;
|
||||
}
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
const isDuplicate = form.value.diagnosisList.some(
|
||||
(diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name
|
||||
);
|
||||
@@ -478,7 +605,10 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tree-with-scrollbar {
|
||||
max-height: 650px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-scrollbar height="200px">
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
max-height="400"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="prev, pager, next"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
@@ -31,9 +30,13 @@
|
||||
<script setup>
|
||||
import { getEmrTemplateList, deleteEmrTemplate } from '../api';
|
||||
|
||||
const queryParams = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
});
|
||||
const emrTemplate = ref([]);
|
||||
const emrTemplateRef = ref();
|
||||
const total = ref(0);
|
||||
const emits = defineEmits(['selectRow']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const selectRow = ref({});
|
||||
@@ -47,6 +50,7 @@ getList();
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
total.value = res.data.total;
|
||||
emrTemplate.value = res.data.records;
|
||||
console.log(emrTemplate.value, 'emrTemplate.value');
|
||||
});
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisListOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.definitionId"
|
||||
:label="item.name + '--' + item.ybNo"
|
||||
:value="item.definitionId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -432,7 +432,7 @@ import { computed, onMounted, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
// import { useModal, useDict } from '@/hooks';
|
||||
import { parseTime, formatNumber } from '@/utils/his';
|
||||
import { queryYbCatalogue, getDiagnosisList } from './api';
|
||||
import { queryYbCatalogue, getDiagnosisListEle } from './api';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
import {
|
||||
@@ -565,7 +565,7 @@ const unitMap = ref({
|
||||
|
||||
function getInit(searchKey) {
|
||||
if(searchKey) {
|
||||
getDiagnosisList(searchKey).then(res => {
|
||||
getDiagnosisListEle(searchKey,infoForm.encounterId).then(res => {
|
||||
diagnosisListOption.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -150,12 +150,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
placeholder="诊断"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
remote
|
||||
:remote-method="getDiagnosisInfo"
|
||||
style="width: 400px"
|
||||
>
|
||||
@@ -166,7 +166,10 @@
|
||||
:value="item.id"
|
||||
@click="handleDiagnosisChange(item)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="props.mainDiagnosis.name" disabled style="width: 400px" />
|
||||
<!-- 隐藏存储ID的字段 -->
|
||||
<input type="hidden" v-model="submitForm.diagnosisDefinitionId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -179,7 +182,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getInit,
|
||||
@@ -201,6 +204,7 @@ const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
},
|
||||
mainDiagnosis: { type: Object, default: null },
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
@@ -239,9 +243,17 @@ const rules = reactive({
|
||||
});
|
||||
|
||||
function openDialog() {
|
||||
console.log('orgId==========>', props.patientInfo.orgId);
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records;
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
console.log('organization==========>', organization.value);
|
||||
submitForm.inHospitalOrgId =
|
||||
organization.value.find((item) => item.id === props.patientInfo.orgId)?.id || '';
|
||||
});
|
||||
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
@@ -251,6 +263,14 @@ function openDialog() {
|
||||
});
|
||||
console.log(props.patientInfo, 'patientInfo');
|
||||
getDiagnosisInfo(undefined);
|
||||
console.log(props.mainDiagnosis, 'mainDiagnosis');
|
||||
if (props.mainDiagnosis) {
|
||||
submitForm.diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisDefinitionId = props.mainDiagnosis.definitionId;
|
||||
diagnosisYbNo = props.mainDiagnosis.ybNo || '';
|
||||
submitForm.medTypeCode = props.mainDiagnosis.medTypeCode;
|
||||
diagnosisDefinitionList.value = [props.mainDiagnosis];
|
||||
}
|
||||
}
|
||||
|
||||
function getDiagnosisInfo(value) {
|
||||
@@ -320,4 +340,4 @@ function close() {
|
||||
.patInfo-value {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,34 +1,76 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
* @Description:
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// ====== 文书记录
|
||||
// 保存或更新记录
|
||||
export function saveOrUpdateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/saveOrUpdateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改记录
|
||||
export function updateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/updateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除历史记录
|
||||
export function deleteRecord(ids) {
|
||||
return request({
|
||||
url: '/document/record/deleteRecord',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 记录打印次数
|
||||
export function recordPrint(recordId) {
|
||||
return request({
|
||||
url: '/document/record/record-print',
|
||||
method: 'get',
|
||||
params: { recordId },
|
||||
});
|
||||
}
|
||||
//删除模板
|
||||
export function deleteTemplate(id) {
|
||||
return request({
|
||||
url: `/document/template/delete`,
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
@@ -37,24 +79,22 @@ export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
params: {definitionId}
|
||||
})
|
||||
params: { definitionId },
|
||||
});
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,29 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
|
||||
<el-scrollbar
|
||||
class="emr-history-scrollbar-container"
|
||||
style="width: 100%; height: calc(100vh - 300px)"
|
||||
>
|
||||
<div
|
||||
v-for="item in historyData"
|
||||
:key="item.id"
|
||||
class="scrollbar-item"
|
||||
:class="{ 'selected-history-item': item.id === props.selectedRecordId }"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
|
||||
<el-icon
|
||||
class="ml-2"
|
||||
style="margin-left: 26px; cursor: pointer"
|
||||
:disabled="item.printCount && item.printCount > 0"
|
||||
:class="{ 'disabled-icon': item.printCount && item.printCount > 0 }"
|
||||
@click.stop="handleDelete(item)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -20,8 +38,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
@@ -31,6 +49,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
selectedRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
@@ -59,14 +81,30 @@ const queryList = async () => {
|
||||
historyData.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
// ElMessage.error(' 获取模板树失败 ');
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
const currentSelectTemplate = ref({});
|
||||
// 删除历史记录
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 检查是否已打印
|
||||
if (item.printCount && item.printCount > 0) {
|
||||
ElMessage.warning('已打印的记录不允许删除');
|
||||
return;
|
||||
}
|
||||
|
||||
await deleteRecord([item.id]);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
@@ -90,6 +128,16 @@ defineExpose({ queryList });
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.selected-history-item {
|
||||
background-color: rgb(194, 231, 255);
|
||||
}
|
||||
|
||||
.disabled-icon {
|
||||
color: #d9d9d9;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,15 @@
|
||||
</div> -->
|
||||
<el-scrollbar class="emr-template-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in templateData" :key="item.id" class="scrollbar-item">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="`${item.name}`"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}`" placement="bottom">
|
||||
<el-text class="2" truncated @click="handleNodeClick(item)">
|
||||
<div class="template-item">{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
</el-space></div>
|
||||
|
||||
<div class="template-item">
|
||||
{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
<el-icon><Delete @click="handleDelete(item)" /></el-icon>
|
||||
</el-space>
|
||||
</div>
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -29,11 +27,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getListByDefinitionId } from '../api';
|
||||
import { getListByDefinitionId, deleteTemplate } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick','edit']);
|
||||
const emits = defineEmits(['templateClick', 'edit']);
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
@@ -53,15 +51,24 @@ const queryParams = ref({
|
||||
isPage: 0,
|
||||
});
|
||||
const templateData = ref([]);
|
||||
// 删除模板
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
await deleteTemplate(item.id);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if ( unref(definitionId)&&unref(definitionId) !== '') {
|
||||
if (unref(definitionId) && unref(definitionId) !== '') {
|
||||
const res = await getListByDefinitionId(unref(definitionId));
|
||||
templateData.value = res.data || [];
|
||||
}else{
|
||||
} else {
|
||||
templateData.value = [];
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板失败');
|
||||
templateData.value = [];
|
||||
@@ -79,34 +86,33 @@ defineExpose({ queryList });
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-template-container {
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container{
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container {
|
||||
padding: 8px;
|
||||
height: 100%;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text{
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text {
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-18 15:41:10
|
||||
* @Description: 门诊病历组件
|
||||
-->
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div
|
||||
@@ -48,18 +43,21 @@
|
||||
<!-- <el-button type="primary" @click="newEmr">新建</el-button> -->
|
||||
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
|
||||
<el-button @click="refresh">刷新</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<!-- <el-button type="primary" @click="print">打印</el-button> -->
|
||||
<el-button type="primary" @click="print">打印</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="operate-main">
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
<div v-loading="loading" class="loading-container">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,6 +70,7 @@
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
:selectedRecordId="selectedHistoryRecordId"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
@@ -95,18 +94,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { addRecord, addTemplate } from './api';
|
||||
import { saveOrUpdateRecord, addTemplate, getRecordByEncounterIdList, recordPrint } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
// import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { getEncounterDiagnosis } from '../api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['emrSaved']);
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
@@ -129,6 +129,7 @@ const queryParams = ref({
|
||||
useRanges: [1, 2], // 0 暂不使用 1 全院 2 科室 3 个人
|
||||
organizationId: userStore.orgId,
|
||||
});
|
||||
const loading = ref(false); // 数据加载状态
|
||||
|
||||
const currentSelectTemplate = ref({
|
||||
id: '',
|
||||
@@ -138,6 +139,7 @@ const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
const templateTree = ref(null);
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
@@ -150,6 +152,9 @@ const queryTemplateTree = async () => {
|
||||
try {
|
||||
const res = await getTreeList(queryParams.value);
|
||||
templateData.value = res.data || [];
|
||||
|
||||
// 组件挂载后,患者信息变化时会自动调用selectDefaultTemplate
|
||||
// 这里不再重复调用,避免重复操作
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
templateData.value = [];
|
||||
@@ -169,7 +174,20 @@ const handleNodeClick = (data, node) => {
|
||||
};
|
||||
// currentComponent.value = null;
|
||||
}
|
||||
historyRef.value?.queryList();
|
||||
|
||||
// 确保组件状态更新后再查询历史记录
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
|
||||
// 选择任何病历模板后,都加载该病历类型的最新历史记录
|
||||
if (node.isLeaf && props.patientInfo && props.patientInfo.patientId) {
|
||||
loadLatestMedicalRecord();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
@@ -229,19 +247,24 @@ const handleSubmitOk = async (data) => {
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
await addRecord(editForm.value);
|
||||
ElMessage.success('病历保存成功');
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
ElMessage.success('保存成功');
|
||||
|
||||
// 刷新历史记录列表
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
// 通知父组件病历保存成功
|
||||
emits('emrSaved', true);
|
||||
|
||||
// 等待历史记录列表更新后,重新加载最新病历并更新选中状态
|
||||
setTimeout(() => {
|
||||
loadLatestMedicalRecord();
|
||||
}, 100);
|
||||
} catch (error) {
|
||||
ElMessage.error('提交失败');
|
||||
console.log(error);
|
||||
}
|
||||
} else if (currentOperate.value === 'addTemplate') {
|
||||
// 新增或者编辑模板
|
||||
// editTemplateForm.value.id=
|
||||
// 新增或修改模板
|
||||
editTemplateForm.value.name =
|
||||
currentSelectTemplate.value.name + dayjs().format('YYYY/MM/DD HH:mm');
|
||||
editTemplateForm.value.contextJson = JSON.stringify(data);
|
||||
@@ -256,17 +279,12 @@ const refresh = () => {
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
const deleteEmr = async () => {
|
||||
try {
|
||||
// 这里应该添加实际的删除逻辑
|
||||
ElMessage.success('删除成功!');
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
if (editForm.value && editForm.value.printCount && editForm.value.printCount > 0) {
|
||||
ElMessage.warning('该病历已打印,不允许修改');
|
||||
return;
|
||||
}
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
@@ -274,6 +292,50 @@ const save = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 重置表单数据
|
||||
const resetForm = async () => {
|
||||
try {
|
||||
// 重置editForm为初始值
|
||||
editForm.value = {
|
||||
id: '',
|
||||
definitionId: '',
|
||||
definitionBusNo: '',
|
||||
contentJson: '',
|
||||
statusEnum: 1,
|
||||
organizationId: 0,
|
||||
encounterId: '',
|
||||
patientId: '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
createBy: '',
|
||||
source: '',
|
||||
};
|
||||
|
||||
// 先将组件设置为空,强制卸载
|
||||
const currentComponentName = currentComponent.value;
|
||||
if (currentComponentName) {
|
||||
currentComponent.value = '';
|
||||
|
||||
// 等待DOM更新
|
||||
await nextTick();
|
||||
|
||||
// 重新加载组件
|
||||
currentComponent.value = currentComponentName;
|
||||
|
||||
// 再次等待DOM更新后设置空数据
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
// 重置动态组件表单数据
|
||||
if (emrComponentRef.value && emrComponentRef.value.setFormData) {
|
||||
emrComponentRef.value.setFormData({});
|
||||
}
|
||||
|
||||
ElMessage.success('表单已重置');
|
||||
} catch (error) {
|
||||
ElMessage.error('重置表单失败');
|
||||
}
|
||||
};
|
||||
|
||||
const historyRef = ref(null);
|
||||
const handleHistoryClick = (data) => {
|
||||
newEmr();
|
||||
@@ -282,6 +344,108 @@ const handleHistoryClick = (data) => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
|
||||
});
|
||||
};
|
||||
|
||||
// 默认选中门诊病历模板
|
||||
const selectOutpatientMedicalRecordTemplate = async () => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
await queryTemplateTree();
|
||||
}
|
||||
|
||||
// 查找门诊病历模板
|
||||
const findOutpatientTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findOutpatientTemplate(node.children);
|
||||
if (found) return found;
|
||||
}
|
||||
if (
|
||||
node.document &&
|
||||
node.document.name &&
|
||||
(node.document.name.includes('门诊病历') ||
|
||||
node.document.name === '门诊病历 (1.0.0)' ||
|
||||
node.document.name === '门诊病历(1.0.0)')
|
||||
) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const outpatientTemplateNode = findOutpatientTemplate(templateData.value);
|
||||
if (outpatientTemplateNode) {
|
||||
//选中节点
|
||||
nextTick(() => {
|
||||
if (templateTree.value && outpatientTemplateNode.id) {
|
||||
templateTree.value.setCurrentKey(outpatientTemplateNode.id);
|
||||
}
|
||||
|
||||
// 选中门诊病历模板
|
||||
handleNodeClick(outpatientTemplateNode, {
|
||||
isLeaf: true,
|
||||
data: outpatientTemplateNode,
|
||||
});
|
||||
|
||||
// 等待模板加载完成,然后获取并回显最新病历数据
|
||||
setTimeout(() => {
|
||||
historyRef.value?.queryList();
|
||||
loadLatestMedicalRecord();
|
||||
}, 500);
|
||||
});
|
||||
} else {
|
||||
ElMessage.info('未找到门诊病历模板');
|
||||
}
|
||||
};
|
||||
|
||||
// 当前选中的历史病历ID,用于在History组件中高亮显示
|
||||
const selectedHistoryRecordId = ref('');
|
||||
|
||||
// 加载最新的病历数据并回显
|
||||
const loadLatestMedicalRecord = async () => {
|
||||
if (!patientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
const historyRecords = res.data || [];
|
||||
if (historyRecords.length > 0) {
|
||||
// 按时间排序,获取最新的病历记录
|
||||
historyRecords.sort((a, b) => new Date(b.recordTime) - new Date(a.recordTime));
|
||||
const latestRecord = historyRecords[0];
|
||||
|
||||
// 保存最新病历ID,用于在History组件中高亮显示
|
||||
selectedHistoryRecordId.value = latestRecord.id;
|
||||
|
||||
// 自动回显最新病历数据到模板
|
||||
editForm.value = latestRecord;
|
||||
nextTick(() => {
|
||||
if (emrComponentRef.value && latestRecord.contentJson) {
|
||||
emrComponentRef.value.setFormData(JSON.parse(latestRecord.contentJson));
|
||||
}
|
||||
|
||||
// 通知History组件更新选中状态
|
||||
if (historyRef.value && typeof historyRef.value.updateSelectedRecord === 'function') {
|
||||
historyRef.value.updateSelectedRecord(latestRecord.id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('加载最新病历数据失败');
|
||||
// 出错时也清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
const templateRef = ref(null);
|
||||
|
||||
const handleTemplateClick = (data) => {
|
||||
@@ -299,39 +463,77 @@ const templateEdit = (data) => {
|
||||
const templateEditVisible = ref(false);
|
||||
// const templateEditSubmitOk = () => {};
|
||||
|
||||
// 打印方法实现
|
||||
// 定义病历模板类型与打印模板的映射关系
|
||||
const templateToPrintTemplateMap = {
|
||||
// 手术记录相关模板
|
||||
手术记录: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
'手术记录(1.0.0)': PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
tySurgicalRecord: PRINT_TEMPLATE.OPERATIVE_RECORD,
|
||||
// 门诊病历相关模板
|
||||
门诊病历: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
'门诊病历(1.0.0)': PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
测试新增: PRINT_TEMPLATE.HQOUTPATIENT_MEDICAL_RECORD,
|
||||
};
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const getPrintTemplateByTemplateName = (templateName) => {
|
||||
// 默认使用门诊病历模板
|
||||
let printTemplate = PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD;
|
||||
|
||||
if (templateName) {
|
||||
for (const [key, value] of Object.entries(templateToPrintTemplateMap)) {
|
||||
if (templateName.includes(key)) {
|
||||
printTemplate = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return printTemplate;
|
||||
};
|
||||
|
||||
// 打印
|
||||
const print = async () => {
|
||||
try {
|
||||
// 检查是否有选中的病历模板
|
||||
if (!currentSelectTemplate.value || !currentSelectTemplate.value.id) {
|
||||
ElMessage.warning('请先选择病历模板');
|
||||
return;
|
||||
}
|
||||
// 检查是否已保存
|
||||
if (!editForm.value.id || editForm.value.id === '') {
|
||||
ElMessage.warning('请先保存病历后再进行打印');
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取当前病历组件的表单数据
|
||||
const formData = emrComponentRef.value?.formData || {};
|
||||
|
||||
// 准备打印数据(不依赖子组件的getPrintData方法)
|
||||
// const printData = {
|
||||
// // 使用当前选中的模板信息
|
||||
// templateInfo: currentSelectTemplate.value,
|
||||
// // 添加患者信息
|
||||
// patientInfo: props.patientInfo,
|
||||
// // 添加打印时间
|
||||
// printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// // 添加基本病历信息
|
||||
// emrInfo: {
|
||||
// documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
// documentId: currentSelectTemplate.value.id || '',
|
||||
// encounterId: props.patientInfo.encounterId || '',
|
||||
// patientId: props.patientInfo.patientId || '',
|
||||
// recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
// // 添加病历表单数据(包含红框内的所有字段)
|
||||
// formData: formData,
|
||||
// doctorName: userStore.nickName,
|
||||
// };
|
||||
// 获取诊断数据
|
||||
let diagnosisList = [];
|
||||
let diagnosisText = '';
|
||||
if (props.patientInfo && props.patientInfo.encounterId) {
|
||||
try {
|
||||
const diagnosisRes = await getEncounterDiagnosis(props.patientInfo.encounterId);
|
||||
diagnosisList = diagnosisRes.data || [];
|
||||
// 格式化诊断文本,区分主诊断和其他诊断
|
||||
diagnosisText = diagnosisList
|
||||
.map((item) => {
|
||||
const prefix = item.maindiseFlag === 1 ? '[主]' : '';
|
||||
return `${prefix}${item.name || ''}`;
|
||||
})
|
||||
.join(';');
|
||||
} catch (error) {
|
||||
ElMessage.error('获取诊断数据失败');
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前模板名称
|
||||
const templateName = currentSelectTemplate.value.name || '';
|
||||
|
||||
// 根据模板名称获取对应的打印模板
|
||||
const selectedPrintTemplate = getPrintTemplateByTemplateName(templateName);
|
||||
|
||||
// 打印数据
|
||||
const printData = {
|
||||
// 模板信息
|
||||
templateName: currentSelectTemplate.value.name || '住院病历',
|
||||
@@ -355,21 +557,42 @@ const print = async () => {
|
||||
department: props.patientInfo.department || '',
|
||||
attendingDoctor: props.patientInfo.attendingDoctor || '',
|
||||
|
||||
// 诊断信息
|
||||
diagnosisList: JSON.stringify(diagnosisList),
|
||||
diagnosisText: diagnosisText,
|
||||
|
||||
// 病历信息
|
||||
documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
documentId: currentSelectTemplate.value.id || '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
|
||||
//病历号
|
||||
busNo: props.patientInfo.busNo || '',
|
||||
//费用类型
|
||||
contractName: props.patientInfo.contractName || '',
|
||||
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
console.log('打印数据:', printData);
|
||||
|
||||
// 执行打印,使用根据模板类型选择的打印模板
|
||||
await simplePrint(selectedPrintTemplate, printData);
|
||||
|
||||
// 调用打印记录接口
|
||||
try {
|
||||
await recordPrint(editForm.value.id);
|
||||
|
||||
// 刷新历史记录列表,确保删除按钮状态根据最新的printCount值更新
|
||||
historyRef.value?.queryList();
|
||||
} catch (printLogError) {
|
||||
ElMessage.error('保存打印记录失败');
|
||||
// 打印记录失败不影响打印成功提示
|
||||
}
|
||||
|
||||
// 执行打印
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD, printData);
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
ElMessage.error('打印失败: ' + (error.message || '未知错误'));
|
||||
}
|
||||
};
|
||||
@@ -403,44 +626,100 @@ const templateEditSubmitOk = () => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
// onBeforeMount(() => {});
|
||||
// 刚进页面默认显示门诊病历
|
||||
|
||||
// 选择默认模板 - 获取门诊病历分类下的第一个模板
|
||||
const selectDefaultTemplate = () => {
|
||||
nextTick(() => {
|
||||
// 查找门诊病历(1.0.0)节点
|
||||
const findTemplate = (nodes) => {
|
||||
if (!templateData.value || templateData.value.length === 0) {
|
||||
console.log('模板数据为空,无法选择默认模板');
|
||||
return;
|
||||
}
|
||||
|
||||
// 查找门诊病历分类节点,然后获取其下的第一个模板
|
||||
const findOutpatientRecordCategoryAndFirstTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
// 检查是否是门诊病历分类节点
|
||||
if (!node.document && node.name && node.name.includes('门诊病历')) {
|
||||
// 这是一个分类节点,检查是否有子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
// 返回第一个有document属性的子节点(即第一个模板)
|
||||
for (const child of node.children) {
|
||||
if (child.document) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 递归查找子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findTemplate(node.children);
|
||||
const found = findOutpatientRecordCategoryAndFirstTemplate(node.children);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
// 根据ID查找门诊病历模板
|
||||
if (node.document && node.document.id === '1963474077201162242') {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const defaultTemplate = findTemplate(templateData.value);
|
||||
const defaultTemplate = findOutpatientRecordCategoryAndFirstTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
nextTick(() => {
|
||||
templateTree.value?.setCurrentKey(defaultTemplate.id);
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
|
||||
// 直接加载最新病历数据,不再使用额外的setTimeout延迟
|
||||
// 因为handleNodeClick中已经有nextTick和setTimeout处理组件渲染
|
||||
loadLatestMedicalRecord();
|
||||
});
|
||||
} else {
|
||||
console.log('未找到门诊病历模板');
|
||||
}
|
||||
});
|
||||
};
|
||||
// 监听患者信息变化,实现联动显示
|
||||
watch(
|
||||
() => props.patientInfo,
|
||||
(newPatientInfo) => {
|
||||
// 当患者信息变化时,默认选中门诊病历模板并加载最新病历数据
|
||||
if (newPatientInfo && newPatientInfo.patientId && Object.keys(newPatientInfo).length > 0) {
|
||||
// 确保模板树已经加载
|
||||
if (templateData.value && templateData.value.length > 0) {
|
||||
// 优先尝试使用更精确的selectDefaultTemplate函数
|
||||
selectDefaultTemplate();
|
||||
} else {
|
||||
// 重新加载模板树
|
||||
queryTemplateTree().then(() => {
|
||||
// 使用nextTick确保DOM更新,移除setTimeout避免多次渲染
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
console.log('hospitalizationEmr mounted', userStore);
|
||||
await queryTemplateTree();
|
||||
selectDefaultTemplate();
|
||||
// 组件挂载完成后,如果已有患者信息,默认选中门诊病历模板
|
||||
if (
|
||||
props.patientInfo &&
|
||||
props.patientInfo.patientId &&
|
||||
Object.keys(props.patientInfo).length > 0
|
||||
) {
|
||||
// 使用nextTick确保模板树数据已更新
|
||||
nextTick(() => {
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
// defineExpose({ state }); // state未使用
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
@@ -554,12 +833,29 @@ const disNode_R = () => {
|
||||
}
|
||||
|
||||
.operate-main {
|
||||
height: calc(100vh - 150px);
|
||||
flex: auto;
|
||||
flex: 1;
|
||||
min-height: 0; /* 允许flex子项高度收缩 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
/* 确保滚动条样式正常 */
|
||||
-ms-overflow-style: auto;
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
/* 确保动态加载的组件不会破坏布局 */
|
||||
.operate-main .template-tree-scrollbar > .loading-container {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 确保组件内部内容不会溢出 */
|
||||
.operate-main .template-tree-scrollbar > * {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,4 +877,10 @@ const disNode_R = () => {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载状态样式 */
|
||||
.loading-container {
|
||||
min-height: 400px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span>{{ item.prescriptionNo }}</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,14 +59,6 @@
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="收款金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="发放状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.dispenseStatus != 0" type="danger">
|
||||
{{ scope.row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="default">{{ scope.row.serviceStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付状态" align="center" prop="refundStatus_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<!-- consumableDialog.vue -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="皮试检查"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="consumable-dialog">
|
||||
<div class="dialog-header">
|
||||
<el-alert
|
||||
title="下列药品需要执行皮试项目,请确认,点击确定将自动添加皮试检查项目到医嘱列表"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
ref="consumableTableRef"
|
||||
:data="consumableList"
|
||||
row-key="orderDefinitionId"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="adviceName" align="center" label="项目名称" />
|
||||
<el-table-column prop="unitCodeName" label="单位" align="center" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCodeName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行次数" align="center" width="120">
|
||||
<template #default="scope">
|
||||
{{ '1' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link size="small" @click="handleDeleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 下次不再提示复选框 -->
|
||||
<div class="dont-show-again">
|
||||
<!-- <el-checkbox v-model="dontShowAgain" @change="handleDontShowAgainChange">
|
||||
下次不再提示
|
||||
</el-checkbox> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button ref="submitRef" type="primary" @click="handleSubmit">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, nextTick, onBeforeUnmount } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const consumableList = ref([]);
|
||||
const consumableTableRef = ref();
|
||||
const submitRef = ref();
|
||||
const dontShowAgain = ref(false); // 下次不再提示的状态
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(['submit']);
|
||||
|
||||
// 键盘事件处理函数
|
||||
const handleKeyDown = (event) => {
|
||||
// 检查是否按下了回车键
|
||||
if (event.key === 'Enter' && dialogVisible.value) {
|
||||
event.preventDefault();
|
||||
handleSubmit();
|
||||
}
|
||||
};
|
||||
|
||||
// 打开弹窗方法
|
||||
const open = (data) => {
|
||||
consumableList.value = data;
|
||||
dialogVisible.value = true;
|
||||
|
||||
// 默认全选
|
||||
nextTick(() => {
|
||||
if (consumableTableRef.value) {
|
||||
consumableList.value.forEach((row) => {
|
||||
consumableTableRef.value.toggleRowSelection(row, true);
|
||||
});
|
||||
}
|
||||
// 注册键盘事件监听器
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
};
|
||||
|
||||
// 关闭弹窗方法
|
||||
const handleClose = () => {
|
||||
// 移除键盘事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 页面卸载前清理事件监听器
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
});
|
||||
|
||||
// 删除行处理
|
||||
const handleDeleteRow = (row) => {
|
||||
ElMessageBox.confirm(`确定要删除 "${row.orderDefinitionName}" 吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
const index = consumableList.value.findIndex(
|
||||
(item) => item.orderDefinitionId === row.orderDefinitionId
|
||||
);
|
||||
if (index > -1) {
|
||||
consumableList.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 提交处理
|
||||
const handleSubmit = () => {
|
||||
const selectedRows = consumableTableRef.value.getSelectionRows();
|
||||
// 保存到本地存储
|
||||
// localStorage.setItem('doctor' + userStore.id.toString(), dontShowAgain.value);
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请至少选择一项');
|
||||
return;
|
||||
}
|
||||
// 发送事件给父组件
|
||||
emit('submit', selectedRows);
|
||||
// 关闭弹窗并清理事件监听器
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
dialogVisible.value = false;
|
||||
consumableList.value = [];
|
||||
};
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
open,
|
||||
close: handleClose,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.consumable-dialog {
|
||||
.dialog-header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dont-show-again {
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dialog-footer-summary {
|
||||
text-align: right;
|
||||
|
||||
.summary-text {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
|
||||
.total-amount {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #e64545;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检查报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingCheck }"
|
||||
@click="handleRefreshCheck"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingCheck"
|
||||
:data="checkReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检验报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingInspection }"
|
||||
@click="handleRefreshInspection"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingInspection"
|
||||
:data="inspectionReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { getProofResult, getTestResult } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const checkReportList = ref([]);
|
||||
const inspectionReportList = ref([]);
|
||||
const loadingCheck = ref(false);
|
||||
const loadingInspection = ref(false);
|
||||
|
||||
const fetchCheckReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getTestResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
checkReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchInspectionReport = async () => {
|
||||
if (!props.patientInfo?.encounterId) return;
|
||||
const res = await getProofResult({ encounterId: props.patientInfo.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
inspectionReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchAll = async () => {
|
||||
if (!props.patientInfo?.encounterId) {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
return;
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
if (loadingCheck.value || !props.patientInfo?.encounterId) return;
|
||||
loadingCheck.value = true;
|
||||
try {
|
||||
await fetchCheckReport();
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshInspection = async () => {
|
||||
if (loadingInspection.value || !props.patientInfo?.encounterId) return;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await fetchInspectionReport();
|
||||
} finally {
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.patientInfo?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchAll();
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
max-height: 55%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.report-link-disabled {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
const formData = reactive({
|
||||
//医院信息
|
||||
hospitalInfo: {
|
||||
//组织机构代码
|
||||
orgCode: '',
|
||||
//医疗付款方式
|
||||
medicalPaymentCode: '',
|
||||
},
|
||||
//患者信息
|
||||
patientInfo: {
|
||||
// 健康卡号
|
||||
healthCardNo: '',
|
||||
// 患者姓名
|
||||
patientName: '',
|
||||
// 患者性别
|
||||
gend: '',
|
||||
// 出生日期
|
||||
brdy: '',
|
||||
// 年龄
|
||||
age: '',
|
||||
// 国籍
|
||||
nationality: '中国',
|
||||
// 籍贯
|
||||
napl: '',
|
||||
// 民族
|
||||
naty: '',
|
||||
// 身份证号
|
||||
certno: '',
|
||||
// 户口住址
|
||||
resd_addr: '',
|
||||
// 工作单位地址
|
||||
empr_addr: '',
|
||||
// 联系人姓名
|
||||
coner_name: '',
|
||||
// 关系
|
||||
coner_rlts_code: '',
|
||||
// 联系人地址
|
||||
coner_addr: '',
|
||||
// 联系人电话
|
||||
coner_tel: '',
|
||||
},
|
||||
// 住院信息
|
||||
admission: {
|
||||
// 第几次住院
|
||||
patn_ipt_cnt: 1,
|
||||
// 住院号
|
||||
ipt_no: '',
|
||||
// 病案号
|
||||
medcasno: '',
|
||||
// 入院途径
|
||||
adm_way_code: '',
|
||||
// 入院时间
|
||||
admitTime: '',
|
||||
// 入院科室
|
||||
adm_caty: '',
|
||||
// 病房
|
||||
adm_ward: '',
|
||||
// 确诊日期
|
||||
adm_date: '',
|
||||
// 出院时间
|
||||
dscg_date: '',
|
||||
// 出院科室
|
||||
dscg_caty: '',
|
||||
// 病房
|
||||
dscg_ward: '',
|
||||
// 实际住院天数
|
||||
ipt_days: '',
|
||||
},
|
||||
// 诊断信息
|
||||
diagnosis: {
|
||||
// 主要诊断
|
||||
mainDiagnosis: '',
|
||||
// 其他诊断
|
||||
otherDiagnosis: '',
|
||||
},
|
||||
// 医疗信息
|
||||
medicalInfo: {
|
||||
// 是否输血
|
||||
bloodTransfusion: '',
|
||||
// 血型
|
||||
abo_code: '',
|
||||
// rh类型
|
||||
rh_code: '',
|
||||
// 药物过敏史
|
||||
die_autp_flag: '',
|
||||
},
|
||||
// 医师信息
|
||||
doctorInfo: {
|
||||
// 科主任
|
||||
deptdrt_name: '',
|
||||
// 副主任
|
||||
chfdr_name: '',
|
||||
// 主治医师
|
||||
chfpdr_name: '',
|
||||
// 住院医师
|
||||
ipt_dr_name: '',
|
||||
// 责任护士
|
||||
resp_nurs_name: '',
|
||||
// 住院总医师
|
||||
chiefResident: '',
|
||||
// 实习医师
|
||||
intn_dr_name: '',
|
||||
// 病案质量
|
||||
medcas_qlt_code: '',
|
||||
// 编码员
|
||||
codr_name: '',
|
||||
// 控制日期
|
||||
qltctrl_date: '',
|
||||
},
|
||||
// 病案首页2
|
||||
medicalSecond: {
|
||||
// 手术方式
|
||||
surgeryType: '',
|
||||
// 离院方式
|
||||
dscg_way: '',
|
||||
// 31天是否计划出院
|
||||
dscg_31days_rinp_flag: '',
|
||||
// 目的
|
||||
purpose: '',
|
||||
//昏迷时间---入院前
|
||||
brn_damg_bfadm_coma_dura: '',
|
||||
//昏迷时间---入院后
|
||||
brn_damg_afadm_coma_dura: '',
|
||||
// 肿瘤分期
|
||||
tumorStaging: '',
|
||||
// T
|
||||
tumor_T: '',
|
||||
// N
|
||||
tumor_N: '',
|
||||
// M
|
||||
tumor_M: '',
|
||||
// 判断依据
|
||||
judgmentBase: '',
|
||||
// 分化程度
|
||||
degreeDifferentiation: '',
|
||||
// 临床路径
|
||||
enterPath: '',
|
||||
// 变异
|
||||
mutation: '',
|
||||
// 退出路径
|
||||
outPath: '',
|
||||
// 特级护理
|
||||
nursingLevel_spec: '',
|
||||
// 1级护理
|
||||
nursingLevel_1: '',
|
||||
// 2级护理
|
||||
nursingLevel_2: '',
|
||||
// 3级护理
|
||||
nursingLevel_3: '',
|
||||
// 呼吸机使用
|
||||
ventilatorUse: '',
|
||||
// 有创呼吸机使用小时
|
||||
vent_used_dura: '',
|
||||
// 手术表
|
||||
surgery_tableData: [],
|
||||
},
|
||||
// 病案首页3
|
||||
// 住院费用
|
||||
hospitalization: {
|
||||
// 总费用
|
||||
medfee_sumamt: '',
|
||||
// 自付金额
|
||||
selfpay_amt: '',
|
||||
},
|
||||
// 综合医疗服务类
|
||||
medicalServices: {
|
||||
// 一般医疗服务类
|
||||
ordn_med_servfee: '',
|
||||
// 一般治疗操作费
|
||||
ordn_trt_oprt_fee: '',
|
||||
// 护理费
|
||||
nurs_fee: '',
|
||||
// 其他费用
|
||||
com_med_serv_oth_fee: '',
|
||||
},
|
||||
// 诊断类
|
||||
diagnosisClass: {
|
||||
// 病理诊断
|
||||
palg_diag_fee: '',
|
||||
// 实验室诊断
|
||||
lab_diag_fee: '',
|
||||
// 影像学诊断
|
||||
rdhy_diag_fee: '',
|
||||
// 临床诊断
|
||||
clnc_dise_fee: '',
|
||||
},
|
||||
// 治疗类
|
||||
treatmentClass: {
|
||||
// 非手术治疗项目费
|
||||
nsrgtrt_item_fee: '',
|
||||
// 临床物理治疗
|
||||
clnc_phys_trt_fee: '',
|
||||
// 手术治疗费
|
||||
rgtrt_trt_fee: '',
|
||||
// 麻醉费
|
||||
anst_fee: '',
|
||||
// 手术费
|
||||
rgtrt_fee: '',
|
||||
},
|
||||
// 康复类
|
||||
recoveryClass: {
|
||||
// 康复费
|
||||
rhab_fee: '',
|
||||
},
|
||||
// 中医类
|
||||
TCMClass: {
|
||||
// 中医治疗费
|
||||
tcm_trt_fee: '',
|
||||
},
|
||||
// 西药类
|
||||
WesternClass: {
|
||||
// 西药费
|
||||
wm_fee: '',
|
||||
// 抗菌药物费
|
||||
abtl_medn_fee: '',
|
||||
},
|
||||
// 中药类
|
||||
chineseClass: {
|
||||
//中成药
|
||||
tcmpat_fee: '',
|
||||
// 中草药
|
||||
tcmherb_fee: '',
|
||||
},
|
||||
// 血液和血液制品类
|
||||
bloodClass: {
|
||||
// 血费
|
||||
blo_fee: '',
|
||||
// 蛋白类制品费
|
||||
albu_fee: '',
|
||||
// 球蛋白制品费
|
||||
glon_fee: '',
|
||||
// 凝血因子制品费
|
||||
clotfac_fee: '',
|
||||
// 细胞因子制品费
|
||||
cyki_fee: '',
|
||||
},
|
||||
// 耗材类
|
||||
consumablesClass: {
|
||||
// 检查用一次性医用材料费
|
||||
exam_dspo_matl_fee: '',
|
||||
// 治疗用一次性医用材料费
|
||||
trt_dspo_matl_fee: '',
|
||||
// 手术用一次性医用材料费
|
||||
oprn_dspo_matl_fee: '',
|
||||
},
|
||||
// 其他类
|
||||
otherClass: {
|
||||
// 其他费用
|
||||
oth_fee: '',
|
||||
},
|
||||
// 其他诊断及手术附加页
|
||||
other_tableData: [],
|
||||
// 手术操作数组
|
||||
surgery_tableData: [],
|
||||
});
|
||||
|
||||
export default formData;
|
||||
@@ -3,7 +3,7 @@
|
||||
<div
|
||||
class="prescription-section"
|
||||
v-for="(prescription, pIndex) in tcmPrescriptionList"
|
||||
:key="pIndex"
|
||||
:key="prescription.id"
|
||||
>
|
||||
<div class="section-header">
|
||||
<div class="title first-prescription">
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-icon
|
||||
class="add-icon"
|
||||
title="删除处方"
|
||||
@click="deletePrescription()"
|
||||
@click="deletePrescription(prescription)"
|
||||
style="font-size: 26px !important; margin-left: 10px; color: red"
|
||||
>
|
||||
<Delete />
|
||||
@@ -43,6 +43,9 @@
|
||||
<el-button type="danger" plain @click="handleDelete(pIndex)" :disabled="false">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handlePrint(pIndex)" :disabled="false">
|
||||
打印
|
||||
</el-button>
|
||||
</div>
|
||||
<div
|
||||
class="doctor-station"
|
||||
@@ -125,7 +128,6 @@
|
||||
<span class="doctor-station" style="float: right"> </span>
|
||||
</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="prescriptionRef"
|
||||
:data="prescription.prescriptionList"
|
||||
row-key="uniqueKey"
|
||||
@@ -353,7 +355,7 @@
|
||||
? formatNumber(scope.row.quantity) +
|
||||
' ' +
|
||||
scope.row.doseUnitCode_dictText +
|
||||
' (' +
|
||||
' (' +
|
||||
scope.row.chineseHerbsDoseQuantity +
|
||||
'付)'
|
||||
: ''
|
||||
@@ -397,7 +399,7 @@
|
||||
<tcmdiagnosisDialog ref="tcmDianosis" :patientInfo="props.patientInfo" @flush="getListInfo()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
@@ -419,7 +421,9 @@ import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import Decimal from 'decimal.js';
|
||||
import tcmdiagnosisDialog from './tcmdiagnosisDialog';
|
||||
import { Delete, Minus } from '@element-plus/icons-vue';
|
||||
|
||||
import { ElMessage } from 'element-plus';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import { advicePrint } from '@/api/public';
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
@@ -433,8 +437,14 @@ const encounterId = ref('');
|
||||
const accountId = ref('');
|
||||
const encounterDiagnosisId = ref('');
|
||||
|
||||
let prescriptionIdCounter = 1;
|
||||
const generatePrescriptionId = () => {
|
||||
return `prescription_${Date.now()}_${prescriptionIdCounter++}`;
|
||||
};
|
||||
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: '',
|
||||
@@ -547,6 +557,7 @@ async function getListInfo(addNewRow) {
|
||||
const groupIds = Object.keys(groupedData);
|
||||
tcmPrescriptionList.value = groupIds.map((groupId, index) => {
|
||||
const prescription = tcmPrescriptionList.value[index] || {
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
@@ -563,6 +574,10 @@ async function getListInfo(addNewRow) {
|
||||
isAdding: false,
|
||||
};
|
||||
|
||||
if (!prescription.id) {
|
||||
prescription.id = generatePrescriptionId();
|
||||
}
|
||||
|
||||
prescription.prescriptionList = groupedData[groupId];
|
||||
return prescription;
|
||||
});
|
||||
@@ -570,6 +585,7 @@ async function getListInfo(addNewRow) {
|
||||
// 如果没有处方数据,确保至少有一个空处方
|
||||
if (tcmPrescriptionList.value.length === 0) {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: contractList.value[0].accountId,
|
||||
@@ -704,6 +720,7 @@ function handleChange(value) {
|
||||
|
||||
function addNewPrescription() {
|
||||
tcmPrescriptionList.value.push({
|
||||
id: generatePrescriptionId(),
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: accountId.value,
|
||||
@@ -721,13 +738,16 @@ function addNewPrescription() {
|
||||
});
|
||||
}
|
||||
|
||||
function deletePrescription(index) {
|
||||
function deletePrescription(prescription) {
|
||||
if (tcmPrescriptionList.value.length <= 1) {
|
||||
proxy.$modal.msgError('至少保留一张处方');
|
||||
return;
|
||||
}
|
||||
|
||||
tcmPrescriptionList.value.splice(index, 1);
|
||||
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
|
||||
if (index !== -1) {
|
||||
tcmPrescriptionList.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -994,7 +1014,9 @@ function handleSaveBatch(pIndex) {
|
||||
patientId: props.patientInfo.patientId,
|
||||
requestId: item.requestId,
|
||||
groupId: item.groupId ? item.groupId : timestamp.toString(),
|
||||
|
||||
methodCode: prescription.methodCode,
|
||||
rateCode: prescription.rateCode,
|
||||
dispensePerDuration: prescription.dispensePerDuration,
|
||||
chineseHerbsDoseQuantity: prescription.chineseHerbsDoseQuantity,
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
@@ -1181,13 +1203,76 @@ function validateGroups(saveList) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async function handlePrint(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const selectedRows = prescription.prescriptionList.filter((item) => item.check);
|
||||
|
||||
if (selectedRows.length === 0) {
|
||||
ElMessage.warning('请先选择要打印的处方');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否有待签发或已退费的记录
|
||||
const invalidRows = selectedRows.filter(
|
||||
(item) => item.statusEnum === 1 || item.chargeStatus === 8
|
||||
);
|
||||
|
||||
if (invalidRows.length > 0) {
|
||||
ElMessage.warning('待签发和已退费的项目不能打印,请重新选择');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const performPrint = async (rows) => {
|
||||
const requestIds = rows.map((item) => item.requestId).join(',');
|
||||
console.log('中药处方打印开始', requestIds);
|
||||
|
||||
const apiParams = { requestIds, isPrescription: '1' };
|
||||
const res = await advicePrint(apiParams);
|
||||
|
||||
const groupedRows = {};
|
||||
res.data.adviceItemList.forEach((row) => {
|
||||
const prescriptionNo = row.prescriptionNo;
|
||||
if (!groupedRows[prescriptionNo]) {
|
||||
groupedRows[prescriptionNo] = [];
|
||||
}
|
||||
row.contractName = res.data.contractName;
|
||||
groupedRows[prescriptionNo].push(row);
|
||||
});
|
||||
|
||||
const groupedArray = Object.values(groupedRows);
|
||||
const result = groupedArray.map((group) => ({
|
||||
...res.data,
|
||||
|
||||
// 药费
|
||||
medTotalAmount:
|
||||
'¥' + group.reduce((sum, item) => sum + (item.totalPrice || 0), 0).toFixed(2) + '元',
|
||||
|
||||
prescriptionList: group,
|
||||
}));
|
||||
|
||||
// 使用中药医生处方打印模板
|
||||
return { result, template: PRINT_TEMPLATE.DOC_CHINESE_MEDICINE_PRESCRIPTION };
|
||||
};
|
||||
|
||||
// 执行打印
|
||||
const { result, template } = await performPrint(selectedRows);
|
||||
printUtils.print(template, result);
|
||||
ElMessage.success('中药处方打印成功');
|
||||
} catch (error) {
|
||||
console.error('中药处方打印过程出错:', error);
|
||||
ElMessage.error('中药处方打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -1229,9 +1314,11 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.doctor-station {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
@@ -1293,4 +1380,4 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.add-icon:hover {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="personal-info-container">
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
<el-text tclass="name" width="auto">病历号:</el-text>
|
||||
<el-text tclass="name" width="auto">
|
||||
{{ item.busNo ? item.busNo : '-' }}
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@@ -90,7 +100,9 @@
|
||||
' / ' +
|
||||
patientInfo.contractName +
|
||||
'/' +
|
||||
patientInfo.phone
|
||||
patientInfo.phone +
|
||||
'/' +
|
||||
patientInfo.busNo
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
@@ -117,17 +129,7 @@
|
||||
>
|
||||
处方单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="
|
||||
() => {
|
||||
openDialog = true;
|
||||
}
|
||||
"
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="onHospitalization"> 办理住院 </el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -146,7 +148,7 @@
|
||||
@emrSaved="handleEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="病历" name="emr">
|
||||
<!-- <el-tab-pane label="病历" name="emr">
|
||||
<Emr
|
||||
:patientInfo="patientInfo"
|
||||
ref="emrRef"
|
||||
@@ -156,7 +158,7 @@
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="诊断" name="diagnosis">
|
||||
<Diagnosis
|
||||
:patientInfo="patientInfo"
|
||||
@@ -179,10 +181,12 @@
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="电子处方" name="eprescription">
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
-->
|
||||
<el-tab-pane label="报告查询" name="reportQuery">
|
||||
<ReportQuery :patientInfo="patientInfo" ref="reportQueryRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
@@ -200,6 +204,7 @@
|
||||
:open="openDialog"
|
||||
:patientInfo="patientInfo"
|
||||
:encounterId="currentEncounterId"
|
||||
:mainDiagnosis="mainDiagnosis"
|
||||
@close="openDialog = false"
|
||||
/>
|
||||
<PrescriptionInfo
|
||||
@@ -217,13 +222,16 @@ import {
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
isHospitalization,
|
||||
getEncounterDiagnosis,
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
import ReportQuery from './components/reportQuery.vue';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import Diagnosis from './components/diagnosis/diagnosis.vue';
|
||||
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
// import eprescriptionlist from './components/eprescriptionlist.vue';
|
||||
import eprescriptionlist from './components/eprescriptionlist.vue';
|
||||
import HospitalizationDialog from './components/hospitalizationDialog.vue';
|
||||
import tcmAdvice from './components/tcm/tcmAdvice.vue';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
@@ -231,6 +239,7 @@ import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -264,7 +273,7 @@ const currentEncounterId = ref('');
|
||||
const emits = defineEmits(['click']);
|
||||
// const activeTab = ref('emr');
|
||||
const activeTab = ref('hospitalizationEmr');
|
||||
|
||||
const mainDiagnosis = ref(null);
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const prescriptionInfo = ref([]);
|
||||
@@ -311,7 +320,7 @@ const shortcuts = [
|
||||
},
|
||||
];
|
||||
|
||||
// const eprescriptionRef = ref();
|
||||
const eprescriptionRef = ref();
|
||||
onMounted(() => {
|
||||
getWaitPatient();
|
||||
});
|
||||
@@ -351,9 +360,9 @@ function handleClick(tab) {
|
||||
case 'tcm':
|
||||
tcmRef.value.getDiagnosisInfo();
|
||||
break;
|
||||
// case 'eprescription':
|
||||
// eprescriptionRef.value.getList();
|
||||
// break;
|
||||
case 'eprescription':
|
||||
eprescriptionRef.value.getList();
|
||||
break;
|
||||
}
|
||||
// if (tab != 'emr') {
|
||||
// if (!saveStatus.value) {
|
||||
@@ -373,6 +382,14 @@ function handleClick(tab) {
|
||||
function getEnPrescription(encounterId) {
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
@@ -405,8 +422,8 @@ function handleCardClick(item, index) {
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
diagnosisRef.value.getList();
|
||||
// eprescriptionRef.value.getList();
|
||||
emrRef.value.getDetail(item.encounterId);
|
||||
eprescriptionRef.value.getList();
|
||||
// emrRef.value.getDetail(item.encounterId);
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 200);
|
||||
@@ -457,6 +474,35 @@ function handleEmrSaved(isSaved) {
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
// 判断是否已经入院登记
|
||||
const onHospitalization = async () => {
|
||||
const diagnosisRes = await getEncounterDiagnosis(patientInfo.value.encounterId);
|
||||
const hasDiagnosis = diagnosisRes.data?.length > 0;
|
||||
if (!hasDiagnosis) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者暂无诊断信息,无法办理住院!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
const mainDiag = diagnosisRes.data.find((item) => item.maindiseFlag === 1);
|
||||
if (!mainDiag) {
|
||||
ElMessage({ type: 'error', message: '该患者暂无主诊断信息,无法办理住院!' });
|
||||
return;
|
||||
}
|
||||
mainDiagnosis.value = mainDiag;
|
||||
const res = await isHospitalization({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
});
|
||||
if (!res.data) {
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者,已办理入院,不允许重复办理',
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"top": 16.5,
|
||||
"height": 22.5,
|
||||
"width": 120,
|
||||
"title": "长春大学医院",
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontFamily": "Microsoft YaHei",
|
||||
@@ -614,4 +614,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<div class="med-summary-container">
|
||||
<div style="width: 40%">
|
||||
<el-card style="height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单' }}
|
||||
</template>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<el-input style="width: 250px" v-model="queryParams.searchKey" placeholder="单据号">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getSummaryList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
placeholder="发放状态"
|
||||
style="width: 250px; margin-left: 10px"
|
||||
v-model="queryParams.therapyEnum"
|
||||
@change="getSummaryList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnumOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div>
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 510px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
@change="getSummaryList"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain @click="handleSend">批量发药</el-button>
|
||||
<el-button type="warning" plain>批量作废</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="summaryList"
|
||||
max-height="85vh"
|
||||
border
|
||||
ref="summaryTableRef"
|
||||
highlight-current-row
|
||||
@row-click="getDetails"
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column prop="busNo" label="单据号" align="center" width="150" />
|
||||
<el-table-column prop="applicantName" label="申请人" align="center" width="100" />
|
||||
<el-table-column prop="locationName" label="发药药房" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="状态" align="center" />
|
||||
<el-table-column prop="applyTime" label="汇总日期" align="center" width="140">
|
||||
<template #default="scope">
|
||||
{{ scope.row.applyTime ? parseTime(scope.row.applyTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleSend(scope.row)">发药</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- <el-row :gutter="10" justify="end" align="middle" style="margin-bottom: 10px">
|
||||
<el-button type="danger" plain icon="Refresh" @click="handleSendDrug" :disabled="!busNo">
|
||||
发药
|
||||
</el-button>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport" :disabled="!busNo">
|
||||
导出
|
||||
</el-button>
|
||||
</el-row> -->
|
||||
<div style="width: 59%">
|
||||
<el-card style="height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单详情' }}
|
||||
</template>
|
||||
<el-table
|
||||
:data="summaryDetailsData"
|
||||
style="width: 100%"
|
||||
border
|
||||
v-loading="loading"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column prop="itemName" label="项目名称" min-width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalVolume" label="规格" min-width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalVolume || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotNumber" label="批次号" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.lotNumber || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量" min-width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemQuantity + ' ' + scope.row.minUnitCode_dictText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="categoryCode_dictText" label="药品类型" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.categoryCode_dictText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="manufacturerText"
|
||||
label="生产厂家"
|
||||
min-width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.manufacturerText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { totalSendDrug, getFromSummaryList, getFromSummaryDetails } from './api.js';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const summaryList = ref([]);
|
||||
const queryParams = ref({
|
||||
applyTime: [
|
||||
proxy.formatDateStr(new Date().setMonth(new Date().getMonth() - 1), 'YYYY-MM-DD'),
|
||||
proxy.formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
],
|
||||
});
|
||||
|
||||
// 定义组件属性
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
selectedId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
busNo: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const selectedRows = ref([]);
|
||||
const summaryDetailsData = ref([]);
|
||||
// 定义loading状态
|
||||
const loading = ref(false);
|
||||
|
||||
getSummaryList();
|
||||
// 获取汇总单信息
|
||||
function getSummaryList() {
|
||||
queryParams.value.applyTimeSTime = queryParams.value.applyTime[0] + ' 00:00:00';
|
||||
queryParams.value.applyTimeETime = queryParams.value.applyTime[1] + ' 23:59:59';
|
||||
getFromSummaryList(queryParams.value).then((res) => {
|
||||
summaryList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function getDetails(row) {
|
||||
loading.value = true;
|
||||
getFromSummaryDetails({ summaryNo: row.busNo }).then((res) => {
|
||||
summaryDetailsData.value = res.data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 发药
|
||||
function handleSend(row) {
|
||||
let sendList = [];
|
||||
if (row.busNo) {
|
||||
sendList.push(row.busNo);
|
||||
} else {
|
||||
proxy.$refs['summaryTableRef'].getSelectionRows().forEach((item) => {
|
||||
sendList.push(item.busNo);
|
||||
});
|
||||
}
|
||||
console.log(sendList);
|
||||
|
||||
totalSendDrug(sendList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getSummaryList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 定义暴露给父组件的数据和方法
|
||||
defineExpose({
|
||||
selectedRows,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.med-summary-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.medicationTableDetail {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.buttonGroup {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 10px 0;
|
||||
gap: 10px;
|
||||
margin-right: 20px;
|
||||
|
||||
:deep(.el-button) {
|
||||
padding: 6px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 左侧患者列表 -->
|
||||
<el-card class="patient-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>患者列表</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
|
||||
@keyup.enter="getEncounterList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getEncounterList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.refundEnum"
|
||||
style="width: 48%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getEncounterList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 85%; margin-bottom: 10px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placement="bottom"
|
||||
@change="getEncounterList"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="getEncounterList"
|
||||
style="margin-bottom: 10px; margin-left: 18px"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="encounterList"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
highlight-current-row
|
||||
@cell-click="handleGetReturnDrugList"
|
||||
>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="genderEnum_enumText"
|
||||
align="center"
|
||||
label="性别"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<!-- 右侧退药列表 -->
|
||||
<el-card class="refund-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>退药单</span>
|
||||
<!-- <div v-if="selectedPatient">
|
||||
<span class="patient-info">{{ selectedPatient.name }}</span>
|
||||
<el-tag type="info">{{ selectedPatient.visitNo }}</el-tag>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!selectedMedicines.length"
|
||||
@click="handleReturnDrug(undefined)"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
确认退药
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
|
||||
<el-table
|
||||
ref="returnDrugRef"
|
||||
:data="returDrugList"
|
||||
style="width: 100%"
|
||||
height="calc(100vh - 300px)"
|
||||
border
|
||||
@select="handleSelection"
|
||||
@selection-change="handelSelectRows"
|
||||
:span-method="handelSpanMethod"
|
||||
class="no-hover-table"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
|
||||
<el-table-column
|
||||
prop="totalPrice"
|
||||
label="总价"
|
||||
width="100"
|
||||
align="right"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotNumber" label="批号" width="180" align="center" />
|
||||
<el-table-column prop="traceNo" label="追溯码" width="180" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.traceNo" placeholder="请输入追溯码" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.refundEnum_enumText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.quantity
|
||||
? Math.abs(scope.row.quantity) + ' ' + scope.row.unitCode_dictText
|
||||
: '0' + ' ' + scope.row.unitCode_dictText
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-popconfirm
|
||||
width="150"
|
||||
hide-after="10"
|
||||
title="操作确认"
|
||||
placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" link :disabled="scope.row.refundEnum != 16">
|
||||
退药
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<div class="footer">
|
||||
<div class="statistics">
|
||||
<span>已选 {{ selectedMedicines.length }} 种药品</span>
|
||||
<span class="total">合计金额:¥ {{ totalAmount.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<TraceNoDialog
|
||||
:ypName="ypName"
|
||||
:openDialog="openTraceNoDialog"
|
||||
@submit="submit"
|
||||
@cancel="openTraceNoDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ReturnDrug">
|
||||
import { getCurrentInstance, nextTick } from 'vue';
|
||||
import { getList, getReturnDrugList, returnDrug, init, itemTraceNo } from './api';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { debounce } from 'lodash-es';
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
refundEnum: 16,
|
||||
classEnum: 1,
|
||||
});
|
||||
const openTraceNo = ref(false);
|
||||
const traceNoList = ref([]);
|
||||
const traceNo = ref('');
|
||||
const encounterList = ref([]);
|
||||
const encounterId = ref('');
|
||||
const returDrugList = ref([]);
|
||||
const selectedMedicines = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const dateRange = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const traceNoTemp = ref('');
|
||||
const traceNoTempRef = ref();
|
||||
const totalAmount = ref(0);
|
||||
const openTraceNoDialog = ref(false);
|
||||
const ypName = ref('');
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
getEncounterList();
|
||||
function getEncounterList() {
|
||||
queryParams.value.receptionTimeSTime = dateRange.value[0] + ' 00:00:00';
|
||||
queryParams.value.receptionTimeETime = dateRange.value[1] + ' 23:59:59';
|
||||
getList(queryParams.value).then((res) => {
|
||||
encounterList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
initOptions();
|
||||
function initOptions() {
|
||||
init().then((res) => {
|
||||
statusOptions.value = res.data.refundStatusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
function handleGetReturnDrugList(row) {
|
||||
encounterId.value = row.encounterId;
|
||||
getReturnDrugList({
|
||||
encounterId: row.encounterId,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
}).then((res) => {
|
||||
returDrugList.value = res.data;
|
||||
});
|
||||
}
|
||||
function handleScan() {
|
||||
openTraceNoDialog.value = true;
|
||||
}
|
||||
function submit(value) {
|
||||
let list = [];
|
||||
if (value) {
|
||||
list = value.split(',');
|
||||
}
|
||||
itemTraceNo(list).then((res) => {
|
||||
if (res.code === 200) {
|
||||
returDrugList.value.forEach((item, index) => {
|
||||
if (res.data[item.itemId] && res.data[item.itemId].split(',') > item.quantity) {
|
||||
proxy.$modal.msgWarning('操作失败');
|
||||
return;
|
||||
}
|
||||
returDrugList.value[index].traceNo = res.data[item.itemId];
|
||||
});
|
||||
openTraceNoDialog.value = false;
|
||||
// proxy.$modal.msgSuccess('退药成功');
|
||||
// getReturnDrugList(encounterId.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(handelTraceNo, 500);
|
||||
|
||||
let inputValue = '';
|
||||
function handelTraceNo(value) {
|
||||
traceNoList.value.push(value);
|
||||
traceNo.value = traceNo.value + '[' + traceNoList.value.length + ']' + ' ' + value + '\n';
|
||||
traceNoTemp.value = '';
|
||||
// let saveValue = value.substring(inputValue.length + 5, value.length);
|
||||
// inputValue = value;
|
||||
// console.log(value);
|
||||
// console.log(saveValue);
|
||||
// traceNoList.value.push(saveValue);
|
||||
// traceNo.value = value + '[' + (traceNoList.value.length + 1) + ']' + ' ';
|
||||
}
|
||||
|
||||
function handleClear() {
|
||||
traceNo.value = '';
|
||||
traceNoList.value = [];
|
||||
}
|
||||
function cancel() {
|
||||
openTraceNo.value = false;
|
||||
traceNoList.value = [];
|
||||
traceNo.value = '';
|
||||
}
|
||||
/**
|
||||
* 退药
|
||||
*/
|
||||
function handleReturnDrug(row) {
|
||||
console.log(row);
|
||||
let saveList = [];
|
||||
if (row) {
|
||||
saveList = returDrugList.value
|
||||
.filter((item) => item.requestId == row.requestId)
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
saveList = proxy.$refs.returnDrugRef.getSelectionRows().map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: item.serviceTable,
|
||||
traceNo: item.traceNo,
|
||||
};
|
||||
});
|
||||
console.log(saveList);
|
||||
}
|
||||
returnDrug(saveList).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('退药成功');
|
||||
getEncounterList();
|
||||
getReturnDrugList({
|
||||
encounterId: encounterId.value,
|
||||
refundStatus: queryParams.value.refundEnum,
|
||||
}).then((res) => {
|
||||
returDrugList.value = res.data;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
function handleSelection(selection, row) {
|
||||
const isSelected = selection.some((item) => item.dispenseId === row.dispenseId);
|
||||
returDrugList.value
|
||||
.filter((item) => {
|
||||
return item.requestId == row.requestId;
|
||||
})
|
||||
.forEach((row) => {
|
||||
proxy.$refs['returnDrugRef'].toggleRowSelection(row, isSelected);
|
||||
});
|
||||
nextTick(() => {
|
||||
selectedMedicines.value = proxy.$refs['returnDrugRef'].getSelectionRows();
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function handelSelectRows(selection) {
|
||||
selectedMedicines.value = selection;
|
||||
totalAmount.value = selectedMedicines.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 根据 requestId 合并相同行的方法(只合并药品名称和总价列)
|
||||
function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 定义需要合并的列索引
|
||||
// 1: 药品名称列, 2: 总价列
|
||||
const mergeColumns = [1, 2, 5, 7, 8];
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
const currentRequestId = row.requestId;
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
let rowspan = 1;
|
||||
let colspan = 1;
|
||||
|
||||
// 向上查找相同 requestId 的行
|
||||
let startIndex = rowIndex;
|
||||
while (startIndex > 0 && returDrugList.value[startIndex - 1].requestId === currentRequestId) {
|
||||
startIndex--;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
let endIndex = rowIndex;
|
||||
while (
|
||||
endIndex < returDrugList.value.length - 1 &&
|
||||
returDrugList.value[endIndex + 1].requestId === currentRequestId
|
||||
) {
|
||||
endIndex++;
|
||||
rowspan++;
|
||||
}
|
||||
|
||||
// 只有当 rowspan > 1 时才进行合并
|
||||
return rowspan > 1 ? [rowspan, colspan] : [1, 1];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
height: 80vh;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.patient-list {
|
||||
width: 600px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.refund-list {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.patient-item {
|
||||
padding: 12px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #ecf5ff;
|
||||
border-left: 4px solid #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.patient-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.name {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.visit-no {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.visit-time {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
|
||||
.total {
|
||||
margin-left: 20px;
|
||||
color: #f56c6c;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.el-textarea .el-textarea__inner {
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
:deep(.no-hover-table) .el-table__body tr:hover > td {
|
||||
background: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,26 +1,35 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取病区下拉选
|
||||
export function getPractitionerWard (queryParams) {
|
||||
return request ({
|
||||
export function getPractitionerWard(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院汇总发药单左侧
|
||||
export function getFromSummaryList (queryParams) {
|
||||
return request ({
|
||||
url: 'pharmacy-manage/summary-dispense-medicine/from_summary-list',
|
||||
// 住院汇总发药单左侧,汇总单列表
|
||||
export function getFromSummaryList(queryParams) {
|
||||
return request({
|
||||
url: 'nurse-station/medicine-summary/summary-form',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 汇总发药单详情
|
||||
export function getFromSummaryDetails(queryParams) {
|
||||
return request({
|
||||
url: 'nurse-station/medicine-summary/summary-form-detail',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院汇总发药单右侧
|
||||
export function getFromDetailList (queryParams) {
|
||||
return request ({
|
||||
export function getFromDetailList(queryParams) {
|
||||
return request({
|
||||
url: 'pharmacy-manage/summary-dispense-medicine/from-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -28,16 +37,16 @@ export function getFromDetailList (queryParams) {
|
||||
}
|
||||
|
||||
// 明细左侧
|
||||
export function getEncounterList (queryParams) {
|
||||
return request ({
|
||||
export function getEncounterList(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/encounter-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
//明细 右侧
|
||||
export function getMedicationSummaryDetail (queryParams) {
|
||||
return request ({
|
||||
export function getMedicationSummaryDetail(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medication_summary-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -48,8 +57,8 @@ export function getMedicationSummaryDetail (queryParams) {
|
||||
/**
|
||||
* 获取住院患者列表
|
||||
*/
|
||||
export function getPatientList (queryParams) {
|
||||
return request ({
|
||||
export function getPatientList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -59,8 +68,8 @@ export function getPatientList (queryParams) {
|
||||
/**
|
||||
* 获取当前登录人管理病区
|
||||
*/
|
||||
export function getWardList (queryParams) {
|
||||
return request ({
|
||||
export function getWardList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/practitioner-ward',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -70,8 +79,8 @@ export function getWardList (queryParams) {
|
||||
/**
|
||||
* 获取当前选中患者全部医嘱
|
||||
*/
|
||||
export function getPrescriptionList (queryParams) {
|
||||
return request ({
|
||||
export function getPrescriptionList(queryParams) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/inpatient-advice',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
@@ -81,8 +90,8 @@ export function getPrescriptionList (queryParams) {
|
||||
/**
|
||||
* 执行医嘱
|
||||
*/
|
||||
export function adviceExecute (data) {
|
||||
return request ({
|
||||
export function adviceExecute(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-execute',
|
||||
method: 'post',
|
||||
data: data,
|
||||
@@ -92,8 +101,8 @@ export function adviceExecute (data) {
|
||||
/**
|
||||
* 取消执行医嘱
|
||||
*/
|
||||
export function adviceCancel (data) {
|
||||
return request ({
|
||||
export function adviceCancel(data) {
|
||||
return request({
|
||||
url: '/nurse-station/advice-process/advice-cancel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
@@ -104,8 +113,8 @@ export function adviceCancel (data) {
|
||||
* 明细发药
|
||||
*
|
||||
*/
|
||||
export function totalSendDrug (data) {
|
||||
return request ({
|
||||
export function totalSendDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/summary-dispense-medicine',
|
||||
method: 'put',
|
||||
data: data,
|
||||
@@ -114,10 +123,170 @@ export function totalSendDrug (data) {
|
||||
/**
|
||||
* 明细退药
|
||||
*/
|
||||
export function totalReturnDrug (data) {
|
||||
return request ({
|
||||
export function totalReturnDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/summary-dispense-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------门诊发药接口------------------------------------------------------------
|
||||
export function listPatient(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/encounter-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function devicePatientList(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/encounter-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function listInit(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/init',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function listWesternmedicine(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-order',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function updateMedicion(prescriptionList) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense',
|
||||
method: 'put',
|
||||
data: prescriptionList
|
||||
})
|
||||
}
|
||||
export function prepareMedicion(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/prepare',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function backMedicion(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//扫码枪返回追溯码筛选
|
||||
export function itemTraceNo(params) {
|
||||
return request({
|
||||
url: '/app-common/item-trace-no?traceNoList=' + params,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材查询列表
|
||||
*/
|
||||
export function getReportRegisterInit(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-order',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材发药
|
||||
*/
|
||||
export function deviceDispense(params) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-dispense',
|
||||
method: 'put',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材作废
|
||||
*/
|
||||
export function deviceInvalid(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/device-cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 跨批次发药匹配批号
|
||||
*/
|
||||
export function medicineMatch(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/western-medicine-dispense/medicine-match',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// ----------------------------------------------门诊退药接口----------------------------------------------------------------------
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/return-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取退药列表
|
||||
*/
|
||||
export function getReturnDrugList(params) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退药
|
||||
*/
|
||||
export function returnDrug(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// //扫码枪返回追溯码筛选
|
||||
// export function itemTraceNo(params) {
|
||||
// return request({
|
||||
// url: '/app-common/item-trace-no?traceNoList=' + params,
|
||||
// method: 'get',
|
||||
// })
|
||||
// }
|
||||
|
||||
@@ -1,184 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20" style="margin-bottom: 20px">
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-button
|
||||
:type="selectType === 'total' ? 'primary' : 'default'"
|
||||
@click="handleSelectType('total')"
|
||||
>汇总</el-button
|
||||
>
|
||||
<el-button
|
||||
:type="selectType === 'drug' ? 'primary' : 'default'"
|
||||
@click="handleSelectType('drug')"
|
||||
>发药</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="18" :xs="24">
|
||||
<el-form ref="queryParams" label-width="100px" :model="queryParams" :inline="true">
|
||||
<el-form-item label="窗口" prop="windowDataText" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.windowDataText"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in windowData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="摆药单" prop="medicationListText" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.medicationListText"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in medicationList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="范围" prop="time" label-width="100px">
|
||||
<el-radio-group v-model="queryParams.timeRange">
|
||||
<el-radio v-for="(item, index) in timeRangeList" :key="index" :value="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="time" label-width="100px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="datetimerange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="left-container">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form
|
||||
:model="queryParamsPatient"
|
||||
ref="queryRef"
|
||||
v-show="showSearch"
|
||||
label-width="120"
|
||||
inline="true"
|
||||
>
|
||||
<el-form-item label="患者信息" prop="searchKey" label-width="120">
|
||||
<el-input
|
||||
v-model="queryParamsPatient.searchKey"
|
||||
placeholder="请输入姓名/证件号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="发药状态"
|
||||
prop="statusEnum"
|
||||
v-if="selectType !== 'drug'"
|
||||
label-width="120"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParamsPatient.statusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dispenseStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="border-radius: 4px">
|
||||
<el-col :span="24">
|
||||
<el-table
|
||||
:data="patientList"
|
||||
border
|
||||
highlight-current-row
|
||||
style="height: cal(100%-200px); width: 100%"
|
||||
@row-click="handleCurrentChange"
|
||||
>
|
||||
<!-- 汇总状态下显示的字段 -->
|
||||
<template v-if="selectType === 'total'">
|
||||
<el-table-column prop="applicantName" label="申请人" align="center" />
|
||||
<el-table-column prop="sourceLocationName" label="发药药房" align="center" />
|
||||
<el-table-column prop="statusEnum_enumText" label="状态" align="center" />
|
||||
<el-table-column prop="applyTime" label="申请日期" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.applyTime ? parseTime(scope.row.applyTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<!-- 明细状态下显示的字段 -->
|
||||
<template v-else>
|
||||
<el-table-column prop="patientName" label="姓名" align="center" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="startTime" label="就诊日期" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.startTime ? parseTime(scope.row.startTime, '{y}-{m}-{d}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="24" style="padding: 10px 12px 12px 12px">
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="18" :xs="24">
|
||||
<!-- 根据当前选中的tab显示不同的表格组件 -->
|
||||
<MedicationTable v-if="selectType === 'total'" :tableData="tableData" :busNo="busNo" />
|
||||
<DetailMedicationTable
|
||||
v-else-if="selectType === 'drug'"
|
||||
:tableData="detailTableData"
|
||||
:encounterId="encounterId"
|
||||
@call-medication-summary-detail="callMedicationSummaryDetail"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="app-container" style="padding-top: 0px">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" class="centered-tabs tabs-font">
|
||||
<el-tab-pane label="发药汇总单" name="summary">
|
||||
<MedicationSummary />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发药明细单" name="detail">
|
||||
<MedicationDetails />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="住院退药" name="return">
|
||||
<ReturnDrug />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -186,6 +18,9 @@
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import MedicationTable from './components/MedicationTable.vue';
|
||||
import MedicationSummary from './components/MedicationSummary.vue';
|
||||
import MedicationDetails from './components/MedicationDetails.vue';
|
||||
import ReturnDrug from './components/ReturnDrug.vue';
|
||||
import DetailMedicationTable from './components/DetailMedicationTable.vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import {
|
||||
@@ -195,7 +30,7 @@ import {
|
||||
getFromDetailList,
|
||||
} from './components/api';
|
||||
|
||||
// 响应式数据
|
||||
const activeName = ref('summary');
|
||||
const loading = ref(false);
|
||||
const patientList = ref([]);
|
||||
const total = ref(0);
|
||||
@@ -453,4 +288,19 @@ onMounted(() => {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav-wrap) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.centered-tabs :deep(.el-tabs__nav-scroll) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__item) {
|
||||
font-size: 16px !important;
|
||||
padding: 0 60px !important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,16 +1,20 @@
|
||||
<template>
|
||||
<div style="width: 100%" class="medicalSec">
|
||||
<div style="margin-bottom: 5px;margin-top: 20px;">
|
||||
<el-button type="primary" @click="addItem" :disabled="false">
|
||||
新增
|
||||
</el-button>
|
||||
<div style="margin-bottom: 5px; margin-top: 20px">
|
||||
<el-button type="primary" @click="addItem" :disabled="false"> 新增 </el-button>
|
||||
<el-button type="danger" plain @click="handleDelete" :disabled="false"> 删除 </el-button>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="tableBoxInner">
|
||||
<div :class="{'borderBottom':!tableData_top.length}" class="tableBoxItemHeader">
|
||||
<div
|
||||
:class="{ borderBottom: !formData.medicalSecond.surgery_tableData.length }"
|
||||
class="tableBoxItemHeader"
|
||||
>
|
||||
<div class="item itemIndex">
|
||||
<div :class="{'itemCheckBox':!isChooseAll,'itemCheckBoxAct':isChooseAll}" @click="chooseAll">
|
||||
<div
|
||||
:class="{ itemCheckBox: !isChooseAll, itemCheckBoxAct: isChooseAll }"
|
||||
@click="chooseAll"
|
||||
>
|
||||
<span v-show="isChooseAll">✓</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,11 +22,13 @@
|
||||
<div class="item itemSurgeryLevel">手术级别</div>
|
||||
<div class="item itemSurgeryName">手术及操作名称</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec" style="width: 100%;border-bottom: 1px solid #ebeef5;">手术及操作医师</div>
|
||||
<div class="spec" style="width: 100%; border-bottom: 1px solid #ebeef5">
|
||||
手术及操作医师
|
||||
</div>
|
||||
<div class="spec">
|
||||
<div class="specItem">术者</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5;">Ⅰ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5;">Ⅱ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5">Ⅰ助</div>
|
||||
<div class="specItem" style="border-left: 1px solid #ebeef5">Ⅱ助</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">切口愈合等级</div>
|
||||
@@ -31,82 +37,85 @@
|
||||
<div class="item itemTime borderRight">手术时长(H)</div>
|
||||
</div>
|
||||
<div
|
||||
class="tableBoxItem"
|
||||
:class="{'borderBottom':index+1===tableData_top.length}"
|
||||
v-for="(item,index) in tableData_top"
|
||||
:key="index">
|
||||
class="tableBoxItem"
|
||||
:class="{ borderBottom: index + 1 === formData.medicalSecond.surgery_tableData.length }"
|
||||
v-for="(item, index) in formData.medicalSecond.surgery_tableData"
|
||||
:key="index"
|
||||
>
|
||||
<div class="item itemIndex">
|
||||
<div :class="{'itemCheckBox':!item['isChoose'],'itemCheckBoxAct':item['isChoose']}" @click="checkItem(item)">
|
||||
<div
|
||||
:class="{ itemCheckBox: !item['isChoose'], itemCheckBoxAct: item['isChoose'] }"
|
||||
@click="checkItem(item, false)"
|
||||
>
|
||||
<span v-show="item['isChoose']">✓</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemDate">
|
||||
<el-date-picker
|
||||
v-model="item.ctrlDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="手术操作日期"
|
||||
:default-time="item.ctrlDate"
|
||||
v-model="item.oprn_oprt_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="手术操作日期"
|
||||
/>
|
||||
</div>
|
||||
<div class="item itemSurgeryLevel">
|
||||
<el-select v-model="item.surgeryLevel" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.oprn_lv_code" placeholder="请选择手术级别">
|
||||
<el-option
|
||||
v-for="item in item['surgeryLevelArr']"
|
||||
:key="item.value"
|
||||
:label="item.title"
|
||||
:value="item.value"
|
||||
v-for="item in surgeryLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemSurgeryName">
|
||||
<el-input v-model="item.surgeryName"></el-input>
|
||||
<el-input v-model="item.oprn_oprt_name"></el-input>
|
||||
</div>
|
||||
<div class="itemSpec">
|
||||
<div class="spec_">
|
||||
<div class="specItem" style="padding: 10px;">
|
||||
<el-input v-model="item.surgeryMasterName"></el-input>
|
||||
<div class="specItem" style="padding: 10px">
|
||||
<el-input v-model="item.oper_name"></el-input>
|
||||
</div>
|
||||
<div class="specItem" style="padding: 10px;border-left: 1px solid #ebeef5;">
|
||||
<el-input v-model="item.surgeryMasterName_1"></el-input>
|
||||
<div class="specItem" style="padding: 10px; border-left: 1px solid #ebeef5">
|
||||
<el-input v-model="item.asit_1_name"></el-input>
|
||||
</div>
|
||||
<div class="specItem" style="padding: 10px;border-left: 1px solid #ebeef5;">
|
||||
<el-input v-model="item.surgeryMasterName_2"></el-input>
|
||||
<div class="specItem" style="padding: 10px; border-left: 1px solid #ebeef5">
|
||||
<el-input v-model="item.asit_name2"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.cutLevel">
|
||||
<el-select v-model="item.sinc_heal_lv_code">
|
||||
<el-option
|
||||
v-for="item in item['cutLevelArr']"
|
||||
:key="item.value"
|
||||
:label="item.title"
|
||||
:value="item.value"
|
||||
v-for="item in cutLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.anesthesiaType" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.anst_mtd_code" placeholder="请选择麻醉方式">
|
||||
<el-option
|
||||
v-for="item in operationLevelList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in anesthesiaTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemCutLevel">
|
||||
<el-select v-model="item.anesthesiaLevel" placeholder="请选择手术级别">
|
||||
<el-select v-model="item.anst_lv_code" placeholder="请选择麻醉分级">
|
||||
<el-option
|
||||
v-for="item in item.anesthesiaLevelArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in anesthesiaLevelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item itemTime borderRight">
|
||||
<el-input v-model="item.surgeryTime"></el-input>
|
||||
<el-input v-model="item.oprn_con_time"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,96 +123,147 @@
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>手术方式:</label>
|
||||
<el-select v-model="formData['surgeryType']">
|
||||
<el-option v-for="(item,index) in formData['surgeryTypeArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="formData.medicalSecond.surgeryType">
|
||||
<el-option
|
||||
v-for="item in surgeryTypeOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>离院方式:</label>
|
||||
<el-select v-model="formData['leaveType']">
|
||||
<el-option v-for="(item,index) in formData['leaveTypeArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.dscg_way">
|
||||
<el-option
|
||||
v-for="item in leaveTypeOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>是否有出院31天内再住院计划:</label>
|
||||
<el-select v-model="formData['isPlan']">
|
||||
<el-option v-for="(item,index) in formData['isPlanArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.dscg_31days_rinp_flag">
|
||||
<el-option
|
||||
v-for="item in isPlanOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>目的:</label>
|
||||
<el-input v-model="formData['purpose']"></el-input>
|
||||
<el-input v-model="formData.medicalSecond.purpose" placeholder="请填写目的"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>颅脑损伤患者昏迷时间-入院前:</label>
|
||||
<el-input type="date" v-model="formData['comaDurationTime_before']" />
|
||||
<el-input type="date" v-model="formData.medicalSecond.brn_damg_bfadm_coma_dura" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>入院后:</label>
|
||||
<el-input type="date" v-model="formData['comaDurationTime_after']" />
|
||||
<el-input type="date" v-model="formData.medicalSecond.brn_damg_afadm_coma_dura" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>肿瘤分期:</label>
|
||||
<el-select v-model="formData['tumorStaging']">
|
||||
<el-option v-for="(item,index) in formData['tumorStagingArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.tumorStaging">
|
||||
<el-option
|
||||
v-for="item in tumorStagingOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>T:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_T']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_T"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>N:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_N']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_N"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label>M:</label>
|
||||
<label class="form-item-specLabel"><div class="specLabelInner" style="width: 80px;margin: 0 8px 0 0;"><el-input v-model="formData['tumor_M']"></el-input></div> </label>
|
||||
<label class="form-item-specLabel"
|
||||
><div class="specLabelInner" style="width: 80px; margin: 0 8px 0 0">
|
||||
<el-input v-model="formData.medicalSecond.tumor_M"></el-input>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>判断依据:</label>
|
||||
<el-select v-model="formData['judgmentBase']">
|
||||
<el-option v-for="(item,index) in formData['judgmentBaseArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.judgmentBase">
|
||||
<el-option
|
||||
v-for="item in judgmentBaseOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>分化程度:</label>
|
||||
<el-input type="date" v-model="formData['degreeDifferentiation']" />
|
||||
<el-input type="date" v-model="formData.medicalSecond.degreeDifferentiation" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>临床路径-进入路径:</label>
|
||||
<el-select v-model="formData['enterPath']">
|
||||
<el-option v-for="(item,index) in formData['enterPathArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.enterPath">
|
||||
<el-option
|
||||
v-for="item in enterPathOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>变异:</label>
|
||||
<el-select v-model="formData['mutation']">
|
||||
<el-option v-for="(item,index) in formData['mutationArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.mutation">
|
||||
<el-option
|
||||
v-for="item in mutationOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>退出路径:</label>
|
||||
<el-select v-model="formData['outPath']">
|
||||
<el-option v-for="(item,index) in formData['outPathArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.outPath">
|
||||
<el-option
|
||||
v-for="item in outPathOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
</div>
|
||||
<div class="form-item"></div>
|
||||
</div>
|
||||
<div class="form-row" styLe="margin: 0;">
|
||||
<div class="form-item" styLe="margin: 0;">
|
||||
@@ -212,426 +272,232 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">特级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_spec']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>特级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_spec"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">1级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_1']"></el-input></div> 小时</label>
|
||||
|
||||
<label class="form-item-specLabel"
|
||||
>1级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_1"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">2级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_2']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>2级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_2"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-item" style="flex: 0">
|
||||
<label class="form-item-specLabel">3级护理 <div class="specLabelInner"><el-input v-model="formData['nursingLevel_3']"></el-input></div> 小时</label>
|
||||
<label class="form-item-specLabel"
|
||||
>3级护理
|
||||
<div class="specLabelInner">
|
||||
<el-input v-model="formData.medicalSecond.nursingLevel_3"></el-input>
|
||||
</div>
|
||||
小时</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
<label>呼吸机使用:</label>
|
||||
<el-select v-model="formData['ventilatorUse']">
|
||||
<el-option v-for="(item,index) in formData['ventilatorUseArr']" :key="index" :value="item['value']" :label="item['title']"></el-option>
|
||||
<el-select v-model="formData.medicalSecond.ventilatorUse">
|
||||
<el-option
|
||||
v-for="item in ventilatorUseOptions"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label>有创呼吸机使用时间(小时):</label>
|
||||
<el-input v-model="formData['ventilatorUseTime']"></el-input>
|
||||
<el-input
|
||||
v-model="formData.medicalSecond.vent_used_dura"
|
||||
placeholder="请填写有创呼吸机使用时间(小时)"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {nextTick, reactive, ref, watch} from 'vue';
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
let chooseData = reactive([])//表格中选中的数据 TODO
|
||||
const tableData_top = reactive([])
|
||||
const tableData_sub = ref([
|
||||
{
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
}
|
||||
])
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { cloneDeep, forEach } from 'lodash';
|
||||
import formDataJs from '../../doctorstation/components/store/medicalpage';
|
||||
let chooseData = reactive([]); //表格中选中的数据 TODO
|
||||
let surgery_tableData = reactive([]);
|
||||
const tableData_sub = ref([{}, {}]);
|
||||
let isChooseAll = ref(false);
|
||||
const formData = ref({
|
||||
surgeryDate: '2025-10-10',
|
||||
surgeryType: '',
|
||||
surgeryTypeArr: [
|
||||
{
|
||||
title: '择期手术',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '限期手术',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '急诊手术',
|
||||
value: 3,
|
||||
}
|
||||
],
|
||||
leaveType: '',
|
||||
leaveTypeArr: [
|
||||
{
|
||||
title: '医嘱离院',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '医嘱转院',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '医嘱转社区卫生服务机构',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '非医嘱离院',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
title: '死亡',
|
||||
value: 5,
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
value: 6,
|
||||
}
|
||||
],
|
||||
isPlan: '',
|
||||
isPlanArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
purpose: '',
|
||||
comaDurationTime_before: '',//昏迷时间---入院前
|
||||
comaDurationTime_after: '',//昏迷时间---入院后
|
||||
|
||||
tumorStaging: '',
|
||||
tumorStagingArr: [
|
||||
{
|
||||
title: 'C',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: 'P',
|
||||
value: 2,
|
||||
}
|
||||
],
|
||||
judgmentBase: '',
|
||||
judgmentBaseArr: [
|
||||
{
|
||||
title: '0期',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
title: '1期',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2期',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '3期',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '4期',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
title: '不详',
|
||||
value: 5,
|
||||
}
|
||||
],
|
||||
tumor_T: '',
|
||||
tumor_N: '',
|
||||
tumor_M: '',
|
||||
degreeDifferentiation: '',
|
||||
|
||||
enterPath: '',
|
||||
enterPathArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
outPath: '',
|
||||
outPathArr: [
|
||||
{
|
||||
title: '是',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '否',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
mutation: '',
|
||||
mutationArr: [
|
||||
{
|
||||
title: '有',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '无',
|
||||
value: 1,
|
||||
}
|
||||
],
|
||||
|
||||
nursingLevel_spec: '',
|
||||
nursingLevel_1: '',
|
||||
nursingLevel_2: '',
|
||||
nursingLevel_3: '',
|
||||
|
||||
ventilatorUse: '',
|
||||
ventilatorUseArr: [
|
||||
{
|
||||
title: '未使用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '无创',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '有创',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '无创+有创',
|
||||
value: 4,
|
||||
}
|
||||
],
|
||||
|
||||
ventilatorUseTime: '',
|
||||
});
|
||||
|
||||
const operationLevelList = [
|
||||
{ name: '一级', id: 1 },
|
||||
{ name: '二级', id: 2 },
|
||||
{ name: '三级', id: 3 },
|
||||
];
|
||||
const formData = reactive(formDataJs);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
dscg_way,
|
||||
days_rinp_flag_31,
|
||||
use_vent,
|
||||
oprn_oprt_lv_code,
|
||||
sinc_heal_lv_code,
|
||||
anst_mtd_code,
|
||||
anst_lv_code,
|
||||
sys_tumor_staging,
|
||||
sys_according_to,
|
||||
sys_entry_path,
|
||||
sys_yes_no,
|
||||
sys_exit_path,
|
||||
oprn_patn_type_code,
|
||||
} = proxy.useDict(
|
||||
'dscg_way',
|
||||
'days_rinp_flag_31',
|
||||
'use_vent',
|
||||
'oprn_oprt_lv_code',
|
||||
'sinc_heal_lv_code',
|
||||
'anst_mtd_code',
|
||||
'anst_lv_code',
|
||||
'sys_tumor_staging',
|
||||
'sys_according_to',
|
||||
'sys_entry_path',
|
||||
'sys_yes_no',
|
||||
'sys_exit_path',
|
||||
'oprn_patn_type_code'
|
||||
);
|
||||
|
||||
// 手术类型
|
||||
const surgeryTypeOptions = oprn_patn_type_code;
|
||||
// 离院方式
|
||||
const leaveTypeOptions = dscg_way;
|
||||
// 计划出院
|
||||
const isPlanOptions = days_rinp_flag_31;
|
||||
// 肿瘤分期
|
||||
const tumorStagingOptions = sys_tumor_staging;
|
||||
// 判断依据
|
||||
const judgmentBaseOptions = sys_according_to;
|
||||
// 临床路径
|
||||
const enterPathOptions = sys_entry_path;
|
||||
// 变异
|
||||
const mutationOptions = sys_yes_no;
|
||||
// 退出路径
|
||||
const outPathOptions = sys_exit_path;
|
||||
// 呼吸机使用
|
||||
const ventilatorUseOptions = use_vent;
|
||||
// 手术级别
|
||||
const surgeryLevelOptions = oprn_oprt_lv_code;
|
||||
// 切口愈合等级
|
||||
const cutLevelOptions = sinc_heal_lv_code;
|
||||
// 麻醉方式
|
||||
const anesthesiaTypeOptions = anst_mtd_code;
|
||||
// 麻醉分级
|
||||
const anesthesiaLevelOptions = anst_lv_code;
|
||||
watch(
|
||||
() => formData.medicalSecond.surgery_tableData,
|
||||
(newValue) => {
|
||||
checkItem({}, false);
|
||||
}
|
||||
);
|
||||
// 新增
|
||||
const addItem = () => {
|
||||
let data = {
|
||||
//手术操作日期 oprn_oprt_date
|
||||
oprn_date: '',
|
||||
|
||||
//手术级别 手术级别名称--oprn_lv_code
|
||||
oprn_oprt_date: '',
|
||||
// 手术级别
|
||||
oprn_lv_code: '',
|
||||
|
||||
//手术及操作名称 oprn_oprt_code
|
||||
// 手术操作名称
|
||||
oprn_oprt_name: '',
|
||||
|
||||
//手术及操作医师
|
||||
//术者
|
||||
// 术者
|
||||
oper_name: '',
|
||||
//Ⅰ助
|
||||
// Ⅰ助
|
||||
asit_1_name: '',
|
||||
//Ⅱ助
|
||||
// Ⅱ助
|
||||
asit_name2: '',
|
||||
|
||||
//切口愈合等级 sinc_heal_lv_code
|
||||
sinc_heal_lv: '',
|
||||
|
||||
//麻醉方式
|
||||
anst_way: '',
|
||||
|
||||
//麻醉分级 anst_lv_code
|
||||
anst_lv_name: '',
|
||||
|
||||
//手术时长
|
||||
|
||||
|
||||
//手术方式
|
||||
|
||||
|
||||
//离院方式
|
||||
dscg_way: '',
|
||||
|
||||
//是否有出院31天内再住院计划-----不确定
|
||||
days_rinp_flag_31: '',
|
||||
|
||||
//目的
|
||||
days_rinp_pup_31: '',
|
||||
|
||||
//颅脑损伤患者昏迷时间 入院前
|
||||
brn_damg_bfadm_coma_dura: '',
|
||||
//颅脑损伤患者昏迷时间 入院后
|
||||
brn_damg_afadm_coma_dura: '',
|
||||
|
||||
//肿瘤分期
|
||||
//T
|
||||
//N
|
||||
//M
|
||||
//判断依据
|
||||
//分化程度 bkup_deg_code
|
||||
bkup_deg: '',
|
||||
|
||||
//临床路径-进入路径
|
||||
//变异
|
||||
//退出路径
|
||||
|
||||
//护理级别
|
||||
//特级护理
|
||||
spga_nurscare_days: '',
|
||||
//1级护理
|
||||
lv1_nurscare_days: '',
|
||||
//2级护理
|
||||
scd_nurscare_days: '',
|
||||
//3级护理
|
||||
lv3_nurscare_days: '',
|
||||
|
||||
//呼吸机使用 vent_used_days vent_used_h_cnt vent_used_m_cnt
|
||||
vent_used_dura: '',
|
||||
//有创呼吸机使用时间
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 切口愈合等级
|
||||
sinc_heal_lv_code: '',
|
||||
// 麻醉方式
|
||||
anst_mtd_code: '',
|
||||
// 麻醉分级
|
||||
anst_lv_code: '',
|
||||
// 手术时常
|
||||
oprn_con_time: '',
|
||||
// 是否选中
|
||||
isChoose: false,
|
||||
ctrlDate: '2025-10-10',
|
||||
surgeryLevel: '',
|
||||
surgeryLevelArr: [
|
||||
{
|
||||
title: '1级',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2级',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
title: '3级',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
title: '4级',
|
||||
value: 4,
|
||||
}
|
||||
],
|
||||
surgeryName: '',
|
||||
surgeryMasterName: '',
|
||||
surgeryMasterName_1: '',
|
||||
surgeryMasterName_2: '',
|
||||
cutLevel: '',
|
||||
cutLevelArr: [
|
||||
{
|
||||
title: '1/甲',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2/乙',
|
||||
value: 2,
|
||||
}
|
||||
],
|
||||
anesthesiaType: '',
|
||||
anesthesiaTypeArr: [],
|
||||
anesthesiaEr: '',
|
||||
anesthesiaLevel: '',
|
||||
anesthesiaLevelArr: [
|
||||
{
|
||||
title: '1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
title: '2',
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
surgeryTime: ''
|
||||
}
|
||||
};
|
||||
//push
|
||||
tableData_top.unshift(
|
||||
data
|
||||
)
|
||||
tableData_top.map((d,i) => {
|
||||
d.currentIndex = i
|
||||
})
|
||||
|
||||
}
|
||||
const checkItem = (e) => {
|
||||
chooseData = []
|
||||
e['isChoose'] = !e['isChoose']
|
||||
tableData_top.map((d) => {
|
||||
if (d['isChoose']) {
|
||||
chooseData.push(d)
|
||||
formData.medicalSecond.surgery_tableData.unshift(data);
|
||||
checkItem({}, true);
|
||||
};
|
||||
const checkItem = (e, isAdd) => {
|
||||
if (!isAdd) {
|
||||
e['isChoose'] = !e['isChoose'];
|
||||
}
|
||||
let isSeletAll = false;
|
||||
for (let index = 0; index < formData.medicalSecond.surgery_tableData.length; index++) {
|
||||
const obj = formData.medicalSecond.surgery_tableData[index];
|
||||
if (!obj.isChoose) {
|
||||
isSeletAll = false;
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
isSeletAll = true;
|
||||
}
|
||||
if (isSeletAll) {
|
||||
isChooseAll.value = true;
|
||||
} else {
|
||||
isChooseAll.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const chooseAll = () => {
|
||||
isChooseAll.value = !isChooseAll.value
|
||||
|
||||
if (tableData_top.length) {
|
||||
tableData_top.map((d) => {
|
||||
d['isChoose'] = !isChooseAll.value
|
||||
|
||||
checkItem(d)
|
||||
})
|
||||
isChooseAll.value = !isChooseAll.value;
|
||||
if (isChooseAll.value) {
|
||||
formData.medicalSecond.surgery_tableData.forEach((item) => {
|
||||
item.isChoose = true;
|
||||
});
|
||||
} else {
|
||||
formData.medicalSecond.surgery_tableData.forEach((item) => {
|
||||
item.isChoose = false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
//删除方法
|
||||
const handleDelete = () => {
|
||||
if (!tableData_top.length) { return }
|
||||
let deleteId = []
|
||||
chooseData.map((d) => {
|
||||
deleteId.push(d['currentIndex'])
|
||||
})
|
||||
|
||||
for (let i = tableData_top.length - 1; i >= 0; i--) {
|
||||
if (deleteId.includes(tableData_top[i].currentIndex)) {
|
||||
tableData_top.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
isChooseAll.value = false
|
||||
msgSuccess('删除成功')
|
||||
}
|
||||
if (!formData.medicalSecond.surgery_tableData.length) return;
|
||||
const newtableData_top = formData.medicalSecond.surgery_tableData.filter((item) => {
|
||||
return !item.isChoose;
|
||||
});
|
||||
formData.medicalSecond.surgery_tableData.length = 0;
|
||||
newtableData_top.forEach((item) => {
|
||||
formData.medicalSecond.surgery_tableData.push(item);
|
||||
});
|
||||
isChooseAll.value = false;
|
||||
msgSuccess('删除成功');
|
||||
};
|
||||
|
||||
const msgSuccess = (msg) => {
|
||||
ElMessage({
|
||||
message: msg,
|
||||
type: 'success',
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.medicalSec {
|
||||
.el-date-editor.el-input, .el-date-editor.el-input__wrapper {
|
||||
.el-date-editor.el-input,
|
||||
.el-date-editor.el-input__wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.el-table td.el-table__cell div {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
@@ -938,4 +804,4 @@ label {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,24 +18,31 @@
|
||||
<el-text size="large">
|
||||
<!-- <el-form-item label="费用性质:" prop="currentDate"> {{ '自费' }} </el-form-item> -->
|
||||
</el-text>
|
||||
|
||||
<!-- 支付方式选择 -->
|
||||
<div class="payment-method-container">
|
||||
<el-form-item label="支付方式:">
|
||||
<div class="payment-type-list">
|
||||
<div
|
||||
class="payment-type-item"
|
||||
:class="{ active: currentPayType === item.value }"
|
||||
v-for="item in payTypeOptions"
|
||||
:key="item.value"
|
||||
@click="selectPayType(item.value)"
|
||||
>
|
||||
<svg-icon
|
||||
:icon-class="item.iconClass || item.value"
|
||||
class="payment-icon"
|
||||
:style="{ color: currentPayType === item.value ? '#13C0B3' : '#666666' }"
|
||||
/>
|
||||
<span class="payment-label">{{ item.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<div class="payment-container">
|
||||
<!-- <el-form-item label="支付方式:" prop="payEnum" style="display: flex">
|
||||
<el-select
|
||||
v-model="form.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in props.payLists"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="支付金额:" prop="amount">
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
@@ -51,6 +58,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
@@ -65,6 +73,7 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
@@ -73,11 +82,12 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
// 原有逻辑代码保持不变
|
||||
import { savePayment } from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
|
||||
import { ElMessage } from 'element-plus';
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
@@ -99,58 +109,92 @@ const props = defineProps({
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {},
|
||||
form: {
|
||||
amount: undefined,
|
||||
displayAmount: 0,
|
||||
payLevelEnum: undefined,
|
||||
},
|
||||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: '请输入支付金额', trigger: 'blur' },
|
||||
{ type: 'number', min: 0.01, message: '支付金额必须大于0', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { form, rules } = toRefs(data);
|
||||
|
||||
// 支付方式选项
|
||||
const payTypeOptions = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 定义当前选中的支付方式,默认选中现金
|
||||
const currentPayType = ref(220400);
|
||||
|
||||
// 选择支付方式方法
|
||||
const selectPayType = (value) => {
|
||||
currentPayType.value = value;
|
||||
form.value.payLevelEnum = value;
|
||||
};
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
const payMethods = ref(undefined);
|
||||
|
||||
async function submit() {
|
||||
form.value.patientId = props.patientInfo.patientId;
|
||||
form.value.encounterId = props.patientInfo.encounterId;
|
||||
form.value.accountId = props.patientInfo.accountId;
|
||||
console.log(props.patientInfo, 'patientInfo');
|
||||
savePayment(form.value).then((res) => {
|
||||
// 表单验证
|
||||
if (!form.value.amount || form.value.amount <= 0) {
|
||||
ElMessage.error('请输入有效的支付金额');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!form.value.payLevelEnum) {
|
||||
ElMessage.error('请选择支付方式');
|
||||
return;
|
||||
}
|
||||
|
||||
form.value.patientId = props.patientInfo?.patientId;
|
||||
form.value.encounterId = props.patientInfo?.encounterId;
|
||||
form.value.accountId = props.patientInfo?.accountId;
|
||||
|
||||
console.log('表单数据:', form.value);
|
||||
|
||||
try {
|
||||
const res = await savePayment(form.value);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('收费成功');
|
||||
reset();
|
||||
emit('close', 'success');
|
||||
emit('close', {
|
||||
status: 'success',
|
||||
busNo: props.patientInfo?.busNo,
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(res.msg || '收费失败');
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
ElMessage.error('网络错误,请重试');
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
patientId: undefined,
|
||||
encounterId: undefined,
|
||||
displayAmount: 0,
|
||||
payEnum: undefined,
|
||||
amount: undefined,
|
||||
};
|
||||
proxy.resetForm('chargeDialogRef');
|
||||
form.value.amount = undefined;
|
||||
form.value.displayAmount = 0;
|
||||
form.value.payLevelEnum = undefined;
|
||||
currentPayType.value = 220400; // 重置选中状态为现金
|
||||
|
||||
if (proxy && proxy.resetForm) {
|
||||
proxy.resetForm('chargeDialogRef');
|
||||
}
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理金额变化事件
|
||||
*
|
||||
* 当表单中的金额发生变化时,将显示金额设置为实际金额
|
||||
*/
|
||||
function handleAmountChange() {
|
||||
form.value.displayAmount = form.value.amount;
|
||||
form.value.displayAmount = form.value.amount || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 变化支付方式事件
|
||||
*
|
||||
*/
|
||||
function clearAmount() {
|
||||
form.value.amount = 0;
|
||||
}
|
||||
@@ -160,12 +204,24 @@ function close() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
// 监听总金额变化,如果有默认值则自动填充
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newVal) => {
|
||||
if (newVal && newVal > 0) {
|
||||
form.value.amount = newVal;
|
||||
form.value.displayAmount = newVal;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
@@ -188,10 +244,49 @@ function close() {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
/* 支付方式容器样式 */
|
||||
.payment-method-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-type-list {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.payment-type-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.payment-type-item:hover {
|
||||
background-color: #eef2f7;
|
||||
}
|
||||
|
||||
.payment-type-item.active {
|
||||
background-color: #e8f8f5;
|
||||
border-color: #13c0b3;
|
||||
color: #13c0b3;
|
||||
}
|
||||
|
||||
.payment-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.payment-label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
@@ -248,7 +343,7 @@ function close() {
|
||||
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block; /* 保持行内布局 */
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.suffix-text {
|
||||
@@ -257,10 +352,9 @@ function close() {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 调整输入框内边距 */
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<el-table-column label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" @click.stop="viewPatient(scope.row)">
|
||||
查看
|
||||
选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { getWardList } from '../../../../drug/inpatientMedicationDispensing/components/api';
|
||||
import { getDepositInfo } from './api';
|
||||
|
||||
// Props
|
||||
@@ -78,10 +79,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
wardListOptions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
@@ -97,7 +94,7 @@ const data = reactive({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
// Emits
|
||||
const emits = defineEmits(['confirm', 'cancel', 'patientSelected']);
|
||||
const emits = defineEmits(['confirm', 'cancel', 'patientSelected', 'triggerSearch']);
|
||||
const total = ref(0);
|
||||
// // v-model for drawer visibility
|
||||
// const drawerVisible = defineModel('drawerVisible', {
|
||||
@@ -156,6 +153,7 @@ function viewPatient(patient) {
|
||||
console.log('View patient:', patient);
|
||||
selectedPatient.value = patient; // 选中患者
|
||||
emits('patientSelected', selectedPatient.value); // 发送选中的患者数据
|
||||
emits('triggerSearch', patient.busNo);// 触发预交金查询事件
|
||||
drawerVisible.value = false;
|
||||
reset(); // 重置筛选条件
|
||||
// 可以在这里做一些操作,比如高亮行,或者如果“查看”是选择并关闭,则触发confirm
|
||||
@@ -187,7 +185,18 @@ function show() {
|
||||
console.log('show', props);
|
||||
wardListOptions.value = props.wardListOptions;
|
||||
drawerVisible.value = props.drawerVisible;
|
||||
getList();
|
||||
getWardList().then((res) => {
|
||||
if (res.length > 0) {
|
||||
wardListOptions.value = res.map(ward => ({
|
||||
label: ward.name,
|
||||
value: ward.id
|
||||
}));
|
||||
}
|
||||
getList();
|
||||
}).catch((error) => {
|
||||
console.error('获取病区列表失败:', error);
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,7 +204,7 @@ function show() {
|
||||
*/
|
||||
function getList() {
|
||||
console.log('queryParams', queryParams.value);
|
||||
getDepositInfo().then((res) => {
|
||||
getDepositInfo(queryParams.value).then((res) => {
|
||||
patientData.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
|
||||
@@ -118,7 +118,10 @@ async function submit() {
|
||||
refund(form.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
reset();
|
||||
emit('close', 'success');
|
||||
emit('close', {
|
||||
status: 'success',
|
||||
busNo: props.patientInfo?.busNo,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
ref="showPatientRef"
|
||||
:wardListOptions="wardListOptions"
|
||||
@patientSelected="handlePatientSelected"
|
||||
@triggerSearch="handleTriggerSearch"
|
||||
/>
|
||||
<ChargeDialog
|
||||
ref="chargeListRef"
|
||||
@@ -178,7 +179,6 @@ const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
searchKey: 'ZY202507310001',
|
||||
});
|
||||
const tableRowClassName = ({ row, rowIndex }) => {
|
||||
if (row.amount < 0) {
|
||||
@@ -201,6 +201,7 @@ function getPatientInfo() {
|
||||
}
|
||||
console.log(queryParams.value, 'queryParams.value');
|
||||
getDepositInfo({ busNo: queryParams.value.searchKey }).then((res) => {
|
||||
queryParams.value.searchKey = '';
|
||||
if (res.code == 200 && res.data.records[0].encounterId) {
|
||||
patientInfo.value = res.data.records[0];
|
||||
getDepositInfoPage({ encounterId: res.data.records[0].encounterId }).then((res) => {
|
||||
@@ -240,12 +241,12 @@ function refund() {
|
||||
|
||||
/** 选择病人 */
|
||||
function handlePatientSelected(row) {
|
||||
console.log(row, 'rowwwwwwwwhandlePatientSelected');
|
||||
queryParams.value.searchKey = row.admissionNo;
|
||||
// console.log(row, 'rowwwwwwwwhandlePatientSelected');
|
||||
// queryParams.value.searchKey = row.admissionNo;
|
||||
patientInfo.value = row;
|
||||
nextTick(() => {
|
||||
getPatientInfo();
|
||||
});
|
||||
// nextTick(() => {
|
||||
// getPatientInfo();
|
||||
// });
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -286,14 +287,19 @@ function formatValue(value) {
|
||||
*
|
||||
* @returns {void} 无返回值
|
||||
*/
|
||||
function handleClose(str) {
|
||||
function handleClose(data) {
|
||||
openDialog.value = false;
|
||||
openRefundDialog.value = false;
|
||||
if (str === 'success') {
|
||||
if (data?.status === 'success' && data?.busNo) {
|
||||
queryParams.value.searchKey = data.busNo;
|
||||
getPatientInfo();
|
||||
proxy.$modal.msgSuccess('操作成功!');
|
||||
}
|
||||
}
|
||||
//在院患者查询
|
||||
function handleTriggerSearch(busNo) {
|
||||
queryParams.value.searchKey = busNo; // 将选中患者的住院号赋值给搜索参数
|
||||
getPatientInfo(); // 调用现有查询方法
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,100 +1,166 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费患者列表 新
|
||||
*/
|
||||
export function getList1(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者处方列表
|
||||
*/
|
||||
export function getChargeList(row) {
|
||||
return request({
|
||||
url: `/charge-manage/inpa-charge/patient-prescription?encounterId=${row.encounterId}&startTime=${row.startTime}&endTime=${row.endTime}`,
|
||||
method: 'get',
|
||||
})
|
||||
export function getChargeList(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/patient-prescription?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 医保转自费
|
||||
*/
|
||||
export function changeToSelfPay(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 自费转医保
|
||||
*/
|
||||
export function changeToMedicalInsurance(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/inpa-charge/medical-insurance?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/charge/medical-insurance?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
* 学生医保转学生自费
|
||||
*/
|
||||
export function changeStudentPayTosStudentSelf(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/student-self-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*/
|
||||
export function changeStudentSelfToStudentPay(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/charge/student-yb-pay?encounterId=' + encounterId,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 住院结算
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function init1() {
|
||||
return request({
|
||||
url: '/charge-manage/inpatient-charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
* 住院预结算
|
||||
*/
|
||||
export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pre-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-pre-pay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预结算
|
||||
*/
|
||||
export function unprecharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/unprecharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
return request({
|
||||
url: '/payment/payment/inpa-un-pay',
|
||||
method: 'post',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发耗材
|
||||
*/
|
||||
export function dispenseMedicalConsumables(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medical-consumables-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/device-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 补打小票
|
||||
*/
|
||||
export function getChargeInfo(param) {
|
||||
return request({
|
||||
url: '/payment/bill/getDetail',
|
||||
method: 'get',
|
||||
params: param,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function wxPay(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-for',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
export function WxPayResult(data) {
|
||||
return request({
|
||||
url: '/three-part/pay/pay-query',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="props.paymentEnum == 1 ? '确认退费' : '确认收费'"
|
||||
title="确认收费"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@open="handleOpen"
|
||||
@close="close"
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
@@ -18,47 +19,55 @@
|
||||
{{ props.totalAmount.toFixed(2) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">折扣金额:</el-text>
|
||||
<el-text size="large" type="warning" class="amount">
|
||||
{{ discountAmount.toFixed(2) + ' 元' }}
|
||||
</el-text>
|
||||
</div>
|
||||
|
||||
<!-- 自费支付 -->
|
||||
<div class="payment-container">
|
||||
<div v-for="(item, index) in formData.selfPay" :key="index" class="payment-item">
|
||||
<span>支付方式:</span>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="clearAmount(index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum.value)"
|
||||
<template v-for="(item, index) in formData.selfPay" :key="index">
|
||||
<div v-show="item.payEnum != 220500" class="payment-item">
|
||||
<span>支付方式:</span>
|
||||
<el-select
|
||||
v-model="item.payEnum"
|
||||
placeholder="选择支付方式"
|
||||
style="width: 160px"
|
||||
@change="(value) => clearAmount(index, value)"
|
||||
>
|
||||
<el-option
|
||||
v-for="payEnum in selfPayMethods"
|
||||
:key="payEnum.value"
|
||||
:label="payEnum.label"
|
||||
:value="payEnum.value"
|
||||
:disabled="isMethodDisabled(payEnum)"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
</el-select>
|
||||
<span>支付金额:</span>
|
||||
<div class="suffix-wrapper">
|
||||
<el-input-number
|
||||
v-model="item.amount"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
:max="getMax(index)"
|
||||
:controls="false"
|
||||
placeholder="金额"
|
||||
class="amount-input"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
<span class="suffix-text">元</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
circle
|
||||
:icon="Delete"
|
||||
@click="removePayment(index)"
|
||||
v-if="index > 0"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -72,6 +81,29 @@
|
||||
金额已满足应收,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
<div style="margin-top: 10px" v-if="userStore.hospitalName == '长春市朝阳区中医院'">
|
||||
<span>折扣:</span>
|
||||
<el-radio-group v-model="discountRadio" @change="handleDiscountChange">
|
||||
<el-radio-button
|
||||
v-for="item in charge_discount"
|
||||
:key="item.value"
|
||||
link
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment-item">
|
||||
<span>{{ payTypeText }}支付:</span>
|
||||
<el-input
|
||||
ref="txtCodeRef"
|
||||
v-model="txtCode"
|
||||
style="width: 300px"
|
||||
:placeholder="payTypePlaceholder"
|
||||
/>
|
||||
<el-button link type="primary" @click="handleWxPay()">扫码支付</el-button>
|
||||
<el-button link type="primary" @click="getWxPayResult()">查看结果</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
@@ -93,7 +125,7 @@
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">{{ props.paymentEnum == 1 ? '退费合计:' : '收费合计:' }}</el-text>
|
||||
<el-text type="info">实收合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
@@ -105,9 +137,10 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading">
|
||||
确 定
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" @click="print()" :disabled="dialogLoading">打 印</el-button> -->
|
||||
<el-button @click="close" :disabled="dialogLoading">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -115,11 +148,21 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables } from './api';
|
||||
import {
|
||||
savePayment,
|
||||
unprecharge,
|
||||
dispenseMedicalConsumables,
|
||||
wxPay,
|
||||
WxPayResult,
|
||||
getChargeInfo,
|
||||
} from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import templateJson from './template.json';
|
||||
import { pa } from 'element-plus/es/locales.mjs';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
@@ -144,35 +187,35 @@ const props = defineProps({
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
consumablesIdList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
paymentEnum: {
|
||||
type: String,
|
||||
chargedItems: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
newId: {
|
||||
type: String,
|
||||
},
|
||||
oldId: {
|
||||
type: String,
|
||||
}
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { charge_discount } = proxy.useDict('charge_discount');
|
||||
|
||||
const userStore = useUserStore();
|
||||
const discountRadio = ref();
|
||||
const discountAmount = ref(0);
|
||||
const txtCode = ref('');
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
@@ -195,154 +238,183 @@ watch(
|
||||
);
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
async function printReceipt(param) {
|
||||
console.log(param, 'param');
|
||||
console.log(props.patientInfo, 'props.patientInfo');
|
||||
let displayAmountTemp = 0;
|
||||
|
||||
// 打印小票
|
||||
function printReceipt(param) {
|
||||
let total = 0;
|
||||
props.chargedItems.forEach((item) => {
|
||||
total += item.totalPrice || 0;
|
||||
});
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...param,
|
||||
// 基础支付类型
|
||||
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
YB_FUND_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 100000)?.amount.toFixed(2) + ' 元' ?? 0, // 基金支付总额
|
||||
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人负担总金额
|
||||
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
|
||||
|
||||
// 基本医保统筹基金支出
|
||||
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
YB_TC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 110000)?.amount.toFixed(2) + ' 元' ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 120000)?.amount.toFixed(2) + ' 元' ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT:
|
||||
param.detail?.find((t) => t.payEnum === 130000)?.amount.toFixed(2) + ' 元' ?? 0, // 医疗救助基金支出
|
||||
// YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
// YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
// YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
// YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
|
||||
// YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
|
||||
// YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
|
||||
// YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
|
||||
|
||||
// 其他支出细分
|
||||
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
// OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
|
||||
// OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
|
||||
// OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
|
||||
// OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
|
||||
// OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
|
||||
// OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
|
||||
// OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
|
||||
// OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
|
||||
// OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
|
||||
// OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
|
||||
// HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
FULAMT_OWNPAY_AMT:
|
||||
param.detail?.find((t) => t.payEnum === 1)?.amount.toFixed(2) + ' 元' ?? 0, // 全自费金额
|
||||
// OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
// PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail?.find((t) => t.payEnum === 5)?.amount.toFixed(2) + ' 元' ?? 0, // 符合政策范围金额
|
||||
// ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
// POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
// BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
SELF_YB_ZH_PAY:
|
||||
param.detail?.find((t) => t.payEnum === 210000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人医保账户支付
|
||||
// SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
// SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
// SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
// SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
// SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
// SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
// SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
// SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
// BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
// RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
// URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
// URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
// MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
// GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
// ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
// CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
// FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
// HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
// SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
// HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
itemTotalAmount: total.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmountTemp + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
userName: userStore.nickName,
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
printer: 'xp',
|
||||
title: '门诊收费结算单',
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
|
||||
async function submit() {
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
function handleWxPay() {
|
||||
wxPay({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount.toFixed(2)) {
|
||||
function getWxPayResult() {
|
||||
WxPayResult({
|
||||
txtCode: txtCode.value,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
});
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
formData.totalAmount = props.totalAmount;
|
||||
formData.selfPay[0].amount = props.totalAmount;
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
displayAmountTemp = displayAmount.value;
|
||||
|
||||
let amount = formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
return sum + (Number(item.amount) || 0);
|
||||
}, 0)
|
||||
.toFixed(2);
|
||||
if (parseFloat(amount) < formData.totalAmount.toFixed(2)) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
return;
|
||||
}
|
||||
|
||||
// if(chrome.webview === undefined) {
|
||||
// alert('当前版本不支持银联支付');
|
||||
// }
|
||||
// else {
|
||||
// try {
|
||||
// let jsonResult = await window.chrome.webview.hostObjects.CSharpAccessor.ReadCardAsync();
|
||||
// let cardInfo = JSON.parse(jsonResult);
|
||||
// console.log(cardInfo.CardType);
|
||||
// } catch (error) {
|
||||
// console.error('调用失败:', error);
|
||||
// }
|
||||
// }
|
||||
dialogLoading.value = true;
|
||||
savePayment({
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
id: props.paymentId,
|
||||
oldId: props.oldId,
|
||||
newId: props.newId,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
paymentDetails: formData.selfPay,
|
||||
ybMdtrtCertType: props.userCardInfo.psnCertType,
|
||||
busiCardInfo: props.userCardInfo.busiCardInfo,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
printReceipt(res.data);
|
||||
(formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]),
|
||||
emit('close', 'success', res.msg);
|
||||
// 长春大学自动发耗材
|
||||
getChargeInfo({ paymentId: props.paymentId }).then((res) => {
|
||||
// printReceipt(res.data);
|
||||
});
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
emit('close', 'success', res.msg);
|
||||
emit('refresh'); // 发送刷新事件给父组件
|
||||
// 长春市朝阳区中医院自动发耗材
|
||||
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
|
||||
dispenseMedicalConsumables(props.consumablesIdList);
|
||||
}
|
||||
@@ -353,13 +425,51 @@ async function submit() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 打印收费结算单 */
|
||||
async function print() {
|
||||
console.log('patientInfo', props.patientInfo);
|
||||
console.log('category', props.category);
|
||||
console.log('totalAmount', props.totalAmount);
|
||||
console.log('chargeItemIds', props.chargeItemIds);
|
||||
console.log('consumablesIdList', props.consumablesIdList);
|
||||
console.log('userCardInfo', props.userCardInfo);
|
||||
console.log('paymentId', props.paymentId);
|
||||
console.log('details', props.details);
|
||||
console.log('chargedItems', props.chargedItems);
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
name: props.patientInfo.patientName, // 姓名
|
||||
gender: props.patientInfo.genderEnum_enumText, // 性别
|
||||
age: props.patientInfo.age, // 年龄
|
||||
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
|
||||
currentDate: currentDate.value, // 收费日期
|
||||
chargedItems: props.chargedItems, // 收费项目
|
||||
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
|
||||
displayAmount: displayAmount.value + ' 元', // 实收金额
|
||||
returnedAmount: returnedAmount.value + ' 元', // 应找零
|
||||
},
|
||||
],
|
||||
};
|
||||
console.log(result, '==result.data==');
|
||||
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
const printerList = hiprintTemplate.getPrinterList();
|
||||
console.log(hiprintTemplate, '打印机列表');
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
title: '门诊收费结算单',
|
||||
});
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
{ label: '现金', value: 220400, isWebPay: false },
|
||||
{ label: '微信', value: 220100, isWebPay: true },
|
||||
{ label: '支付宝', value: 220200, isWebPay: true },
|
||||
{ label: '银联', value: 220300, isWebPay: true },
|
||||
{ label: '优惠', value: 220500, isWebPay: false },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
@@ -381,9 +491,36 @@ const getMax = (index) => {
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 折扣计算
|
||||
function handleDiscountChange(value) {
|
||||
let amount = props.totalAmount * Number(value);
|
||||
discountAmount.value = props.totalAmount - amount;
|
||||
formData.selfPay = [
|
||||
{ payEnum: 220100, amount: amount, payLevelEnum: 2 },
|
||||
{ payEnum: 220500, amount: discountAmount.value, payLevelEnum: 2 },
|
||||
];
|
||||
}
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
const isMethodDisabled = (option) => {
|
||||
if (formData.selfPay.length > 1) {
|
||||
// 禁用已被选择的相同方式,避免重复选择
|
||||
const selectedEnums = formData.selfPay.map((item) => item.payEnum);
|
||||
if (selectedEnums.includes(option.value)) {
|
||||
return true;
|
||||
}
|
||||
// 若已经选择了任一线上支付方式,则其他线上方式不可再选,仅允许现金等线下方式
|
||||
const hasSelectedWebPay = selectedEnums.some((val) => {
|
||||
const found = selfPayMethods.find((m) => m.value === val);
|
||||
return found ? found.isWebPay === true : false;
|
||||
});
|
||||
if (hasSelectedWebPay && option.isWebPay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
@@ -401,15 +538,31 @@ const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
const payTypeText = ref('微信');
|
||||
const payTypePlaceholder = computed(() => {
|
||||
if (payTypeText.value === '现金') {
|
||||
return '请输入现金金额';
|
||||
}
|
||||
return payTypeText.value + '支付二维码';
|
||||
});
|
||||
const clearAmount = (index, value) => {
|
||||
const selectedOption = selfPayMethods.find((item) => item.value === value);
|
||||
if (selectedOption) {
|
||||
payTypeText.value = selectedOption.label;
|
||||
}
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
return formData.selfPay
|
||||
.reduce((sum, item) => {
|
||||
if (item.payEnum !== 220500) {
|
||||
return sum + (Number(item.amount) || 0);
|
||||
}
|
||||
return sum;
|
||||
}, 0)
|
||||
.toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
@@ -427,8 +580,25 @@ function close() {
|
||||
// proxy.$modal.msgError(res.message);
|
||||
// }
|
||||
// });
|
||||
txtCode.value = '';
|
||||
|
||||
formData.totalAmount = 0;
|
||||
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
|
||||
formData.medicalInsurance = {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
};
|
||||
|
||||
// 重置折扣相关状态
|
||||
discountRadio.value = undefined;
|
||||
discountAmount.value = 0;
|
||||
emit('close');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
printReceipt,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
{
|
||||
"panels": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": 1,
|
||||
"paperType": "自定义",
|
||||
"height": 160,
|
||||
"width": 80,
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 450.7086614173229,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {
|
||||
"content": "",
|
||||
"opacity": 0.7,
|
||||
"type": 1
|
||||
},
|
||||
"watermarkOptions": {
|
||||
"content": "",
|
||||
"fillStyle": "rgba(184, 184, 184, 0.3)",
|
||||
"fontSize": "36px",
|
||||
"rotate": 25,
|
||||
"width": 413,
|
||||
"height": 310,
|
||||
"timestamp": false,
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
"panelLayoutOptions": {
|
||||
"layoutType": "column",
|
||||
"layoutRowGap": 0,
|
||||
"layoutColumnGap": 0
|
||||
},
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 45,
|
||||
"top": 15,
|
||||
"height": 16.5,
|
||||
"width": 142.5,
|
||||
"title": "长春市朝阳区中医院门诊收费结算单",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontWeight": "bold",
|
||||
"letterSpacing": 0.75,
|
||||
"textAlign": "center",
|
||||
"qrCodeLevel": 0,
|
||||
"fontSize": 12
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 15,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 80,
|
||||
"title": "姓名",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "name"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 99,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 60,
|
||||
"title": "性别",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "gender"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 163.5,
|
||||
"top": 39,
|
||||
"height": 14,
|
||||
"width": 60,
|
||||
"title": "年龄",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "age"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 15,
|
||||
"top": 60,
|
||||
"height": 14,
|
||||
"width": 120,
|
||||
"title": "病人类型",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "medType"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 13.5,
|
||||
"top": 82.5,
|
||||
"height": 14,
|
||||
"width": 120,
|
||||
"title": "病历号",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "encounterBusNo"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 13.5,
|
||||
"top": 102,
|
||||
"height": 37.5,
|
||||
"width": 208.5,
|
||||
"title": "undefined+beforeDragIn",
|
||||
"field": "chargedItems",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"textAlign": "center",
|
||||
"tableBodyRowBorder": "border",
|
||||
"tableBodyCellBorder": "border",
|
||||
"columns": [
|
||||
[
|
||||
{
|
||||
"title": "项目名称",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 61.93559159547676,
|
||||
"field": "itemName",
|
||||
"checked": true,
|
||||
"columnId": "itemName",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "单价",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.1097311853845,
|
||||
"field": "unitPrice",
|
||||
"checked": true,
|
||||
"columnId": "unitPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "数量",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.12571954521698,
|
||||
"field": "quantityValue",
|
||||
"checked": true,
|
||||
"columnId": "quantityValue",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "总价",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 35.15170328143829,
|
||||
"field": "totalPrice",
|
||||
"checked": true,
|
||||
"columnId": "totalPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "费用性质",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 37.17725439248345,
|
||||
"field": "contractName",
|
||||
"checked": true,
|
||||
"columnId": "contractName",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "收费名称",
|
||||
"titleSync": false,
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 56.86712269302148,
|
||||
"field": "chargeItem",
|
||||
"checked": false,
|
||||
"columnId": "chargeItem",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "表格",
|
||||
"type": "table",
|
||||
"editable": true,
|
||||
"columnDisplayEditable": true,
|
||||
"columnDisplayIndexEditable": true,
|
||||
"columnTitleEditable": true,
|
||||
"columnResizable": true,
|
||||
"columnAlignEditable": true,
|
||||
"isEnableEditField": true,
|
||||
"isEnableContextMenu": true,
|
||||
"isEnableInsertRow": true,
|
||||
"isEnableDeleteRow": true,
|
||||
"isEnableInsertColumn": true,
|
||||
"isEnableDeleteColumn": true,
|
||||
"isEnableMergeCell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 99,
|
||||
"top": 147,
|
||||
"height": 15,
|
||||
"width": 123,
|
||||
"title": "合计金额",
|
||||
"field": "itemTotalAmount",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "应收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "totalAmount"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 171,
|
||||
"height": 14,
|
||||
"width": 97.5,
|
||||
"title": "实收金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "displayAmount"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 193.5,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "全自费金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "FULAMT_OWNPAY_AMT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 193.5,
|
||||
"height": 13.5,
|
||||
"width": 97.5,
|
||||
"title": "医保政策金额",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "INSCP_SCP_AMT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 216,
|
||||
"height": 14,
|
||||
"width": 108,
|
||||
"title": "基金支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "YB_FUND_PAY"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 124.5,
|
||||
"top": 216,
|
||||
"height": 13.5,
|
||||
"width": 97.5,
|
||||
"title": "统筹支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "YB_TC_FUND_AMOUNT"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 240,
|
||||
"height": 14,
|
||||
"width": 216,
|
||||
"title": "个人医保账户支付",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "SELF_YB_ZH_PAY"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 268.5,
|
||||
"height": 14,
|
||||
"width": 106.5,
|
||||
"title": "收费员",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "userName"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 6,
|
||||
"top": 294,
|
||||
"height": 14,
|
||||
"width": 214.5,
|
||||
"title": "收费时间",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "currentDate"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名/病历号"
|
||||
placeholder="请输入患者名/住院号/床号"
|
||||
clearable
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
@keyup.enter="getPatientList"
|
||||
@@ -22,9 +22,9 @@
|
||||
</template>
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
v-model="queryParams.encounterStatus"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
|
||||
placeholder="收费状态"
|
||||
placeholder="结算状态"
|
||||
@change="getPatientList"
|
||||
>
|
||||
<el-option
|
||||
@@ -44,6 +44,7 @@
|
||||
placement="bottom"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
@change="getPatientList"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
|
||||
搜索
|
||||
@@ -57,14 +58,17 @@
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="住院号" align="center" prop="patientBusNo" />
|
||||
<!-- <el-table-column label="床号" align="center" prop="bedNo" /> -->
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="账户余额" align="center" prop="balanceAmount" />
|
||||
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.receptionTime) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" />
|
||||
<el-table-column label="结算状态" align="center" prop="encounterStatus_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -73,18 +77,21 @@
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">基本信息</span>
|
||||
</template>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions :column="5">
|
||||
<el-descriptions-item label="姓名:">{{ patientInfo.patientName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别:">
|
||||
{{ patientInfo.genderEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同类型:">
|
||||
{{ patientInfo.categoryEnum_enumText }}
|
||||
<!-- <el-descriptions-item label="科室:">
|
||||
{{ patientInfo.organizationName }}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="床号:">
|
||||
{{ patientInfo.bedNo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊时间:">
|
||||
{{ formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss') }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="身份证号:">{{ patientInfo.idCard }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="手机号">{{ patientInfo.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">{{ patientInfo.name }}</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="min-width: 1100px">
|
||||
@@ -126,6 +133,22 @@
|
||||
>
|
||||
自费转医保
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentPayTosStudentSelf()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生医保转学生自费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="studentSelfToStudentPay()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
学生自费转学生医保
|
||||
</el-button>
|
||||
<span style="float: right"
|
||||
>合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元</span
|
||||
>
|
||||
@@ -137,23 +160,36 @@
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
|
||||
<el-table-column label=" 开立科室" align="center" prop="requestingOrgId" width="180" />
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" width="180" />
|
||||
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
|
||||
<el-table-column label="数量" align="center" prop="quantityValue" width="80" />
|
||||
<el-table-column label="医疗类型" align="center" prop="medTypeCode_dictText" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<el-table-column label="结算状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.encounterStatus === 1" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
:type="scope.row.statusEnum === 1 ? 'default' : 'success'"
|
||||
v-else-if="scope.row.encounterStatus === 5"
|
||||
type="success"
|
||||
disable-transitions
|
||||
>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.encounterStatus === 8" type="danger" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="right" prop="totalPrice" header-align="center">
|
||||
@@ -162,10 +198,65 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<el-table-column label="收费时间" align="center" prop="billDate" width="180" />
|
||||
<el-table-column
|
||||
label="应收金额"
|
||||
align="right"
|
||||
prop="receivableAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.receivableAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实收金额"
|
||||
align="right"
|
||||
prop="receivedAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.receivedAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="优惠金额"
|
||||
align="right"
|
||||
prop="discountAmount"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.discountAmount.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣率" align="right" prop="discountRate" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.discountRate.toFixed(2) + '%' || '0.00' + '%' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
:disabled="!scope.row.paymentId"
|
||||
link
|
||||
type="primary"
|
||||
@click="printCharge(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
@@ -176,33 +267,37 @@
|
||||
:chrgBchnoList="chrgBchnoList"
|
||||
:userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId"
|
||||
:newId="newId"
|
||||
:oldId="oldId"
|
||||
:details="details"
|
||||
:paymentEnum="paymentEnum"
|
||||
:chargedItems="chargedItems"
|
||||
@refresh="getPatientList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicCharge">
|
||||
import {
|
||||
getList,
|
||||
getList1,
|
||||
getChargeList,
|
||||
changeToSelfPay,
|
||||
changeToMedicalInsurance,
|
||||
init,
|
||||
init1,
|
||||
precharge,
|
||||
getChargeInfo,
|
||||
changeStudentPayTosStudentSelf,
|
||||
changeStudentSelfToStudentPay,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
statusEnum: 1,
|
||||
encounterStatus: 4,
|
||||
});
|
||||
const totalAmounts = ref(0);
|
||||
const selectedRows = ref([]);
|
||||
@@ -219,23 +314,34 @@ const totalAmount = ref(0);
|
||||
const chargeListRef = ref();
|
||||
const details = ref({});
|
||||
const chargeStatusOptions = ref([]);
|
||||
const consumablesIdList = ref([]);
|
||||
const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const newId = ref('');
|
||||
const oldId = ref('');
|
||||
const paymentEnum = ref(1);
|
||||
const buttonDisabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
const chargedItems = ref([]);
|
||||
|
||||
watch(
|
||||
() => selectedRows.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => chargeList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -244,9 +350,15 @@ function handleSelectionChange(selection) {
|
||||
selectedRows.value = selection;
|
||||
}
|
||||
function handleTotalAmount() {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
}, 0);
|
||||
if (selectedRows.value.length == 0) {
|
||||
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, new Decimal(0));
|
||||
} else {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
getPatientList();
|
||||
initOption();
|
||||
@@ -261,20 +373,23 @@ function getPatientList() {
|
||||
queryParams.value.startTimeSTime = undefined;
|
||||
queryParams.value.startTimeETime = undefined;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
getList1(queryParams.value).then((res) => {
|
||||
console.log('患者列表', res);
|
||||
patientList.value = res.data.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function initOption() {
|
||||
init().then((res) => {
|
||||
chargeStatusOptions.value = res.data.chargeItemStatusOptions;
|
||||
init1().then((res) => {
|
||||
console.log('初始化收费项目状态', res);
|
||||
chargeStatusOptions.value = res.data.encounterStatusOptions;
|
||||
console.log('res.data.chargeItemStatusOptions======>', JSON.stringify(res.data));
|
||||
});
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
// 已结算时禁用选择框
|
||||
return row.statusEnum === 1;
|
||||
return row.encounterStatus === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,8 +399,7 @@ function clickRow(row) {
|
||||
patientInfo.value = row;
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
const date = row.startTime.split('T')[0].split('-').join('');
|
||||
getChargeList({encounterId: row.encounterId, startTime:date, endTime: formatDateStr(new Date(), 'YYYYMMDD'),}).then((res) => {
|
||||
getChargeList(row.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
@@ -299,7 +413,7 @@ function handleClose(value, msg) {
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess(msg);
|
||||
chargeLoading.value = true;
|
||||
getChargeList({encounterId: patientInfo.value.encounterId, startTime:date, endTime: formatDateStr(new Date(), 'YYYYMMDD'),}).then((res) => {
|
||||
getChargeList(patientInfo.value.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
@@ -308,7 +422,7 @@ function handleClose(value, msg) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
@@ -326,6 +440,7 @@ function confirmCharge() {
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
@@ -337,20 +452,13 @@ function confirmCharge() {
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
if(res.data.newPayment) {
|
||||
paymentEnum.value = res.data.newPayment.paymentEnum;
|
||||
paymentId.value = res.data.id.toString();
|
||||
newId.value = res.data.newId.toString();
|
||||
oldId.value = res.data.oldId.toString();
|
||||
encounterId.value = patientInfo.value.encounterId,
|
||||
chrgBchnoList.value = res.data.paymentRecDetailDtoList;
|
||||
totalAmount.value = res.data.newPayment.tenderedAmount;
|
||||
details.value = res.data.paymentRecDetailDtoList;
|
||||
openDialog.value = true;
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
paymentId.value = res.data.paymentId;
|
||||
chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details.filter((item) => {
|
||||
return item.amount > 0;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
@@ -363,161 +471,168 @@ const readCardLoading = ref(false);
|
||||
const loadingText = ref('');
|
||||
const BusiCardInfo = ref(''); // miyao
|
||||
async function handleReadCard(value) {
|
||||
if (chrome.webview === undefined) {
|
||||
alert('请在医保版本中调用读卡功能!');
|
||||
} else {
|
||||
try {
|
||||
let webView = window.chrome.webview.hostObjects.CSharpAccessor;
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
// if (window.CefSharp === undefined) {
|
||||
// alert('请在医保版本中调用读卡功能!');
|
||||
// } else {
|
||||
try {
|
||||
// await CefSharp.BindObjectAsync('boundAsync');
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await webView
|
||||
.GetInfoByQrCodeAsync(
|
||||
'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
'H22010200672',
|
||||
'01101',
|
||||
userStore.id,
|
||||
userStore.name,
|
||||
'D83',
|
||||
'财务科'
|
||||
)
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(jsonResult);
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await webView
|
||||
.ReadHeaSecCardAsync(
|
||||
JSON.stringify({
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = res;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
// console.log(
|
||||
// 'jsonResult',
|
||||
// JSON.parse({
|
||||
// IssuingAreaCode: '310000',
|
||||
// SocialSecurityNumber: '371324198810224515',
|
||||
// CardNumber: 'M501A1A78',
|
||||
// CardIdentificationCode: '310000D15600000535925154E880AB97',
|
||||
// Name: '\u5218\u5CF0',
|
||||
// CardResetInfo: '00814A444686603100333E4FA9',
|
||||
// SpecificationVersion: '3.00',
|
||||
// IssuingDate: '20190313',
|
||||
// ExpirationDate: '20290313',
|
||||
// TerminalNumber: '000000000000',
|
||||
// TerminalDeviceNumber: '00041161201901000005',
|
||||
// Code: 0,
|
||||
// ErrorMessage: null,
|
||||
// })
|
||||
// );
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
paymentId.value = res.data.paymentId;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details;
|
||||
// chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
consumablesIdList.value = selectRows.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
}).map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await invokeYbPlugin({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
officeId: 'D83',
|
||||
officeName: '财务科',
|
||||
})
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = JSON.stringify(res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
// console.log(
|
||||
// 'jsonResult',
|
||||
// JSON.parse({
|
||||
// IssuingAreaCode: '310000',
|
||||
// SocialSecurityNumber: '371324198810224515',
|
||||
// CardNumber: 'M501A1A78',
|
||||
// CardIdentificationCode: '310000D15600000535925154E880AB97',
|
||||
// Name: '\u5218\u5CF0',
|
||||
// CardResetInfo: '00814A444686603100333E4FA9',
|
||||
// SpecificationVersion: '3.00',
|
||||
// IssuingDate: '20190313',
|
||||
// ExpirationDate: '20290313',
|
||||
// TerminalNumber: '000000000000',
|
||||
// TerminalDeviceNumber: '00041161201901000005',
|
||||
// Code: 0,
|
||||
// ErrorMessage: null,
|
||||
// })
|
||||
// );
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
paymentId.value = res.data.paymentId;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details;
|
||||
// chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
// 打印项目赋值
|
||||
chargedItems.value = selectRows;
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,6 +656,80 @@ function patToMedicalInsurance() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生医保转学生自费
|
||||
*/
|
||||
function studentPayTosStudentSelf() {
|
||||
changeStudentPayTosStudentSelf(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生自费转学生医保
|
||||
*/
|
||||
function studentSelfToStudentPay() {
|
||||
changeStudentSelfToStudentPay(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加行合并方法
|
||||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 只对操作列进行合并(根据列索引判断,操作列为最后一列)
|
||||
if (columnIndex === 10) {
|
||||
// 操作列索引为10(从0开始计数)
|
||||
// 如果当前行的paymentId为空,则不合并
|
||||
if (!row.paymentId) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 查找相同paymentId的连续行
|
||||
let spanCount = 1;
|
||||
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
||||
// 这是具有相同paymentId的第一行,计算需要合并的行数
|
||||
for (let i = rowIndex + 1; i < chargeList.value.length; i++) {
|
||||
if (chargeList.value[i].paymentId === row.paymentId) {
|
||||
spanCount++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
} else {
|
||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
// 其他列不合并
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
function printCharge(row) {
|
||||
// 打印功能实现
|
||||
let rows = [];
|
||||
chargeList.value.forEach((item, index) => {
|
||||
if (item.paymentId === row.paymentId) {
|
||||
rows.push(item);
|
||||
}
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(res.data);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
:deep(.no-hover-column) .cell:hover {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -24,10 +24,25 @@
|
||||
height="100%"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column type="index" width="80" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="申请患者" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column prop="genderEnum_enumText" width="80" label="性别" align="center" />
|
||||
<el-table-column prop="age" width="80" label="年龄" align="center" />
|
||||
<el-table-column prop="busNo" align="center" label="患者住院号">
|
||||
<template #default="scope">
|
||||
{{ scope.row.busNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contractNo" align="center" label="费用性质">
|
||||
<template #default="scope">
|
||||
{{ scope.row.contractNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="admitSourceCode" align="center" label="入院类型">
|
||||
<template #default="scope">
|
||||
{{ scope.row.admitSourceCode || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源">
|
||||
<template #default="scope">
|
||||
{{ scope.row.sourceName || '-' }}
|
||||
@@ -59,6 +74,7 @@
|
||||
:registrationType="registrationType"
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:noFile="noFile"
|
||||
:is-registered="true"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
/>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取住院信息初期数据列表
|
||||
export function getInit(query) {
|
||||
return request({
|
||||
url: '/inpatient-manage/init',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取住院信息 分页显示
|
||||
@@ -22,8 +22,8 @@ export function getAdmissionPage(query) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/register-info',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院无档登记
|
||||
@@ -31,8 +31,8 @@ export function addAdmissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
@@ -40,8 +40,8 @@ export function admissionInfo(data) {
|
||||
return request({
|
||||
url: '/inpatient-manage/admission-information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,17 +51,18 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病区下拉列表
|
||||
*/
|
||||
export function wardList() {
|
||||
export function wardList({ orgId } = {}) {
|
||||
return request({
|
||||
url: '/app-common/ward-list',
|
||||
method: 'get'
|
||||
})
|
||||
url: '/inhospital-charge/register/ward-list',
|
||||
method: 'get',
|
||||
params: { orgId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,56 +72,55 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function doctorList(id) {
|
||||
return request({
|
||||
url: '/inpatient-manage/doctor-list?orgId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询患者相关
|
||||
export function getPatientInfo(id, statusEnum) {
|
||||
return request({
|
||||
url: `/inpatient-manage/admission-one?id=${id}&statusEnum=${statusEnum}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取患者基础信息
|
||||
export function getPatientBasicInfo(patientId) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/patient-info?patientId=${patientId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者入院信息
|
||||
export function getInHospitalInfo(encounterId) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/in-hospital-info?encounterId=${encounterId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取病区床位信息
|
||||
export function getBedInfo(wardBusNo) {
|
||||
return request({
|
||||
url: `/inhospital-charge/register/beds-num?wardBusNo=${wardBusNo}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 住院登记
|
||||
@@ -128,8 +128,8 @@ export function registerInHospital(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/by-cashier',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 无档登记
|
||||
@@ -137,16 +137,16 @@ export function noFilesRegister(data) {
|
||||
return request({
|
||||
url: '/inhospital-charge/register/no-files',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 表单初始化
|
||||
export function patientFormInit() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 合同
|
||||
@@ -154,7 +154,7 @@ export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +164,31 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取患者医保信息
|
||||
export function gerPreInfo(userMaessage) {
|
||||
return request({
|
||||
url: '/yb-inpatient-request/inpatient-per-info',
|
||||
method: 'post',
|
||||
data: userMaessage,
|
||||
});
|
||||
}
|
||||
|
||||
// export function gerPreInfo(userMaessage) {
|
||||
// return request({
|
||||
// url: '/yb-request/per-info',
|
||||
// method: 'post',
|
||||
// params: userMaessage,
|
||||
// });
|
||||
// }
|
||||
|
||||
//获取省市医保字符串
|
||||
export function getProvincesAndCities(encounterId) {
|
||||
return request({
|
||||
url: `/payment/bill/get-encounter-type?encounterId=${encounterId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
title="登记"
|
||||
:registrationType="registrationType"
|
||||
:is-registered="false"
|
||||
@okAct="patientRegisterOK"
|
||||
@cancelAct="cancelAct"
|
||||
:noFile="noFile"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{{ isEditing ? '取消' : '编辑' }}
|
||||
</div> -->
|
||||
<div>
|
||||
<el-radio-group v-model="typeCode">
|
||||
<el-radio-group v-model="typeCode" :disabled="props.isRegistered">
|
||||
<el-radio label="电子凭证" value="01"></el-radio>
|
||||
<el-radio label="医保卡" value="03"></el-radio>
|
||||
<el-radio label="身份证" value="02"></el-radio>
|
||||
@@ -19,6 +19,7 @@
|
||||
<span
|
||||
@click="handleReadCard(typeCode)"
|
||||
style="cursor: pointer; margin: 0 12px 0 30px; color: #409eff"
|
||||
v-if="!props.isRegistered"
|
||||
>
|
||||
{{ '读卡' }}
|
||||
</span>
|
||||
@@ -38,16 +39,22 @@
|
||||
<el-text truncated>患者姓名:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.name || '-' }}</el-text>
|
||||
<el-text truncated>{{ patientInfo?.patientName || '-' }}</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<!-- <el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>费别类型:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.ybClassEnum_enumText || '-' }}</el-text>
|
||||
<!-- TODO -->
|
||||
<svg-icon size="20" icon-class="hipEdit" style="cursor: pointer" @click="changFeeType" />
|
||||
</el-col>
|
||||
<el-text truncated>{{ patientInfo?.ybClassEnum_enumText || '-' }}</el-text> -->
|
||||
<!-- TODO -->
|
||||
<!-- <svg-icon
|
||||
size="20"
|
||||
icon-class="hipEdit"
|
||||
style="cursor: pointer"
|
||||
@click="changFeeType"
|
||||
v-if="!props.isRegistered"
|
||||
/>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
@@ -73,7 +80,7 @@
|
||||
<el-text truncated>年龄:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<el-text truncated>{{ patientInfo?.ageString || '-' }}</el-text>
|
||||
<el-text truncated>{{ patientInfo?.age || '-' }}</el-text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="patientInfos">
|
||||
@@ -87,7 +94,7 @@
|
||||
<el-text truncated>民族:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.nationalityCode || '-' }}</div>
|
||||
<div>{{ getDictLabel(nationality_code, patientInfo?.nationalityCode) || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>国籍:</el-text>
|
||||
@@ -139,7 +146,7 @@
|
||||
<el-text truncated>病人来源:</el-text>
|
||||
</el-col>
|
||||
<el-col :span="4" class="patInfo-value">
|
||||
<div>{{ patientInfo?.organizationId_dictText || '-' }}</div>
|
||||
<div>{{ props.inHospitalInfo?.inHospitalOrgName || '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="2" class="patInfo-label">
|
||||
<el-text truncated>单位名称:</el-text>
|
||||
@@ -150,24 +157,37 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<PatientInfoForm ref="patientInfoFormRef" />
|
||||
<PatientInfoForm ref="patientInfoFormRef" :is-view-mode="props.isRegistered" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { ref, reactive, watch, onMounted } from 'vue';
|
||||
import PatientInfoForm from './patientInfoForm.vue';
|
||||
import { patientlLists, getOrgList } from './api';
|
||||
import { patientlLists, getOrgList, gerPreInfo } from './api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const typeList = ref({});
|
||||
const patientInfoFormRef = ref();
|
||||
let userCardInfo = ref({});
|
||||
const BusiCardInfo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
inHospitalInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
registrationType: {
|
||||
type: [String, Boolean, Number], // 根据实际类型调整
|
||||
default: null, // 或者 false、'' 等
|
||||
@@ -181,11 +201,25 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//待入院,已入院区分
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
inHospitalInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['onChangFeeType']);
|
||||
const registerRef = ref();
|
||||
const typeCode = ref('01');
|
||||
const organization = ref([]);
|
||||
const { nationality_code } = proxy.useDict('nationality_code');
|
||||
|
||||
const readCardLoading = ref(false);
|
||||
const loadingText = ref('正在读取...');
|
||||
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
@@ -242,137 +276,179 @@ const submitForm = async (callback) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
const getDictLabel = (dictList, value) => {
|
||||
if (!dictList || !value) return '';
|
||||
const item = dictList.find((item) => item.value === value);
|
||||
return item ? item.label : value;
|
||||
};
|
||||
async function handleReadCard(value) {
|
||||
if (window.CefSharp === undefined) {
|
||||
alert('请在医保版本中调用读卡功能!');
|
||||
} else {
|
||||
try {
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
// if (window.CefSharp === undefined) {
|
||||
// alert('请在医保版本中调用读卡功能!');
|
||||
// } else {
|
||||
try {
|
||||
// await CefSharp.BindObjectAsync('boundAsync');
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await boundAsync
|
||||
.getInfoByQrCodeAsync(
|
||||
'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
'H22010200672',
|
||||
'01101',
|
||||
userStore.id,
|
||||
userStore.name,
|
||||
'D83',
|
||||
'财务科'
|
||||
)
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(jsonResult);
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await boundAsync
|
||||
.readHeaSecCardAsync(
|
||||
JSON.stringify({
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = res;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
// console.log(
|
||||
// 'jsonResult',
|
||||
// JSON.parse({
|
||||
// IssuingAreaCode: '310000',
|
||||
// SocialSecurityNumber: '371324198810224515',
|
||||
// CardNumber: 'M501A1A78',
|
||||
// CardIdentificationCode: '310000D15600000535925154E880AB97',
|
||||
// Name: '\u5218\u5CF0',
|
||||
// CardResetInfo: '00814A444686603100333E4FA9',
|
||||
// SpecificationVersion: '3.00',
|
||||
// IssuingDate: '20190313',
|
||||
// ExpirationDate: '20290313',
|
||||
// TerminalNumber: '000000000000',
|
||||
// TerminalDeviceNumber: '00041161201901000005',
|
||||
// Code: 0,
|
||||
// ErrorMessage: null,
|
||||
// })
|
||||
// );
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
if (userMessage.certNo) {
|
||||
gerPreInfo(userMessage)
|
||||
// readCardLoading.value = true;
|
||||
// let jsonResult = null;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
|
||||
// 调试日志,检查patientInfo中的值
|
||||
console.log('patientInfo:', props.patientInfo);
|
||||
console.log('patientInfo中的id:', props.patientInfo?.id);
|
||||
console.log('patientInfo中的encounterId:', props.patientInfo?.encounterId);
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
// await boundAsync
|
||||
// .getInfoByQrCodeAsync(
|
||||
|
||||
// )
|
||||
await invokeYbPlugin({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
officeId: 'D83',
|
||||
officeName: '财务科',
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.patientId = res.data.id;
|
||||
form.value.name = res.data.name;
|
||||
form.value.age = res.data.age;
|
||||
form.value.idCard = res.data.idCard;
|
||||
form.value.card = res.data.id;
|
||||
form.value.contractNo = res.data.contractBusNo;
|
||||
form.value.genderEnum = res.data.genderEnum;
|
||||
form.value.ybAreaNo = res.data.contractName;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
console.log(res);
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
console.log('patientInfo中的encounterId:', props.patientInfo);
|
||||
const encounterId = props.inHospitalInfo.encounterId || '1993854019030441985';
|
||||
console.log('1111111111111111111准备使用的encounterId:', encounterId);
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = JSON.stringify(res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
function getPatientForm() {
|
||||
console.log(patientInfoFormRef.value.form);
|
||||
|
||||
return patientInfoFormRef.value.form;
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
// 从patientInfo中获取encounterId,如果没有则尝试从住院号中获取
|
||||
// const encounterId =
|
||||
// props.patientInfo?.encounterId || props.patientInfo?.visitNo || props.patientInfo?.busNo;
|
||||
// console.log('准备使用的encounterId:', encounterId);
|
||||
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
encounterId: encounterId || '1993854019030441985',
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = true;
|
||||
// 调试日志,检查发送给gerPreInfo的参数
|
||||
console.log('发送给gerPreInfo的参数:', userMessage);
|
||||
|
||||
if (userMessage && userMessage.certNo) {
|
||||
gerPreInfo(userMessage)
|
||||
.then((res) => {
|
||||
console.log('gerPreInfo返回结果:', res);
|
||||
if (res && res.code == 200 && res.data) {
|
||||
form.patientId = res.data.id;
|
||||
form.name = res.data.name;
|
||||
form.age = res.data.age;
|
||||
form.idCard = res.data.idCard;
|
||||
form.card = res.data.id;
|
||||
form.contractNo = res.data.contractBusNo;
|
||||
form.genderEnum = res.data.genderEnum;
|
||||
form.ybAreaNo = res.data.contractName;
|
||||
form.encounterId = res.data.encounterId;
|
||||
// 成功获取数据后跳转到 registerEdit 页面,并传递数据
|
||||
// router.push({
|
||||
// name: '/ybmanagement/inhospital/register/edit', // 需要根据实际路由名称调整
|
||||
// params: {
|
||||
// cardData: JSON.stringify(res.data), // 将完整数据作为参数传递
|
||||
// cardType: value, // 卡类型
|
||||
// },
|
||||
// });
|
||||
} else {
|
||||
// 处理无有效数据的情况
|
||||
ElMessage.error('未获取到有效的患者信息');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('gerPreInfo调用失败:', error);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
// 患者费别变更
|
||||
const changFeeType = () => {
|
||||
emits('onChangFeeType');
|
||||
};
|
||||
defineExpose({ submitForm, form, isEditing, getPatientForm });
|
||||
defineExpose({ submitForm, form, isEditing });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -404,4 +480,4 @@ defineExpose({ submitForm, form, isEditing, getPatientForm });
|
||||
font-weight: 700 !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -206,9 +206,9 @@
|
||||
v-model="form.deceasedDate"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
<el-scrollbar height="650px">
|
||||
<PatientInfoComp
|
||||
:patientInfo="props.patientInfo"
|
||||
:inHospitalInfo="props.inHospitalInfo"
|
||||
:registrationType="props.registrationType"
|
||||
:initOptions="initOptions"
|
||||
:noFile="noFile"
|
||||
ref="patientInfoRef"
|
||||
:is-registered="props.isRegistered"
|
||||
@onChangFeeType="onChangFeeType"
|
||||
/>
|
||||
<!-- <PatientRelationList
|
||||
@@ -32,6 +34,7 @@
|
||||
:alreadyEdit="alreadyEdit"
|
||||
:inHospitalInfo="inHospitalInfo"
|
||||
:noFile="noFile"
|
||||
:is-registered="props.isRegistered"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<template v-slot:footer>
|
||||
@@ -45,13 +48,20 @@
|
||||
@input="handleAdvanceInput"
|
||||
:formatter="handleAdvanceFormatter"
|
||||
:parser="handleAdvanceParser"
|
||||
:disabled="alreadyEdit"
|
||||
></el-input>
|
||||
<div
|
||||
class="feeType"
|
||||
:class="currentFeeType == typeitem.type ? 'activeFeeType' : ''"
|
||||
v-for="typeitem in feeTypeOptions"
|
||||
:key="typeitem.type"
|
||||
@click="currentFeeType = typeitem.type"
|
||||
@click="
|
||||
() => {
|
||||
!alreadyEdit && (currentFeeType = typeitem.type);
|
||||
payEnum = typeitem.payEnum;
|
||||
}
|
||||
"
|
||||
:style="{ cursor: alreadyEdit ? 'not-allowed' : 'pointer' }"
|
||||
>
|
||||
<svg-icon
|
||||
:icon-class="typeitem.type"
|
||||
@@ -65,13 +75,9 @@
|
||||
</el-space>
|
||||
</div>
|
||||
<el-button size="fixed" class="margin-left-auto" @click="cancelAct">取消 </el-button>
|
||||
<el-button size="fixed" type="primary" @click="handleSubmit">登记</el-button>
|
||||
<!-- <hip-button size="fixed" type="primary" @click="supplementMi">医保登记</hip-button> -->
|
||||
<!-- <AdvancePayment
|
||||
v-model="advancePaymentVisible"
|
||||
@submitOk="advancePaymentSubmitOk"
|
||||
:money="advance"3
|
||||
/> -->
|
||||
<el-button v-if="!props.isRegistered" size="fixed" type="primary" @click="handleSubmit">
|
||||
登记
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -80,7 +86,10 @@ const { proxy } = getCurrentInstance();
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import PatientInfoComp from './patientInfo.vue';
|
||||
import RegisterForm from './registerForm.vue';
|
||||
import { noFilesRegister, registerInHospital, getInit } from './api';
|
||||
import { noFilesRegister, registerInHospital, getInit, getProvincesAndCities } from './api';
|
||||
import { useRouter } from 'vue-router';
|
||||
import printUtils from '@/utils/printUtils';
|
||||
const router = useRouter();
|
||||
const emits = defineEmits(['okAct', 'cancelAct']);
|
||||
|
||||
const props = defineProps({
|
||||
@@ -103,6 +112,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false, // false 表示待登记,true 表示已登记
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
@@ -122,6 +135,7 @@ import { ElMessage } from 'element-plus';
|
||||
const width = '1128px';
|
||||
const patientApiInfo = ref({});
|
||||
const initOptions = ref({});
|
||||
const payEnum = ref(220400);
|
||||
|
||||
/* 取消 */
|
||||
const cancelAct = () => {
|
||||
@@ -131,12 +145,31 @@ const patientInfoRef = ref();
|
||||
|
||||
/* 预交金 */
|
||||
const advancePaymentVisible = ref(false);
|
||||
/* 保存 */
|
||||
const jumpToYbRegisterEdit = () => {
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
query: {
|
||||
encounterId: '1993854019030441985',
|
||||
},
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('跳转医保登记页面失败:', error);
|
||||
});
|
||||
};
|
||||
/* 登记 */
|
||||
const handleSubmit = () => {
|
||||
let params = {};
|
||||
let params = {
|
||||
inHospitalInfo: {},
|
||||
payEnum: 0,
|
||||
};
|
||||
params.inHospitalInfo.payEnum = payEnum.value;
|
||||
params.payEnum = payEnum.value;
|
||||
debugger;
|
||||
if (props.noFile) {
|
||||
RegisterFormRef.value.validateData(async () => {
|
||||
params.inHospitalInfo = RegisterFormRef.value.submitForm;
|
||||
params.inHospitalInfo.payEnum = payEnum.value;
|
||||
params.patientInformation = patientInfoRef.value.getPatientForm();
|
||||
if (params.patientInformation.idCard) {
|
||||
// 验证身份证号长度是否为18位
|
||||
@@ -151,13 +184,57 @@ const handleSubmit = () => {
|
||||
}
|
||||
}
|
||||
console.log('params', params);
|
||||
debugger;
|
||||
params.inHospitalInfo.balanceAmount = advance.value;
|
||||
const performRegistration = () => {
|
||||
noFilesRegister(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
ElMessage.success(res.msg);
|
||||
// 打印预交金收据
|
||||
printDepositReceipt(props.patientInfo, params.inHospitalInfo);
|
||||
// 询问是否需要医保登记
|
||||
ElMessageBox.confirm('是否需要进行医保登记?', '医保登记确认', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
})
|
||||
.then(() => {
|
||||
// 准备传递的数据
|
||||
const cardData = {
|
||||
patientInfo: params.patientInformation,
|
||||
inHospitalInfo: params.inHospitalInfo,
|
||||
encounterId: params.inHospitalInfo.encounterId,
|
||||
};
|
||||
|
||||
// 跳转到医保登记页面
|
||||
try {
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
query: {
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
cardData: encodeURIComponent(JSON.stringify(cardData)),
|
||||
cardType: 'inHospital',
|
||||
operationType: 'HospitalizationRegistration',
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
console.log('路由跳转成功');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('路由跳转失败:', error);
|
||||
ElMessage.error('跳转到医保登记页面失败');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('跳转异常:', error);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消医保登记,关闭当前弹窗
|
||||
emits('okAct');
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
@@ -184,11 +261,60 @@ const handleSubmit = () => {
|
||||
params = { ...params, ...RegisterFormRef.value.submitForm };
|
||||
console.log('params', params);
|
||||
const performRegistration = () => {
|
||||
console.log('params', params);
|
||||
registerInHospital(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emits('okAct');
|
||||
ElMessage.success(res.msg);
|
||||
advancePaymentVisible.value = true;
|
||||
|
||||
// 打印预交金收据
|
||||
printDepositReceipt(
|
||||
props.patientInfo,
|
||||
params,
|
||||
RegisterFormRef.value.medicalInsuranceTitle
|
||||
);
|
||||
|
||||
// 询问是否需要医保登记
|
||||
ElMessageBox.confirm('是否需要进行医保登记?', '医保登记确认', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
})
|
||||
.then(() => {
|
||||
// 准备传递的数据
|
||||
const cardData = {
|
||||
patientInfo: props.patientInfo,
|
||||
inHospitalInfo: params,
|
||||
};
|
||||
|
||||
// 跳转到医保登记页面
|
||||
try {
|
||||
router
|
||||
.push({
|
||||
path: '/ybmanagement/ybInhospital/ybregisterEdit',
|
||||
query: {
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
cardData: encodeURIComponent(JSON.stringify(cardData)),
|
||||
cardType: 'inHospital',
|
||||
operationType: 'HospitalizationRegistration',
|
||||
certType: props.patientInfo.certType,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
console.log('路由跳转成功');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('路由跳转失败:', error);
|
||||
ElMessage.error('跳转到医保登记页面失败');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('跳转异常:', error);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消医保登记,关闭当前弹窗
|
||||
emits('okAct');
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
@@ -239,18 +365,22 @@ const RegisterFormRef = ref();
|
||||
const feeTypeOptions = reactive([
|
||||
{
|
||||
type: 'hipCash',
|
||||
payEnum: 220400,
|
||||
label: '现金',
|
||||
},
|
||||
{
|
||||
type: 'hipAlipay',
|
||||
payEnum: 220200,
|
||||
label: '支付宝',
|
||||
},
|
||||
{
|
||||
type: 'wechat',
|
||||
payEnum: 220100,
|
||||
label: '微信',
|
||||
},
|
||||
{
|
||||
type: 'hipPayCard',
|
||||
payEnum: 220300,
|
||||
label: '银行卡',
|
||||
},
|
||||
]);
|
||||
@@ -279,7 +409,119 @@ const onChangFeeType = () => {
|
||||
medicalInsuranceVisible.value = true;
|
||||
};
|
||||
|
||||
/* */
|
||||
/* 打印预交金收据 */
|
||||
const printDepositReceipt = async (patientInfo, inHospitalInfo, medicalInsuranceTitle) => {
|
||||
try {
|
||||
// 构造支付方式详情文本
|
||||
const paymentDetails = `现金 ${
|
||||
currentFeeType.value === 'hipCash' ? advance.value || '0.00' : '0.00'
|
||||
} 微信 ${currentFeeType.value === 'wechat' ? advance.value || '0.00' : '0.00'} 支付宝 ${
|
||||
currentFeeType.value === 'hipAlipay' ? advance.value || '0.00' : '0.00'
|
||||
} 银行 ${currentFeeType.value === 'hipPayCard' ? advance.value || '0.00' : '0.00'}`;
|
||||
|
||||
// 构造打印数据
|
||||
const printData = {
|
||||
// 患者基本信息
|
||||
patientName: patientInfo.patientName || '', // 姓名
|
||||
patientId: patientInfo.idCard || patientInfo.patientCode || '', // ID号
|
||||
contractName: patientInfo.contractName || '自费', // 医保类别
|
||||
|
||||
// 住院信息
|
||||
encounterNo: inHospitalInfo.encounterNo || '', // 住院号
|
||||
inHospitalOrgName: inHospitalInfo.inHospitalOrgName || '', // 机构名称
|
||||
|
||||
// 费用信息
|
||||
balanceAmount: advance.value || '0.00', // 金额
|
||||
amountInWords: convertToChineseNumber(advance.value || '0.00'), // 人民币大写
|
||||
|
||||
// 支付方式详情
|
||||
paymentDetails: paymentDetails,
|
||||
|
||||
// 时间信息
|
||||
currentTime: new Date().toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
}),
|
||||
|
||||
// 其他信息
|
||||
cashier: userStore?.nickName || '', // 收款人(收费员)
|
||||
medicalInsuranceTitle: medicalInsuranceTitle || '', // 医保标题信息
|
||||
};
|
||||
|
||||
console.log(printData, 'dayin 预交金printData');
|
||||
|
||||
// 直接导入并使用指定的预交金打印模板
|
||||
const templateModule = await import('@/components/Print/AdvancePayment.json');
|
||||
let template = templateModule.default || templateModule;
|
||||
|
||||
// 使用printUtils执行打印
|
||||
await printUtils.executePrint(printData, template);
|
||||
console.log('预交金收据打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
ElMessage.error('打印失败: ' + error.message);
|
||||
}
|
||||
};
|
||||
|
||||
/* 将数字转换为人民币大写 */
|
||||
const convertToChineseNumber = (amount) => {
|
||||
// 数字转大写
|
||||
const digits = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
||||
const units = ['', '拾', '佰', '仟', '万', '拾', '佰', '仟', '亿'];
|
||||
const decimalUnits = ['角', '分'];
|
||||
|
||||
let [integer, decimal] = amount.toString().split('.');
|
||||
decimal = decimal || '00';
|
||||
decimal = decimal.padEnd(2, '0').substring(0, 2);
|
||||
|
||||
let result = '';
|
||||
|
||||
// 处理整数部分
|
||||
if (parseInt(integer) === 0) {
|
||||
result += '零元';
|
||||
} else {
|
||||
for (let i = 0; i < integer.length; i++) {
|
||||
const digit = parseInt(integer[i]);
|
||||
const position = integer.length - i - 1;
|
||||
|
||||
if (digit !== 0) {
|
||||
result += digits[digit] + units[position];
|
||||
} else {
|
||||
// 避免连续的零
|
||||
if (i > 0 && parseInt(integer[i - 1]) !== 0) {
|
||||
result += digits[digit];
|
||||
}
|
||||
// 但需要保留万、亿等单位
|
||||
if (position % 4 === 0 && position > 0) {
|
||||
result += units[position];
|
||||
}
|
||||
}
|
||||
}
|
||||
result += '元';
|
||||
}
|
||||
|
||||
// 处理小数部分
|
||||
if (parseInt(decimal) === 0) {
|
||||
result += '整';
|
||||
} else {
|
||||
if (parseInt(decimal[0]) > 0) {
|
||||
result += digits[parseInt(decimal[0])] + decimalUnits[0];
|
||||
}
|
||||
if (parseInt(decimal[1]) > 0) {
|
||||
result += digits[parseInt(decimal[1])] + decimalUnits[1];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/* 导入用户信息 */
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.patientRegister-container {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
ref="registerRef"
|
||||
label-width="80px"
|
||||
:rules="rules"
|
||||
:disabled="props.isRegistered"
|
||||
>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="6">
|
||||
@@ -28,6 +29,7 @@
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="submitForm.inHospitalOrgId"
|
||||
:disabled="props.isRegistered"
|
||||
filterable
|
||||
:data="organization"
|
||||
:props="{
|
||||
@@ -47,7 +49,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院病区" prop="wardLocationId">
|
||||
<el-select :disabled="props.alreadyEdit" v-model="submitForm.wardLocationId">
|
||||
<el-select
|
||||
:disabled="props.isRegistered || !submitForm.inHospitalOrgId"
|
||||
v-model="submitForm.wardLocationId"
|
||||
placeholder="请先选择入院科室"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wardListOptions"
|
||||
:key="item.id"
|
||||
@@ -74,6 +80,7 @@
|
||||
<el-form-item label="诊断类别" prop="medTypeCode">
|
||||
<el-select
|
||||
v-model="submitForm.medTypeCode"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="诊断类别"
|
||||
clearable
|
||||
filterable
|
||||
@@ -101,6 +108,7 @@
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="入院诊断"
|
||||
clearable
|
||||
filterable
|
||||
@@ -124,7 +132,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="患者病情">
|
||||
<el-select v-model="submitForm.priorityEnum">
|
||||
<el-select v-model="submitForm.priorityEnum" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in props.initOptions.priorityEnumList"
|
||||
:key="item.value"
|
||||
@@ -136,7 +144,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院类型" prop="admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in admit_source_code"
|
||||
:key="item.value"
|
||||
@@ -148,7 +156,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院方式" prop="inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in in_way_code"
|
||||
:key="item.value"
|
||||
@@ -164,6 +172,7 @@
|
||||
v-model="submitForm.contractNo"
|
||||
placeholder="费用性质"
|
||||
clearable
|
||||
:disabled="props.isRegistered"
|
||||
@change="getValue"
|
||||
>
|
||||
<el-option
|
||||
@@ -179,6 +188,7 @@
|
||||
<el-form-item label="入院日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="submitForm.startTime"
|
||||
:disabled="props.isRegistered"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="date"
|
||||
placeholder="请选择日期"
|
||||
@@ -198,6 +208,7 @@ import {
|
||||
getBedInfo,
|
||||
getContractList,
|
||||
getDiagnosisDefinitionList,
|
||||
getProvincesAndCities,
|
||||
} from './api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { in_way_code, admit_source_code, med_type } = proxy.useDict(
|
||||
@@ -224,7 +235,7 @@ const props = defineProps({
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
alreadyEdit: {
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
@@ -239,6 +250,7 @@ const wardListOptions = ref([]);
|
||||
const contractList = ref([]);
|
||||
const verificationStatusOptions = ref([]);
|
||||
const diagnosisDefinitionList = ref([]);
|
||||
const wardLoading = ref(false);
|
||||
const rules = reactive({
|
||||
inHospitalOrgId: [
|
||||
{
|
||||
@@ -277,6 +289,41 @@ const rules = reactive({
|
||||
],
|
||||
});
|
||||
|
||||
//获取省市医保字符串
|
||||
const medicalInsuranceTitle = ref('');
|
||||
|
||||
// 暴露给父组件使用
|
||||
// defineExpose({
|
||||
// medicalInsuranceTitle,
|
||||
// });
|
||||
const getProvincesAndCitiesInfo = async () => {
|
||||
try {
|
||||
const res = await getProvincesAndCities(props.inHospitalInfo.encounterId);
|
||||
// console.log('获取省市医保字符串', res);
|
||||
if (res && res.code == 200) {
|
||||
// 确保有数据时才更新
|
||||
medicalInsuranceTitle.value = res.data?.insutype || res.data || '';
|
||||
}
|
||||
} catch (error) {
|
||||
// 静默处理错误,确保页面不会显示错误信息
|
||||
console.error('获取医保省市信息失败:', error);
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getProvincesAndCitiesInfo();
|
||||
});
|
||||
|
||||
// 监听inHospitalInfo.encounterId的变化,在弹窗打开时重新调用接口
|
||||
watch(
|
||||
() => props.inHospitalInfo.encounterId,
|
||||
(newEncounterId) => {
|
||||
if (newEncounterId) {
|
||||
getProvincesAndCitiesInfo();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/* 提交表单 */
|
||||
const submitForm = reactive({
|
||||
inHospitalOrgId: props.inHospitalInfo.inHospitalOrgId,
|
||||
@@ -289,25 +336,50 @@ const submitForm = reactive({
|
||||
ambDiagnosisName: props.inHospitalInfo.ambDiagnosisName,
|
||||
medTypeCode: '21',
|
||||
});
|
||||
/* 科室 病区 */
|
||||
// /* 科室 病区 */
|
||||
// watch(
|
||||
// () => submitForm.inDocterWorkGroupCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// if (newValue == '') {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// } else {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
// watch(
|
||||
// () => submitForm.inNurseDeptCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// getBedInfo(newValue);
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
watch(
|
||||
() => submitForm.inDocterWorkGroupCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
if (newValue == '') {
|
||||
submitForm.wardLocationId = '';
|
||||
() => submitForm.wardLocationId,
|
||||
(newWardId) => {
|
||||
if (newWardId && wardListOptions.value.length > 0) {
|
||||
const selectedWard = wardListOptions.value.find((item) => item.id === newWardId);
|
||||
if (selectedWard) {
|
||||
handleWardClick(selectedWard);
|
||||
}
|
||||
} else {
|
||||
submitForm.wardLocationId = '';
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => submitForm.inNurseDeptCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
getBedInfo(newValue);
|
||||
() => props.isRegistered,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
// 已登记状态可以做一些数据锁定操作
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -315,25 +387,51 @@ watch(
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
setValue();
|
||||
setDefaultAdmitSource();
|
||||
if (submitForm.inHospitalOrgId) {
|
||||
handleNodeClick({ id: submitForm.inHospitalOrgId });
|
||||
}
|
||||
});
|
||||
|
||||
const setDefaultAdmitSource = () => {
|
||||
if (props.noFile) return;
|
||||
const defaultItem = admit_source_code.value.find((item) => item.value === '1');
|
||||
if (defaultItem) {
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode || defaultItem.value;
|
||||
}
|
||||
};
|
||||
function handleWardClick(item) {
|
||||
submitForm.wardBusNo = item.busNo;
|
||||
getBedInfo(submitForm.wardBusNo).then((res) => {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
});
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
getBedInfo(submitForm.wardBusNo)
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
} else {
|
||||
submitForm.totalBedsNum = 0;
|
||||
submitForm.idleBedsNum = 0;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('查询病床失败:', err);
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
});
|
||||
}
|
||||
|
||||
function getInitOptions() {
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
});
|
||||
if (!props.noFile) {
|
||||
wardList().then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
// if (!props.noFile) {
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
// }
|
||||
diagnosisInit().then((res) => {
|
||||
verificationStatusOptions.value = res.data.verificationStatusOptions;
|
||||
});
|
||||
@@ -350,15 +448,40 @@ function getDiagnosisInfo(value) {
|
||||
}
|
||||
|
||||
function handleNodeClick(orgInfo) {
|
||||
wardList({ orgId: orgInfo.id }).then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
submitForm.wardLocationId = undefined; // 切换科室时,先清空原有病区
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardListOptions.value = []; // 先清空列表,避免旧数据残留
|
||||
wardLoading.value = true;
|
||||
wardList({ orgId: orgInfo.id })
|
||||
.then((res) => {
|
||||
wardListOptions.value = res.data || [];
|
||||
if (wardListOptions.value.length > 0 && !props.inHospitalInfo.wardLocationId) {
|
||||
submitForm.wardLocationId = wardListOptions.value[0].id;
|
||||
const defaultWard = wardListOptions.value.find(
|
||||
(item) => item.id === submitForm.wardLocationId
|
||||
);
|
||||
if (defaultWard) {
|
||||
handleWardClick(defaultWard);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('加载病区失败:', err);
|
||||
wardListOptions.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
wardLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
if (!value) {
|
||||
wardListOptions.value = [];
|
||||
submitForm.wardLocationId = undefined;
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardLoading.value = false; // 同步停止加载
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +508,7 @@ function setValue() {
|
||||
submitForm.ambDiagnosisName = props.inHospitalInfo?.ambDiagnosisName;
|
||||
submitForm.priorityEnum = props.inHospitalInfo?.priorityEnum;
|
||||
submitForm.priorityEnum_enumText = props.inHospitalInfo?.priorityEnum_enumText;
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
// submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
submitForm.admitSourceCode_dictText = props.inHospitalInfo?.admitSourceCode_dictText;
|
||||
submitForm.inWayCode = props.inHospitalInfo?.inWayCode;
|
||||
submitForm.inWayCode_dictText = props.inHospitalInfo?.inWayCode_dictText;
|
||||
@@ -406,10 +529,13 @@ const validateData = async (callback) => {
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
if (!props.isRegistered) {
|
||||
// 只有待登记状态才重置
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
}
|
||||
};
|
||||
defineExpose({ validateData, submitForm, init });
|
||||
defineExpose({ validateData, submitForm, init, medicalInsuranceTitle });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.registerForm-container {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container">
|
||||
<el-form :model="state.form">
|
||||
<div class="record-container">
|
||||
<div class="title">演示医院</div>
|
||||
<div class="title">长春市朝阳区中医院</div>
|
||||
<div class="subtitle">入院记录</div>
|
||||
<div class="header">
|
||||
<span>姓名: [<el-input v-model="state.form.name" class="inline-input" />]</span>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function getPatientList(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/reg-patient-zk',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
@@ -16,8 +16,8 @@ export function saveDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,8 +27,8 @@ export function saveDiagnosisBind(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除诊断绑定
|
||||
@@ -37,7 +37,7 @@ export function deleteDiagnosisBind(id) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,8 +47,8 @@ export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ export function getConditionDefinitionInfo(patientId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,29 +68,29 @@ export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 获取诊断回显数据
|
||||
*/
|
||||
export function getEncounterDiagnosis(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 删除就诊诊断
|
||||
*/
|
||||
export function delEncounterDiagnosis(conditionId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/encounter-diagnosis?conditionId=' + conditionId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,8 +100,8 @@ export function getTcmCondition(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/condition-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,8 +111,8 @@ export function getTcmSyndrome(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/syndrome-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,8 +122,8 @@ export function getTcmDiagnosis(params) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/get-tcm-encounter-diagnosis',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,8 +133,8 @@ export function saveTcmDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/chinese-medical/save-tcm-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取人员慢性病诊断
|
||||
@@ -143,11 +143,10 @@ export function getChronicDisease(params) {
|
||||
return request({
|
||||
url: '/yb-request/getConditionDefinition',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取药品列表
|
||||
*/
|
||||
@@ -155,8 +154,8 @@ export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,8 +165,8 @@ export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/save-reg-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 签发处方
|
||||
@@ -176,8 +175,8 @@ export function savePrescriptionSign(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/sign-reg-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 处方签退
|
||||
@@ -186,8 +185,8 @@ export function singOut(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/sign-off-reg',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 停嘱
|
||||
@@ -196,8 +195,8 @@ export function stopAdvice(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/stop-reg-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
@@ -206,7 +205,7 @@ export function getPrescriptionList(encounterId) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/advice-manage/reg-request-base-info?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -216,8 +215,8 @@ export function getContract(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/get-encounter-contract',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,7 +226,7 @@ export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,6 +236,28 @@ export function updateGroupId(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/update-groupid',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目绑定信息
|
||||
*/
|
||||
export function getBindDevice(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/order-bind-info',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 出院
|
||||
*/
|
||||
export function leaveHospital(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/leave-hospital-orders',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 申请单相关接口
|
||||
|
||||
/**
|
||||
@@ -9,8 +8,8 @@ export function getCheck(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-check',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询检验申请单
|
||||
@@ -19,8 +18,8 @@ export function getInspection(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-inspection',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询输血申请单
|
||||
@@ -29,8 +28,8 @@ export function getBloodTransfusion(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-blood-transfusion',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询手术申请单
|
||||
@@ -39,19 +38,18 @@ export function getSurgery(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-surgery',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询护理医嘱信息
|
||||
*/
|
||||
export function getNursingOrdersInfos() {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/nursing-orders',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,8 +69,8 @@ export function saveNursingOrders(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/nursing-orders',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,8 +80,28 @@ export function getEncounterNursingOrders(params) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/encounter-nursing-orders',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验报告 url
|
||||
*/
|
||||
export function getProofResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/proof-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查报告 url
|
||||
*/
|
||||
export function getTestResult(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/test-result',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,87 +1,287 @@
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-05 21:16:06
|
||||
* @Description: 输血申请详情
|
||||
-->
|
||||
<template>
|
||||
<div class="applicationShow-container">
|
||||
<div class="applicationShow-container-header">
|
||||
<el-button @click="getInfo">刷新</el-button>
|
||||
</div>
|
||||
<div class="applicationShow-container-content">
|
||||
<el-descriptions title="输血申请详情" :column="2">
|
||||
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
|
||||
<el-descriptions-item label="患者姓名">{{ patientInfoValue?.patientName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="患者性别">{{ patientInfoValue?.patientSex || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="患者年龄">{{ patientInfoValue?.patientAge || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="患者手机号">{{ patientInfoValue?.patientPhone || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="患者身份证号">{{ patientInfoValue?.patientIdCard || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="患者地址">{{ patientInfoValue?.patientAddress || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="applicationShow-container-table">
|
||||
<el-table :data="dataList">
|
||||
<el-table-column label="医嘱名称" prop="adviceName" />
|
||||
<el-table-column label="输血数量" prop="adviceDefinitionId" />
|
||||
</el-table>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>输血申请</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loading }"
|
||||
@click="handleRefresh"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
title="输血申请详情"
|
||||
width="800px"
|
||||
destroy-on-close
|
||||
top="5vh"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div v-if="currentDetail" class="applicationShow-container">
|
||||
<div class="applicationShow-container-content">
|
||||
<el-descriptions title="基本信息" :column="2">
|
||||
<el-descriptions-item label="患者姓名">{{
|
||||
currentDetail.patientName || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单名称">{{
|
||||
currentDetail.name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
currentDetail.createTime || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="处方号">{{
|
||||
currentDetail.prescriptionNo || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请者">{{
|
||||
currentDetail.requesterId_dictText || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊ID">{{
|
||||
currentDetail.encounterId || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单ID">{{
|
||||
currentDetail.requestFormId || '-'
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="descJsonData && hasMatchedFields" class="applicationShow-container-content">
|
||||
<el-descriptions title="申请单描述" :column="2">
|
||||
<template v-for="(value, key) in descJsonData" :key="key">
|
||||
<el-descriptions-item v-if="isFieldMatched(key)" :label="getFieldLabel(key)">
|
||||
{{ value || '-' }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentDetail.requestFormDetailList && currentDetail.requestFormDetailList.length"
|
||||
class="applicationShow-container-table"
|
||||
>
|
||||
<el-table :data="currentDetail.requestFormDetailList" border>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="医嘱名称" />
|
||||
<el-table-column prop="quantity" label="数量" width="80" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" width="100" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue'
|
||||
import { getBloodTransfusion } from './api';
|
||||
import { getCurrentInstance, ref, watch, computed } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import { getBloodTransfusion } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([])
|
||||
const props = defineProps({
|
||||
|
||||
})
|
||||
const state = reactive({
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const detailDialogVisible = ref(false);
|
||||
const currentDetail = ref(null);
|
||||
const descJsonData = ref(null);
|
||||
|
||||
})
|
||||
|
||||
// 使用计算属性确保安全访问
|
||||
const patientInfoValue = computed(() => {
|
||||
return patientInfo.value || {};
|
||||
});
|
||||
|
||||
const dataList = ref([])
|
||||
const getInfo = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getBloodTransfusion({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
dataList.value = res.data
|
||||
} else {
|
||||
}
|
||||
});
|
||||
const fetchData = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
tableData.value = [];
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getBloodTransfusion({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
tableData.value = list.filter(Boolean);
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询输血申请失败');
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
onBeforeMount(() => {
|
||||
|
||||
})
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
defineExpose({ state })
|
||||
const handleRefresh = async () => {
|
||||
if (loading.value || !patientInfo.value?.encounterId) return;
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
symptom: '症状',
|
||||
sign: '体征',
|
||||
clinicalDiagnosis: '临床诊断',
|
||||
otherDiagnosis: '其他诊断',
|
||||
relatedResult: '相关结果',
|
||||
attention: '注意事项',
|
||||
};
|
||||
|
||||
const isFieldMatched = (key) => {
|
||||
return key in labelMap;
|
||||
};
|
||||
|
||||
const getFieldLabel = (key) => {
|
||||
return labelMap[key] || key;
|
||||
};
|
||||
|
||||
const hasMatchedFields = computed(() => {
|
||||
if (!descJsonData.value) return false;
|
||||
return Object.keys(descJsonData.value).some((key) => isFieldMatched(key));
|
||||
});
|
||||
|
||||
const handleViewDetail = (row) => {
|
||||
currentDetail.value = row;
|
||||
// 解析 descJson
|
||||
if (row.descJson) {
|
||||
try {
|
||||
descJsonData.value = JSON.parse(row.descJson);
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
descJsonData.value = null;
|
||||
}
|
||||
} else {
|
||||
descJsonData.value = null;
|
||||
}
|
||||
detailDialogVisible.value = true;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => patientInfo.value?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchData();
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
refresh: fetchData,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-refresh-icon.is-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.applicationShow-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
max-height: 70vh;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.applicationShow-container-header{
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap:8px;
|
||||
padding: 0 16px;
|
||||
.applicationShow-container-content {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.applicationShow-container-content{
|
||||
flex: 1;
|
||||
}
|
||||
.applicationShow-container-table{
|
||||
height: 400px;
|
||||
flex:auto
|
||||
|
||||
.applicationShow-container-table {
|
||||
flex-shrink: 0;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -4,42 +4,284 @@
|
||||
* @Description: 检查申请详情
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<el-button @click="getInfo">查询</el-button>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检查申请</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loading }"
|
||||
@click="handleRefresh"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
title="检查申请详情"
|
||||
width="800px"
|
||||
destroy-on-close
|
||||
top="5vh"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div v-if="currentDetail" class="applicationShow-container">
|
||||
<div class="applicationShow-container-content">
|
||||
<el-descriptions title="基本信息" :column="2">
|
||||
<el-descriptions-item label="患者姓名">{{
|
||||
currentDetail.patientName || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单名称">{{
|
||||
currentDetail.name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
currentDetail.createTime || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="处方号">{{
|
||||
currentDetail.prescriptionNo || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请者">{{
|
||||
currentDetail.requesterId_dictText || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊ID">{{
|
||||
currentDetail.encounterId || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单ID">{{
|
||||
currentDetail.requestFormId || '-'
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="descJsonData && hasMatchedFields" class="applicationShow-container-content">
|
||||
<el-descriptions title="申请单描述" :column="2">
|
||||
<template v-for="(value, key) in descJsonData" :key="key">
|
||||
<el-descriptions-item v-if="isFieldMatched(key)" :label="getFieldLabel(key)">
|
||||
{{ value || '-' }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentDetail.requestFormDetailList && currentDetail.requestFormDetailList.length"
|
||||
class="applicationShow-container-table"
|
||||
>
|
||||
<el-table :data="currentDetail.requestFormDetailList" border>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="医嘱名称" />
|
||||
<el-table-column prop="quantity" label="数量" width="80" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" width="100" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup >
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
|
||||
import { getCheck } from './api';
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch, computed } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([])
|
||||
const props = defineProps({
|
||||
|
||||
})
|
||||
const state = reactive({
|
||||
|
||||
})
|
||||
const getInfo = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getCheck({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
} else {
|
||||
}
|
||||
});
|
||||
import { getCheck } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const detailDialogVisible = ref(false);
|
||||
const currentDetail = ref(null);
|
||||
const descJsonData = ref(null);
|
||||
|
||||
const fetchData = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
tableData.value = [];
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getCheck({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
tableData.value = list.filter(Boolean);
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询检查申请失败');
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
onBeforeMount(() => {
|
||||
|
||||
})
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
defineExpose({ state })
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
const handleRefresh = async () => {
|
||||
if (loading.value || !patientInfo.value?.encounterId) return;
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
symptom: '症状',
|
||||
sign: '体征',
|
||||
clinicalDiagnosis: '临床诊断',
|
||||
otherDiagnosis: '其他诊断',
|
||||
relatedResult: '相关结果',
|
||||
attention: '注意事项',
|
||||
};
|
||||
|
||||
const isFieldMatched = (key) => {
|
||||
return key in labelMap;
|
||||
};
|
||||
|
||||
const getFieldLabel = (key) => {
|
||||
return labelMap[key] || key;
|
||||
};
|
||||
|
||||
const hasMatchedFields = computed(() => {
|
||||
if (!descJsonData.value) return false;
|
||||
return Object.keys(descJsonData.value).some((key) => isFieldMatched(key));
|
||||
});
|
||||
|
||||
const handleViewDetail = (row) => {
|
||||
currentDetail.value = row;
|
||||
// 解析 descJson
|
||||
if (row.descJson) {
|
||||
try {
|
||||
descJsonData.value = JSON.parse(row.descJson);
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
descJsonData.value = null;
|
||||
}
|
||||
} else {
|
||||
descJsonData.value = null;
|
||||
}
|
||||
detailDialogVisible.value = true;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => patientInfo.value?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchData();
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
refresh: fetchData,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-refresh-icon.is-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.applicationShow-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 70vh;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.applicationShow-container-content {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.applicationShow-container-table {
|
||||
flex-shrink: 0;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
<el-table-column prop="item" label="项目" width="180" align="center" />
|
||||
<el-table-column prop="currentStatus" label="当前状态" width="260" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getStatusType(scope.row.currentStatus)" size="small" class="status-tag">
|
||||
<el-tag
|
||||
v-if="scope.row.currentStatus"
|
||||
:type="getStatusType(scope.row.currentStatus)"
|
||||
size="small"
|
||||
class="status-tag"
|
||||
>
|
||||
{{ scope.row.currentStatus }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -139,8 +144,8 @@
|
||||
</el-table>
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="nursing-status-actions">
|
||||
<el-button @click="handleCancel" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm" size="small">确定</el-button>
|
||||
<el-button @click="handleCancel" size="medium">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm" size="medium">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -376,8 +381,17 @@ const fetchNursingStatusData = () => {
|
||||
loading.value = false;
|
||||
|
||||
if (res.code === 200 && res.data) {
|
||||
let nursingList = [];
|
||||
let nursingOrderNameList = ['I级护理', 'II级护理', 'III级护理', '特级护理'];
|
||||
nursingOrderNameList.forEach((str) => {
|
||||
(res.data.nursingList || []).forEach((item) => {
|
||||
if (item.nursingOrderName == str) {
|
||||
nursingList.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
// 填充各列表数据
|
||||
nursingLevelList.value = res.data.nursingList || [];
|
||||
nursingLevelList.value = nursingList || [];
|
||||
conditionList.value = res.data.conditionList || [];
|
||||
dietList.value = res.data.dietList || [];
|
||||
positionList.value = res.data.positionList || [];
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检查报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingCheck }"
|
||||
@click="handleRefreshCheck"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingCheck"
|
||||
:data="checkReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检验报告</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loadingInspection }"
|
||||
@click="handleRefreshInspection"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loadingInspection"
|
||||
:data="inspectionReportList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="报告名称" width="140" />
|
||||
<el-table-column prop="reportNo" label="报告号" width="140" />
|
||||
<el-table-column label="链接" min-width="140">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.requestUrl"
|
||||
class="report-link"
|
||||
:href="scope.row.requestUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
查看报告
|
||||
</a>
|
||||
<span v-else class="report-link-disabled">暂无链接</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import { getProofResult, getTestResult } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const checkReportList = ref([]);
|
||||
const inspectionReportList = ref([]);
|
||||
const loadingCheck = ref(false);
|
||||
const loadingInspection = ref(false);
|
||||
|
||||
const fetchCheckReport = async () => {
|
||||
if (!patientInfo.value?.encounterId) return;
|
||||
const res = await getTestResult({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
checkReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchInspectionReport = async () => {
|
||||
if (!patientInfo.value?.encounterId) return;
|
||||
const res = await getProofResult({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
inspectionReportList.value = list.filter(Boolean).map((item) => ({
|
||||
reportNo: item.busNo,
|
||||
requestUrl: item.requestUrl,
|
||||
adviceName: item.adviceName,
|
||||
_raw: item,
|
||||
}));
|
||||
} else {
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const fetchAll = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
return;
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
if (loadingCheck.value || !patientInfo.value?.encounterId) return;
|
||||
loadingCheck.value = true;
|
||||
try {
|
||||
await fetchCheckReport();
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefreshInspection = async () => {
|
||||
if (loadingInspection.value || !patientInfo.value?.encounterId) return;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await fetchInspectionReport();
|
||||
} finally {
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => patientInfo.value?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchAll();
|
||||
} else {
|
||||
checkReportList.value = [];
|
||||
inspectionReportList.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
max-height: 55%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.report-link-disabled {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
@@ -4,33 +4,284 @@
|
||||
* @Description: 手术申请详情
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<el-button @click="getInfo">查询</el-button>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>手术申请</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loading }"
|
||||
@click="handleRefresh"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
title="手术申请详情"
|
||||
width="800px"
|
||||
destroy-on-close
|
||||
top="5vh"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div v-if="currentDetail" class="applicationShow-container">
|
||||
<div class="applicationShow-container-content">
|
||||
<el-descriptions title="基本信息" :column="2">
|
||||
<el-descriptions-item label="患者姓名">{{
|
||||
currentDetail.patientName || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单名称">{{
|
||||
currentDetail.name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
currentDetail.createTime || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="处方号">{{
|
||||
currentDetail.prescriptionNo || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请者">{{
|
||||
currentDetail.requesterId_dictText || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊ID">{{
|
||||
currentDetail.encounterId || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单ID">{{
|
||||
currentDetail.requestFormId || '-'
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="descJsonData && hasMatchedFields" class="applicationShow-container-content">
|
||||
<el-descriptions title="申请单描述" :column="2">
|
||||
<template v-for="(value, key) in descJsonData" :key="key">
|
||||
<el-descriptions-item v-if="isFieldMatched(key)" :label="getFieldLabel(key)">
|
||||
{{ value || '-' }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentDetail.requestFormDetailList && currentDetail.requestFormDetailList.length"
|
||||
class="applicationShow-container-table"
|
||||
>
|
||||
<el-table :data="currentDetail.requestFormDetailList" border>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="医嘱名称" />
|
||||
<el-table-column prop="quantity" label="数量" width="80" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" width="100" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
|
||||
import { getSurgery } from './api';
|
||||
import { getCurrentInstance, ref, watch, computed } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import { getSurgery } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({});
|
||||
const state = reactive({});
|
||||
const getInfo = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getSurgery({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const detailDialogVisible = ref(false);
|
||||
const currentDetail = ref(null);
|
||||
const descJsonData = ref(null);
|
||||
|
||||
const fetchData = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
tableData.value = [];
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getSurgery({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
tableData.value = list.filter(Boolean);
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询手术申请失败');
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getInfo();
|
||||
|
||||
const handleRefresh = async () => {
|
||||
if (loading.value || !patientInfo.value?.encounterId) return;
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
symptom: '症状',
|
||||
sign: '体征',
|
||||
clinicalDiagnosis: '临床诊断',
|
||||
otherDiagnosis: '其他诊断',
|
||||
relatedResult: '相关结果',
|
||||
attention: '注意事项',
|
||||
};
|
||||
|
||||
const isFieldMatched = (key) => {
|
||||
return key in labelMap;
|
||||
};
|
||||
|
||||
const getFieldLabel = (key) => {
|
||||
return labelMap[key] || key;
|
||||
};
|
||||
|
||||
const hasMatchedFields = computed(() => {
|
||||
if (!descJsonData.value) return false;
|
||||
return Object.keys(descJsonData.value).some((key) => isFieldMatched(key));
|
||||
});
|
||||
|
||||
const handleViewDetail = (row) => {
|
||||
currentDetail.value = row;
|
||||
// 解析 descJson
|
||||
if (row.descJson) {
|
||||
try {
|
||||
descJsonData.value = JSON.parse(row.descJson);
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
descJsonData.value = null;
|
||||
}
|
||||
} else {
|
||||
descJsonData.value = null;
|
||||
}
|
||||
detailDialogVisible.value = true;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => patientInfo.value?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchData();
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
refresh: fetchData,
|
||||
});
|
||||
defineExpose({ state });
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-refresh-icon.is-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.applicationShow-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 70vh;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.applicationShow-container-content {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.applicationShow-container-table {
|
||||
flex-shrink: 0;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,34 +4,284 @@
|
||||
* @Description: 检验申请
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<el-button @click="getInfo">查询</el-button>
|
||||
<div class="report-container">
|
||||
<div class="report-section">
|
||||
<div class="report-title">
|
||||
<span>检验申请</span>
|
||||
<el-icon
|
||||
class="report-refresh-icon"
|
||||
:class="{ 'is-loading': loading }"
|
||||
@click="handleRefresh"
|
||||
>
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
title="检验申请详情"
|
||||
width="800px"
|
||||
destroy-on-close
|
||||
top="5vh"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div v-if="currentDetail" class="applicationShow-container">
|
||||
<div class="applicationShow-container-content">
|
||||
<el-descriptions title="基本信息" :column="2">
|
||||
<el-descriptions-item label="患者姓名">{{
|
||||
currentDetail.patientName || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单名称">{{
|
||||
currentDetail.name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
currentDetail.createTime || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="处方号">{{
|
||||
currentDetail.prescriptionNo || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请者">{{
|
||||
currentDetail.requesterId_dictText || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊ID">{{
|
||||
currentDetail.encounterId || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单ID">{{
|
||||
currentDetail.requestFormId || '-'
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="descJsonData && hasMatchedFields" class="applicationShow-container-content">
|
||||
<el-descriptions title="申请单描述" :column="2">
|
||||
<template v-for="(value, key) in descJsonData" :key="key">
|
||||
<el-descriptions-item v-if="isFieldMatched(key)" :label="getFieldLabel(key)">
|
||||
{{ value || '-' }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentDetail.requestFormDetailList && currentDetail.requestFormDetailList.length"
|
||||
class="applicationShow-container-table"
|
||||
>
|
||||
<el-table :data="currentDetail.requestFormDetailList" border>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="adviceName" label="医嘱名称" />
|
||||
<el-table-column prop="quantity" label="数量" width="80" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" width="100" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="100" align="right" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
|
||||
import { getInspection } from './api';
|
||||
import { getCurrentInstance, ref, watch, computed } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import { getInspection } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({});
|
||||
const state = reactive({});
|
||||
const getInfo = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getInspection({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const detailDialogVisible = ref(false);
|
||||
const currentDetail = ref(null);
|
||||
const descJsonData = ref(null);
|
||||
|
||||
const fetchData = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
tableData.value = [];
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getInspection({ encounterId: patientInfo.value.encounterId });
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
tableData.value = list.filter(Boolean);
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询检验申请失败');
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getInfo();
|
||||
const handleRefresh = async () => {
|
||||
if (loading.value || !patientInfo.value?.encounterId) return;
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
symptom: '症状',
|
||||
sign: '体征',
|
||||
clinicalDiagnosis: '临床诊断',
|
||||
otherDiagnosis: '其他诊断',
|
||||
relatedResult: '相关结果',
|
||||
attention: '注意事项',
|
||||
};
|
||||
|
||||
const isFieldMatched = (key) => {
|
||||
return key in labelMap;
|
||||
};
|
||||
|
||||
const getFieldLabel = (key) => {
|
||||
return labelMap[key] || key;
|
||||
};
|
||||
|
||||
const hasMatchedFields = computed(() => {
|
||||
if (!descJsonData.value) return false;
|
||||
return Object.keys(descJsonData.value).some((key) => isFieldMatched(key));
|
||||
});
|
||||
|
||||
const handleViewDetail = (row) => {
|
||||
currentDetail.value = row;
|
||||
// 解析 descJson
|
||||
if (row.descJson) {
|
||||
try {
|
||||
descJsonData.value = JSON.parse(row.descJson);
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
descJsonData.value = null;
|
||||
}
|
||||
} else {
|
||||
descJsonData.value = null;
|
||||
}
|
||||
detailDialogVisible.value = true;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => patientInfo.value?.encounterId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fetchData();
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
refresh: fetchData,
|
||||
});
|
||||
defineExpose({ state });
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.report-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.report-section {
|
||||
background: #fff;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
transition: color 0.2s;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.report-refresh-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.report-refresh-icon.is-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.applicationShow-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 70vh;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.applicationShow-container-content {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.applicationShow-container-table {
|
||||
flex-shrink: 0;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-input>
|
||||
</div>
|
||||
<el-table
|
||||
:data="conditionList"
|
||||
:data="conditionDatas"
|
||||
max-height="460"
|
||||
@row-click="handleClickRow"
|
||||
highlight-current-row
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="syndrome-section">
|
||||
<div class="section-title">证候</div>
|
||||
<div class="search-box">
|
||||
<el-input v-model="searchDisease" placeholder="搜索疾病名称或编码" clearable>
|
||||
<el-input v-model="searchMiddleDisease" placeholder="搜索疾病名称或编码" clearable>
|
||||
<template #prefix>
|
||||
<el-icon><search /></el-icon>
|
||||
</template>
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div v-if="selectedDisease">
|
||||
<el-table
|
||||
:data="syndromeList"
|
||||
:data="syndromeListDatas"
|
||||
max-height="460"
|
||||
@row-click="clickSyndromeRow"
|
||||
highlight-current-row
|
||||
@@ -85,13 +85,14 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getTcmCondition,
|
||||
getTcmSyndrome,
|
||||
saveTcmDiagnosis,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
openAddDiagnosisDialog: {
|
||||
@@ -111,6 +112,8 @@ const tcmDiagonsisSaveList = ref([]);
|
||||
const syndromeSelected = ref(false); // 当前诊断是否选择对应证候
|
||||
const timestamp = ref('');
|
||||
const selectedDisease = ref(false);
|
||||
const searchDisease = ref('');
|
||||
const searchMiddleDisease = ref('');
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
@@ -120,6 +123,26 @@ function handleOpen() {
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索诊断
|
||||
const conditionDatas = computed(() => {
|
||||
return conditionList.value.filter((item) => {
|
||||
if (searchDisease.value) {
|
||||
return searchDisease.value == item.name || searchDisease.value == item.ybNo;
|
||||
}
|
||||
return conditionList;
|
||||
});
|
||||
});
|
||||
|
||||
// 后证
|
||||
const syndromeListDatas = computed(() => {
|
||||
return syndromeList.value.filter((item) => {
|
||||
if (searchMiddleDisease.value) {
|
||||
return searchMiddleDisease.value == item.name || searchMiddleDisease.value == item.ybNo;
|
||||
}
|
||||
return syndromeList;
|
||||
});
|
||||
});
|
||||
|
||||
// 点击诊断列表处理,点击以后才显示证候列表
|
||||
function handleClickRow(row) {
|
||||
if (syndromeSelected.value || tcmDiagonsisList.value == 0) {
|
||||
@@ -156,7 +179,7 @@ function clickSyndromeRow(row) {
|
||||
// 删除诊断
|
||||
function removeDiagnosis(row, index) {
|
||||
tcmDiagonsisList.value.splice(index, 1);
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.filter((item) => {
|
||||
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.value.filter((item) => {
|
||||
return item.syndromeGroupNo !== row.syndromeGroupNo;
|
||||
});
|
||||
}
|
||||
@@ -418,4 +441,4 @@ function close() {
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -3,34 +3,63 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4" :xs="24">
|
||||
<div style="height: 44px; display: flex; align-items: center; flex: none">
|
||||
<el-input v-model="diagnosis" placeholder="诊断名称" clearable style="width: 100%"
|
||||
@keyup.enter="queryDiagnosisUse">
|
||||
<el-input
|
||||
v-model="diagnosis"
|
||||
placeholder="诊断名称"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree ref="treeRef" :data="tree" node-key="id" :props="{ label: 'name', children: 'children' }"
|
||||
highlight-current default-expand-all :filter-node-method="filterNode" @node-click="handleNodeClick">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
node-key="id"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<span class="tree-node-actions">
|
||||
<template v-if="node.level === 1 && data.name != '常用' && data.name != '历史'">
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="addChild(data)"
|
||||
>
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<el-popconfirm width="200" :hide-after="10" title="确认删除此常用诊断吗" placement="top-start"
|
||||
@confirm="deleteChild(data)">
|
||||
<el-popconfirm
|
||||
width="200"
|
||||
:hide-after="10"
|
||||
title="确认删除此常用诊断吗"
|
||||
placement="top-start"
|
||||
@confirm="deleteChild(data)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button style="color: #000000" v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
" type="text" size="small" @click.stop="">
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
v-if="
|
||||
node.level === 2 &&
|
||||
node.parent.data.name != '常用' &&
|
||||
node.parent.data.name != '历史'
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop=""
|
||||
>
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
@@ -46,7 +75,7 @@
|
||||
<div style="height: 44px; display: flex; align-items: center; flex: none">
|
||||
<el-button type="primary" plain @click="handleAddDiagnosis()"> 新增诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleSaveDiagnosis()"> 保存诊断 </el-button>
|
||||
<el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button>
|
||||
<!-- <el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button> -->
|
||||
<el-button type="primary" plain @click="handleImport()"> 导入慢性病诊断 </el-button>
|
||||
</div>
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
@@ -54,17 +83,32 @@
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
|
||||
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
|
||||
style="width: 80px" />
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||
:rules="rules.diagSrtNo"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="scope.row.diagSrtNo"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 80px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.medTypeCode`"
|
||||
:rules="rules.medTypeCode"
|
||||
>
|
||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||
<el-option v-for="item in med_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -72,12 +116,25 @@
|
||||
<el-table-column label="诊断名称" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
trigger="manual" :width="800">
|
||||
<diagnosislist :diagnosisSearchkey="diagnosisSearchkey" @selectDiagnosis="handleSelsectDiagnosis" />
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="800"
|
||||
>
|
||||
<diagnosislist
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="handleSelsectDiagnosis"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
<el-input
|
||||
v-model="scope.row.name"
|
||||
placeholder="请选择诊断"
|
||||
@input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
@@ -86,18 +143,37 @@
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
<template #default="scope">
|
||||
<el-checkbox label="主诊断" :trueLabel="1" :falseLabel="0" v-model="scope.row.maindiseFlag" border
|
||||
size="small" @change="(value) => handleMaindise(value, scope.$index)" />
|
||||
<el-select v-model="scope.row.verificationStatusEnum" placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px" size="small">
|
||||
<el-option v-for="item in diagnosisOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
:trueLabel="1"
|
||||
:falseLabel="0"
|
||||
v-model="scope.row.maindiseFlag"
|
||||
border
|
||||
size="small"
|
||||
@change="(value) => handleMaindise(value, scope.$index)"
|
||||
/>
|
||||
<el-select
|
||||
v-model="scope.row.verificationStatusEnum"
|
||||
placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleDeleteDiagnosis(scope.row, scope.$index)">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDeleteDiagnosis(scope.row, scope.$index)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -106,9 +182,16 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
:radio="orgOrUser"
|
||||
/>
|
||||
<AddDiagnosisDialog
|
||||
:openAddDiagnosisDialog="openAddDiagnosisDialog"
|
||||
:patientInfo="patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -124,10 +207,12 @@ import {
|
||||
getTcmDiagnosis,
|
||||
delEncounterDiagnosis,
|
||||
} from '../api';
|
||||
import { deleteTcmDiagnosis } from '../../../../doctorstation/components/api.js';
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
|
||||
import diagnosislist from '../diagnosis/diagnosislist.vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
// const diagnosisList = ref([]);
|
||||
const allowAdd = ref(false);
|
||||
const tree = ref([]);
|
||||
@@ -155,6 +240,7 @@ const rules = ref({
|
||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
diagSrtNo: [{ required: true, message: '请输入诊断序号', trigger: 'change' }],
|
||||
});
|
||||
const diagnosisNetDatas = ref([]);
|
||||
|
||||
watch(
|
||||
() => form.value.diagnosisList,
|
||||
@@ -178,8 +264,11 @@ function getList() {
|
||||
}
|
||||
});
|
||||
getTcmDiagnosis({ encounterId: patientInfo.value.encounterId }).then((res) => {
|
||||
console.log('getTcmDiagnosis=======>', JSON.stringify(res.data.illness));
|
||||
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
diagnosisNetDatas.value = res.data.illness;
|
||||
res.data.illness.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
@@ -321,13 +410,40 @@ function handleAddTcmDiagonsis() {
|
||||
* 删除诊断
|
||||
*/
|
||||
function handleDeleteDiagnosis(row, index) {
|
||||
//中医诊断用-拼接 例如:疳气-表里俱实证
|
||||
const nameArr = row.name?.split('-') || [];
|
||||
if (row.conditionId) {
|
||||
delEncounterDiagnosis(row.conditionId).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
if (nameArr.length > 1) {
|
||||
deleteTcmDiagnosis(row.syndromeGroupNo).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
} else {
|
||||
delEncounterDiagnosis(row.conditionId).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
form.value.diagnosisList.splice(index, 1);
|
||||
console.log('row============>', JSON.stringify(row));
|
||||
console.log('item============>', index);
|
||||
if (nameArr.length > 1) {
|
||||
let obj = null;
|
||||
for (let index = 0; index < diagnosisNetDatas.value.length; index++) {
|
||||
const item = diagnosisNetDatas.value[index];
|
||||
console.log('item.name============>', item.name);
|
||||
console.log('row.name============>', row.name);
|
||||
if (item.ybNo == row.ybNo) {
|
||||
obj = item;
|
||||
}
|
||||
}
|
||||
deleteTcmDiagnosis(obj.syndromeGroupNo).then(() => {
|
||||
getList();
|
||||
getTree();
|
||||
});
|
||||
} else {
|
||||
form.value.diagnosisList.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,6 +467,18 @@ function handleMaindise(value, index) {
|
||||
* 保存诊断
|
||||
*/
|
||||
function handleSaveDiagnosis() {
|
||||
console.log('form.value.diagnosisList=======>', JSON.stringify(form.value.diagnosisList));
|
||||
|
||||
for (let index = 0; index < (form.value.diagnosisList || []).length; index++) {
|
||||
const item = form.value.diagnosisList[index];
|
||||
if (!item.diagSrtNo) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '请录入诊断序号',
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.diagnosisList.length == 0) {
|
||||
@@ -387,9 +515,10 @@ function closeDiagnosisDialog(str) {
|
||||
openAddDiagnosisDialog.value = false;
|
||||
openDiagnosis.value = false;
|
||||
getTree();
|
||||
getList();
|
||||
}
|
||||
|
||||
function queryDiagnosisUse(value) { }
|
||||
function queryDiagnosisUse(value) {}
|
||||
|
||||
function handleChange(value) {
|
||||
diagnosisSearchkey.value = value;
|
||||
@@ -420,10 +549,10 @@ function handleNodeClick(data) {
|
||||
// 如果是根节点,不执行任何操作
|
||||
return;
|
||||
}
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
const isDuplicate = form.value.diagnosisList.some(
|
||||
(diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name
|
||||
);
|
||||
@@ -462,4 +591,4 @@ defineExpose({ getList, handleSaveDiagnosis });
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 申请单相关接口
|
||||
|
||||
//医嘱大下拉
|
||||
@@ -6,8 +6,8 @@ export function getApplicationList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存检查申请单
|
||||
@@ -16,8 +16,8 @@ export function saveCheckd(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/save-check',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存检验申请单
|
||||
@@ -26,18 +26,18 @@ export function saveInspection(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/save-inspection',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存输血申请单
|
||||
*/
|
||||
export function saveBloodTransfusio(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/save-blood-transfusio',
|
||||
url: '/reg-doctorstation/request-form/save-blood-transfusion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存手术申请单
|
||||
@@ -46,11 +46,11 @@ export function saveSurgery(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/save-surgery',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// =====
|
||||
// =====
|
||||
|
||||
/**
|
||||
* 查询检查申请单
|
||||
@@ -59,8 +59,8 @@ export function getCheck(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-check',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询检验申请单
|
||||
@@ -69,8 +69,8 @@ export function getInspection(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-inspection',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询输血申请单
|
||||
@@ -79,18 +79,18 @@ export function getBloodTransfusion(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-blood-transfusion',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询手术申请单
|
||||
*/
|
||||
export function geturger(data) {
|
||||
export function getSurgery(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-surgery',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,11 +100,6 @@ export function transferOrganization(data) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/special-advice/transfer-organization-orders',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,49 +5,56 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="bloodTransfusion-container">
|
||||
<el-transfer v-model="transferValue" :data="applicationList" filter-placeholder="项目代码/名称" filterable
|
||||
:titles="['未选择', '已选择']" />
|
||||
<div v-loading="loading" class="transfer-wrapper">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
</div>
|
||||
<div class="bloodTransfusion-form">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="项目类别" prop="categoryType" style="width: 100%">
|
||||
<el-input v-model="form.categoryType" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="发往科室" prop="targetDepartment" style="width: 100%">
|
||||
<el-input v-model="form.targetDepartment" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="症状" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="症状" prop="symptom" style="width: 100%">
|
||||
<el-input v-model="form.symptom" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体征" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="体征" prop="sign" style="width: 100%">
|
||||
<el-input v-model="form.sign" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="临床诊断" prop="clinicalDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.clinicalDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="其他诊断" prop="otherDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.otherDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="相关结果" prop="relatedResult" style="width: 100%">
|
||||
<el-input v-model="form.relatedResult" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="注意事项" prop="attention" style="width: 100%">
|
||||
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -56,7 +63,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="BloodTransfusion">
|
||||
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { patientInfo } from '../../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
@@ -66,19 +72,24 @@ import { getApplicationList, saveBloodTransfusio } from './api';
|
||||
const state = reactive({});
|
||||
const applicationListAll = ref();
|
||||
const applicationList = ref();
|
||||
const loading = ref(false);
|
||||
const getList = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '28',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
}).then((res) => {
|
||||
if (!patientInfo.value?.inHospitalOrgId) {
|
||||
applicationList.value = [];
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '28',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
return {
|
||||
label: item.adviceName + item.adviceDefinitionId,
|
||||
key: item.adviceDefinitionId,
|
||||
@@ -88,19 +99,24 @@ const getList = () => {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
const transferValue = ref([]);
|
||||
const form = reactive({
|
||||
patientName: '',
|
||||
patientSex: '',
|
||||
patientAge: '',
|
||||
patientPhone: '',
|
||||
patientAddress: '',
|
||||
categoryType: '', // 项目类别
|
||||
targetDepartment: '', // 发往科室
|
||||
symptom: '', // 症状
|
||||
sign: '', // 体征
|
||||
clinicalDiagnosis: '', // 临床诊断
|
||||
otherDiagnosis: '', // 其他诊断
|
||||
relatedResult: '', // 相关结果
|
||||
attention: '', // 注意事项
|
||||
});
|
||||
const rules = reactive({});
|
||||
onBeforeMount(() => { });
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
@@ -114,19 +130,19 @@ const submit = () => {
|
||||
});
|
||||
applicationListAllFilter = applicationListAllFilter.map((item) => {
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
|
||||
quantity: 1,// /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
|
||||
unitPrice: item.priceList[0].price, /** 单价 */
|
||||
totalPrice: item.priceList[0].price, /** 总价 */
|
||||
positionId: item.positionId,//执行科室id
|
||||
ybClassEnum: item.ybClassEnum,//类别医保编码
|
||||
conditionId: item.conditionId,//诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
|
||||
adviceType: item.adviceType,///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId,// // 账户id
|
||||
adviceDefinitionId: item.adviceDefinitionId /** 诊疗定义id */,
|
||||
quantity: 1, // /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
||||
unitPrice: item.priceList[0].price /** 单价 */,
|
||||
totalPrice: item.priceList[0].price /** 总价 */,
|
||||
positionId: item.positionId, //执行科室id
|
||||
ybClassEnum: item.ybClassEnum, //类别医保编码
|
||||
conditionId: item.conditionId, //诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
||||
adviceType: item.adviceType, ///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId, //费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId, //费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId, // // 账户id
|
||||
};
|
||||
});
|
||||
saveBloodTransfusio({
|
||||
@@ -137,7 +153,7 @@ const submit = () => {
|
||||
requestFormId: '', // 申请单ID
|
||||
name: '输血申请单',
|
||||
descJson: JSON.stringify(form),
|
||||
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
|
||||
categoryEnum: '3', // 1 检验 2 检查 3 输血 4 手术
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success(res.msg);
|
||||
@@ -147,19 +163,23 @@ const submit = () => {
|
||||
proxy.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
defineExpose({ state, submit });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.bloodTransfusion-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.transfer-wrapper {
|
||||
position: relative;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
--el-transfer-panel-width: 400px !important;
|
||||
}
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.bloodTransfusion-form {
|
||||
padding: 8px 8px 0 8px;
|
||||
height: 100%;
|
||||
|
||||
@@ -5,54 +5,56 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="LaboratoryTests-container">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
<div v-loading="loading" class="transfer-wrapper">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
</div>
|
||||
<div class="bloodTransfusion-form">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="项目类别" prop="categoryType" style="width: 100%">
|
||||
<el-input v-model="form.categoryType" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="发往科室" prop="targetDepartment" style="width: 100%">
|
||||
<el-input v-model="form.targetDepartment" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="症状" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="症状" prop="symptom" style="width: 100%">
|
||||
<el-input v-model="form.symptom" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体征" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="体征" prop="sign" style="width: 100%">
|
||||
<el-input v-model="form.sign" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="临床诊断" prop="clinicalDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.clinicalDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="其他诊断" prop="otherDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.otherDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="相关结果" prop="relatedResult" style="width: 100%">
|
||||
<el-input v-model="form.relatedResult" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="注意事项" prop="attention" style="width: 100%">
|
||||
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -66,19 +68,25 @@ import { patientInfo } from '../../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({});
|
||||
import { getApplicationList, saveCheckd } from './api';
|
||||
import { getApplicationList, saveInspection } from './api';
|
||||
const state = reactive({});
|
||||
const applicationListAll = ref();
|
||||
const applicationList = ref();
|
||||
const loading = ref(false);
|
||||
const getList = () => {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '23',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
}).then((res) => {
|
||||
if (!patientInfo.value?.inHospitalOrgId) {
|
||||
applicationList.value = [];
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '23',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
@@ -91,16 +99,21 @@ const getList = () => {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
const transferValue = ref([]);
|
||||
const form = reactive({
|
||||
patientName: '',
|
||||
patientSex: '',
|
||||
patientAge: '',
|
||||
patientPhone: '',
|
||||
patientAddress: '',
|
||||
categoryType: '', // 项目类别
|
||||
targetDepartment: '', // 发往科室
|
||||
symptom: '', // 症状
|
||||
sign: '', // 体征
|
||||
clinicalDiagnosis: '', // 临床诊断
|
||||
otherDiagnosis: '', // 其他诊断
|
||||
relatedResult: '', // 相关结果
|
||||
attention: '', // 注意事项
|
||||
});
|
||||
const rules = reactive({});
|
||||
onBeforeMount(() => {});
|
||||
@@ -116,35 +129,35 @@ const submit = () => {
|
||||
});
|
||||
applicationListAllFilter = applicationListAllFilter.map((item) => {
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
|
||||
quantity: 1,// /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
|
||||
unitPrice: item.priceList[0].price, /** 单价 */
|
||||
totalPrice: item.priceList[0].price, /** 总价 */
|
||||
positionId: item.positionId,//执行科室id
|
||||
ybClassEnum: item.ybClassEnum,//类别医保编码
|
||||
conditionId: item.conditionId,//诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
|
||||
adviceType: item.adviceType,///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId,// // 账户id
|
||||
adviceDefinitionId: item.adviceDefinitionId /** 诊疗定义id */,
|
||||
quantity: 1, // /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
||||
unitPrice: item.priceList[0].price /** 单价 */,
|
||||
totalPrice: item.priceList[0].price /** 总价 */,
|
||||
positionId: item.positionId, //执行科室id
|
||||
ybClassEnum: item.ybClassEnum, //类别医保编码
|
||||
conditionId: item.conditionId, //诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
||||
adviceType: item.adviceType, ///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId, //费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId, //费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId, // // 账户id
|
||||
};
|
||||
});
|
||||
saveCheckd({
|
||||
saveInspection({
|
||||
activityList: applicationListAllFilter,
|
||||
patientId: patientInfo.value.patientId, //患者ID
|
||||
encounterId: patientInfo.value.encounterId, // 就诊ID
|
||||
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
||||
requestFormId: '', // 申请单ID
|
||||
name: '检查申请单',
|
||||
name: '检验申请单',
|
||||
descJson: JSON.stringify(form),
|
||||
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
}
|
||||
@@ -154,11 +167,18 @@ defineExpose({ state, submit });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.LaboratoryTests-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.transfer-wrapper {
|
||||
position: relative;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
--el-transfer-panel-width: 400px !important;
|
||||
}
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.bloodTransfusion-form {
|
||||
padding: 8px 8px 0 8px;
|
||||
height: 100%;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<div style="padding: 0 80px">
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
<el-form-item label="出院方式">
|
||||
<el-form-item label="出院方式" prop="outpatientType">
|
||||
<el-select v-model="form.outpatientType">
|
||||
<el-option
|
||||
v-for="(item, index) in dscg_way"
|
||||
@@ -19,13 +19,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出院时间">
|
||||
<el-form-item label="出院时间" prop="outpatientTime">
|
||||
<el-radio-group v-model="form.outpatientTime">
|
||||
<el-radio value="1">今日</el-radio>
|
||||
<el-radio value="2">明日</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="出院描述"
|
||||
<el-form-item label="出院描述" prop="outpatientDescription"
|
||||
><el-input v-model="form.outpatientDescription" type="textarea" rows="5" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -40,20 +40,89 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { toRaw } from 'vue';
|
||||
import { leaveHospital } from '../../api';
|
||||
import { dayjs } from 'element-plus';
|
||||
|
||||
const props = defineProps({
|
||||
encounterId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
patientId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
conditionId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
encounterDiagnosisId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { dscg_way } = proxy.useDict('dscg_way');
|
||||
const dialogVisible = ref(false);
|
||||
const formRef = ref(null);
|
||||
const emit = defineEmits(['success']);
|
||||
const form = reactive({
|
||||
outpatientType: [],
|
||||
outpatientTime: '',
|
||||
outpatientDescription: '',
|
||||
});
|
||||
const rules = {
|
||||
outpatientType: [{ required: true, message: '请选择出院方式', trigger: 'change' }],
|
||||
outpatientTime: [{ required: true, message: '请选择出院时间', trigger: 'change' }],
|
||||
outpatientDescription: [{ required: true, message: '请输入出院描述', trigger: 'blur' }],
|
||||
};
|
||||
|
||||
function getEndTime() {
|
||||
let date = dayjs();
|
||||
if (form.outpatientTime === '2') {
|
||||
date = date.add(1, 'day');
|
||||
}
|
||||
return date.format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
|
||||
function openDialog() {
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
const submitApplicationForm = async () => {
|
||||
if (!formRef.value) return;
|
||||
try {
|
||||
await formRef.value.validate();
|
||||
const res = await leaveHospital({
|
||||
endTime: getEndTime(),
|
||||
outWayCode: form.outpatientType,
|
||||
reasonText: form.outpatientDescription,
|
||||
encounterId: props.encounterId,
|
||||
patientId: props.patientId,
|
||||
conditionId: props.conditionId,
|
||||
encounterDiagnosisId: props.encounterDiagnosisId,
|
||||
});
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
closeDialog();
|
||||
emit('success');
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
const closeDialog = () => {
|
||||
dialogVisible.value = false;
|
||||
Object.assign(form, {
|
||||
outpatientType: [],
|
||||
outpatientTime: '',
|
||||
outpatientDescription: '',
|
||||
});
|
||||
formRef.value?.resetFields();
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -5,62 +5,56 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="medicalExaminations-container">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
style="width: 100%"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
<div v-loading="loading" class="transfer-wrapper">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
</div>
|
||||
<div class="bloodTransfusion-form">
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
label-width="120px"
|
||||
class="demo-ruleForm"
|
||||
inline
|
||||
>
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="项目类别" prop="categoryType" style="width: 100%">
|
||||
<el-input v-model="form.categoryType" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="发往科室" prop="targetDepartment" style="width: 100%">
|
||||
<el-input v-model="form.targetDepartment" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="症状" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="症状" prop="symptom" style="width: 100%">
|
||||
<el-input v-model="form.symptom" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体征" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="体征" prop="sign" style="width: 100%">
|
||||
<el-input v-model="form.sign" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="临床诊断" prop="clinicalDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.clinicalDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="其他诊断" prop="otherDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.otherDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="相关结果" prop="relatedResult" style="width: 100%">
|
||||
<el-input v-model="form.relatedResult" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="注意事项" prop="attention" style="width: 100%">
|
||||
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -74,21 +68,25 @@ import { patientInfo } from '../../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({});
|
||||
import { getApplicationList, saveInspection } from './api';
|
||||
import { getApplicationList, saveCheckd } from './api';
|
||||
const state = reactive({});
|
||||
const applicationListAll = ref();
|
||||
const applicationList = ref();
|
||||
const loading = ref(false);
|
||||
const getList = () => {
|
||||
|
||||
// console.log(patientInfo.value);
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '23',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
}).then((res) => {
|
||||
if (!patientInfo.value?.inHospitalOrgId) {
|
||||
applicationList.value = [];
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '23',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
@@ -101,16 +99,21 @@ const getList = () => {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
const transferValue = ref([]);
|
||||
const form = reactive({
|
||||
patientName: '',
|
||||
patientSex: '',
|
||||
patientAge: '',
|
||||
patientPhone: '',
|
||||
patientAddress: '',
|
||||
categoryType: '', // 项目类别
|
||||
targetDepartment: '', // 发往科室
|
||||
symptom: '', // 症状
|
||||
sign: '', // 体征
|
||||
clinicalDiagnosis: '', // 临床诊断
|
||||
otherDiagnosis: '', // 其他诊断
|
||||
relatedResult: '', // 相关结果
|
||||
attention: '', // 注意事项
|
||||
});
|
||||
const rules = reactive({});
|
||||
onBeforeMount(() => {});
|
||||
@@ -126,35 +129,35 @@ const submit = () => {
|
||||
});
|
||||
applicationListAllFilter = applicationListAllFilter.map((item) => {
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
|
||||
quantity: 1,// /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
|
||||
unitPrice: item.priceList[0].price, /** 单价 */
|
||||
totalPrice: item.priceList[0].price, /** 总价 */
|
||||
positionId: item.positionId,//执行科室id
|
||||
ybClassEnum: item.ybClassEnum,//类别医保编码
|
||||
conditionId: item.conditionId,//诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
|
||||
adviceType: item.adviceType,///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId,// // 账户id
|
||||
adviceDefinitionId: item.adviceDefinitionId /** 诊疗定义id */,
|
||||
quantity: 1, // /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
||||
unitPrice: item.priceList[0].price /** 单价 */,
|
||||
totalPrice: item.priceList[0].price /** 总价 */,
|
||||
positionId: item.positionId, //执行科室id
|
||||
ybClassEnum: item.ybClassEnum, //类别医保编码
|
||||
conditionId: item.conditionId, //诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
||||
adviceType: item.adviceType, ///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId, //费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId, //费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId, // // 账户id
|
||||
};
|
||||
});
|
||||
saveInspection({
|
||||
saveCheckd({
|
||||
activityList: applicationListAllFilter,
|
||||
patientId: patientInfo.value.patientId, //患者ID
|
||||
encounterId: patientInfo.value.encounterId, // 就诊ID
|
||||
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
||||
requestFormId: '', // 申请单ID
|
||||
name: '检验申请单',
|
||||
name: '检查申请单',
|
||||
descJson: JSON.stringify(form),
|
||||
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
|
||||
categoryEnum: '2', // 1 检验 2 检查 3 输血 4 手术
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
}
|
||||
@@ -164,12 +167,18 @@ defineExpose({ state, submit });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.medicalExaminations-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.transfer-wrapper {
|
||||
position: relative;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
--el-transfer-panel-width: 400px !important;
|
||||
}
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
.bloodTransfusion-form {
|
||||
padding: 8px 8px 0 8px;
|
||||
height: 100%;
|
||||
|
||||
@@ -4,111 +4,122 @@
|
||||
* @Description: 手术
|
||||
-->
|
||||
<template>
|
||||
<div class="surgery-container">
|
||||
<el-transfer v-model="value" :data="applicationList" filter-placeholder="项目代码/名称" filterable :titles="['未选择', '已选择']" />
|
||||
<div class="surgery-container">
|
||||
<div v-loading="loading" class="transfer-wrapper">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
/>
|
||||
</div>
|
||||
<div class="bloodTransfusion-form">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||
<el-row :gutter="20">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类别" prop="patientName" style="width:100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="项目类别" prop="categoryType" style="width: 100%">
|
||||
<el-input v-model="form.categoryType" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-form-item label="发往科室" prop="targetDepartment" style="width: 100%">
|
||||
<el-input v-model="form.targetDepartment" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="症状" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-form-item label="症状" prop="symptom" style="width: 100%">
|
||||
<el-input v-model="form.symptom" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体征" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体征" prop="sign" style="width: 100%">
|
||||
<el-input v-model="form.sign" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临床诊断" prop="clinicalDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.clinicalDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他诊断" prop="otherDiagnosis" style="width: 100%">
|
||||
<el-input v-model="form.otherDiagnosis" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关结果" prop="relatedResult" style="width: 100%">
|
||||
<el-input v-model="form.relatedResult" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
|
||||
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注意事项" prop="attention" style="width: 100%">
|
||||
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Surgery">
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
|
||||
import { patientInfo } from '../../../store/patient.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submitOk'])
|
||||
const props = defineProps({
|
||||
|
||||
})
|
||||
import { getApplicationList,saveSurgery } from './api'
|
||||
const state = reactive({
|
||||
|
||||
})
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({});
|
||||
import { getApplicationList, saveSurgery } from './api';
|
||||
const state = reactive({});
|
||||
const applicationListAll = ref();
|
||||
const applicationList=ref()
|
||||
const getList= ()=> {
|
||||
if (patientInfo.value?.inHospitalOrgId) {
|
||||
getApplicationList({
|
||||
const applicationList = ref();
|
||||
const loading = ref(false);
|
||||
const getList = () => {
|
||||
if (!patientInfo.value?.inHospitalOrgId) {
|
||||
applicationList.value = [];
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
categoryCode: '24',
|
||||
organizationId: patientInfo.value.inHospitalOrgId,
|
||||
adviceTypes:'3'//1 药品 2耗材 3诊疗
|
||||
}
|
||||
).then((res) => {
|
||||
if (res.code === 200) {
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
return {
|
||||
label: item.adviceName + item.adviceDefinitionId,
|
||||
key: item.adviceDefinitionId,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = []
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
const transferValue = ref([]);
|
||||
const form = reactive({
|
||||
patientName: '',
|
||||
patientSex: '',
|
||||
patientAge: '',
|
||||
patientPhone: '',
|
||||
patientAddress: '',
|
||||
})
|
||||
const rules = reactive({
|
||||
})
|
||||
onBeforeMount(() => {
|
||||
|
||||
})
|
||||
categoryType: '', // 项目类别
|
||||
targetDepartment: '', // 发往科室
|
||||
symptom: '', // 症状
|
||||
sign: '', // 体征
|
||||
clinicalDiagnosis: '', // 临床诊断
|
||||
otherDiagnosis: '', // 其他诊断
|
||||
relatedResult: '', // 相关结果
|
||||
attention: '', // 注意事项
|
||||
});
|
||||
const rules = reactive({});
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
getList();
|
||||
});
|
||||
const submit = () => {
|
||||
if (transferValue.value.length == 0) {
|
||||
return proxy.$message.error('请选择申请单');
|
||||
@@ -118,19 +129,19 @@ const submit = () => {
|
||||
});
|
||||
applicationListAllFilter = applicationListAllFilter.map((item) => {
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
|
||||
quantity: 1,// /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
|
||||
unitPrice: item.priceList[0].price, /** 单价 */
|
||||
totalPrice: item.priceList[0].price, /** 总价 */
|
||||
positionId: item.positionId,//执行科室id
|
||||
ybClassEnum: item.ybClassEnum,//类别医保编码
|
||||
conditionId: item.conditionId,//诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
|
||||
adviceType: item.adviceType,///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId,// // 账户id
|
||||
adviceDefinitionId: item.adviceDefinitionId /** 诊疗定义id */,
|
||||
quantity: 1, // /** 请求数量 */
|
||||
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
||||
unitPrice: item.priceList[0].price /** 单价 */,
|
||||
totalPrice: item.priceList[0].price /** 总价 */,
|
||||
positionId: item.positionId, //执行科室id
|
||||
ybClassEnum: item.ybClassEnum, //类别医保编码
|
||||
conditionId: item.conditionId, //诊断ID
|
||||
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
||||
adviceType: item.adviceType, ///** 医嘱类型 */
|
||||
definitionId: item.priceList[0].definitionId, //费用定价主表ID */
|
||||
definitionDetailId: item.definitionDetailId, //费用定价子表ID */
|
||||
accountId: patientInfo.value.accountId, // // 账户id
|
||||
};
|
||||
});
|
||||
saveSurgery({
|
||||
@@ -139,37 +150,40 @@ const submit = () => {
|
||||
encounterId: patientInfo.value.encounterId, // 就诊ID
|
||||
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
||||
requestFormId: '', // 申请单ID
|
||||
name: '检验申请单',
|
||||
name: '手术申请单',
|
||||
descJson: JSON.stringify(form),
|
||||
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
categoryEnum: '4', // 1 检验 2 检查 3 输血 4 手术
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success(res.msg);
|
||||
applicationList.value = [];
|
||||
emits('submitOk');
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
defineExpose({ state, submit });
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.surgery-container {
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
.el-transfer {
|
||||
--el-transfer-panel-width: 400px !important;
|
||||
}
|
||||
.surgery-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
.bloodTransfusion-form {
|
||||
|
||||
.transfer-wrapper {
|
||||
position: relative;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
--el-transfer-panel-width: 400px !important;
|
||||
}
|
||||
|
||||
.bloodTransfusion-form {
|
||||
padding: 8px 8px 0 8px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
<el-input
|
||||
placeholder="床号/住院号/姓名"
|
||||
v-model="searchData.keyword"
|
||||
@keyup.enter="queryPatientData"
|
||||
@keyup.enter="getList"
|
||||
:prefix-icon="Search"
|
||||
>
|
||||
</el-input>
|
||||
@@ -186,7 +186,7 @@ onMounted(() => {
|
||||
queryPatientData()
|
||||
})
|
||||
const getList = () => {
|
||||
getPatientList({ status: 5 }).then((res) => {
|
||||
getPatientList({ status: 5, searchKey: searchData.keyword }).then((res) => {
|
||||
cardAllData.value = res.data.records
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
* @Description:
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// ====== 文书记录
|
||||
// 新增记录
|
||||
// 保存或更新记录
|
||||
export function saveOrUpdateRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/saveOrUpdateRecord',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除历史记录
|
||||
export function deleteRecord(ids) {
|
||||
return request({
|
||||
url: '/document/record/deleteRecord',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
@@ -20,15 +36,15 @@ export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
@@ -37,24 +53,22 @@ export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
params: {definitionId}
|
||||
})
|
||||
params: { definitionId },
|
||||
});
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,14 +8,25 @@
|
||||
</el-input>
|
||||
</div>
|
||||
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="`${item.name}(${item.recordTime})`"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
v-for="item in historyData"
|
||||
:key="item.id"
|
||||
class="scrollbar-item"
|
||||
:class="{ 'selected-history-item': item.id === props.selectedRecordId }"
|
||||
>
|
||||
<el-tooltip effect="dark" :content="`${item.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
|
||||
<el-icon
|
||||
class="ml-2"
|
||||
style="margin-left: 26px; cursor: pointer"
|
||||
:disabled="item.printCount && item.printCount > 0"
|
||||
:class="{ 'disabled-icon': item.printCount && item.printCount > 0 }"
|
||||
@click.stop="handleDelete(item)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -24,10 +35,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['historyClick']);
|
||||
const props = defineProps({
|
||||
@@ -35,6 +47,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
selectedRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
@@ -51,7 +67,7 @@ const queryParams = ref({
|
||||
const historyData = ref([]);
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if (patientInfo.value.encounterId && unref(definitionId)&&unref(definitionId) !== '') {
|
||||
if (patientInfo.value.encounterId && unref(definitionId) && unref(definitionId) !== '') {
|
||||
const res = await getRecordByEncounterIdList({
|
||||
...queryParams.value,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
@@ -59,46 +75,76 @@ const queryList = async () => {
|
||||
definitionId: unref(definitionId),
|
||||
});
|
||||
historyData.value = res.data || [];
|
||||
}else{
|
||||
} else {
|
||||
historyData.value = [];
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板树失败');
|
||||
// 不显示错误消息,避免干扰用户体验
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 更新选中的历史记录ID
|
||||
const updateSelectedRecord = (recordId) => {
|
||||
// 这个函数可以供父组件调用,用于更新选中状态
|
||||
nextTick(() => {
|
||||
// 选中状态会通过props.selectedRecordId自动更新
|
||||
});
|
||||
};
|
||||
|
||||
// 删除历史记录
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 检查是否已打印
|
||||
if (item.printCount && item.printCount > 0) {
|
||||
ElMessage.warning('已打印的记录不允许删除');
|
||||
return;
|
||||
}
|
||||
|
||||
await deleteRecord([item.id]);
|
||||
ElMessage.success('删除成功');
|
||||
queryList();
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
const currentSelectTemplate = ref({});
|
||||
defineExpose({ queryList });
|
||||
defineExpose({ queryList, updateSelectedRecord });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-history-container {
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
.search-box {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
|
||||
}
|
||||
.emr-history-scrollbar-container{
|
||||
padding: 8px;
|
||||
height: calc(100% - 40px);
|
||||
.scrollbar-item {
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
.search-box {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.emr-history-scrollbar-container {
|
||||
padding: 8px;
|
||||
height: calc(100% - 40px);
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.selected-history-item {
|
||||
background-color: rgb(194, 231, 255);
|
||||
}
|
||||
|
||||
.disabled-icon {
|
||||
color: #d9d9d9;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user