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

summary.vue 41KB

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