summary.vue 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. <template>
  2. <div class="main-contain outpatientChargesManagement">
  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:150px;" 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-select size="small" v-model="admin_user_id" placeholder="请选择"
  16. style="width:150px;margin-left:10px;" @change="changeDoctor">
  17. <el-option
  18. label="全部"
  19. value="0">
  20. </el-option>
  21. <el-option
  22. v-for="item,index in doctors"
  23. :key="index"
  24. :label="item.user_name"
  25. :value="item.admin_user_id">
  26. </el-option>
  27. </el-select>
  28. <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
  29. @change="handleStartTimeChange" :editable="false" :clearable="false"
  30. style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
  31. format="yyyy-MM-dd"
  32. value-format="yyyy-MM-dd"
  33. align="right"></el-date-picker>
  34. <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
  35. @change="handleEndTimeChange" :editable="false" :clearable="false"
  36. style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
  37. format="yyyy-MM-dd"
  38. value-format="yyyy-MM-dd"
  39. align="right"></el-date-picker>
  40. <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
  41. <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
  42. </div>
  43. <div>
  44. <!-- <el-popover
  45. placement="bottom"
  46. width="210"
  47. trigger="click">
  48. <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
  49. <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
  50. <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
  51. </el-popover> -->
  52. <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
  53. </div>
  54. </div>
  55. <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
  56. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  57. highlight-current-row>
  58. <el-table-column
  59. prop="date"
  60. label="序号"
  61. width="60"
  62. align="center"
  63. type="index"
  64. >
  65. </el-table-column>
  66. <el-table-column align="center" width="100" prop="name" label="就诊号">
  67. <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
  68. </el-table-column>
  69. <el-table-column align="center" width="90" prop="name" label="患者名字">
  70. <template slot-scope="scope">{{ scope.row.patient.name }}</template>
  71. </el-table-column>
  72. <!--<el-table-column align="center" prop="name" label="患者类型">-->
  73. <!--<template slot-scope="scope"></template>-->
  74. <!--</el-table-column>-->
  75. <el-table-column align="center" width="90" prop="name" label="应收金额">
  76. <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
  77. </el-table-column>
  78. <el-table-column align="center" width="90" prop="name" label="实收金额">
  79. <template slot-scope="scope">{{scope.row.reality_price}}</template>
  80. </el-table-column>
  81. <el-table-column align="center" width="90" prop="name" label="科室">
  82. <template slot-scope="scope">{{scope.row.department_name}}</template>
  83. </el-table-column>
  84. <el-table-column align="center" width="90" prop="name" label="医疗类型">
  85. <template slot-scope="scope"><div>{{getMedType(scope.row.med_type)}}</div></template>
  86. </el-table-column>
  87. <el-table-column align="center" width="100" prop="name" label="收费日期">
  88. <template slot-scope="scope">
  89. {{scope.row.setl_time?scope.row.setl_time:getTimes(scope.row.settle_accounts_date)}}
  90. </template>
  91. </el-table-column>
  92. <el-table-column align="center" width="90" prop="name" label="收费员">
  93. <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
  94. </el-table-column>
  95. <el-table-column align="center" width="80" prop="name" label="状态">
  96. <template slot-scope="scope">
  97. <div v-if="scope.row.order_status == 1">待结算</div>
  98. <div v-if="scope.row.order_status == 2">已结算</div>
  99. <div v-if="scope.row.order_status == 3">已退费</div>
  100. </template>
  101. </el-table-column>
  102. <el-table-column align="center" prop="name" label="操作">
  103. <template slot-scope="scope">
  104. <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
  105. <el-button size="mini" type="primary" @click="toPrint(scope.row)"
  106. v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) || ($store.getters.xt_user.org_id == 10106) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9990)">
  107. 结算单
  108. </el-button>
  109. <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
  110. v-if="scope.row.order_status == 2&& scope.row.result.id == 0">
  111. 上传结算清单
  112. </el-button>
  113. <el-button size="mini" type="primary"
  114. v-if="scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106"
  115. @click="settlementPrint(scope.row)">结算单
  116. </el-button>
  117. <el-button size="mini" type="primary" @click="toRefund(scope.row)">
  118. 退费
  119. </el-button>
  120. <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
  121. </template>
  122. </el-table-column>
  123. </el-table>
  124. <el-pagination
  125. @size-change="handleSizeChange"
  126. @current-change="handleCurrentChange"
  127. :page-sizes="[10, 50, 100]"
  128. :page-size="10"
  129. background
  130. style="margin-top:20px;float: right"
  131. layout="total, sizes, prev, pager, next, jumper"
  132. :total="total"
  133. >
  134. </el-pagination>
  135. </div>
  136. <el-dialog
  137. class="centerDialog"
  138. width="1200px"
  139. title="打印"
  140. :visible.sync="statementVisible">
  141. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  142. <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
  143. </el-dialog>
  144. <el-dialog
  145. class="centerDialog"
  146. width="900px"
  147. title="打印"
  148. :visible.sync="listVisible">
  149. <listPrint></listPrint>
  150. </el-dialog>
  151. <el-dialog
  152. class="centerDialog"
  153. width="900px"
  154. title="打印"
  155. :visible.sync="allListVisible">
  156. <allListPrint :paramsObj='paramsObj'></allListPrint>
  157. </el-dialog>
  158. <el-dialog
  159. class="centerDialog"
  160. width="1200px"
  161. title="打印"
  162. :visible.sync="statementVisible9504">
  163. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  164. <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
  165. <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
  166. </el-dialog>
  167. <el-dialog
  168. class="centerDialog"
  169. width="1200px"
  170. title="打印"
  171. :visible.sync="invoiceVisible">
  172. <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
  173. </el-dialog>
  174. <el-dialog
  175. class="centerDialog"
  176. width="1200px"
  177. title="打印"
  178. :visible.sync="settlementVisible">
  179. <settlement-print ref="print" :paramsObj='settlementObj'></settlement-print>
  180. </el-dialog>
  181. </div>
  182. </template>
  183. <script>
  184. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  185. import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
  186. import { uParseTime } from '@/utils/tools'
  187. import NewStatementPrint from './newStatementPrint'
  188. import listPrint from './listPrint'
  189. import allListPrint from './allListPrint'
  190. import NewStatementPrintTwo from './newStatementPrintTwo'
  191. import { fetchAllAdminUsers } from '@/api/doctor'
  192. import axios from 'axios'
  193. import invoicePrint from './invoicePrint'
  194. import settlementPrint from './settlementPrint'
  195. export default {
  196. components: {
  197. NewStatementPrintTwo,
  198. NewStatementPrint,
  199. BreadCrumb,
  200. listPrint,
  201. allListPrint,
  202. invoicePrint,
  203. settlementPrint
  204. },
  205. data() {
  206. return {
  207. orderObj: {},
  208. statementVisible: false,
  209. statementVisible9504: false,
  210. orderObj9504: {},
  211. crumbs: [
  212. { path: false, name: '门诊收费' },
  213. { path: false, name: '项目消费明细汇总' }
  214. ],
  215. tableData: [],
  216. limit: 10,
  217. page: 1,
  218. keywords: '',
  219. start_time: '',
  220. end_time: '',
  221. total: '',
  222. doctors: [],
  223. admin_user_id: '',
  224. listVisible: false,
  225. allListVisible: false,
  226. adminUserOptions: [],
  227. invoiceVisible: false,
  228. paramsObj: {},
  229. invoiceParams: {},
  230. settlementVisible: false,
  231. settlementObj: {}
  232. }
  233. },
  234. methods: {
  235. getMedType(med_type) {
  236. var med_type = parseInt(med_type)
  237. if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
  238. switch (med_type) {
  239. case 11:
  240. return '普通门诊'
  241. break
  242. case 12:
  243. return '家庭通道'
  244. break
  245. case 13:
  246. return '门诊大病'
  247. break
  248. case 14:
  249. return '重疾特药'
  250. break
  251. case 15:
  252. return '门诊慢病'
  253. break
  254. case 16:
  255. return '门诊特检'
  256. break
  257. case 17:
  258. return '健康体检'
  259. break
  260. case 18:
  261. return '预防接种'
  262. break
  263. case 19:
  264. return '门诊输血'
  265. break
  266. case 91:
  267. return '新冠肺炎门诊'
  268. break
  269. case 1111:
  270. return '精一' + '处方'
  271. break
  272. case 1112:
  273. return '精二' + '处方'
  274. break
  275. }
  276. } else {
  277. switch (med_type) {
  278. case 11:
  279. return '普通门诊'
  280. break
  281. case 12:
  282. return '门诊挂号'
  283. break
  284. case 13:
  285. return '急诊'
  286. break
  287. case 14:
  288. return '门诊特殊病'
  289. break
  290. case 15:
  291. return '门诊统筹'
  292. break
  293. case 16:
  294. return '门诊慢性病'
  295. break
  296. case 21:
  297. return '普通住院'
  298. break
  299. }
  300. }
  301. },
  302. uploadInfo(row) {
  303. var that = this
  304. axios.get('http://127.0.0.1:9532/api/settlelist/get', {
  305. params: {
  306. order_id: row.id,
  307. admin_user_id: this.$store.getters.xt_user.user.id
  308. }
  309. }).then(function(response) {
  310. if (response.data.state == 0) {
  311. that.$message.error(response.data.msg)
  312. return false
  313. } else {
  314. if (response.data.data.failed_code == -10) {
  315. // that.$message.error(response.data.data.msg)
  316. that.$confirm(response.data.data.msg, '医保错误信息', {
  317. confirmButtonText: '确 定',
  318. type: 'warning'
  319. }).then(() => {
  320. }).catch(() => {
  321. })
  322. } else {
  323. that.$message.success('上传成功')
  324. row.result.id = response.data.data.result.id
  325. }
  326. }
  327. }).catch(function(error) {
  328. })
  329. },
  330. fetchAllAdminUsers() {
  331. fetchAllAdminUsers().then(response => {
  332. if (response.data.state == 1) {
  333. this.adminUserOptions = response.data.data.users
  334. }
  335. })
  336. },
  337. getName(admin_user_id) {
  338. for (let i = 0; i < this.adminUserOptions.length; i++) {
  339. if (this.adminUserOptions[i].id == admin_user_id) {
  340. return this.adminUserOptions[i].name
  341. }
  342. }
  343. }, toRefund(row) {
  344. console.log("~~~~~")
  345. console.log(row)
  346. console.log(this.$store.getters.xt_user.org_id )
  347. if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
  348. var that = this
  349. this.$confirm('是否退费', '退费', {
  350. confirmButtonText: '确 定',
  351. cancelButtonText: '取 消',
  352. type: 'warning'
  353. }).then(() => {
  354. let params = {
  355. 'order_id': row.id,
  356. 'patient_id': row.patient_id,
  357. 'record_time': that.getTimes(row.settle_accounts_date),
  358. 'admin_user_id': that.$store.getters.xt_user.user.id
  359. }
  360. axios.get('http://127.0.0.1:9532/api/refund/post', {
  361. params: params
  362. })
  363. .then(function(response) {
  364. if (response.data.state == 0) {
  365. that.$message.error(response.data.msg)
  366. return false
  367. } else {
  368. if (response.data.data.failed_code == -10) {
  369. // that.$message.error(response.data.data.msg)
  370. that.$confirm(response.data.data.msg, '医保错误信息', {
  371. confirmButtonText: '确 定',
  372. type: 'warning'
  373. }).then(() => {
  374. }).catch(() => {
  375. })
  376. } else {
  377. that.$message({ message: '退费成功', type: 'success', duration: 5000 })
  378. that.getHisOrderList()
  379. }
  380. }
  381. })
  382. .catch(function(error) {
  383. })
  384. }).catch(() => {
  385. })
  386. } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
  387. var that = this
  388. this.$confirm('是否退费', '退费', {
  389. confirmButtonText: '确 定',
  390. cancelButtonText: '取 消',
  391. type: 'warning'
  392. }).then(() => {
  393. let params = {
  394. 'order_id': row.id,
  395. 'patient_id': row.patient_id,
  396. 'record_time': this.getTimes(row.settle_accounts_date),
  397. 'admin_user_id': this.$store.getters.xt_user.user.id
  398. }
  399. axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
  400. params: params
  401. })
  402. .then(function(response) {
  403. if (response.data.state == 0) {
  404. that.$message.error(response.data.msg)
  405. return false
  406. } else {
  407. if (response.data.data.failed_code == -10) {
  408. that.$confirm(response.data.data.msg, '医保错误信息', {
  409. confirmButtonText: '确 定',
  410. type: 'warning'
  411. }).then(() => {
  412. }).catch(() => {
  413. })
  414. } else {
  415. that.$message({ message: '退费成功', type: 'success', duration: 5000 })
  416. that.getHisOrderList()
  417. }
  418. }
  419. })
  420. .catch(function(error) {
  421. })
  422. }).catch(() => {
  423. })
  424. } else {
  425. this.$confirm('是否退费', '退费', {
  426. confirmButtonText: '确 定',
  427. cancelButtonText: '取 消',
  428. type: 'warning'
  429. }).then(() => {
  430. let params = {
  431. 'order_id': this.order.id,
  432. 'patient_id': this.patientInfo.id,
  433. 'record_time': this.record_date
  434. }
  435. Refund(params).then(response => {
  436. if (response.data.state == 0) {
  437. this.$message.error(response.data.msg)
  438. return false
  439. } else {
  440. this.$message({ message: '退费成功', type: 'success' })
  441. this.getHisOrderList()
  442. }
  443. })
  444. }).catch(() => {
  445. })
  446. }
  447. },
  448. toPrint(row) {
  449. if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
  450. this.statementVisible9504 = true
  451. let obj = {
  452. order_id: row.id,
  453. patient_id: row.patient_id,
  454. record_time: this.getTimes(row.settle_accounts_date),
  455. admin_user_id: this.$store.getters.xt_user.user.id
  456. }
  457. this.orderObj9504 = obj
  458. } else {
  459. this.statementVisible = true
  460. let obj = {
  461. order_id: row.id,
  462. settle_type: row.settle_type,
  463. start_time: row.settle_start_time,
  464. end_time: row.settle_end_time
  465. }
  466. this.orderObj = obj
  467. }
  468. },
  469. settlementPrint(row) {
  470. this.settlementVisible = true
  471. let obj = {
  472. order_id: row.id
  473. }
  474. this.settlementObj = obj
  475. },
  476. export_detail() {
  477. let params = {
  478. start_time: this.start_time,
  479. end_time: this.end_time,
  480. p_type: 2
  481. }
  482. getExportConsumeDetailList(params).then(response => {
  483. if (response.data.state == 0) {
  484. this.$message.error(response.data.msg)
  485. return false
  486. } else {
  487. let list = []
  488. for (let i = 0; i < response.data.data.order.length; i++) {
  489. let order = response.data.data.order[i]
  490. let number = ''
  491. let name = ''
  492. let department = ''
  493. let doctor_name = ''
  494. let balance_accounts = ''
  495. let order_status = ''
  496. let charge_name = ''
  497. let insutypeName = ''
  498. let time = ''
  499. if (order.his_patient != null && order.his_patient.number.length > 0) {
  500. number = order.his_patient.number
  501. }
  502. if (order.his_patient != null) {
  503. if (order.his_patient.balance_accounts_type == 1) {
  504. balance_accounts = '自费'
  505. }
  506. if (order.his_patient.balance_accounts_type == 2) {
  507. balance_accounts = '医保'
  508. }
  509. }
  510. if (order.patient != null && order.patient.name.length > 0) {
  511. name = order.patient.name
  512. }
  513. if (order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0) {
  514. department = order.p_info.department.name
  515. }
  516. if (order.p_info != null && order.p_info.doctor.length > 0) {
  517. doctor_name = order.p_info.doctor
  518. }
  519. if (order.creator != null) {
  520. charge_name = this.getName(order.creator)
  521. }
  522. if (order.insutype == '390') {
  523. insutypeName = '城乡居民基本医疗保险'
  524. } else if (order.insutype == '310') {
  525. insutypeName = '职工基本医疗保险'
  526. }
  527. if (order.order_status == 1) {
  528. order_status = '待结算'
  529. }
  530. if (order.order_status == 2) {
  531. order_status = '已结算'
  532. }
  533. if (order.order_status == 3) {
  534. order_status = '已退费'
  535. }
  536. if (order.settle_type == 2) {
  537. time = this.getTimes(order.settle_start_time)
  538. } else {
  539. time = this.getTimes(order.settle_accounts_date)
  540. }
  541. var hifmi_pay = 0.00
  542. if (order.setl_detail.length > 0) {
  543. var jsonObj = JSON.parse(order.setl_detail)
  544. for (let i = 0; i < jsonObj.length; i++) {
  545. if (order.insutype == '310') {
  546. if (jsonObj[i].fund_pay_type == '310300') {
  547. hifmi_pay = jsonObj[i].fund_payamt
  548. }
  549. } else if (order.insutype == '390') {
  550. if (order.fund_pay_type == '390200') {
  551. hifmi_pay = jsonObj[i].fund_payamt
  552. }
  553. }
  554. }
  555. }
  556. var hifmi_pay = 0.00
  557. if (order.setl_detail.length > 0) {
  558. var jsonObj = JSON.parse(order.setl_detail)
  559. for (let i = 0; i < jsonObj.length; i++) {
  560. if (order.insutype == '310') {
  561. if (jsonObj[i].fund_pay_type == '310300') {
  562. hifmi_pay = jsonObj[i].fund_payamt
  563. }
  564. }
  565. if (order.insutype == '390') {
  566. if (jsonObj[i].fund_pay_type == '390200') {
  567. hifmi_pay = jsonObj[i].fund_payamt
  568. }
  569. }
  570. }
  571. }
  572. let obj = {
  573. '就诊号': order.mdtrt_id,
  574. '患者姓名': name,
  575. '开处时间': time,
  576. '险种类型': insutypeName,
  577. '应收金额': order.medfee_sumamt,
  578. '实收金额': order.medfee_sumamt,
  579. '医保统筹金额': order.hifp_pay,
  580. '大额基金金额': order.hifob_pay,
  581. '大病基金金额': hifmi_pay,
  582. '补充保险基金金额': order.hifes_pay,
  583. '医疗救助基金金额': order.maf_pay,
  584. '公务员基金': order.cvlserv_pay,
  585. '个人支付基金': order.psn_cash_pay,
  586. '个人账户支付金额': order.acct_pay,
  587. '科室': department,
  588. '医生姓名': doctor_name,
  589. '收费类别': balance_accounts,
  590. '收费者姓名': charge_name,
  591. '总金额': order.medfee_sumamt,
  592. '现金支付': '',
  593. '账户支付': '',
  594. '支付宝支付': '',
  595. '微信支付': '',
  596. '其他支付': '',
  597. '收费时间': order.setl_time,
  598. '收费状态': order_status,
  599. '退费日期': ''
  600. }
  601. list.push(obj)
  602. }
  603. import('@/vendor/Export2Excel').then(excel => {
  604. const tHeader = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
  605. const filterVal = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
  606. const data = this.formatJson(filterVal, list)
  607. excel.export_json_to_excel({
  608. header: tHeader,
  609. data,
  610. filename: '消费明细'
  611. })
  612. })
  613. }
  614. })
  615. }, formatJson(filterVal, jsonData) {
  616. return jsonData.map(v => filterVal.map(j => v[j]))
  617. },
  618. changeDoctor() {
  619. this.page = 1
  620. this.keywords = ''
  621. this.getHisOrderList()
  622. },
  623. handleSizeChange(limit) {
  624. this.limit = limit
  625. this.getHisOrderList()
  626. }, handleCurrentChange(page) {
  627. this.page = page
  628. this.getHisOrderList()
  629. },
  630. handleStartTimeChange() {
  631. this.page = 1
  632. this.keywords = ''
  633. this.getHisOrderList()
  634. }, handleEndTimeChange() {
  635. this.page = 1
  636. this.keywords = ''
  637. this.getHisOrderList()
  638. },
  639. searchAction() {
  640. this.page = 1
  641. this.getHisOrderList()
  642. },
  643. getTimes(time) {
  644. return uParseTime(time, '{y}-{m}-{d}')
  645. },
  646. toDetail(row) {
  647. this.$router.push('/outpatientCharges/summaryDetail?patient_id=' + row.patient.id + '&number=' + row.number + '&id=' + row.id)
  648. }, getTime(value, temp) {
  649. if (value != undefined) {
  650. return uParseTime(value, temp)
  651. }
  652. return ''
  653. }, getHisOrderList() {
  654. let params = {
  655. page: this.page,
  656. limit: this.limit,
  657. keywords: this.keywords,
  658. start_time: this.start_time,
  659. end_time: this.end_time,
  660. type: this.admin_user_id,
  661. p_type: 2
  662. }
  663. getHisOrderList(params).then(response => {
  664. if (response.data.state == 0) {
  665. this.$message.error(response.data.msg)
  666. return false
  667. } else {
  668. this.tableData = response.data.data.order
  669. this.total = response.data.data.total
  670. }
  671. })
  672. }, getDoctorList() {
  673. getDoctorList().then(response => {
  674. if (response.data.state == 0) {
  675. this.$message.error(response.data.msg)
  676. return false
  677. } else {
  678. this.doctors = response.data.data.doctors
  679. }
  680. })
  681. },
  682. open(index) {
  683. if (index == 1) {
  684. this.listVisible = true
  685. } else if (index == 2) {
  686. this.allListVisible = true
  687. }
  688. },
  689. invoicePrint(obj) {
  690. console.log(obj)
  691. let paramsObj = {
  692. order_id: obj.id,
  693. patient_id: obj.patient_id,
  694. name: obj.patient.name,
  695. age: obj.age,
  696. gend: obj.gend,
  697. setl_time: obj.setl_time
  698. }
  699. this.invoiceParams = paramsObj
  700. this.invoiceVisible = true
  701. }
  702. }, created() {
  703. this.fetchAllAdminUsers()
  704. this.getDoctorList()
  705. this.getHisOrderList()
  706. }
  707. }
  708. </script>