Commit 5e13d722 authored by 任鸿志's avatar 任鸿志

feat(invoice): 添加打印发票详情功能并优化发票打印流程

- 在 all.js 中添加 printInvoiceDetails API 接口
- 在 changeFree.js 中实现 printInvoiceDetails 函数
- 修改 invoicepost 组件,增加打印发票详情功能
- 优化 outpatientCharging 组件中的工伤保险逻辑
parent 1d212df3
...@@ -171,6 +171,7 @@ export const api = { ...@@ -171,6 +171,7 @@ export const api = {
recharge:'/outpatient-fees/pay/recharge',//出院获取患者信 recharge:'/outpatient-fees/pay/recharge',//出院获取患者信
outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信 outinvoicing:'/invoice/api/outinvoicing',//出院获取患者信
printInvoice:'/invoice/api/printInvoice',//出院获取患者信 printInvoice:'/invoice/api/printInvoice',//出院获取患者信
printInvoiceDetails:'/invoice/api/printInvoiceDetails',//出院获取患者信
findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信 findPatMasterIndexByReadCard:'/outpatient-fees/patMasterIndex/findPatMasterIndexByReadCard',//出院获取患者信
zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信 zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信
zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信 zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信
......
...@@ -24,6 +24,13 @@ export function printInvoice (data) { ...@@ -24,6 +24,13 @@ export function printInvoice (data) {
params:data params:data
}) })
} }
export function printInvoiceDetails (data) {
return requestChange({
url: Vue.prototype.$api.jiesuan.printInvoiceDetails,
method: 'get',
params:data
})
}
export function findPatMasterIndexByReadCard (data) { export function findPatMasterIndexByReadCard (data) {
return requestChange({ return requestChange({
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { outinvoicing, printInvoice } from '@/api/changeFree' import { outinvoicing, printInvoice,printInvoiceDetails } from '@/api/changeFree'
export default { export default {
components: {}, components: {},
props: { props: {
...@@ -140,6 +140,7 @@ export default { ...@@ -140,6 +140,7 @@ export default {
message: '开票成功', message: '开票成功',
type: 'success', type: 'success',
}) })
this.handlePrintInvoiceAsync()
this.handlePrintInvoiceDetailsAsync() this.handlePrintInvoiceDetailsAsync()
// this.isOpenCardeds = false // this.isOpenCardeds = false
this.$emit('success') this.$emit('success')
...@@ -150,7 +151,7 @@ export default { ...@@ -150,7 +151,7 @@ export default {
}) })
} }
}, },
async handlePrintInvoiceDetailsAsync() { async handlePrintInvoiceAsync() {
try { try {
const params = { const params = {
patientId: this.outinvoicform.patientId, patientId: this.outinvoicform.patientId,
...@@ -161,7 +162,26 @@ export default { ...@@ -161,7 +162,26 @@ export default {
if (code == 200) { if (code == 200) {
this.$message({ this.$message({
message: message, message: message,
type: 'error', type: 'success',
})
}
} catch (error) {
} finally {
// setLoading(false)
}
},
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: 'success',
}) })
} }
} catch (error) { } catch (error) {
......
...@@ -757,10 +757,10 @@ export default { ...@@ -757,10 +757,10 @@ export default {
value: '1', value: '1',
label: '自费', label: '自费',
}, },
// { {
// value: '5', value: '5',
// label: '工伤', label: '工伤',
// }, },
], ],
channels: '', channels: '',
man_name: '', man_name: '',
...@@ -2015,8 +2015,12 @@ export default { ...@@ -2015,8 +2015,12 @@ export default {
this.form = {} this.form = {}
this.form = data this.form = data
this.form.rqlbName = data.rqlb == 'A' ? '职工' : data.rqlb == 'B' ? '居民' : '' this.form.rqlbName = data.rqlb == 'A' ? '职工' : data.rqlb == 'B' ? '居民' : ''
if (this.man_name == '5') {
this.isGS=true
}
await settlementPre({ await settlementPre({
sy: this.is_sy, sy: this.is_sy,
is_gs: this.isGS,
channel: this.channel, channel: this.channel,
// is_gz: this.man_name == '3' ? true : false, // is_gz: this.man_name == '3' ? true : false,
injury_date: this.GSdatatime, injury_date: this.GSdatatime,
......
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