Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

costComparison.vue 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <template>
  2. <div class="main-contain incomeStatistics">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
  8. <div>
  9. <el-input size="small" style="width:130px;" v-model="keywords"
  10. class="filter-item"/>
  11. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
  12. @click="searchAction">
  13. 搜索
  14. </el-button>
  15. <el-date-picker v-model="query_start_time" prefix-icon="el-icon-date"
  16. @change="handleStartTimeChange" :editable="false" :clearable="false"
  17. style="width: 130px;" type="date" placeholder="选择开始日期"
  18. format="yyyy-MM-dd"
  19. value-format="yyyy-MM-dd"
  20. align="right"></el-date-picker>
  21. -
  22. <el-date-picker v-model="query_end_time" prefix-icon="el-icon-date"
  23. @change="handleEndTimeChange" :editable="false" :clearable="false"
  24. style="width: 130px;margin-right:10px;" type="date" placeholder="选择结束日期"
  25. format="yyyy-MM-dd"
  26. value-format="yyyy-MM-dd"
  27. align="right"></el-date-picker>
  28. <label class="title">险种<span class="name"></span> : </label>
  29. <el-select v-model="query_insutype" style="width:140px;margin-right:10px;" placeholder="请选择"
  30. @change="changeInsutype">
  31. <el-option
  32. v-for="item in insutypes"
  33. :key="item.value"
  34. :label="item.label"
  35. :value="item.value">
  36. </el-option>
  37. </el-select>
  38. <label class="title">清算类别<span class="name"></span> : </label>
  39. <el-select v-model="query_clr_type" style="width:100px;margin-right:10px;" placeholder="请选择"
  40. @change="changeClrType">
  41. <el-option
  42. v-for="item in clrOptions"
  43. :key="item.value"
  44. :label="item.label"
  45. :value="item.value">
  46. </el-option>
  47. </el-select>
  48. </div>
  49. </div>
  50. <div style="float: right;margin-bottom: 10px">
  51. <el-button size="small" type="primary" @click="dialogFormVisible = true">医保对账</el-button>
  52. <el-button size="small" type="primary" @click="getFormData">下载对账报表</el-button>
  53. </div>
  54. <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
  55. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  56. highlight-current-row
  57. @select="selectCostInfo"
  58. @selection-change="changeCostInfoTableData"
  59. @select-all="changeAllCostInfoTableData"
  60. row-key="row_key"
  61. ref="multipleTable"
  62. >
  63. <el-table-column
  64. align="center"
  65. type="selection"
  66. width="55"
  67. ></el-table-column>
  68. <el-table-column
  69. prop="date"
  70. label="序号"
  71. width="60"
  72. align="center"
  73. type="index"
  74. >
  75. </el-table-column>
  76. <el-table-column align="center" prop="name" label="对账结果">
  77. <template slot-scope="scope">{{'平'}}</template>
  78. </el-table-column>
  79. <el-table-column align="center" prop="name" label="操作机构">
  80. <!--<template slot-scope="scope">{{// this.$store.getters.xt_user.org.org_name}}</template>-->
  81. </el-table-column>
  82. <el-table-column align="center" prop="name" label="对账申请人">
  83. <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
  84. </el-table-column>
  85. <el-table-column align="center" prop="name" label="开始时间">
  86. <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
  87. </el-table-column>
  88. <el-table-column align="center" prop="name" label="结束时间">
  89. <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
  90. </el-table-column>
  91. <el-table-column align="center" prop="name" label="险种类型">
  92. <template slot-scope="scope">
  93. <div v-if="scope.row.insutype == '310'">职工基本医疗保险</div>
  94. <div v-if="scope.row.insutype == '320'">公务员医疗补助</div>
  95. <div v-if="scope.row.insutype == '330'">大额医疗费用补助</div>
  96. <div v-if="scope.row.insutype == '340'">离休人员医疗保障</div>
  97. <div v-if="scope.row.insutype == '390'">城乡居民基本医疗保险</div>
  98. <div v-if="scope.row.insutype == '392'">城乡居民大病医疗保险</div>
  99. <div v-if="scope.row.insutype == '510'">生育保险</div>
  100. </template>
  101. </el-table-column>
  102. <el-table-column align="center" prop="name" label="对账类型">
  103. <template slot-scope="scope">
  104. <div v-if="scope.row.check_type == 1">总账</div>
  105. <div v-if="scope.row.check_type == 2">明细</div>
  106. </template>
  107. </el-table-column>
  108. <el-table-column align="center" prop="name" label="清算经办机构">
  109. <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
  110. </el-table-column>
  111. <el-table-column align="center" prop="name" label="定点医药机构医疗费总额(元)">
  112. <template slot-scope="scope">{{scope.row.setl_optins}}</template>
  113. </el-table-column>
  114. <el-table-column align="center" prop="name" label="医保中心医疗费总额(元)">
  115. <template slot-scope="scope">{{scope.row.cost_total}}</template>
  116. </el-table-column>
  117. <el-table-column align="center" prop="name" label="定点医药机构基金总额(元)">
  118. <template slot-scope="scope">{{scope.row.cost_total}}</template>
  119. </el-table-column>
  120. <el-table-column align="center" prop="name" label="医保中心基金总额(元)">
  121. <template slot-scope="scope">{{scope.row.func_total}}</template>
  122. </el-table-column>
  123. <el-table-column align="center" prop="name" label="定点医药机构个人账号总额(元)">
  124. <template slot-scope="scope">{{scope.row.func_total}}</template>
  125. </el-table-column>
  126. <el-table-column align="center" prop="name" label="医保中心个人账号总额(元)">
  127. <template slot-scope="scope">{{scope.row.psn_pay}}</template>
  128. </el-table-column>
  129. <el-table-column align="center" prop="name" label="定点医药机构结算笔数">
  130. <template slot-scope="scope">{{scope.row.psn_pay}}</template>
  131. </el-table-column>
  132. <el-table-column align="center" prop="name" label="医保中心结算笔数">
  133. <template slot-scope="scope">{{scope.row.num}}</template>
  134. </el-table-column>
  135. </el-table>
  136. <el-pagination
  137. @size-change="handleSizeChange"
  138. @current-change="handleCurrentChange"
  139. :page-sizes="[10, 50, 100]"
  140. :page-size="10"
  141. background
  142. style="margin-top:20px;float: right"
  143. layout="total, sizes, prev, pager, next, jumper"
  144. :total="total"
  145. >
  146. </el-pagination>
  147. <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
  148. <el-form :model="form" label-width="100px">
  149. <el-form-item label="时间" label-width="100px">
  150. <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
  151. :editable="false" :clearable="false"
  152. style="width: 200px;" type="date" placeholder="选择开始日期"
  153. format="yyyy-MM-dd"
  154. value-format="yyyy-MM-dd"
  155. align="right"></el-date-picker>
  156. -
  157. <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
  158. :editable="false" :clearable="false"
  159. style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
  160. format="yyyy-MM-dd"
  161. value-format="yyyy-MM-dd"
  162. align="right"></el-date-picker>
  163. </el-form-item>
  164. <el-form-item label="险种类型" :label-width="formLabelWidth">
  165. <el-select v-model="insutype" placeholder="请选择" style="width: 200px;">
  166. <el-option
  167. v-for="item in insutypes"
  168. :key="item.value"
  169. :label="item.label"
  170. :value="item.value">
  171. </el-option>
  172. </el-select>
  173. </el-form-item>
  174. <el-form-item label="对账类型" :label-width="formLabelWidth">
  175. <el-select v-model="check_type" placeholder="请选择" style="width: 200px;">
  176. <el-option
  177. v-for="item in options"
  178. :key="item.value"
  179. :label="item.label"
  180. :value="item.value">
  181. </el-option>
  182. </el-select>
  183. </el-form-item>
  184. </el-form>
  185. <div slot="footer" class="dialog-footer">
  186. <el-button @click="dialogFormVisible = false">取 消</el-button>
  187. <el-button type="primary" @click="confirm">确 定</el-button>
  188. </div>
  189. </el-dialog>
  190. </div>
  191. </div>
  192. </template>
  193. <script>
  194. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  195. import {
  196. getCheckAccountFormData,
  197. getDoctorList,
  198. getExportConsumeDetailList,
  199. getHisOrderList,
  200. getList,
  201. getInitData
  202. } from '@/api/his/his'
  203. import { uParseTime } from '@/utils/tools'
  204. import { fetchAllAdminUsers } from '@/api/doctor'
  205. import axios from 'axios'
  206. export default {
  207. components: {
  208. BreadCrumb
  209. },
  210. data() {
  211. return {
  212. form: {},
  213. crumbs: [
  214. { path: false, name: '门诊收费' },
  215. { path: false, name: '医保费用对照' }
  216. ],
  217. tableData: [],
  218. diagnoses:[],
  219. limit: 10,
  220. page: 1,
  221. dialogFormVisible: false,
  222. total: 0,
  223. adminUserOptions: [],
  224. start_time: '',
  225. end_time: '',
  226. insutype: '',
  227. check_type: '',
  228. keywords: '',
  229. query_start_time: '',
  230. query_end_time: '',
  231. selection:[],
  232. query_insutype: '',
  233. query_clr_type: '',
  234. fromData: [],
  235. options: [
  236. {
  237. value: 1,
  238. label: '总账'
  239. }, {
  240. value: 2,
  241. label: '明细'
  242. }
  243. ],
  244. clrOptions: [
  245. {
  246. value: '11',
  247. label: '门诊'
  248. }, {
  249. value: '21',
  250. label: '住院'
  251. }, {
  252. value: '41',
  253. label: '药店购药'
  254. }, {
  255. value: '99',
  256. label: '其他'
  257. }
  258. ],
  259. insutypes: [
  260. {
  261. value: '310',
  262. label: '职工基本医疗保险'
  263. }, {
  264. value: '320',
  265. label: '公务员医疗补助'
  266. }, {
  267. value: '330',
  268. label: '大额医疗费用补助'
  269. }, {
  270. value: '340',
  271. label: '离休人员医疗保障'
  272. },
  273. {
  274. value: '390',
  275. label: '城乡居民基本医疗保险'
  276. }, {
  277. value: '392',
  278. label: '城乡居民大病医疗保险'
  279. }, {
  280. value: '510',
  281. label: '生育保险'
  282. }
  283. // 1617724800
  284. ]
  285. }
  286. },
  287. methods: {
  288. changeInsutype() {
  289. let params = {
  290. 'page': 1,
  291. 'limit': 10,
  292. 'keywords': this.keywords,
  293. 'insutype': this.query_insutype,
  294. 'clr_type': "11",
  295. 'start_time': this.query_start_time,
  296. 'end_time': this.query_end_time,
  297. }
  298. this.tableData = []
  299. getList(params).then(response => {
  300. if (response.data.state == 0) {
  301. this.$message.error(response.data.msg)
  302. return false
  303. } else {
  304. this.tableData = response.data.data.list
  305. this.total = response.data.data.total
  306. }
  307. })
  308. }, changeClrType(val) {
  309. if (val != "11"){
  310. this.tableData = []
  311. this.total = 0
  312. }else{
  313. let params = {
  314. 'page': 1,
  315. 'limit': 10,
  316. 'keywords': this.keywords,
  317. 'insutype': this.query_insutype,
  318. 'clr_type': "11",
  319. 'start_time': this.query_start_time,
  320. 'end_time': this.query_end_time,
  321. }
  322. this.tableData = []
  323. getList(params).then(response => {
  324. if (response.data.state == 0) {
  325. this.$message.error(response.data.msg)
  326. return false
  327. } else {
  328. this.tableData = response.data.data.list
  329. this.total = response.data.data.total
  330. }
  331. })
  332. }
  333. },
  334. handleStartTimeChange() {
  335. let params = {
  336. 'page': 1,
  337. 'limit': 10,
  338. 'keywords': this.keywords,
  339. 'insutype': "",
  340. 'clr_type': "11",
  341. 'start_time': this.query_start_time,
  342. 'end_time': this.query_end_time,
  343. }
  344. this.tableData = []
  345. getList(params).then(response => {
  346. if (response.data.state == 0) {
  347. this.$message.error(response.data.msg)
  348. return false
  349. } else {
  350. this.tableData = response.data.data.list
  351. this.total = response.data.data.total
  352. }
  353. })
  354. }, handleEndTimeChange() {
  355. let params = {
  356. 'page': 1,
  357. 'limit': 10,
  358. 'keywords': this.keywords,
  359. 'insutype': "",
  360. 'clr_type': "11",
  361. 'start_time': this.query_start_time,
  362. 'end_time': this.query_end_time,
  363. }
  364. this.tableData = []
  365. getList(params).then(response => {
  366. if (response.data.state == 0) {
  367. this.$message.error(response.data.msg)
  368. return false
  369. } else {
  370. this.tableData = response.data.data.list
  371. this.total = response.data.data.total
  372. }
  373. })
  374. },
  375. searchAction() {
  376. let params = {
  377. 'page': 1,
  378. 'limit': 10,
  379. 'keywords': this.keywords,
  380. 'insutype': "",
  381. 'clr_type': "11",
  382. 'start_time': "",
  383. 'end_time': "",
  384. }
  385. this.tableData = []
  386. getList(params).then(response => {
  387. if (response.data.state == 0) {
  388. this.$message.error(response.data.msg)
  389. return false
  390. } else {
  391. this.tableData = response.data.data.list
  392. this.total = response.data.data.total
  393. }
  394. })
  395. },
  396. selectCostInfo(selection, row) {
  397. this.selection = selection
  398. }, changeCostInfoTableData(val) {
  399. this.selection = val
  400. }, changeAllCostInfoTableData(selection) {
  401. this.selection = selection
  402. }, confirm() {
  403. if (this.check_type == 1) {
  404. let params = {
  405. start_time: this.start_time,
  406. end_time: this.end_time,
  407. insutype: this.insutype,
  408. clr_type: '11'
  409. }
  410. var that = this
  411. if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
  412. axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
  413. params: params
  414. })
  415. .then(function(response) {
  416. if (response.data.state == 0) {
  417. that.$message.error(response.data.msg)
  418. return false
  419. } else {
  420. var result_desc = ''
  421. if (response.data.data.stmt_rslt == 0) {
  422. result_desc = '对账平'
  423. } else if (response.data.data.stmt_rslt == 1) {
  424. result_desc = '中心多' + '\n' + response.data.data.stmt_rslt_dscr
  425. } else if (response.data.data.stmt_rslt == 2) {
  426. result_desc = '机构多' + '\n' + response.data.data.stmt_rslt_dscr
  427. }
  428. that.$alert(result_desc, '对账结果', {
  429. confirmButtonText: '确定',
  430. callback: action => {
  431. that.dialogFormVisible = false
  432. }
  433. })
  434. that.page = 1
  435. that.limit = 10
  436. that.keywords = ''
  437. that.query_start_time = ''
  438. that.query_end_time = ''
  439. that.query_insutype = ''
  440. that.query_clr_type = ''
  441. that.getList()
  442. }
  443. })
  444. .catch(function(error) {
  445. })
  446. }
  447. } else {
  448. let params = {
  449. start_time: this.start_time,
  450. end_time: this.end_time
  451. }
  452. var that = this
  453. axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
  454. params: params
  455. })
  456. .then(function(response) {
  457. if (response.data.state == 0) {
  458. that.$message.error(response.data.msg)
  459. return false
  460. } else {
  461. this.page = 1
  462. this.limit = 10
  463. this.keywords = ''
  464. this.getList()
  465. }
  466. })
  467. .catch(function(error) {
  468. })
  469. }
  470. },
  471. getInsutype(type) {
  472. },
  473. fetchAllAdminUsers() {
  474. fetchAllAdminUsers().then(response => {
  475. if (response.data.state == 1) {
  476. this.adminUserOptions = response.data.data.users
  477. }
  478. })
  479. },
  480. getName(admin_user_id) {
  481. for (let i = 0; i < this.adminUserOptions.length; i++) {
  482. if (this.adminUserOptions[i].id == admin_user_id) {
  483. return this.adminUserOptions[i].name
  484. }
  485. }
  486. },
  487. getTimes(time) {
  488. return uParseTime(time, '{y}-{m}-{d}')
  489. },
  490. getList() {
  491. let params = {
  492. 'page': this.page,
  493. 'limit': this.limit,
  494. 'keywords': this.keywords,
  495. 'insutype': this.query_insutype,
  496. 'clr_type': this.query_clr_type,
  497. 'start_time': this.query_start_time,
  498. 'end_time': this.query_end_time
  499. }
  500. this.tableData = []
  501. getList(params).then(response => {
  502. if (response.data.state == 0) {
  503. this.$message.error(response.data.msg)
  504. return false
  505. } else {
  506. this.tableData = response.data.data.list
  507. this.total = response.data.data.total
  508. }
  509. })
  510. },
  511. handleSizeChange(limit) {
  512. this.limit = limit
  513. this.getList()
  514. },
  515. handleCurrentChange(page) {
  516. this.page = page
  517. this.getList()
  518. }, getFormData() {
  519. if (this.selection.length == 0) {
  520. this.$message.error('请选择要下载的对账记录')
  521. return
  522. }
  523. let params = {
  524. 'start_time': this.getTimes(this.selection[0].start_time),
  525. 'end_time': this.getTimes(this.selection[0].end_time),
  526. 'insutype': this.selection[0].insutype
  527. }
  528. getCheckAccountFormData(params).then(response => {
  529. if (response.data.state == 0) {
  530. this.$message.error(response.data.msg)
  531. return false
  532. } else {
  533. this.fromData = response.data.data.list
  534. if(this.selection[0].insutype == "310"){
  535. var list = []
  536. for (let i = 0; i < this.fromData.length; i++) {
  537. // var hifmi_pay = 0.00;
  538. //
  539. // if(this.fromData[i].setl_detail.length > 0){
  540. // var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  541. // for (let i = 0; i < jsonObj.length; i++) {
  542. // if (order.fund_pay_type == '310300') {
  543. // hifmi_pay = jsonObj[i].fund_payamt
  544. // }
  545. // }
  546. // }
  547. var hifes_pays = [];
  548. if(this.fromData[i].setl_detail.length > 0){
  549. var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  550. console.log(jsonObj)
  551. for (let i = 0; i < jsonObj.length; i++) {
  552. if (jsonObj[i].fund_pay_type == '310100') {
  553. hifes_pays.push(jsonObj[i].fund_payamt)
  554. }
  555. }
  556. }
  557. let hifes_pay = 0.00
  558. if(hifes_pays.length == 2){
  559. hifes_pay = hifes_pays[1]
  560. }
  561. let obj = {
  562. '序号': i+1,
  563. '姓名': this.fromData[i].psn_name,
  564. '单位名称': this.fromData[i].psn_name,
  565. '个人编号': this.fromData[i].psn_no,
  566. '门诊号': this.fromData[i].mdtrt_id,
  567. '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
  568. '挂号科室': "血透室",
  569. '门诊费用': this.fromData[i].medfee_sumamt,
  570. '自费': this.fromData[i].psn_cash_pay,
  571. '起付线I': this.fromData[i].act_pay_dedc,
  572. '按比例自付II': this.fromData[i].psn_cash_pay,
  573. '小计I+II': this.fromData[i].act_pay_dedc + this.fromData[i].psn_cash_pay,
  574. '统筹基金': this.fromData[i].fund_pay_sumamt,
  575. '公务员补助': this.fromData[i].cvlserv_pay,
  576. '单位补充保险': hifes_pay,
  577. '煤矿补充保险': "0.00",
  578. "超封顶线费用": "0.00",
  579. '大额医疗保险应付': this.fromData[i].hifob_pay,
  580. '透析补助': "0.00",
  581. '大额合计': "0.00",
  582. '实账支付额': "0.00",
  583. '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
  584. "血透次数":this.fromData[i].DialysisCount,
  585. "置留管数量":0,
  586. "备注":"",
  587. }
  588. list.push(obj)
  589. }
  590. var insutype_name = ''
  591. if (this.query_insutype == '310') {
  592. insutype_name = '职工基本医疗保险'
  593. } else if (this.query_insutype == '390') {
  594. insutype_name = '城乡居民基本医疗保险'
  595. }
  596. import('@/vendor/Export2Excel').then(excel => {
  597. const tHeader = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
  598. const filterVal = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
  599. // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
  600. const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
  601. const data = this.formatJson(filterVal, list)
  602. excel.export_json_to_excel({
  603. header: tHeader,
  604. data,
  605. filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
  606. })
  607. })
  608. }else{
  609. var list = []
  610. for (let i = 0; i < this.fromData.length; i++) {
  611. var hifmi_pay = 0.00;
  612. if(this.fromData[i].setl_detail.length > 0){
  613. var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  614. console.log(jsonObj)
  615. for (let i = 0; i < jsonObj.length; i++) {
  616. if (jsonObj[i].fund_pay_type == '390200') {
  617. hifmi_pay = jsonObj[i].fund_payamt
  618. }
  619. }
  620. }
  621. let obj = {
  622. '序号': i+1,
  623. '姓名': this.fromData[i].psn_name,
  624. '个人编号': this.fromData[i].psn_no,
  625. '门诊号': this.fromData[i].mdtrt_id,
  626. '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
  627. '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
  628. '挂号科室': "血透室",
  629. '门诊费用': this.fromData[i].medfee_sumamt,
  630. '自费': this.fromData[i].psn_cash_pay,
  631. '起付线': this.fromData[i].act_pay_dedc,
  632. '按比例自付': this.fromData[i].psn_cash_pay,
  633. "超封顶线费用": "0.00",
  634. "合计": parseFloat(this.fromData[i].act_pay_dedc) + parseFloat(this.fromData[i].psn_cash_pay),
  635. '统筹基金': this.fromData[i].fund_pay_sumamt,
  636. '大病保险': hifmi_pay,
  637. '医疗救助': this.fromData[i].maf_pay,
  638. '实账支付额': "0.00",
  639. "血透次数":this.fromData[i].DialysisCount,
  640. "置留管数量":0,
  641. "备注":"",
  642. }
  643. list.push(obj)
  644. }
  645. var insutype_name = ''
  646. if (this.query_insutype == '310') {
  647. insutype_name = '职工基本医疗保险'
  648. } else if (this.query_insutype == '390') {
  649. insutype_name = '城乡居民基本医疗保险'
  650. }
  651. import('@/vendor/Export2Excel').then(excel => {
  652. const tHeader = ['序号', '姓名','个人编号', '门诊号', '挂号日期', '诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
  653. const filterVal = ['序号', '姓名','个人编号', '门诊号', '挂号日期','诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
  654. // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
  655. const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
  656. const data = this.formatJson(filterVal, list)
  657. excel.export_json_to_excel({
  658. header: tHeader,
  659. data,
  660. filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
  661. })
  662. })
  663. }
  664. }
  665. })
  666. }, formatJson(filterVal, jsonData) {
  667. return jsonData.map(v => filterVal.map(j => v[j]))
  668. },GetDiagnosisName(id){
  669. for(let i = 0;i < this.diagnoses.length; i++){
  670. if(this.diagnoses[i].id == id){
  671. return this.diagnoses[i].class_name
  672. }
  673. }
  674. return ""
  675. }, getInitData() {
  676. getInitData().then(response => {
  677. if (response.data.state == 0) {
  678. this.$message.error(response.data.msg)
  679. return false
  680. } else {
  681. this.diagnoses = response.data.data.diagnose
  682. }
  683. })
  684. },
  685. },
  686. created() {
  687. this.getList()
  688. this.fetchAllAdminUsers()
  689. this.getInitData()
  690. }
  691. }
  692. </script>