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

detailPrint.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. <template>
  2. <div>
  3. <div class="print_btn">
  4. <el-button type="primary" @click="printtpage">打印</el-button>
  5. </div>
  6. <div id="list-print" class="list-print">
  7. <table class="listTable"
  8. border="0"
  9. cellspacing="0"
  10. style="font-size: 14px"
  11. align="center">
  12. <thead style="display: table-header-group; font-weight: bold;border-bottom: 1px solid;">
  13. <tr
  14. ><td colspan="4" align="center" style="font-size: 20px"
  15. >{{ $store.getters.xt_user.org.org_name }}费用清单</td
  16. ></tr
  17. >
  18. <tr>
  19. <td>患者姓名:{{ patient.name }}</td>
  20. <td>性别:{{ patient.gender == 1 ? "男" : "女" }}</td>
  21. <td>结算类别:
  22. <span v-if="his_patient!=null&&his_patient.balance_accounts_type >0"> {{ getType(his_patient.balance_accounts_type) }} </span>
  23. <span v-if="his_record_patient!=null&&his_record_patient.balance_accounts_type >0">{{getType(his_record_patient.balance_accounts_type)}}</span></td>
  24. <td>发票号码:{{order.fa_piao_number}}</td>
  25. </tr>
  26. <tr>
  27. <td>住院/门诊号:
  28. <span v-if="his_patient!=null && his_patient.number!=''">{{his_patient.number}}</span>
  29. <span v-if="his_record_patient!=null && his_record_patient.ipt_otp_no!=''">{{his_record_patient.ipt_otp_no}}</span></td>
  30. <td>科室:
  31. <span v-if="his_patient!=null && his_patient.departments >0"> {{ getDepartment(his_patient.departments) }}</span>
  32. <span v-if="his_record_patient!=null && his_record_patient.departments > 0">{{ getDepartment(his_record_patient.departments) }}</span></td>
  33. <td>就诊流水号:
  34. <span v-if="his_patient!=null && his_patient.number!=''"> {{ his_patient.number }}</span>
  35. <span v-if="his_record_patient!=null && his_record_patient.number!=''">{{his_record_patient.number}}</span></td>
  36. </tr>
  37. <tr>
  38. <td>总费用:{{ getAllPice() }}</td>
  39. <td>个人支付:
  40. {{getActPay()}}
  41. <!-- <span v-if="his_record_patient.balance_accounts_type == 2">{{ getAllPice() }}</span>
  42. <span v-if="his_record_patient.balance_accounts_type != 2">{{ getActPay() }}</span> -->
  43. </td>
  44. <td>基金支付记账:{{ getFundPaySumamt() }}</td>
  45. <td>补充医疗支付记账:{{ getHifesPay() }}</td>
  46. </tr>
  47. <tr>
  48. <td>
  49. 救助支付金额:{{ getMafPay() }}
  50. </td>
  51. </tr>
  52. </thead>
  53. </table>
  54. <!-- <div class="listTitle">
  55. {{ $store.getters.xt_user.org.org_name }}费用清单
  56. </div> -->
  57. <!-- <div class="listInfo">
  58. <div>患者姓名:{{ patient.name }}</div>
  59. <div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
  60. <div>结算类别:
  61. {{getType(his_record_patient.balance_accounts_type)}}
  62. </div>
  63. <div style="min-width:300px;">发票号码:{{order.fa_piao_number}}</div>
  64. </div> -->
  65. <!-- <div class="listInfo">
  66. <div>住院/门诊号:
  67. {{his_record_patient.ipt_otp_no}}
  68. </div>
  69. <div>科室:
  70. {{ getDepartment(his_record_patient.departments) }}
  71. </div>
  72. <div style="min-width:350px;">就诊流水号:
  73. {{his_record_patient.number}}
  74. </div>
  75. </div> -->
  76. <!-- <div class="listInfo">
  77. <div>总费用:{{ getAllPice() }}</div>
  78. <div>个人支付:
  79. <span v-if="his_record_patient.balance_accounts_type == 2">{{ getAllPice() }}</span>
  80. <span v-if="his_record_patient.balance_accounts_type != 2">{{ getActPay() }}</span>
  81. </div>
  82. <div>基金支付记账:{{ getFundPaySumamt() }}</div>
  83. <div style="min-width:300px;">补充医疗支付记账:{{ getHifesPay() }}</div>
  84. </div> -->
  85. <!-- <div class="listInfo">
  86. <div>救助支付金额:{{ getMafPay() }}</div>
  87. </div> -->
  88. <table class="listTable" border="1">
  89. <tr style="height:45px">
  90. <td width="100" style="text-align: center">序号</td>
  91. <td width="200" style="text-align: center">处方日期</td>
  92. <td width="300" style="text-align: center">费用编码</td>
  93. <td width="300" style="text-align: center">项目名称</td>
  94. <td width="180" style="text-align: center">规格</td>
  95. <td width="100" style="text-align: center">数量</td>
  96. <td width="100" style="text-align: center">单位</td>
  97. <td width="100" style="text-align: center">单价(元)</td>
  98. <td width="150" style="text-align: center">金额</td>
  99. </tr>
  100. <tr v-for="(item, index) in tableData" :key="index">
  101. <td style="text-align: center">
  102. <span v-if="item.is_total == 1">{{ index + 1 }}</span>
  103. <span v-if="item.is_total == 2">合计</span>
  104. </td>
  105. <td style="text-align: center">
  106. <span v-if="item.is_total == 1">{{getTimes(item.record_date)}}</span>
  107. </td>
  108. <td width="80" style="text-align: center">{{ item.number }}</td>
  109. <td style="text-align: center">
  110. <span v-if="item.advice_id > 0">{{ item.advice.advice_name }}</span>
  111. <span v-if="item.project_id > 0">
  112. <span v-if="item.project.type == 2">{{
  113. item.project.project.project_name
  114. }}</span>
  115. <span v-if="item.project.type == 3"
  116. >{{item.project.good_info.good_name}}</span
  117. >
  118. </span>
  119. </td>
  120. <td style="text-align: center">
  121. <span v-if="item.advice_id > 0"
  122. >{{ item.advice.drug.dose }}{{ item.advice.drug.dose_unit }}*{{
  123. item.advice.drug.min_number
  124. }}{{ item.advice.drug.min_unit }}/{{
  125. item.advice.drug.max_unit
  126. }}</span
  127. >
  128. <span v-if="item.project_id > 0">
  129. <span v-if="item.project.type == 2">{{
  130. item.project.project.project_name
  131. }}</span>
  132. <span v-if="item.project.type == 3">{{
  133. item.project.good_info.specification_name
  134. }}</span>
  135. </span>
  136. </td>
  137. <td style="text-align: center">
  138. {{ item.cnt }}
  139. </td>
  140. <td style="text-align: center">
  141. <span v-if="item.advice_id > 0">{{item.advice.prescribing_number_unit}}</span>
  142. <span v-if="item.project_id > 0">
  143. <span v-if="item.project.type == 2">{{item.project.project.unit}}</span>
  144. <span v-if="item.project.type == 3">{{item.project.good_info.packing_unit}}</span>
  145. </span>
  146. </td>
  147. <td style="text-align: center">
  148. {{ item.pric }}
  149. </td>
  150. <td style="text-align: center">
  151. {{ item.total_price }}
  152. </td>
  153. </tr>
  154. </table>
  155. </div>
  156. </div>
  157. </template>
  158. <script>
  159. import print from "print-js";
  160. import { uParseTime } from "@/utils/tools";
  161. import { getHisSummaryDetailList } from "@/api/his/his_tools";
  162. export default {
  163. data() {
  164. return {
  165. patient: {},
  166. tableData: [],
  167. list: [],
  168. his_patient: {},
  169. hisDepatment: [],
  170. settlement: [
  171. { value: 1, label: "医保" },
  172. { value: 2, label: "自费" },
  173. { value: 3, label: "公费" },
  174. { value: 4, label: "农保" },
  175. { value: 5, label: "会员" },
  176. { value: 6, label: "职工" },
  177. { value: 7, label: "合同" },
  178. { value: 8, label: "医保自费" },
  179. ],
  180. order:{},
  181. his_record_patient:{},
  182. orderList:[],
  183. };
  184. },
  185. methods: {
  186. printtpage() {
  187. const style =
  188. '@media print {.list-print{width:960px;margin:0 auto} .listTitle {font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo {display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;}.listTable {width: 100%;text-align: center;border-collapse: collapse;line-height: 25px;font-size: 14px;border-color: #000;text-align: left;} .listTable tr td {padding: 0 5px;}.tableBottom {font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne {margin-right: 40px;}';
  189. printJS({
  190. printable: "list-print",
  191. type: "html",
  192. style: style,
  193. scanStyles: false,
  194. });
  195. },
  196. getNowTime: function () {
  197. let dateTime;
  198. let yy = new Date().getFullYear();
  199. let mm = new Date().getMonth() + 1;
  200. let dd = new Date().getDate();
  201. let hh = new Date().getHours();
  202. let mf =
  203. new Date().getMinutes() < 10
  204. ? "0" + new Date().getMinutes()
  205. : new Date().getMinutes();
  206. let ss =
  207. new Date().getSeconds() < 10
  208. ? "0" + new Date().getSeconds()
  209. : new Date().getSeconds();
  210. dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
  211. return dateTime;
  212. },
  213. getTimes(time) {
  214. return uParseTime(time, "{y}-{m}-{d}");
  215. },
  216. getHisSummaryDetailList() {
  217. let start_time = this.$route.query.start_time;
  218. let end_time = this.$route.query.end_time;
  219. let params = {
  220. patient_id: this.$route.query.patient_id,
  221. start_time: start_time,
  222. end_time: end_time,
  223. type: this.$route.query.type,
  224. keyword: this.$route.query.keyword,
  225. };
  226. getHisSummaryDetailList(params).then((response) => {
  227. if (response.data.state == 1) {
  228. var list = response.data.data.list;
  229. this.list = list;
  230. this.patient = response.data.data.patient;
  231. this.his_patient = response.data.data.his_patient;
  232. this.his_record_patient = response.data.data.his_record_patient
  233. this.hisDepatment = response.data.data.hisDepatment;
  234. this.orderList = response.data.data.orderList
  235. this.order = response.data.data.order
  236. this.tableData = [];
  237. for (let i = 0; i < list.length; i++) {
  238. for (let j = 0; j < list[i].orders.length; j++) {
  239. for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
  240. list[i].orders[j].order_info[z].record_date =
  241. list[i].orders[j].settle_accounts_date;
  242. list[i].orders[j].order_info[z].number =
  243. list[i].orders[j].number;
  244. this.tableData.push(list[i].orders[j].order_info[z]);
  245. }
  246. }
  247. }
  248. var obj = { index: "合计", total_price: 0, record_date: "0",is_total:2 };
  249. for (let i = 0; i < this.tableData.length; i++) {
  250. this.tableData[i].index = i + 1;
  251. this.tableData[i].total_price = 0;
  252. this.tableData[i].is_total = 1
  253. this.tableData[i].total_price = (
  254. this.tableData[i].cnt * this.tableData[i].pric).toFixed(2);
  255. obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
  256. }
  257. obj.total_price = obj.total_price.toFixed(2);
  258. this.tableData.push(obj);
  259. if (this.$route.query.keyword != "") {
  260. var new_arr = []
  261. for (let i = 0; i < this.tableData.length; i++) {
  262. if (this.tableData[i].index != "合计") {
  263. if (this.tableData[i].advice_id > 0) {
  264. if (
  265. this.tableData[i].advice.advice_name.indexOf(
  266. this.$route.query.keyword
  267. ) > -1
  268. ) {
  269. new_arr.push(this.tableData[i]);
  270. }
  271. }
  272. if (this.tableData[i].project_id > 0) {
  273. if (this.tableData[i].project.type == 2) {
  274. if (
  275. this.tableData[i].project.project.project_name.indexOf(
  276. this.$route.query.keyword
  277. ) > -1
  278. ) {
  279. new_arr.push(this.tableData[i]);
  280. }
  281. }
  282. if (this.tableData[i].project.type == 3) {
  283. if (
  284. this.tableData[i].project.good_info.good_name.indexOf(
  285. this.$route.query.keyword
  286. ) > -1
  287. ) {
  288. new_arr.push(this.tableData[i]);
  289. }
  290. }
  291. }
  292. }
  293. }
  294. var objs = {index:"合计",total_price:0,record_date:"0",is_total:2}
  295. for(let i=0;i<new_arr.length;i++){
  296. new_arr[i].is_total = 1
  297. }
  298. objs.total_price = this.getPrice(new_arr)
  299. new_arr.push(objs)
  300. this.tableData = new_arr;
  301. }
  302. if(this.$route.query.id == 1){
  303. var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
  304. var new_arr = []
  305. for(let i=0;i<this.tableData.length;i++){
  306. if(this.tableData[i].index!="合计"){
  307. if(this.tableData[i].advice_id > 0){
  308. new_arr.push(this.tableData[i])
  309. }
  310. }
  311. }
  312. this.tableData = []
  313. obj.total_price = this.getPrice(new_arr)
  314. for(let i=0;i<new_arr.length;i++){
  315. new_arr[i].is_total = 1
  316. }
  317. new_arr.push(obj)
  318. this.tableData = new_arr
  319. }
  320. if(this.$route.query.id == 2){
  321. var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
  322. var new_arr = []
  323. for(let i=0;i<this.tableData.length;i++){
  324. if(this.tableData[i].index!="合计"){
  325. if(this.tableData[i].project_id > 0){
  326. if(this.tableData[i].project.type ==2){
  327. new_arr.push(this.tableData[i])
  328. }
  329. }
  330. }
  331. }
  332. this.tableData = []
  333. obj.total_price = this.getPrice(new_arr)
  334. for(let i=0;i<new_arr.length;i++){
  335. new_arr[i].is_total = 1
  336. }
  337. new_arr.push(obj)
  338. this.tableData = new_arr
  339. }
  340. if(this.$route.query.id == 3){
  341. var new_arr = []
  342. var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
  343. for(let i=0;i<this.tableData.length;i++){
  344. if(this.tableData[i].index!="合计"){
  345. if(this.tableData[i].project_id > 0){
  346. if(this.tableData[i].project.type == 3){
  347. new_arr.push(this.tableData[i])
  348. }
  349. }
  350. }
  351. }
  352. this.tableData = []
  353. obj.total_price = this.getPrice(new_arr)
  354. for(let i=0;i<new_arr.length;i++){
  355. new_arr[i].is_total = 1
  356. }
  357. new_arr.push(obj)
  358. this.tableData = new_arr
  359. }
  360. }
  361. });
  362. },
  363. getAllPice() {
  364. var total_price = 0;
  365. for (let i = 0; i < this.tableData.length; i++) {
  366. if (this.tableData[i].index == "合计") {
  367. total_price = this.tableData[i].total_price;
  368. }
  369. }
  370. return total_price;
  371. },
  372. getActPay() {
  373. var act_pay = 0;
  374. for (let i = 0; i < this.list.length; i++) {
  375. for (let j = 0; j < this.list[i].orders.length; j++) {
  376. if(this.list[i].orders[j].is_medicine_insurance == 1){
  377. act_pay = act_pay + this.list[i].orders[j].psn_cash_pay
  378. }else{
  379. act_pay= act_pay + this.list[i].orders[j].medfee_sumamt
  380. }
  381. }
  382. }
  383. return act_pay.toFixed(2);
  384. },
  385. getFundPaySumamt() {
  386. var fund_pay_sumamt = 0;
  387. for (let i = 0; i < this.list.length; i++) {
  388. for (let j = 0; j < this.list[i].orders.length; j++) {
  389. fund_pay_sumamt += this.list[i].orders[j].fund_pay_sumamt;
  390. }
  391. }
  392. return fund_pay_sumamt;
  393. },
  394. getHifesPay() {
  395. var hifes_pay = 0;
  396. for (let i = 0; i < this.list.length; i++) {
  397. for (let j = 0; j < this.list[i].orders.length; j++) {
  398. hifes_pay += this.list[i].orders[j].hifes_pay;
  399. }
  400. }
  401. return hifes_pay;
  402. },
  403. getMafPay() {
  404. var maf_pay = 0;
  405. for (let i = 0; i < this.list.length; i++) {
  406. for (let j = 0; j < this.list[i].orders.length; j++) {
  407. maf_pay += this.list[i].orders[j].maf_pay;
  408. }
  409. }
  410. return maf_pay;
  411. },
  412. getDepartment(id) {
  413. var name = "";
  414. for (let i = 0; i < this.hisDepatment.length; i++) {
  415. if (id == this.hisDepatment[i].id) {
  416. name = this.hisDepatment[i].name;
  417. }
  418. }
  419. return name;
  420. },
  421. getType(id) {
  422. var name = "";
  423. for (let i = 0; i < this.settlement.length; i++) {
  424. if (id == this.settlement[i].value) {
  425. name = this.settlement[i].label;
  426. }
  427. }
  428. return name;
  429. },
  430. getPrice(val){
  431. var total_price = 0
  432. for(let i=0;i<val.length;i++){
  433. total_price += val[i].cnt * val[i].pric
  434. }
  435. return total_price.toFixed(2)
  436. }
  437. },
  438. created() {
  439. this.getHisSummaryDetailList();
  440. },
  441. };
  442. </script>
  443. <style lang="scss" scoped>
  444. .list-print {
  445. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  446. 0 0 60px rgba(0, 0, 0, 0.06) inset;
  447. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
  448. 0 0 40px rgba(0, 0, 0, 0.06) inset;
  449. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  450. margin-bottom: 20px;
  451. padding: 20px 10px;
  452. }
  453. .listTitle {
  454. font-size: 24px;
  455. text-align: center;
  456. font-weight: bold;
  457. margin-bottom: 10px;
  458. }
  459. .listInfo {
  460. display: flex;
  461. font-size: 16px;
  462. justify-content: space-between;
  463. margin: 10px 0;
  464. }
  465. .listTable {
  466. width: 100%;
  467. text-align: center;
  468. border-collapse: collapse;
  469. line-height: 25px;
  470. font-size: 14px;
  471. border-color: #000;
  472. text-align: left;
  473. }
  474. .listTable tr td {
  475. padding: 0 5px;
  476. }
  477. .tableBottom {
  478. font-size: 16px;
  479. display: flex;
  480. margin-top: 20px;
  481. }
  482. .tableBottomOne {
  483. margin-right: 40px;
  484. }
  485. .print_btn {
  486. display: flex;
  487. justify-content: flex-end;
  488. }
  489. </style>