解决合并冲突

This commit is contained in:
2025-12-10 14:20:24 +08:00
parent e1385cb3e6
commit 18f6a845e6
804 changed files with 61881 additions and 13577 deletions

View File

@@ -20,6 +20,19 @@
@keyup.enter="getClinicRecord"
/>
</el-form-item>
<el-form-item label="发票状态:" prop="invoiceStatus">
<el-select
v-model="queryParams.invoiceStatus"select
placeholder="发票状态"
clearable
style="width: 240px"
@keyup.enter="getClinicRecord"
>
<el-option v-for="item in invoiceStatusList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="结算时间:" prop="activeFlag">
<el-date-picker
v-model="occurrenceTime"
@@ -38,6 +51,12 @@
</div>
</el-form>
</div>
<div style="float: right; margin: 0 20px 10px 0">
<span style="margin-right: 20px">
{{ '总数:' + count + '/' + '成功:' + successCount }}
</span>
<el-button type="primary" :loading="loading" plain @click="handleBatchProcess">批量开具</el-button>
</div>
<el-table :data="clinicRecord" border>
<!-- <el-table-column label="计算类型" align="center" prop="statusEnum_enumText" /> -->
<el-table-column label="患者姓名" align="center" prop="patientName" :show-overflow-tooltip="true"/>
@@ -140,10 +159,17 @@ const queryParams = ref({
billDateSTime:"",
billDateETime:"",
searchKey:"",
invoiceStatus:1,
kinsEnum: 1
});
const invoiceStatusList = ref([
{ value: 1, label: '已开具' },
{ value: 0, label: '未开具' },
]);
const paymentDetailShow = ref(false)
const clinicRecord = ref([]);
const successCount = ref(0);
const count = ref(0);
const reasonDialogVisible = ref(false);
const reasonForm = ref({
reason: ''
@@ -215,6 +241,49 @@ function handleReset() {
// function handleEdit(row){
// }
const loading = ref(false)
async function handleBatchProcess() {
// 遍历list并异步执行invoiceReissue方法
let list = clinicRecord.value.filter(item =>{
return item.statusEnum == 1 && (item.invoiceNo == undefined || item.invoiceNo == null)
})
loading.value = true
count.value = list.length;
for (const item of list) {
try {
const res = await invoiceReissue({
paymentId: item.id,
encounterId: item.encounterId ? item.encounterId : ""
});
if (res.data) {
// 门诊电子发票开具失败 住院电子发票开具失败 电子发票类型不明确
if (
res.data.includes(" 挂号电子发票开具失败") ||
res.data.includes(" 住院电子发票开具失败") ||
res.data.includes(" 门诊电子发票开具失败") ||
res.data.includes(" 电子发票类型不明确")
) {
// proxy.$message.error(res.data);
} else {
successCount.value++;
// window.open(res.data);
}
}
if (res.code == 200) {
// getLists();
} else {
// proxy.$message.error(res.data);
}
} catch (err) {
console.error(err);
}
}
loading.value = false
getLists()
}
function handleOpen(row,type){
if(type==1){
invoiceReissue({paymentId:row.id,encounterId:row.encounterId?row.encounterId:""}).then((res) => {

View File

@@ -5,41 +5,62 @@ import request from '@/utils/request'
*/
export function getList(queryParams) {
return request({
url: '/charge-manage/charge/encounter-patient-page',
method: 'get',
params: queryParams
url: '/charge-manage/charge/encounter-patient-page',
method: 'get',
params: queryParams
})
}
/**
* 患者处方列表
*/
export function getChargeList(encounterId) {
return request({
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId,
method: 'get',
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId,
method: 'get',
})
}
/**
* 医保转自费
*/
export function changeToSelfPay(encounterId) {
return request({
url: '/charge-manage/charge/self-pay?encounterId=' + encounterId,
method: 'put',
url: '/charge-manage/charge/self-pay?encounterId=' + encounterId,
method: 'put',
})
}
/**
* 自费转医保
*/
export function changeToMedicalInsurance(encounterId) {
return request({
url: '/charge-manage/charge/medical-insurance?encounterId=' + encounterId,
method: 'put',
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',
})
}
@@ -48,9 +69,9 @@ export function changeToMedicalInsurance(encounterId) {
*/
export function savePayment(data) {
return request({
url: '/payment/payment/charge',
method: 'post',
data: data
url: '/payment/payment/charge',
method: 'post',
data: data
})
}
@@ -59,8 +80,8 @@ export function savePayment(data) {
*/
export function init() {
return request({
url: '/charge-manage/charge/init',
method: 'get',
url: '/charge-manage/charge/init',
method: 'get',
})
}
@@ -69,9 +90,9 @@ export function init() {
*/
export function precharge(data) {
return request({
url: '/payment/payment/precharge',
method: 'post',
data: data
url: '/payment/payment/precharge',
method: 'post',
data: data
})
}
@@ -80,21 +101,32 @@ export function precharge(data) {
*/
export function unprecharge(data) {
return request({
url: '/payment/payment/unprecharge',
method: 'post',
params: data
url: '/payment/payment/unprecharge',
method: 'post',
params: data
})
}
/**
* 发耗材
*/
export function dispenseMedicalConsumables(data) {
return request({
url: '/pharmacy-manage/device-dispense/consumables-dispense',
method: 'put',
data: data
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
})
}

View File

@@ -5,6 +5,7 @@
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="clearAmount(index)"
>
<el-option
v-for="payEnum in selfPayMethods"
:key="payEnum.value"
:label="payEnum.label"
:value="payEnum.value"
:disabled="isMethodDisabled(payEnum.value)"
/>
</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,18 @@
金额已满足应收不可继续添加
</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>
<el-table :data="props.details" max-height="200" border>
@@ -105,10 +126,10 @@
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
> </el-button
>
<el-button type="primary" @click="print()" :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>
@@ -116,7 +137,7 @@
</template>
<script setup>
import { savePayment, unprecharge, dispenseMedicalConsumables } from './api';
import { savePayment, unprecharge, dispenseMedicalConsumables, getChargeInfo } from './api';
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
import { Delete } from '@element-plus/icons-vue';
import { debounce } from 'lodash-es';
@@ -170,7 +191,11 @@ const props = defineProps({
const { proxy } = getCurrentInstance();
const { charge_discount } = proxy.useDict('charge_discount');
const userStore = useUserStore();
const discountRadio = ref(undefined);
const discountAmount = ref(0);
const formData = reactive({
totalAmount: 0,
@@ -186,97 +211,105 @@ const dialogLoading = ref(false);
watch(
() => props.totalAmount,
(newValue) => {
nextTick(() => {});
formData.totalAmount = newValue;
formData.selfPay[0].amount = newValue;
}
);
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, // 年龄
@@ -284,85 +317,59 @@ async function printReceipt(param) {
currentDate: currentDate.value, // 收费日期
chargedItems: props.chargedItems, // 收费项目
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
displayAmount: displayAmount.value + ' 元', // 收金额
itemTotalAmount: total.toFixed(2) + ' 元', // 收金额
displayAmount: displayAmountTemp + ' 元', // 实收金额
returnedAmount: returnedAmount.value + ' 元', // 应找零
userName: userStore.nickName,
},
],
// feeDetial: param.detail, //收费项目,后端还未返回
};
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], {
printer: 'xp',
title: '门诊收费结算单',
});
// // 将对象转换为 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 throttledGetList = debounce(submit, 300);
function handleOpen() {
formData.totalAmount = props.totalAmount;
formData.selfPay[0].amount = props.totalAmount;
}
async function submit() {
displayAmountTemp = displayAmount.value;
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
console.log(formData.totalAmount, 'formData.totalAmount');
if (parseFloat(displayAmount.value) < formData.totalAmount.toFixed(2)) {
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({
// paymentEnum: 0,
// kindEnum: 1,
// patientId: props.patientInfo.patientId,
// chrgBchnoList: props.chrgBchnoList,
chargeItemIds: props.chargeItemIds,
encounterId: props.patientInfo.encounterId,
id: props.paymentId,
paymentDetails: formData.selfPay,
ybMdtrtCertType: props.userCardInfo.psnCertType,
busiCardInfo: props.userCardInfo.busiCardInfo,
// returnedAmount: parseFloat(returnedAmount.value),
})
.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) {
@@ -419,6 +426,7 @@ const selfPayMethods = [
{ label: '微信', value: 220100 },
{ label: '支付宝', value: 220200 },
{ label: '银联', value: 220300 },
{ label: '优惠', value: 220500 },
];
// 计算剩余可输入金额
@@ -440,6 +448,16 @@ 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);
@@ -466,9 +484,15 @@ const clearAmount = (index) => {
// 计算属性
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) {
@@ -486,8 +510,23 @@ function close() {
// proxy.$modal.msgError(res.message);
// }
// });
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>

View File

@@ -6,8 +6,11 @@
"paperType": "自定义",
"height": 160,
"width": 80,
"paperHeader": 0,
"paperFooter": 450.7086614173229,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"expandCss": "",
"overPrintOptions": {
"content": "",
"opacity": 0.7,
@@ -28,8 +31,6 @@
"layoutRowGap": 0,
"layoutColumnGap": 0
},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
@@ -258,10 +259,10 @@
},
{
"options": {
"left": 138,
"left": 99,
"top": 147,
"height": 9.75,
"width": 84,
"height": 15,
"width": 123,
"title": "合计金额",
"field": "itemTotalAmount",
"coordinateSync": false,
@@ -278,7 +279,7 @@
"left": 6,
"top": 171,
"height": 14,
"width": 88.5,
"width": 108,
"title": "应收金额",
"coordinateSync": false,
"widthHeightSync": false,
@@ -292,10 +293,10 @@
},
{
"options": {
"left": 132,
"left": 124.5,
"top": 171,
"height": 14,
"width": 88.5,
"width": 97.5,
"title": "实收金额",
"coordinateSync": false,
"widthHeightSync": false,
@@ -310,9 +311,43 @@
{
"options": {
"left": 6,
"top": 190.5,
"top": 193.5,
"height": 14,
"width": 117,
"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,
@@ -326,10 +361,10 @@
},
{
"options": {
"left": 132,
"top": 190.5,
"left": 124.5,
"top": 216,
"height": 13.5,
"width": 88.5,
"width": 97.5,
"title": "统筹支付",
"coordinateSync": false,
"widthHeightSync": false,
@@ -344,9 +379,9 @@
{
"options": {
"left": 6,
"top": 211.5,
"top": 240,
"height": 14,
"width": 117,
"width": 216,
"title": "个人医保账户支付",
"coordinateSync": false,
"widthHeightSync": false,
@@ -361,43 +396,9 @@
{
"options": {
"left": 6,
"top": 235.5,
"top": 268.5,
"height": 14,
"width": 115.5,
"title": "全自费金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "FULAMT_OWNPAY_AMT"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 133.5,
"top": 235.5,
"height": 14,
"width": 87,
"title": "应找零",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "returnedAmount"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 6,
"top": 256.5,
"height": 14,
"width": 100,
"width": 106.5,
"title": "收费员",
"coordinateSync": false,
"widthHeightSync": false,
@@ -412,9 +413,9 @@
{
"options": {
"left": 6,
"top": 277.5,
"top": 294,
"height": 14,
"width": 170,
"width": 214.5,
"title": "收费时间",
"coordinateSync": false,
"widthHeightSync": false,

View File

@@ -1,63 +1,31 @@
<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">
@@ -80,12 +48,12 @@
{{ patientInfo.genderEnum_enumText }}
</el-descriptions-item>
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
<el-descriptions-item label="科室:">{{
patientInfo.organizationName
}}</el-descriptions-item>
<el-descriptions-item label="就诊时间:">{{
formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss')
}}</el-descriptions-item>
<el-descriptions-item label="科室:">
{{ patientInfo.organizationName }}
</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> -->
@@ -102,47 +70,31 @@
<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>
<span style="float: right"
>合计金额{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}</span
>
<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>
</div>
<el-table
ref="chargeListRef"
height="530"
:data="chargeList"
row-key="id"
@selection-change="handleSelectionChange"
v-loading="chargeLoading"
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" />
@@ -152,10 +104,7 @@
<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 :type="scope.row.statusEnum === 1 ? 'default' : 'success'" disable-transitions>
{{ scope.row.statusEnum_enumText }}
</el-tag>
</template>
@@ -166,9 +115,17 @@
</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">
<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
:open="openDialog"
@close="handleClose"
@@ -197,11 +154,15 @@ import {
changeToMedicalInsurance,
init,
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();
@@ -241,6 +202,20 @@ watch(
(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 }
@@ -249,9 +224,16 @@ 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();
@@ -346,7 +328,9 @@ function confirmCharge() {
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;
details.value = res.data.details.filter((item) => {
return item.amount > 0;
});
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
@@ -502,6 +486,8 @@ async function handleReadCard(value) {
chargeItemIdList.value = selectRows.map((item) => {
return item.id;
});
// 打印项目赋值
chargedItems.value = selectRows;
consumablesIdList.value = selectRows
.filter((item) => {
return item.serviceTable == 'wor_device_request';
@@ -543,5 +529,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>
<style scoped>
: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>

View File

@@ -322,9 +322,13 @@ function handleRefund(row) {
// }, 0);
getReturnDetail({ id: row.paymentId }).then((res) => {
if (res.data.length > 0) {
totalAmount.value = res.data.find((item) => item.payEnum === 220000).amount;
totalAmount.value =
res.data.find((item) => item.payEnum === 220000).amount -
(res.data.find((item) => item.payEnum === 220500)?.amount || 0);
}
details.value = res.data;
details.value = res.data.filter((item) => {
return item.amount > 0;
});
});
paymentId.value = row.paymentId;
patientInfo.value.patientId = row.patientId;

View File

@@ -350,6 +350,7 @@
</template>
<script setup name="PatientAddDialog">
import { watch } from 'vue';
import { watch, defineProps } from "vue";
import pcas from 'china-division/dist/pcas-code.json';
import { addPatient, patientlLists, getOutpatientRegistrationList } from './outpatientregistration';
@@ -711,22 +712,22 @@ watch(
const birthYear = parseInt(newIdCard.substring(6, 10));
const birthMonth = parseInt(newIdCard.substring(10, 12));
const birthDay = parseInt(newIdCard.substring(12, 14));
// 设置出生日期
form.value.birthDate = `${birthYear}-${birthMonth.toString().padStart(2, '0')}-${birthDay.toString().padStart(2, '0')}`;
const today = new Date();
const currentYear = today.getFullYear();
const currentMonth = today.getMonth() + 1;
const currentDay = today.getDate();
let age = currentYear - birthYear;
// 如果当前月份小于出生月份或者月份相同但当前日期小于出生日期则年龄减1
if (
currentMonth < birthMonth ||
(currentMonth === birthMonth && currentDay < birthDay)
) {
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
age--;
}
form.value.age = age;
form.value.age = age ;
}

View File

@@ -239,6 +239,12 @@
highlight-current
default-expand-all
@node-click="handleNodeClick"
@change="
() => {
form.serviceTypeId = undefined;
setchargeItem;
}
"
@clear="handleOrgClear"
clearable
/>
@@ -414,6 +420,7 @@
key="genderEnum_enumText"
prop="genderEnum_enumText"
/>
<el-table-column label="联系电话" align="center" key="phone" prop="phone" />
<el-table-column
label="科室名称"
align="center"
@@ -758,6 +765,8 @@ const patientInfoList = ref(undefined);
// 费用性质
const contractList = ref(undefined);
// const locationOptions = ref(undefined); // 地点树选项
const doctorList = ref(undefined); // 医生选项
const healthcareList = ref([]); // 挂号项目选项
const doctorList = ref(undefined); // 医生选项(过滤后的)
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
const healthcareList = ref(undefined); // 挂号项目选项
@@ -1068,15 +1077,17 @@ function setInfo() {
// 设定费用项管理表单
function setchargeItem() {
const healthcareData = healthcareList.value.filter(
(healthcare) => healthcare.id === form.value.serviceTypeId
);
form.value.locationId_dictText = healthcareData.length > 0 ? healthcareData[0].name : '';
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : '';
form.value.activityPrice = healthcareData.length > 0 ? healthcareData[0].activityPrice : '';
form.value.totalPrice =
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
if (healthcareList.value.length > 0) {
const healthcareData = healthcareList.value.filter(
(healthcare) => healthcare.id === form.value.serviceTypeId
);
form.value.locationId_dictText = healthcareData.length > 0 ? healthcareData[0].name : '';
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : '';
form.value.activityPrice = healthcareData.length > 0 ? healthcareData[0].activityPrice : '';
form.value.totalPrice =
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
}
}
/** 处理挂号类型变化 */