huangyw 2 年之前
父節點
當前提交
72768cf92f

+ 53 - 40
src/xt_pages/outpatientCharges/statementPrint.vue 查看文件

@@ -28,21 +28,24 @@
28 28
           :info="info"
29 29
           :paramsObj="paramsObj"
30 30
           :balanceAccounts="balanceAccounts"
31
-          v-if="
32
-            org_id == 10138 || org_id == 4 || org_id == 10278
33
-          "
31
+          v-if="org_id == 10138 || org_id == 4 || org_id == 10278"
34 32
         ></printThree>
35 33
         <printFour
36
-          v-if="org_id == 9504 || org_id == 10028  || org_id == 10088"
34
+          v-if="org_id == 9504 || org_id == 10028 || org_id == 10088"
37 35
           :info="info"
38 36
           :paramsObj="paramsObj"
39 37
           :balanceAccounts="balanceAccounts"
40 38
         ></printFour>
41
-<!--        <privateChargePrint  :info="info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></privateChargePrint>-->
42
-
39
+        <!--        <privateChargePrint  :info="info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></privateChargePrint>-->
43 40
       </div>
44
-<!--      <print-other :info="info" v-if="org_id == 9919"></print-other>-->
45
-<!--      <printOne :info=" info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></printOne>-->
41
+      <!--      <print-other :info="info" v-if="org_id == 9919"></print-other>-->
42
+      <!--      <printOne :info=" info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></printOne>-->
43
+      <printFive
44
+        v-if="org_id == 0"
45
+        :info="info"
46
+        :paramsObj="paramsObj"
47
+        :balanceAccounts="balanceAccounts"
48
+      ></printFive>
46 49
       <printOne :info="info" v-else></printOne>
47 50
       <!-- 测试医保环境下表格样式放开以下这条 -->
48 51
       <!-- <testVue :info="info" v-else></testVue> -->
@@ -65,13 +68,14 @@ import privateChargePrint from "./statementTemplate/privateChargePrint";
65 68
 import printTwo from "./statementTemplate/printTwo";
66 69
 import printThree from "./statementTemplate/printThree";
67 70
 import printFour from "./statementTemplate/printFour";
71
+import printFive from "./statementTemplate/printFive";
68 72
 import testVue from "./statementTemplate/test";
69 73
 import {
70 74
   getAllDoctorList,
71 75
   getAllHisPatientList,
72 76
   getPrescriptionPrint,
73 77
 } from "@/api/project/project";
74
-import { getPrivateExpenses,getPrivateExpensesOrder } from "@/api/his/his";
78
+import { getPrivateExpenses, getPrivateExpensesOrder } from "@/api/his/his";
75 79
 // import PrintOther from '../hospitalStation/statementTemplate/printOther'
76 80
 export default {
77 81
   name: "dialysisPrintOrder",
@@ -83,6 +87,7 @@ export default {
83 87
     printThree,
84 88
     printFour,
85 89
     testVue,
90
+    printFive,
86 91
   },
87 92
   props: {
88 93
     paramsObj: Object,
@@ -115,7 +120,6 @@ export default {
115 120
 
116 121
       if (
117 122
         this.$store.getters.xt_user.org_id == 10138 ||
118
-        // this.$store.getters.xt_user.org_id == 0 ||
119 123
         this.$store.getters.xt_user.org_id == 4 ||
120 124
         this.$store.getters.xt_user.org_id == 10278
121 125
       ) {
@@ -256,6 +260,18 @@ export default {
256 260
             style: style,
257 261
             scanStyles: false,
258 262
           });
263
+        } else if (
264
+          this.$store.getters.xt_user.org_id == 0 ||
265
+          this.$store.getters.xt_user.org_id == 10191
266
+        ) {
267
+          const style =
268
+            "@media print {.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;} .statementTable thead{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;} .statementTable tbody{text-align:left;} .statementTable tbody .view_tr{text-align:center;border: 1px solid;} tbody .dashed_tr{border: 1px dashed;text-align:center} .list_table{width: 100%;margin-bottom: 100px;} tbody tr td div{height:25px;}}";
269
+          printJS({
270
+            printable: "statement-print",
271
+            type: "html",
272
+            style: style,
273
+            scanStyles: false,
274
+          });
259 275
         } else {
260 276
           const style =
261 277
             "@media print {#statement-print{font-size:14px;border:1px solid white}.statementTitle{font-size: 22px;text-align: center;font-weight: bold;}table{border-collapse: collapse;text-align: center;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 57%;}}}";
@@ -363,8 +379,8 @@ export default {
363 379
         let params = {
364 380
           his_patient_id: obj.his_patient_id,
365 381
           id: obj.order_id,
366
-          order_id:obj.order_id,
367
-          admin_user_id:this.$store.getters.xt_user.user.id,
382
+          order_id: obj.order_id,
383
+          admin_user_id: this.$store.getters.xt_user.user.id,
368 384
         };
369 385
         if (
370 386
           this.org_id == 10138 ||
@@ -491,16 +507,14 @@ export default {
491 507
               console.log(111, this.balanceAccounts);
492 508
             }
493 509
           });
494
-        }else
495
-          if (this.org_id == 10215 || this.org_id == 0) {
496
-
510
+        } else if (this.org_id == 10215 || this.org_id == 0) {
497 511
           getPrivateExpensesOrder(params).then((response) => {
498 512
             if (response.data.state == 0) {
499 513
               // this.$message.error(response.data.msg)
500 514
 
501 515
               return false;
502 516
             } else {
503
-              var that = this
517
+              var that = this;
504 518
               that.info = response.data.data.info;
505 519
               that.p_admin = response.data.data.printor_admin;
506 520
               that.charge_admin = response.data.data.charge_admin;
@@ -521,62 +535,62 @@ export default {
521 535
 
522 536
               that.info["bed_cost_total"] = response.data.data.bedCostTotal;
523 537
               that.info["bed_cost_self_total"] =
524
-                  response.data.data.bedCostSelfTotal;
538
+                response.data.data.bedCostSelfTotal;
525 539
               that.info["bed_cost_part_self_total"] =
526
-                  response.data.data.bedCostPartSelfTotal;
540
+                response.data.data.bedCostPartSelfTotal;
527 541
 
528 542
               that.info["operation_cost_total"] =
529
-                  response.data.data.operationCostTotal;
543
+                response.data.data.operationCostTotal;
530 544
               that.info["operation_cost_self_total"] =
531
-                  response.data.data.operationCostSelfTotal;
545
+                response.data.data.operationCostSelfTotal;
532 546
               that.info["operation_cost_part_self_total"] =
533
-                  response.data.data.operationCostPartSelfTotal;
547
+                response.data.data.operationCostPartSelfTotal;
534 548
 
535 549
               that.info["other_cost_total"] = response.data.data.otherCostTotal;
536 550
               that.info["other_cost_self_total"] =
537
-                  response.data.data.otherCostSelfTotal;
551
+                response.data.data.otherCostSelfTotal;
538 552
               that.info["other_cost_part_self_total"] =
539
-                  response.data.data.otherCostPartSelfTotal;
553
+                response.data.data.otherCostPartSelfTotal;
540 554
 
541 555
               that.info["material_cost_total"] =
542
-                  response.data.data.materialCostTotal;
556
+                response.data.data.materialCostTotal;
543 557
               that.info["material_cost_self_total"] =
544
-                  response.data.data.materialCostSelfTotal;
558
+                response.data.data.materialCostSelfTotal;
545 559
               that.info["material_cost_part_self_total"] =
546
-                  response.data.data.materialCostPartSelfTotal;
560
+                response.data.data.materialCostPartSelfTotal;
547 561
 
548 562
               that.info["western_medicine_cost_total"] =
549
-                  response.data.data.westernMedicineCostTotal;
563
+                response.data.data.westernMedicineCostTotal;
550 564
               that.info["western_medicine_cost_self_total"] =
551
-                  response.data.data.westernMedicineCostSelfTotal;
565
+                response.data.data.westernMedicineCostSelfTotal;
552 566
               that.info["western_medicine_cost_part_self_total"] =
553
-                  response.data.data.westernMedicineCostPartSelfTotal;
567
+                response.data.data.westernMedicineCostPartSelfTotal;
554 568
 
555 569
               that.info["chinese_traditional_medicine_cost_total"] =
556
-                  response.data.data.chineseTraditionalMedicineCostTotal;
570
+                response.data.data.chineseTraditionalMedicineCostTotal;
557 571
               that.info["chinese_traditional_medicine_cost_self_total"] =
558
-                  response.data.data.chineseTraditionalMedicineCostSelfTotal;
572
+                response.data.data.chineseTraditionalMedicineCostSelfTotal;
559 573
               that.info["chinese_traditional_medicine_cost_part_self_total"] =
560
-                  response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
574
+                response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
561 575
 
562 576
               that.info["check_cost_total"] = response.data.data.checkCostTotal;
563 577
               that.info["check_cost_self_total"] =
564
-                  response.data.data.checkCostSelfTotal;
578
+                response.data.data.checkCostSelfTotal;
565 579
               that.info["check_cost_part_self_total"] =
566
-                  response.data.data.checkCostPartSelfTotal;
580
+                response.data.data.checkCostPartSelfTotal;
567 581
 
568 582
               that.info["laboratory_cost_total"] =
569
-                  response.data.data.laboratoryCostTotal;
583
+                response.data.data.laboratoryCostTotal;
570 584
               that.info["laboratory_cost_self_total"] =
571
-                  response.data.data.laboratoryCostSelfTotal;
585
+                response.data.data.laboratoryCostSelfTotal;
572 586
               that.info["laboratory_cost_part_self_total"] =
573
-                  response.data.data.laboratoryCostPartSelfTotal;
587
+                response.data.data.laboratoryCostPartSelfTotal;
574 588
 
575 589
               that.info["treat_cost_total"] = response.data.data.treatCostTotal;
576 590
               that.info["treat_cost_self_total"] =
577
-                  response.data.data.treatCostSelfTotal;
591
+                response.data.data.treatCostSelfTotal;
578 592
               that.info["treat_cost_part_self_total"] =
579
-                  response.data.data.treatCostPartSelfTotal;
593
+                response.data.data.treatCostPartSelfTotal;
580 594
               that.info["date"] = response.data.data.date;
581 595
               // that.info["number"] = response.data.data.number;
582 596
               that.info["order_infos"] = response.data.data.order_infos;
@@ -643,7 +657,6 @@ export default {
643 657
               }
644 658
             }
645 659
           });
646
-
647 660
         }
648 661
       } else {
649 662
         var that = this;

+ 182 - 0
src/xt_pages/outpatientCharges/statementTemplate/printFive.vue 查看文件

@@ -0,0 +1,182 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <table class="statementTable" border="0">
4
+      <thead>
5
+        <tr>
6
+          <td colspan="10">石狮圣誉血液透析中心结算单</td>
7
+        </tr>
8
+      </thead>
9
+
10
+      <tbody>
11
+        <tr>
12
+          <td colspan="10">日期区间:</td>
13
+        </tr>
14
+        <tr class="view_tr">
15
+          <td colspan="2">姓名:</td>
16
+          <td colspan="2">性别:</td>
17
+          <td colspan="2">医保类型:</td>
18
+          <td colspan="2">社会保障号码:</td>
19
+          <td colspan="2">账号余额:</td>
20
+        </tr>
21
+        <tr class="view_tr">
22
+          <td colspan="10">明细信息</td>
23
+        </tr>
24
+
25
+        <!-- 帐单列表分为左右两列,需要对数据进行x/2分别放进list_L,list_R两个数组进行循环 -->
26
+        <tr>
27
+          <td colspan="6">
28
+            <table class="list_table">
29
+              <tr colspan="6" v-for="(item, index) in list_L" :key="index">
30
+                <td colspan="2">药名</td>
31
+                <td>规格</td>
32
+                <td>数量</td>
33
+                <td>价格</td>
34
+              </tr>
35
+            </table>
36
+          </td>
37
+
38
+          <td colspan="4">
39
+            <table class="list_table">
40
+              <tr colspan="4" v-for="(item, index) in list_R" :key="index">
41
+                <td colspan="2">药名</td>
42
+                <td>规格</td>
43
+                <td>数量</td>
44
+                <td>价格</td>
45
+              </tr>
46
+            </table>
47
+          </td>
48
+        </tr>
49
+        <tr>
50
+          <td colspan="10">共一页,第一页419.32</td>
51
+        </tr>
52
+        <tr class="dashed_tr">
53
+          <td colspan="10">结付分类</td>
54
+        </tr>
55
+        <tr>
56
+          <td colspan="10">
57
+            <div>费用总计:</div>
58
+            <div>统筹支付:</div>
59
+            <div>账户支付:</div>
60
+            <div>个人现金支付:</div>
61
+            <div>其他支付:</div>
62
+            <div>减免金额:</div>
63
+          </td>
64
+        </tr>
65
+      </tbody>
66
+    </table>
67
+  </div>
68
+</template>
69
+<script>
70
+export default {
71
+  props: {
72
+    info: {
73
+      type: Object,
74
+      default: function () {
75
+        return {};
76
+      },
77
+    },
78
+    p_admin: {
79
+      type: Object,
80
+      default: function () {
81
+        return {};
82
+      },
83
+    },
84
+    charge_admin: {
85
+      type: Object,
86
+      default: function () {
87
+        return {};
88
+      },
89
+    },
90
+  },
91
+  data() {
92
+    return {
93
+      list_L: [1,2],
94
+      list_R: [1,2],
95
+    };
96
+  },
97
+  methods: {
98
+    getDay(dateString1, dateString2) {
99
+      var startDate = Date.parse(dateString1);
100
+      var endDate = Date.parse(dateString2);
101
+      if (startDate > endDate) {
102
+        return 0;
103
+      }
104
+      if (startDate == endDate) {
105
+        return 1;
106
+      }
107
+      var days = (endDate - startDate) / (1 * 24 * 60 * 60 * 1000);
108
+      return days;
109
+    },
110
+    getNowTime: function () {
111
+      let dateTime;
112
+      let yy = new Date().getFullYear();
113
+      let mm = new Date().getMonth() + 1;
114
+      let dd = new Date().getDate();
115
+      let hh = new Date().getHours();
116
+      let mf =
117
+        new Date().getMinutes() < 10
118
+          ? "0" + new Date().getMinutes()
119
+          : new Date().getMinutes();
120
+      let ss =
121
+        new Date().getSeconds() < 10
122
+          ? "0" + new Date().getSeconds()
123
+          : new Date().getSeconds();
124
+      dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
125
+      return dateTime;
126
+    },
127
+  },
128
+};
129
+</script>
130
+
131
+
132
+<style lang="scss" scoped>
133
+.statement-print {
134
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
135
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
136
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
137
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
138
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
139
+  margin-bottom: 20px;
140
+  padding: 20px 10px;
141
+}
142
+
143
+.statementTitle {
144
+  font-size: 28px;
145
+  text-align: center;
146
+  font-weight: bold;
147
+  margin-bottom: 10px;
148
+}
149
+
150
+.statementTable {
151
+  width: 100%;
152
+  text-align: center;
153
+  border-collapse: collapse;
154
+  line-height: 40px;
155
+  font-size: 14px;
156
+}
157
+.statementTable thead{
158
+  font-size: 28px;
159
+  text-align: center;
160
+  font-weight: bold;
161
+  margin-bottom: 10px;
162
+}
163
+
164
+.statementTable tbody{
165
+    text-align: left;
166
+}
167
+tbody .view_tr{
168
+    border: 1px solid;
169
+    text-align: center;
170
+}
171
+.list_table{
172
+    width: 100%;
173
+    margin-bottom: 100px;
174
+}
175
+tbody .dashed_tr{
176
+    border: 1px dashed;
177
+    text-align: center;
178
+}
179
+tbody tr td div{
180
+    height: 25px;
181
+}
182
+</style>