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

costComparison.vue 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  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-item label="清算机构" :label-width="formLabelWidth" v-if="this.$store.getters.xt_user.org.id == 10106">
  185. <el-select v-model="query_clr_org" placeholder="请选择" style="width: 200px;">
  186. <el-option
  187. v-for="item in clrOrgOptions"
  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-item label="清算类别" :label-width="formLabelWidth" v-if="this.$store.getters.xt_user.org.id == 9919">
  195. <el-select v-model="clr_type" placeholder="请选择" style="width: 200px;">
  196. <el-option
  197. v-for="item in clrOptions"
  198. :key="item.value"
  199. :label="item.label"
  200. :value="item.value">
  201. </el-option>
  202. </el-select>
  203. </el-form-item>
  204. </el-form>
  205. <div slot="footer" class="dialog-footer">
  206. <el-button @click="dialogFormVisible = false">取 消</el-button>
  207. <el-button type="primary" @click="confirm">确 定</el-button>
  208. </div>
  209. </el-dialog>
  210. </div>
  211. </div>
  212. </template>
  213. <script>
  214. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  215. import {
  216. getCheckAccountFormData,
  217. getDoctorList,
  218. getExportConsumeDetailList,
  219. getHisOrderList,
  220. getList,
  221. getInitData
  222. } from '@/api/his/his'
  223. import { uParseTime } from '@/utils/tools'
  224. import { fetchAllAdminUsers } from '@/api/doctor'
  225. import axios from 'axios'
  226. export default {
  227. components: {
  228. BreadCrumb
  229. },
  230. data() {
  231. return {
  232. form: {},
  233. crumbs: [
  234. { path: false, name: '门诊收费' },
  235. { path: false, name: '医保费用对照' }
  236. ],
  237. tableData: [],
  238. diagnoses:[],
  239. limit: 10,
  240. page: 1,
  241. dialogFormVisible: false,
  242. total: 0,
  243. adminUserOptions: [],
  244. start_time: '',
  245. end_time: '',
  246. insutype: '',
  247. check_type: '',
  248. keywords: '',
  249. query_start_time: '',
  250. query_end_time: '',
  251. selection:[],
  252. query_insutype: '',
  253. query_clr_type: '',
  254. query_clr_org:'',
  255. clr_type:'',
  256. fromData: [],
  257. options: [
  258. {
  259. value: 1,
  260. label: '总账'
  261. }, {
  262. value: 2,
  263. label: '明细'
  264. }
  265. ],clrOrgOptions:[
  266. {
  267. value: '440781',
  268. label: '台山'
  269. }, {
  270. value: '440783',
  271. label: '开平'
  272. },
  273. ],
  274. clrOptions: [
  275. {
  276. value: '11',
  277. label: '门诊'
  278. }, {
  279. value: '21',
  280. label: '住院'
  281. }, {
  282. value: '41',
  283. label: '药店购药'
  284. }, {
  285. value: '99',
  286. label: '其他'
  287. }, {
  288. value: '9903',
  289. label: '异地'
  290. }
  291. ],
  292. insutypes: [
  293. {
  294. value: '310',
  295. label: '职工基本医疗保险'
  296. }, {
  297. value: '320',
  298. label: '公务员医疗补助'
  299. }, {
  300. value: '330',
  301. label: '大额医疗费用补助'
  302. }, {
  303. value: '340',
  304. label: '离休人员医疗保障'
  305. },
  306. {
  307. value: '390',
  308. label: '城乡居民基本医疗保险'
  309. }, {
  310. value: '392',
  311. label: '城乡居民大病医疗保险'
  312. }, {
  313. value: '510',
  314. label: '生育保险'
  315. }
  316. // 1617724800
  317. ]
  318. }
  319. },
  320. methods: {
  321. changeInsutype() {
  322. let params = {
  323. 'page': 1,
  324. 'limit': 10,
  325. 'keywords': this.keywords,
  326. 'insutype': this.query_insutype,
  327. 'clr_type': "11",
  328. 'start_time': this.query_start_time,
  329. 'end_time': this.query_end_time,
  330. }
  331. this.tableData = []
  332. getList(params).then(response => {
  333. if (response.data.state == 0) {
  334. this.$message.error(response.data.msg)
  335. return false
  336. } else {
  337. this.tableData = response.data.data.list
  338. this.total = response.data.data.total
  339. }
  340. })
  341. }, changeClrType(val) {
  342. if (val != "11"){
  343. this.tableData = []
  344. this.total = 0
  345. }else{
  346. let params = {
  347. 'page': 1,
  348. 'limit': 10,
  349. 'keywords': this.keywords,
  350. 'insutype': this.query_insutype,
  351. 'clr_type': "11",
  352. 'start_time': this.query_start_time,
  353. 'end_time': this.query_end_time,
  354. }
  355. this.tableData = []
  356. getList(params).then(response => {
  357. if (response.data.state == 0) {
  358. this.$message.error(response.data.msg)
  359. return false
  360. } else {
  361. this.tableData = response.data.data.list
  362. this.total = response.data.data.total
  363. }
  364. })
  365. }
  366. },
  367. handleStartTimeChange() {
  368. let params = {
  369. 'page': 1,
  370. 'limit': 10,
  371. 'keywords': this.keywords,
  372. 'insutype': "",
  373. 'clr_type': "11",
  374. 'start_time': this.query_start_time,
  375. 'end_time': this.query_end_time,
  376. }
  377. this.tableData = []
  378. getList(params).then(response => {
  379. if (response.data.state == 0) {
  380. this.$message.error(response.data.msg)
  381. return false
  382. } else {
  383. this.tableData = response.data.data.list
  384. this.total = response.data.data.total
  385. }
  386. })
  387. }, handleEndTimeChange() {
  388. let params = {
  389. 'page': 1,
  390. 'limit': 10,
  391. 'keywords': this.keywords,
  392. 'insutype': "",
  393. 'clr_type': "11",
  394. 'start_time': this.query_start_time,
  395. 'end_time': this.query_end_time,
  396. }
  397. this.tableData = []
  398. getList(params).then(response => {
  399. if (response.data.state == 0) {
  400. this.$message.error(response.data.msg)
  401. return false
  402. } else {
  403. this.tableData = response.data.data.list
  404. this.total = response.data.data.total
  405. }
  406. })
  407. },
  408. searchAction() {
  409. let params = {
  410. 'page': 1,
  411. 'limit': 10,
  412. 'keywords': this.keywords,
  413. 'insutype': "",
  414. 'clr_type': "11",
  415. 'start_time': "",
  416. 'end_time': "",
  417. }
  418. this.tableData = []
  419. getList(params).then(response => {
  420. if (response.data.state == 0) {
  421. this.$message.error(response.data.msg)
  422. return false
  423. } else {
  424. this.tableData = response.data.data.list
  425. this.total = response.data.data.total
  426. }
  427. })
  428. },
  429. selectCostInfo(selection, row) {
  430. this.selection = selection
  431. }, changeCostInfoTableData(val) {
  432. this.selection = val
  433. }, changeAllCostInfoTableData(selection) {
  434. this.selection = selection
  435. }, confirm() {
  436. if (this.check_type == 1) {
  437. let params = {
  438. start_time: this.start_time,
  439. end_time: this.end_time,
  440. insutype: this.insutype,
  441. clr_type: this.clr_type,
  442. clr_optins:this.query_clr_org,
  443. }
  444. var that = this
  445. 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 ) {
  446. axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
  447. params: params
  448. })
  449. .then(function(response) {
  450. if (response.data.state == 0) {
  451. that.$message.error(response.data.msg)
  452. return false
  453. } else {
  454. var result_desc = ''
  455. if (response.data.data.stmt_rslt == 0) {
  456. result_desc = '对账平'
  457. } else if (response.data.data.stmt_rslt == 1) {
  458. result_desc = '中心多' + '\n' + response.data.data.stmt_rslt_dscr
  459. } else if (response.data.data.stmt_rslt == 2) {
  460. result_desc = '机构多' + '\n' + response.data.data.stmt_rslt_dscr
  461. }
  462. that.$alert(result_desc, '对账结果', {
  463. confirmButtonText: '确定',
  464. callback: action => {
  465. that.dialogFormVisible = false
  466. }
  467. })
  468. that.page = 1
  469. that.limit = 10
  470. that.keywords = ''
  471. that.query_start_time = ''
  472. that.query_end_time = ''
  473. that.query_insutype = ''
  474. that.query_clr_type = ''
  475. that.getList()
  476. }
  477. })
  478. .catch(function(error) {
  479. })
  480. }
  481. } else {
  482. let params = {
  483. start_time: this.start_time,
  484. end_time: this.end_time
  485. }
  486. var that = this
  487. axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
  488. params: params
  489. })
  490. .then(function(response) {
  491. if (response.data.state == 0) {
  492. that.$message.error(response.data.msg)
  493. return false
  494. } else {
  495. this.page = 1
  496. this.limit = 10
  497. this.keywords = ''
  498. this.getList()
  499. }
  500. })
  501. .catch(function(error) {
  502. })
  503. }
  504. },
  505. getInsutype(type) {
  506. },
  507. fetchAllAdminUsers() {
  508. fetchAllAdminUsers().then(response => {
  509. if (response.data.state == 1) {
  510. this.adminUserOptions = response.data.data.users
  511. }
  512. })
  513. },
  514. getName(admin_user_id) {
  515. for (let i = 0; i < this.adminUserOptions.length; i++) {
  516. if (this.adminUserOptions[i].id == admin_user_id) {
  517. return this.adminUserOptions[i].name
  518. }
  519. }
  520. },
  521. getTimes(time) {
  522. return uParseTime(time, '{y}-{m}-{d}')
  523. },
  524. getList() {
  525. let params = {
  526. 'page': this.page,
  527. 'limit': this.limit,
  528. 'keywords': this.keywords,
  529. 'insutype': this.query_insutype,
  530. 'clr_type': this.query_clr_type,
  531. 'start_time': this.query_start_time,
  532. 'end_time': this.query_end_time
  533. }
  534. this.tableData = []
  535. getList(params).then(response => {
  536. if (response.data.state == 0) {
  537. this.$message.error(response.data.msg)
  538. return false
  539. } else {
  540. this.tableData = response.data.data.list
  541. this.total = response.data.data.total
  542. }
  543. })
  544. },
  545. handleSizeChange(limit) {
  546. this.limit = limit
  547. this.getList()
  548. },
  549. handleCurrentChange(page) {
  550. this.page = page
  551. this.getList()
  552. }, getFormData() {
  553. if (this.selection.length == 0) {
  554. this.$message.error('请选择要下载的对账记录')
  555. return
  556. }
  557. let params = {
  558. 'start_time': this.getTimes(this.selection[0].start_time),
  559. 'end_time': this.getTimes(this.selection[0].end_time),
  560. 'insutype': this.selection[0].insutype
  561. }
  562. getCheckAccountFormData(params).then(response => {
  563. if (response.data.state == 0) {
  564. this.$message.error(response.data.msg)
  565. return false
  566. } else {
  567. this.fromData = response.data.data.list
  568. if(this.selection[0].insutype == "310"){
  569. var list = []
  570. for (let i = 0; i < this.fromData.length; i++) {
  571. // var hifmi_pay = 0.00;
  572. //
  573. // if(this.fromData[i].setl_detail.length > 0){
  574. // var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  575. // for (let i = 0; i < jsonObj.length; i++) {
  576. // if (order.fund_pay_type == '310300') {
  577. // hifmi_pay = jsonObj[i].fund_payamt
  578. // }
  579. // }
  580. // }
  581. var hifes_pays = [];
  582. if(this.fromData[i].setl_detail.length > 0){
  583. var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  584. console.log(jsonObj)
  585. for (let i = 0; i < jsonObj.length; i++) {
  586. if (jsonObj[i].fund_pay_type == '310100') {
  587. hifes_pays.push(jsonObj[i].fund_payamt)
  588. }
  589. }
  590. }
  591. let hifes_pay = 0.00
  592. if(hifes_pays.length == 2){
  593. hifes_pay = hifes_pays[1]
  594. }
  595. let obj = {
  596. '序号': i+1,
  597. '姓名': this.fromData[i].psn_name,
  598. '单位名称': this.fromData[i].psn_name,
  599. '个人编号': this.fromData[i].psn_no,
  600. '门诊号': this.fromData[i].mdtrt_id,
  601. '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
  602. '挂号科室': "血透室",
  603. '门诊费用': this.fromData[i].medfee_sumamt,
  604. '自费': this.fromData[i].psn_cash_pay,
  605. '起付线I': this.fromData[i].act_pay_dedc,
  606. '按比例自付II': this.fromData[i].psn_cash_pay,
  607. '小计I+II': this.fromData[i].act_pay_dedc + this.fromData[i].psn_cash_pay,
  608. '统筹基金': this.fromData[i].fund_pay_sumamt,
  609. '公务员补助': this.fromData[i].cvlserv_pay,
  610. '单位补充保险': hifes_pay,
  611. '煤矿补充保险': "0.00",
  612. "超封顶线费用": "0.00",
  613. '大额医疗保险应付': this.fromData[i].hifob_pay,
  614. '透析补助': "0.00",
  615. '大额合计': "0.00",
  616. '实账支付额': "0.00",
  617. '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
  618. "血透次数":this.fromData[i].DialysisCount,
  619. "置留管数量":0,
  620. "备注":"",
  621. }
  622. list.push(obj)
  623. }
  624. var insutype_name = ''
  625. if (this.query_insutype == '310') {
  626. insutype_name = '职工基本医疗保险'
  627. } else if (this.query_insutype == '390') {
  628. insutype_name = '城乡居民基本医疗保险'
  629. }
  630. import('@/vendor/Export2Excel').then(excel => {
  631. const tHeader = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
  632. const filterVal = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
  633. // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
  634. 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']
  635. const data = this.formatJson(filterVal, list)
  636. excel.export_json_to_excel({
  637. header: tHeader,
  638. data,
  639. filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
  640. })
  641. })
  642. }else{
  643. var list = []
  644. for (let i = 0; i < this.fromData.length; i++) {
  645. var hifmi_pay = 0.00;
  646. if(this.fromData[i].setl_detail.length > 0){
  647. var jsonObj = JSON.parse(this.fromData[i].setl_detail);
  648. console.log(jsonObj)
  649. for (let i = 0; i < jsonObj.length; i++) {
  650. if (jsonObj[i].fund_pay_type == '390200') {
  651. hifmi_pay = jsonObj[i].fund_payamt
  652. }
  653. }
  654. }
  655. let obj = {
  656. '序号': i+1,
  657. '姓名': this.fromData[i].psn_name,
  658. '个人编号': this.fromData[i].psn_no,
  659. '门诊号': this.fromData[i].mdtrt_id,
  660. '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
  661. '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
  662. '挂号科室': "血透室",
  663. '门诊费用': this.fromData[i].medfee_sumamt,
  664. '自费': this.fromData[i].psn_cash_pay,
  665. '起付线': this.fromData[i].act_pay_dedc,
  666. '按比例自付': this.fromData[i].psn_cash_pay,
  667. "超封顶线费用": "0.00",
  668. "合计": parseFloat(this.fromData[i].act_pay_dedc) + parseFloat(this.fromData[i].psn_cash_pay),
  669. '统筹基金': this.fromData[i].fund_pay_sumamt,
  670. '大病保险': hifmi_pay,
  671. '医疗救助': this.fromData[i].maf_pay,
  672. '实账支付额': "0.00",
  673. "血透次数":this.fromData[i].DialysisCount,
  674. "置留管数量":0,
  675. "备注":"",
  676. }
  677. list.push(obj)
  678. }
  679. var insutype_name = ''
  680. if (this.query_insutype == '310') {
  681. insutype_name = '职工基本医疗保险'
  682. } else if (this.query_insutype == '390') {
  683. insutype_name = '城乡居民基本医疗保险'
  684. }
  685. import('@/vendor/Export2Excel').then(excel => {
  686. const tHeader = ['序号', '姓名','个人编号', '门诊号', '挂号日期', '诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
  687. const filterVal = ['序号', '姓名','个人编号', '门诊号', '挂号日期','诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
  688. // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
  689. 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']
  690. const data = this.formatJson(filterVal, list)
  691. excel.export_json_to_excel({
  692. header: tHeader,
  693. data,
  694. filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
  695. })
  696. })
  697. }
  698. }
  699. })
  700. }, formatJson(filterVal, jsonData) {
  701. return jsonData.map(v => filterVal.map(j => v[j]))
  702. },GetDiagnosisName(id){
  703. for(let i = 0;i < this.diagnoses.length; i++){
  704. if(this.diagnoses[i].id == id){
  705. return this.diagnoses[i].class_name
  706. }
  707. }
  708. return ""
  709. }, getInitData() {
  710. getInitData().then(response => {
  711. if (response.data.state == 0) {
  712. this.$message.error(response.data.msg)
  713. return false
  714. } else {
  715. this.diagnoses = response.data.data.diagnose
  716. }
  717. })
  718. },
  719. },
  720. created() {
  721. this.getList()
  722. this.fetchAllAdminUsers()
  723. this.getInitData()
  724. }
  725. }
  726. </script>