123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861 |
- <template>
- <el-container>
- <el-header style="height: 35px; margin-top: 10px">
- <el-input v-model="patientId" style="width: 200px; margin-left: 2px" clearable placeholder="请输入">
- <template #prepend>门诊id</template>
- </el-input>
- <el-select v-model="medType" style="width: 120px" placeholder="医疗类别">
- <el-option v-for="item in medTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
- </el-select>
- <el-select v-model="admdvs" clearable filterable placeholder="参保地区" style="width: 180px">
- <el-option v-for="item in admdvses" :key="item.code" :label="item.name" :value="item.code">
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
- <el-divider direction="vertical"></el-divider>
- <span>{{ item.name }}</span>
- </el-option>
- </el-select>
- <el-dropdown trigger="click" @command="receiptsOpts" style="margin-left: 8px">
- <el-button type="primary">
- 处方 <el-icon><ArrowDown /></el-icon>
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item icon="Document" command="require">获取门诊处方</el-dropdown-item>
- <el-dropdown-item icon="Delete" command="delete">删除所有处方</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <ReadCard :pat-no="patientId" @success="afterReadCard" />
- <el-dropdown trigger="click" @command="registor">
- <el-button type="primary">
- 登记 <el-icon><ArrowDown /></el-icon>
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item icon="CreditCard" command="execute">医保登记</el-dropdown-item>
- <el-dropdown-item icon="RefreshLeft" command="revoke">取消登记</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-dropdown trigger="click" @command="receiptsOpts" style="margin-left: 8px">
- <el-button type="primary">
- 上传 <el-icon><ArrowDown /></el-icon>
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item icon="Upload" command="upload">医保处方上传</el-dropdown-item>
- <el-dropdown-item icon="RefreshLeft" command="retract">撤销处方上传</el-dropdown-item>
- <el-dropdown-item divided icon="Edit" command="diags">普门诊断补录</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-dropdown trigger="click" @command="settlement" style="margin-left: 8px">
- <el-button type="primary">
- 结算 <el-icon><ArrowDown /></el-icon>
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item icon="SetUp" command="preSettlement">试算</el-dropdown-item>
- <el-dropdown-item icon="Stamp" command="realSettlement">结算</el-dropdown-item>
- <el-dropdown-item divided icon="RefreshLeft" command="cancelSettlement">取消结算</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-button type="danger" icon="Refresh" @click="clearinfo" style="margin-left: 8px"> 重置 </el-button>
- </el-header>
- <el-main>
- <el-row :gutter="5">
- <el-col :span="2">
- <el-table ref="timesTable" :data="unPaidReceipts" highlight-current-row :height="tableHeight" @row-click="clickTimes">
- <el-table-column label="就诊次数">
- <template #default="scope"> 第 {{ scope.row.times }} 次 </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="5">
- <el-table ref="ordersTable" :data="orderNos" highlight-current-row :height="tableHeight" @row-click="clickOrderNo">
- <el-table-column label="处方" width="60">
- <template #default="scope">
- <span v-html="colorStatus(scope.row)"></span>
- </template>
- </el-table-column>
- <el-table-column label="金额" width="60">
- <template #default="scope">
- {{ scope.row.totalFee.toFixed(2) }}
- </template>
- </el-table-column>
- <el-table-column label="操作">
- <template #default="scope">
- <el-button text icon="Check" @click="markMzFees" :disabled="scope.row.status"> 生成 </el-button>
- <el-button text icon="Delete" @click="unmarkMzFees(scope.row)" :disabled="!scope.row.status"> 撤销 </el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="15">
- <div style="margin-left: 30px">
- <div class="receipt-title">长沙泰和医院处方笺</div>
- <el-divider></el-divider>
- <div class="receipt-head">
- <div>姓名:{{ mzVisit.name }}</div>
- <div>性别:{{ mzVisit.sex }}</div>
- <div>年龄:{{ mzVisit.age }} 岁</div>
- </div>
- <div class="receipt-head">
- <div>门诊号:{{ mzVisit.patientId }}</div>
- <div>科别:{{ mzVisit.visitDeptName }}</div>
- <div class="ellipsis-text" :title="mzVisit.icdText">临床诊断:{{ mzVisit.icdText }}</div>
- </div>
- <div class="receipt-head">
- <div>开具日期:{{ mzVisit.opDay }}</div>
- <div class="ellipsis-text">
- 地址:<span :title="mzVisit.address">{{ mzVisit.address }}</span>
- </div>
- <div>电话:{{ mzVisit.phoneNo }}</div>
- </div>
- <el-divider></el-divider>
- <div :style="receiptBoxStyle">
- <div v-for="(item, index) in currentReceipts" :key="index">
- <div class="receipt-item">
- <div class="w75">
- <el-checkbox v-model="item.checked"></el-checkbox>
- {{ index + 1 }}){{ item.drugName }} (
- <span v-if="item.specification">{{ item.specification }}</span>
- <span v-else>{{ item.drugUnit }}</span>
- )
- </div>
- <div class="w25">× {{ item.quantity }}</div>
- </div>
- <div class="receipt-tips">
- <span v-if="item.drugQuan"> 用法:{{ item.drugQuan }}{{ item.drugUnit }}/次 </span>
- <span v-if="item.frequency"> {{ item.frequency }} </span>
- <span v-if="item.orderDays"> {{ item.orderDays }}天 </span>
- <span v-if="item.supplyCode"> {{ item.supplyCode }} </span>
- <span v-if="item.instructionText"> 备注:{{ item.instructionText }} </span>
- </div>
- <div :style="{ color: item.nationalCode ? 'green' : 'red', fontWeight: 'bold', padding: '0 0 12px 64px' }">医保码:{{ item.nationalCode || '未匹配' }}</div>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="receipt-head">
- <div style="font-size: 15px">医师:{{ mzVisit.doctorName }} / {{ mzVisit.doctorCode }}</div>
- <div style="font-size: 15px">
- 总金额:<span style="font-size: 18px; font-weight: bold">¥{{ totalFee }}</span>
- </div>
- </div>
- </div>
- </el-col>
- </el-row>
- </el-main>
- <el-dialog title="个人信息" v-model="showInsuinfo" width="65%">
- <el-tag>参保信息</el-tag>
- <el-table :data="psnBaseinfo.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>
- <div style="height: 16px"></div>
- <el-tag>身份信息</el-tag>
- <el-table :data="psnBaseinfo.idetinfo" stripe height="180">
- <el-table-column label="人员身份类别" prop="psnIdetTypeName"></el-table-column>
- <el-table-column label="人员类别等级" prop="psnTypeLv"></el-table-column>
- <el-table-column label="备注" prop="memo"></el-table-column>
- <el-table-column label="开始时间" prop="begntime"></el-table-column>
- <el-table-column label="结束时间" prop="endtime"></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-dialog title="请选择生育诊断" v-model="showMatnDises" width="60%">
- <el-table :data="matnDises" @row-click="uploadFees" stripe height="360">
- <el-table-column property="code" label="病种编码"></el-table-column>
- <el-table-column property="name" label="病种名称"></el-table-column>
- <el-table-column property="insutype" label="险种类型"></el-table-column>
- <el-table-column property="limitAmt" label="疾病限额"></el-table-column>
- </el-table>
- </el-dialog>
- <el-dialog title="普门诊断补录" v-model="showInputDiags" width="60%" :close-on-click-modal="false" :close-on-press-escape="false">
- <div style="margin-top: -20px; margin-bottom: 16px; background: lightgray; padding: 8px 4px; color: black">临床诊断参考:{{ mzVisit.icdText }}</div>
- 检索方法:<el-select v-model="searchMethod" style="width: 80px">
- <el-option v-for="item in searchMethods" :key="item.code" :label="item.name" :value="item.code"></el-option> </el-select
- >
- <el-autocomplete v-model="diagItem.diagName" :fetch-suggestions="searchDiag" placeholder="请输入内容" clearable @select="handleSelectDiag" style="width: 220px">
- <template #default="{ item }">
- <div style="height: 40px">
- <div style="height: 16px; margin-top: 4px; font-size: 12px; color: #8492a6">
- {{ item.code }}
- </div>
- <div style="height: 16px">{{ item.name }}</div>
- </div>
- </template>
- </el-autocomplete>
- <el-select v-model="diagItem.diagType" placeholder="诊断类别" style="width: 120px">
- <el-option v-for="item in diagTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
- </el-select>
- <el-divider direction="vertical"></el-divider>
- <el-button type="primary" icon="Plus" @click="addDiag">添加到诊断列表</el-button>
- <el-button type="success" icon="Check" @click="saveDiag">保存诊断</el-button>
- <el-table :data="diags" stripe>
- <el-table-column prop="diagSrtNo" label="序号" width="40"></el-table-column>
- <el-table-column prop="diagType" label="诊断类别" width="60"></el-table-column>
- <el-table-column prop="diagCode" label="诊断编码"></el-table-column>
- <el-table-column prop="diagName" label="诊断名称"></el-table-column>
- <el-table-column prop="diagDept" label="诊断科室"></el-table-column>
- <el-table-column prop="diseDorNo" label="医生编码" width="80"></el-table-column>
- <el-table-column prop="diseDorName" label="医生姓名" width="80"></el-table-column>
- <el-table-column prop="diagTime" label="诊断时间"></el-table-column>
- <el-table-column label="操作">
- <template #default="scope">
- <el-button icon="Delete" text @click="deleteDiag(scope.$index)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-dialog>
- </el-container>
- </template>
- <script>
- import { onMounted, reactive, ref } from 'vue'
- import { admdvses } from '@/data'
- import {
- deleteAllMzReceipts,
- deleteMzReceipt,
- getMzReceipts,
- insertSiMzFees,
- outpatientPreSettlement,
- outpatientRegistration,
- revokeOutpatientFeeDetails,
- revokeOutpatientRegistration,
- uploadOutpatientFeeDetails,
- saveSiMzDiags,
- outpatientSettlement,
- revokeOutpatientSettlement,
- } from '@/api/medical-insurance/si-outpatient'
- import { cptInsutype } from '@/utils/computed'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import store from '@/store'
- import { obtainBasicPersonInfo, querySpecialChronicDiseasesAccreditation, queryMzMatnDises } from '@/api/medical-insurance/si-query'
- import { getMedTypesByFlag } from '@/api/medical-insurance/si-dict'
- import { increaseWeight, searchData } from '@/api/inpatient/dictionary'
- import { clone } from '@/utils/clone'
- import ReadCard from '@/components/medical-insurance/readcard/Index.vue'
- export default {
- components: {
- ReadCard,
- },
- setup() {
- //todo 完成业务后清除原读卡数据
- const medType = ref(null)
- const admdvs = ref(null)
- const medTypes = ref([])
- const patientId = ref('')
- const readCardBizType = ref('')
- const times = ref(null)
- const windowSize = store.state.app.windowSize
- const tableHeight = windowSize.h - 55
- const receiptBoxStyle = {
- height: tableHeight - 280 + 'px',
- overflowY: 'auto',
- }
- const unPaidReceipts = ref([])
- const showInsuinfo = ref(false)
- const psnBaseinfo = ref({})
- const mzVisit = ref({})
- const receipts = ref({})
- const orderNos = ref([])
- const currentReceipts = ref([])
- const totalFee = ref(null)
- const timesTable = ref(null)
- const ordersTable = ref(null)
- const currentOrder = ref({})
- const spcChrDiseAccts = ref([])
- const showSpcChrAccts = ref(false)
- const matnDises = ref([])
- const showMatnDises = ref(false)
- const showInputDiags = ref(false)
- const searchMethods = [
- { code: 'alpha', name: '首拼' },
- { code: 'code', name: '编码' },
- { code: 'name', name: '名称' },
- ]
- const searchMethod = ref('alpha')
- const diagItem = reactive({})
- const searchDiag = (queryString, cb) => {
- if (queryString && queryString.length > 1) {
- const param = {
- method: searchMethod.value,
- content: queryString,
- target: 'diag',
- medType: medType.value,
- }
- searchData(param).then((res) => {
- cb(res)
- })
- }
- }
- const handleSelectDiag = (item) => {
- increaseWeight({ code: 'diag', name: item.code }).then(() => {
- diagItem.diagCode = item.code
- diagItem.diagName = item.name
- })
- }
- const diagTypes = [
- { code: '1', name: '西医诊断' },
- { code: '2', name: '中医主病诊断' },
- { code: '3', name: '中医主证诊断' },
- ]
- const diags = ref([])
- const addDiag = () => {
- if (!diagItem.diagCode) {
- ElMessage({
- message: '请选择诊断!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return
- }
- if (!diagItem.diagType) {
- ElMessage({
- message: '请选择诊断类别!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return
- }
- diagItem.patNo = patientId.value
- diagItem.times = times.value
- diagItem.diagSrtNo = diags.value.length + 1
- diagItem.diagDept = mzVisit.value.visitDeptName
- diagItem.diseDorNo = mzVisit.value.doctorCode
- diagItem.diseDorName = mzVisit.value.doctorName
- diagItem.diagTime = mzVisit.value.opDay
- diagItem.valiFlag = '1'
- diags.value.push(clone(diagItem))
- diagItem.diagCode = ''
- diagItem.diagName = ''
- diagItem.diagType = ''
- }
- const deleteDiag = (index) => {
- diags.value.splice(index, 1)
- for (let i = 0; i < diags.value.length; i++) {
- const element = diags.value[i]
- element.diagSrtNo = i + 1
- }
- }
- const saveDiag = () => {
- if (diags.value.length === 0) {
- ElMessage({
- message: '没有要保存的诊断!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return
- }
- saveSiMzDiags(diags.value).then((res) => {
- ElMessageBox.alert(res, '提示', {
- type: 'success',
- showCancelButton: false,
- }).then(() => {
- diags.value = []
- showInputDiags.value = false
- })
- })
- }
- const nullPatientId = () => {
- if (!patientId.value) {
- ElMessage({
- message: '请输入门诊id号!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return true
- }
- return false
- }
- const registor = (command) => {
- if (nullPatientId()) {
- return
- }
- if (nullTimes()) {
- return
- }
- const param = {
- patNo: patientId.value,
- medType: medType.value,
- admdvs: admdvs.value,
- times: times.value,
- needSaving: 1,
- }
- if (command === 'execute') {
- if (!medType.value) {
- ElMessage({
- message: '请先选择医疗类别!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return
- }
- obtainBasicPersonInfo(param).then((res) => {
- times.value = res.times
- psnBaseinfo.value = res
- showInsuinfo.value = true
- })
- } else {
- revokeOutpatientRegistration(param).then((res) => {
- ElMessage({
- message: res,
- type: 'success',
- duration: 2000,
- showClose: true,
- })
- })
- }
- }
- const nullTimes = () => {
- if (!times.value) {
- ElMessage({
- message: '请先获取门诊处方!',
- type: 'warning',
- duration: 2500,
- showClose: true,
- })
- return true
- }
- return false
- }
- const receiptsOpts = (command) => {
- if (nullPatientId()) {
- return
- }
- if (command !== 'require') {
- if (nullTimes()) {
- return
- }
- }
- const param = {
- patNo: patientId.value,
- times: times.value,
- }
- switch (command) {
- case 'require':
- fetchReceipts(param)
- break
- case 'delete':
- deleteAllMzReceipts(param).then((res) => {
- ElMessage({
- message: res,
- type: 'success',
- duration: 2000,
- showClose: true,
- })
- fetchReceipts(param)
- })
- break
- case 'upload':
- qrySpcChrDiseAcct(param)
- break
- case 'retract':
- revokeOutpatientFeeDetails(param).then((res) => {
- ElMessage({
- message: res,
- type: 'success',
- duration: 2000,
- showClose: true,
- })
- })
- break
- case 'diags':
- showInputDiags.value = true
- break
- }
- }
- const fetchReceipts = (param) => {
- clearReadCardData()
- getMzReceipts(param)
- .then((res) => {
- unPaidReceipts.value = res
- setTimeout(() => {
- timesTable.value.setCurrentRow(res[0])
- clickTimes(res[0])
- }, 100)
- })
- .catch(() => {
- unPaidReceipts.value = []
- orderNos.value = []
- currentReceipts.value = []
- })
- }
- 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(() => {
- currentOrder.value.status = true
- ElMessage({
- message: '已成功生成医保处方。',
- type: 'success',
- duration: 2500,
- showClose: true,
- })
- })
- })
- .catch(() => {})
- }
- const qrySpcChrDiseAcct = (param) => {
- if (medType.value === '51') {
- queryMzMatnDises().then((res) => {
- matnDises.value = res
- showMatnDises.value = true
- })
- } else if (medType.value === '14') {
- querySpecialChronicDiseasesAccreditation(param).then((res) => {
- spcChrDiseAccts.value = res
- showSpcChrAccts.value = true
- })
- } else {
- uploadFees(param)
- }
- }
- const uploadFees = (row) => {
- if (medType.value === '51') {
- row.patNo = patientId.value
- row.times = times.value
- row.opspDiseCode = row.code
- row.opspDiseName = row.name
- }
- uploadOutpatientFeeDetails(row).then((res) => {
- times.value = res.times
- showSpcChrAccts.value = false
- showMatnDises.value = false
- mzPreSetl()
- })
- }
- const readCardData = reactive({
- mdtrtCertType: null,
- readCardResult: null,
- readCardBizType: null,
- })
- const clearReadCardData = () => {
- readCardData.mdtrtCertType = null
- readCardData.readCardResult = null
- readCardData.readCardBizType = null
- }
- const afterReadCard = (result) => {
- readCardData.mdtrtCertType = result.mdtrtCertType
- readCardData.readCardResult = result.readCardResult
- readCardData.readCardBizType = result.readCardBizType
- }
- const handleClickInsuinfo = (row) => {
- const param = {
- patNo: patientId.value,
- times: times.value,
- insutype: row.insutype,
- psnType: row.psnType,
- insuplcAdmdvs: row.insuplcAdmdvs,
- empName: row.empName,
- mdtrtCertType: readCardData.mdtrtCertType,
- readCardResult: readCardData.readCardResult,
- readCardBizType: readCardData.readCardBizType,
- }
- outpatientRegistration(param).then((res) => {
- showInsuinfo.value = false
- clearReadCardData()
- ElMessage({
- message: res,
- type: 'success',
- duration: 2000,
- showClose: true,
- })
- })
- }
- const clickOrderNo = (row) => {
- currentOrder.value = row
- currentReceipts.value = receipts.value[row.orderNo]
- totalFee.value = row.totalFee.toFixed(2)
- }
- const clickTimes = (row) => {
- mzVisit.value = row.mzVisit
- receipts.value = row.mzReceipts
- orderNos.value = row.orderNos
- times.value = row.times
- currentReceipts.value = []
- setTimeout(() => {
- ordersTable.value.setCurrentRow(orderNos.value[0])
- clickOrderNo(orderNos.value[0])
- }, 100)
- }
- const colorStatus = (row) => {
- return row.status ? `<span style="color: green">第${row.orderNo}张</span>` : `<span style="color: red">第${row.orderNo}张</span>`
- }
- const unmarkMzFees = (row) => {
- ElMessageBox.confirm('是否将选中处方从医保处方中删除?', '提示', {
- type: 'warning',
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- })
- .then(() => {
- deleteMzReceipt(row).then(() => {
- currentOrder.value.status = false
- ElMessage({
- message: '已成功删除医保处方。',
- type: 'success',
- duration: 2500,
- showClose: true,
- })
- })
- })
- .catch(() => {})
- }
- const settlement = (command) => {
- if (nullPatientId() || nullTimes()) {
- return
- }
- switch (command) {
- case 'preSettlement':
- mzPreSetl()
- break
- case 'realSettlement':
- chooseWhetherUseAcctFlag()
- break
- case 'cancelSettlement':
- revokeMzSettle()
- break
- }
- }
- const mzPreSetl = () => {
- const param = {
- staffId: store.state.user.info.code,
- patNo: patientId.value,
- times: times.value,
- mdtrtCertType: readCardData.mdtrtCertType,
- readCardResult: readCardData.readCardResult,
- readCardBizType: readCardData.readCardBizType,
- }
- outpatientPreSettlement(param).then((res) => {
- const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
- ElMessageBox.alert(message, '试算成功', {
- type: 'success',
- showCancelButton: false,
- }).then(() => {})
- })
- }
- const chooseWhetherUseAcctFlag = () => {
- ElMessageBox.confirm('是否使用个人账户?', '提示', {
- type: 'warning',
- confirmButtonText: '不使用',
- cancelButtonText: '使用',
- distinguishCancelAndClose: true,
- closeOnClickModal: false,
- closeOnPressEscape: false,
- }).then(() => {
- mzSettle('0')
- }).catch((action) => {
- if (action === 'cancel') {
- mzSettle('1')
- }
- })
- }
- const mzSettle = (useAcctFlag) => {
- const param = {
- patNo: patientId.value,
- times: times.value,
- acctUsedFlag: useAcctFlag,
- mdtrtCertType: readCardData.mdtrtCertType,
- readCardResult: readCardData.readCardResult,
- readCardBizType: readCardData.readCardBizType,
- }
- outpatientSettlement(param).then((res) => {
- clearReadCardData()
- const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
- ElMessageBox.alert(message, '结算成功', {
- type: 'success',
- showCancelButton: false,
- }).then(() => {})
- })
- }
- const revokeMzSettle = () => {
- const param = {
- patNo: patientId.value,
- times: times.value,
- }
- revokeOutpatientSettlement(param).then((res) => {
- ElMessageBox.alert('撤销门诊结算成功', '提示', {
- type: 'success',
- showCancelButton: false,
- })
- })
- }
- const clearinfo = () => {
- patientId.value = ''
- times.value = null
- unPaidReceipts.value = []
- psnBaseinfo.value = {}
- mzVisit.value = {}
- receipts.value = {}
- orderNos.value = []
- currentReceipts.value = []
- totalFee.value = null
- timesTable.value = null
- ordersTable.value = null
- currentOrder.value = {}
- spcChrDiseAccts.value = []
- }
- onMounted(() => {
- getMedTypesByFlag('clinic').then((res) => {
- medTypes.value = res
- })
- })
- return {
- medType,
- medTypes,
- admdvs,
- admdvses,
- patientId,
- readCardBizType,
- cptInsutype,
- receiptBoxStyle,
- tableHeight,
- showInsuinfo,
- psnBaseinfo,
- mzVisit,
- receipts,
- orderNos,
- currentReceipts,
- totalFee,
- ordersTable,
- timesTable,
- unPaidReceipts,
- spcChrDiseAccts,
- showSpcChrAccts,
- matnDises,
- showMatnDises,
- showInputDiags,
- searchMethod,
- searchMethods,
- diagTypes,
- diagItem,
- diags,
- afterReadCard,
- addDiag,
- deleteDiag,
- saveDiag,
- searchDiag,
- handleSelectDiag,
- clickTimes,
- colorStatus,
- clickOrderNo,
- handleClickInsuinfo,
- uploadFees,
- clearinfo,
- markMzFees,
- unmarkMzFees,
- registor,
- receiptsOpts,
- settlement,
- }
- },
- }
- </script>
- <style scoped>
- .receipt-title {
- width: 100%;
- text-align: center;
- font-weight: bold;
- font-size: 20px;
- height: 32px;
- line-height: 32px;
- }
- .receipt-head {
- display: flex;
- height: 22px;
- line-height: 22px;
- }
- .receipt-head > div {
- width: 33%;
- padding-right: 20px;
- }
- .receipt-item {
- display: flex;
- }
- .receipt-tips {
- margin: 0 0 0 64px;
- }
- .receipt-tips > span {
- margin-right: 15px;
- }
- .w75 {
- width: 70%;
- font-size: 15px;
- }
- .w75 * {
- font-size: 15px;
- }
- .w25 {
- width: 25%;
- font-size: 15px;
- color: #0f5e0f;
- font-weight: bold;
- }
- </style>
|