test_user 2 yıl önce
ebeveyn
işleme
d683cd8252

+ 739 - 0
src/xt_pages/outpatientDoctorStation/batch_print_template/batchPrintThree.vue Dosyayı Görüntüle

@@ -0,0 +1,739 @@
1
+<template>
2
+  <div>
3
+    <div id="prescriptionPrint1">
4
+      <div v-for="(i, index) in printData" :key="index">
5
+      <div v-for="(item, index) in i.prescriptions" :key="index">
6
+        <div
7
+          id="prescription-print"
8
+          class="prescription-print"
9
+          style="page-break-after: always"
10
+        >
11
+          <span v-if="org_id == 10138">
12
+            <img
13
+              src="https://kuyi.shengws.com/bailin/bltotle.jpg"
14
+              style="width: 100%"
15
+              alt=""
16
+            /></span>
17
+          <span v-if="org_id == 10278">
18
+            <img
19
+              src="https://kuyi.shengws.com/beierlog.png"
20
+              style="width: 100%"
21
+              alt=""
22
+            /></span>
23
+          <div class="printTitle">
24
+            处方笺
25
+            <span
26
+              v-if="item.med_type == '1111'"
27
+              style="margin-left: 50px; border: 1px solid #000"
28
+            >精一</span
29
+            >
30
+            <span
31
+              v-if="item.med_type == '1112'"
32
+              style="margin-left: 50px; border: 1px solid #000"
33
+            >精二</span
34
+            >
35
+
36
+          </div>
37
+          <div style="display: flex;">
38
+            <div style="width: 33%; display: flex">
39
+              费别:
40
+              <span class="under_line">
41
+                <span v-if=" i.his_patient.id > 0">{{
42
+                    i.his_patient.balance_accounts_type == 1 ? '医保':'自费'
43
+                  }}</span>
44
+                   <span v-else>{{
45
+                     }}</span>
46
+            </span>
47
+            </div>
48
+            <div style="width: 20%;"></div>
49
+            <div style="width: 33%; display: flex">
50
+              医保类型:
51
+              <span class="under_line" v-if="i.reimbursement_way_id == 20">
52
+               {{'医保一档'}}
53
+              </span>
54
+              <span class="under_line" v-if="i.reimbursement_way_id == 21">
55
+               {{'医保二档'}}
56
+              </span>
57
+              <span class="under_line" v-if="i.reimbursement_way_id == 22">
58
+               {{'医保三档'}}
59
+              </span>
60
+              <span class="under_line" v-if="i.reimbursement_way_id != 20 && i.reimbursement_way_id != 21 && i.reimbursement_way_id != 22">
61
+              </span>
62
+            </div>
63
+          </div>
64
+          <div style="display: flex;margin-top: 10px;">
65
+            <div style="width: 40%; display: flex">
66
+              电脑号:<span class="under_line">{{
67
+                i.his_patient.id_card_no
68
+              }}</span>
69
+            </div>
70
+            <div style="width: 13%;"></div>
71
+            <div style="width: 33%; display: flex">
72
+              处方编号:<span class="under_line">{{
73
+                item.prescription_number.substring(
74
+                  item.prescription_number.length - 6
75
+                )
76
+              }}</span>
77
+            </div>
78
+          </div>
79
+
80
+          <div class="infoTitle">
81
+            <div>
82
+              姓名:{{
83
+                i.name
84
+                  ? i.name.indexOf("(") > -1
85
+                  ?i.name.substring(
86
+                    0,
87
+                    i.name.indexOf("(")
88
+                  )
89
+                  : i.name
90
+                  : ""
91
+              }}
92
+            </div>
93
+            <div>
94
+              性别:
95
+              <span v-if="i.gender == 1">男</span>
96
+              <span v-if="i.gender == 2">女</span>
97
+            </div>
98
+            <div>
99
+              年龄:{{
100
+                getNewAge(i.birthday)
101
+                  ? getNewAge(i.birthday)
102
+                  : ""
103
+              }}岁
104
+            </div>
105
+          </div>
106
+          <div class="infoMain">
107
+            <div style="margin-bottom: 10px; display: flex">
108
+              门诊号码:<span class="under_line" >{{ i.his_patient.id != 0 ? i.his_patient.number : "" }}</span>
109
+            </div>
110
+            <div style="margin-bottom: 10px; display: flex">
111
+              科别:<span class="under_line" > {{
112
+                i.info.id != 0
113
+                  ? getDepart(i.info.departments)
114
+                  : ""
115
+              }}</span>
116
+            </div>
117
+            <div style="margin-bottom: 10px; display: flex">
118
+              临床诊断:{{ getDiagnosis(i.info.diagnosis)}}
119
+            </div>
120
+            <div style="margin-bottom: 10px; display: flex">
121
+              自费药品签名:<span class="under_line"></span>
122
+            </div>
123
+            <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
124
+            <div style="margin-bottom: 10px; display: flex">
125
+              联系方式:<span class="under_line">{{ i.phone }}</span>
126
+            </div>
127
+            <div style="margin-bottom: 10px; display: flex">
128
+              开具日期:<span class="under_line">{{
129
+                getTime(item.pre_time)
130
+                  ? getTime(item.pre_time).split(" ")[0]
131
+                  : ""
132
+              }}</span>
133
+            </div>
134
+            <!-- <div>地址:{{item.patient.home_address}}</div> -->
135
+            <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
136
+          </div>
137
+          <div class="prescriptionBox">
138
+            <div class="Rp">Rp:</div>
139
+            <div
140
+              class="drugsBox"
141
+              v-for="(it, index) in item.advices"
142
+              :key="index"
143
+            >
144
+              <!-- <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> -->
145
+              <div class="drugsOne">
146
+                <span style="font-weight: bold">{{ index + 1 + "." }}</span
147
+                >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
148
+                v-if="it.drug.min_unit != it.drug.dose_unit"
149
+              >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
150
+              >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
151
+                  it.drug.max_unit
152
+                }}&nbsp;×&nbsp; {{ it.prescribing_number
153
+                }}{{ it.prescribing_number_unit }}
154
+              </div>
155
+              <div style="margin-left: 100px">
156
+                <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
157
+                >&nbsp;&nbsp;<span
158
+              >{{ it.execution_frequency }}&nbsp;{{
159
+                  it.delivery_way
160
+                }}&nbsp;</span
161
+              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
162
+              </div>
163
+            </div>
164
+            <div
165
+              class="drugsBox"
166
+              v-for="(it, i) in item.additionalcharge"
167
+              :key="i"
168
+            >
169
+              <div class="drugsOne">
170
+                {{ it.item_name ? it.item_name : "" }}:&nbsp;{{
171
+                  it.price.toFixed(2)
172
+                }}元/{{ it.count }}次
173
+              </div>
174
+            </div>
175
+
176
+            <!-- <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
177
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
178
+                  <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>
179
+              </div>
180
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
181
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
182
+              </div> -->
183
+            <div style="text-align: center">(以下空白)</div>
184
+          </div>
185
+          <div style="display: flex">
186
+            <div>
187
+              医&nbsp;&nbsp;&nbsp;&nbsp;师:
188
+              <span
189
+                style="width: 100px; display: inline-block"
190
+                v-if="i.info.creator == 0"
191
+              >
192
+               {{ i.info.doctor ? i.info.doctor : "" }}
193
+              </span>
194
+              <img
195
+                style="height: 30px"
196
+                :src="setAdminUserES(i.info.creator)"
197
+                alt=""
198
+                srcset=""
199
+                v-else
200
+              />
201
+            </div>
202
+            <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}</div> -->
203
+          </div>
204
+          <div style="display: flex">
205
+            <div style="display: flex">
206
+              审核药师:<span style="width: 100px" class="under_line"></span>
207
+            </div>
208
+            <div style="display: flex">
209
+              调剂药师:<span style="width: 100px" class="under_line"></span>
210
+            </div>
211
+            <div style="display: flex">
212
+              核对/发药药师:<span
213
+              style="width: 100px"
214
+              class="under_line"
215
+            ></span>
216
+            </div>
217
+          </div>
218
+          <div>
219
+            打印日期:{{ getTime(new Date()) ? getTime(new Date()) : "" }}
220
+          </div>
221
+          <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
222
+          <div>*药品属于特殊商品,非质量问题不允许退换</div>
223
+          <span v-if="org_id == 10138"
224
+          ><img
225
+            src="https://kuyi.shengws.com/bailin/blend.jpg"
226
+            style="width: 100%"
227
+            alt=""
228
+          /></span>
229
+          <span v-if="org_id == 10278"
230
+          ><img
231
+            src="https://kuyi.shengws.com/bailinbeier.png"
232
+            style="width: 100%"
233
+            alt=""
234
+          /></span>
235
+          <!-- <div class="doctorBox">
236
+              <p>医师:{{item.doctor?item.doctor:""}}</p>
237
+              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
238
+          </div>
239
+          <div class="actionBar">
240
+
241
+                <p>审核:</p>
242
+                <p>配对:</p>
243
+                <p>核对:</p>
244
+                <p>发药:</p>
245
+                <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
246
+          </div> -->
247
+          <div style="page-break-after: always"></div>
248
+        </div>
249
+      </div>
250
+      </div>
251
+    </div>
252
+  </div>
253
+</template>
254
+<script>
255
+import { jsGetAge, uParseTime } from "@/utils/tools";
256
+import {
257
+  getAllDoctorList,
258
+  getPrescriptionPrint,
259
+  getHisPatientDetail,
260
+} from "@/api/project/project";
261
+import { getInitData } from "@/api/his/his";
262
+export default {
263
+  props: {
264
+    patient_id: Number,
265
+    record_date: String,
266
+    prescription_id: Number,
267
+    his_patient_id:Number,
268
+    ids: String,
269
+    newHisPatient:Object,
270
+    printData: Array,
271
+
272
+  },
273
+  data() {
274
+    return {
275
+      operatorMaps: {},
276
+      doctorList: [],
277
+      advicePrint: {},
278
+      patient: {},
279
+      tableData: [],
280
+      prescriptionInfo: [],
281
+      doc_name: "",
282
+      hisPatient: {},
283
+
284
+      department: [],
285
+      prescriptions: [],
286
+      projectList: [],
287
+      orgname: "",
288
+      diagnoses: [],
289
+      pageArr: [],
290
+      faber: {},
291
+      org_id: 0,
292
+      doctorList_1: [],
293
+    };
294
+  },
295
+  methods: {
296
+    // 电子签名
297
+    setAdminUserES(id) {
298
+      console.log(id)
299
+      console.log(this.operatorMaps)
300
+
301
+      if (id == 0) {
302
+        return "";
303
+      }
304
+      if (id in this.operatorMaps) {
305
+        return this.operatorMaps[id].url;
306
+      } else {
307
+        return "";
308
+      }
309
+    },
310
+
311
+    getNewAge(birthday) {
312
+      // var myDate = new Date(birthday * 1000)
313
+      // var month = myDate.getMonth() + 1
314
+      // var day = myDate.getDate()
315
+      // var age = new Date().getFullYear() - myDate.getFullYear()
316
+      // if (month < new Date().getMonth() + 1 || new Date().getMonth() + 1 == month && day <= new Date().getDate()) {
317
+      //   age++
318
+      // }
319
+      // return age
320
+      var nowTime = new Date().getTime();
321
+      //一年毫秒数(365 * 86400000 = 31536000000)
322
+      return Math.ceil((nowTime - birthday * 1000) / 31536000000);
323
+    },
324
+    getAge(patient) {
325
+      var thisLen = patient.id_card_no.length;
326
+      var birth = "";
327
+      if (thisLen == 15) {
328
+        birth = "19" + patient.id_card_no.substr(6, 6);
329
+      } else {
330
+        birth = patient.id_card_no.substr(6, 8);
331
+      }
332
+      var births =
333
+        birth.substr(0, 4) +
334
+        "-" +
335
+        birth.substr(4, 2) +
336
+        "-" +
337
+        birth.substr(6, 2);
338
+      return jsGetAge(births, "-");
339
+    },
340
+
341
+    getAllDoctorList() {
342
+      getAllDoctorList().then((response) => {
343
+        if (response.data.state == 1) {
344
+          var doctor = response.data.data.doctor;
345
+
346
+          this.doctorList = doctor;
347
+        }
348
+      });
349
+    },
350
+
351
+    getDoctor(id) {
352
+      var name = "";
353
+      for (let i = 0; i < this.doctorList.length; i++) {
354
+        if (id == this.doctorList[i].admin_user_id) {
355
+          name = this.doctorList[i].user_name;
356
+        }
357
+      }
358
+      return name;
359
+    },
360
+    getTime(value, temp) {
361
+      if (value != undefined) {
362
+        return uParseTime(value, temp);
363
+      }
364
+      return "";
365
+    },
366
+    getPrescriptionPrint() {
367
+      var params = {
368
+        // patient_id:this.patient_id,
369
+        // record_date:this.record_date,
370
+        // prescription_id:this.prescription_id,
371
+        patient_id: this.patient_id,
372
+        record_date: this.record_date,
373
+        prescription_id: this.prescription_id,
374
+        his_patient_id: this.his_patient_id,
375
+        ids: this.ids,
376
+        p_type: 2,
377
+      };
378
+      console.log("params", params);
379
+      getPrescriptionPrint(params).then((response) => {
380
+        if (response.data.state == 1) {
381
+          var advicePrint = response.data.data.advicePrint;
382
+          console.log("adviceprint9999", advicePrint);
383
+          this.advicePrint = advicePrint;
384
+
385
+          this.doctorList_1 = response.data.data.eles;
386
+          console.log(this.doctorList_1, "百霖医生列表");
387
+          if (this.doctorList_1.length > 0) {
388
+            var operatorsLen = this.doctorList_1.length;
389
+            for (var index = 0; index < operatorsLen; index++) {
390
+              this.$set(
391
+                this.operatorMaps,
392
+                this.doctorList_1[index].creator,
393
+                this.doctorList_1[index]
394
+              );
395
+            }
396
+          }
397
+
398
+          this.getPage();
399
+          this.prescriptions = advicePrint;
400
+          console.log("处方222222", this.prescriptions);
401
+          var hisPatient = response.data.data.hisPatient;
402
+          console.log("hisPatient", hisPatient);
403
+          this.hisPatient = hisPatient;
404
+          var projectlist = response.data.data.projectlist;
405
+          console.log("所有项目列表", projectlist);
406
+          this.projectList = projectlist;
407
+
408
+          let outputlist1Name = response.data.data.his.patient_info
409
+            ? JSON.parse(response.data.data.his.patient_info)
410
+            : {};
411
+          this.faber = outputlist1Name;
412
+        }
413
+      });
414
+    },
415
+    getHisPatientDetail() {
416
+      const params = {
417
+        patient_id: this.patient_id,
418
+      };
419
+      getHisPatientDetail(params).then((response) => {
420
+        if (response.data.state == 1) {
421
+          var hisPatient = response.data.data.hisPatient;
422
+          console.log("挂号病人", hisPatient);
423
+          this.hisPatient = hisPatient;
424
+        }
425
+      });
426
+    },
427
+    getInitData() {
428
+      getInitData().then((response) => {
429
+        if (response.data.state == 1) {
430
+          this.department = response.data.data.department;
431
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
432
+          console.log("争端", this.diagnoses);
433
+        }
434
+      });
435
+    },
436
+    getDepart(id) {
437
+      var name = "";
438
+      for (let i = 0; i < this.department.length; i++) {
439
+        if (id == this.department[i].id) {
440
+          name = this.department[i].name;
441
+        }
442
+      }
443
+      return name;
444
+    },
445
+    getTotalOne(id) {
446
+      console.log("id", id);
447
+      var total = 0;
448
+      var addtotal = 0;
449
+      for (let i = 0; i < this.prescriptions.length; i++) {
450
+        if (id == this.prescriptions[i].id) {
451
+          if (this.prescriptions[i].project != null) {
452
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
453
+              total =
454
+                total +
455
+                this.prescriptions[i].project[a].price *
456
+                this.prescriptions[i].project[a].count;
457
+            }
458
+          }
459
+
460
+          if (this.prescriptions[i].additionalcharge != null) {
461
+            for (
462
+              let a = 0;
463
+              a < this.prescriptions[i].additionalcharge.length;
464
+              a++
465
+            ) {
466
+              addtotal =
467
+                addtotal +
468
+                this.prescriptions[i].additionalcharge[a].price *
469
+                this.prescriptions[i].additionalcharge[a].count;
470
+            }
471
+          }
472
+          addtotal = Math.floor(addtotal * 100) / 100;
473
+        }
474
+      }
475
+
476
+      for (let i = 0; i < this.prescriptions.length; i++) {
477
+        if (id == this.prescriptions[i].id) {
478
+          if (this.prescriptions[i].advices != null) {
479
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
480
+              total =
481
+                total +
482
+                this.prescriptions[i].advices[a].price *
483
+                this.prescriptions[i].advices[a].prescribing_number;
484
+            }
485
+          }
486
+
487
+          if (this.prescriptions[i].additionalcharge != null) {
488
+            for (
489
+              let a = 0;
490
+              a < this.prescriptions[i].additionalcharge.length;
491
+              a++
492
+            ) {
493
+              addtotal =
494
+                addtotal +
495
+                this.prescriptions[i].additionalcharge[a].price *
496
+                this.prescriptions[i].additionalcharge[a].count;
497
+            }
498
+          }
499
+          addtotal = Math.floor(addtotal * 100) / 100;
500
+        }
501
+      }
502
+
503
+      return total + addtotal;
504
+    },
505
+
506
+    getProjectName(id) {
507
+      var project_name = "";
508
+      for (let i = 0; i < this.projectList.length; i++) {
509
+        if (id == this.projectList[i].id) {
510
+          project_name = this.projectList[i].project_name;
511
+        }
512
+      }
513
+      return project_name;
514
+    },
515
+
516
+    getDiagnosis(ids) {
517
+      let newIds = ids.split(",").sort(function (a, b) {
518
+        return a - b;
519
+      });
520
+      var name = "";
521
+      let nameArr = [];
522
+      for (let i = 0; i < this.diagnoses.length; i++) {
523
+        // if(id == this.diagnoses[i].id){
524
+        //    name = this.diagnoses[i].class_name
525
+        // }
526
+
527
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
528
+          // name += diagnoses[i].class_name + ' '
529
+          nameArr.push(this.diagnoses[i].class_name);
530
+        }
531
+      }
532
+      let newNameArr = [];
533
+      nameArr.map((item, index) => {
534
+        if (item == "尿毒症") {
535
+          newNameArr.push(item);
536
+          nameArr.splice(index, 1, "");
537
+        }
538
+      });
539
+      newNameArr.push(...nameArr);
540
+      return newNameArr.join(" ");
541
+    },
542
+    compare(property) {
543
+      return function (a, b) {
544
+        var value1 = a[property];
545
+        var value2 = b[property];
546
+        return value1 - value2; //升序排序
547
+      };
548
+    },
549
+    getPage() {
550
+      this.page = 1;
551
+      this.pageArr = [];
552
+
553
+      this.advicePrint.map((item) => {
554
+        let arr = [];
555
+        item.pageArr = [];
556
+        if (item.advices.length <= 5) {
557
+          this.page = 1;
558
+          arr.push(item.advices.length);
559
+          item.pageArr.push(arr);
560
+        } else if (item.advices.length > 5) {
561
+          this.page = parseInt(item.advices.length / 5);
562
+          let num = item.advices.length % 5;
563
+          for (var i = 0; i < this.page; i++) {
564
+            item.pageArr.push([5]);
565
+          }
566
+          if (num != 0) {
567
+            item.pageArr.push([num]);
568
+          }
569
+        }
570
+      });
571
+      // console.log('this.pageArr',this.pageArr)
572
+    },
573
+    getName(list) {
574
+      console.log("list", list);
575
+      let new_list = [];
576
+      for (let i = 0; i < list.length; i++) {
577
+        if (list[i].aac031 == "1") {
578
+          new_list.push(list[i]);
579
+        }
580
+      }
581
+
582
+      switch (new_list[0].bcc334) {
583
+        case "A31001":
584
+          return "深圳医保1档";
585
+          break;
586
+        case "A31002":
587
+          return "深圳医保2档";
588
+
589
+          break;
590
+        case "A31003":
591
+          return "深圳医保3档";
592
+
593
+          break;
594
+        case "A31004":
595
+          return "二档(少儿)";
596
+
597
+          break;
598
+        case "A31005":
599
+          return "学生二档";
600
+
601
+          break;
602
+        case "A31006":
603
+          return "大学生二档";
604
+
605
+          break;
606
+        case "A32001":
607
+          return "在职公务员";
608
+          break;
609
+        case "A32002":
610
+          return "在职驻深公务员";
611
+
612
+          break;
613
+        case "A39301":
614
+          return "家属统筹医疗";
615
+
616
+          break;
617
+        case "A41001":
618
+          return "工伤在职";
619
+
620
+          break;
621
+        case "A51001":
622
+          return "生育在职";
623
+
624
+          break;
625
+        case "A52001":
626
+          return "生育医疗一档";
627
+
628
+          break;
629
+        case "A52002":
630
+          return "生育医疗一档";
631
+
632
+          break;
633
+        case "C31001":
634
+          return "一档医疗退休";
635
+
636
+          break;
637
+        case "C31002":
638
+          return "二档医疗退休";
639
+          break;
640
+      }
641
+    },
642
+  },
643
+  created() {
644
+    this.getPrescriptionPrint();
645
+    this.getAllDoctorList();
646
+    this.getInitData();
647
+
648
+    this.getHisPatientDetail();
649
+    var xtuser = this.$store.getters.xt_user;
650
+    this.orgname = xtuser.org.org_name;
651
+    this.org_id = this.$store.getters.xt_user.org.id;
652
+  },
653
+  watch: {
654
+    ids: function (val) {
655
+      console.log("val1111111111111111111111111111", val);
656
+      this.ids = val;
657
+      this.getPrescriptionPrint();
658
+    },
659
+  },
660
+};
661
+</script>
662
+
663
+
664
+<style lang="scss" scoped>
665
+.prescription-print {
666
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
667
+  0 0 60px rgba(0, 0, 0, 0.06) inset;
668
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
669
+  0 0 40px rgba(0, 0, 0, 0.06) inset;
670
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
671
+  margin-bottom: 20px;
672
+  padding: 20px 10px;
673
+}
674
+.printTitle {
675
+  font-size: 22px;
676
+  text-align: center;
677
+  font-weight: bold;
678
+  margin-bottom: 10px;
679
+}
680
+.infoTitle {
681
+  display: flex;
682
+  margin-top: 10px;
683
+  line-height: 24px;
684
+}
685
+.infoTitle div {
686
+  width: 200px;
687
+}
688
+.infoMain {
689
+  display: flex;
690
+  flex-wrap: wrap;
691
+  margin-top: 10px;
692
+}
693
+.infoMain div {
694
+  width: 50%;
695
+  line-height: 24px;
696
+}
697
+.prescriptionBox {
698
+  padding: 0 10px;
699
+  min-height: 400px;
700
+}
701
+.Rp {
702
+  font-size: 22px;
703
+  font-weight: bold;
704
+}
705
+.drugsBox {
706
+  padding-left: 40px;
707
+  margin-bottom: 10px;
708
+}
709
+.drugsBox div {
710
+  line-height: 20px;
711
+}
712
+.drugsOne {
713
+  line-height: 24px;
714
+}
715
+.drugsOne span {
716
+  margin-right: 20px;
717
+}
718
+.doctorBox {
719
+  display: flex;
720
+  justify-content: space-between;
721
+  padding: 0 10px;
722
+  line-height: 24px;
723
+  border-bottom: 2px solid #000;
724
+}
725
+.actionBar {
726
+  display: flex;
727
+  justify-content: space-between;
728
+  line-height: 24px;
729
+  padding: 0 10px;
730
+}
731
+.actionBar p {
732
+  width: 150px;
733
+}
734
+.under_line {
735
+  display: inline-block;
736
+  border-bottom: 1px solid #000;
737
+  flex: 1;
738
+}
739
+</style>

+ 8 - 3
src/xt_pages/outpatientDoctorStation/batch_print_template/index.vue Dosyayı Görüntüle

@@ -13,14 +13,16 @@
13 13
       </template> -->
14 14
 
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <div v-if="org_id != 10138 && org_id != 10278">
16
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 0">
17 17
         <printOne v-if="org_id != 10215" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18 18
 <!--        <batch-print-two v-if="org_id == 10088 || org_id == 0" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></batch-print-two>-->
19 19
 <!--        <print-six v-if="org_id == 10088 || org_id == 0" :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></print-six>-->
20 20
 <!--        <printFour v-if="org_id == 10088 || org_id == 0"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>-->
21 21
 <!--        <printFive v-if="org_id == 10215" 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"></printFive>-->
22 22
       </div>
23
-
23
+      <div v-else>
24
+        <batch-print-three  :printData="printData"  :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></batch-print-three>
25
+      </div>
24 26
     </div>
25 27
   </div>
26 28
 </template>
@@ -40,13 +42,16 @@ import printFour from "./batchPrintTwo"
40 42
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
41 43
 import PrintSix from '../template/printSix'
42 44
 import BatchPrintTwo from './batchPrintTwo'
45
+import BatchPrintThree from './batchPrintThree'
46
+
43 47
 export default {
44 48
   name: "dialysisPrintOrder",
45 49
   components: {
46 50
     BatchPrintTwo,
47 51
     PrintSix,
48 52
     BreadCrumb,
49
-    printOne
53
+    printOne,
54
+    BatchPrintThree
50 55
   },
51 56
   props:{
52 57
     paramsObj:Object,

+ 5 - 1
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/index.vue Dosyayı Görüntüle

@@ -15,6 +15,7 @@
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16 16
         <printOne v-if="org_id != 10138 && org_id != 10278 && org_id != 0" :printData="printData" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17 17
 <!--        <printTwo v-else :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>-->
18
+        <treat-batch-print v-if="org_id == 10138 || org_id == 10278 || org_id == 0"   :printData="printData" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></treat-batch-print>
18 19
       </div>
19 20
   </div>
20 21
 </template>
@@ -32,9 +33,11 @@ import print from "print-js";
32 33
 import printOne from "./printOne"
33 34
 // import printTwo from "./printTwo"
34 35
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
36
+import TreatBatchPrint from "./treatBatchPrint";
35 37
 export default {
36 38
   name: "dialysisPrintOrder",
37 39
   components: {
40
+    TreatBatchPrint,
38 41
     BreadCrumb,
39 42
     printOne
40 43
   },
@@ -48,6 +51,7 @@ export default {
48 51
         { path: false, name: '门诊医生站' },
49 52
         { path: false, name: '打印' }
50 53
       ],
54
+      org_id:"",
51 55
       record_date:"",
52 56
       patientTableData:[],
53 57
       advicePrint:[],
@@ -170,7 +174,7 @@ export default {
170 174
   },
171 175
 
172 176
   created() {
173
-    // this.org_id = this.$store.getters.xt_user.org_id
177
+    this.org_id = this.$store.getters.xt_user.org_id
174 178
     // this.getAllDoctorList()
175 179
     // var record_date = this.paramsObj.record_date
176 180
     // this.record_date = record_date

+ 796 - 0
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/treatBatchPrint.vue Dosyayı Görüntüle

@@ -0,0 +1,796 @@
1
+<template>
2
+  <div id="prescriptionPrint2">
3
+    <div v-for="(i,index) in printData">
4
+
5
+    <div
6
+      id="prescription-print"
7
+      class="prescription-print"
8
+      v-for="(item,index) in i.prescriptions"
9
+      :key="index"
10
+    >
11
+      <span v-if="org_id == 10138">
12
+        <img
13
+          src="https://kuyi.shengws.com/bailin/bltotle.jpg"
14
+          style="width: 100%"
15
+          alt=""
16
+        /></span>
17
+      <span v-if="org_id == 10278">
18
+        <img
19
+          src="https://kuyi.shengws.com/beierlog.png"
20
+          style="width: 100%"
21
+          alt=""
22
+        /></span>
23
+      <div class="printTitle">
24
+        治疗单
25
+        <span
26
+          v-if="item.med_type == '1111'"
27
+          style="margin-left: 50px; border: 1px solid #000"
28
+        >精一</span
29
+        >
30
+        <span
31
+          v-if="item.med_type == '1112'"
32
+          style="margin-left: 50px; border: 1px solid #000"
33
+        >精二</span>
34
+      </div>
35
+      <div style="display: flex">
36
+        <div style="width: 33%; display: flex">
37
+          费别:
38
+          <span class="under_line">
39
+                <span v-if="i.his_patient.id > 0">{{
40
+                    i.his_patient.balance_accounts_type == 1 ? '医保':'自费'
41
+                  }}</span>
42
+                   <span v-else>{{
43
+                     }}</span>
44
+            </span>
45
+        </div>
46
+        <div style="width: 33%; display: flex">
47
+          电脑号:  <span class="under_line">
48
+                <span>{{
49
+                    i.his_patient.id_card_no
50
+                  }}</span>
51
+            </span>
52
+        </div>
53
+        <div style="width: 33%; display: flex">
54
+          处方编号:<span class="under_line">{{
55
+            item.prescription_number.substring(
56
+              item.prescription_number.length - 6
57
+            )
58
+          }}</span>
59
+        </div>
60
+      </div>
61
+
62
+      <div class="infoTitle">
63
+        <div>
64
+          姓名:{{
65
+            i.name
66
+              ? i.name.indexOf("(") > -1
67
+              ?i.name.substring(
68
+                0,
69
+                i.name.indexOf("(")
70
+              )
71
+              : i.name
72
+              : ""
73
+          }}
74
+        </div>
75
+        <div>
76
+          性别:
77
+          <span v-if="i.gender == 1">男</span>
78
+          <span v-if="i.gender == 2">女</span>
79
+        </div>
80
+        <div>
81
+          年龄:{{
82
+            getNewAge(i.birthday)
83
+              ? getNewAge(i.birthday)
84
+              : ""
85
+          }}岁
86
+        </div>
87
+      </div>
88
+      <div class="infoMain">
89
+        <div style="margin-bottom: 10px; display: flex">
90
+          门诊号码:<span class="under_line">{{ i.his_patient.id != 0 ? i.his_patient.number : "" }}</span>
91
+        </div>
92
+        <div style="margin-bottom: 10px; display: flex">
93
+          科别:<span class="under_line">{{
94
+            i.info.id != 0
95
+              ? getDepart(i.info.departments)
96
+              : ""
97
+          }}</span>
98
+        </div>
99
+        <div style="margin-bottom: 10px; display: flex">
100
+          临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
101
+        </div>
102
+        <div style="margin-bottom: 10px; display: flex">
103
+          自费药品签名:<span class="under_line"></span>
104
+        </div>
105
+        <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
106
+        <div style="margin-bottom: 10px; display: flex">
107
+          联系方式:<span class="under_line">{{ i.phone }}</span>
108
+        </div>
109
+        <div style="margin-bottom: 10px; display: flex">
110
+          开具日期:<span class="under_line">{{
111
+            getTime(item.pre_time) ? getTime(item.pre_time).split(" ")[0] : ""
112
+          }}</span>
113
+        </div>
114
+        <!-- <div>地址:{{item.patient.home_address}}</div> -->
115
+        <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
116
+      </div>
117
+
118
+      <!-- <div class="prescriptionBox">
119
+            <table style="width:100%;text-align:center;line-height:25px;">
120
+                <tr>
121
+                    <td>序号</td>
122
+                    <td>项目名称</td>
123
+                    <td>数量</td>
124
+                    <td>单位</td>
125
+                    <td>单价</td>
126
+                    <td>部位</td>
127
+                    <td>备注</td>
128
+                    <td>天数</td>
129
+                </tr>
130
+                <tr v-for="(it,index) in item.project" :key="index">
131
+                    <td>{{index+1}}</td>
132
+                    <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
133
+                    <td>{{it.single_dose}}</td>
134
+                    <td>{{getUnit(it.unit)}}</td>
135
+                    <td>{{it.price}}</td>
136
+                    <td></td>
137
+                    <td>{{it.remark}}</td>
138
+                    <td>{{it.day}}</td>
139
+
140
+                </tr>
141
+
142
+                <tr v-for="(it,index) in item.advices" :key="index">
143
+                    <td>{{index+1}}</td>
144
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
145
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
146
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
147
+                    <td>{{it.price}}</td>
148
+                    <td></td>
149
+                    <td>{{it.remark}}</td>
150
+                    <td>{{it.day}}</td>
151
+
152
+                </tr>
153
+            </table>
154
+        </div> -->
155
+      <div class="prescriptionBox">
156
+        <div class="Rp">Rp:</div>
157
+        <!-- <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
158
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
159
+              </div> -->
160
+        <div class="drugsBox" v-for="(it, index) in item.project" :key="index">
161
+          <div class="drugsOne">
162
+            <span style="font-weight: bold">{{ index + 1 + "." }}</span
163
+            >{{
164
+              it.type == 2 ? it.project.project_name : it.good_info.good_name
165
+            }}&nbsp;&nbsp;×&nbsp; {{ it.count }}{{ unit }}
166
+          </div>
167
+        </div>
168
+        <div style="text-align: center">(以下空白)</div>
169
+      </div>
170
+      <div style="display: flex">
171
+        <div>
172
+          医&nbsp;&nbsp;&nbsp;&nbsp;师:
173
+          <span
174
+            style="width: 100px; display: inline-block"
175
+            v-if="i.info.creator == 0"
176
+          >
177
+            {{ i.info.doctor ? i.info.doctor : "" }}
178
+
179
+          </span>
180
+
181
+          <img
182
+            style="height: 30px"
183
+            :src="setAdminUserES(item.creator)"
184
+            alt=""
185
+            srcset=""
186
+            v-else
187
+          />
188
+        </div>
189
+        <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div> -->
190
+      </div>
191
+      <div style="display: flex">
192
+        <div style="display: flex">核对护士:</div>
193
+      </div>
194
+      <div style="display: flex">
195
+        打印时间:<span style="border-bottom: 1px solid #000">{{
196
+          getTime(new Date()) ? getTime(new Date()) : ""
197
+        }}</span>
198
+      </div>
199
+      <span v-if="org_id == 10138"
200
+      ><img
201
+        src="https://kuyi.shengws.com/bailin/blend.jpg"
202
+        style="width: 100%"
203
+        alt=""
204
+      /></span>
205
+      <span v-if="org_id == 10278"
206
+      ><img
207
+        src="https://kuyi.shengws.com/bailinbeier.png"
208
+        style="width: 100%"
209
+        alt=""
210
+      /></span>
211
+      <div style="page-break-after: always"></div>
212
+    </div>
213
+
214
+    <!-- <div id='prescriptionPrint'>
215
+
216
+        <div v-for="(item,index) in advicePrint" :key="index">
217
+            <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
218
+                <div style="display:flex;justify-content: space-between;font-weight:bold;">
219
+                    <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
220
+                        <span>费别</span>
221
+                        <span>自费</span>
222
+                        <span>公费</span>
223
+                        <span>保险</span>
224
+                        <span>其他</span>
225
+                    </div>
226
+                    <div>就诊日期:{{getTime(item.ctime)}}</div>
227
+                </div>
228
+
229
+                <div class="printTitle">血液透析中心</div>
230
+
231
+                <div class="printTitle">处方、治疗单</div>
232
+
233
+                <div class="infoTitle">
234
+                    <div>门诊编号:</div>
235
+                    <div>电脑号:</div>
236
+                </div>
237
+
238
+                <div class="infoMain">
239
+                    <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
240
+                    <div style="margin-bottom: 10px;width:25%">性别:
241
+                        <span v-if="item.patient.gender == 1">男</span>
242
+                        <span v-if="item.patient.gender == 2">女</span>
243
+                    </div>
244
+                    <div style="margin-bottom: 10px;width:25%">年龄:
245
+                        <span>{{item.patient.age}}</span>
246
+                    </div>
247
+                    <div style="margin-bottom: 10px;width:25%">参保类型:</div>
248
+                    <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
249
+                    <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
250
+                    <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
251
+                </div>
252
+
253
+                <div class="prescriptionBox">
254
+                    <table style="width:100%;text-align:center;line-height:25px;">
255
+                        <tr>
256
+                            <td>序号</td>
257
+                            <td>项目名称</td>
258
+                            <td>数量</td>
259
+                            <td>单位</td>
260
+                            <td>单价</td>
261
+                            <td>部位</td>
262
+                            <td>备注</td>
263
+                            <td>天数</td>
264
+                        </tr>
265
+                        <tr v-for="(it,index) in item.project" :key="index">
266
+                            <td>{{index+1}}</td>
267
+                            <td>{{getProjectName(it.project_id)}}</td>
268
+                            <td>{{it.single_dose}}</td>
269
+                            <td>{{getUnit(it.unit)}}</td>
270
+                            <td>{{it.price}}</td>
271
+                            <td></td>
272
+                            <td>{{it.remark}}</td>
273
+                            <td>{{it.day}}</td>
274
+
275
+                        </tr>
276
+                    </table>
277
+                </div>
278
+                <div class="infoTitle">
279
+                    <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
280
+                    <div>签章:</div>
281
+                </div>
282
+                <div class="actionBar">
283
+                    <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
284
+                    <div>费用:</div>
285
+                </div>
286
+                <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
287
+                    <tr>
288
+                        <td style="width:16%;">治疗时间</td>
289
+                        <td style="width:16%;"></td>
290
+                        <td style="width:16%;"></td>
291
+                        <td style="width:16%;"></td>
292
+                        <td style="width:16%;"></td>
293
+                        <td style="width:16%;"></td>
294
+                    </tr>
295
+                    <tr>
296
+                        <td style="width:16%;">医生签字</td>
297
+                        <td style="width:16%;"></td>
298
+                        <td style="width:16%;"></td>
299
+                        <td style="width:16%;"></td>
300
+                        <td style="width:16%;"></td>
301
+                        <td style="width:16%;"></td>
302
+                    </tr>
303
+                    <tr>
304
+                        <td style="width:16px;">患者签字</td>
305
+                        <td style="width:16px;"></td>
306
+                        <td style="width:16px;"></td>
307
+                        <td style="width:16px;"></td>
308
+                        <td style="width:16px;"></td>
309
+                        <td style="width:16px;"></td>
310
+                    </tr>
311
+                </table>
312
+            </div>
313
+
314
+        </div>
315
+
316
+    </div> -->
317
+    </div>
318
+  </div>
319
+</template>
320
+<script>
321
+import { jsGetAge, uParseTime } from "@/utils/tools";
322
+import { getAllDoctorList, getPrescriptionPrint } from "@/api/project/project";
323
+import { getInitData } from "@/api/his/his";
324
+export default {
325
+  props: {
326
+    patient_id: Number,
327
+    record_date: String,
328
+    prescription_id: Number,
329
+    ids: String,
330
+    newHisPatient:Object,
331
+    printData: Array
332
+
333
+  },
334
+  data() {
335
+    return {
336
+      doctorList_1: [],
337
+      operatorMaps: {},
338
+      doctorList: [],
339
+      advicePrint: {},
340
+      doc_name:"",
341
+      patient: {},
342
+      tableData: [],
343
+      prescriptionInfo: [],
344
+      projectList: [],
345
+      prescriptions: [],
346
+      settlement: [
347
+        { value: 1, label: "医保" },
348
+        { value: 2, label: "自费" },
349
+        { value: 3, label: "公费" },
350
+        { value: 4, label: "农保" },
351
+        { value: 5, label: "会员" },
352
+        { value: 6, label: "职工" },
353
+        { value: 7, label: "合同" },
354
+      ],
355
+      hisPatient: {},
356
+      diagnoses: [],
357
+      department: [],
358
+      faber: {},
359
+      org_id: 0,
360
+    };
361
+  },
362
+  methods: {
363
+    // 电子签名
364
+    setAdminUserES(id,name) {
365
+      if (id == 0) {
366
+        return "";
367
+      }
368
+      if (id in this.operatorMaps) {
369
+        return this.operatorMaps[id].url;
370
+      } else {
371
+        this.doc_name = name
372
+        return "";
373
+      }
374
+    },
375
+
376
+    getNewAge(birthday) {
377
+      // var myDate = new Date(birthday * 1000)
378
+      // var month = myDate.getMonth() + 1
379
+      // var day = myDate.getDate()
380
+      // var age = new Date().getFullYear() - myDate.getFullYear()
381
+      // if (month < new Date().getMonth() + 1 || new Date().getMonth() + 1 == month && day <= new Date().getDate()) {
382
+      //   age++
383
+      // }
384
+      // return age
385
+      var nowTime = new Date().getTime();
386
+      //一年毫秒数(365 * 86400000 = 31536000000)
387
+      return Math.ceil((nowTime - birthday * 1000) / 31536000000);
388
+    },
389
+    getAge(patient) {
390
+      var thisLen = patient.id_card_no.length;
391
+      var birth = "";
392
+      if (thisLen == 15) {
393
+        birth = "19" + patient.id_card_no.substr(6, 6);
394
+      } else {
395
+        birth = patient.id_card_no.substr(6, 8);
396
+      }
397
+      var births =
398
+        birth.substr(0, 4) +
399
+        "-" +
400
+        birth.substr(4, 2) +
401
+        "-" +
402
+        birth.substr(6, 2);
403
+      return jsGetAge(births, "-");
404
+    },
405
+    printThisPage() {
406
+      var ptime = Math.round(new Date().getTime() / 1000);
407
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
408
+
409
+      const style =
410
+        "@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;}}";
411
+      printJS({
412
+        printable: "prescription-print",
413
+        type: "html",
414
+        style: style,
415
+        scanStyles: false,
416
+      });
417
+    },
418
+    getDepart(id) {
419
+      var name = "";
420
+      for (let i = 0; i < this.department.length; i++) {
421
+        if (id == this.department[i].id) {
422
+          name = this.department[i].name;
423
+        }
424
+      }
425
+      return name;
426
+    },
427
+    getAllDoctorList() {
428
+      getAllDoctorList().then((response) => {
429
+        if (response.data.state == 1) {
430
+          var doctor = response.data.data.doctor;
431
+
432
+          this.doctorList = doctor;
433
+        }
434
+      });
435
+    },
436
+
437
+    getDoctor(id) {
438
+      var name = "";
439
+      for (let i = 0; i < this.doctorList.length; i++) {
440
+        if (id == this.doctorList[i].admin_user_id) {
441
+          name = this.doctorList[i].user_name;
442
+        }
443
+      }
444
+      return name;
445
+    },
446
+    getTime(value, temp) {
447
+      if (value != undefined) {
448
+        return uParseTime(value, temp);
449
+      }
450
+      return "";
451
+    },
452
+    getPrescriptionPrint() {
453
+      var params = {
454
+        patient_id: this.patient_id,
455
+        record_date: this.record_date,
456
+        prescription_id: this.prescription_id,
457
+        ids: this.ids,
458
+        p_type: 2,
459
+      };
460
+      console.log("999999", params);
461
+      getPrescriptionPrint(params).then((response) => {
462
+        if (response.data.state == 1) {
463
+          var advicePrint = response.data.data.advicePrint;
464
+          console.log("adviceprint", advicePrint);
465
+          this.advicePrint = advicePrint;
466
+          this.prescriptions = advicePrint;
467
+          var projectlist = response.data.data.projectlist;
468
+          console.log("所有项目列表", projectlist);
469
+          this.projectList = projectlist;
470
+          this.hisPatient = response.data.data.hisPatient;
471
+          this.doctorList_1 = response.data.data.eles;
472
+          console.log(this.doctorList_1, "医生列表");
473
+          if (this.doctorList_1.length > 0) {
474
+            var operatorsLen = this.doctorList_1.length;
475
+            for (var index = 0; index < operatorsLen; index++) {
476
+              this.$set(
477
+                this.operatorMaps,
478
+                this.doctorList_1[index].creator,
479
+                this.doctorList_1[index]
480
+              );
481
+            }
482
+          }
483
+          let projectPrint = [];
484
+          let total = 0;
485
+          this.advicePrint.map((item) => {
486
+            console.log(item.project.length);
487
+            if (item.project.length > 0) {
488
+              for (var i = item.project.length - 1; i >= 0; i--) {
489
+                if (item.project[i].type == 2) {
490
+                  if (item.project[i].project.cost_classify == 3) {
491
+                    item.project.splice(i, 1);
492
+                  }
493
+                }
494
+              }
495
+            }
496
+          });
497
+
498
+
499
+        }
500
+      });
501
+    },
502
+    getProjectName(id) {
503
+      var project_name = "";
504
+      for (let i = 0; i < this.projectList.length; i++) {
505
+        if (id == this.projectList[i].id) {
506
+          project_name = this.projectList[i].project_name;
507
+        }
508
+      }
509
+      return project_name;
510
+    },
511
+    getUnit(id) {
512
+      var unit = "";
513
+      for (let i = 0; i < this.projectList.length; i++) {
514
+        if (id == this.projectList[i].id) {
515
+          unit = this.projectList[i].unit;
516
+        }
517
+      }
518
+      return unit;
519
+    },
520
+
521
+    getTotalOne(id) {
522
+      var total = 0;
523
+      var addtotal = 0;
524
+      for (let i = 0; i < this.prescriptions.length; i++) {
525
+        if (id == this.prescriptions[i].id) {
526
+          if (this.prescriptions[i].project != null) {
527
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
528
+              total =
529
+                total +
530
+                this.prescriptions[i].project[a].price *
531
+                this.prescriptions[i].project[a].count;
532
+            }
533
+          }
534
+
535
+          if (this.prescriptions[i].additionalcharge != null) {
536
+            for (
537
+              let a = 0;
538
+              a < this.prescriptions[i].additionalcharge.length;
539
+              a++
540
+            ) {
541
+              addtotal =
542
+                addtotal +
543
+                this.prescriptions[i].additionalcharge[a].price *
544
+                this.prescriptions[i].additionalcharge[a].count;
545
+            }
546
+          }
547
+          addtotal = Math.floor(addtotal * 100) / 100;
548
+        }
549
+      }
550
+
551
+      for (let i = 0; i < this.prescriptions.length; i++) {
552
+        if (id == this.prescriptions[i].id) {
553
+          if (this.prescriptions[i].advices != null) {
554
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
555
+              total =
556
+                total +
557
+                this.prescriptions[i].advices[a].price *
558
+                this.prescriptions[i].advices[a].prescribing_number;
559
+            }
560
+          }
561
+
562
+          if (this.prescriptions[i].additionalcharge != null) {
563
+            for (
564
+              let a = 0;
565
+              a < this.prescriptions[i].additionalcharge.length;
566
+              a++
567
+            ) {
568
+              addtotal =
569
+                addtotal +
570
+                this.prescriptions[i].additionalcharge[a].price *
571
+                this.prescriptions[i].additionalcharge[a].count;
572
+            }
573
+          }
574
+          addtotal = Math.floor(addtotal * 100) / 100;
575
+        }
576
+      }
577
+
578
+      return total + addtotal;
579
+    },
580
+    getInitData() {
581
+      getInitData().then((response) => {
582
+        if (response.data.state == 1) {
583
+          this.department = response.data.data.department;
584
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
585
+          console.log("争端", this.diagnoses);
586
+        }
587
+      });
588
+    },
589
+    getDiagnosis(ids) {
590
+      let newIds = ids.split(",").sort(function (a, b) {
591
+        return a - b;
592
+      });
593
+
594
+      var name = "";
595
+      let nameArr = [];
596
+      for (let i = 0; i < this.diagnoses.length; i++) {
597
+        // if(id == this.diagnoses[i].id){
598
+        //    name = this.diagnoses[i].class_name
599
+        // }
600
+
601
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
602
+          // name += diagnoses[i].class_name + ' '
603
+          nameArr.push(this.diagnoses[i].class_name);
604
+        }
605
+      }
606
+      let newNameArr = [];
607
+      nameArr.map((item, index) => {
608
+        if (item == "尿毒症") {
609
+          newNameArr.push(item);
610
+          nameArr.splice(index, 1, "");
611
+        }
612
+      });
613
+      newNameArr.push(...nameArr);
614
+      return newNameArr.join(" ");
615
+    },
616
+    compare(property) {
617
+      return function (a, b) {
618
+        var value1 = a[property];
619
+        var value2 = b[property];
620
+        return value1 - value2; //升序排序
621
+      };
622
+    },
623
+    getName(list) {
624
+      console.log("list22", list);
625
+      let new_list = [];
626
+      for (let i = 0; i < list.length; i++) {
627
+        if (list[i].aac031 == "1") {
628
+          new_list.push(list[i]);
629
+        }
630
+      }
631
+
632
+      switch (new_list[0].bcc334) {
633
+        case "A31001":
634
+          return "深圳医保1档";
635
+          break;
636
+        case "A31002":
637
+          return "深圳医保2档";
638
+
639
+          break;
640
+        case "A31003":
641
+          return "深圳医保3档";
642
+
643
+          break;
644
+        case "A31004":
645
+          return "二档(少儿)";
646
+
647
+          break;
648
+        case "A31005":
649
+          return "学生二档";
650
+
651
+          break;
652
+        case "A31006":
653
+          return "大学生二档";
654
+
655
+          break;
656
+        case "A32001":
657
+          return "在职公务员";
658
+          break;
659
+        case "A32002":
660
+          return "在职驻深公务员";
661
+
662
+          break;
663
+        case "A39301":
664
+          return "家属统筹医疗";
665
+
666
+          break;
667
+        case "A41001":
668
+          return "工伤在职";
669
+
670
+          break;
671
+        case "A51001":
672
+          return "生育在职";
673
+
674
+          break;
675
+        case "A52001":
676
+          return "生育医疗一档";
677
+
678
+          break;
679
+        case "A52002":
680
+          return "生育医疗一档";
681
+
682
+          break;
683
+        case "C31001":
684
+          return "一档医疗退休";
685
+
686
+          break;
687
+        case "C31002":
688
+          return "二档医疗退休";
689
+          break;
690
+      }
691
+    },
692
+  },
693
+  created() {
694
+    this.getInitData();
695
+    this.getAllDoctorList();
696
+    this.getPrescriptionPrint();
697
+    var xtuser = this.$store.getters.xt_user;
698
+    this.orgname = xtuser.org.org_name;
699
+    this.org_id = this.$store.getters.xt_user.org.id;
700
+  },
701
+  watch: {
702
+    patient_id: function (val) {
703
+      console.log(
704
+        "101000010101010",
705
+        this.patient_id,
706
+        this.record_date,
707
+        this.prescription_id
708
+      );
709
+      //    this.getPrescriptionPrint()
710
+    },
711
+    ids: function (val) {
712
+      this.ids = val;
713
+      console.log("this.idsids", this.ids);
714
+      this.getPrescriptionPrint();
715
+    },
716
+  },
717
+};
718
+</script>
719
+
720
+
721
+<style lang="scss" scoped>
722
+.prescription-print {
723
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
724
+  0 0 60px rgba(0, 0, 0, 0.06) inset;
725
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
726
+  0 0 40px rgba(0, 0, 0, 0.06) inset;
727
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
728
+  margin-bottom: 20px;
729
+  padding: 20px 10px;
730
+}
731
+.printTitle {
732
+  font-size: 22px;
733
+  text-align: center;
734
+  font-weight: bold;
735
+  margin-bottom: 10px;
736
+}
737
+.infoTitle {
738
+  display: flex;
739
+  margin-top: 10px;
740
+  line-height: 24px;
741
+}
742
+.infoTitle div {
743
+  width: 200px;
744
+}
745
+.infoMain {
746
+  display: flex;
747
+  flex-wrap: wrap;
748
+  margin-top: 10px;
749
+}
750
+.infoMain div {
751
+  width: 50%;
752
+  line-height: 24px;
753
+}
754
+.prescriptionBox {
755
+  padding: 0 10px;
756
+  min-height: 400px;
757
+}
758
+.Rp {
759
+  font-size: 22px;
760
+  font-weight: bold;
761
+}
762
+.drugsBox {
763
+  padding-left: 40px;
764
+  margin-bottom: 10px;
765
+}
766
+.drugsBox div {
767
+  line-height: 20px;
768
+}
769
+.drugsOne {
770
+  line-height: 24px;
771
+}
772
+.drugsOne span {
773
+  margin-right: 20px;
774
+}
775
+.doctorBox {
776
+  display: flex;
777
+  justify-content: space-between;
778
+  padding: 0 10px;
779
+  line-height: 24px;
780
+  border-bottom: 2px solid #000;
781
+}
782
+.actionBar {
783
+  display: flex;
784
+  justify-content: space-between;
785
+  line-height: 24px;
786
+  padding: 0 10px;
787
+}
788
+.actionBar p {
789
+  width: 150px;
790
+}
791
+.under_line {
792
+  display: inline-block;
793
+  border-bottom: 1px solid #000;
794
+  flex: 1;
795
+}
796
+</style>

+ 32 - 3
src/xt_pages/outpatientDoctorStation/pastInquiries.vue Dosyayı Görüntüle

@@ -32,6 +32,23 @@
32 32
             placeholder="选择日期时间"
33 33
             align="right"
34 34
         ></el-date-picker>
35
+
36
+        <el-select
37
+          size="small"
38
+          v-model="sch_type"
39
+          placeholder="请选择"
40
+          style="width: 150px; margin-left: 10px"
41
+          @change="changeSchType"
42
+
43
+        >
44
+          <el-option
45
+            v-for="(item, index) in sch_types"
46
+            :key="index"
47
+            :label="item.label"
48
+            :value="item.value"
49
+          >
50
+          </el-option>
51
+        </el-select>
35 52
         <el-button
36 53
             size="small"
37 54
             style="margin: 0 10px"
@@ -222,7 +239,15 @@ export default {
222 239
       selecting_schs: [],
223 240
       printData: [],
224 241
       printType: 0,
225
-      org_id: ''
242
+      org_id: '',
243
+      sch_types: [
244
+        {value: 0, label: "全部"},
245
+        {value: 1, label: "上午"},
246
+        {value: 2, label: "下午"},
247
+        {value: 3, label: "晚上"},
248
+
249
+      ],
250
+      sch_type:0,
226 251
     }
227 252
   },
228 253
   methods: {
@@ -276,7 +301,7 @@ export default {
276 301
                   style: style,
277 302
                   scanStyles: false
278 303
                 })
279
-              } 
304
+              }
280 305
               // else {
281 306
               //   const style =
282 307
               //       '@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white;margin-bottom:40px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.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{min-height:450px;}.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;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.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;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
@@ -334,7 +359,8 @@ export default {
334 359
         record_date: this.record_date,
335 360
         page: this.page,
336 361
         limit: this.limit,
337
-        keywords: this.keywords
362
+        keywords: this.keywords,
363
+        sch_type: this.sch_type,
338 364
       }
339 365
       getHisPrescriptionList(params).then((response) => {
340 366
         if (response.data.state == 0) {
@@ -375,6 +401,9 @@ export default {
375 401
         }
376 402
       }
377 403
       return name
404
+    },changeSchType(){
405
+      this.getHisPrescriptionList()
406
+
378 407
     },
379 408
     handleSelectionChange(val) {
380 409
       this.selecting_schs = val