Commit 3bb7631d authored by 任鸿志's avatar 任鸿志

refactor(jiesuan): 优化结算功能和发票打印逻辑

- 修改了多个组件以支持发票打印功能
- 优化了结算流程,增加了对异地医保和长居异地人员的处理
- 调整了费用计算逻辑,考虑了个人自付金额
- 优化了界面布局和样式
parent 0b3e0c25
......@@ -21,7 +21,7 @@
</div>
</div>
</el-card>
<div style="display: flex; justify-content: space-between;; margin-top: 10px" v-loading="yujiesuanLoading">
<div style="display: flex; justify-content: space-between; margin-top: 10px" v-loading="yujiesuanLoading">
<div class="box-card">
<div class="box_card_title">
<div style="display: flex; justify-content: space-between; width: 100%">
......@@ -57,7 +57,7 @@
@selection-change="handleSelectionChange"
:data="tableDataList"
tooltip-effect="dark"
style="width: 100%;"
style="width: 100%"
:header-cell-style="{ background: '#E7EEFF', color: '#333333' }"
v-loading="loading"
element-loading-text="拼命加载中"
......@@ -67,26 +67,26 @@
</template>
<el-table-column align="center" type="selection" width="45"> </el-table-column>
<el-table-column prop="occurrence_dept_name" label="开单科室" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="executive_dept_name" label="执行科室" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="executive_dept_name" label="执行科室" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="doct_name" label="医生姓名" width="90" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="occurrence_time" label="挂号日期" width="100" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="total" align="center" label="总金额" width="80"> </el-table-column>
<el-table-column prop="reviewed" align="center" label="审核状态" width="80">
<template slot-scope="scope">
<span >{{scope.row.reviewed==1?'已审核':'未审核' }}</span>
<template slot-scope="scope">
<span>{{ scope.row.reviewed == 1 ? '已审核' : '未审核' }}</span>
</template>
<span></span>
<span></span>
</el-table-column>
<el-table-column prop="reviewed_by" align="center" label="审核人" width="110"> </el-table-column>
<el-table-column prop="visit_no" label="就诊序号" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="visit_no" label="就诊序号" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="serial_no" label="费用流水号" width="100" :show-overflow-tooltip="true"> </el-table-column>
</el-table>
</div>
<div class="box-card">
<div class="box_card_title" style="margin-bottom: 25px;">
<div class="box_card_title" style="margin-bottom: 25px">
<div @click="addEventListener()">费用明细</div>
<div> <el-button type="primary" size="mini" round @click="jshistory">结算历史</el-button></div>
<div><el-button type="primary" size="mini" round @click="jshistory">结算历史</el-button></div>
</div>
<el-table
:data="costlist"
......@@ -466,7 +466,7 @@
<div style="margin-bottom: 30px" v-if="feelist.channel == '1'">
<span class="feetexts">付款方式——<span class="feetext">聚合</span>付款</span>
</div>
<div style="margin-bottom: 30px" v-if="feelist.channel == '3'">
<span class="feetexts">付款方式——<span class="feetext">银行卡</span>付款</span>
</div>
......@@ -506,7 +506,7 @@
</div>
</div>
<el-input
<el-input
v-if="feelist.channel == '2'"
v-model="form.admin_djf"
type="number"
......@@ -527,7 +527,6 @@
<span>找零:{{ form.admin_djf > 0 ? zhmoney : '' }}</span>
</div> -->
</div>
</div>
</div>
</div>
......@@ -636,9 +635,9 @@ export default {
name: 'Outpatient',
data() {
return {
saveLoding:false,
invoicepostData:{},
invoicepostVisible:false,
saveLoding: false,
invoicepostData: {},
invoicepostVisible: false,
GSdatatime: '',
weiguiList: [],
shiqianText: '',
......@@ -1039,10 +1038,13 @@ export default {
gjzhifu(e) {
this.$forceUpdate()
let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1
this.form.djf = this.round(this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - chongzhi,2)
//this.round( // - chongzhi,
// 2,
// )
this.form.djf = this.round(this.round(
this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - chongzhi,
2,
)- this.bxxxinfo.personal_pay_syd,2)
//this.round( // - chongzhi,
// 2,
// )
},
//医保个人账户支付输入值blur
grzhzfBlur() {
......@@ -1158,13 +1160,13 @@ export default {
feesure(e) {
this.cash_disable = true
this.fullscreenLoading = true
if (e == '1' || e == '5'|| e == '2') {
if (e == '1' || e == '5' || e == '2') {
// return false
recharge({
amount: this.form.djf,
authCode: this.fee.weixin,
operatorNo: this.jobNumber,
payType: e == '1' ? 'cumsNative' : e == '5' ? 'cash' : e == '2'?'智慧医保':'', // 支付类型 cumsNative 聚合支付 cash 现金
payType: e == '1' ? 'cumsNative' : e == '5' ? 'cash' : e == '2' ? '智慧医保' : '', // 支付类型 cumsNative 聚合支付 cash 现金
rechargeType: 0, // 是否预交金充值 1是 0否,
patientId: this.patientData.patient_id,
deptCode: this.dept,
......@@ -1176,7 +1178,7 @@ export default {
type: 'success',
})
this.payData = response.data.result
if (e == '1') {
this.xj_amount = 0
this.source_pay_amount = this.form.djf
......@@ -1184,15 +1186,15 @@ export default {
this.xj_amount = this.form.djf
this.source_pay_amount = 0
}
//接口返回新的院内账户余额
//接口返回新的院内账户余额
// this.bxxxinfo.cash_balance = this.bxxxinfo.cash_balance+ this.form.djf//response.data.hisBalance * 1
// this.bxxxinfo.his_deduct_amount = this.form.djf + this.bxxxinfo.his_deduct_amount
this.form.djf = 0
let djsold = this.round(this.bxxxinfo.brfdje - this.bxxxinfo.grzhzf, 2)
let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1
//充值成功后的代缴费金额
this.form.djf = this.round(this.round(this.round(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2)- chongzhi, 2) //this.round(- chongzhi, 2)
console.log(response, '充值成功++++++++++++++++')
this.form.djf = this.round(this.round(this.round(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2) - chongzhi, 2) //this.round(- chongzhi, 2)
console.log(response, '充值成功++++++++++++++++')
//微信支付宝弹窗
this.uploadfeeshow = false
// 总的大弹窗
......@@ -1206,7 +1208,6 @@ export default {
type: 'error',
})
}
})
.finally(() => {
this.cash_disable = false
......@@ -1835,7 +1836,7 @@ export default {
this.yujiesuanload = false
this.bxxxinfo = response.data
// 本次起付线=本次起付线+病人负担金额
this.bxxxinfo.other_expense= this.bxxxinfo.other_expense+bxxxinfo.patient_burden
this.bxxxinfo.other_expense = this.bxxxinfo.other_expense + bxxxinfo.patient_burden
let frees = this.round(this.bxxxinfo.brfdje * 1 - this.bxxxinfo.his_deduct_amount * 1, 2)
let djf = this.round(this.round(frees - this.bxxxinfo.grzhzf * 1, 2) - this.bxxxinfo.gjzhzf * 1, 2)
if (this.bxxxinfo.personal_balance > djf) {
......@@ -1844,6 +1845,10 @@ export default {
if (this.bxxxinfo.personal_balance < djf) {
this.bxxxinfo.grzhzf = this.bxxxinfo.personal_balance
}
console.log(this.form.insurance_type)
if (this.form.insurance_type == 'OFFSITE') {
this.bxxxinfo.grzhzf = 0
}
let free = this.round(this.bxxxinfo.brfdje * 1 - this.bxxxinfo.his_deduct_amount * 1, 2)
this.form.djf = this.round(this.round(free - this.bxxxinfo.grzhzf * 1, 2) - this.bxxxinfo.gjzhzf * 1, 2)
})
......@@ -1854,13 +1859,13 @@ export default {
},
//确认结算判断
qrjsmiss(e) {
this.saveLoding=true
this.saveLoding = true
if (this.typelistno == 'UNKNOWN') {
this.$message({
message: '请到15号医保审核窗口,审核后缴费!',
type: 'error',
})
this.saveLoding=false
this.saveLoding = false
}
this.sureshow = true
if (this.form.djf > 0) {
......@@ -1869,7 +1874,7 @@ export default {
type: 'warning',
})
this.sureshow = false
this.saveLoding=false
this.saveLoding = false
return false
}
if (this.select_type == '01') {
......@@ -1996,7 +2001,7 @@ export default {
message: '院内账户支付金额不能大于院内账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
if (this.bxxxinfo.grzhzf > this.bxxxinfo.personal_balance) {
......@@ -2004,7 +2009,7 @@ export default {
message: '医保个账支付金额不能大于医保账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
if (this.bxxxinfo.gjzhzf > this.bxxxinfo.family_balance) {
......@@ -2012,7 +2017,7 @@ export default {
message: '共济账户支付金额不能大于共济账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
// this.only_qq = this.only_qq + 1
......@@ -2024,7 +2029,7 @@ export default {
this.sureshow = true
let y = {
source_type: this.payData.targetSys,
source_trade_no: this.payData.sourceTradeNo,
source_trade_no: this.payData.tradeNo,
is_gz: this.gz_name,
channel: this.channel,
xj_amount: this.xj_amount,
......@@ -2051,7 +2056,7 @@ export default {
_this.channels = response.data.settle_type.name
this.$message.success('结算成功')
this.addEventListener()
this.saveLoding=false
this.saveLoding = false
this.dialogVisible = false
this.sureshow = false
this.loadingapplyList = false
......@@ -2059,17 +2064,17 @@ export default {
this.fullscreenLoading = false
this.jeizhishow = false
const jshidprint = response.data
this.invoicepostData=response.data
this.invoicepostVisible=true
this.invoicepostData = response.data
this.invoicepostVisible = true
// _this.printcard(jshidprint)
if ( this.cardType == 'SOCIAL_CARD') {
this.selectCardYiboInfo({
sfzh:response.data.id_card_number
})
}else{
this.selectCardYiboInfo()
if (this.cardType == 'SOCIAL_CARD') {
this.selectCardYiboInfo({
sfzh: response.data.id_card_number,
})
} else {
this.selectCardYiboInfo()
}
//刷新列表
// var obj = {
// patient_id: this.patientData.patient_id, //this.cardNo,
......@@ -2086,7 +2091,7 @@ export default {
// })
})
.finally(res => {
this.saveLoding=false
this.saveLoding = false
this.loadingapplyList = false
this.dialogVisible = false
this.sureshow = false
......@@ -2236,6 +2241,7 @@ export default {
}
}
this.isGS = this.selectTableArr[0]?.settle_type.is_gs
this.zhenduan = this.selectTableArr[0]?.disease_code
},
// 结算类型赋默认值
setPersonType(e) {
......@@ -2383,6 +2389,7 @@ export default {
this.form = data
this.form.rqlbName = data.rqlb == 'A' ? '职工' : data.rqlb == 'B' ? '居民' : ''
settlementPre({
channel: this.channel,
is_gz: this.gz_name,
injury_date: this.GSdatatime,
p_jbbm: this.selectTableArr[0]?.settle_type.is_mb ? zhenduan : '',
......@@ -2426,13 +2433,18 @@ export default {
console.log(this.bxxxinfo.his_deduct_amount, 'oooooooooooooooooo')
this.bxxxinfo.grzhzf = 0
let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
let djf = this.round(this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - this.bxxxinfo.personal_pay_syd,2)
if (this.bxxxinfo.personal_balance >= djf) {
this.bxxxinfo.grzhzf = djf
if (this.form.insurance_type == 'OFFSITE' || this.form.insurance_type == 'LONGDISTANCE') {
this.bxxxinfo.grzhzf = 0
}
}
if (this.bxxxinfo.personal_balance < djf) {
this.bxxxinfo.grzhzf = this.bxxxinfo.personal_balance
if (this.form.insurance_type == 'OFFSITE' || this.form.insurance_type == 'LONGDISTANCE') {
this.bxxxinfo.grzhzf = 0
}
if (res2.data.family_type != '1') {
if (res2.data.gjzhye > this.round(djf - this.bxxxinfo.grzhzf, 2)) {
this.bxxxinfo.gjzhzf = this.round(djf - this.bxxxinfo.grzhzf, 2)
......@@ -2452,7 +2464,8 @@ export default {
}
}
}
console.log(this.bxxxinfo.his_deduct_amount, '++++++++++++')
console.log(this.bxxxinfo.his_deduct_amount, this.form.insurance_type, '++++++++++++')
this.form.djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
// 验证违规
await prescription({
......@@ -2490,7 +2503,7 @@ export default {
this.xj_amount = 0
this.source_pay_amount = 0
this.form = {}
settleSelfPre({ patient_id: this.patientData.patient_id, prescription_nos: this.cost_id, settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '' })
settleSelfPre({ patient_id: this.patientData.patient_id, prescription_nos: this.cost_id, settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '', channel: this.channel, })
.then(res => {
this.yujiesuanLoading = false
this.dialogVisible = true
......@@ -2596,7 +2609,7 @@ export default {
</div>
<div style="margin:-5px 0px 0px 18px;position: relative">
<div class="conline"><span>姓名:</span><span class="money">${this.patientData.name}</span></div>
<div class="conline"><span>性别:</span><span class="money">${this.patientData.sex?this.patientData.sex.name:''}</span></div>
<div class="conline"><span>性别:</span><span class="money">${this.patientData.sex ? this.patientData.sex.name : ''}</span></div>
<div class="conline"><span>年龄:</span><span class="money">${this.patientData.age}</span></div>
<div class="conline"><span>就诊卡号:</span><span class="money">${e.id_card}</span></div>
<div class="conline"><span>交易方式:</span><span class="money">${e.trade_type}</span></div>
......@@ -2654,7 +2667,7 @@ export default {
message: '院内账户支付金额不能大于院内账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
if (this.bxxxinfo.grzhzf > this.bxxxinfo.personal_balance) {
......@@ -2662,7 +2675,7 @@ export default {
message: '医保个账支付金额不能大于医保账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
if (this.bxxxinfo.gjzhzf > this.bxxxinfo.family_balance) {
......@@ -2670,7 +2683,7 @@ export default {
message: '共济账户支付金额不能大于共济账户余额',
type: 'warning',
})
this.saveLoding=false
this.saveLoding = false
return false
}
let y = {
......@@ -2691,15 +2704,15 @@ export default {
.then(response => {
const _this = this
this.$message.success('结算成功')
this.saveLoding=false
this.saveLoding = false
this.dialogVisible = false
this.sureshow = false
this.loadingapplyList = false
this.yibaoshow = false
this.fullscreenLoading = false
this.jeizhishow = false
this.invoicepostData=response.data
this.invoicepostVisible=true
this.invoicepostData = response.data
this.invoicepostVisible = true
const jshidprint = response.data
// setTimeout(function () {
// _this.printcard(jshidprint)
......@@ -2711,7 +2724,7 @@ export default {
})
.catch(err => {})
.finally(res => {
this.saveLoding=false
this.saveLoding = false
this.loadingapplyList = false
// this.dialogVisible = false
this.sureshow = false
......@@ -3254,7 +3267,7 @@ export default {
}
.box-card {
width: 49%;
width: 49%;
background: #fff;
border-radius: 5px;
......
......@@ -474,6 +474,7 @@ import SelectCard from '@/components/SelectCard'
import ReadcardsNew from '@/components/ReadcardsNew'
export default {
components: {
invoicepost,
Cardlist,
Readcards,
editProp1,
......
......@@ -409,6 +409,7 @@
<Readcards :isOpenCarded="carddialogFormVisible" @getyibaoinfo="getyibaoinfo" @closeReadcard="closeReadcard" />
<!-- 确认结算-新-不选择卡类型 -->
<ReadcardsNew :isOpenCarded="yibaoshowNew" :patientcard="form" :patientData="patientData" :selectTableArr="selectTableArr" @getyibaoinfo="selectCardYiboPreselect" @close="closeSelectCard" />
<invoicepost :isOpenCarded="invoicepostVisible" :patientData="invoicepostData"></invoicepost>
<!-- loaidng 动画 -->
<div v-if="false" class="grey-cloth" id="loading">
<div id="img">
......@@ -434,6 +435,7 @@
</div>
</template>
<script>
import invoicepost from '@/components/invoicepost'
import Cardlist from '@/components/SFCCardlist'
import Readcards from '@/components/ReadcardsSFC'
import editProp1 from './components/editProp' //修改自付比例
......@@ -446,6 +448,7 @@ import ReadcardsNew from '@/components/ReadcardsNewSFC'
export default {
components: {
Cardlist,
invoicepost,
Readcards,
editProp1,
SelectCard,
......@@ -454,6 +457,8 @@ export default {
name: 'Outpatient',
data() {
return {
invoicepostData:{},
invoicepostVisible:false,
checked: false,
moreLoading: false,
moreshowdata: {
......@@ -1738,8 +1743,10 @@ export default {
this.fullscreenLoading = false
this.jeizhishow = false
const jshidprint = response.data
this.invoicepostData=response.data
this.invoicepostVisible=true
// setTimeout(function () {
_this.printcard(jshidprint)
// _this.printcard(jshidprint)
// }, 5000)
//刷新列表
......@@ -2302,6 +2309,8 @@ export default {
.then(response => {
const _this = this
this.$message.success('结算成功')
this.invoicepostData=response.data
this.invoicepostVisible=true
this.dialogVisible = false
this.sureshow = false
this.loadingapplyList = false
......@@ -2310,7 +2319,7 @@ export default {
this.jeizhishow = false
const jshidprint = response.data
// setTimeout(function () {
_this.printcard(jshidprint)
// _this.printcard(jshidprint)
// }, 5000)
//刷新列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment