352 lines
12 KiB
Vue
Executable File
352 lines
12 KiB
Vue
Executable File
<template>
|
||
<div class="app-container">
|
||
<el-form
|
||
:model="queryParams"
|
||
ref="queryRef"
|
||
:inline="true"
|
||
v-show="showSearch"
|
||
label-width="90px"
|
||
>
|
||
<el-form-item label="查询日期:">
|
||
<el-date-picker
|
||
v-model="queryTime"
|
||
type="daterange"
|
||
start-placeholder="开始日期"
|
||
end-placeholder="结束日期"
|
||
style="width: 300px; margin-right: 20px"
|
||
@change="getValue"
|
||
value-format="YYYY-MM-DD"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="费用性质:">
|
||
<el-select
|
||
v-model="contractNo"
|
||
placeholder="费用性质"
|
||
clearable
|
||
@change="getValue"
|
||
style="width: 150px; margin-right: 30px"
|
||
>
|
||
<el-option
|
||
v-for="item in contractList"
|
||
:key="item.busNo"
|
||
:label="item.contractName"
|
||
:value="item.busNo"
|
||
/>
|
||
</el-select>
|
||
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
|
||
<el-button type="primary" plain icon="Printer" @click="print">打印</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
|
||
<div v-loading="loading" class="report-container">
|
||
<div class="report-title">门诊收费日结单</div>
|
||
<div class="report-section">
|
||
<div class="section-title">基本信息</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">经办人姓名:</span><span class="value">{{ userStore.nickName }}</span></div>
|
||
<div class="report-item"><span class="label">科室:</span><span class="value">{{ userStore.orgName }}</span></div>
|
||
<div class="report-item span-2"><span class="label">时间:</span><span class="value">{{ queryTime[0] + '~' + queryTime[1] }}</span></div>
|
||
</div>
|
||
</div>
|
||
<div class="divider"></div>
|
||
<div class="report-section">
|
||
<div class="section-title">收费汇总</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">实际现金收入:</span><span class="value">{{ formatValue(reportValue.cashSum) }}</span></div>
|
||
<div class="report-item"><span class="label">现金:</span><span class="value">{{ formatValue(reportValue.rmbCashSum) }}</span></div>
|
||
<div class="report-item"><span class="label">微信:</span><span class="value">{{ formatValue(reportValue.vxCashSum) }}</span></div>
|
||
<div class="report-item"><span class="label">支付宝:</span><span class="value">{{ formatValue(reportValue.aliCashSum) }}</span></div>
|
||
</div>
|
||
</div>
|
||
<div class="divider"></div>
|
||
<div class="report-section">
|
||
<div class="section-title">医保支付</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">统筹支付:</span><span class="value">{{ formatValue(reportValue.tcSum) }}</span></div>
|
||
<div class="report-item"><span class="label">账户支付:</span><span class="value">{{ formatValue(reportValue.zhSum) }}</span></div>
|
||
<div class="report-item span-2"><span class="label">基金支付总额:</span><span class="value">{{ formatValue(reportValue.fundSum) }}</span></div>
|
||
</div>
|
||
</div>
|
||
<div class="divider"></div>
|
||
<div class="report-section">
|
||
<div class="section-title">费用明细</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">诊查费:</span><span class="value">{{ formatValue(reportValue.DIAGNOSTIC_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">检查费:</span><span class="value">{{ formatValue(reportValue.CHECK_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">化验费:</span><span class="value">{{ formatValue(reportValue.DIAGNOSTIC_TEST_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">治疗费:</span><span class="value">{{ formatValue(reportValue.MEDICAL_EXPENSE_FEE) }}</span></div>
|
||
</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">西药费:</span><span class="value">{{ formatValue(reportValue.WEST_MEDICINE) }}</span></div>
|
||
<div class="report-item"><span class="label">中药饮片费:</span><span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_SLICES_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">中成药费:</span><span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">卫生材料费:</span><span class="value">{{ formatValue(reportValue.SANITARY_MATERIALS_FEE) }}</span></div>
|
||
</div>
|
||
<div class="report-row cols-4">
|
||
<div class="report-item"><span class="label">诊疗费:</span><span class="value">{{ formatValue(reportValue.GENERAL_CONSULTATION_FEE) }}</span></div>
|
||
<div class="report-item"><span class="label">挂号费:</span><span class="value">{{ formatValue(reportValue.REGISTRATION_FEE) }}</span></div>
|
||
<div class="report-item span-2"><span class="label">其他费用:</span><span class="value">{{ formatValue(reportValue.OTHER_FEE) }}</span></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup name="dayEnd">
|
||
import {getContractList, getRreportReturnIssue, getTotal} from './component/api';
|
||
import useUserStore from '@/store/modules/user';
|
||
import {formatDateStr} from '@/utils/index';
|
||
import Decimal from 'decimal.js';
|
||
|
||
const userStore = useUserStore();
|
||
|
||
const router = useRouter();
|
||
const { proxy } = getCurrentInstance();
|
||
|
||
const purchaseinventoryRef = ref(null);
|
||
const purchaseinventoryList = ref([]);
|
||
const open = ref(false);
|
||
const loading = ref(true);
|
||
const showSearch = ref(true);
|
||
const ids = ref([]);
|
||
const single = ref(true);
|
||
const multiple = ref(true);
|
||
const total = ref(0);
|
||
const title = ref('');
|
||
const contractList = ref(undefined);
|
||
const reportValue = ref({});
|
||
const queryTime = ref([
|
||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||
]);
|
||
const contractNo = ref('0000');
|
||
|
||
const data = reactive({
|
||
queryParams: {
|
||
form: {},
|
||
pageNo: 1,
|
||
pageSize: 10,
|
||
searchKey: undefined,
|
||
purposeLocationId: undefined,
|
||
sourceLocationId: undefined,
|
||
supplierId: undefined,
|
||
approvalTimeSTime: undefined,
|
||
approvalTimeETime: undefined,
|
||
},
|
||
rules: {},
|
||
});
|
||
|
||
const { queryParams, form, rules } = toRefs(data);
|
||
|
||
getValue();
|
||
function getValue() {
|
||
loading.value = true;
|
||
getTotal({
|
||
contractNo: contractNo.value,
|
||
startTime: queryTime.value[0] + ' 00:00:00',
|
||
endTime: queryTime.value[1] + ' 23:59:59',
|
||
entererId: userStore.practitionerId,
|
||
}).then((res) => {
|
||
loading.value = false;
|
||
reportValue.value = res.data;
|
||
});
|
||
}
|
||
|
||
getContract();
|
||
function getContract() {
|
||
getContractList().then((response) => {
|
||
contractList.value = response.data;
|
||
});
|
||
}
|
||
|
||
function getPharmacyCabinetLists() {
|
||
}
|
||
/** 查询调拨管理项目列表 */
|
||
function getList() {
|
||
loading.value = true;
|
||
getRreportReturnIssue(queryParams.value).then((res) => {
|
||
loading.value = false;
|
||
purchaseinventoryList.value = res.data.records;
|
||
total.value = res.data.total;
|
||
});
|
||
}
|
||
|
||
/** 搜索按钮操作 */
|
||
function handleQuery() {
|
||
queryParams.value.approvalTimeSTime =
|
||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||
? occurrenceTime.value[0] + ' 00:00:00'
|
||
: '';
|
||
queryParams.value.approvalTimeETime =
|
||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||
? occurrenceTime.value[1] + ' 23:59:59'
|
||
: '';
|
||
queryParams.value.pageNo = 1;
|
||
getList();
|
||
}
|
||
|
||
/** 清空条件按钮操作 */
|
||
function handleClear() {
|
||
queryParams.value.approvalTimeSTime = '';
|
||
queryParams.value.approvalTimeETime = '';
|
||
occurrenceTime.value = '';
|
||
proxy.resetForm('queryRef');
|
||
getList();
|
||
}
|
||
|
||
/** 选择条数 */
|
||
function handleSelectionChange(selection) {
|
||
ids.value = selection.map((item) => item.id);
|
||
single.value = selection.length != 1;
|
||
multiple.value = !selection.length;
|
||
}
|
||
|
||
/** 打印门诊日结 */
|
||
async function print() {
|
||
console.log(reportValue.value, '==reportValue.value==');
|
||
const result = {
|
||
data: [
|
||
{
|
||
...reportValue.value,
|
||
nickName: userStore.nickName,
|
||
orgName: userStore.orgName,
|
||
fixmedinsName: userStore.hospitalName,
|
||
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)
|
||
.add(reportValue.value.CHECK_FEE || 0)
|
||
.add(reportValue.value.DIAGNOSTIC_TEST_FEE || 0)
|
||
.add(reportValue.value.MEDICAL_EXPENSE_FEE || 0)
|
||
.add(reportValue.value.WEST_MEDICINE || 0)
|
||
.add(reportValue.value.CHINESE_MEDICINE_SLICES_FEE || 0)
|
||
.add(reportValue.value.CHINESE_MEDICINE_FEE || 0)
|
||
.add(reportValue.value.GENERAL_CONSULTATION_FEE || 0)
|
||
.add(reportValue.value.REGISTRATION_FEE || 0)
|
||
.add(reportValue.value.OTHER_FEE || 0)
|
||
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
|
||
},
|
||
],
|
||
};
|
||
console.log(result, '==result.data==');
|
||
let jsonString = JSON.stringify(result, null, 2);
|
||
console.log(jsonString, 'jsonstring');
|
||
await CefSharp.BindObjectAsync('boundAsync');
|
||
await boundAsync
|
||
.printReport(getPrintFileName(contractNo.value), jsonString)
|
||
.then((response) => {
|
||
console.log(response, 'response');
|
||
var res = JSON.parse(response);
|
||
if (!res.IsSuccess) {
|
||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||
}
|
||
})
|
||
.catch((error) => {
|
||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||
});
|
||
}
|
||
|
||
function getPrintFileName(value) {
|
||
switch (value) {
|
||
case '0000':
|
||
return '门诊日结单(按登录角色查询)自费.grf';
|
||
case '229900':
|
||
return '门诊日结单(按登录角色查询)省医保.grf';
|
||
case '220100':
|
||
return '门诊日结单(按登录角色查询)市医保.grf';
|
||
}
|
||
}
|
||
|
||
function formatValue(value) {
|
||
return value == null || value == undefined ? '0.00 元' : value.toFixed(2) + ' 元';
|
||
}
|
||
|
||
getList();
|
||
getPharmacyCabinetLists();
|
||
</script>
|
||
<style scoped>
|
||
.report-container {
|
||
width: 100%;
|
||
max-width: 1200px;
|
||
margin: 0 auto;
|
||
box-sizing: border-box;
|
||
padding: 24px 32px;
|
||
background: #fff;
|
||
border-radius: 4px;
|
||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
||
}
|
||
.report-title {
|
||
text-align: center;
|
||
font-size: 18px;
|
||
font-weight: bold;
|
||
margin: 16px 0;
|
||
}
|
||
.report-section {
|
||
margin: 8px 0;
|
||
}
|
||
.section-title {
|
||
font-size: 15px;
|
||
font-weight: bold;
|
||
color: #303133;
|
||
margin: 8px 0;
|
||
padding-left: 8px;
|
||
border-left: 3px solid #409eff;
|
||
}
|
||
.report-row {
|
||
display: grid;
|
||
margin: 12px 0;
|
||
gap: 8px 16px;
|
||
align-items: center;
|
||
}
|
||
.cols-4 {
|
||
grid-template-columns: repeat(4, 1fr);
|
||
}
|
||
.span-2 {
|
||
grid-column: span 2;
|
||
}
|
||
.report-item {
|
||
display: flex;
|
||
align-items: center;
|
||
box-sizing: border-box;
|
||
min-width: 0;
|
||
}
|
||
.label {
|
||
min-width: 120px;
|
||
flex-shrink: 0;
|
||
color: #606266;
|
||
white-space: nowrap;
|
||
text-align: right;
|
||
}
|
||
.value {
|
||
color: #303133;
|
||
font-weight: 500;
|
||
white-space: nowrap;
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.divider {
|
||
height: 1px;
|
||
background-color: #dcdfe6;
|
||
margin: 12px 0;
|
||
}
|
||
@media screen and (max-width: 1200px) {
|
||
.cols-4 {
|
||
grid-template-columns: repeat(2, 1fr);
|
||
}
|
||
.span-2 {
|
||
grid-column: span 2;
|
||
}
|
||
}
|
||
@media screen and (max-width: 768px) {
|
||
.cols-4 {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
.span-2 {
|
||
grid-column: span 1;
|
||
}
|
||
.label {
|
||
min-width: 80px;
|
||
}
|
||
}
|
||
</style>
|