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

costComparison.vue 31KB

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