MzRegister.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. <template>
  2. <el-container>
  3. <el-header style="height: 35px; margin-top: 10px">
  4. <el-input v-model="patientId" style="width: 200px; margin-left: 2px" clearable placeholder="请输入">
  5. <template #prepend>门诊id</template>
  6. </el-input>
  7. <el-select v-model="medType" style="width: 120px" placeholder="医疗类别">
  8. <el-option v-for="item in medTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
  9. </el-select>
  10. <el-select v-model="admdvs" clearable filterable placeholder="参保地区" style="width: 180px">
  11. <el-option v-for="item in admdvses" :key="item.code" :label="item.name" :value="item.code">
  12. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  13. <el-divider direction="vertical"></el-divider>
  14. <span>{{ item.name }}</span>
  15. </el-option>
  16. </el-select>
  17. <el-dropdown trigger="click" @command="receiptsOpts" style="margin-left: 8px">
  18. <el-button type="primary">
  19. 处方&nbsp;<el-icon><ArrowDown /></el-icon>
  20. </el-button>
  21. <template #dropdown>
  22. <el-dropdown-menu>
  23. <el-dropdown-item icon="Document" command="require">获取门诊处方</el-dropdown-item>
  24. <el-dropdown-item icon="Delete" command="delete">删除所有处方</el-dropdown-item>
  25. </el-dropdown-menu>
  26. </template>
  27. </el-dropdown>
  28. <ReadCard :pat-no="patientId" @success="afterReadCard" />
  29. <el-dropdown trigger="click" @command="registor">
  30. <el-button type="primary">
  31. 登记&nbsp;<el-icon><ArrowDown /></el-icon>
  32. </el-button>
  33. <template #dropdown>
  34. <el-dropdown-menu>
  35. <el-dropdown-item icon="CreditCard" command="execute">医保登记</el-dropdown-item>
  36. <el-dropdown-item icon="RefreshLeft" command="revoke">取消登记</el-dropdown-item>
  37. </el-dropdown-menu>
  38. </template>
  39. </el-dropdown>
  40. <el-dropdown trigger="click" @command="receiptsOpts" style="margin-left: 8px">
  41. <el-button type="primary">
  42. 上传&nbsp;<el-icon><ArrowDown /></el-icon>
  43. </el-button>
  44. <template #dropdown>
  45. <el-dropdown-menu>
  46. <el-dropdown-item icon="Upload" command="upload">医保处方上传</el-dropdown-item>
  47. <el-dropdown-item icon="RefreshLeft" command="retract">撤销处方上传</el-dropdown-item>
  48. <el-dropdown-item divided icon="Edit" command="diags">普门诊断补录</el-dropdown-item>
  49. </el-dropdown-menu>
  50. </template>
  51. </el-dropdown>
  52. <el-dropdown trigger="click" @command="settlement" style="margin-left: 8px">
  53. <el-button type="primary">
  54. 结算&nbsp;<el-icon><ArrowDown /></el-icon>
  55. </el-button>
  56. <template #dropdown>
  57. <el-dropdown-menu>
  58. <el-dropdown-item icon="SetUp" command="preSettlement">试算</el-dropdown-item>
  59. <el-dropdown-item icon="Stamp" command="realSettlement">结算</el-dropdown-item>
  60. <el-dropdown-item divided icon="RefreshLeft" command="cancelSettlement">取消结算</el-dropdown-item>
  61. </el-dropdown-menu>
  62. </template>
  63. </el-dropdown>
  64. <el-button type="danger" icon="Refresh" @click="clearinfo" style="margin-left: 8px"> 重置 </el-button>
  65. </el-header>
  66. <el-main>
  67. <el-row :gutter="5">
  68. <el-col :span="2">
  69. <el-table ref="timesTable" :data="unPaidReceipts" highlight-current-row :height="tableHeight" @row-click="clickTimes">
  70. <el-table-column label="就诊次数">
  71. <template #default="scope"> 第 {{ scope.row.times }} 次 </template>
  72. </el-table-column>
  73. </el-table>
  74. </el-col>
  75. <el-col :span="5">
  76. <el-table ref="ordersTable" :data="orderNos" highlight-current-row :height="tableHeight" @row-click="clickOrderNo">
  77. <el-table-column label="处方" width="60">
  78. <template #default="scope">
  79. <span v-html="colorStatus(scope.row)"></span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="金额" width="60">
  83. <template #default="scope">
  84. {{ scope.row.totalFee.toFixed(2) }}
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="操作">
  88. <template #default="scope">
  89. <el-button text icon="Check" @click="markMzFees" :disabled="scope.row.status"> 生成 </el-button>
  90. <el-button text icon="Delete" @click="unmarkMzFees(scope.row)" :disabled="!scope.row.status"> 撤销 </el-button>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </el-col>
  95. <el-col :span="15">
  96. <div style="margin-left: 30px; position: relative">
  97. <img v-if="mzVisit.settledFlag === 1" :src="mzSettled" alt="" style="z-index: 999; width: 230px;
  98. position: absolute; top: 160px; left: 260px; background: rgba(255,255,255,.5)">
  99. <div class="receipt-title">长沙泰和医院处方笺</div>
  100. <el-divider></el-divider>
  101. <div class="receipt-head">
  102. <div>姓名:{{ mzVisit.name }}</div>
  103. <div>性别:{{ mzVisit.sex }}</div>
  104. <div>年龄:{{ mzVisit.age }} 岁</div>
  105. </div>
  106. <div class="receipt-head">
  107. <div>门诊号:{{ mzVisit.patientId }}</div>
  108. <div>科别:{{ mzVisit.visitDeptName }}</div>
  109. <div class="ellipsis-text" :title="mzVisit.icdText">临床诊断:{{ mzVisit.icdText }}</div>
  110. </div>
  111. <div class="receipt-head">
  112. <div>开具日期:{{ mzVisit.opDay }}</div>
  113. <div class="ellipsis-text">
  114. 地址:<span :title="mzVisit.address">{{ mzVisit.address }}</span>
  115. </div>
  116. <div>电话:{{ mzVisit.phoneNo }}</div>
  117. </div>
  118. <el-divider></el-divider>
  119. <div :style="receiptBoxStyle">
  120. <div v-for="(item, index) in currentReceipts" :key="index">
  121. <div class="receipt-item">
  122. <div class="w75">
  123. <el-checkbox v-model="item.checked"></el-checkbox>
  124. {{ index + 1 }}){{ item.drugName }}&nbsp; (
  125. <span v-if="item.specification">{{ item.specification }}</span>
  126. <span v-else>{{ item.drugUnit }}</span>
  127. </div>
  128. <div class="w25">&times;&nbsp;&nbsp;&nbsp;{{ item.quantity }}</div>
  129. </div>
  130. <div class="receipt-tips">
  131. <span v-if="item.drugQuan"> 用法:{{ item.drugQuan }}{{ item.drugUnit }}/次 </span>
  132. <span v-if="item.frequency"> {{ item.frequency }} </span>
  133. <span v-if="item.orderDays"> {{ item.orderDays }}天 </span>
  134. <span v-if="item.supplyCode"> {{ item.supplyCode }} </span>
  135. <span v-if="item.instructionText"> 备注:{{ item.instructionText }} </span>
  136. </div>
  137. <div :style="{ color: item.nationalCode ? 'green' : 'red', fontWeight: 'bold', padding: '0 0 12px 64px' }">医保码:{{ item.nationalCode || '未匹配' }}</div>
  138. </div>
  139. </div>
  140. <el-divider></el-divider>
  141. <div class="receipt-head">
  142. <div style="font-size: 15px; width: 70%">医师:{{ mzVisit.doctorName }} / {{ mzVisit.doctorCode }} / <span v-html="highlightYbCode(mzVisit.doctorCode,mzVisit.doctorYbCode)"></span></div>
  143. <div style="font-size: 15px">
  144. 总金额:<span style="font-size: 18px; font-weight: bold">¥{{ totalFee }}</span>
  145. </div>
  146. </div>
  147. </div>
  148. </el-col>
  149. </el-row>
  150. </el-main>
  151. <el-dialog title="个人信息" v-model="showInsuinfo" width="65%">
  152. <el-tag>参保信息</el-tag>
  153. <el-table :data="psnBaseinfo.insuinfo" @row-click="handleClickInsuinfo">
  154. <el-table-column property="balc" label="余额"></el-table-column>
  155. <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
  156. <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
  157. <el-table-column label="参保状态" prop="psnInsuStasName"></el-table-column>
  158. <el-table-column property="psnInsuDate" label="个人参保日期"></el-table-column>
  159. <el-table-column property="pausInsuDate" label="暂停参保日期"></el-table-column>
  160. <el-table-column property="cvlservFlagName" label="公务员标志"></el-table-column>
  161. <el-table-column property="insuplcAdmdvs" label="参保地医保区划"></el-table-column>
  162. <el-table-column property="insuplcAdmdvsName" label="参保地名称"></el-table-column>
  163. <el-table-column property="empName" label="单位名称"></el-table-column>
  164. </el-table>
  165. <div style="height: 16px"></div>
  166. <el-tag>身份信息</el-tag>
  167. <el-table :data="psnBaseinfo.idetinfo" stripe height="180">
  168. <el-table-column label="人员身份类别" prop="psnIdetTypeName"></el-table-column>
  169. <el-table-column label="人员类别等级" prop="psnTypeLv"></el-table-column>
  170. <el-table-column label="备注" prop="memo"></el-table-column>
  171. <el-table-column label="开始时间" prop="begntime"></el-table-column>
  172. <el-table-column label="结束时间" prop="endtime"></el-table-column>
  173. </el-table>
  174. </el-dialog>
  175. <el-dialog title="请选择(慢特病备案信息)" v-model="showSpcChrAccts" width="40%">
  176. <el-table :data="spcChrDiseAccts" @row-click="uploadFees">
  177. <el-table-column property="opspDiseCode" label="病种编码"></el-table-column>
  178. <el-table-column property="opspDiseName" label="病种名称"></el-table-column>
  179. <el-table-column property="begndate" label="生效日期"></el-table-column>
  180. <el-table-column property="enddate" label="失效日期"></el-table-column>
  181. </el-table>
  182. </el-dialog>
  183. <el-dialog title="请选择生育病种" v-model="showMatnDises" width="60%">
  184. <el-table :data="matnDises" @row-click="uploadFees" stripe height="360">
  185. <el-table-column property="code" label="病种编码"></el-table-column>
  186. <el-table-column property="name" label="病种名称"></el-table-column>
  187. <el-table-column property="insutype" label="险种类型"></el-table-column>
  188. <el-table-column property="limitAmt" label="疾病限额"></el-table-column>
  189. </el-table>
  190. </el-dialog>
  191. <el-dialog title="普门诊断补录" v-model="showInputDiags" width="60%" :close-on-click-modal="false" :close-on-press-escape="false">
  192. <outpatient-diagnose-supply :med-type="medType" :mz-visit="mzVisit" @close="showInputDiags = false"></outpatient-diagnose-supply>
  193. </el-dialog>
  194. </el-container>
  195. </template>
  196. <script>
  197. import { onMounted, reactive, ref } from 'vue'
  198. import { admdvses } from '@/data'
  199. import {
  200. deleteAllMzReceipts,
  201. deleteMzReceipt,
  202. getMzReceipts,
  203. insertSiMzFees,
  204. outpatientPreSettlement,
  205. outpatientRegistration,
  206. revokeOutpatientFeeDetails,
  207. revokeOutpatientRegistration,
  208. uploadOutpatientFeeDetails,
  209. outpatientSettlement,
  210. revokeOutpatientSettlement,
  211. } from '@/api/medical-insurance/si-outpatient'
  212. import { cptInsutype } from '@/utils/computed'
  213. import { ElMessage, ElMessageBox } from 'element-plus'
  214. import store from '@/store'
  215. import { obtainBasicPersonInfo, querySpecialChronicDiseasesAccreditation, queryMzMatnDises } from '@/api/medical-insurance/si-query'
  216. import { getMedTypesByFlag } from '@/api/medical-insurance/si-dict'
  217. import ReadCard from '@/components/medical-insurance/readcard/Index.vue'
  218. import mzSettled from '@/assets/mz-settled.png'
  219. import OutpatientDiagnoseSupply from '@/components/medical-insurance/outpatient-diagnose-supply/Index.vue'
  220. export default {
  221. components: {
  222. ReadCard,
  223. OutpatientDiagnoseSupply,
  224. },
  225. setup() {
  226. //todo 完成业务后清除原读卡数据
  227. const medType = ref(null)
  228. const admdvs = ref(null)
  229. const medTypes = ref([])
  230. const patientId = ref('')
  231. const readCardBizType = ref('')
  232. const times = ref(null)
  233. const windowSize = store.state.app.windowSize
  234. const tableHeight = windowSize.h - 55
  235. const receiptBoxStyle = {
  236. height: tableHeight - 280 + 'px',
  237. overflowY: 'auto',
  238. }
  239. const unPaidReceipts = ref([])
  240. const showInsuinfo = ref(false)
  241. const psnBaseinfo = ref({})
  242. const mzVisit = ref({})
  243. const receipts = ref({})
  244. const orderNos = ref([])
  245. const currentReceipts = ref([])
  246. const totalFee = ref(null)
  247. const timesTable = ref(null)
  248. const ordersTable = ref(null)
  249. const currentOrder = ref({})
  250. const spcChrDiseAccts = ref([])
  251. const showSpcChrAccts = ref(false)
  252. const matnDises = ref([])
  253. const showMatnDises = ref(false)
  254. const showInputDiags = ref(false)
  255. const nullPatientId = () => {
  256. if (!patientId.value) {
  257. ElMessage({
  258. message: '请输入门诊id号!',
  259. type: 'warning',
  260. duration: 2500,
  261. showClose: true,
  262. })
  263. return true
  264. }
  265. return false
  266. }
  267. const registor = (command) => {
  268. if (nullPatientId()) {
  269. return
  270. }
  271. if (nullTimes()) {
  272. return
  273. }
  274. const param = {
  275. patNo: patientId.value,
  276. medType: medType.value,
  277. admdvs: admdvs.value,
  278. times: times.value,
  279. needSaving: 1,
  280. }
  281. if (command === 'execute') {
  282. if (!medType.value) {
  283. ElMessage({
  284. message: '请先选择医疗类别!',
  285. type: 'warning',
  286. duration: 2500,
  287. showClose: true,
  288. })
  289. return
  290. }
  291. obtainBasicPersonInfo(param).then((res) => {
  292. times.value = res.times
  293. psnBaseinfo.value = res
  294. showInsuinfo.value = true
  295. })
  296. } else {
  297. revokeOutpatientRegistration(param).then((res) => {
  298. ElMessage({
  299. message: res,
  300. type: 'success',
  301. duration: 2000,
  302. showClose: true,
  303. })
  304. })
  305. }
  306. }
  307. const nullTimes = () => {
  308. if (!times.value) {
  309. ElMessage({
  310. message: '请先获取门诊处方!',
  311. type: 'warning',
  312. duration: 2500,
  313. showClose: true,
  314. })
  315. return true
  316. }
  317. return false
  318. }
  319. const receiptsOpts = (command) => {
  320. if (nullPatientId()) {
  321. return
  322. }
  323. if (command !== 'require') {
  324. if (nullTimes()) {
  325. return
  326. }
  327. }
  328. const param = {
  329. patNo: patientId.value,
  330. times: times.value,
  331. }
  332. switch (command) {
  333. case 'require':
  334. fetchReceipts(param)
  335. break
  336. case 'delete':
  337. deleteAllMzReceipts(param).then((res) => {
  338. ElMessage({
  339. message: res,
  340. type: 'success',
  341. duration: 2000,
  342. showClose: true,
  343. })
  344. fetchReceipts(param)
  345. })
  346. break
  347. case 'upload':
  348. qrySpcChrDiseAcct(param)
  349. break
  350. case 'retract':
  351. revokeOutpatientFeeDetails(param).then((res) => {
  352. ElMessage({
  353. message: res,
  354. type: 'success',
  355. duration: 2000,
  356. showClose: true,
  357. })
  358. })
  359. break
  360. case 'diags':
  361. showInputDiags.value = true
  362. break
  363. }
  364. }
  365. const fetchReceipts = (param) => {
  366. clearReadCardData()
  367. getMzReceipts(param)
  368. .then((res) => {
  369. unPaidReceipts.value = res
  370. setTimeout(() => {
  371. timesTable.value.setCurrentRow(res[0])
  372. clickTimes(res[0])
  373. }, 100)
  374. })
  375. .catch(() => {
  376. unPaidReceipts.value = []
  377. orderNos.value = []
  378. currentReceipts.value = []
  379. })
  380. }
  381. const markMzFees = () => {
  382. if (currentReceipts.value.length === 0) {
  383. ElMessage({
  384. message: '请先选择要保存的处方!',
  385. type: 'warning',
  386. duration: 2500,
  387. showClose: true,
  388. })
  389. return
  390. }
  391. ElMessageBox.confirm('是否将选中处方生成医保处方?', '提示', {
  392. type: 'warning',
  393. confirmButtonText: '生成',
  394. cancelButtonText: '取消',
  395. })
  396. .then(() => {
  397. insertSiMzFees(currentReceipts.value).then(() => {
  398. currentOrder.value.status = true
  399. ElMessage({
  400. message: '已成功生成医保处方。',
  401. type: 'success',
  402. duration: 2500,
  403. showClose: true,
  404. })
  405. })
  406. })
  407. .catch(() => {})
  408. }
  409. const qrySpcChrDiseAcct = (param) => {
  410. if (medType.value === '51') {
  411. queryMzMatnDises().then((res) => {
  412. matnDises.value = res
  413. showMatnDises.value = true
  414. })
  415. } else if (medType.value === '14') {
  416. querySpecialChronicDiseasesAccreditation(param).then((res) => {
  417. spcChrDiseAccts.value = res
  418. showSpcChrAccts.value = true
  419. })
  420. } else {
  421. uploadFees(param)
  422. }
  423. }
  424. const uploadFees = (row) => {
  425. if (medType.value === '51') {
  426. row.patNo = patientId.value
  427. row.times = times.value
  428. row.opspDiseCode = row.code
  429. row.opspDiseName = row.name
  430. }
  431. uploadOutpatientFeeDetails(row).then((res) => {
  432. times.value = res.times
  433. showSpcChrAccts.value = false
  434. showMatnDises.value = false
  435. mzPreSetl()
  436. })
  437. }
  438. const readCardData = reactive({
  439. mdtrtCertType: null,
  440. readCardResult: null,
  441. readCardBizType: null,
  442. })
  443. const clearReadCardData = () => {
  444. readCardData.mdtrtCertType = null
  445. readCardData.readCardResult = null
  446. readCardData.readCardBizType = null
  447. }
  448. const afterReadCard = (result) => {
  449. readCardData.mdtrtCertType = result.mdtrtCertType
  450. readCardData.readCardResult = result.readCardResult
  451. readCardData.readCardBizType = result.readCardBizType
  452. }
  453. const handleClickInsuinfo = (row) => {
  454. const param = {
  455. patNo: patientId.value,
  456. times: times.value,
  457. name: mzVisit.value.name,
  458. insutype: row.insutype,
  459. psnType: row.psnType,
  460. insuplcAdmdvs: row.insuplcAdmdvs,
  461. empName: row.empName,
  462. balc: row.balc,
  463. mdtrtCertType: readCardData.mdtrtCertType,
  464. readCardResult: readCardData.readCardResult,
  465. readCardBizType: readCardData.readCardBizType,
  466. }
  467. outpatientRegistration(param).then((res) => {
  468. showInsuinfo.value = false
  469. clearReadCardData()
  470. ElMessage({
  471. message: res,
  472. type: 'success',
  473. duration: 2000,
  474. showClose: true,
  475. })
  476. })
  477. }
  478. const clickOrderNo = (row) => {
  479. currentOrder.value = row
  480. currentReceipts.value = receipts.value[row.orderNo]
  481. totalFee.value = row.totalFee.toFixed(2)
  482. }
  483. const clickTimes = (row) => {
  484. mzVisit.value = row.mzVisit
  485. receipts.value = row.mzReceipts
  486. orderNos.value = row.orderNos
  487. times.value = row.times
  488. currentReceipts.value = []
  489. setTimeout(() => {
  490. ordersTable.value.setCurrentRow(orderNos.value[0])
  491. clickOrderNo(orderNos.value[0])
  492. }, 100)
  493. }
  494. const colorStatus = (row) => {
  495. return row.status ? `<span style="color: green">第${row.orderNo}张</span>` : `<span style="color: red">第${row.orderNo}张</span>`
  496. }
  497. const unmarkMzFees = (row) => {
  498. ElMessageBox.confirm('是否将选中处方从医保处方中删除?', '提示', {
  499. type: 'warning',
  500. confirmButtonText: '确定',
  501. cancelButtonText: '取消',
  502. })
  503. .then(() => {
  504. deleteMzReceipt(row).then(() => {
  505. currentOrder.value.status = false
  506. ElMessage({
  507. message: '已成功删除医保处方。',
  508. type: 'success',
  509. duration: 2500,
  510. showClose: true,
  511. })
  512. })
  513. })
  514. .catch(() => {})
  515. }
  516. const settlement = (command) => {
  517. if (nullPatientId() || nullTimes()) {
  518. return
  519. }
  520. switch (command) {
  521. case 'preSettlement':
  522. mzPreSetl()
  523. break
  524. case 'realSettlement':
  525. chooseWhetherUseAcctFlag()
  526. break
  527. case 'cancelSettlement':
  528. revokeMzSettle()
  529. break
  530. }
  531. }
  532. const mzPreSetl = () => {
  533. const param = {
  534. staffId: store.state.user.info.code,
  535. patNo: patientId.value,
  536. times: times.value,
  537. mdtrtCertType: readCardData.mdtrtCertType,
  538. readCardResult: readCardData.readCardResult,
  539. readCardBizType: readCardData.readCardBizType,
  540. }
  541. outpatientPreSettlement(param).then((res) => {
  542. const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
  543. ElMessageBox.alert(message, '试算成功', {
  544. type: 'success',
  545. showCancelButton: false,
  546. }).then(() => {})
  547. })
  548. }
  549. const chooseWhetherUseAcctFlag = () => {
  550. ElMessageBox.confirm('是否使用个人账户?', '提示', {
  551. type: 'warning',
  552. confirmButtonText: '不使用',
  553. cancelButtonText: '使用',
  554. distinguishCancelAndClose: true,
  555. closeOnClickModal: false,
  556. closeOnPressEscape: false,
  557. }).then(() => {
  558. mzSettle('0')
  559. }).catch((action) => {
  560. if (action === 'cancel') {
  561. mzSettle('1')
  562. }
  563. })
  564. }
  565. const mzSettle = (useAcctFlag) => {
  566. const param = {
  567. patNo: patientId.value,
  568. times: times.value,
  569. acctUsedFlag: useAcctFlag,
  570. mdtrtCertType: readCardData.mdtrtCertType,
  571. readCardResult: readCardData.readCardResult,
  572. readCardBizType: readCardData.readCardBizType,
  573. }
  574. outpatientSettlement(param).then((res) => {
  575. clearReadCardData()
  576. const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
  577. ElMessageBox.alert(message, '结算成功', {
  578. type: 'success',
  579. showCancelButton: false,
  580. }).then(() => {})
  581. })
  582. }
  583. const revokeMzSettle = () => {
  584. const param = {
  585. patNo: patientId.value,
  586. times: times.value,
  587. }
  588. revokeOutpatientSettlement(param).then((res) => {
  589. ElMessageBox.alert('撤销门诊结算成功', '提示', {
  590. type: 'success',
  591. showCancelButton: false,
  592. })
  593. })
  594. }
  595. const clearinfo = () => {
  596. patientId.value = ''
  597. times.value = null
  598. unPaidReceipts.value = []
  599. psnBaseinfo.value = {}
  600. mzVisit.value = {}
  601. receipts.value = {}
  602. orderNos.value = []
  603. currentReceipts.value = []
  604. totalFee.value = null
  605. timesTable.value = null
  606. ordersTable.value = null
  607. currentOrder.value = {}
  608. spcChrDiseAccts.value = []
  609. }
  610. const highlightYbCode = (hisCode, ybCode) => {
  611. if (!hisCode) {
  612. return ''
  613. }
  614. return ybCode ? `<span>${ybCode}</span>` : '<span style="color: red">医师无医保编码</span>'
  615. }
  616. onMounted(() => {
  617. getMedTypesByFlag('clinic').then((res) => {
  618. medTypes.value = res
  619. })
  620. })
  621. return {
  622. medType,
  623. medTypes,
  624. admdvs,
  625. admdvses,
  626. patientId,
  627. readCardBizType,
  628. cptInsutype,
  629. receiptBoxStyle,
  630. tableHeight,
  631. showInsuinfo,
  632. psnBaseinfo,
  633. mzVisit,
  634. receipts,
  635. orderNos,
  636. currentReceipts,
  637. totalFee,
  638. ordersTable,
  639. timesTable,
  640. unPaidReceipts,
  641. spcChrDiseAccts,
  642. showSpcChrAccts,
  643. matnDises,
  644. showMatnDises,
  645. showInputDiags,
  646. mzSettled,
  647. afterReadCard,
  648. clickTimes,
  649. colorStatus,
  650. clickOrderNo,
  651. handleClickInsuinfo,
  652. uploadFees,
  653. clearinfo,
  654. markMzFees,
  655. unmarkMzFees,
  656. registor,
  657. receiptsOpts,
  658. settlement,
  659. highlightYbCode,
  660. }
  661. },
  662. }
  663. </script>
  664. <style scoped>
  665. .receipt-title {
  666. width: 100%;
  667. text-align: center;
  668. font-weight: bold;
  669. font-size: 20px;
  670. height: 32px;
  671. line-height: 32px;
  672. }
  673. .receipt-head {
  674. display: flex;
  675. height: 22px;
  676. line-height: 22px;
  677. }
  678. .receipt-head > div {
  679. width: 33%;
  680. padding-right: 20px;
  681. }
  682. .receipt-item {
  683. display: flex;
  684. }
  685. .receipt-tips {
  686. margin: 0 0 0 64px;
  687. }
  688. .receipt-tips > span {
  689. margin-right: 15px;
  690. }
  691. .w75 {
  692. width: 70%;
  693. font-size: 15px;
  694. }
  695. .w75 * {
  696. font-size: 15px;
  697. }
  698. .w25 {
  699. width: 25%;
  700. font-size: 15px;
  701. color: #0f5e0f;
  702. font-weight: bold;
  703. }
  704. </style>