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

summary.vue 31KB

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