summary.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  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" v-loading="loading">报表下载</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" prop="name" label="就诊号">
  67. <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
  68. </el-table-column>
  69. <el-table-column align="center" 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" prop="name" label="应收金额">
  76. <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
  77. </el-table-column>
  78. <el-table-column align="center" prop="name" label="实收金额">
  79. <template slot-scope="scope">{{scope.row.reality_price}}</template>
  80. </el-table-column>
  81. <el-table-column align="center" prop="name" label="科室">
  82. <template slot-scope="scope">{{scope.row.department_name}}</template>
  83. </el-table-column>
  84. <el-table-column align="center" prop="name" label="收费日期">
  85. <template slot-scope="scope"> {{scope.row.setl_time}}</template>
  86. </el-table-column>
  87. <el-table-column align="center" prop="name" label="收费员">
  88. <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
  89. </el-table-column>
  90. <el-table-column align="center" prop="name" label="状态">
  91. <template slot-scope="scope">
  92. <div v-if="scope.row.order_status == 1">待结算</div>
  93. <div v-if="scope.row.order_status == 2">已结算</div>
  94. <div v-if="scope.row.order_status == 3">已退费</div>
  95. </template>
  96. </el-table-column>
  97. <el-table-column align="center" prop="name" label="操作">
  98. <template slot-scope="scope">
  99. <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
  100. <el-button size="mini" type="primary" @click="toPrint(scope.row)"
  101. 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) || ($store.getters.xt_user.org_id == 9990) ">
  102. 结算单
  103. </el-button>
  104. <el-button size="mini" type="primary" @click="toRefund(scope.row)"
  105. v-if="(scope.row.order_status == 2 || $store.getters.xt_user.org_id== 9990)">
  106. 退费
  107. </el-button>
  108. <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
  109. v-if="scope.row.order_status == 2 && scope.row.result.id == 0">
  110. 上传结算清单
  111. </el-button>
  112. <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
  113. <el-button size="mini" type="primary" @click="refundOne(scope.row)">
  114. 撤销出院
  115. </el-button>
  116. <el-button size="mini" type="primary" @click="refundTwo(scope.row)">
  117. 撤销明细
  118. </el-button>
  119. <el-button size="mini" type="primary" @click="refundThee(scope.row)">
  120. 撤销入院
  121. </el-button>
  122. </template>
  123. </el-table-column>
  124. </el-table>
  125. <el-pagination
  126. @size-change="handleSizeChange"
  127. @current-change="handleCurrentChange"
  128. :page-sizes="[10, 50, 100]"
  129. :page-size="10"
  130. background
  131. style="margin-top:20px;float: right"
  132. layout="total, sizes, prev, pager, next, jumper"
  133. :total="total"
  134. >
  135. </el-pagination>
  136. </div>
  137. <el-dialog
  138. class="centerDialog"
  139. width="1200px"
  140. title="打印"
  141. :visible.sync="statementVisible">
  142. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  143. <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
  144. </el-dialog>
  145. <el-dialog
  146. class="centerDialog"
  147. width="900px"
  148. title="打印"
  149. :visible.sync="listVisible">
  150. <listPrint></listPrint>
  151. </el-dialog>
  152. <el-dialog
  153. class="centerDialog"
  154. width="900px"
  155. title="打印"
  156. :visible.sync="allListVisible">
  157. <allListPrint :paramsObj='paramsObj'></allListPrint>
  158. </el-dialog>
  159. <el-dialog
  160. class="centerDialog"
  161. width="1200px"
  162. title="打印"
  163. :visible.sync="statementVisible9504">
  164. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  165. <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
  166. <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
  167. </el-dialog>
  168. <el-dialog
  169. class="centerDialog"
  170. width="1200px"
  171. title="打印"
  172. :visible.sync="invoiceVisible">
  173. <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
  174. </el-dialog>
  175. <!-- <el-dialog
  176. class="centerDialog"
  177. width="1200px"
  178. title="打印"
  179. :visible.sync="settlementVisible">
  180. <settlement-print ref="print" :paramsObj='orderObj'></settlement-print>
  181. </el-dialog> -->
  182. </div>
  183. </template>
  184. <script>
  185. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  186. import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from '@/api/his/his'
  187. import { uParseTime } from '@/utils/tools'
  188. import NewStatementPrint from './newStatementPrint'
  189. import listPrint from './listPrint'
  190. import allListPrint from './allListPrint'
  191. import NewStatementPrintTwo from './newStatementPrintTwo'
  192. import { fetchAllAdminUsers } from '@/api/doctor'
  193. import axios from 'axios'
  194. import invoicePrint from './invoicePrint'
  195. // import settlementPrint from './settlementPrint'
  196. export default {
  197. components: {
  198. NewStatementPrintTwo,
  199. NewStatementPrint,
  200. BreadCrumb,
  201. listPrint,
  202. allListPrint,
  203. invoicePrint,
  204. // settlementPrint
  205. },
  206. data() {
  207. return {
  208. orderObj: {},
  209. statementVisible: false,
  210. statementVisible9504: false,
  211. orderObj9504: {},
  212. crumbs: [
  213. { path: false, name: '门诊收费' },
  214. { path: false, name: '项目消费明细汇总' }
  215. ],
  216. tableData: [],
  217. limit: 10,
  218. page: 1,
  219. keywords: '',
  220. start_time: '',
  221. end_time: '',
  222. total: '',
  223. doctors: [],
  224. admin_user_id: '',
  225. listVisible: false,
  226. allListVisible: false,
  227. adminUserOptions:[],
  228. invoiceVisible:false,
  229. paramsObj:{},
  230. invoiceParams:{},
  231. settlementVisible:false
  232. }
  233. },
  234. methods: {
  235. refundOne(row){
  236. var that = this;
  237. this.$confirm('是否撤销出院', '撤销出院', {
  238. confirmButtonText: '确 定',
  239. cancelButtonText: '取 消',
  240. type: 'warning'
  241. }).then(() => {
  242. let params = {
  243. 'id': row.his_hospital_patient.id,
  244. 'admin_user_id': this.$store.getters.xt_user.user.id,
  245. };
  246. axios.get('http://127.0.0.1:9532/zh/api/outhopitaluncheck/get', {
  247. params: params
  248. })
  249. .then(function(response) {
  250. if (response.data.state == 0) {
  251. that.$message.error(response.data.msg);
  252. return false
  253. } else {
  254. if (response.data.data.failed_code == -10) {
  255. // that.$message.error(response.data.data.msg)
  256. that.$confirm(response.data.data.msg, '医保错误信息', {
  257. confirmButtonText: '确 定',
  258. type: 'warning'
  259. }).then(() => {
  260. }).catch(() => {
  261. })
  262. } else {
  263. that.$message({ message: '撤销出院成功', type: 'success', duration: 5000 })
  264. }
  265. }
  266. })
  267. .catch(function(error) {
  268. })
  269. }).catch(() => {
  270. })
  271. },refundThee(row){
  272. var that = this;
  273. this.$confirm('是否撤销入院', '撤销入院', {
  274. confirmButtonText: '确 定',
  275. cancelButtonText: '取 消',
  276. type: 'warning'
  277. }).then(() => {
  278. let params = {
  279. 'id': row.his_hospital_patient.id,
  280. 'admin_user_id': this.$store.getters.xt_user.user.id,
  281. };
  282. axios.get('http://127.0.0.1:9532/zh/api/inthopitaluncheck/get', {
  283. params: params
  284. })
  285. .then(function(response) {
  286. if (response.data.state == 0) {
  287. that.$message.error(response.data.msg);
  288. return false
  289. } else {
  290. if (response.data.data.failed_code == -10) {
  291. // that.$message.error(response.data.data.msg)
  292. that.$confirm(response.data.data.msg, '医保错误信息', {
  293. confirmButtonText: '确 定',
  294. type: 'warning'
  295. }).then(() => {
  296. }).catch(() => {
  297. })
  298. } else {
  299. that.changeRadioAndPatient(1);
  300. that.$message({ message: '撤销入院成功', type: 'success', duration: 5000 })
  301. }
  302. }
  303. })
  304. .catch(function(error) {
  305. })
  306. }).catch(() => {
  307. })
  308. },refundTwo(row){
  309. var that = this;
  310. this.$confirm('是否撤销明细', '撤销明细', {
  311. confirmButtonText: '确 定',
  312. cancelButtonText: '取 消',
  313. type: 'warning'
  314. }).then(() => {
  315. let params = {
  316. 'order_id': row.id,
  317. 'admin_user_id': this.$store.getters.xt_user.user.id,
  318. };
  319. axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
  320. params: params
  321. })
  322. .then(function(response) {
  323. if (response.data.state == 0) {
  324. that.$message.error(response.data.msg);
  325. that.loadingtwo = false;
  326. return false
  327. } else {
  328. if (response.data.data.failed_code == -10) {
  329. // that.$message.error(response.data.data.msg)
  330. that.$confirm(response.data.data.msg, '医保错误信息', {
  331. confirmButtonText: '确 定',
  332. type: 'warning'
  333. }).then(() => {
  334. }).catch(() => {
  335. })
  336. } else {
  337. that.$message.success("撤销明细成功");
  338. that.changeRadioAndPatient(1);
  339. }
  340. }
  341. })
  342. .catch(function(error) {
  343. })
  344. }).catch(() => {
  345. })
  346. },
  347. uploadInfo(row) {
  348. var that = this;
  349. axios.get('http://127.0.0.1:9532/api/settlelist/get', {
  350. params: {
  351. order_id: row.id,
  352. admin_user_id: this.$store.getters.xt_user.user.id
  353. }
  354. }).then(function (response) {
  355. if (response.data.state == 0) {
  356. that.$message.error(response.data.msg);
  357. return false
  358. } else {
  359. if (response.data.data.failed_code == -10) {
  360. // that.$message.error(response.data.data.msg)
  361. that.$confirm(response.data.data.msg, '医保错误信息', {
  362. confirmButtonText: '确 定',
  363. type: 'warning'
  364. }).then(() => {
  365. }).catch(() => {
  366. })
  367. } else {
  368. that.$message.success("上传成功");
  369. row.result.id = response.data.data.result.id
  370. }
  371. }
  372. }).catch(function (error) {
  373. })
  374. },
  375. fetchAllAdminUsers() {
  376. fetchAllAdminUsers().then(response => {
  377. if (response.data.state == 1) {
  378. this.adminUserOptions = response.data.data.users
  379. }
  380. })
  381. },
  382. getName(admin_user_id) {
  383. for (let i = 0; i < this.adminUserOptions.length; i++) {
  384. if (this.adminUserOptions[i].id == admin_user_id) {
  385. return this.adminUserOptions[i].name
  386. }
  387. }
  388. }, toRefund(row) {
  389. 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 == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
  390. var that = this;
  391. this.$confirm('是否退费', '退费', {
  392. confirmButtonText: '确 定',
  393. cancelButtonText: '取 消',
  394. type: 'warning'
  395. }).then(() => {
  396. let params = {
  397. 'order_id': row.id,
  398. 'admin_user_id': this.$store.getters.xt_user.user.id,
  399. };
  400. axios.get('http://127.0.0.1:9532/zh/api/refund', {
  401. params: params
  402. })
  403. .then(function (response) {
  404. if (response.data.state == 0) {
  405. that.$message.error(response.data.msg);
  406. return false
  407. } else {
  408. if (response.data.data.failed_code == -10) {
  409. // that.$message.error(response.data.data.msg)
  410. that.$confirm(response.data.data.msg, '医保错误信息', {
  411. confirmButtonText: '确 定',
  412. type: 'warning'
  413. }).then(() => {
  414. }).catch(() => {
  415. })
  416. } else {
  417. that.$message({message: '退费成功', type: 'success', duration: 5000});
  418. that.getHisOrderList()
  419. }
  420. }
  421. })
  422. .catch(function (error) {
  423. })
  424. }).catch(() => {
  425. })
  426. } else {
  427. this.$confirm('是否退费', '退费', {
  428. confirmButtonText: '确 定',
  429. cancelButtonText: '取 消',
  430. type: 'warning'
  431. }).then(() => {
  432. let params = {
  433. 'order_id': this.order.id,
  434. 'patient_id': this.patientInfo.id,
  435. 'record_time': this.record_date
  436. };
  437. Refund(params).then(response => {
  438. if (response.data.state == 0) {
  439. this.$message.error(response.data.msg);
  440. return false
  441. } else {
  442. this.$message({message: '退费成功', type: 'success'});
  443. this.getHisOrderList()
  444. }
  445. })
  446. }).catch(() => {
  447. })
  448. }
  449. },
  450. toPrint(row) {
  451. if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138)){
  452. this.statementVisible9504 = true;
  453. let obj = {
  454. order_id: row.id,
  455. patient_id: row.patient_id,
  456. record_time: this.getTimes(row.settle_accounts_date),
  457. admin_user_id: this.$store.getters.xt_user.user.id,
  458. };
  459. this.orderObj9504 = obj
  460. } else {
  461. this.statementVisible = true;
  462. let obj = {
  463. order_id: row.id,
  464. settle_type:row.settle_type,
  465. start_time:row.settle_start_time,
  466. end_time:row.settle_end_time,
  467. };
  468. this.orderObj = obj
  469. }
  470. },
  471. settlementPrint(){
  472. this.settlementVisible = true
  473. },
  474. export_detail() {
  475. let params = {
  476. start_time: this.start_time,
  477. end_time: this.end_time,
  478. p_type: 1,
  479. };
  480. getExportConsumeDetailList(params).then(response => {
  481. if (response.data.state == 0) {
  482. this.$message.error(response.data.msg);
  483. return false
  484. } else {
  485. let list = [];
  486. for (let i = 0; i < response.data.data.order.length; i++) {
  487. let order = response.data.data.order[i];
  488. let number = '';
  489. let name = '';
  490. let department = '';
  491. let doctor_name = '';
  492. let balance_accounts = '';
  493. let order_status = '';
  494. if (order.his_patient != null && order.his_patient.number.length > 0) {
  495. number = order.his_patient.number
  496. }
  497. if (order.his_patient != null) {
  498. if (order.his_patient.balance_accounts_type == 1) {
  499. balance_accounts = '自费'
  500. }
  501. if (order.his_patient.balance_accounts_type == 2) {
  502. balance_accounts = '医保'
  503. }
  504. }
  505. if (order.patient != null && order.patient.name.length > 0) {
  506. name = order.patient.name
  507. }
  508. if (order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0) {
  509. department = order.p_info.department.name
  510. }
  511. if (order.p_info != null && order.p_info.doctor.length > 0) {
  512. doctor_name = order.p_info.doctor
  513. }
  514. if (order.creator != null) {
  515. charge_name = this.getName(order.creator)
  516. }
  517. if (order.order_status == 1) {
  518. order_status = '待结算'
  519. }
  520. if (order.order_status == 2) {
  521. order_status = '已结算'
  522. }
  523. if (order.order_status == 3) {
  524. order_status = '已退费'
  525. }
  526. let obj = {
  527. '就诊号': number,
  528. '患者姓名': name,
  529. '应收金额': order.medfee_sumamt,
  530. '实收金额': order.psn_cash_pay,
  531. '医保统筹金额': order.fund_pay_sumamt,
  532. '大额基金金额': order.hifob_pay,
  533. '大病基金金额': order.hifmi_pay,
  534. '补充保险基金金额': order.hifes_pay,
  535. '医疗救助基金金额': order.maf_pay,
  536. '公务员基金': order.cvlserv_pay,
  537. '个人支付基金': order.psn_cash_pay,
  538. '个人账户支付金额': order.acct_pay,
  539. '科室': department,
  540. '医生姓名': doctor_name,
  541. '收费类别': balance_accounts,
  542. '收费者姓名': charge_name,
  543. '总金额': order.medfee_sumamt,
  544. '现金支付': '',
  545. '账户支付': '',
  546. '支付宝支付': '',
  547. '微信支付': '',
  548. '其他支付': '',
  549. '收费时间': order.setl_time,
  550. '收费状态': order_status,
  551. '退费日期': ''
  552. };
  553. list.push(obj)
  554. }
  555. import('@/vendor/Export2Excel').then(excel => {
  556. const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
  557. const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
  558. const data = this.formatJson(filterVal, list);
  559. excel.export_json_to_excel({
  560. header: tHeader,
  561. data,
  562. filename: '消费明细'
  563. })
  564. })
  565. }
  566. })
  567. }, formatJson(filterVal, jsonData) {
  568. return jsonData.map(v => filterVal.map(j => v[j]))
  569. },
  570. changeDoctor() {
  571. this.page = 1;
  572. this.keywords = '';
  573. this.getHisOrderList()
  574. },
  575. handleSizeChange(limit) {
  576. this.limit = limit;
  577. this.getHisOrderList()
  578. }, handleCurrentChange(page) {
  579. this.page = page;
  580. this.getHisOrderList()
  581. },
  582. handleStartTimeChange() {
  583. this.page = 1;
  584. this.keywords = '';
  585. this.getHisOrderList()
  586. }, handleEndTimeChange() {
  587. this.page = 1;
  588. this.keywords = '';
  589. this.getHisOrderList()
  590. },
  591. searchAction() {
  592. this.page = 1;
  593. this.getHisOrderList()
  594. },
  595. getTimes(time) {
  596. return uParseTime(time, '{y}-{m}-{d}')
  597. },
  598. toDetail(row) {
  599. this.$router.push('/outpatientCharges/summaryDetail?patient_id=' + row.patient.id + '&number=' + row.number + '&id=' + row.id)
  600. }, getTime(value, temp) {
  601. if (value != undefined) {
  602. return uParseTime(value, temp)
  603. }
  604. return ''
  605. }, getHisOrderList() {
  606. let params = {
  607. page: this.page,
  608. limit: this.limit,
  609. keywords: this.keywords,
  610. start_time: this.start_time,
  611. end_time: this.end_time,
  612. type: this.admin_user_id,
  613. p_type: 1,
  614. };
  615. getHisOrderList(params).then(response => {
  616. if (response.data.state == 0) {
  617. this.$message.error(response.data.msg);
  618. return false
  619. } else {
  620. this.tableData = response.data.data.order;
  621. this.total = response.data.data.total
  622. }
  623. })
  624. }, getDoctorList() {
  625. getDoctorList().then(response => {
  626. if (response.data.state == 0) {
  627. this.$message.error(response.data.msg);
  628. return false
  629. } else {
  630. this.doctors = response.data.data.doctors
  631. }
  632. })
  633. },
  634. open(index) {
  635. if (index == 1) {
  636. this.listVisible = true
  637. } else if (index == 2) {
  638. this.allListVisible = true
  639. }
  640. },
  641. invoicePrint(obj){
  642. let paramsObj = {
  643. order_id: obj.id,
  644. patient_id: obj.patient_id,
  645. name:obj.patient.name,
  646. age:obj.age,
  647. gend:obj.gend,
  648. setl_time:obj.setl_time
  649. };
  650. this.invoiceParams = paramsObj;
  651. this.invoiceVisible = true
  652. }
  653. }, created() {
  654. this.fetchAllAdminUsers();
  655. this.getDoctorList();
  656. this.getHisOrderList()
  657. }
  658. }
  659. </script>