see999 3 years ago
parent
commit
04e1901f5c

BIN
src/assets/img/bailinBottom.jpg View File


BIN
src/assets/img/bailinTop.jpg View File


+ 22 - 4
src/xt_pages/outpatientCharges/treatPrint.vue View File

@@ -13,7 +13,9 @@
13 13
     </template>
14 14
     <div class="app-container" style="padding-top:40px;">
15 15
         <div class='dialysisPage'>
16
-            <printOne v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
16
+            <printOne v-if="org_id != 4" v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
17
+            <printTwo v-else v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printTwo>
18
+
17 19
         </div>
18 20
     </div>
19 21
   </div>
@@ -33,11 +35,13 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
33 35
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
34 36
 import print from "print-js";
35 37
 import printOne from "./treatTemplate/printOne"
38
+import printTwo from "./treatTemplate/printTwo"
36 39
 export default {
37 40
   name: "dialysisPrintOrder",
38 41
   components: {
39 42
     BreadCrumb,
40
-    printOne
43
+    printOne,
44
+    printTwo
41 45
   },
42 46
   props:{
43 47
     paramsObj:Object
@@ -49,7 +53,8 @@ export default {
49 53
         { path: false, name: "打印单" }
50 54
       ],
51 55
       childResponse: {},
52
-      paramsObj:{}
56
+      paramsObj:{},
57
+      org_id:''
53 58
       
54 59
 
55 60
     };
@@ -81,7 +86,17 @@ export default {
81 86
       var ptime = Math.round(new Date().getTime() / 1000);
82 87
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
83 88
 
84
-      const style =
89
+      if(this.org_id == 4){
90
+        const style =
91
+        '@media print {#prescription-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}}';
92
+        printJS({
93
+            printable: "prescription-print",
94
+            type: "html",
95
+            style: style,
96
+            scanStyles: false
97
+        });
98
+      }else{
99
+        const style =
85 100
         '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
86 101
         printJS({
87 102
             printable: "prescription-print",
@@ -89,6 +104,8 @@ export default {
89 104
             style: style,
90 105
             scanStyles: false
91 106
         });
107
+      }
108
+      
92 109
 
93 110
       // if (this.org_template_info.template_id == 1) {
94 111
       //   printJS({
@@ -101,6 +118,7 @@ export default {
101 118
     },
102 119
   },
103 120
   created() {
121
+    this.org_id = this.$store.getters.xt_user.org_id
104 122
   },
105 123
   watch:{
106 124
     paramsObj:{//深度监听,可监听到对象、数组的变化

+ 395 - 0
src/xt_pages/outpatientCharges/treatTemplate/printTwo.vue View File

@@ -0,0 +1,395 @@
1
+<template>
2
+    <div>
3
+        <div id='prescription-print' class="prescription-print">
4
+            <img style="width:100%;" src="../../../assets/img/bailinTop.jpg" alt="">
5
+            <div class="printTitle">门诊收费清单</div>
6
+            <div style="display:flex;">
7
+                <div>单据号:<span style="display:inline-block;width:200px;"></span></div>
8
+                <div>透析号:<span style="display:inline-block;width:200px;"></span></div>
9
+            </div>
10
+            <div style="display:flex;">
11
+                <div>姓名:<span style="display:inline-block;width:50px;">{{patient.name}}</span></div>
12
+                <div>性别:<span style="display:inline-block;width:30px;">{{patient.gender == 1 ? '男' : '女'}}</span></div>
13
+                <div>年龄:<span style="display:inline-block;width:50px;">{{patient.age}}岁</span></div>
14
+                <div>费别:<span style="display:inline-block;width:80px;"></span></div>
15
+                <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
16
+                <div>收费日期:<span style="display:inline-block;width:80px;"></span></div>
17
+                <div style="float:right">金额单位:元</div>
18
+            </div>
19
+            <table border='1' style="width:100%;" cellspacing="0">
20
+                <tr>
21
+                    <td width="70">类别</td>
22
+                    <td>项目</td>
23
+                    <td width="80">规格</td>
24
+                    <td width="50">单位</td>
25
+                    <td width="50">数量</td>
26
+                    <td width="60">单价</td>
27
+                    <td width="70">总额</td>
28
+                    <td width="100">小计</td>
29
+                </tr>
30
+                <tr v-for="(item,y) in prescription[0].advices" :key="y"> 
31
+                    <td></td>
32
+                    <td>{{item.advice_name}}</td>
33
+                    <td>{{item.advice_desc}}</td>
34
+                    <td>{{item.single_dose_unit}}</td>
35
+                    <td>{{item.single_dose}}</td>
36
+                    <td>{{item.price}}</td>
37
+                    <td>{{ item.single_dose * item.price }}</td>
38
+                    <td>{{ item.single_dose * item.price }}</td>
39
+                    
40
+                </tr>
41
+                <tr>
42
+                    <td colspan="2">药品费:0.00元</td>
43
+                    <td colspan="2">诊疗费:0.00元</td>
44
+                    <td colspan="3">耗材费:0.00元</td>
45
+                    <td>合计: 0.00元</td>
46
+                </tr>
47
+                <tr>
48
+                    <td colspan="7">
49
+                        <div style="display:flex;flez-wrap:wrap;">
50
+                            <div style="width:33%;">医疗费总额:</div>
51
+                            <div style="width:33%;">基金支付金额:</div>
52
+                            <div style="width:33%;">个人账户支付金额:</div>
53
+                            
54
+                        </div>
55
+                        <div style="display:flex;flez-wrap:wrap;">
56
+                            <div style="width:33%;">个人支付金额:</div>
57
+                            <div style="width:33%;">个人账户金额:</div>
58
+                        </div>
59
+                    </td>
60
+                    <td>合计:0.0元</td>
61
+                </tr>
62
+
63
+            </table>
64
+            <div style="float:right;margin:10px 0;display:flex;">
65
+                <div>操作人:<span style="width:100px;display:inline-block;"></span></div>
66
+                <div>操作日期:<span style="width:100px;display:inline-block;"></span></div>
67
+            </div>
68
+            <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
69
+        </div>
70
+    </div>
71
+
72
+</template>
73
+<script>
74
+  import axios from 'axios'
75
+  import { getChargePrint } from '@/api/project/project'
76
+
77
+  export default {
78
+    data() {
79
+      return {
80
+        list: {},
81
+        prescription: [],
82
+        patient: {},
83
+        orgname: '',
84
+
85
+        result: {},
86
+        org_code: '',
87
+        patient_name: '',
88
+        doctor_code: '',
89
+        doctor_name: '',
90
+
91
+        name_arr: [],
92
+        spec_arr: [],
93
+        count_arr: [],
94
+        price_arr: [],
95
+        total_arr: []
96
+
97
+      }
98
+    },
99
+    props: {
100
+      paramsObj: Object
101
+    },
102
+    methods: {
103
+      getItemName(number) {
104
+        switch (number) {
105
+          case '01':
106
+            return '床位费';
107
+            break;
108
+          case '02':
109
+            return '西药费';
110
+
111
+            break;
112
+          case '03':
113
+            return '中药费';
114
+
115
+            break;
116
+          case '04':
117
+            return '中成药费';
118
+
119
+            break;
120
+          case '05':
121
+            return '中草药费';
122
+
123
+            break;
124
+          case '06':
125
+            return '检查费';
126
+
127
+            break;
128
+          case '07':
129
+            return '治疗费';
130
+
131
+            break;
132
+          case '08':
133
+            return '放射费';
134
+
135
+            break;
136
+          case '09':
137
+            return '手术费';
138
+
139
+            break;
140
+          case '10':
141
+            return '化验费';
142
+
143
+            break;
144
+          case '11':
145
+            return '输血费';
146
+
147
+            break;
148
+          case '12':
149
+            return '输氧费';
150
+
151
+            break;
152
+          case '13':
153
+            return '其它费';
154
+
155
+            break;
156
+          case '14':
157
+            return '麻醉费';
158
+
159
+            break;
160
+          case '15':
161
+            return '材料费';
162
+
163
+            break;
164
+          case '16':
165
+            return '特殊检查费';
166
+
167
+            break;
168
+          case '17':
169
+            return '特殊治疗费';
170
+
171
+            break;
172
+          case '18':
173
+            return '诊疗费(诊查费)';
174
+
175
+            break;
176
+          case '19':
177
+            return '护理费';
178
+
179
+            break;
180
+          case '20':
181
+            return '诊金';
182
+
183
+            break;
184
+          case '21':
185
+            return '检查费(CT)';
186
+
187
+            break;
188
+          case '22':
189
+            return '检查费(MRT)';
190
+
191
+            break;
192
+          case '23':
193
+            return '检查费(其他)';
194
+
195
+            break;
196
+          case '24':
197
+            return '特需服务费';
198
+
199
+            break;
200
+          case '25':
201
+            return '杂费';
202
+
203
+            break;
204
+          case '26':
205
+            return '挂号费';
206
+            break
207
+
208
+        }
209
+
210
+      },
211
+      getChargePrint(record_date, patient_id, prescription_id) {
212
+        var params = {
213
+          record_date: record_date,
214
+          patient_id: patient_id,
215
+          prescription_id: prescription_id
216
+        };
217
+        console.log('params', params);
218
+        getChargePrint(params).then(response => {
219
+          if (response.data.state == 1) {
220
+            var list = response.data.data.list;
221
+            console.log('list9999999999', list);
222
+            this.list = list;
223
+            var prescription = response.data.data.prescription;
224
+            console.log('prescription', prescription);
225
+            this.prescription = prescription;
226
+            var patient = response.data.data.patient;
227
+            console.log('patient', patient);
228
+            this.patient = patient;
229
+            var histpatient = response.data.data.hisPatient;
230
+            console.log('hispatient', histpatient)
231
+          }
232
+        })
233
+      }
234
+    },
235
+    created() {
236
+
237
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
238
+        this.orgname = xtuser.org.org_name;
239
+        var form = {
240
+          'order_id': this.paramsObj.order_id,
241
+          'patient_id': this.paramsObj.patient_id,
242
+          'record_time': this.paramsObj.record_date,
243
+          'admin_user_id': this.$store.getters.xt_user.user.id
244
+        };
245
+        var that = this;
246
+        axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
247
+          params: form
248
+        })
249
+          .then(function(response) {
250
+            if (response.data.state == 0) {
251
+              that.$message.error(response.data.msg);
252
+              return false
253
+            } else {
254
+              if (response.data.data.failed_code == -10) {
255
+                // that.$message.error(response.data.data.msg)
256
+                that.$confirm(response.data.data.msg, '医保错误信息', {
257
+                  confirmButtonText: '确 定',
258
+                  type: 'warning'
259
+                }).then(() => {
260
+
261
+                }).catch(() => {
262
+                })
263
+              } else {
264
+                that.result = response.data.data.result;
265
+
266
+                that.org_code = response.data.data.org_code;
267
+                that.patient_name = response.data.data.patient_name;
268
+                that.doctor_code = response.data.data.doctor_code;
269
+                that.doctor_name = response.data.data.doctor_name;
270
+                that.name_arr = [];
271
+                that.spec_arr = [];
272
+                that.count_arr = [];
273
+                that.price_arr = [];
274
+                that.total_arr = [];
275
+                for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
276
+                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
277
+                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
278
+                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
279
+                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
280
+                  that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
281
+                }
282
+
283
+              }
284
+
285
+            }
286
+          })
287
+          .catch(function(error) {
288
+
289
+          })
290
+
291
+      } else {
292
+        var record_date = this.paramsObj.record_date;
293
+        console.log('record_date', record_date);
294
+        var patient_id = this.paramsObj.patient_id;
295
+        console.log('patient_id', patient_id);
296
+        var prescription_id = this.paramsObj.prescription_id;
297
+        this.getChargePrint(record_date, patient_id, prescription_id);
298
+        var xtuser = this.$store.getters.xt_user;
299
+        this.orgname = xtuser.org.org_name
300
+
301
+      }
302
+
303
+    },
304
+    watch: {
305
+      paramsObj: {//深度监听,可监听到对象、数组的变化
306
+        handler(val, oldVal) {
307
+          this.paramsObj = val;
308
+          this.patient_id = this.paramsObj.patient_id;
309
+          var record_date = this.paramsObj.record;
310
+          this.record_date = record_date;
311
+          var prescription_id = this.paramsObj.prescription_id;
312
+          this.prescription_id = prescription_id
313
+
314
+        },
315
+        deep: true
316
+      }
317
+    }
318
+  }
319
+</script>
320
+
321
+
322
+<style lang="scss" scoped>
323
+    .prescription-print {
324
+        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
325
+        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
326
+        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
327
+        margin-bottom: 20px;
328
+        padding: 20px 10px;
329
+    }
330
+
331
+    .printTitle {
332
+        font-size: 22px;
333
+        text-align: center;
334
+        font-weight: bold;
335
+    }
336
+
337
+    .infoMain {
338
+        display: flex;
339
+        flex-wrap: wrap;
340
+        padding: 0 10px;
341
+        margin-top: 10px;
342
+    }
343
+
344
+    .infoMain .infoP {
345
+        width: 33%;
346
+        line-height: 24px;
347
+    }
348
+
349
+    .chargeBox {
350
+        border: 1px solid #000;
351
+    }
352
+
353
+    .chargeUl {
354
+        display: flex;
355
+        justify-content: space-between;
356
+        text-align: center;
357
+    }
358
+
359
+    .chargeUl p {
360
+        height: 40px;
361
+        line-height: 40px;
362
+    }
363
+
364
+    .chargeP {
365
+        height: 40px;
366
+        line-height: 40px;
367
+    }
368
+
369
+    .moneyBox {
370
+        display: flex;
371
+        justify-content: space-between;
372
+        padding: 0 10px;
373
+        background: #eee;
374
+        height: 40px;
375
+        align-items: center;
376
+        border: 1px solid #000;
377
+        border-top: none
378
+    }
379
+
380
+    .actionBar {
381
+        display: flex;
382
+        justify-content: space-between;
383
+        line-height: 24px;
384
+        padding: 0 10px;
385
+    }
386
+
387
+    .actionBar div {
388
+        width: 150px;
389
+    }
390
+    table{
391
+        td{
392
+            padding:0 5px;
393
+        }
394
+    }
395
+</style>

+ 30 - 10
src/xt_pages/outpatientDoctorStation/print.vue View File

@@ -13,8 +13,13 @@
13 13
       </template>
14 14
             
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
-      <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
16
+      <div v-if="org_id != 4">
17
+        <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+        <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
19
+      </div>
20
+      <div>
21
+        <printThree v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printThree>
22
+      </div>
18 23
     </div>
19 24
   </div>
20 25
 </template>
@@ -30,6 +35,7 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
30 35
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
31 36
 import print from "print-js";
32 37
 import printOne from "./template/printOne"
38
+import printThree from "./template/printThree"
33 39
 import printFour from "./template/printFour"
34 40
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
35 41
 export default {
@@ -37,6 +43,7 @@ export default {
37 43
   components: {
38 44
     BreadCrumb,
39 45
     printOne,
46
+    printThree,
40 47
     printFour
41 48
   },
42 49
   props:{
@@ -67,15 +74,28 @@ export default {
67 74
     printThisPage() {
68 75
       var ptime = Math.round(new Date().getTime() / 1000);
69 76
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
70
-
71
-      const style =
77
+      
78
+      if(this.org_id == 4){
79
+        
80
+        const style =
81
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}}';
82
+        printJS({
83
+          printable: "prescriptionPrint",
84
+          type: "html",
85
+          style: style,
86
+          scanStyles: false
87
+        });
88
+      }else{
89
+        const style =
72 90
         '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
73
-      printJS({
74
-        printable: "prescriptionPrint",
75
-        type: "html",
76
-        style: style,
77
-        scanStyles: false
78
-      });
91
+        printJS({
92
+          printable: "prescriptionPrint",
93
+          type: "html",
94
+          style: style,
95
+          scanStyles: false
96
+        });
97
+      }
98
+      
79 99
 
80 100
       // if (this.org_template_info.template_id == 1) {
81 101
       //   printJS({

+ 382 - 0
src/xt_pages/outpatientDoctorStation/template/printThree.vue View File

@@ -0,0 +1,382 @@
1
+<template>
2
+<div>
3
+  <div id='prescriptionPrint'>
4
+    <div v-for="(item,index) in advicePrint" :key="index">
5
+      <div id='prescription-print'  v-for='(i,pageIndex) in item.pageArr.length' :key="pageIndex" class="prescription-print" style="page-break-after: always;">
6
+          <img src="../../../assets/img/bailinTop.jpg" alt="">
7
+          <div class="printTitle">处方笺</div>
8
+          <div style="display:flex;">
9
+            <div style="width:33%;display:flex;">费别:<span class="under_line"></span></div>
10
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line"></span></div>
11
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line"></span></div>
12
+          </div>
13
+
14
+
15
+          <div class="infoTitle">
16
+              <div>姓名:{{item.patient.name?item.patient.name:""}}</div>
17
+              <div>性别:
18
+                <span v-if="item.patient.gender == 1">男</span>
19
+                <span v-if="item.patient.gender == 2">女</span>
20
+              </div>
21
+              <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
22
+          </div>
23
+          <div class="infoMain">
24
+              <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
25
+              <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line">{{item.info?getDepart(item.info.departments):''}}</span></div>
26
+              <div style="margin-bottom: 10px;display:flex;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
27
+              <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
28
+              <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
29
+              <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
30
+              <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
31
+              <!-- <div>地址:{{item.patient.home_address}}</div> -->
32
+              <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
33
+          </div>
34
+          <div class="prescriptionBox">
35
+              <div class="Rp">Rp:</div>
36
+              <div class="drugsBox" v-for="(it,index) in item.advices.slice(pageIndex * 5,(pageIndex * 5) + item.pageArr[pageIndex])" :key="index">
37
+                  <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
38
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
39
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
40
+              </div>
41
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
42
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
43
+               </div>
44
+               
45
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
46
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
47
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
48
+              </div>
49
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
50
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
51
+               </div>
52
+               <div style="text-align:center;" >(以下空白)</div>
53
+
54
+          </div>
55
+          <div style="display:flex;">
56
+            <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
57
+            <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}</div>
58
+          </div>
59
+          <div style="display:flex;">
60
+            <div style="display:flex;">审核药师:<span style="width:100px" class="under_line"></span></div>
61
+            <div style="display:flex;">调剂药师:<span style="width:100px" class="under_line"></span></div>
62
+            <div style="display:flex;">核对/发药药师:<span style="width:100px" class="under_line"></span></div>
63
+          </div>
64
+          <div>
65
+            打印日期:{{getTime(new Date())?getTime(new Date()):""}}
66
+          </div>
67
+          <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
68
+          <div>*药品属于特殊商品,非质量问题不允许退换</div>
69
+          <img src="../../../assets/img/bailinBottom.jpg" alt="">
70
+          <!-- <div class="doctorBox">
71
+              <p>医师:{{item.doctor?item.doctor:""}}</p>
72
+              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
73
+          </div>
74
+          <div class="actionBar">
75
+
76
+                 <p>审核:</p>
77
+                 <p>配对:</p>
78
+                 <p>核对:</p>
79
+                 <p>发药:</p>
80
+                 <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
81
+          </div> -->
82
+          <div style="page-break-after:always"></div>
83
+      </div>
84
+    </div>
85
+    
86
+  </div>
87
+</div>
88
+    
89
+</template>
90
+<script>
91
+import { jsGetAge, uParseTime } from '@/utils/tools'
92
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
93
+import {getInitData} from "@/api/his/his"
94
+export default {
95
+    props:{
96
+      patient_id:Number,
97
+      record_date:String,
98
+      prescription_id:Number,
99
+      ids:String
100
+    }, 
101
+    data(){
102
+      return {
103
+        doctorList:[],
104
+        advicePrint:{},
105
+        patient:{},
106
+        tableData:[],
107
+        prescriptionInfo:[],
108
+        hisPatient:{},
109
+        department:[],
110
+        prescriptions:[],
111
+        projectList:[],
112
+        orgname:"",
113
+        diagnoses:[],
114
+        pageArr:[]
115
+      }
116
+    },
117
+   methods:{
118
+     
119
+     getAllDoctorList(){
120
+      getAllDoctorList().then(response=>{
121
+        if(response.data.state == 1){
122
+               var doctor =  response.data.data.doctor
123
+               
124
+               this.doctorList = doctor
125
+             }
126
+         })   
127
+     },
128
+
129
+      getDoctor(id){
130
+        var name = ""
131
+        for(let i=0;i<this.doctorList.length;i++){
132
+          if(id == this.doctorList[i].admin_user_id){
133
+              name = this.doctorList[i].user_name
134
+          }
135
+        }
136
+        return name
137
+      },
138
+      getTime(value, temp) {
139
+        if (value != undefined) {
140
+            return uParseTime(value, temp)
141
+        }
142
+        return ''
143
+     },
144
+       getPrescriptionPrint(){
145
+         var params = {
146
+          // patient_id:this.patient_id,
147
+          // record_date:this.record_date,
148
+          // prescription_id:this.prescription_id,
149
+          patient_id:this.patient_id,
150
+          record_date:this.record_date,
151
+          prescription_id:this.prescription_id,
152
+          ids:this.ids
153
+        }
154
+        console.log("params",params)
155
+       getPrescriptionPrint(params).then(response=>{
156
+         if(response.data.state == 1){
157
+            var advicePrint =  response.data.data.advicePrint
158
+            console.log("adviceprint9999",advicePrint)
159
+            this.advicePrint = advicePrint
160
+            this.prescriptions = advicePrint
161
+            console.log("处方222222",this.prescriptions)
162
+            var hisPatient = response.data.data.hisPatient
163
+            console.log("hisPatient",hisPatient)
164
+            this.hisPatient = hisPatient
165
+            var projectlist =  response.data.data.projectlist
166
+            console.log("所有项目列表",projectlist)
167
+            this.projectList = projectlist
168
+            this.getPage()
169
+          }
170
+       })
171
+     },
172
+     getHisPatientDetail(){
173
+          const params = {
174
+              patient_id:this.patient_id
175
+          }
176
+       getHisPatientDetail(params).then(response=>{
177
+          if(response.data.state == 1){
178
+             var hisPatient =  response.data.data.hisPatient
179
+             console.log("挂号病人",hisPatient)
180
+             this.hisPatient = hisPatient
181
+          }
182
+       })
183
+     },
184
+     getInitData(){
185
+       getInitData().then(response=>{
186
+          if(response.data.state == 1){
187
+            this.department = response.data.data.department
188
+            this.diagnoses = response.data.data.diagnose
189
+            console.log("争端",this.diagnoses)
190
+          }
191
+       })
192
+     },
193
+     getDepart(id){
194
+         var name = ""
195
+       for(let i=0;i<this.department.length;i++){
196
+           if(id == this.department[i].id){
197
+               name = this.department[i].name
198
+           }
199
+       }
200
+       return name
201
+     },
202
+    getTotalOne(id) {
203
+
204
+        var total = 0
205
+        var addtotal = 0
206
+        for (let i = 0; i < this.prescriptions.length; i++) {
207
+          if(id == this.prescriptions[i].id){
208
+            if (this.prescriptions[i].project != null) {
209
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
210
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
211
+              }
212
+            }
213
+
214
+            if (this.prescriptions[i].additionalcharge != null) {
215
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
216
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
217
+              }
218
+            }
219
+              addtotal =  Math.floor(addtotal * 100) / 100
220
+        }
221
+       
222
+       }
223
+
224
+      for (let i = 0; i < this.prescriptions.length; i++) {
225
+          if(id == this.prescriptions[i].id){
226
+            if (this.prescriptions[i].advices != null) {
227
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
228
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
229
+              }
230
+            }
231
+          
232
+            if (this.prescriptions[i].additionalcharge != null) {
233
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
234
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
235
+              }
236
+            }
237
+              addtotal =  Math.floor(addtotal * 100) / 100
238
+        }
239
+       }
240
+
241
+        return total + addtotal
242
+      },
243
+      
244
+     getProjectName(id){
245
+        var project_name = ""
246
+        for(let i=0;i<this.projectList.length;i++){
247
+           if(id == this.projectList[i].id){
248
+               project_name = this.projectList[i].project_name
249
+           }
250
+        }
251
+        return project_name
252
+     },
253
+
254
+     getDiagnosis(id){
255
+        var name = ""
256
+        for(let i=0;i<this.diagnoses.length;i++){
257
+          if(id == this.diagnoses[i].id){
258
+             name = this.diagnoses[i].class_name
259
+          }
260
+        }
261
+        return name
262
+     },
263
+     getPage(){
264
+        this.page = 1
265
+        this.pageArr = []
266
+
267
+        this.advicePrint.map(item => {
268
+          let arr = []
269
+          item.pageArr = []
270
+          if(item.advices.length <= 5){
271
+            this.page = 1
272
+            arr.push(item.advices.length)
273
+            item.pageArr.push(arr)
274
+            
275
+          }else if(item.advices.length > 5){
276
+            this.page = parseInt(item.advices.length / 5)
277
+            let num = item.advices.length % 5
278
+            for (var i=0;i<this.page;i++){
279
+              item.pageArr.push([5])
280
+            }
281
+            if(num != 0){
282
+              item.pageArr.push([num])
283
+            }
284
+          }
285
+        })
286
+        // console.log('this.pageArr',this.pageArr)
287
+      }
288
+
289
+   },
290
+   created(){
291
+      this.getAllDoctorList()
292
+      this.getInitData()
293
+      this.getPrescriptionPrint()
294
+      this.getHisPatientDetail()
295
+      var xtuser = this.$store.getters.xt_user;
296
+      this.orgname = xtuser.org.org_name;
297
+     
298
+   },
299
+   watch:{
300
+     ids:function(val){
301
+      this.ids = val
302
+      this.getPrescriptionPrint()
303
+    }
304
+   }
305
+}
306
+</script>
307
+
308
+
309
+<style lang="scss" scoped>
310
+.prescription-print{
311
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
312
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
313
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
314
+    margin-bottom: 20px;
315
+    padding:20px 10px;
316
+}
317
+.printTitle{
318
+    font-size: 22px;
319
+    text-align: center;
320
+    font-weight: bold;
321
+    margin-bottom: 10px;
322
+}
323
+.infoTitle{
324
+    display: flex;
325
+    margin-top:10px;
326
+    line-height: 24px;
327
+}
328
+.infoTitle div{
329
+    width: 200px;
330
+}
331
+.infoMain{
332
+    display: flex;
333
+    flex-wrap: wrap;
334
+    margin-top:10px;
335
+}
336
+.infoMain div{
337
+    width: 50%;
338
+    line-height: 24px;
339
+}
340
+.prescriptionBox{
341
+    padding:0 10px;
342
+    min-height:400px;
343
+}
344
+.Rp{
345
+    font-size: 22px;
346
+    font-weight: bold;
347
+}
348
+.drugsBox{
349
+    padding-left: 40px;
350
+    margin-bottom: 10px;
351
+}
352
+.drugsBox div{
353
+    line-height: 20px;
354
+}
355
+.drugsOne{
356
+    line-height: 24px;
357
+}
358
+.drugsOne span{
359
+    margin-right: 20px;
360
+}
361
+.doctorBox{
362
+    display: flex;
363
+    justify-content: space-between;
364
+    padding:0 10px;
365
+    line-height: 24px;
366
+    border-bottom: 2px solid #000;
367
+}
368
+.actionBar{
369
+    display: flex;
370
+    justify-content: space-between; 
371
+    line-height: 24px;
372
+    padding:0 10px;
373
+}
374
+.actionBar p{
375
+    width:150px;
376
+}
377
+.under_line{
378
+  display: inline-block;
379
+  border-bottom: 1px solid #000;
380
+  flex: 1;
381
+}
382
+</style>

+ 26 - 9
src/xt_pages/outpatientDoctorStation/treatPrint.vue View File

@@ -13,7 +13,8 @@
13 13
       </template>
14 14
             
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
16
+        <printOne v-if="org_id != 4" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
+        <printTwo v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>
17 18
       </div>
18 19
   </div>
19 20
 </template>
@@ -29,12 +30,14 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
29 30
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
30 31
 import print from "print-js";
31 32
 import printOne from "./treatTemplate/printOne"
33
+import printTwo from "./treatTemplate/printTwo"
32 34
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
33 35
 export default {
34 36
   name: "dialysisPrintOrder",
35 37
   components: {
36 38
     BreadCrumb,
37
-    printOne
39
+    printOne,
40
+    printTwo
38 41
   },
39 42
   props:{
40 43
     paramsObj:Object
@@ -62,14 +65,27 @@ export default {
62 65
       var ptime = Math.round(new Date().getTime() / 1000);
63 66
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
64 67
 
65
-      const style =
68
+      if(this.org_id == 4){
69
+        
70
+        const style =
71
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}}';
72
+        printJS({
73
+          printable: "prescriptionPrint",
74
+          type: "html",
75
+          style: style,
76
+          scanStyles: false
77
+        });
78
+      }else{
79
+        const style =
66 80
         '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
67
-      printJS({
68
-        printable: "prescriptionPrint",
69
-        type: "html",
70
-        style: style,
71
-        scanStyles: false
72
-      });
81
+        printJS({
82
+          printable: "prescriptionPrint",
83
+          type: "html",
84
+          style: style,
85
+          scanStyles: false
86
+        });
87
+      }
88
+      
73 89
 
74 90
       // if (this.org_template_info.template_id == 1) {
75 91
       //   printJS({
@@ -151,6 +167,7 @@ export default {
151 167
   },
152 168
 
153 169
   created() {
170
+    this.org_id = this.$store.getters.xt_user.org_id
154 171
     this.getAllDoctorList()
155 172
     var record_date = this.paramsObj.record
156 173
     this.record_date = record_date

+ 482 - 0
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue View File

@@ -0,0 +1,482 @@
1
+<template>
2
+   <div id='prescriptionPrint'>
3
+    <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4
+
5
+        <img src="../../../assets/img/bailinTop.jpg" alt="">
6
+        <div class="printTitle">治疗单</div>
7
+        <div style="display:flex;">
8
+            <div style="width:33%;display:flex;">费别:<span class="under_line">深圳医保1档</span></div>
9
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line">1111111</span></div>
10
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line">8972392771</span></div>
11
+        </div>
12
+
13
+
14
+        <div class="infoTitle">
15
+            <div>姓名:{{item.patient.name?item.patient.name:""}}</div>
16
+            <div>性别:
17
+            <span v-if="item.patient.gender == 1">男</span>
18
+            <span v-if="item.patient.gender == 2">女</span>
19
+            </div>
20
+            <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
21
+        </div>
22
+        <div class="infoMain">
23
+            <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
24
+            <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line">{{item.info?getDepart(item.info.departments):''}}</span></div>
25
+            <div style="margin-bottom: 10px;display:flex;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
26
+            <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
27
+            <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
28
+            <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
29
+            <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
30
+            <!-- <div>地址:{{item.patient.home_address}}</div> -->
31
+            <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
32
+        </div>
33
+
34
+        <!-- <div class="prescriptionBox">
35
+            <table style="width:100%;text-align:center;line-height:25px;">
36
+                <tr>
37
+                    <td>序号</td>
38
+                    <td>项目名称</td>
39
+                    <td>数量</td>
40
+                    <td>单位</td>
41
+                    <td>单价</td>
42
+                    <td>部位</td>
43
+                    <td>备注</td>
44
+                    <td>天数</td>
45
+                </tr>
46
+                <tr v-for="(it,index) in item.project" :key="index">
47
+                    <td>{{index+1}}</td>
48
+                    <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
49
+                    <td>{{it.single_dose}}</td>
50
+                    <td>{{getUnit(it.unit)}}</td>
51
+                    <td>{{it.price}}</td>
52
+                    <td></td>
53
+                    <td>{{it.remark}}</td>
54
+                    <td>{{it.day}}</td>
55
+
56
+                </tr>
57
+
58
+                <tr v-for="(it,index) in item.advices" :key="index">
59
+                    <td>{{index+1}}</td>
60
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
61
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
62
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
63
+                    <td>{{it.price}}</td>
64
+                    <td></td>
65
+                    <td>{{it.remark}}</td>
66
+                    <td>{{it.day}}</td>
67
+
68
+                </tr>
69
+            </table>
70
+        </div> -->
71
+        <div class="prescriptionBox">
72
+              <div class="Rp">Rp:</div>
73
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
74
+                  <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
75
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
76
+              </div>
77
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
78
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
79
+              </div>
80
+              <div style="text-align:center;" >(以下空白)</div>
81
+        </div>
82
+        <div style="display:flex;">
83
+            <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
84
+            <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div>
85
+          </div>
86
+          <div style="display:flex;">
87
+            <div style="display:flex;">核对护士:</div>
88
+          </div>
89
+          <div style="display:flex;">
90
+            打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
91
+          </div>
92
+          <img src="../../../assets/img/bailinBottom.jpg" alt="">
93
+          <div style="page-break-after:always"></div>
94
+     </div>
95
+
96
+
97
+    <!-- <div id='prescriptionPrint'>
98
+
99
+        <div v-for="(item,index) in advicePrint" :key="index">
100
+            <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
101
+                <div style="display:flex;justify-content: space-between;font-weight:bold;">
102
+                    <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
103
+                        <span>费别</span>
104
+                        <span>自费</span>
105
+                        <span>公费</span>
106
+                        <span>保险</span>
107
+                        <span>其他</span>
108
+                    </div>
109
+                    <div>就诊日期:{{getTime(item.ctime)}}</div>
110
+                </div>
111
+
112
+                <div class="printTitle">血液透析中心</div>
113
+
114
+                <div class="printTitle">处方、治疗单</div>
115
+
116
+                <div class="infoTitle">
117
+                    <div>门诊编号:</div>
118
+                    <div>电脑号:</div>
119
+                </div>
120
+
121
+                <div class="infoMain">
122
+                    <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
123
+                    <div style="margin-bottom: 10px;width:25%">性别:
124
+                        <span v-if="item.patient.gender == 1">男</span>
125
+                        <span v-if="item.patient.gender == 2">女</span>
126
+                    </div>
127
+                    <div style="margin-bottom: 10px;width:25%">年龄:
128
+                        <span>{{item.patient.age}}</span>
129
+                    </div>
130
+                    <div style="margin-bottom: 10px;width:25%">参保类型:</div>
131
+                    <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
132
+                    <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
133
+                    <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
134
+                </div>
135
+
136
+                <div class="prescriptionBox">
137
+                    <table style="width:100%;text-align:center;line-height:25px;">
138
+                        <tr>
139
+                            <td>序号</td>
140
+                            <td>项目名称</td>
141
+                            <td>数量</td>
142
+                            <td>单位</td>
143
+                            <td>单价</td>
144
+                            <td>部位</td>
145
+                            <td>备注</td>
146
+                            <td>天数</td>
147
+                        </tr>
148
+                        <tr v-for="(it,index) in item.project" :key="index">
149
+                            <td>{{index+1}}</td>
150
+                            <td>{{getProjectName(it.project_id)}}</td>
151
+                            <td>{{it.single_dose}}</td>
152
+                            <td>{{getUnit(it.unit)}}</td>
153
+                            <td>{{it.price}}</td>
154
+                            <td></td>
155
+                            <td>{{it.remark}}</td>
156
+                            <td>{{it.day}}</td>
157
+
158
+                        </tr>
159
+                    </table>
160
+                </div>
161
+                <div class="infoTitle">
162
+                    <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
163
+                    <div>签章:</div>
164
+                </div>
165
+                <div class="actionBar">
166
+                    <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
167
+                    <div>费用:</div>
168
+                </div>
169
+                <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
170
+                    <tr>
171
+                        <td style="width:16%;">治疗时间</td>
172
+                        <td style="width:16%;"></td>
173
+                        <td style="width:16%;"></td>
174
+                        <td style="width:16%;"></td>
175
+                        <td style="width:16%;"></td>
176
+                        <td style="width:16%;"></td>
177
+                    </tr>
178
+                    <tr>
179
+                        <td style="width:16%;">医生签字</td>
180
+                        <td style="width:16%;"></td>
181
+                        <td style="width:16%;"></td>
182
+                        <td style="width:16%;"></td>
183
+                        <td style="width:16%;"></td>
184
+                        <td style="width:16%;"></td>
185
+                    </tr>
186
+                    <tr>
187
+                        <td style="width:16px;">患者签字</td>
188
+                        <td style="width:16px;"></td>
189
+                        <td style="width:16px;"></td>
190
+                        <td style="width:16px;"></td>
191
+                        <td style="width:16px;"></td>
192
+                        <td style="width:16px;"></td>
193
+                    </tr>
194
+                </table>
195
+            </div>
196
+
197
+        </div>
198
+
199
+    </div> -->
200
+  </div>
201
+</template>
202
+<script>
203
+import { jsGetAge, uParseTime } from '@/utils/tools'
204
+import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
205
+import {getInitData} from "@/api/his/his"
206
+export default {
207
+    props:{
208
+      patient_id:Number,
209
+      record_date:String,
210
+      prescription_id:Number,
211
+      ids:String
212
+    },
213
+    data(){
214
+      return {
215
+        doctorList:[],
216
+        advicePrint:{},
217
+        patient:{},
218
+        tableData:[],
219
+        prescriptionInfo:[],
220
+        projectList:[],
221
+        prescriptions:[],
222
+        settlement:
223
+         [
224
+          {value: 1,label: '医保'},
225
+          {value: 2,label: '自费'},
226
+          {value: 3,label:'公费'},
227
+          {value: 4,label:'农保'},
228
+          {value: 5,label:'会员'},
229
+          {value: 6,label:'职工'},
230
+          {value: 7,label:'合同'}
231
+         ],
232
+         hisPatient:{},
233
+         diagnoses:[],
234
+         department:[],
235
+      }
236
+    },
237
+   methods:{
238
+     printThisPage() {
239
+      var ptime = Math.round(new Date().getTime() / 1000);
240
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
241
+
242
+      const style =
243
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}';
244
+      printJS({
245
+        printable: "prescription-print",
246
+        type: "html",
247
+        style: style,
248
+        scanStyles: false
249
+      });
250
+    },
251
+    getDepart(id){
252
+        var name = ""
253
+        for(let i=0;i<this.department.length;i++){
254
+            if(id == this.department[i].id){
255
+                name = this.department[i].name
256
+            }
257
+        }
258
+        return name
259
+    },
260
+     getAllDoctorList(){
261
+      getAllDoctorList().then(response=>{
262
+        if(response.data.state == 1){
263
+               var doctor =  response.data.data.doctor
264
+
265
+               this.doctorList = doctor
266
+             }
267
+         })
268
+     },
269
+
270
+      getDoctor(id){
271
+        var name = ""
272
+        for(let i=0;i<this.doctorList.length;i++){
273
+          if(id == this.doctorList[i].admin_user_id){
274
+              name = this.doctorList[i].user_name
275
+          }
276
+        }
277
+        return name
278
+      },
279
+      getTime(value, temp) {
280
+        if (value != undefined) {
281
+            return uParseTime(value, temp)
282
+        }
283
+        return ''
284
+     },
285
+     getPrescriptionPrint(){
286
+         var params = {
287
+          patient_id:this.patient_id,
288
+          record_date:this.record_date,
289
+          prescription_id:this.prescription_id,
290
+          ids:this.ids,
291
+        }
292
+        console.log("999999",params)
293
+       getPrescriptionPrint(params).then(response=>{
294
+         if(response.data.state == 1){
295
+            var advicePrint =  response.data.data.advicePrint
296
+            console.log("adviceprint",advicePrint)
297
+            this.advicePrint = advicePrint
298
+            this.prescriptions = advicePrint
299
+            var projectlist =  response.data.data.projectlist
300
+            console.log("所有项目列表",projectlist)
301
+            this.projectList = projectlist
302
+            this.hisPatient = response.data.data.hisPatient
303
+
304
+          }
305
+       })
306
+     },
307
+     getProjectName(id){
308
+        var project_name = ""
309
+        for(let i=0;i<this.projectList.length;i++){
310
+           if(id == this.projectList[i].id){
311
+               project_name = this.projectList[i].project_name
312
+           }
313
+        }
314
+        return project_name
315
+     },
316
+     getUnit(id){
317
+        var unit=""
318
+       for(let i=0;i<this.projectList.length;i++){
319
+           if(id == this.projectList[i].id){
320
+               unit = this.projectList[i].unit
321
+           }
322
+        }
323
+        return unit
324
+     },
325
+
326
+       getTotalOne(id) {
327
+
328
+        var total = 0
329
+        var addtotal = 0
330
+        for (let i = 0; i < this.prescriptions.length; i++) {
331
+          if(id == this.prescriptions[i].id){
332
+            if (this.prescriptions[i].project != null) {
333
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
334
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
335
+              }
336
+            }
337
+
338
+            if (this.prescriptions[i].additionalcharge != null) {
339
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
340
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
341
+              }
342
+            }
343
+              addtotal =  Math.floor(addtotal * 100) / 100
344
+        }
345
+
346
+       }
347
+
348
+      for (let i = 0; i < this.prescriptions.length; i++) {
349
+          if(id == this.prescriptions[i].id){
350
+            if (this.prescriptions[i].advices != null) {
351
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
352
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
353
+              }
354
+            }
355
+
356
+            if (this.prescriptions[i].additionalcharge != null) {
357
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
358
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
359
+              }
360
+            }
361
+              addtotal =  Math.floor(addtotal * 100) / 100
362
+        }
363
+       }
364
+
365
+        return total + addtotal
366
+      },
367
+     getInitData(){
368
+       getInitData().then(response=>{
369
+          if(response.data.state == 1){
370
+            this.department = response.data.data.department
371
+            this.diagnoses = response.data.data.diagnose
372
+            console.log("争端",this.diagnoses)
373
+          }
374
+       })
375
+     },
376
+     getDiagnosis(id){
377
+        var name = ""
378
+        for(let i=0;i<this.diagnoses.length;i++){
379
+          if(id == this.diagnoses[i].id){
380
+             name = this.diagnoses[i].class_name
381
+          }
382
+        }
383
+        return name
384
+     }
385
+   },
386
+   created(){
387
+      this.getInitData()
388
+      this.getAllDoctorList()
389
+      this.getPrescriptionPrint()
390
+      var xtuser = this.$store.getters.xt_user
391
+      this.orgname = xtuser.org.org_name
392
+
393
+   },
394
+   watch:{
395
+     patient_id:function(val){
396
+       console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
397
+    //    this.getPrescriptionPrint()
398
+     },
399
+     ids:function(val){
400
+         this.ids = val
401
+         console.log('this.idsids',this.ids)
402
+         this.getPrescriptionPrint()
403
+     }
404
+   }
405
+}
406
+</script>
407
+
408
+
409
+<style lang="scss" scoped>
410
+.prescription-print{
411
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
412
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
413
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
414
+    margin-bottom: 20px;
415
+    padding:20px 10px;
416
+}
417
+.printTitle{
418
+    font-size: 22px;
419
+    text-align: center;
420
+    font-weight: bold;
421
+    margin-bottom: 10px;
422
+}
423
+.infoTitle{
424
+    display: flex;
425
+    margin-top:10px;
426
+    line-height: 24px;
427
+}
428
+.infoTitle div{
429
+    width: 200px;
430
+}
431
+.infoMain{
432
+    display: flex;
433
+    flex-wrap: wrap;
434
+    margin-top:10px;
435
+}
436
+.infoMain div{
437
+    width: 50%;
438
+    line-height: 24px;
439
+}
440
+.prescriptionBox{
441
+    padding:0 10px;
442
+    min-height:400px;
443
+}
444
+.Rp{
445
+    font-size: 22px;
446
+    font-weight: bold;
447
+}
448
+.drugsBox{
449
+    padding-left: 40px;
450
+    margin-bottom: 10px;
451
+}
452
+.drugsBox div{
453
+    line-height: 20px;
454
+}
455
+.drugsOne{
456
+    line-height: 24px;
457
+}
458
+.drugsOne span{
459
+    margin-right: 20px;
460
+}
461
+.doctorBox{
462
+    display: flex;
463
+    justify-content: space-between;
464
+    padding:0 10px;
465
+    line-height: 24px;
466
+    border-bottom: 2px solid #000;
467
+}
468
+.actionBar{
469
+    display: flex;
470
+    justify-content: space-between; 
471
+    line-height: 24px;
472
+    padding:0 10px;
473
+}
474
+.actionBar p{
475
+    width:150px;
476
+}
477
+.under_line{
478
+  display: inline-block;
479
+  border-bottom: 1px solid #000;
480
+  flex: 1;
481
+}
482
+</style>