|
|
@@ -0,0 +1,390 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-header style="height: 35px; margin-top: 10px">
|
|
|
+ <el-input size="mini" v-model="patNo" style="width: 200px; margin-left: 2px" clearable placeholder="请输入">
|
|
|
+ <template #prepend>门诊id</template>
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" size="mini" @click="fetchHistoryReceipts">历史处方</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="registor(1)">登记</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="markMzFees">生成</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="qrySpcChrDiseAcct">上传</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="mzPreSetl">试算</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="mzSettle">结算</el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="deleteMtFees">撤销处方</el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="registor(2)">取消登记</el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="revokeFees">取消上传</el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="revokeMzSettle">取消结算</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-container>
|
|
|
+ <el-aside width="400px">
|
|
|
+ <el-tag>历史处方目录</el-tag>
|
|
|
+ <el-table :height="tableHeight" size="mini" :data="historyReceipts" stripe highlight-current-row @row-click="fetchHistoryReceiptDetail">
|
|
|
+ <el-table-column property="patNo" label="Id号" width="70"></el-table-column>
|
|
|
+ <el-table-column property="times" label="就诊次数" width="60"></el-table-column>
|
|
|
+ <el-table-column property="chargeFee" label="金额" width="60"></el-table-column>
|
|
|
+ <el-table-column property="chargeDate" label="时间"></el-table-column>
|
|
|
+ <el-table-column label="状态" width="60">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-html="colorStatus(scope.row.status)"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-aside>
|
|
|
+ <el-main>
|
|
|
+ <el-tag>历史处方明细</el-tag>
|
|
|
+ <div :style="receiptBoxStyle">
|
|
|
+ <div v-for="(item, index) in currentReceipts" :key="index">
|
|
|
+ <div class="receipt-item">
|
|
|
+ <div class="w75">{{ index + 1 }}){{ item.drugName }} </div>
|
|
|
+ <div class="w25">× {{ item.quantity }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="receipt-tips"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog title="个人参保信息" v-model="showInsuinfo" width="65%">
|
|
|
+ <el-table :data="insuinfo" @row-click="handleClickInsuinfo">
|
|
|
+ <el-table-column property="balc" label="余额"></el-table-column>
|
|
|
+ <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
|
|
|
+ <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
|
|
|
+ <el-table-column label="参保状态" prop="psnInsuStasName"></el-table-column>
|
|
|
+ <el-table-column property="psnInsuDate" label="个人参保日期"></el-table-column>
|
|
|
+ <el-table-column property="pausInsuDate" label="暂停参保日期"></el-table-column>
|
|
|
+ <el-table-column property="cvlservFlagName" label="公务员标志"></el-table-column>
|
|
|
+ <el-table-column property="insuplcAdmdvs" label="参保地医保区划"></el-table-column>
|
|
|
+ <el-table-column property="insuplcAdmdvsName" label="参保地名称"></el-table-column>
|
|
|
+ <el-table-column property="empName" label="单位名称"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="请选择(慢特病备案信息)" v-model="showSpcChrAccts" width="40%">
|
|
|
+ <el-table :data="spcChrDiseAccts" @row-click="uploadFees">
|
|
|
+ <el-table-column property="opspDiseCode" label="病种编码"></el-table-column>
|
|
|
+ <el-table-column property="opspDiseName" label="病种名称"></el-table-column>
|
|
|
+ <el-table-column property="begndate" label="生效日期"></el-table-column>
|
|
|
+ <el-table-column property="enddate" label="失效日期"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-container>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ deleteAllMzReceipts,
|
|
|
+ getHistoryMzReceipts,
|
|
|
+ getHistoryReceiptDetail,
|
|
|
+ insertSiMzFees,
|
|
|
+ outpatientPreSettlement,
|
|
|
+ outpatientRegistration,
|
|
|
+ revokeOutpatientFeeDetails,
|
|
|
+ revokeOutpatientRegistration,
|
|
|
+ uploadOutpatientFeeDetails,
|
|
|
+ outpatientSettlement,
|
|
|
+ revokeOutpatientSettlement,
|
|
|
+} from '@/api/medical-insurance/si-outpatient'
|
|
|
+import { obtainBasicPersonInfo, querySpecialChronicDiseasesAccreditation } from '@/api/medical-insurance/si-query'
|
|
|
+import { ref } from 'vue-demi'
|
|
|
+import store from '@/store'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+export default {
|
|
|
+ setup() {
|
|
|
+ const windowSize = store.state.app.windowSize
|
|
|
+ const tableHeight = windowSize.h - 70
|
|
|
+ const receiptBoxStyle = {
|
|
|
+ height: tableHeight - 8 + 'px',
|
|
|
+ marginTop: '8px',
|
|
|
+ overflowY: 'auto',
|
|
|
+ }
|
|
|
+ const patNo = ref('')
|
|
|
+ const historyReceipts = ref([])
|
|
|
+ const currentRow = ref({})
|
|
|
+ const currentReceipts = ref([])
|
|
|
+ const colorStatus = (status) => {
|
|
|
+ return status > 0 ? '<span style="color: green">已生成</span>' : '<span style="color: red">未生成</span>'
|
|
|
+ }
|
|
|
+ const fetchHistoryReceipts = () => {
|
|
|
+ historyReceipts.value = []
|
|
|
+ currentRow.value = {}
|
|
|
+ getHistoryMzReceipts(patNo.value).then((res) => {
|
|
|
+ historyReceipts.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const fetchHistoryReceiptDetail = (row) => {
|
|
|
+ currentRow.value = row
|
|
|
+ getHistoryReceiptDetail(row).then((res) => {
|
|
|
+ currentReceipts.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const insuinfo = ref([])
|
|
|
+ const showInsuinfo = ref(false)
|
|
|
+ const registor = (flag) => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ medType: '14',
|
|
|
+ times: currentRow.value.times,
|
|
|
+ needSaving: 1,
|
|
|
+ }
|
|
|
+ if (flag === 1) {
|
|
|
+ obtainBasicPersonInfo(param).then((res) => {
|
|
|
+ insuinfo.value = res.insuinfo
|
|
|
+ showInsuinfo.value = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ revokeOutpatientRegistration(param).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: res,
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const handleClickInsuinfo = (row) => {
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ insutype: row.insutype,
|
|
|
+ psnType: row.psnType,
|
|
|
+ insuplcAdmdvs: row.insuplcAdmdvs,
|
|
|
+ empName: row.empName,
|
|
|
+ }
|
|
|
+ outpatientRegistration(param).then((res) => {
|
|
|
+ showInsuinfo.value = false
|
|
|
+ ElMessage({
|
|
|
+ message: res,
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const markMzFees = () => {
|
|
|
+ if (currentReceipts.value.length === 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择要保存的处方!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ElMessageBox.confirm('是否将选中处方生成门特费用?', '提示', {
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '生成',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ insertSiMzFees(currentReceipts.value).then(() => {
|
|
|
+ currentRow.value.status = '1'
|
|
|
+ ElMessage({
|
|
|
+ message: '已成功生成门特处方。',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ }
|
|
|
+
|
|
|
+ const spcChrDiseAccts = ref([])
|
|
|
+ const showSpcChrAccts = ref(false)
|
|
|
+ const qrySpcChrDiseAcct = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ querySpecialChronicDiseasesAccreditation(param).then((res) => {
|
|
|
+ spcChrDiseAccts.value = res
|
|
|
+ showSpcChrAccts.value = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const uploadFees = (row) => {
|
|
|
+ uploadOutpatientFeeDetails(row).then((res) => {
|
|
|
+ showSpcChrAccts.value = false
|
|
|
+ mzPreSetl()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const mzPreSetl = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ staffId: store.state.user.info.code,
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ outpatientPreSettlement(param).then((res) => {
|
|
|
+ const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
|
|
|
+ ElMessageBox.alert(message, '试算成功', {
|
|
|
+ type: 'success',
|
|
|
+ showCancelButton: false,
|
|
|
+ }).then(() => {})
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const revokeFees = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ revokeOutpatientFeeDetails(param).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: res,
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const deleteMtFees = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ deleteAllMzReceipts(param).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: res,
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ fetchHistoryReceipts()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const mzSettle = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ outpatientSettlement(param).then((res) => {
|
|
|
+ const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
|
|
|
+ ElMessageBox.alert(message, '结算成功', {
|
|
|
+ type: 'success',
|
|
|
+ showCancelButton: false,
|
|
|
+ }).then(() => {})
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const revokeMzSettle = () => {
|
|
|
+ if (!currentRow.value.times) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先选择历史处方。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ patNo: patNo.value,
|
|
|
+ times: currentRow.value.times,
|
|
|
+ }
|
|
|
+ revokeOutpatientSettlement(param).then((res) => {
|
|
|
+ ElMessageBox.alert(res, '取消结算成功', {
|
|
|
+ type: 'success',
|
|
|
+ showCancelButton: false,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ patNo,
|
|
|
+ tableHeight,
|
|
|
+ receiptBoxStyle,
|
|
|
+ historyReceipts,
|
|
|
+ currentRow,
|
|
|
+ currentReceipts,
|
|
|
+ colorStatus,
|
|
|
+ fetchHistoryReceipts,
|
|
|
+ fetchHistoryReceiptDetail,
|
|
|
+ insuinfo,
|
|
|
+ showInsuinfo,
|
|
|
+ registor,
|
|
|
+ handleClickInsuinfo,
|
|
|
+ markMzFees,
|
|
|
+ spcChrDiseAccts,
|
|
|
+ showSpcChrAccts,
|
|
|
+ qrySpcChrDiseAcct,
|
|
|
+ uploadFees,
|
|
|
+ mzPreSetl,
|
|
|
+ revokeFees,
|
|
|
+ deleteMtFees,
|
|
|
+ mzSettle,
|
|
|
+ revokeMzSettle,
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.receipt-item {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.receipt-tips {
|
|
|
+ margin: 0 0 10px 100px;
|
|
|
+}
|
|
|
+.receipt-tips > span {
|
|
|
+ margin-right: 15px;
|
|
|
+}
|
|
|
+</style>
|