summary.vue 43KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379
  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
  8. style="
  9. display: flex;
  10. justify-content: space-between;
  11. margin-bottom: 10px;
  12. "
  13. >
  14. <div>
  15. <el-input
  16. size="small"
  17. style="width: 150px"
  18. v-model="keywords"
  19. class="filter-item"
  20. />
  21. <el-button
  22. size="small"
  23. style="margin-left: 10px"
  24. class="filter-item"
  25. type="primary"
  26. @click="searchAction"
  27. >
  28. 搜索
  29. </el-button>
  30. <el-select
  31. size="small"
  32. v-model="sort_type"
  33. placeholder="请选择"
  34. style="width: 150px; margin-left: 10px"
  35. @change="changeSortType"
  36. >
  37. <el-option
  38. v-for="(item, index) in sort_types"
  39. :key="index"
  40. :label="item.label"
  41. :value="item.value"
  42. >
  43. </el-option>
  44. </el-select>
  45. <el-select
  46. size="small"
  47. v-model="p_type"
  48. placeholder="请选择"
  49. style="width: 150px; margin-left: 10px"
  50. @change="changePType"
  51. >
  52. <el-option
  53. v-for="(item, index) in p_types"
  54. :key="index"
  55. :label="item.label"
  56. :value="item.value"
  57. >
  58. </el-option>
  59. </el-select>
  60. <el-select
  61. size="small"
  62. v-model="charge_type"
  63. placeholder="请选择"
  64. style="width: 150px; margin-left: 10px"
  65. @change="changeChargeType"
  66. >
  67. <el-option
  68. v-for="(item, index) in charge_types"
  69. :key="index"
  70. :label="item.label"
  71. :value="item.value"
  72. >
  73. </el-option>
  74. </el-select>
  75. <el-date-picker
  76. size="small"
  77. v-model="start_time"
  78. prefix-icon="el-icon-date"
  79. @change="handleStartTimeChange"
  80. :editable="false"
  81. :clearable="false"
  82. style="width: 196px; margin-right: 10px"
  83. type="date"
  84. placeholder="选择开始日期"
  85. format="yyyy-MM-dd"
  86. value-format="yyyy-MM-dd"
  87. align="right"
  88. ></el-date-picker>
  89. <el-date-picker
  90. size="small"
  91. v-model="end_time"
  92. prefix-icon="el-icon-date"
  93. @change="handleEndTimeChange"
  94. :editable="false"
  95. :clearable="false"
  96. style="width: 196px; margin-right: 10px"
  97. type="date"
  98. placeholder="选择结束日期"
  99. format="yyyy-MM-dd"
  100. value-format="yyyy-MM-dd"
  101. align="right"
  102. ></el-date-picker>
  103. <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
  104. <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
  105. </div>
  106. <div>
  107. <!-- <el-popover
  108. placement="bottom"
  109. width="210"
  110. trigger="click">
  111. <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
  112. <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
  113. <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
  114. </el-popover> -->
  115. <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
  116. <el-button size="small" type="primary" @click="batch_print_settle" v-if="$store.getters.xt_user.org_id == 10215">批量打印结算单</el-button>
  117. </div>
  118. </div>
  119. <el-table
  120. :data="tableData"
  121. border
  122. style="width: 100%"
  123. :row-style="{ color: '#303133' }"
  124. :header-cell-style="{
  125. backgroundColor: 'rgb(245, 247, 250)',
  126. color: '#606266',
  127. }"
  128. @selection-change="handleSelectionChange"
  129. highlight-current-row
  130. >
  131. <el-table-column
  132. prop="date"
  133. width="60"
  134. align="center"
  135. type="selection"
  136. >
  137. </el-table-column>
  138. <el-table-column
  139. prop="date"
  140. label="序号"
  141. width="60"
  142. align="center"
  143. type="index"
  144. >
  145. </el-table-column>
  146. <el-table-column align="center" prop="name" label="就诊号">
  147. <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
  148. </el-table-column>
  149. <el-table-column align="center" prop="name" label="患者名字">
  150. <template slot-scope="scope">{{ scope.row.patient.name }}</template>
  151. </el-table-column>
  152. <!--<el-table-column align="center" prop="name" label="患者类型">-->
  153. <!--<template slot-scope="scope"></template>-->
  154. <!--</el-table-column>-->
  155. <el-table-column align="center" prop="name" label="应收金额">
  156. <template slot-scope="scope">{{
  157. scope.row.medfee_sumamt.toFixed(2)
  158. }}</template>
  159. </el-table-column>
  160. <el-table-column align="center" prop="name" label="实收金额">
  161. <template slot-scope="scope">{{
  162. scope.row.reality_price.toFixed(2)
  163. }}</template>
  164. </el-table-column>
  165. <el-table-column align="center" prop="name" label="科室">
  166. <template slot-scope="scope">{{
  167. scope.row.department_name
  168. }}</template>
  169. </el-table-column>
  170. <el-table-column align="center" prop="name" label="收费日期">
  171. <template slot-scope="scope">
  172. <div>{{ scope.row.setl_time }}</div>
  173. </template>
  174. </el-table-column>
  175. <el-table-column align="center" prop="name" label="收费员">
  176. <template slot-scope="scope">{{
  177. getName(scope.row.creator)
  178. }}</template>
  179. </el-table-column>
  180. <el-table-column align="center" prop="name" label="状态">
  181. <template slot-scope="scope">
  182. <div v-if="scope.row.order_status == 1">待结算</div>
  183. <div v-if="scope.row.order_status == 2">已结算</div>
  184. <div v-if="scope.row.order_status == 3">已退费</div>
  185. </template>
  186. </el-table-column>
  187. <el-table-column align="center" prop="name" label="操作">
  188. <template slot-scope="scope">
  189. <el-button size="mini" type="primary" @click="toDetail(scope.row)"
  190. >详情</el-button
  191. >
  192. <el-button size="mini" type="primary" @click="toPrint(scope.row)">
  193. 结算单
  194. </el-button>
  195. <!-- <el-button size="mini" type="primary" @click="toRefund(scope.row)">-->
  196. <!-- 退费-->
  197. <!-- </el-button>-->
  198. <el-button
  199. size="mini"
  200. type="primary"
  201. @click="uploadInfo(scope.row)"
  202. v-if="
  203. scope.row.order_status == 2 &&
  204. scope.row.result.id == 0 &&
  205. p_type == 1
  206. "
  207. >
  208. 上传结算清单
  209. </el-button>
  210. <el-button
  211. size="mini"
  212. type="primary"
  213. @click="uploadOtherInfo(scope.row)"
  214. v-if="
  215. scope.row.order_status == 2 &&
  216. scope.row.result.id == 0 &&
  217. p_type == 2
  218. "
  219. >
  220. 上传结算清单
  221. </el-button>
  222. <el-button
  223. size="mini"
  224. type="primary"
  225. @click="confirmUploadInfo(scope.row)"
  226. v-if="$store.getters.xt_user.org_id == 10265 || $store.getters.xt_user.org_id == 10210"
  227. >
  228. 确认结算清单
  229. </el-button>
  230. <el-button
  231. size="mini"
  232. type="primary"
  233. @click="cancelUploadTwo(scope.row)"
  234. v-if="$store.getters.xt_user.org_id == 10265"
  235. >
  236. 取消结算清单
  237. </el-button>
  238. <el-button
  239. size="mini"
  240. type="primary"
  241. @click="queryData(scope.row)"
  242. v-if="$store.getters.xt_user.org_id == 10265"
  243. >
  244. 查询结算清单
  245. </el-button>
  246. <el-button
  247. size="mini"
  248. type="primary"
  249. @click="invoicePrint(scope.row)"
  250. >打印发票</el-button
  251. >
  252. <el-button
  253. size="mini"
  254. type="primary"
  255. @click="shouJuPrint(scope.row)"
  256. >打印收据</el-button
  257. >
  258. <!-- <el-button size="mini" type="primary" @click="refundOne(scope.row)">-->
  259. <!-- 撤销出院-->
  260. <!-- </el-button>-->
  261. <!--<el-button size="mini" type="primary" @click="refundTwo(scope.row)" v-if="scope.row.his_hospital_patient.balance_accounts_type == 2">-->
  262. <!--撤销明细-->
  263. <!--</el-button>-->
  264. <!-- <el-button size="mini" type="primary" @click="refundTwo(scope.row)" v-if="scope.row.his_hospital_patient.balance_accounts_type != 2">-->
  265. <!-- 撤销明细-->
  266. <!-- </el-button>-->
  267. <!-- <el-button size="mini" type="primary" @click="refundThee(scope.row)">-->
  268. <!-- 撤销入院-->
  269. <!-- </el-button>-->
  270. </template>
  271. </el-table-column>
  272. </el-table>
  273. <el-pagination
  274. @size-change="handleSizeChange"
  275. @current-change="handleCurrentChange"
  276. :page-sizes="[10, 50, 100]"
  277. :page-size="10"
  278. :current-page.sync="page"
  279. background
  280. style="margin-top: 20px; float: right"
  281. layout="total, sizes, prev, pager, next, jumper"
  282. :total="total"
  283. >
  284. </el-pagination>
  285. </div>
  286. <el-dialog
  287. class="centerDialog"
  288. width="1200px"
  289. title="打印"
  290. :visible.sync="statementVisible"
  291. >
  292. <statementPrint ref="print" :paramsObj="orderObj"></statementPrint>
  293. <!-- <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>-->
  294. <!-- <state-->
  295. </el-dialog>
  296. <el-dialog
  297. class="centerDialog"
  298. width="900px"
  299. title="打印"
  300. :visible.sync="listVisible"
  301. >
  302. <listPrint></listPrint>
  303. </el-dialog>
  304. <el-dialog
  305. class="centerDialog"
  306. width="900px"
  307. title="打印"
  308. :visible.sync="allListVisible"
  309. >
  310. <allListPrint :paramsObj="paramsObj"></allListPrint>
  311. </el-dialog>
  312. <el-dialog
  313. class="centerDialog"
  314. width="1200px"
  315. title="打印"
  316. :visible.sync="statementVisible9504"
  317. >
  318. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  319. <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
  320. <new-statement-print-two
  321. ref="print"
  322. :paramsObj="orderObj9504"
  323. ></new-statement-print-two>
  324. </el-dialog>
  325. <el-dialog
  326. class="centerDialog"
  327. width="1200px"
  328. title="打印"
  329. :visible.sync="invoiceVisible"
  330. destroy-on-close
  331. >
  332. <invoicePrint ref="print" :invoiceParams="invoiceParams"></invoicePrint>
  333. </el-dialog>
  334. <el-dialog
  335. class="centerDialog"
  336. width="1200px"
  337. title="打印"
  338. :visible.sync="shouJuVisible"
  339. >
  340. <!-- <invoicePrint ref="print" :invoiceParams='invoiceParams'></invoicePrint>-->
  341. <!-- <shou-ju-print></shou-ju-print>-->
  342. <shou-ju-print
  343. ref="shouJuPrint"
  344. :invoiceParams="invoiceParams"
  345. ></shou-ju-print>
  346. </el-dialog>
  347. <!-- <el-dialog
  348. class="centerDialog"
  349. width="1200px"
  350. title="打印"
  351. :visible.sync="settlementVisible">
  352. <settlement-print ref="print" :paramsObj='orderObj'></settlement-print>
  353. </el-dialog> -->
  354. <el-dialog
  355. class="centerDialog"
  356. width="1200px"
  357. title="打印"
  358. :visible.sync="batchStatementVisible"
  359. >
  360. <hospital-batch-statement-print
  361. ref="hospital_batch_print" :paramsObj="batchParams"
  362. >
  363. </hospital-batch-statement-print>
  364. </el-dialog>
  365. </div>
  366. </template>
  367. <script>
  368. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  369. import {
  370. getDoctorList,
  371. getExportConsumeDetailList,
  372. getHisOrderList,
  373. HopitalunRefund,
  374. Refund,
  375. Outhopitaluncheck,
  376. Inthopitaluncheck,
  377. } from "@/api/his/his";
  378. import { uParseTime } from "@/utils/tools";
  379. import NewStatementPrint from "./newStatementPrint";
  380. import listPrint from "./listPrint";
  381. import allListPrint from "./allListPrint";
  382. import NewStatementPrintTwo from "./newStatementPrintTwo";
  383. import { fetchAllAdminUsers } from "@/api/doctor";
  384. import axios from "axios";
  385. import invoicePrint from "./invoicePrint";
  386. import statementPrint from "./statementPrint";
  387. import ShouJuPrint from "./shouJuPrint";
  388. import BatchStatementPrint from '../outpatientCharges/batchStatementPrint.vue'
  389. import HospitalBatchStatementPrint from './hospitalBatchStatementPrint.vue'
  390. // import settlementPrint from './settlementPrint'
  391. export default {
  392. components: {
  393. HospitalBatchStatementPrint,
  394. BatchStatementPrint,
  395. ShouJuPrint,
  396. NewStatementPrintTwo,
  397. NewStatementPrint,
  398. BreadCrumb,
  399. listPrint,
  400. allListPrint,
  401. statementPrint,
  402. invoicePrint,
  403. // settlementPrint
  404. },
  405. data() {
  406. return {
  407. batchParams:{},
  408. selecting_schs:[],
  409. batchStatementVisible:false,
  410. loading1: true,
  411. orderObj: {},
  412. statementVisible: false,
  413. statementVisible9504: false,
  414. orderObj9504: {},
  415. crumbs: [
  416. { path: false, name: "住院收费" },
  417. { path: false, name: "项目消费明细汇总" },
  418. ],
  419. tableData: [],
  420. limit: 10,
  421. page: 1,
  422. keywords: "",
  423. start_time: "",
  424. end_time: "",
  425. total: "",
  426. doctors: [],
  427. admin_user_id: "",
  428. listVisible: false,
  429. allListVisible: false,
  430. adminUserOptions: [],
  431. invoiceVisible: false,
  432. paramsObj: {},
  433. invoiceParams: {},
  434. settlementVisible: false,
  435. sort_type: 1,
  436. p_type: 1,
  437. charge_type: 0,
  438. sort_types: [
  439. { value: 1, label: "处方时间" },
  440. { value: 2, label: "结算时间" },
  441. ],
  442. p_types: [
  443. { value: 0, label: "全部" },
  444. { value: 1, label: "住院" },
  445. { value: 2, label: "门诊" },
  446. ],
  447. charge_types: [
  448. { value: 0, label: "全部" },
  449. { value: 1, label: "医保" },
  450. { value: 2, label: "自费" },
  451. ],
  452. shouJuVisible: false,
  453. };
  454. },
  455. //判断列表页是否刷新
  456. beforeRouteEnter(to, from, next) {
  457. console.log(from, "beforeRouteEnter");
  458. if (from.path == "/outpatientCharges/summaryDetail") {
  459. next((vm) => {
  460. vm.page = vm.$store.getters.pagedata.list.page;
  461. vm.limit = vm.$store.getters.pagedata.list.limit;
  462. vm.keywords = vm.$store.getters.pagedata.list.keywords;
  463. vm.start_time = vm.$store.getters.pagedata.list.start_time;
  464. vm.end_time = vm.$store.getters.pagedata.list.end_time;
  465. vm.admin_user_id = vm.$store.getters.pagedata.list.admin_user_id;
  466. vm.p_type = vm.$store.getters.pagedata.list.p_type;
  467. vm.sort_type = vm.$store.getters.pagedata.list.sort_type;
  468. setTimeout(() => {
  469. vm.getHisOrderList();
  470. }, 300);
  471. });
  472. } else {
  473. next();
  474. }
  475. },
  476. beforeRouteLeave(to, from, next) {
  477. if (to.path == "/outpatientCharges/summaryDetail") {
  478. console.log(to.path, "路由跳转判断");
  479. this.setStorage();
  480. next();
  481. } else {
  482. next();
  483. }
  484. },
  485. methods: {
  486. handleSelectionChange(val) {
  487. this.selecting_schs = val
  488. },
  489. confirmUploadInfo(row){
  490. if(this.$store.getters.xt_user.org_id == 10265) {
  491. var that = this;
  492. axios
  493. .get("http://127.0.0.1:9532/api/4102", {
  494. params: {
  495. order_id: row.id,
  496. admin_user_id: this.$store.getters.xt_user.user.id,
  497. stas_type: 1
  498. },
  499. })
  500. .then(function(response) {
  501. if (response.data.state == 0) {
  502. that.$message.error(response.data.msg);
  503. return false;
  504. } else {
  505. if (response.data.data.failed_code == -10) {
  506. that
  507. .$confirm(response.data.data.msg, "医保错误信息", {
  508. confirmButtonText: "确 定",
  509. type: "warning",
  510. })
  511. .then(() => {
  512. })
  513. .catch(() => {
  514. });
  515. } else {
  516. that.$message.success("确认成功");
  517. row.result.id = response.data.data.result.id;
  518. }
  519. }
  520. })
  521. .catch(function(error) {
  522. });
  523. }else{
  524. var that = this;
  525. axios
  526. .get("http://127.0.0.1:9532/api/comfirm/upload", {
  527. params: {
  528. order_id: row.id,
  529. admin_user_id: this.$store.getters.xt_user.user.id,
  530. stas_type: 1
  531. },
  532. })
  533. .then(function(response) {
  534. if (response.data.state == 0) {
  535. that.$message.error(response.data.msg);
  536. return false;
  537. } else {
  538. if (response.data.data.failed_code == -10) {
  539. that
  540. .$confirm(response.data.data.msg, "医保错误信息", {
  541. confirmButtonText: "确 定",
  542. type: "warning",
  543. })
  544. .then(() => {
  545. })
  546. .catch(() => {
  547. });
  548. } else {
  549. that.$message.success("确认成功");
  550. row.result.id = response.data.data.result.id;
  551. }
  552. }
  553. })
  554. .catch(function(error) {
  555. });
  556. }
  557. },
  558. cancelUploadTwo(row){
  559. if(this.$store.getters.xt_user.org_id == 10265){
  560. var that = this;
  561. axios
  562. .get("http://127.0.0.1:9532/api/4102", {
  563. params: {
  564. order_id: row.id,
  565. admin_user_id: this.$store.getters.xt_user.user.id,
  566. stas_type: 0
  567. },
  568. })
  569. .then(function (response) {
  570. if (response.data.state == 0) {
  571. that.$message.error(response.data.msg);
  572. return false;
  573. } else {
  574. if (response.data.data.failed_code == -10) {
  575. // that.$message.error(response.data.data.msg)
  576. that
  577. .$confirm(response.data.data.msg, "医保错误信息", {
  578. confirmButtonText: "确 定",
  579. type: "warning",
  580. })
  581. .then(() => {
  582. })
  583. .catch(() => {
  584. });
  585. } else {
  586. that.$message.success("撤销成功");
  587. row.result.id = 0;
  588. }
  589. }
  590. })
  591. .catch(function (error) {
  592. });
  593. }
  594. },
  595. queryData(row){
  596. var that = this;
  597. axios
  598. .get("http://127.0.0.1:9532/api/4103", {
  599. params: {
  600. order_id: row.id,
  601. admin_user_id: this.$store.getters.xt_user.user.id,
  602. },
  603. })
  604. .then(function (response) {
  605. if (response.data.state == 0) {
  606. that.$message.error(response.data.msg);
  607. return false;
  608. } else {
  609. if (response.data.data.failed_code == -10) {
  610. that
  611. .$confirm(response.data.data.msg, "医保错误信息", {
  612. confirmButtonText: "确 定",
  613. type: "warning",
  614. })
  615. .then(() => {
  616. })
  617. .catch(() => {
  618. });
  619. } else {
  620. that
  621. .$confirm(response.data.data.msg, "医保信息", {
  622. confirmButtonText: "确 定",
  623. })
  624. .then(() => {
  625. })
  626. .catch(() => {
  627. });
  628. }
  629. }
  630. })
  631. .catch(function (error) {
  632. });
  633. },
  634. setStorage() {
  635. this.$store.commit("SET_PAGEDATA", {
  636. page: this.page,
  637. limit: this.limit,
  638. keywords: this.keywords,
  639. start_time: this.start_time,
  640. end_time: this.end_time,
  641. type: this.admin_user_id || "",
  642. p_type: this.p_type,
  643. sort_type: this.sort_type,
  644. });
  645. },
  646. uploadOtherInfo(row) {
  647. var that = this;
  648. axios
  649. .get("http://127.0.0.1:9532/api/settlelist/get", {
  650. params: {
  651. order_id: row.id,
  652. admin_user_id: this.$store.getters.xt_user.user.id,
  653. },
  654. })
  655. .then(function (response) {
  656. if (response.data.state == 0) {
  657. that.$message.error(response.data.msg);
  658. return false;
  659. } else {
  660. if (response.data.data.failed_code == -10) {
  661. // that.$message.error(response.data.data.msg)
  662. that
  663. .$confirm(response.data.data.msg, "医保错误信息", {
  664. confirmButtonText: "确 定",
  665. type: "warning",
  666. })
  667. .then(() => {})
  668. .catch(() => {});
  669. } else {
  670. that.$message.success("上传成功");
  671. row.result.id = response.data.data.result.id;
  672. }
  673. }
  674. })
  675. .catch(function (error) {});
  676. },
  677. changeChargeType() {
  678. this.page = 1;
  679. this.keywords = "";
  680. this.getHisOrderList();
  681. },
  682. changePType() {
  683. this.page = 1;
  684. this.keywords = "";
  685. this.getHisOrderList();
  686. },
  687. changeSortType() {
  688. this.page = 1;
  689. this.keywords = "";
  690. this.getHisOrderList();
  691. },
  692. refundOne(row) {
  693. if (row.his_hospital_patient.balance_accounts_type == 2) {
  694. var that = this;
  695. this.$confirm("是否撤销出院", "撤销出院", {
  696. confirmButtonText: "确 定",
  697. cancelButtonText: "取 消",
  698. type: "warning",
  699. })
  700. .then(() => {
  701. let params = {
  702. id: row.his_hospital_patient.id,
  703. admin_user_id: this.$store.getters.xt_user.user.id,
  704. };
  705. Outhopitaluncheck(params).then((response) => {
  706. if (response.data.state == 0) {
  707. this.$message.error(response.data.msg);
  708. return false;
  709. } else {
  710. this.$message.success("撤销出院成功");
  711. this.changeRadioAndPatient(1);
  712. }
  713. });
  714. })
  715. .catch(() => {});
  716. } else {
  717. var that = this;
  718. this.$confirm("是否撤销出院", "撤销出院", {
  719. confirmButtonText: "确 定",
  720. cancelButtonText: "取 消",
  721. type: "warning",
  722. })
  723. .then(() => {
  724. let params = {
  725. id: row.his_hospital_patient.id,
  726. admin_user_id: this.$store.getters.xt_user.user.id,
  727. };
  728. axios
  729. .get("http://127.0.0.1:9532/zh/api/outhopitaluncheck/get", {
  730. params: params,
  731. })
  732. .then(function (response) {
  733. if (response.data.state == 0) {
  734. that.$message.error(response.data.msg);
  735. return false;
  736. } else {
  737. if (response.data.data.failed_code == -10) {
  738. // that.$message.error(response.data.data.msg)
  739. that
  740. .$confirm(response.data.data.msg, "医保错误信息", {
  741. confirmButtonText: "确 定",
  742. type: "warning",
  743. })
  744. .then(() => {})
  745. .catch(() => {});
  746. } else {
  747. that.$message({
  748. message: "撤销出院成功",
  749. type: "success",
  750. duration: 5000,
  751. });
  752. }
  753. }
  754. })
  755. .catch(function (error) {});
  756. })
  757. .catch(() => {});
  758. }
  759. },
  760. refundThee(row) {
  761. if (row.his_hospital_patient.balance_accounts_type == 2) {
  762. this.$confirm("是否撤销入院", "撤销入院", {
  763. confirmButtonText: "确 定",
  764. cancelButtonText: "取 消",
  765. type: "warning",
  766. })
  767. .then(() => {
  768. let params = {
  769. id: row.his_hospital_patient.id,
  770. admin_user_id: this.$store.getters.xt_user.user.id,
  771. };
  772. Inthopitaluncheck(params).then((response) => {
  773. if (response.data.state == 0) {
  774. this.$message.error(response.data.msg);
  775. return false;
  776. } else {
  777. this.$message.success("撤销入院成功");
  778. }
  779. });
  780. })
  781. .catch(() => {});
  782. } else {
  783. var that = this;
  784. this.$confirm("是否撤销入院", "撤销入院", {
  785. confirmButtonText: "确 定",
  786. cancelButtonText: "取 消",
  787. type: "warning",
  788. })
  789. .then(() => {
  790. let params = {
  791. id: row.his_hospital_patient.id,
  792. admin_user_id: this.$store.getters.xt_user.user.id,
  793. };
  794. axios
  795. .get("http://127.0.0.1:9532/zh/api/inthopitaluncheck/get", {
  796. params: params,
  797. })
  798. .then(function (response) {
  799. if (response.data.state == 0) {
  800. that.$message.error(response.data.msg);
  801. return false;
  802. } else {
  803. if (response.data.data.failed_code == -10) {
  804. // that.$message.error(response.data.data.msg)
  805. that
  806. .$confirm(response.data.data.msg, "医保错误信息", {
  807. confirmButtonText: "确 定",
  808. type: "warning",
  809. })
  810. .then(() => {})
  811. .catch(() => {});
  812. } else {
  813. that.changeRadioAndPatient(1);
  814. that.$message({
  815. message: "撤销入院成功",
  816. type: "success",
  817. duration: 5000,
  818. });
  819. }
  820. }
  821. })
  822. .catch(function (error) {});
  823. })
  824. .catch(() => {});
  825. }
  826. },
  827. refundTwo(row) {
  828. var that = this;
  829. this.$confirm("是否撤销明细", "撤销明细", {
  830. confirmButtonText: "确 定",
  831. cancelButtonText: "取 消",
  832. type: "warning",
  833. })
  834. .then(() => {
  835. let params = {
  836. order_id: row.id,
  837. admin_user_id: this.$store.getters.xt_user.user.id,
  838. };
  839. axios
  840. .get("http://127.0.0.1:9532/zh/api/refunddetail", {
  841. params: params,
  842. })
  843. .then(function (response) {
  844. if (response.data.state == 0) {
  845. that.$message.error(response.data.msg);
  846. that.loadingtwo = false;
  847. return false;
  848. } else {
  849. if (response.data.data.failed_csuode == -10) {
  850. // that.$message.error(response.data.data.msg)
  851. that
  852. .$confirm(response.data.data.msg, "医保错误信息", {
  853. confirmButtonText: "确 定",
  854. type: "warning",
  855. })
  856. .then(() => {})
  857. .catch(() => {});
  858. } else {
  859. that.$message.success("撤销明细成功");
  860. that.changeRadioAndPatient(1);
  861. }
  862. }
  863. })
  864. .catch(function (error) {});
  865. })
  866. .catch(() => {});
  867. },
  868. uploadInfo(row) {
  869. var that = this;
  870. axios
  871. .get("http://127.0.0.1:9532/api/settlelisthosptial/get", {
  872. params: {
  873. order_id: row.id,
  874. admin_user_id: this.$store.getters.xt_user.user.id,
  875. },
  876. })
  877. .then(function (response) {
  878. if (response.data.state == 0) {
  879. that.$message.error(response.data.msg);
  880. return false;
  881. } else {
  882. if (response.data.data.failed_code == -10) {
  883. // that.$message.error(response.data.data.msg)
  884. that
  885. .$confirm(response.data.data.msg, "医保错误信息", {
  886. confirmButtonText: "确 定",
  887. type: "warning",
  888. })
  889. .then(() => {})
  890. .catch(() => {});
  891. } else {
  892. that.$message.success("上传成功");
  893. row.result.id = response.data.data.result.id;
  894. }
  895. }
  896. })
  897. .catch(function (error) {});
  898. },
  899. fetchAllAdminUsers() {
  900. fetchAllAdminUsers().then((response) => {
  901. if (response.data.state == 1) {
  902. this.adminUserOptions = response.data.data.users;
  903. }
  904. });
  905. },
  906. getName(admin_user_id) {
  907. for (let i = 0; i < this.adminUserOptions.length; i++) {
  908. if (this.adminUserOptions[i].id == admin_user_id) {
  909. return this.adminUserOptions[i].name;
  910. }
  911. }
  912. },
  913. toRefund(row) {
  914. console.log("~~~~~~~");
  915. if (row.his_hospital_patient.balance_accounts_type != 2) {
  916. var that = this;
  917. this.$confirm("是否退费", "退费", {
  918. confirmButtonText: "确 定",
  919. cancelButtonText: "取 消",
  920. type: "warning",
  921. })
  922. .then(() => {
  923. let params = {
  924. order_id: row.id,
  925. admin_user_id: this.$store.getters.xt_user.user.id,
  926. };
  927. axios
  928. .get("http://127.0.0.1:9532/zh/api/refund", {
  929. params: params,
  930. })
  931. .then(function (response) {
  932. if (response.data.state == 0) {
  933. that.$message.error(response.data.msg);
  934. return false;
  935. } else {
  936. if (response.data.data.failed_code == -10) {
  937. that
  938. .$confirm(response.data.data.msg, "医保错误信息", {
  939. confirmButtonText: "确 定",
  940. type: "warning",
  941. })
  942. .then(() => {})
  943. .catch(() => {});
  944. } else {
  945. that.$message({
  946. message: "退费成功",
  947. type: "success",
  948. duration: 5000,
  949. });
  950. that.getHisOrderList();
  951. }
  952. }
  953. })
  954. .catch(function (error) {});
  955. })
  956. .catch(() => {});
  957. } else {
  958. this.$confirm("是否退费", "退费", {
  959. confirmButtonText: "确 定",
  960. cancelButtonText: "取 消",
  961. type: "warning",
  962. })
  963. .then(() => {
  964. let params = {
  965. order_id: row.id,
  966. };
  967. HopitalunRefund(params).then((response) => {
  968. if (response.data.state == 0) {
  969. this.$message.error(response.data.msg);
  970. return false;
  971. } else {
  972. this.$message({ message: "退费成功", type: "success" });
  973. this.getHisOrderList();
  974. }
  975. });
  976. })
  977. .catch(() => {});
  978. }
  979. },
  980. toPrint(row) {
  981. console.log(row);
  982. if (
  983. this.$store.getters.xt_user.org_id == 9504 ||
  984. this.$store.getters.xt_user.org_id == 10028 ||
  985. (row.order_status == 2 &&
  986. this.$store.getters.xt_user.org_id == 10138) ||
  987. (row.order_status == 2 && this.$store.getters.xt_user.org_id == 10278)
  988. ) {
  989. this.statementVisible9504 = true;
  990. let obj = {
  991. order_id: row.id,
  992. patient_id: row.patient_id,
  993. record_time: this.getTimes(row.settle_accounts_date),
  994. admin_user_id: this.$store.getters.xt_user.user.id,
  995. };
  996. this.orderObj9504 = obj;
  997. } else {
  998. this.statementVisible = true;
  999. let obj = {
  1000. order_id: row.id,
  1001. balance_accounts_type: row.his_hospital_patient.balance_accounts_type,
  1002. start_time: row.settle_start_time,
  1003. end_time: row.settle_end_time,
  1004. };
  1005. console.log(obj);
  1006. this.orderObj = obj;
  1007. console.log(this.orderObj);
  1008. }
  1009. },
  1010. settlementPrint() {
  1011. this.settlementVisible = true;
  1012. },batch_print_settle(){
  1013. if (this.selecting_schs.length === 0) {
  1014. this.$message.error('请至少选择一条需要打印的内容')
  1015. return false
  1016. } else {
  1017. var sch_ids = []
  1018. for (let index = 0; index < this.selecting_schs.length; index++) {
  1019. sch_ids.push(this.selecting_schs[index].id)
  1020. }
  1021. this.batchStatementVisible = true;
  1022. let params = {
  1023. order_ids: sch_ids.join(","),
  1024. admin_user_id: this.$store.getters.xt_user.user.id,
  1025. };
  1026. this.batchParams = params
  1027. }
  1028. }, export_detail() {
  1029. let params = {
  1030. start_time: this.start_time,
  1031. end_time: this.end_time,
  1032. p_type: this.p_type,
  1033. };
  1034. getExportConsumeDetailList(params).then((response) => {
  1035. if (response.data.state == 0) {
  1036. this.$message.error(response.data.msg);
  1037. return false;
  1038. } else {
  1039. let list = [];
  1040. for (let i = 0; i < response.data.data.order.length; i++) {
  1041. let order = response.data.data.order[i];
  1042. let number = "";
  1043. let name = "";
  1044. let department = "";
  1045. let doctor_name = "";
  1046. let balance_accounts = "";
  1047. let charge_name = "";
  1048. let order_status = "";
  1049. if (
  1050. order.his_hospital_patient != null &&
  1051. order.his_hospital_patient.number.length > 0
  1052. ) {
  1053. number = order.his_hospital_patient.number;
  1054. }
  1055. if (order.his_patient != null) {
  1056. if (order.his_patient.balance_accounts_type == 1) {
  1057. balance_accounts = "自费";
  1058. }
  1059. if (order.his_patient.balance_accounts_type == 2) {
  1060. balance_accounts = "医保";
  1061. }
  1062. }
  1063. if (order.patient != null && order.patient.name.length > 0) {
  1064. name = order.patient.name;
  1065. }
  1066. if (
  1067. order.p_info != null &&
  1068. order.p_info.department != null &&
  1069. order.p_info.department.name.length > 0
  1070. ) {
  1071. department = order.p_info.department.name;
  1072. }
  1073. if (order.p_info != null && order.p_info.doctor.length > 0) {
  1074. doctor_name = order.p_info.doctor;
  1075. }
  1076. if (order.creator != null) {
  1077. charge_name = this.getName(order.creator);
  1078. }
  1079. if (order.order_status == 1) {
  1080. order_status = "待结算";
  1081. }
  1082. if (order.order_status == 2) {
  1083. order_status = "已结算";
  1084. }
  1085. if (order.order_status == 3) {
  1086. order_status = "已退费";
  1087. }
  1088. let obj = {
  1089. 单号: order.number,
  1090. 人员编号: order.his_hospital_patient.psn_no,
  1091. 保地医保区: order.his_hospital_patient.insuplc_admdvs,
  1092. 身份证号: order.patient.id_card_no,
  1093. 患者姓名: name,
  1094. 险种: order.insutype,
  1095. 医疗类别: order.med_type,
  1096. 就诊id: number,
  1097. 登记日期: order.his_hospital_patient.in_hosptial_time,
  1098. 出院日期: order.his_hospital_patient.out_hosptial_time,
  1099. 结算id: order.setl_id,
  1100. 结算日期: order.setl_time,
  1101. 医疗费总额: order.medfee_sumamt,
  1102. 全自费金额: order.fulamt_ownpay_amt,
  1103. 超限价自费金额: order.overlmt_self_pay,
  1104. 先行自付金额: order.preselfpay_amt,
  1105. 符合政策范围金额: order.inscp_scp_amt,
  1106. 实际支付起付线: order.act_pay_dedc,
  1107. 基本医疗保险统筹基金支出: order.hifp_pay,
  1108. 基本医疗保险统筹基金支付比例: order.pool_prop_selfpay,
  1109. 公务员医疗补助基金支出: order.cvlserv_pay,
  1110. 企业补充医疗保险基金支出: order.hifes_pay,
  1111. 居民大病保险基金支出: order.hifmi_pay,
  1112. 职工大额医疗费用补助基金支出: order.hifob_pay,
  1113. 医疗救助基金支出: order.maf_pay,
  1114. 其他支出: order.oth_pay,
  1115. 基金支付总额: order.fund_pay_sumamt,
  1116. 个人负担总金额: order.psn_part_amt,
  1117. 个人账户支付金额: order.acct_pay,
  1118. 个人现金支出: order.psn_cash_pay,
  1119. 医院总负担金额: order.hosp_part_amt,
  1120. 余额: order.balc,
  1121. 个账共济支付金额: order.acct_mulaid_pay,
  1122. };
  1123. list.push(obj);
  1124. }
  1125. import("@/vendor/Export2Excel").then((excel) => {
  1126. const tHeader = [
  1127. "单号",
  1128. "人员编号",
  1129. "保地医保区",
  1130. "身份证号",
  1131. "患者姓名",
  1132. "险种",
  1133. "医疗类别",
  1134. "就诊id",
  1135. "登记日期",
  1136. "出院日期",
  1137. "结算id",
  1138. "结算日期",
  1139. "医疗费总额",
  1140. "全自费金额",
  1141. "超限价自费金额",
  1142. "先行自付金额",
  1143. "符合政策范围金额",
  1144. "实际支付起付线",
  1145. "基本医疗保险统筹基金支出",
  1146. "基本医疗保险统筹基金支付比例",
  1147. "公务员医疗补助基金支出",
  1148. "企业补充医疗保险基金支出",
  1149. "居民大病保险基金支出",
  1150. "职工大额医疗费用补助基金支出",
  1151. "医疗救助基金支出",
  1152. "其他支出",
  1153. "基金支付总额",
  1154. "个人负担总金额",
  1155. "个人账户支付金额",
  1156. "个人现金支出",
  1157. "医院总负担金额",
  1158. "余额",
  1159. "个账共济支付金额",
  1160. ];
  1161. const filterVal = [
  1162. "单号",
  1163. "人员编号",
  1164. "保地医保区",
  1165. "身份证号",
  1166. "患者姓名",
  1167. "险种",
  1168. "医疗类别",
  1169. "就诊id",
  1170. "登记日期",
  1171. "出院日期",
  1172. "结算id",
  1173. "结算日期",
  1174. "医疗费总额",
  1175. "全自费金额",
  1176. "超限价自费金额",
  1177. "先行自付金额",
  1178. "符合政策范围金额",
  1179. "实际支付起付线",
  1180. "基本医疗保险统筹基金支出",
  1181. "基本医疗保险统筹基金支付比例",
  1182. "公务员医疗补助基金支出",
  1183. "企业补充医疗保险基金支出",
  1184. "居民大病保险基金支出",
  1185. "职工大额医疗费用补助基金支出",
  1186. "医疗救助基金支出",
  1187. "其他支出",
  1188. "基金支付总额",
  1189. "个人负担总金额",
  1190. "个人账户支付金额",
  1191. "个人现金支出",
  1192. "医院总负担金额",
  1193. "余额",
  1194. "个账共济支付金额",
  1195. ];
  1196. const data = this.formatJson(filterVal, list);
  1197. excel.export_json_to_excel({
  1198. header: tHeader,
  1199. data,
  1200. filename: "消费明细",
  1201. });
  1202. });
  1203. }
  1204. });
  1205. },
  1206. formatJson(filterVal, jsonData) {
  1207. return jsonData.map((v) => filterVal.map((j) => v[j]));
  1208. },
  1209. changeDoctor() {
  1210. this.page = 1;
  1211. this.keywords = "";
  1212. this.getHisOrderList();
  1213. },
  1214. handleSizeChange(limit) {
  1215. this.limit = limit;
  1216. this.getHisOrderList();
  1217. },
  1218. handleCurrentChange(page) {
  1219. this.page = page;
  1220. this.getHisOrderList();
  1221. },
  1222. handleStartTimeChange() {
  1223. this.page = 1;
  1224. this.keywords = "";
  1225. this.getHisOrderList();
  1226. },
  1227. handleEndTimeChange() {
  1228. this.page = 1;
  1229. this.keywords = "";
  1230. this.getHisOrderList();
  1231. },
  1232. searchAction() {
  1233. this.page = 1;
  1234. this.getHisOrderList();
  1235. },
  1236. getTimes(time) {
  1237. return uParseTime(time, "{y}-{m}-{d}");
  1238. },
  1239. toDetail(row) {
  1240. this.$router.push(
  1241. "/outpatientCharges/summaryDetail?patient_id=" +
  1242. row.patient.id +
  1243. "&number=" +
  1244. row.number +
  1245. "&id=" +
  1246. row.id
  1247. );
  1248. },
  1249. getTime(value, temp) {
  1250. if (value != undefined) {
  1251. return uParseTime(value, temp);
  1252. }
  1253. return "";
  1254. },
  1255. getHisOrderList() {
  1256. let params = {
  1257. page: this.page,
  1258. limit: this.limit,
  1259. keywords: this.keywords,
  1260. start_time: this.start_time,
  1261. end_time: this.end_time,
  1262. type: this.admin_user_id,
  1263. p_type: this.p_type,
  1264. sort_type: this.sort_type,
  1265. charge_type: this.charge_type,
  1266. };
  1267. console.log(params, "参数");
  1268. getHisOrderList(params).then((response) => {
  1269. if (response.data.state == 0) {
  1270. this.$message.error(response.data.msg);
  1271. return false;
  1272. } else {
  1273. this.tableData = response.data.data.order;
  1274. this.total = response.data.data.total;
  1275. }
  1276. });
  1277. },
  1278. getDoctorList() {
  1279. getDoctorList().then((response) => {
  1280. if (response.data.state == 0) {
  1281. this.$message.error(response.data.msg);
  1282. return false;
  1283. } else {
  1284. this.doctors = response.data.data.doctors;
  1285. }
  1286. });
  1287. },
  1288. open(index) {
  1289. if (index == 1) {
  1290. this.listVisible = true;
  1291. } else if (index == 2) {
  1292. this.allListVisible = true;
  1293. }
  1294. },
  1295. invoicePrint(obj) {
  1296. let paramsObj = {
  1297. order_id: obj.id,
  1298. patient_id: obj.patient_id,
  1299. name: obj.patient.name,
  1300. age: obj.age,
  1301. gend: obj.gend,
  1302. setl_time: obj.setl_time,
  1303. };
  1304. this.invoiceParams = paramsObj;
  1305. const loading = this.$loading({
  1306. lock: true,
  1307. text: '正在加载中...',
  1308. spinner: 'el-icon-loading',
  1309. background: 'rgba(0, 0, 0, 0.7)'
  1310. });
  1311. setTimeout(() => {
  1312. this.invoiceVisible = true;
  1313. loading.close();
  1314. }, 1000);
  1315. },
  1316. shouJuPrint(obj) {
  1317. let paramsObj = {
  1318. order_id: obj.id,
  1319. patient_id: obj.patient_id,
  1320. name: obj.patient.name,
  1321. age: obj.age,
  1322. gend: obj.gend,
  1323. setl_time: obj.setl_time,
  1324. };
  1325. this.invoiceParams = paramsObj;
  1326. this.shouJuVisible = true;
  1327. },
  1328. },
  1329. created() {
  1330. this.fetchAllAdminUsers();
  1331. this.getDoctorList();
  1332. this.getHisOrderList();
  1333. },
  1334. };
  1335. </script>