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 = {
updates:'/api/settlement/update_cost',
preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信
recharge:'/outpatient-fees/pay/recharge',//出院获取患者信
outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信
findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信
outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信
printInvoiceDetails:'/invoice/api/printInvoiceDetails',//出院获取患者信
findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信
zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信
zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信
preSettlement:'/api/settlement',//出院获取患者信
......
......@@ -17,6 +17,13 @@ export function outinvoicing (data) {
data
})
}
export function printInvoiceDetails (data) {
return requestChange({
url: Vue.prototype.$api.jiesuan.printInvoiceDetails,
method: 'post',
data
})
}
export function findPatMasterIndexByReadCard (data) {
return requestChange({
......
<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"
>
<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">
<div class="medtihuj">
<div style="font-weight: 600">温馨提示</div>
<div>请确认发票信息和手机号</div>
......@@ -71,7 +63,7 @@
</el-dialog>
</template>
<script>
import { outinvoicing } from '@/api/changeFree'
import { outinvoicing, printInvoiceDetails } from '@/api/changeFree'
export default {
components: {},
props: {
......@@ -88,11 +80,10 @@ export default {
formRef: null,
isOpenCardeds: false,
outinvoicform: {
patient:{
patient: {
name: '',
his_id: '',
id_card: '',
},
payerType: '1',
id_card: '',
......@@ -116,7 +107,7 @@ export default {
this.outinvoicform.name = this.patientData.patient.name
this.outinvoicform.patientId = this.patientData.patient.his_id
this.outinvoicform.totalAmount = this.patientData.patient_burden
this.outinvoicform.rcpt_no = this.patientData.rcpt_no
this.outinvoicform.rcpt_no = this.patientData.rcpt_no
})
} else {
return false
......@@ -125,14 +116,14 @@ export default {
},
},
methods: {
deleteinvoic(){
this.$emit('success')
deleteinvoic() {
this.$emit('success')
},
// 开票
async InvoicingFun() {
let param = {
cardNo: this.outinvoicform.patientId,
idCard:this.outinvoicform.id_card,
idCard: this.outinvoicform.id_card,
jobNumber: localStorage.getItem('jobNumber') ?? '',
jshId: this.outinvoicform.jshId,
mobile: this.outinvoicform.mobile,
......@@ -149,16 +140,35 @@ export default {
message: '开票成功',
type: 'success',
})
this.handlePrintInvoiceDetailsAsync()
// this.isOpenCardeds = false
this.$emit('success')
}
else {
this.$emit('success')
} else {
this.$message({
message: res.message,
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() {
// 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