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

summary.vue 32KB

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