提交merge1.3
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
:disabled="buttonDisabled">
|
||||
自费转医保
|
||||
</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" @click="studentPayTosStudentSelf()" style="margin-left: 20px"
|
||||
:disabled="buttonDisabled">
|
||||
学生医保转学生自费
|
||||
@@ -95,6 +96,38 @@
|
||||
</div>
|
||||
<el-table ref="chargeListRef" height="530" :data="chargeList" row-key="id"
|
||||
@selection-change="handleSelectionChange" v-loading="chargeLoading" :span-method="objectSpanMethod" border>
|
||||
=======
|
||||
<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"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<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 +137,20 @@
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<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>
|
||||
>>>>>>> v1.3
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -115,9 +161,26 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<<<<<<< HEAD
|
||||
<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-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)"
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -127,6 +190,7 @@
|
||||
</div>
|
||||
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
@@ -158,7 +222,7 @@ import {
|
||||
changeStudentPayTosStudentSelf,
|
||||
changeStudentSelfToStudentPay,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import { invokeYbPlugin5000, invokeYbPlugin5001 } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
@@ -228,7 +292,10 @@ function handleTotalAmount() {
|
||||
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, new Decimal(0));
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
@@ -298,7 +365,6 @@ const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
console.log('selectRows:', selectRows);
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
@@ -315,6 +381,9 @@ function confirmCharge() {
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// 将选中的行数据赋值给chargedItems
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
// }, 0);
|
||||
@@ -364,7 +433,7 @@ async function handleReadCard(value) {
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await invokeYbPlugin({
|
||||
await invokeYbPlugin5000({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
@@ -386,7 +455,7 @@ async function handleReadCard(value) {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
let message = JSON.parse(cardInfo.data);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
@@ -406,7 +475,7 @@ async function handleReadCard(value) {
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
await invokeYbPlugin5001(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
@@ -583,6 +652,22 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 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);
|
||||
// });
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
function printCharge(row) {
|
||||
// 打印功能实现
|
||||
let rows = [];
|
||||
@@ -593,7 +678,41 @@ function printCharge(row) {
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
<<<<<<< HEAD
|
||||
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);
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -605,4 +724,8 @@ function printCharge(row) {
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
<<<<<<< HEAD
|
||||
</style>
|
||||
=======
|
||||
</style>
|
||||
>>>>>>> v1.3
|
||||
|
||||
Reference in New Issue
Block a user