Commit c640941d authored by 任鸿志's avatar 任鸿志

feat(invoice): 增加发票打印细节功能

- 在 api/all.js 中添加 printInvoiceDetails 接口
- 在 changeFree.js 中实现 printInvoiceDetails 函数
- 在 invoicepost 组件中添加打印发票详情功能
parent ad71d18b
...@@ -169,8 +169,9 @@ export const api = { ...@@ -169,8 +169,9 @@ export const api = {
updates:'/api/settlement/update_cost', updates:'/api/settlement/update_cost',
preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信 preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信
recharge:'/outpatient-fees/pay/recharge',//出院获取患者信 recharge:'/outpatient-fees/pay/recharge',//出院获取患者信
outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信 outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信
findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信 printInvoiceDetails:'/invoice/api/printInvoiceDetails',//出院获取患者信
findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信
zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信 zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信
zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信 zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信
preSettlement:'/api/settlement',//出院获取患者信 preSettlement:'/api/settlement',//出院获取患者信
......
...@@ -17,6 +17,13 @@ export function outinvoicing (data) { ...@@ -17,6 +17,13 @@ export function outinvoicing (data) {
data data
}) })
} }
export function printInvoiceDetails (data) {
return requestChange({
url: Vue.prototype.$api.jiesuan.printInvoiceDetails,
method: 'post',
data
})
}
export function findPatMasterIndexByReadCard (data) { export function findPatMasterIndexByReadCard (data) {
return requestChange({ return requestChange({
......
<template> <template>
<el-dialog <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">
title="核对开票信息"
:visible.sync="isOpenCardeds"
:destroy-on-close="true"
width="30%"
custom-class="my-reader-card"
:show-close="true"
:close-on-click-modal="false"
>
<div class="medtihuj"> <div class="medtihuj">
<div style="font-weight: 600">温馨提示</div> <div style="font-weight: 600">温馨提示</div>
<div>请确认发票信息和手机号</div> <div>请确认发票信息和手机号</div>
...@@ -71,7 +63,7 @@ ...@@ -71,7 +63,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { outinvoicing } from '@/api/changeFree' import { outinvoicing, printInvoiceDetails } from '@/api/changeFree'
export default { export default {
components: {}, components: {},
props: { props: {
...@@ -88,11 +80,10 @@ export default { ...@@ -88,11 +80,10 @@ export default {
formRef: null, formRef: null,
isOpenCardeds: false, isOpenCardeds: false,
outinvoicform: { outinvoicform: {
patient:{ patient: {
name: '', name: '',
his_id: '', his_id: '',
id_card: '', id_card: '',
}, },
payerType: '1', payerType: '1',
id_card: '', id_card: '',
...@@ -116,7 +107,7 @@ export default { ...@@ -116,7 +107,7 @@ export default {
this.outinvoicform.name = this.patientData.patient.name this.outinvoicform.name = this.patientData.patient.name
this.outinvoicform.patientId = this.patientData.patient.his_id this.outinvoicform.patientId = this.patientData.patient.his_id
this.outinvoicform.totalAmount = this.patientData.patient_burden this.outinvoicform.totalAmount = this.patientData.patient_burden
this.outinvoicform.rcpt_no = this.patientData.rcpt_no this.outinvoicform.rcpt_no = this.patientData.rcpt_no
}) })
} else { } else {
return false return false
...@@ -125,14 +116,14 @@ export default { ...@@ -125,14 +116,14 @@ export default {
}, },
}, },
methods: { methods: {
deleteinvoic(){ deleteinvoic() {
this.$emit('success') this.$emit('success')
}, },
// 开票 // 开票
async InvoicingFun() { async InvoicingFun() {
let param = { let param = {
cardNo: this.outinvoicform.patientId, cardNo: this.outinvoicform.patientId,
idCard:this.outinvoicform.id_card, idCard: this.outinvoicform.id_card,
jobNumber: localStorage.getItem('jobNumber') ?? '', jobNumber: localStorage.getItem('jobNumber') ?? '',
jshId: this.outinvoicform.jshId, jshId: this.outinvoicform.jshId,
mobile: this.outinvoicform.mobile, mobile: this.outinvoicform.mobile,
...@@ -149,16 +140,35 @@ export default { ...@@ -149,16 +140,35 @@ export default {
message: '开票成功', message: '开票成功',
type: 'success', type: 'success',
}) })
this.handlePrintInvoiceDetailsAsync()
// this.isOpenCardeds = false // this.isOpenCardeds = false
this.$emit('success') this.$emit('success')
} } else {
else {
this.$message({ this.$message({
message: res.message, message: res.message,
type: 'error', type: 'error',
}) })
} }
}, },
async handlePrintInvoiceDetailsAsync() {
try {
const params = {
patientId: this.outinvoicform.patientId,
rcptNo: this.outinvoicform.rcpt_no,
}
setLoading(true)
const { code, message } = await printInvoiceDetails(params)
if (code == 200) {
this.$message({
message: message,
type: 'error',
})
}
} catch (error) {
} finally {
setLoading(false)
}
},
// // 关闭弹窗 // // 关闭弹窗
// handleCloseModal() { // handleCloseModal() {
// this.$emit('closeReadcard', false) // this.$emit('closeReadcard', false)
......
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