Browse Source

批量打印

XMLWAN 4 years ago
parent
commit
891da629ed

+ 1 - 1
src/xt_pages/dialysis/details/index.vue View File

@@ -1694,7 +1694,7 @@ export default {
1694 1694
       this.websocket.onmessage = e => {
1695 1695
         let res = JSON.parse(e.data);
1696 1696
         // let res = re.data;
1697
-        console.log('res3333333333',res)
1697
+        // console.log('res3333333333',res)
1698 1698
         if(res.channel == 'queue/join'){
1699 1699
           if(res.data.fisrtQueueInfo != null){
1700 1700
             if(res.data.fisrtQueueInfo.create_time){

+ 3 - 2
src/xt_pages/dialysis/dialysisDoctorAdvice.vue View File

@@ -445,7 +445,8 @@ export default {
445 445
             this.admin_users = resp.data.adminUser
446 446
             var schedules = resp.data.scheduals
447 447
             console.log("schedules",schedules)
448
-           if(schedules.length > 0){
448
+            var config = resp.data.config
449
+           if(config.is_open == 0){
449 450
             this.show = true
450 451
             this.showOne = false
451 452
             let arr = []
@@ -501,7 +502,7 @@ export default {
501 502
             })
502 503
             this.indexInfoList = newArr
503 504
            }
504
-           if(resp.data.hisAdvices.length > 0){
505
+           if(config.is_open == 1 || config.is_open == 2){
505 506
              this.show = false
506 507
              this.showOne  = true
507 508
             var schedules =  resp.data.hisAdvices

+ 290 - 18
src/xt_pages/dialysis/doctorAdvicePrint.vue View File

@@ -8,7 +8,118 @@
8 8
             </el-col>
9 9
         </el-row>
10 10
         </div>
11
-        <div class="app-container" style="background-color: white;">
11
+        <div class="app-container" style="background-color: white;" v-show="show">
12
+            <div id="dialysisTable">
13
+                <div class="order_title_panl">
14
+                    <span class="main_title">透析医嘱</span>
15
+                </div>
16
+                <p style="width: 960px;text-align: right;margin: 0 auto 10px;">日期:{{ time }}</p>
17
+                <table class="table dialysisTable" border="1" cellspacing="0" cellpadding="0">
18
+                    <tr>
19
+                    <th width="40px">姓名</th>
20
+                    <th width="40px">透析器</th>
21
+                    <!-- <th width="50px">类型</th> -->
22
+                    <th width="50px">开始时间</th>
23
+                    <th width="100px">医嘱内容</th>
24
+                    <th width="50px">执行时间</th>
25
+                    <th width="50px">执行护士</th>
26
+                    <th width="50px">校对护士</th>
27
+                    <th width="50px">校对时间</th>
28
+                    <th width="50px">开嘱医生</th>
29
+                    <th width="50px">开嘱时间</th>
30
+                    </tr>
31
+                    <template v-for="(schedules, zone_name, index) in scheduleMap">
32
+                    <tr :key="index">
33
+                        <td>{{ zone_name }}</td>
34
+                        <!-- <td></td> -->
35
+                        <td></td>
36
+                        <td></td>
37
+                        <td></td>
38
+                        <td></td>
39
+                        <td></td>
40
+                        <td></td>
41
+                        <td></td>
42
+                        <td></td>
43
+                        <td></td>
44
+                    </tr>
45
+                    <template v-for="schedule in schedules">
46
+                        <template v-for="(group, group_index) in schedule.new_advice">
47
+                        <tr v-for="(advice, advice_index) in group.advices" :key="advice_index">
48
+                            <td
49
+                            v-if="advice_index == 0"
50
+                            :rowspan="group.advices.length"
51
+                            >{{ advice.parent_id == 0 ? schedule.patient.name : "" }}
52
+                            <br>
53
+                            ({{ advice.parent_id == 0 ? schedule.dialysis_no : ""}})
54
+                            <br>
55
+                            <span v-if="schedule.mode_id == 1">(HD)</span>
56
+                            <span v-if="schedule.mode_id == 2">(HDF)</span>
57
+                            <span v-if="schedule.mode_id == 3">(HD+HP)</span>
58
+                            <span v-if="schedule.mode_id == 4">(HP)</span>
59
+                            <span v-if="schedule.mode_id == 5">(HF)</span>
60
+                            <span v-if="schedule.mode_id == 6">(SCUF)</span>
61
+                            <span v-if="schedule.mode_id == 7">(IUF)</span>
62
+                            <span v-if="schedule.mode_id == 8">(HFHD)</span>
63
+                            <span v-if="schedule.mode_id == 9">(HFHD+HP)</span>
64
+                            <span v-if="schedule.mode_id == 10">(PHF)</span>
65
+                            <span v-if="schedule.mode_id == 11">(HFR)</span>
66
+                            <span v-if="schedule.mode_id == 12">(HDF+HP)</span>
67
+                            <span v-if="schedule.mode_id == 13">(CRRT)</span>
68
+                            <span v-if="schedule.mode_id == 14">(腹水回输)</span>
69
+                                
70
+                            </td>
71
+                            <td v-if="advice_index == 0" :rowspan="group.advices.length">
72
+                            {{advice.parent_id == 0 && schedule.prescription!=null ?  schedule.prescription.dialyzer_perfusion_apparatus : ""}}
73
+                            </td>
74
+                            <!-- <td
75
+                            v-if="advice_index == 0"
76
+                            :rowspan="group.advices.length"
77
+                            >{{ getAdaviceType(advice.advice_type, advice.parent_id) }}</td>-->
78
+                            <td v-if="advice_index == 0" :rowspan="group.advices.length">
79
+                            {{
80
+                            advice.parent_id == 0
81
+                            ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
82
+                            : ""
83
+                            }}
84
+                            </td>
85
+                            <td
86
+                            :class="
87
+                                advice.parent_id == 0
88
+                                ? 'advice_content'
89
+                                : 'subadvice_content'
90
+                            "
91
+                            >
92
+                            <span>{{ advice.advice_name }}</span>
93
+                            <span>{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span>
94
+                            <span v-if="advice.prescribing_number">
95
+                                {{ advice.prescribing_number
96
+                                }}{{ advice.prescribing_number_unit }}
97
+                            </span>
98
+                            <span v-if="advice.single_dose">
99
+                                单次用量 {{ advice.single_dose
100
+                                }}{{ advice.single_dose_unit }}
101
+                            </span>
102
+                            <span>{{ advice.delivery_way }}</span>
103
+                            <span>{{ advice.execution_frequency }}</span>
104
+                            <span
105
+                                v-if="advice.parent_id == 0 && advice.remark.length > 0"
106
+                            >({{ advice.remark }})</span>
107
+                            </td>
108
+                            <td>{{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}</td>
109
+                            <td>{{ getName(advice.execution_staff) }}</td>
110
+                            <td>{{ getName(advice.checker) }}</td>
111
+                            <td>{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
112
+                            <td>{{ getName(advice.advice_doctor) }}</td>
113
+                            <td>{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}") }}</td>
114
+                        </tr>
115
+                        </template>
116
+                    </template>
117
+                    </template>
118
+                </table>
119
+            </div>
120
+        </div>
121
+
122
+          <div class="app-container" style="background-color: white;" v-show="showOne">
12 123
             <div id="dialysisTable">
13 124
                 <div class="order_title_panl">
14 125
                     <span class="main_title">透析医嘱</span>
@@ -144,7 +255,9 @@ export default {
144 255
 
145 256
             zone_selected: 0,
146 257
             scheduleMap:[],
147
-            time:''
258
+            time:'',
259
+            show:true,
260
+            showOne:false,
148 261
         }
149 262
     },
150 263
     methods:{
@@ -169,21 +282,24 @@ export default {
169 282
                 var resp = rs.data
170 283
                 if (resp.state == 1) {
171 284
                 this.admin_user = resp.data.adminUser
172
-                var schedulesArr = resp.data.scheduals
173
-                let schedules = []
174
-                var ids = this.$store.getters.temp_params.advice_ids
175
-                console.log('ids',ids)
176
-                schedulesArr.map(item => {
285
+                var config = resp.data.config
286
+                if(config.is_open == 0 || config.is_open == 2){
287
+                
288
+                   var schedulesArr = resp.data.scheduals
289
+                   let schedules = []
290
+                   var ids = this.$store.getters.temp_params.advice_ids
291
+                   console.log('ids',ids)
292
+                   schedulesArr.map(item => {
177 293
                     if(ids.indexOf(item.patient_id) > -1){
178 294
                         schedules.push(item)
179 295
                     }
180 296
                     
181 297
                 })
182
-                // console.log("schedules",schedules)
298
+               
183 299
                 for (let i = 0; i < schedules.length; i++) {
184 300
                     schedules[i].dialysis_no = schedules[i].patient.dialysis_no
185 301
                 }
186
-                // console.log('schedules', schedules)
302
+           
187 303
 
188 304
                 var arr = []
189 305
                 for (let j = 0; j < schedules.length; j++) {
@@ -192,7 +308,7 @@ export default {
192 308
                 arr.sort(function (a, b) {
193 309
                     return a - b
194 310
                 })
195
-                // console.log('arr', arr)
311
+               
196 312
 
197 313
                 var arrTwo = []
198 314
                 for (let i = 0; i < arr.length; i++) {
@@ -204,20 +320,17 @@ export default {
204 320
                 }
205 321
 
206 322
                 arrTwo.map((item, index) => {
207
-                    // console.log(item);
208
-                    // item.doctor_advice.map((items, i) => {
209
-                    //   console.log(items);
210
-                    // });
323
+                  
211 324
                     item.doctor_advice.sort(this.compare('start_time'))
212 325
                 })
213
-                // console.log('arrTwo', arrTwo)
326
+                
214 327
 
215 328
                 const res = new Map()
216 329
                 let a = arrTwo.filter(
217 330
                     a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
218 331
                 )
219 332
 
220
-                // console.log('a', a)
333
+               
221 334
 
222 335
                 schedules = a
223 336
                 var zoneMap = {}
@@ -324,11 +437,170 @@ export default {
324 437
                     }
325 438
                     maps.new_advice = advice_groups
326 439
                     }
440
+                 }
441
+                
442
+
443
+                 this.scheduleMap = scheduleMap  
444
+                }
445
+               
446
+                 if(config.is_open == 1){
447
+                   var schedulesArr = resp.data.hisAdvices
448
+                   let schedules = []
449
+                   var ids = this.$store.getters.temp_params.advice_ids
450
+                   console.log('ids',ids)
451
+                   schedulesArr.map(item => {
452
+                    if(ids.indexOf(item.patient_id) > -1){
453
+                        schedules.push(item)
454
+                    }
455
+                    
456
+                })
457
+               
458
+                for (let i = 0; i < schedules.length; i++) {
459
+                    schedules[i].dialysis_no = schedules[i].patient.dialysis_no
460
+                }
461
+           
462
+
463
+                var arr = []
464
+                for (let j = 0; j < schedules.length; j++) {
465
+                    arr.push(schedules[j].dialysis_no)
466
+                }
467
+                arr.sort(function (a, b) {
468
+                    return a - b
469
+                })
470
+               
471
+
472
+                var arrTwo = []
473
+                for (let i = 0; i < arr.length; i++) {
474
+                    for (let j = 0; j < schedules.length; j++) {
475
+                    if (arr[i] == schedules[j].dialysis_no) {
476
+                        arrTwo.push(schedules[j])
477
+                    }
478
+                    }
479
+                }
480
+
481
+                arrTwo.map((item, index) => {
482
+                  
483
+                    item.doctor_advice.sort(this.compare('start_time'))
484
+                })
485
+                
486
+
487
+                const res = new Map()
488
+                let a = arrTwo.filter(
489
+                    a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
490
+                )
491
+
492
+               
493
+
494
+                schedules = a
495
+                var zoneMap = {}
496
+                var scheduleMap = {}
497
+                for (let index = 0; index < schedules.length; index++) {
498
+                    const schedule = schedules[index]
499
+                    if (schedule.doctor_advice.length == 0) {
500
+                    continue
501
+                    }
502
+                    if (scheduleMap[schedule.device_number.zone.name] == null) {
503
+                    scheduleMap[schedule.device_number.zone.name] = []
504
+                    }
505
+                    scheduleMap[schedule.device_number.zone.name].push(schedule)
506
+                    if (zoneMap[schedule.device_number.zone.name] == null) {
507
+                    zoneMap[schedule.device_number.zone.name] =
508
+                        schedule.device_number.zone
509
+                    }
510
+                }
511
+
512
+                var zones = []
513
+                zones.push({ value: 0, text: '全部分区' })
514
+                for (var zoneName in zoneMap) {
515
+                    zones.push({ value: zoneMap[zoneName].id, text: zoneName })
516
+                }
517
+
518
+                zones = zones.sort(function (a, b) {
519
+                    return a.value > b.value
520
+                })
521
+                this.zones = zones
522
+                for (var key in scheduleMap) {
523
+                    let mapArr = scheduleMap[key]
524
+                    for (let i = 0; i < mapArr.length; i++) {
525
+                    mapArr[i]['new_advice'] = []
526
+                    }
327 527
                 }
528
+
529
+                for (var key in scheduleMap) {
530
+                    let mapArr = scheduleMap[key]
531
+                    for (let i = 0; i < mapArr.length; i++) {
532
+                    var maps = mapArr[i]
533
+                    var resp_advices = maps.doctor_advice
534
+                    if (resp_advices.length > 0) {
535
+                        var newGroupObject = function () {
536
+                        return Object.assign(
537
+                            {},
538
+                            {
539
+                            group_no: 0,
540
+                            advices: []
541
+                            }
542
+                        )
543
+                        }
544
+                        var initGroupBlock = function (group, advice) {
545
+                        group.group_no = advice.groupno
546
+                        }
547
+
548
+                        var advice_groups = []
549
+                        var group = newGroupObject()
550
+                        for (let index = 0; index < resp_advices.length; index++) {
551
+                        const advice = resp_advices[index]
552
+                        if (advice.groupno == 0) {
553
+                            // 老版本的医嘱
554
+                            if (advice.parent_id > 0) {
555
+                            if (advice_groups.length > 0) {
556
+                                var parent_group = advice_groups[advice_groups.length - 1]
557
+                                if (parent_group.advices.length > 0) {
558
+                                if (parent_group.advices[0].id == advice.parent_id) {
559
+                                    parent_group.advices.push(advice)
560
+                                }
561
+                                }
562
+                            }
563
+                            continue
564
+                            } else {
565
+                            if (group.group_no > 0) {
566
+                                advice_groups.push(group)
567
+                                group = newGroupObject()
568
+                            }
569
+
570
+                            initGroupBlock(group, advice)
571
+                            group.advices.push(advice)
572
+                            advice_groups.push(group)
573
+                            group = newGroupObject()
574
+                            continue
575
+                            }
576
+                        } else {
577
+                            if (group.group_no > 0 && group.group_no != advice.groupno) {
578
+                            advice_groups.push(group)
579
+                            group = newGroupObject()
580
+                            }
581
+                            if (group.group_no == 0) {
582
+                            initGroupBlock(group, advice)
583
+                            }
584
+                            if (group.group_no == advice.groupno) {
585
+                            group.advices.push(advice)
586
+                            }
587
+                        }
588
+                        }
589
+                        if (group.group_no > 0) {
590
+                        // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
591
+                        advice_groups.push(group)
592
+                        }
593
+                        advice_groups = advice_groups
594
+                    } else {
595
+                        advice_groups = []
596
+                    }
597
+                    maps.new_advice = advice_groups
598
+                    }
599
+                 }
328 600
                 
329 601
 
330
-                this.scheduleMap = scheduleMap
331
-                // console.log(9999999999,this.scheduleMap)
602
+                     this.scheduleMap = scheduleMap  
603
+                 }
332 604
 
333 605
                 
334 606
                 }

+ 1 - 1
src/xt_pages/dialysis/schedualPatient.vue View File

@@ -380,7 +380,7 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
380 380
         this.websocket.onmessage = e => {
381 381
           let res = JSON.parse(e.data);
382 382
           // let res = re.data;
383
-          console.log('res3333333333',res)
383
+          // console.log('res3333333333',res)
384 384
           if(res.channel == 'queue/join'){
385 385
             if(res.data.fisrtQueueInfo != null){
386 386
               if(res.data.fisrtQueueInfo.create_time){

+ 6 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderThirty.vue View File

@@ -65,7 +65,7 @@
65 65
             <td width="10"></td>
66 66
             <td width="70">有/无特殊:</td>
67 67
             <td width="200">
68
-                <div class="under-line" style="text-align:left">&nbsp;{{ prescription.remark ? prescription.remark : '' }}</div>
68
+                <div class="under-line" style="text-align:left">&nbsp;{{receiverTreatmentAccess.sick_condition_other?receiverTreatmentAccess.sick_condition_other:''}}</div>
69 69
             </td>
70 70
           </tr>
71 71
         </tbody>
@@ -100,7 +100,7 @@
100 100
           <tbody>
101 101
             <tr>
102 102
                 <td width="70">血管通路:</td>
103
-                <td width="300">
103
+                <td width="370">
104 104
                     <div>
105 105
                         <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘') > -1 ? true : false" showValue="内瘘"></label-box>
106 106
                         &nbsp;
@@ -110,12 +110,14 @@
110 110
                         &nbsp;
111 111
                         <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('直穿') > -1 ? true : false" showValue="直穿"></label-box>
112 112
                         &nbsp;
113
+                       <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('人造血管') > -1 ? true : false" showValue="人造血管"></label-box>
114
+                        &nbsp;
113 115
                     </div>
114 116
                 </td>
115
-                <td width='30'></td>
117
+                <td width='20'></td>
116 118
                 <td width="70">封管用药:</td>
117 119
                 <td>
118
-                    <div class="under-line" style="text-align:left;">&nbsp;</div>
120
+                    <div class="under-line" style="text-align:left;">&nbsp;{{prescription.remark?prescription.remark:''}}</div>
119 121
                 </td>
120 122
             </tr>
121 123
           </tbody>

+ 37 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue View File

@@ -289,6 +289,7 @@
289 289
                 </tbody>
290 290
               </table>
291 291
 
292
+
292 293
               <table class="table-box">
293 294
                 <tbody>
294 295
                   <tr>
@@ -418,6 +419,42 @@
418 419
                   </tr>
419 420
                 </tbody>
420 421
               </table>
422
+              <table >
423
+                <tbody>
424
+                  <tr class="table-box">
425
+                      <td width='50'>体温:</td>
426
+                      <td width="50">
427
+                        <div class="under-line">&nbsp;{{ predialysis.temperature ? predialysis.temperature : "/" }}</div>
428
+                      </td>
429
+                      <td width="10">℃</td>
430
+                      <td width="30"></td>
431
+                      <td width='70'>收缩压:</td>
432
+                      <td width="50">
433
+                        <div class="under-line">&nbsp;{{ predialysis.systolic_blood_pressure ? predialysis.systolic_blood_pressure : "/" }}</div>
434
+                      </td>
435
+                      <td width="10">mmHg</td>
436
+                      <td width="10"></td>
437
+                      <td width='70'>舒张压:</td>
438
+                      <td width="50">
439
+                        <div class="under-line">&nbsp;{{ predialysis.diastolic_blood_pressure ? predialysis.diastolic_blood_pressure : "/" }}</div>
440
+                      </td>
441
+                      <td width="10">mmHg</td>
442
+                      <td width="30"></td>
443
+                      <td width='70'>脉搏:</td>
444
+                      <td width="50">
445
+                        <div class="under-line">&nbsp;{{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "/" }}</div>
446
+                      </td>
447
+                      <td width="60">次/分</td>
448
+                      <td width="30"></td>
449
+                      <td width='70'>呼吸:</td>
450
+                      <td width="50">
451
+                        <div class="under-line">&nbsp;{{ predialysis.breathing_rate ? predialysis.breathing_rate : "/" }}</div>
452
+                      </td>
453
+                      <td width="60">次/分</td>
454
+                      <td></td>
455
+                  </tr>
456
+                </tbody>
457
+              </table>
421 458
             </td>
422 459
           </tr>
423 460
         </tbody>

+ 25 - 5
src/xt_pages/stock/Dialog/stockInDialog.vue View File

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-dialog title="选择商品" :visible.sync="visibility" :close-on-click-modal="isClose"
2
+  <el-dialog title="选择耗材" :visible.sync="visibility" :close-on-click-modal="isClose"
3 3
              :close-on-press-escape="isClose">
4 4
 
5 5
     <div class="filter-container">
@@ -105,6 +105,7 @@
105 105
         SelectedDatas: [],
106 106
         table_current_index: -1,
107 107
         tableData:[],
108
+        row_id:0,
108 109
       }
109 110
     },
110 111
     props: {
@@ -135,7 +136,7 @@
135 136
         }
136 137
       },
137 138
        goodTypeTableChange: function(currentRow, oldCurrentRow) {
138
-       
139
+        
139 140
         let keyName = ""
140 141
         var arr = []
141 142
         for(let i= 0;i<this.propForm.goods.length;i++){
@@ -229,11 +230,27 @@
229 230
         console.log("searchArr",searchArr)
230 231
         this.propForm.goodType = []
231 232
         this.propForm.goodType = searchArr
233
+        
234
+       
232 235
       },
233 236
       changeGoodInfoTableData: function(val) {
234
-      }, changeAllGoodInfoTableData: function(selection) {
235
-
236
-        var goodInfos = this.propForm.goods[this.table_current_index][this.currentGoodTypeId]
237
+      },
238
+      changeAllGoodInfoTableData: function(selection) {
239
+        console.log("888878888888",this.propForm.goods)
240
+        var arr = []
241
+        var id = 0
242
+         for(let i=0;i<this.propForm.goods.length;i++){
243
+            for(let key in this.propForm.goods[i]){
244
+               if(key == this.row_id){
245
+                  arr.push(this.propForm.goods[i])
246
+                  id = i
247
+               }
248
+            }
249
+         }
250
+       console.log("arrr33333",arr)
251
+       console.log("i9999",id)
252
+        var goodInfos = this.propForm.goods[id][this.currentGoodTypeId]
253
+        console.log("999999",goodInfos)
237 254
         for (let y = 0; y < goodInfos.length; y++) {
238 255
           goodInfos[y].isSelected = false
239 256
         }
@@ -276,7 +293,10 @@
276 293
         row.index = rowIndex
277 294
       },
278 295
       onRowClicks(row, event, column) {
296
+        console.log("row---",row)
297
+        console.log("column",column)
279 298
         this.table_current_index = row.index
299
+        this.row_id = row.id
280 300
       }, selectGoodInfo(selection, row) {
281 301
         var goodInfos = this.propForm.goods[this.table_current_index][this.currentGoodTypeId]
282 302
         for (let y = 0; y < goodInfos.length; y++) {

+ 1 - 1
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -455,7 +455,7 @@
455 455
         }
456 456
         return name
457 457
       }, specificationName: function(good_info_id) {
458
-        console.log("333333333",this.goodInfo)
458
+        // console.log("333333333",this.goodInfo)
459 459
         let name = ''
460 460
         for (let i = 0; i < this.goodInfo.length; i++) {
461 461
           if (this.goodInfo[i].id == good_info_id) {

+ 1 - 1
src/xt_pages/upload/fast/dialysisParams.vue View File

@@ -437,7 +437,7 @@ export default {
437 437
     watch:{
438 438
         monitor_records:{
439 439
             handler:function(val) {
440
-                console.log(333333333333,this.monitor_records)
440
+                // console.log(333333333333,this.monitor_records)
441 441
                 if(this.monitor_records.length > 5){
442 442
                     this.monitor_records = this.monitor_records
443 443
                 }else{