Commit 9c0dc822 authored by 任鸿志's avatar 任鸿志

feat(jiesuan): 添加普通发票打印功能

- 在 all.js 中添加了 outinvoicing API 路径
- 在 changeFree.js 中实现了 outinvoicing 函数
- 在 outpatientCharging.vue 中集成了发票打印组件
- 优化了结算流程,结算完成后显示发票打印对话框
parent 2845aab1
......@@ -169,6 +169,7 @@ export const api = {
updates:'/api/settlement/update_cost',
preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信
recharge:'/outpatient-fees/pay/recharge',//出院获取患者信
outinvoicing:'/outpatient-fees/invoice/outinvoicing',//出院获取患者信
zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信
zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信
preSettlement:'/api/settlement',//出院获取患者信
......
......@@ -10,3 +10,10 @@ export function recharge (data) {
data
})
}
export function outinvoicing (data) {
return requestChange({
url: Vue.prototype.$api.jiesuan.outinvoicing,
method: 'post',
data
})
}
<template>
<el-dialog
title="核对开票信息"
:visible.sync="isOpenCardeds"
:destroy-on-close="true"
width="30%"
custom-class="my-reader-card"
:show-close="true"
:close-on-click-modal="false"
@close="handleCloseModal"
>
<div class="medtihuj">
<div style="font-weight: 600">温馨提示</div>
<div>请确认发票信息和手机号</div>
</div>
<div style="margin-top: 20px">
<el-form :model="outinvoicform" ref="formRef" label-width="150" class="header-search-label-styles filter-form">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="身份证号/单位税号" prop="idCard">
<el-input v-model="outinvoicform.id_card" placeholder="体检类型" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="交款人类型">
<el-select v-model="outinvoicform.payerType" placeholder="请选择">
<el-option label="个人" value="1" />
<el-option label="单位" value="2" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="结算号">
<el-input v-model="outinvoicform.jshId" placeholder="税号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号" prop="mobile">
<el-input v-model="outinvoicform.mobile" placeholder="手机号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="患者姓名/单位名称" prop="name">
<el-input v-model="outinvoicform.name" placeholder="总金额" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="患者ID">
<el-input disabled v-model="outinvoicform.patientId" placeholder="患者ID" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="开票总金额">
<el-input disabled v-model="outinvoicform.totalAmount" placeholder="开票总金额" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="InvoicingFun" type="primary">开票</el-button>
<el-button @click="isOpenCardeds = false" type="danger" plain>取消</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import { outinvoicing } from '@/api/changeFree'
export default {
components: {},
props: {
isOpenCarded: Boolean,
patientData: {
type: Object,
default() {
return ''
},
},
},
data() {
return {
formRef: null,
isOpenCardeds: false,
outinvoicform: {
payerType: '1',
id_card: '',
jshId: '',
mobile: '',
name: '',
patientId: '',
totalAmount: '',
},
}
},
watch: {
isOpenCarded: {
handler(v) {
this.isOpenCardeds = v
if (v === true) {
this.$nextTick(() => {
this.outinvoicform.jshId = this.patientData.jshid
this.outinvoicform.id_card = this.patientData.id_card
this.outinvoicform.mobile = this.patientData.patient.phone
this.outinvoicform.name = this.patientData.patient.name
this.outinvoicform.patientId = this.patientData.patient.his_id
this.outinvoicform.totalAmount = this.patientData.patient_burden
})
} else {
return false
}
},
},
},
methods: {
// 开票
async InvoicingFun() {
let param = {
cardNo: form.value.cardNo,
idCard: outinvoicform.value.idCard,
jobNumber: localStorage.getItem('jobNumber') ?? '',
jshId: outinvoicform.value.jshId,
mobile: outinvoicform.value.mobile,
name: outinvoicform.value.name,
patientId: outinvoicform.value.patientId,
payerType: outinvoicform.value.payerType,
rcptNo: outinvoicform.value.jshId,
totalAmount: outinvoicform.value.totalAmount,
}
const res = await outinvoicing(param)
if (res.code == 200) {
this.$message({
message: '开票成功',
type: 'success',
})
this.isOpenCardeds = false
}
},
// 关闭弹窗
handleCloseModal() {
this.$emit('closeReadcard', false)
// this.isOpenCarded = false
if (this.DiagnosisCardOptions?.length > 0) {
this.form.physicalCardType = this.DiagnosisCardOptions[0].code
} else {
this.form.physicalCardType = ''
}
this.form.physicalCard = ''
this.PatientInfo = {}
clearInterval(this.interval)
this.closedevice()
},
closeWebSocket() {
this.websocket.close()
},
},
}
</script>
<style lang="scss" scoped>
::v-deep {
.el-form-item {
// display: flex;
display: inline-block;
}
}
.medtihuj {
font-size: 16px;
background-color: #e3f2ff;
color: #2e6dff;
border: 1px #2e6dff solid;
padding: 6px;
border-radius: 9px;
}
</style>
......@@ -532,6 +532,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">
......@@ -604,6 +605,7 @@
</template>
<script>
import Cardlist from '@/components/SFCCardlist'
import invoicepost from '@/components/invoicepost'
import Readcards from '@/components/ReadcardsSFC'
import editProp1 from './components/editProp' //修改自付比例
import { pdxx, mzxx, mzxxs, mzxxs_ewm, pdxq, info, bxxx, prescription, serviceInvoke, jsxx, hiscard, printmis, queryReadRard, verifyFeeStatus } from '@/api/mzSFC'
......@@ -615,6 +617,7 @@ import SelectCard from '@/components/SelectCardSFC'
import ReadcardsNew from '@/components/ReadcardsNewSFC'
export default {
components: {
invoicepost,
Cardlist,
Readcards,
editProp1,
......@@ -624,6 +627,8 @@ export default {
name: 'Outpatient',
data() {
return {
invoicepostData:{},
invoicepostVisible:false,
GSdatatime: '',
weiguiList: [],
shiqianText: '',
......@@ -2038,6 +2043,8 @@ export default {
this.fullscreenLoading = false
this.jeizhishow = false
const jshidprint = response.data
this.invoicepostData=response.data
this.invoicepostVisible=true
_this.printcard(jshidprint)
this.selectCardYiboInfo()
//刷新列表
......@@ -2663,6 +2670,8 @@ export default {
this.yibaoshow = false
this.fullscreenLoading = false
this.jeizhishow = false
this.invoicepostData=response.data
this.invoicepostVisible=true
const jshidprint = response.data
// setTimeout(function () {
_this.printcard(jshidprint)
......
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