XMLWAN 3 years ago
parent
commit
02800ed367

+ 19 - 1
src/api/schedule.js View File

@@ -172,8 +172,26 @@ export function getRemindPrintList(params){
172 172
 export function getScheduleList(params){
173 173
   
174 174
   return request({
175
-    url:"/api/schedule/getschedulelist",
175
+    url:"/api/schedule/getbloodschedulelist",
176 176
     method:"get",
177 177
     params:params,
178 178
   })
179
+}
180
+
181
+export function getPrintList(params){
182
+   
183
+  return request({
184
+    url:"/api/schedule/getprintlist",
185
+    method:"Get",
186
+    params:params,
187
+  })
188
+}
189
+
190
+export function getAllZoneList(params){
191
+  
192
+  return request({
193
+    url:"/api/schedule/getallzonelist",
194
+    method:"get",
195
+    params:params
196
+  })
179 197
 }

+ 11 - 0
src/router/modules/dialysis.js View File

@@ -58,6 +58,17 @@ export default {
58 58
         noCache: true
59 59
       }
60 60
     },
61
+    {
62
+      path: '/dialysis/signPrint',
63
+      component: () => import('@/xt_pages/dialysis/signPrint'),
64
+      name: '标签打印',
65
+      hidden: true,
66
+      is_menu: false,
67
+      meta: {
68
+        title: '标签打印',
69
+        noCache: true
70
+      }
71
+    },
61 72
     {
62 73
       path: '/dialysis/consumableDrugs',
63 74
       component: () => import('@/xt_pages/dialysis/consumableDrugs'),

+ 11 - 11
src/router/modules/workforce.js View File

@@ -82,16 +82,16 @@ export default {
82 82
         noCache: true
83 83
       }
84 84
     },
85
-    // {
86
-    //   path: '/schedule/remind/print/setting',
87
-    //   component: () => import('@/xt_pages/workforce/remind_print_setting'),
88
-    //   name: 'remind_print_setting',
89
-    //   hidden: true,
90
-    //   is_menu: false,
91
-    //   meta: {
92
-    //     title: 'remind_print_setting',
93
-    //     noCache: true
94
-    //   }
95
-    // },
85
+    {
86
+      path: '/schedule/remind/print/setting',
87
+      component: () => import('@/xt_pages/workforce/remind_print_setting'),
88
+      name: 'remind_print_setting',
89
+      hidden: true,
90
+      is_menu: false,
91
+      meta: {
92
+        title: 'remind_print_setting',
93
+        noCache: true
94
+      }
95
+    },
96 96
   ]
97 97
 }

+ 9 - 2
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

@@ -1209,13 +1209,20 @@ export default {
1209 1209
 
1210 1210
     // 数据开始
1211 1211
     show(predialysis,last_after) {
1212
+      console.log("predialysis",predialysis)
1212 1213
       this.isVisibility = true
1213 1214
       this.predialysis = predialysis
1214 1215
       this.form.observation_content = predialysis.observation_content
1215 1216
       this.form.inpatient_department = predialysis.inpatient_department
1216 1217
       this.form.observation_content_other = predialysis.observation_content_other
1217
-      this.form.hypertenison = predialysis.hypertenison.toString()
1218
-      this.form.hypopiesia = predialysis.hypopiesia.toString()
1218
+      if(predialysis.id > 0){
1219
+         this.form.hypertenison = predialysis.hypertenison.toString()
1220
+      }
1221
+      if(predialysis.id > 0){
1222
+        this.form.hypopiesia = predialysis.hypopiesia.toString()
1223
+      }
1224
+    
1225
+    
1219 1226
       this.form.leave_office_method = predialysis.leave_office_method
1220 1227
       this.form.lapse = predialysis.lapse
1221 1228
       // console.log("透后", predialysis);

+ 4 - 1
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue View File

@@ -313,7 +313,10 @@ export default {
313 313
       return false;
314 314
     },
315 315
     show(accepts) {
316
-    
316
+      console.log("accepts333333",accepts)
317
+      if(accepts.id > 0){
318
+        accepts.tumble = accepts.tumble.toString()
319
+      }
317 320
       this.accepts = accepts;
318 321
       // console.log("accepts", accepts);
319 322
       var arr = [];

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

@@ -2,13 +2,24 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+       <el-button
6
+          size="small"
7
+          icon="el-icon-printer"
8
+          :disabled="selecting_schs.length == 0"
9
+          @click="signPrintAction"
10
+          type="primary"
11
+          style="float:right"
12
+        >标签打印
13
+      </el-button>
5 14
       <el-button
6 15
           size="small"
7 16
           icon="el-icon-printer"
8 17
           :disabled="selecting_schs.length == 0"
9 18
           @click="batchPrintAction"
10 19
           type="primary"
11
-          >打印</el-button>
20
+          >医嘱打印
21
+      </el-button>
22
+   
12 23
     </div>
13 24
     <div class="app-container">
14 25
       <!-- <div class="filter-container">
@@ -111,6 +122,11 @@
111 122
             <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
112 123
           </template>
113 124
         </el-table-column>
125
+        <el-table-column  label="分区床位" width="100">
126
+          <template slot-scope="scope" >
127
+              {{scope.row.zone_name}}/{{scope.row.number}}
128
+          </template>
129
+        </el-table-column>
114 130
         <el-table-column prop="date" label="透析器" align="center" min-width="26px">
115 131
           <template slot-scope="scope">
116 132
             <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
@@ -513,6 +529,8 @@ export default {
513 529
                     it.zoneId = item.device_number.zone.id
514 530
                     it.dialysis_no = item.patient.dialysis_no
515 531
                     it.mode_id = item.mode_id
532
+                    it.number = item.device_number.number
533
+                    it.zone_name = item.device_number.zone.name
516 534
                     arr.push(it)
517 535
                 })
518 536
             })
@@ -575,6 +593,8 @@ export default {
575 593
                     it.zoneId = item.device_number.zone.id
576 594
                     it.dialysis_no = item.patient.dialysis_no
577 595
                     it.mode_id = item.mode_id
596
+                    it.number = item.device_number.number
597
+                    it.zone_name = item.device_number.zone.name
578 598
                     arr.push(it)
579 599
                 })
580 600
             })
@@ -662,7 +682,7 @@ export default {
662 682
       for (let index = 0; index < this.selecting_schs.length; index++) {
663 683
         sch_ids.push(this.selecting_schs[index].patient_id);
664 684
       }
665
-    //   console.log("sch_ids",sch_ids)
685
+  
666 686
       this.$store.dispatch("SetAdviceIDs", sch_ids);
667 687
        var name = ""
668 688
         for(let i=0;i<this.deliveryWay.length;i++){
@@ -675,6 +695,31 @@ export default {
675 695
        }
676 696
       this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
677 697
 
698
+    },
699
+    signPrintAction:function(){
700
+      if (this.selecting_schs.length === 0) {
701
+        this.$message.error("请至少选择一条需要打印的内容");
702
+        return false;
703
+      }
704
+      // 模板ID为6
705
+      var sch_ids = [];
706
+
707
+      for (let index = 0; index < this.selecting_schs.length; index++) {
708
+        sch_ids.push(this.selecting_schs[index].patient_id);
709
+      }
710
+  
711
+      this.$store.dispatch("SetAdviceIDs", sch_ids);
712
+       var name = ""
713
+        for(let i=0;i<this.deliveryWay.length;i++){
714
+            if(this.delivery_way == this.deliveryWay[i].id){
715
+              name = this.deliveryWay[i].name
716
+            }
717
+        }
718
+        if(name == '全部'){
719
+          name = ""
720
+       }
721
+      this.$router.push({ path: "/dialysis/signPrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
722
+
678 723
     },
679 724
     batchPrintActionOne: function() {
680 725
       if (this.selecting_schs.length === 0) {
@@ -868,7 +913,8 @@ export default {
868 913
     handleSelectionChange(val){
869 914
         // console.log('val',val)
870 915
         this.selecting_schs = val;
871
-    }
916
+    },
917
+    
872 918
   },
873 919
   components: {
874 920
     BreadCrumb

+ 171 - 34
src/xt_pages/workforce/components/nextTableWeeks.vue View File

@@ -25,7 +25,8 @@
25 25
           </li>
26 26
         </ul>
27 27
       </div>
28
-      
28
+    </div>
29
+    <div class="cell clearfix">
29 30
       <div  class="title"><span class="name">班 次</span> :</div>
30 31
       <div class="time">
31 32
         <ul class>
@@ -40,6 +41,36 @@
40 41
         </ul>
41 42
       </div>
42 43
     </div>
44
+    <div class="cell clearfix">
45
+      <div  class="title"><span class="name">处方状态</span> :</div>
46
+      <div class="time">
47
+        <ul class>
48
+          <li
49
+            :class="item.id == pre_status ? 'active' : ''"
50
+            @click="selectPreList(item.id)"
51
+            v-for="item in preStatusList"
52
+            :key="item.id"
53
+          >
54
+            {{ item.name }}
55
+          </li>
56
+        </ul>
57
+      </div>
58
+    </div>
59
+    <div class="cell clearfix">
60
+      <div  class="title"><span class="name">分区</span> :</div>
61
+      <div class="time">
62
+        <ul class>
63
+          <li
64
+            :class="item.id == zone ? 'active' : ''"
65
+            @click="selectZoneList(item.id)"
66
+            v-for="item in zoneList"
67
+            :key="item.id"
68
+          >
69
+            {{ item.name }}
70
+          </li>
71
+        </ul>
72
+      </div>
73
+    </div>
43 74
     <el-table
44 75
       :row-style="{ color: '#303133' }"
45 76
       :data="scheduleData"
@@ -50,6 +81,23 @@
50 81
       }"
51 82
       style="width: 100%"
52 83
     >
84
+      <el-table-column label="透析处方" min-width="100" align="center">
85
+        <template slot-scope="scope">
86
+          <span v-if="scope.row.prescription.id > 0">已确认</span>
87
+          <span v-if="scope.row.prescription.id == 0">未确认</span>
88
+        </template>
89
+      </el-table-column>
90
+      <el-table-column label="星期" min-width="100" align="center">
91
+        <template slot-scope="scope">
92
+           <span v-if="scope.row.schedule_week == 0">周日</span>
93
+           <span v-if="scope.row.schedule_week == 1">周一</span>
94
+           <span v-if="scope.row.schedule_week == 2">周二</span>
95
+           <span v-if="scope.row.schedule_week == 3">周三</span>
96
+           <span v-if="scope.row.schedule_week == 4">周四</span>
97
+           <span v-if="scope.row.schedule_week == 5">周五</span>
98
+           <span v-if="scope.row.schedule_week == 6">周六</span>
99
+        </template>
100
+      </el-table-column>
53 101
       <el-table-column label="姓名" min-width="100" align="center">
54 102
         <template slot-scope="scope">
55 103
           {{ scope.row.patient }}
@@ -87,27 +135,18 @@
87 135
           <span v-if="scope.row.prescription.dialysis_irrigation!=''">{{scope.row.prescription.dialysis_irrigation}}</span>
88 136
         </template>
89 137
       </el-table-column>
90
-      <el-table-column label="抗凝剂" min-width="100" align="center">
138
+      <el-table-column label="抗凝剂(商品名称)" min-width="100" align="center">
91 139
         <template slot-scope="scope">
92 140
           <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
93
-          <span v-if="scope.row.prescription.anticoagulant === 2"
94
-            >普通肝素</span
95
-          >
96
-          <span v-if="scope.row.prescription.anticoagulant === 3"
97
-            >低分子肝素</span
98
-          >
99
-          <span v-if="scope.row.prescription.anticoagulant === 4"
100
-            >阿加曲班</span
101
-          >
102
-          <span v-if="scope.row.prescription.anticoagulant === 5"
103
-            >枸橼酸钠</span
104
-          >
105
-          <span v-if="scope.row.prescription.anticoagulant === 6"
106
-            >低分子肝素钙</span
107
-          >
108
-          <span v-if="scope.row.prescription.anticoagulant === 7"
109
-            >低分子肝素钠</span
110
-          >
141
+          <span v-if="scope.row.prescription.anticoagulant === 2">普通肝素</span>
142
+          <span v-if="scope.row.prescription.anticoagulant === 3" >低分子肝素</span>
143
+          <span v-if="scope.row.prescription.anticoagulant === 4">阿加曲班</span>
144
+          <span v-if="scope.row.prescription.anticoagulant === 5">枸橼酸钠</span>
145
+          <span v-if="scope.row.prescription.anticoagulant === 6">低分子肝素钙</span>
146
+          <span v-if="scope.row.prescription.anticoagulant === 7">低分子肝素钠</span>
147
+         <span v-if="scope.row.prescription.antioxidant_commodity_name!=''">
148
+             (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
149
+          </span>
111 150
         </template>
112 151
       </el-table-column>
113 152
       <el-table-column label="总量" min-width="100" align="center">
@@ -152,9 +191,8 @@
152 191
 
153 192
       <el-table-column label="长期医嘱" min-width="440" align="center">
154 193
         <template slot-scope="scope">
155
-          <span style="white-space: pre">{{
156
-            getAdvice(scope.row.doctor_advice)
157
-          }}</span>
194
+          <span style="white-space: pre" v-if="scope.row.doctoradvice.length>0">{{getAdvice(scope.row.doctoradvice)}}</span>
195
+          <span style="white-space: pre" v-if="scope.row.hisdoctoradviceinfo.length>0">{{getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
158 196
         </template>
159 197
       </el-table-column>
160 198
     </el-table>
@@ -162,7 +200,7 @@
162 200
 </template>
163 201
 
164 202
 <script>
165
-import { getNextScheduleWeekDay } from "@/api/schedule";
203
+import { getNextScheduleWeekDay,getAllZoneList } from "@/api/schedule";
166 204
 import WeekItem from "./WeekItem";
167 205
 const moment = require('moment')
168 206
 export default {
@@ -177,6 +215,7 @@ export default {
177 215
   data() {
178 216
     return {
179 217
       weekArr: [
218
+        { id: 0, name: "全部" },
180 219
         { id: 1, name: "周一" },
181 220
         { id: 2, name: "周二" },
182 221
         { id: 3, name: "周三" },
@@ -207,7 +246,15 @@ export default {
207 246
       },
208 247
       scheduleData: [],
209 248
       modeOptions: null,
210
-       org_id:0
249
+      org_id:0,
250
+      pre_status:0,
251
+      preStatusList:[
252
+        {id:0,name:"全部"},
253
+        {id:1,name:"已确认"},
254
+        {id:2,name:"未确认"},
255
+      ],
256
+      zone:"",
257
+      zoneList:[{id:0,name:"全部"}],
211 258
     };
212 259
   },
213 260
   watch: {
@@ -222,7 +269,7 @@ export default {
222 269
   methods: {
223 270
     printAction() {
224 271
       this.$router.push({
225
-        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
272
+        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone+"&prestatus="+this.pre_status
226 273
       });
227 274
     },
228 275
    compare(property) {
@@ -242,6 +289,7 @@ export default {
242 289
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
243 290
           week_type:this.week_type,
244 291
           week_time:this.week_time,
292
+          zone:this.zone,
245 293
         }
246 294
         // const params = {
247 295
         //   start_time:1609603200,
@@ -254,12 +302,37 @@ export default {
254 302
         this.scheduleData = [];
255 303
         if (response.data.state == 1) {
256 304
           var scheduleData = response.data.data.schedule;
257
-          for(let i=0;i<scheduleData.length;i++){
258
-             scheduleData[i].sort = scheduleData[i].number.sort
259
-           }
260
-          var arr =   scheduleData.sort(this.compare('sort'))
261
-           console.log("元旦快乐",arr)
262
-          this.scheduleData = arr
305
+          if(this.pre_status == 0){
306
+              for(let i=0;i<scheduleData.length;i++){
307
+              scheduleData[i].sort = scheduleData[i].number.sort
308
+            }
309
+            var arr =   scheduleData.sort(this.compare('sort'))
310
+            console.log("元旦快乐",arr)
311
+            this.scheduleData = arr
312
+          }
313
+          if(this.pre_status == 1){
314
+            var newList = []
315
+            for(let i=0;i<scheduleData.length;i++){
316
+              if(scheduleData.prescription.id > 0){
317
+                 newList.push(scheduleData[i])
318
+              } 
319
+            }
320
+            var arr =   newList.sort(this.compare('sort'))
321
+            console.log("元旦快乐",arr)
322
+            this.scheduleData = arr
323
+          }
324
+
325
+          if(this.pre_status == 2){
326
+            var newList = []
327
+            for(let i=0;i<scheduleData.length;i++){
328
+              if(scheduleData.prescription.id == 0){
329
+                 newList.push(scheduleData[i])
330
+              } 
331
+            }
332
+            var arr =   newList.sort(this.compare('sort'))
333
+            console.log("元旦快乐",arr)
334
+            this.scheduleData = arr
335
+          }
263 336
         
264 337
          
265 338
         } else {
@@ -313,7 +386,14 @@ export default {
313 386
        this.week_time = type
314 387
        this.getNextScheduleWeekDay()
315 388
     },
316
-
389
+    selectPreList(type){
390
+      this.pre_status = type
391
+      this.getNextScheduleWeekDay()
392
+    },
393
+    selectZoneList(type){
394
+       this.zone = type
395
+       this.getNextScheduleWeekDay()
396
+    },
317 397
     getSchedulesType: function(type) {
318 398
       let type_name = "";
319 399
       switch (type) {
@@ -407,6 +487,62 @@ export default {
407 487
         }
408 488
         return name;
409 489
       }
490
+    },
491
+      getAdviceOne: function(doctor_advice) {
492
+      if (doctor_advice != null) {
493
+        let name = "";
494
+        for (let i = 0; i < doctor_advice.length; i++) {
495
+          let prescribing_number = "";
496
+          let single_dose = "";
497
+          let drug_spec = "";
498
+
499
+          if (doctor_advice[i].prescribing_number > 0) {
500
+            prescribing_number =
501
+              doctor_advice[i].prescribing_number +
502
+              doctor_advice[i].prescribing_number_unit;
503
+          }
504
+          if (doctor_advice[i].single_dose > 0) {
505
+            single_dose =
506
+              " 单次用量 " +
507
+              doctor_advice[i].single_dose +
508
+              doctor_advice[i].single_dose_unit;
509
+          }
510
+
511
+          if (doctor_advice[i].drug_spec > 0) {
512
+            drug_spec =
513
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
514
+          }
515
+
516
+          name =
517
+            name +
518
+            doctor_advice[i].advice_name +
519
+            " " +
520
+            drug_spec +
521
+            " " +
522
+            prescribing_number +
523
+            " " +
524
+            single_dose +
525
+            " " +
526
+            doctor_advice[i].delivery_way +
527
+            " " +
528
+            doctor_advice[i].execution_frequency +
529
+            " " +
530
+            doctor_advice[i].remark +
531
+            "\n";
532
+
533
+          
534
+        }
535
+        return name;
536
+      }
537
+    },
538
+    getAllZoneList(){
539
+      getAllZoneList().then(response=>{
540
+         if(response.data.state == 1){
541
+            var zonelist = response.data.data.zoneList
542
+            this.zoneList.push(...zonelist)
543
+           
544
+         }
545
+      })
410 546
     }
411 547
   },
412 548
   components: {
@@ -415,13 +551,14 @@ export default {
415 551
   created() {
416 552
     this.modeOptions = this.$store.getters.treatment_mode;
417 553
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
418
-    console.log("抗凝机", this.anticoagulants_confit);
419 554
     this.week_type = new Date().getDay();
420 555
     if (this.week_type == 0) {
421 556
       this.week_type = 7;
422 557
     }
558
+    this.getAllZoneList()
423 559
     this.getNextScheduleWeekDay();
424 560
     this.org_id = this.$store.getters.xt_user.org.id
561
+   
425 562
   }
426 563
 };
427 564
 </script>

+ 500 - 88
src/xt_pages/workforce/components/tableWeeks.vue View File

@@ -1,6 +1,14 @@
1 1
 <template>
2 2
   <div>
3 3
     <div class="cell clearfix" style="float: right">
4
+      <el-button
5
+        style="float: right"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="signPrint()"
9
+        type="primary"
10
+        >标签打印
11
+      </el-button>
4 12
       <el-button
5 13
         style="float: right"
6 14
         size="small"
@@ -9,6 +17,15 @@
9 17
         type="primary"
10 18
         >打印
11 19
       </el-button>
20
+
21
+      <el-button
22
+       style="float: right"
23
+       size="small"
24
+       icon="el-icon-printer"
25
+       @click="printActionSetting()"
26
+       type="primary">
27
+        打印设置
28
+      </el-button>
12 29
     </div>
13 30
 
14 31
     <div class="cell clearfix">
@@ -25,8 +42,9 @@
25 42
           </li>
26 43
         </ul>
27 44
       </div>
28
-
29
-      <div  class="title"><span class="name">班 次</span> :</div>
45
+    </div>
46
+    <div  class="cell clearfix">
47
+     <div  class="title"><span class="name">班 次</span> :</div>
30 48
       <div class="time">
31 49
         <ul class>
32 50
           <li
@@ -40,6 +58,36 @@
40 58
         </ul>
41 59
       </div>
42 60
     </div>
61
+    <div  class="cell clearfix">
62
+     <div  class="title"><span class="name">处方状态</span> :</div>
63
+      <div class="time">
64
+        <ul class>
65
+          <li
66
+            :class="item.id == pre_status ? 'active' : ''"
67
+            @click="selectPreStatus(item.id)"
68
+            v-for="item in preStatus"
69
+            :key="item.id"
70
+          >
71
+            {{ item.name }}
72
+          </li>
73
+        </ul>
74
+      </div>
75
+    </div>
76
+    <div class="cell clearfix">
77
+      <div  class="title"><span class="name">分区</span> :</div>
78
+      <div class="time">
79
+        <ul class>
80
+          <li
81
+            :class="item.id == zone ? 'active' : ''"
82
+            @click="selectZoneList(item.id)"
83
+            v-for="item in zoneList"
84
+            :key="item.id"
85
+          >
86
+            {{ item.name }}
87
+          </li>
88
+        </ul>
89
+      </div>
90
+    </div>
43 91
     <el-table
44 92
       :row-style="{ color: '#303133' }"
45 93
       :data="scheduleData"
@@ -50,9 +98,26 @@
50 98
       }"
51 99
       style="width: 100%"
52 100
     >
101
+     <el-table-column label="透析处方" min-width="100" align="center">
102
+        <template slot-scope="scope">
103
+           <span v-if="scope.row.prescription.id>0">已确定</span>
104
+           <span v-if="scope.row.prescription.id == 0">未确定</span>
105
+        </template>
106
+      </el-table-column>
107
+      <el-table-column label="星期" min-width="100" align="center">
108
+        <template slot-scope="scope">
109
+           <span v-if="scope.row.schedule_week == 0">周日</span>
110
+           <span v-if="scope.row.schedule_week == 1">周一</span>
111
+           <span v-if="scope.row.schedule_week == 2">周二</span>
112
+           <span v-if="scope.row.schedule_week == 3">周三</span>
113
+           <span v-if="scope.row.schedule_week == 4">周四</span>
114
+           <span v-if="scope.row.schedule_week == 5">周五</span>
115
+           <span v-if="scope.row.schedule_week == 6">周六</span>
116
+        </template>
117
+      </el-table-column>
53 118
       <el-table-column label="姓名" min-width="100" align="center">
54 119
         <template slot-scope="scope">
55
-          {{ scope.row.patient }}
120
+          {{ scope.row.patient.name }}
56 121
         </template>
57 122
       </el-table-column>
58 123
       <el-table-column label="分区" min-width="70" align="center">
@@ -88,27 +153,18 @@
88 153
         </template>
89 154
       </el-table-column>
90 155
 
91
-      <el-table-column label="抗凝剂" min-width="100" align="center">
156
+      <el-table-column label="抗凝剂(商品名称)" min-width="70" align="center">
92 157
         <template slot-scope="scope">
93 158
           <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
94
-          <span v-if="scope.row.prescription.anticoagulant === 2"
95
-            >普通肝素</span
96
-          >
97
-          <span v-if="scope.row.prescription.anticoagulant === 3"
98
-            >低分子肝素</span
99
-          >
100
-          <span v-if="scope.row.prescription.anticoagulant === 4"
101
-            >阿加曲班</span
102
-          >
103
-          <span v-if="scope.row.prescription.anticoagulant === 5"
104
-            >枸橼酸钠</span
105
-          >
106
-          <span v-if="scope.row.prescription.anticoagulant === 6"
107
-            >低分子肝素钙</span
108
-          >
109
-          <span v-if="scope.row.prescription.anticoagulant === 7"
110
-            >低分子肝素钠</span
111
-          >
159
+          <span v-if="scope.row.prescription.anticoagulant === 2">普通肝素</span>
160
+          <span v-if="scope.row.prescription.anticoagulant === 3">低分子肝素</span>
161
+          <span v-if="scope.row.prescription.anticoagulant === 4">阿加曲班</span>
162
+          <span v-if="scope.row.prescription.anticoagulant === 5">枸橼酸钠</span>
163
+          <span v-if="scope.row.prescription.anticoagulant === 6">低分子肝素钙</span>
164
+          <span v-if="scope.row.prescription.anticoagulant === 7">低分子肝素钠</span>
165
+          <span v-if="scope.row.prescription.antioxidant_commodity_name!=''">
166
+             (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
167
+          </span>
112 168
         </template>
113 169
       </el-table-column>
114 170
       <el-table-column label="总量" min-width="100" align="center">
@@ -148,22 +204,78 @@
148 204
               ? scope.row.prescription.anticoagulant_zongliang + "iu"
149 205
               : ""
150 206
           }}</span>
207
+        
151 208
         </template>
152 209
       </el-table-column>
153 210
 
154 211
       <el-table-column label="长期医嘱" min-width="440" align="center">
155 212
         <template slot-scope="scope">
156
-          <span style="white-space: pre">{{
157
-            getAdvice(scope.row.doctor_advice)
158
-          }}</span>
213
+          <span style="white-space: pre">
214
+             <span v-if="scope.row.doctoradvice.length >0">{{ getAdvice(scope.row.doctoradvice)}}</span>
215
+             <span v-if="scope.row.hisdoctoradviceinfo.length>0">{{ getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
216
+          </span>
159 217
         </template>
160 218
       </el-table-column>
161 219
     </el-table>
220
+
221
+    <el-dialog
222
+      title="打印设置"
223
+      :visible.sync="dialogVisible"
224
+      width="30%"
225
+      >
226
+     <span>
227
+       <ul>
228
+         <li> 
229
+          <el-checkbox v-model="prescription_status">透析处方状态</el-checkbox>
230
+         </li>
231
+         <li>
232
+          <el-checkbox v-model="week">星期</el-checkbox>
233
+         </li>
234
+         <li>
235
+          <el-checkbox v-model="name">姓名</el-checkbox>
236
+         </li>
237
+         <li>
238
+          <el-checkbox v-model="zone">分区</el-checkbox>
239
+         </li>
240
+         <li>
241
+          <el-checkbox v-model="classes">班次</el-checkbox>
242
+         </li>
243
+         <li>
244
+          <el-checkbox v-model="number">机号</el-checkbox>
245
+         </li>
246
+         <li>
247
+          <el-checkbox v-model="mode">透析模式</el-checkbox>
248
+         </li>
249
+         <li>
250
+          <el-checkbox v-model="dialyzers">透析器</el-checkbox>
251
+         </li>
252
+         <li>
253
+          <el-checkbox v-model="perfusion_apparatus">灌流器</el-checkbox>
254
+         </li>
255
+         <li>
256
+          <el-checkbox v-model="anticoagulant">抗凝剂(商品名称)</el-checkbox>
257
+         </li>
258
+         <li>
259
+          <el-checkbox v-model="anticoagulant_zongliang">总量</el-checkbox>
260
+         </li>
261
+         <li>
262
+          <el-checkbox v-model="doctor_advice">长期医嘱</el-checkbox>
263
+         </li>
264
+       </ul>
265
+      
266
+     </span>
267
+     <span slot="footer" class="dialog-footer">
268
+      <el-button @click="dialogVisible = false">取 消</el-button>
269
+      <el-button type="primary" @click="saveRemindPrint">保 存</el-button>
270
+     </span>
271
+   </el-dialog>
272
+
273
+    
162 274
   </div>
163 275
 </template>
164 276
 
165 277
 <script>
166
-import { getSchedules, getScheduleWeekDay } from "@/api/schedule";
278
+import { getSchedules, getScheduleWeekDay,saveRemindPrint,getRemindPrintList,getScheduleList,getAllZoneList } from "@/api/schedule";
167 279
 import WeekItem from "./WeekItem";
168 280
 
169 281
 export default {
@@ -178,6 +290,7 @@ export default {
178 290
   data() {
179 291
     return {
180 292
       weekArr: [
293
+        { id: 0, name: "全部" },
181 294
         { id: 1, name: "周一" },
182 295
         { id: 2, name: "周二" },
183 296
         { id: 3, name: "周三" },
@@ -190,12 +303,18 @@ export default {
190 303
 
191 304
       week_type: "1",
192 305
       week_time:0,
306
+      pre_status:0,
193 307
       weekTimes:[
194 308
         {id:0,name:"全部"},
195 309
         {id:1,name:"上午"},
196 310
         {id:2,name:"下午"},
197 311
         {id:3,name:"晚上"},
198 312
       ],
313
+      preStatus:[
314
+        {id:0,name:"全部"},
315
+        {id:1,name:"已确认"},
316
+        {id:2,name:"未确认"}
317
+      ],
199 318
       weekTitle: ["", "", "", "", "", "", ""],
200 319
       weekData: {
201 320
         Monday: [],
@@ -208,7 +327,37 @@ export default {
208 327
       },
209 328
       scheduleData: [],
210 329
       modeOptions: null,
211
-      org_id:0
330
+      org_id:0,
331
+      dialogVisible:false,
332
+      prescription_status:false,
333
+      week:false,
334
+      name:false,
335
+      zone:false,
336
+      classes:false,
337
+      number:false,
338
+      mode:false,
339
+      dialyzers:false,
340
+      perfusion_apparatus:false,
341
+      anticoagulant:false,
342
+      anticoagulant_zongliang:false,
343
+      doctor_advice:false,
344
+      form:{
345
+        id:0,
346
+        prescription_status:"",
347
+        week:"",
348
+        name:"",
349
+        zone:"",
350
+        classes:"",
351
+        number:"",
352
+        mode:"",
353
+        dialyzers:"",
354
+        perfusion_apparatus:"",
355
+        anticoagulant:"",
356
+        anticoagulant_zongliang:"",
357
+        doctor_advice:"",
358
+      },
359
+      zone:0,
360
+      zoneList:[{id:0,name:"全部"}]
212 361
     };
213 362
   },
214 363
   watch: {
@@ -222,9 +371,14 @@ export default {
222 371
   methods: {
223 372
     printAction() {
224 373
       this.$router.push({
225
-        path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time
374
+        path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone
226 375
       });
227 376
     },
377
+    signPrint(){
378
+      this.$router.push({
379
+        path:"/schedule/remind/print/setting?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone+"&prestatus="+this.pre_status
380
+      })
381
+    },
228 382
     compare(property) {
229 383
        return function (a, b) {
230 384
           var value1 = a[property];
@@ -233,11 +387,11 @@ export default {
233 387
       }
234 388
      },
235 389
     getScheduleWeekDay() {
236
-        const params = {
237
-          week_type:this.week_type,
238
-          week_time:this.week_time,
239
-        }
240
-
390
+     
391
+      const params = {
392
+        week_type:this.week_type,
393
+        week_time:this.week_time,
394
+       }
241 395
       getScheduleWeekDay(params).then(response => {
242 396
         this.scheduleData = [];
243 397
         if (response.data.state == 1) {
@@ -248,7 +402,7 @@ export default {
248 402
           var arr = scheduleData.sort(this.compare('sort'))
249 403
 
250 404
           var arr =   scheduleData.sort(this.compare('sort'))
251
-        //  console.log("元旦快乐",arr)
405
+       
252 406
           this.scheduleData = arr
253 407
         } else {
254 408
           this.$message.error("网络错误");
@@ -257,47 +411,54 @@ export default {
257 411
       });
258 412
     },
259 413
 
260
-    // getSchedules(weekType) {
261
-    //   getSchedules(weekType).then(response => {
262
-    //     this.scheduleData = []
263
-    //     if (response.data.state == 1) {
264
-    //       this.weekTitle = response.data.data.weekTitle
265
-    //       var theSchedules = response.data.data.schdules
266
-    //       var that = this
267
-    //       theSchedules.forEach(function(schedule) {
268
-    //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
269
-    //         var weekPath = that.weekPath(schedule.schedule_week)
270
-    //         if (weekPath.length > 0) {
271
-    //           that.weekData[weekPath].push(schedule)
272
-    //         }
273
-    //       })
274
-    //       var rowNum = 0
275
-    //       console.log(that.weekData)
276
-    //       for (var index in that.weekData) {
277
-    //         var thisLen = that.weekData[index].length
278
-    //         rowNum = rowNum >= thisLen ? rowNum : thisLen
279
-    //       }
280
-    //       console.log(rowNum)
281
-    //       for (let index = 0; index < rowNum; index++) {
282
-    //         var dataItem = {}
283
-    //         for (var weekIndex in that.weekData) {
284
-    //           var weekItem = that.weekData[weekIndex].shift()
285
-    //           console.log('weekItem', weekItem)
286
-    //           if (typeof (weekItem) != 'undefined') {
287
-    //             dataItem[weekIndex] = weekItem
288
-    //           }
289
-    //         }
290
-    //         that.scheduleData.push(dataItem)
291
-    //       }
292
-    //
293
-    //       console.log(that.scheduleData)
294
-    //
295
-    //     } else {
296
-    //       this.$message.error('网络错误')
297
-    //       return false
298
-    //     }
299
-    //   })
300
-    // },
414
+    getScheduleList(){
415
+        const params = {
416
+          week_type:this.week_type,
417
+          week_time:this.week_time,
418
+          zone:this.zone,
419
+        }
420
+       
421
+       getScheduleList(params).then(response=>{
422
+         if(response.data.state ==1){
423
+           console.log("22333333333",this.pre_status)
424
+           var list = response.data.data.list
425
+           if(this.pre_status == 0){
426
+             
427
+            for(let i=0;i<list.length;i++){
428
+                list[i].sort = list[i].number.sort
429
+            }
430
+
431
+            var arr = list.sort(this.compare('sort'))
432
+              console.log("list2222999999999",list)
433
+            this.scheduleData = arr
434
+           }
435
+           if(this.pre_status == 1){
436
+              var newList = []
437
+              for(let i=0;i<list.length;i++){
438
+                if(list[i].prescription.id > 0){
439
+                   newList.push(list[i])
440
+                }
441
+              }
442
+              var arr = newList.sort(this.compare('sort'))
443
+              this.scheduleData = arr
444
+           }
445
+
446
+           if(this.pre_status == 2){
447
+              var newList = []
448
+              for(let i=0;i<list.length;i++){
449
+                if(list[i].prescription.id ==0){
450
+                   newList.push(list[i])
451
+                }
452
+              }
453
+              var arr = newList.sort(this.compare('sort'))
454
+              this.scheduleData = arr
455
+           }
456
+         
457
+          }
458
+       })
459
+    },
460
+
461
+   
301 462
     weekType(weekTime) {
302 463
       var theType = 2;
303 464
       switch (weekTime) {
@@ -336,16 +497,21 @@ export default {
336 497
     },
337 498
     selectWeekType(type) {
338 499
       this.week_type = type;
339
-      // let params = {
340
-      //   week_type: this.week_type
341
-      // };
342
-      this.getScheduleWeekDay();
500
+      this.getScheduleList()
343 501
     },
502
+
344 503
     selectWeekTime(type){
345 504
        this.week_time = type
346
-       this.getScheduleWeekDay()
505
+      this.getScheduleList()
506
+    },
507
+    selectPreStatus(type){
508
+       this.pre_status = type
509
+       this.getScheduleList()
510
+    },
511
+   selectZoneList(type){
512
+       this.zone = type
513
+       this.getScheduleList()
347 514
     },
348
-
349 515
     getSchedulesType: function(type) {
350 516
       let type_name = "";
351 517
       switch (type) {
@@ -362,7 +528,8 @@ export default {
362 528
       return type_name;
363 529
     },
364 530
     getAdvice: function(doctor_advice) {
365
-      if (doctor_advice != null) {
531
+     
532
+      if (doctor_advice.length > 0) {
366 533
         let name = "";
367 534
         for (let i = 0; i < doctor_advice.length; i++) {
368 535
           let prescribing_number = "";
@@ -438,7 +605,256 @@ export default {
438 605
           }
439 606
         }
440 607
         return name;
608
+      }else{
609
+        return ""
441 610
       }
611
+    },
612
+    getAdviceOne: function(doctor_advice) {
613
+     
614
+      if (doctor_advice.length > 0) {
615
+        let name = "";
616
+        for (let i = 0; i < doctor_advice.length; i++) {
617
+          let prescribing_number = "";
618
+          let single_dose = "";
619
+          let drug_spec = "";
620
+
621
+          if (doctor_advice[i].prescribing_number > 0) {
622
+            prescribing_number =
623
+              doctor_advice[i].prescribing_number +
624
+              doctor_advice[i].prescribing_number_unit;
625
+          }
626
+          if (doctor_advice[i].single_dose > 0) {
627
+            single_dose =
628
+              " 单次用量 " +
629
+              doctor_advice[i].single_dose +
630
+              doctor_advice[i].single_dose_unit;
631
+          }
632
+
633
+          if (doctor_advice[i].drug_spec > 0) {
634
+            drug_spec =
635
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
636
+          }
637
+
638
+          name =
639
+            name +
640
+            doctor_advice[i].advice_name +
641
+            " " +
642
+            drug_spec +
643
+            " " +
644
+            prescribing_number +
645
+            " " +
646
+            single_dose +
647
+            " " +
648
+            doctor_advice[i].delivery_way +
649
+            " " +
650
+            doctor_advice[i].execution_frequency +
651
+            " " +
652
+            doctor_advice[i].remark +
653
+            "\n";
654
+        }
655
+        return name;
656
+      }else{
657
+        return ""
658
+      }
659
+    },
660
+    printActionSetting(){
661
+       this.getlist()
662
+       this.dialogVisible = true
663
+
664
+    },
665
+    saveRemindPrint(){
666
+       console.log("455555555",this.perfusion_apparatus)
667
+
668
+      if(this.perfusion_apparatus == true){
669
+         console.log("3333")
670
+          this.form.perfusion_apparatus = 1
671
+       }
672
+       if(this.perfusion_apparatus == false){
673
+          this.form.perfusion_apparatus = 2
674
+       }
675
+       if(this.prescription_status == true){
676
+         this.form.prescription_status = 1
677
+       }
678
+       if(this.prescription_status == false){
679
+         this.form.prescription_status = 2
680
+       }
681
+       if(this.week == true){
682
+          this.form.week = 1
683
+       }
684
+       if(this.week == false){
685
+          this.form.week = 2
686
+       }
687
+       if(this.name == true){
688
+         this.form.name = 1
689
+       }
690
+       if(this.name == false){
691
+          this.form.name = 2
692
+       }
693
+       if(this.zone == true){
694
+         this.form.zone = 1
695
+       }
696
+       if(this.zone == false){
697
+          this.form.zone = 2
698
+       }
699
+       if(this.classes == true){
700
+         this.form.classes = 1
701
+       }
702
+       if(this.classes == false){
703
+         this.form.classes = 2
704
+       }
705
+       if(this.number == true){
706
+          this.form.number = 1
707
+       }
708
+       if(this.number == false){
709
+         this.form.number = 2
710
+       }
711
+       if(this.mode == true){
712
+           this.form.mode = 1
713
+       }
714
+       if(this.mode == false){
715
+         this.form.mode = 2
716
+       }
717
+       if(this.dialyzers == true){
718
+          this.form.dialyzers = 1
719
+       }
720
+       if(this.dialyzers == false){
721
+          this.form.dialyzers = 2
722
+       }
723
+     
724
+       if(this.anticoagulant == true){
725
+          this.form.anticoagulant = 1
726
+       }
727
+       if(this.anticoagulant == false){
728
+         this.form.anticoagulant = 2
729
+       }
730
+       if(this.anticoagulant_zongliang == true){
731
+          this.form.anticoagulant_zongliang  = 1
732
+       }
733
+       if(this.anticoagulant_zongliang == false){
734
+          this.form.anticoagulant_zongliang = 2
735
+       }
736
+       if(this.doctor_advice == true){
737
+          this.form.doctor_advice =1
738
+       }
739
+       if(this.doctor_advice == false){
740
+          this.form.doctor_advice = 2
741
+       }
742
+       console.log("555555555",this.form.prescription_status)
743
+        var params = {
744
+          id:this.form.id,
745
+          prescription_status:this.form.prescription_status,
746
+          week:this.form.week,
747
+          name:this.form.name,
748
+          zone:this.form.zone,
749
+          classes:this.form.classes,
750
+          number:this.form.number,
751
+          mode:this.form.mode,
752
+          dialyzers:this.form.dialyzers,
753
+          perfusion_apparatus:this.form.perfusion_apparatus,
754
+          anticoagulant:this.form.anticoagulant,
755
+          anticoagulant_zongliang:this.form.anticoagulant_zongliang,
756
+          doctor_advice:this.form.doctor_advice,
757
+        }
758
+       console.log("params",params)
759
+      saveRemindPrint(params).then(response=>{
760
+          if(response.data.state == 1){
761
+             var settting = response.data.data.setting
762
+             this.$message.success("保存成功")
763
+             this.dialogVisible = false
764
+             this.getlist()
765
+          }
766
+      })
767
+    },
768
+    getlist(){
769
+      getRemindPrintList().then(response=>{
770
+         if(response.data.state == 1){
771
+            var list = response.data.data.list
772
+            console.log("list222332",list)
773
+            if(list.anticoagulant == 1){
774
+              console.log("进来22222")
775
+              this.anticoagulant = true
776
+            }
777
+            if(list.anticoagulant == 2){
778
+               this.anticoagulant = false
779
+            }
780
+            if(list.anticoagulant_zongliang == 1){
781
+              this.anticoagulant_zongliang = true
782
+            }
783
+            if(list.anticoagulant_zongliang == 2){
784
+               this.anticoagulant_zongliang = false 
785
+            }
786
+            if(list.classes == 1 ){
787
+                this.classes = true
788
+            }
789
+            if(list.classes == 2){
790
+                this.classes = false
791
+            }
792
+            if(list.dialyzers == 1){
793
+               this.dialyzers = true
794
+            }
795
+            if(list.dialyzers == 2){
796
+               this.dialyzers = false
797
+            }
798
+            if(list.doctor_advice == 1){
799
+               this.doctor_advice = true
800
+            }
801
+            if(list.doctor_advice == 2){
802
+               this.doctor_advice = false
803
+            }
804
+            if(list.name == 1){
805
+               this.name = true
806
+            }
807
+            if(list.name == 2){
808
+               this.name = false
809
+            }
810
+            if(list.number == 1){
811
+               this.number = true
812
+            }
813
+            if(list.number == 2){
814
+              this.number = false
815
+            }
816
+            if(list.perfusion_apparatus == 1){
817
+              this.perfusion_apparatus = true
818
+            }
819
+            if(list.perfusion_apparatus == 2){
820
+               this.perfusion_apparatus = false
821
+            }
822
+            if(list.prescription_status == 1){
823
+               this.prescription_status = true
824
+            }
825
+            if(list.prescription_status == 2){
826
+               this.prescription_status = false
827
+            }
828
+            if(list.week == 1){
829
+               this.week = true
830
+            } 
831
+            if(list.week == 2){
832
+               this.week = false
833
+            }
834
+            if(list.zone == 1){
835
+               this.zone = true
836
+            }
837
+            if(list.zone == 2){
838
+               this.zone = false
839
+            }
840
+            if(list.mode ==1){
841
+               this.mode = true
842
+            }
843
+            if(list.mode == 2){
844
+              this.mode = false
845
+            }
846
+            this.form.id = list.id
847
+         }
848
+      })
849
+    },
850
+    getAllZoneList(){
851
+      getAllZoneList().then(response=>{
852
+         if(response.data.state == 1){
853
+            var zonelist = response.data.data.zoneList
854
+            this.zoneList.push(...zonelist)
855
+           
856
+         }
857
+      })
442 858
     }
443 859
   },
444 860
   components: {
@@ -447,17 +863,13 @@ export default {
447 863
   created() {
448 864
     this.modeOptions = this.$store.getters.treatment_mode;
449 865
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
450
-    console.log("抗凝机", this.anticoagulants_confit);
451 866
     this.week_type = new Date().getDay();
452 867
     if (this.week_type == 0) {
453 868
       this.week_type = 7;
454 869
     }
455
-    // let params = {
456
-    //   week_type: this.week_type
457
-    // };
458
-    this.getScheduleWeekDay();
459
-    console.log("org2222222",this.$store.getters.xt_user.org.id)
460 870
     this.org_id = this.$store.getters.xt_user.org.id
871
+    this.getScheduleList()
872
+     this.getAllZoneList()
461 873
   }
462 874
 };
463 875
 </script>

+ 114 - 37
src/xt_pages/workforce/next_remind_print.vue View File

@@ -25,52 +25,55 @@
25 25
             <table class="table">
26 26
               <thead>
27 27
                 <tr>
28
-                  <!-- <td :width="td_1_width">姓名</td>
29
-                  <td :width="td_1_width">分区</td>
30
-                  <td :width="td_1_width">班次</td>
31
-                  <td :width="td_1_width">机号</td>
32
-                  <td :width="td_1_width">透析模式</td>
33
-                  <td :width="td_2_width">透析器</td>
34
-                  <td :width="td_2_width">抗凝剂</td>
35
-                  <td :width="td_2_width">低分子肝素</td>
36
-                  <td :width="td_4_width">长期医嘱</td> -->
37
-                  <td width="100">姓名</td>
38
-                  <td width="70">分区</td>
39
-                  <td width="70">班次</td>
40
-                  <td width="70">机号</td>
41
-                  <td width="120">透析模式</td>
42
-                  <td width="100">透析器/灌流器</td>
43
-                  <td width="120">抗凝剂</td>
44
-                  <td width="100">总量</td>
45
-                  <td width="300">长期医嘱</td>
28
+                  <td width="100" v-if="printObj.week == 1">星期</td>
29
+                  <td width="100" v-if="printObj.name == 1">姓名</td>
30
+                  <td width="70" v-if="printObj.zone == 1">分区</td>
31
+                  <td width="70" v-if="printObj.classes == 1">班次</td>
32
+                  <td width="70" v-if="printObj.number == 1">机号</td>
33
+                  <td width="120" v-if="printObj.prescription_status == 1">透析模式</td>
34
+                  <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
35
+                  <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
36
+                  <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
37
+                  <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
46 38
                 </tr>
47 39
               </thead>
48 40
               <tbody>
49 41
               <tr v-for="(main_collection, index) in scheduleData" :key="index">
50
-                <td :width="td_1_width">{{ main_collection.patient}}</td>
51
-                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
52
-                <td :width="td_1_width">
42
+                <td :width="td_1_width" v-if="printObj.week == 1">
43
+                  <span v-if="main_collection.schedule_week == 0">周日</span>
44
+                  <span v-if="main_collection.schedule_week == 1">周一</span>
45
+                  <span v-if="main_collection.schedule_week == 2">周二</span>
46
+                  <span v-if="main_collection.schedule_week == 3">周三</span>
47
+                  <span v-if="main_collection.schedule_week == 4">周四</span>
48
+                  <span v-if="main_collection.schedule_week == 5">周五</span>
49
+                  <span v-if="main_collection.schedule_week == 6">周六</span>
50
+                </td>
51
+                <td :width="td_1_width" v-if="printObj.name == 1">{{ main_collection.patient}}</td>
52
+                <td :width="td_1_width" v-if="printObj.zone == 1">{{ main_collection.zone.name }}</td>
53
+                <td :width="td_1_width" v-if="printObj.classes == 1">
53 54
                   {{getSchedulesType(main_collection.schedule_type)}}
54 55
                 </td>
55
-                <td :width="td_1_width">
56
+                <td :width="td_1_width" v-if="printObj.number == 1">
56 57
                   {{main_collection.number.number}}
57 58
 
58 59
                 </td>
59
-                <td :width="td_1_width">
60
+                <td :width="td_1_width"  v-if="printObj.prescription_status == 1">
60 61
                   {{modeOptions[main_collection.mode_id].name}}
61 62
                 </td>
62
-                <td :width="td_1_width">
63
+                <td :width="td_1_width" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">
63 64
                   <span v-if="org_id!=9987">{{main_collection.prescription.dialyzer_perfusion_apparatus}}</span> 
64 65
                   {{main_collection.prescription.dialysis_dialyszers}} 
65 66
                   <span v-if="main_collection.prescription.dialysis_dialyszers!='' && main_collection.prescription.dialysis_irrigation!=''">/</span>
66 67
                   <span v-if="main_collection.prescription.dialysis_irrigation!=''"> {{main_collection.prescription.dialysis_irrigation}}</span>
67 68
 
68 69
                 </td>
69
-                <td :width="td_1_width">
70
+                <td :width="td_1_width" v-if="printObj.anticoagulant==1">
70 71
                   {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
71
-
72
+                  <span v-if="main_collection.prescription.antioxidant_commodity_name!=''">
73
+                    (<span>{{main_collection.prescription.antioxidant_commodity_name}}</span>)
74
+                  </span>
72 75
                 </td>
73
-                <td :width="td_1_width">
76
+                <td :width="td_1_width"  v-if="printObj.anticoagulant_zongliang == 1">
74 77
                   <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
75 78
                   <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
76 79
                   <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
@@ -79,8 +82,9 @@
79 82
                   <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
80 83
                   <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
81 84
                 </td>
82
-                <td :width="td_4_width" style="text-align:left" >
83
-                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
85
+                <td :width="td_4_width" style="text-align:left"  v-if="printObj.doctor_advice == 1">
86
+                  <span style="white-space: pre" v-if="main_collection.doctor_advice.length>0">{{getAdvice(main_collection.doctor_advice)}}</span>
87
+                  <span style="white-space: pre" v-if="main_collection.hisdoctoradviceinfo.length>0">{{getAdviceOne(main_collection.hisdoctoradviceinfo)}}</span>
84 88
                 </td>
85 89
               </tr>
86 90
               </tbody>
@@ -93,7 +97,7 @@
93 97
 </template>
94 98
 
95 99
 <script>
96
-  import { getNextScheduleWeekDay } from '@/api/schedule'
100
+  import { getNextScheduleWeekDay,getPrintList } from '@/api/schedule'
97 101
   import { parseTime } from '@/utils'
98 102
   import { uParseTime } from '@/utils/tools'
99 103
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
@@ -120,13 +124,17 @@
120 124
         start_time:moment().week(moment().week() + 1).startOf('week').unix(),
121 125
         end_time:moment().week(moment().week() + 1).endOf('week').unix(),
122 126
         org_id:0,
123
-        now_time:0
127
+        now_time:0,
128
+        zone:"",
129
+        pre_status:0,
130
+        printObj:{}
124 131
       }
125 132
     },
126 133
     components: {
127 134
       BreadCrumb
128 135
     },
129 136
     created() {
137
+     this.getPrintList()
130 138
      this.org_id = this.$store.getters.xt_user.org.id
131 139
      this.currentDate = this.getCurrentDate()
132 140
    
@@ -134,12 +142,14 @@
134 142
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
135 143
       this.week_type = this.$route.query.week_type
136 144
       this.week_time  = this.$route.query.week_time
137
-      
145
+      this.zone = this.$route.query.zone
146
+      this.pre_status = this.$route.query.prestatus
138 147
       const params = {
139 148
           week_type:this.week_type,
140 149
           week_time:this.week_time,
141 150
           start_time:this.start_time,
142 151
           end_time:this.end_time,
152
+          zone:this.zone,
143 153
         }
144 154
 
145 155
         //  const params = {
@@ -157,12 +167,37 @@
157 167
         if (resp.state == 1) {
158 168
          var scheduleData = resp.data.schedule
159 169
 
160
-         for(let i=0;i<scheduleData.length;i++){
161
-             scheduleData[i].sort = scheduleData[i].number.sort
170
+          if(this.pre_status == 0){
171
+              for(let i=0;i<scheduleData.length;i++){
172
+              scheduleData[i].sort = scheduleData[i].number.sort
173
+            }
174
+            var arr =   scheduleData.sort(this.compare('sort'))
175
+            console.log("打印",arr)
176
+            this.scheduleData = arr
177
+          }
178
+          if(this.pre_status == 1){
179
+            var newList = []
180
+            for(let i=0;i<scheduleData.length;i++){
181
+              if(scheduleData.prescription.id > 0){
182
+                 newList.push(scheduleData[i])
183
+              } 
184
+            }
185
+            var arr =   newList.sort(this.compare('sort'))
186
+            console.log("打印",arr)
187
+            this.scheduleData = arr
188
+          }
189
+
190
+          if(this.pre_status == 2){
191
+            var newList = []
192
+            for(let i=0;i<scheduleData.length;i++){
193
+              if(scheduleData.prescription.id == 0){
194
+                 newList.push(scheduleData[i])
195
+              } 
196
+            }
197
+            var arr =   newList.sort(this.compare('sort'))
198
+            console.log("打印",arr)
199
+            this.scheduleData = arr
162 200
           }
163
-          var arr = scheduleData.sort(this.compare('sort'))
164
-          console.log("打印数据",arr)
165
-          this.scheduleData = arr
166 201
         } else {
167 202
           this.$message.error(resp.msg)
168 203
         }
@@ -229,6 +264,39 @@
229 264
         }
230 265
 
231 266
       },
267
+
268
+      getAdviceOne:function(doctor_advice) {
269
+        if (doctor_advice != null) {
270
+
271
+        let name = ""
272
+        for (let i = 0; i< doctor_advice.length; i++) {
273
+
274
+          let prescribing_number = ''
275
+          let single_dose = ''
276
+          let drug_spec = ''
277
+
278
+          if (doctor_advice[i].prescribing_number > 0) {
279
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
280
+          }
281
+          if (doctor_advice[i].single_dose > 0) {
282
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
283
+          }
284
+
285
+          if (doctor_advice[i].drug_spec > 0) {
286
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
287
+          }
288
+
289
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
290
+
291
+       
292
+        }
293
+          return name
294
+
295
+
296
+        }
297
+
298
+      },
299
+
232 300
       printAction: function() {
233 301
         const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
234 302
 
@@ -318,6 +386,15 @@
318 386
           return uParseTime(val, '{y}-{m}-{d}')
319 387
          }
320 388
       },
389
+     getPrintList(){
390
+      getPrintList().then(response=>{
391
+         if(response.data.state == 1){
392
+           var list = response.data.data.list
393
+           console.log("list222222222",list)
394
+           this.printObj = list
395
+         }
396
+      })
397
+     }
321 398
     }
322 399
   }
323 400
 </script>

+ 124 - 84
src/xt_pages/workforce/remind_print.vue View File

@@ -24,52 +24,55 @@
24 24
             <table class="table">
25 25
               <thead>
26 26
                 <tr>
27
-                  <!-- <td :width="td_1_width">姓名</td>
28
-                  <td :width="td_1_width">分区</td>
29
-                  <td :width="td_1_width">班次</td>
30
-                  <td :width="td_1_width">机号</td>
31
-                  <td :width="td_1_width">透析模式</td>
32
-                  <td :width="td_2_width">透析器</td>
33
-                  <td :width="td_2_width">抗凝剂</td>
34
-                  <td :width="td_2_width">低分子肝素</td>
35
-                  <td :width="td_4_width">长期医嘱</td> -->
36
-                  <td width="100">姓名</td>
37
-                  <td width="70">分区</td>
38
-                  <td width="70">班次</td>
39
-                  <td width="70">机号</td>
40
-                  <td width="120">透析模式</td>
41
-                  <td width="100">透析器/灌流器</td>
42
-                  <td width="120">抗凝剂</td>
43
-                  <td width="100">总量</td>
44
-                  <td width="300">长期医嘱</td>
27
+                  <td width="100" v-if="printObj.week == 1">星期</td>
28
+                  <td width="100" v-if="printObj.name == 1">姓名</td>
29
+                  <td width="70" v-if="printObj.zone == 1">分区</td>
30
+                  <td width="70" v-if="printObj.classes == 1">班次</td>
31
+                  <td width="70" v-if="printObj.number == 1">机号</td>
32
+                  <td width="120" v-if="printObj.prescription_status == 1">透析模式</td>
33
+                  <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
34
+                  <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
35
+                  <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
36
+                  <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
45 37
                 </tr>
46 38
               </thead>
47 39
               <tbody>
48 40
               <tr v-for="(main_collection, index) in scheduleData" :key="index">
49
-                <td :width="td_1_width">{{ main_collection.patient}}</td>
50
-                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
51
-                <td :width="td_1_width">
41
+                <td :width="td_1_width" v-if="printObj.week == 1">
42
+                  <span v-if="main_collection.schedule_week == 0">周日</span>
43
+                  <span v-if="main_collection.schedule_week == 1">周一</span>
44
+                  <span v-if="main_collection.schedule_week == 2">周二</span>
45
+                  <span v-if="main_collection.schedule_week == 3">周三</span>
46
+                  <span v-if="main_collection.schedule_week == 4">周四</span>
47
+                  <span v-if="main_collection.schedule_week == 5">周五</span>
48
+                  <span v-if="main_collection.schedule_week == 6">周六</span>
49
+                </td>
50
+                <td :width="td_1_width" v-if="printObj.name == 1">{{ main_collection.patient.name}}</td>
51
+                <td :width="td_1_width" v-if="printObj.zone == 1">{{ main_collection.zone.name }}</td>
52
+                <td :width="td_1_width" v-if="printObj.classes == 1">
52 53
                   {{getSchedulesType(main_collection.schedule_type)}}
53 54
                 </td>
54
-                <td :width="td_1_width">
55
+                <td :width="td_1_width" v-if="printObj.number == 1">
55 56
                   {{main_collection.number.number}}
56 57
 
57 58
                 </td>
58
-                <td :width="td_1_width">
59
+                <td :width="td_1_width" v-if="printObj.prescription_status == 1">
59 60
                   {{modeOptions[main_collection.mode_id].name}}
60 61
                 </td>
61
-                <td :width="td_1_width">
62
+                <td :width="td_1_width" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus ==1">
62 63
                   <span v-if="org_id!=9987">{{main_collection.prescription.dialyzer_perfusion_apparatus}}</span>
63 64
                   {{main_collection.prescription.dialysis_dialyszers}}
64 65
                   <span v-if="main_collection.prescription.dialysis_dialyszers!=''&& main_collection.prescription.dialysis_irrigation!='' ">/</span>
65 66
                   <span v-if="main_collection.prescription.dialysis_irrigation!=''">{{main_collection.prescription.dialysis_irrigation}}</span>
66 67
 
67 68
                 </td>
68
-                <td :width="td_1_width">
69
+                <td :width="td_1_width" v-if="printObj.anticoagulant == 1">
69 70
                   {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
70
-
71
+                  <span v-if="main_collection.prescription.antioxidant_commodity_name!=''">
72
+                    (<span>{{main_collection.prescription.antioxidant_commodity_name}}</span>)
73
+                  </span>
71 74
                 </td>
72
-                <td :width="td_1_width">
75
+                <td :width="td_1_width" v-if="printObj.anticoagulant_zongliang == 1">
73 76
                   <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
74 77
                   <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
75 78
                   <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
@@ -78,8 +81,9 @@
78 81
                   <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
79 82
                   <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
80 83
                 </td>
81
-                <td :width="td_4_width" style="text-align:left" >
82
-                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
84
+                <td :width="td_4_width" style="text-align:left"  v-if="printObj.doctor_advice == 1">
85
+                  <span style="white-space: pre" v-if="main_collection.doctoradvice.length>0">{{getAdvice(main_collection.doctoradvice)}}</span>
86
+                   <span v-if="main_collection.hisdoctoradviceinfo.length>0">{{ getAdviceOne(main_collection.hisdoctoradviceinfo)}}</span>
83 87
                 </td>
84 88
               </tr>
85 89
               </tbody>
@@ -92,7 +96,7 @@
92 96
 </template>
93 97
 
94 98
 <script>
95
-  import { getScheduleWeekDay } from '@/api/schedule'
99
+  import { getScheduleList,getPrintList } from '@/api/schedule'
96 100
   import { parseTime } from '@/utils'
97 101
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
98 102
   import print from 'print-js'
@@ -115,76 +119,74 @@
115 119
         modeOptions: null,
116 120
         anticoagulants_confit:null,
117 121
         currentDate:'',
118
-        org_id:0
122
+        org_id:0,
123
+        printObj:{},
124
+        zone:"",
119 125
       }
120 126
     },
121 127
     components: {
122 128
       BreadCrumb
123 129
     },
124 130
     created() {
131
+      this.getPrintList()
125 132
      this.org_id = this.$store.getters.xt_user.org.id
126 133
     //  this.currentDate = this.getCurrentDate()
127 134
       this.modeOptions = this.$store.getters.treatment_mode
128 135
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
129 136
       this.week_type = this.$route.query.week_type
130 137
       this.week_time  = this.$route.query.week_time
131
-
138
+      this.zone = this.$route.query.zone
132 139
       const params = {
133 140
           week_type:this.week_type,
134 141
           week_time:this.week_time,
142
+          zone:this.zone,
135 143
         }
136 144
        console.log("params",params)
137
-      getScheduleWeekDay(params).then(rs => {
138
-        var resp = rs.data
139
-        console.log(resp)
140
-        
141
-        if (resp.state == 1) {
142
-          var scheduleData = resp.data.schdules
143
-          let a = resp.data.day
144
-          console.log("a",a)
145
-          var myDate = new Date(a);
146
-          var year = myDate.getFullYear(); //年
147
-          var month = myDate.getMonth() + 1; //月
148
-          var day = myDate.getDate(); //日
149
-          var days = myDate.getDay();
150
-          switch(days) {
151
-          case 1:
152
-            days = '星期一';
153
-            break;
154
-          case 2:
155
-            days = '星期二';
156
-            break;
157
-          case 3:
158
-            days = '星期三';
159
-            break;
160
-          case 4:
161
-            days = '星期四';
162
-            break;
163
-          case 5:
164
-            days = '星期五';
165
-            break;
166
-          case 6:
167
-            days = '星期六';
168
-            break;
169
-          case 0:
170
-            days = '星期日';
171
-            break;
172
-        }
173
-        var str = year + "年" + month + "月" + day + "日  " + days;
174
-        this.currentDate = str
175
-           console.log("树",scheduleData)
176
-          for(let i=0;i<scheduleData.length;i++){
177
-             scheduleData[i].sort = scheduleData[i].number.sort
145
+       getScheduleList(params).then(response=>{
146
+         if(response.data.state ==1){
147
+           var list = response.data.data.list
148
+           for(let i=0;i<list.length;i++){
149
+              list[i].sort = list[i].number.sort
150
+           }
151
+           var arr = list.sort(this.compare('sort'))
152
+             console.log("list2222999999999",list)
153
+             this.scheduleData = arr
154
+             let a = response.data.data.day
155
+              console.log("a",a)
156
+              var myDate = new Date(a);
157
+              var year = myDate.getFullYear(); //年
158
+              var month = myDate.getMonth() + 1; //月
159
+              var day = myDate.getDate(); //日
160
+              var days = myDate.getDay();
161
+              switch(days) {
162
+              case 1:
163
+                days = '星期一';
164
+                break;
165
+              case 2:
166
+                days = '星期二';
167
+                break;
168
+              case 3:
169
+                days = '星期三';
170
+                break;
171
+              case 4:
172
+                days = '星期四';
173
+                break;
174
+              case 5:
175
+                days = '星期五';
176
+                break;
177
+              case 6:
178
+                days = '星期六';
179
+                break;
180
+              case 0:
181
+                days = '星期日';
182
+                break;
178 183
           }
179
-          var arr = scheduleData.sort(this.compare('sort'))
180
-          console.log("打印数据",arr)
181
-          this.scheduleData = arr
182
-        } else {
183
-          this.$message.error(resp.msg)
184
-        }
185
-      }).catch(err => {
186
-        this.$message.error(err)
187
-      })
184
+          var str = year + "年" + month + "月" + day + "日  " + days;
185
+          this.currentDate = str
186
+          }
187
+       })
188
+       
189
+      
188 190
     },
189 191
     methods: {
190 192
       getAdvice:function(doctor_advice) {
@@ -240,6 +242,36 @@
240 242
 
241 243
         }
242 244
 
245
+      },
246
+      getAdviceOne:function(doctor_advice) {
247
+        if (doctor_advice != null) {
248
+
249
+        let name = ""
250
+        for (let i = 0; i< doctor_advice.length; i++) {
251
+
252
+          let prescribing_number = ''
253
+          let single_dose = ''
254
+          let drug_spec = ''
255
+
256
+          if (doctor_advice[i].prescribing_number > 0) {
257
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
258
+          }
259
+          if (doctor_advice[i].single_dose > 0) {
260
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
261
+          }
262
+
263
+          if (doctor_advice[i].drug_spec > 0) {
264
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
265
+          }
266
+
267
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
268
+
269
+        }
270
+          return name
271
+
272
+
273
+        }
274
+
243 275
       },
244 276
       printAction: function() {
245 277
         const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
@@ -320,8 +352,16 @@
320 352
             return value1 - value2;
321 353
         }
322 354
       },
323
-    }
324
-
355
+     getPrintList(){
356
+      getPrintList().then(response=>{
357
+         if(response.data.state == 1){
358
+           var list = response.data.data.list
359
+           console.log("list222222222",list)
360
+           this.printObj = list
361
+         }
362
+      })
363
+     }
364
+    },
325 365
   }
326 366
 </script>
327 367
 

+ 370 - 2
src/xt_pages/workforce/remind_print_setting.vue View File

@@ -1,3 +1,371 @@
1
-<div class="main-contain">
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="table_panel">
21
+            <div v-for="(main_collection,index) in scheduleData" :key="index" style="border:1px">
22
+               <ul>
23
+                 <li>分区/床位号:{{main_collection.zone.name}}/{{main_collection.number.number}}</li> 
24
+                 <li>姓名:{{main_collection.patient.name}}</li> 
25
+                 <li>抗凝剂: {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}} </li> 
26
+                 <li>总量:  
27
+                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
28
+                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
29
+                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
30
+                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
31
+                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
32
+                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
33
+                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
34
+                 </li> 
35
+                 <li>用法:透析备用</li> 
36
+                 <li>打印时间:{{currentDate}}</li> 
37
+                 <li></li>
38
+               </ul>
39
+           </div>
40
+          </div>
41
+        </div>
42
+      </div>
43
+    </div>
44
+  </div>
45
+</template>
46
+
47
+<script>
48
+  import { getNextScheduleWeekDay,getPrintList } from '@/api/schedule'
49
+  import { parseTime } from '@/utils'
50
+  import { uParseTime } from '@/utils/tools'
51
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
52
+  import print from 'print-js'
53
+  const moment = require('moment') 
54
+  export default {
55
+    name: 'SchedulePrint',
56
+    data() {
57
+      return {
58
+        crumbs: [
59
+          { path: false, name: '排班提醒' },
60
+          { path: false, name: '排班提醒打印' }
61
+        ],
62
+        scheduleData:[],
63
+        week_type: 0,
64
+        day:'',
65
+        td_1_width: '10%',
66
+        td_2_width: '10%',
67
+        td_3_width: '25%',
68
+        td_4_width: '45%',
69
+        modeOptions: null,
70
+        anticoagulants_confit:null,
71
+        currentDate:'',
72
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
73
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
74
+        org_id:0,
75
+        now_time:0,
76
+        zone:"",
77
+        pre_status:0,
78
+        printObj:{}
79
+      }
80
+    },
81
+    components: {
82
+      BreadCrumb
83
+    },
84
+    created() {
85
+     this.getPrintList()
86
+     this.org_id = this.$store.getters.xt_user.org.id
87
+     this.currentDate = this.getCurrentDate()
2 88
    
3
-</div>
89
+      this.modeOptions = this.$store.getters.treatment_mode
90
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
91
+      this.week_type = this.$route.query.week_type
92
+      this.week_time  = this.$route.query.week_time
93
+      this.zone = this.$route.query.zone
94
+      this.pre_status = this.$route.query.prestatus
95
+      const params = {
96
+          week_type:this.week_type,
97
+          week_time:this.week_time,
98
+          start_time:this.start_time,
99
+          end_time:this.end_time,
100
+          zone:this.zone,
101
+        }
102
+      getNextScheduleWeekDay(params).then(rs => {
103
+        var resp = rs.data
104
+        console.log(resp)
105
+        if (resp.state == 1) {
106
+         var scheduleData = resp.data.schedule
107
+
108
+          if(this.pre_status == 0){
109
+              for(let i=0;i<scheduleData.length;i++){
110
+              scheduleData[i].sort = scheduleData[i].number.sort
111
+            }
112
+            var arr = scheduleData.sort(this.compare('sort'))
113
+            this.scheduleData = arr
114
+            console.log("数据类型",this.scheduleData)
115
+          }
116
+          if(this.pre_status == 1){
117
+            var newList = []
118
+            for(let i=0;i<scheduleData.length;i++){
119
+              if(scheduleData.prescription.id > 0){
120
+                 newList.push(scheduleData[i])
121
+              } 
122
+            }
123
+            var arr = newList.sort(this.compare('sort'))
124
+            this.scheduleData = arr
125
+          }
126
+
127
+          if(this.pre_status == 2){
128
+            var newList = []
129
+            for(let i=0;i<scheduleData.length;i++){
130
+              if(scheduleData.prescription.id == 0){
131
+                 newList.push(scheduleData[i])
132
+              } 
133
+            }
134
+            var arr =   newList.sort(this.compare('sort'))
135
+            this.scheduleData = arr
136
+          }
137
+        } else {
138
+          this.$message.error(resp.msg)
139
+        }
140
+      }).catch(err => {
141
+        this.$message.error(err)
142
+      })
143
+
144
+      var now_time = parseInt(this.week_type) * 86400 + this.start_time
145
+      console.log("now",now_time)
146
+      this.now_time = now_time
147
+    },
148
+    methods: {
149
+      getAdvice:function(doctor_advice) {
150
+        if (doctor_advice != null) {
151
+
152
+        let name = ""
153
+        for (let i = 0; i< doctor_advice.length; i++) {
154
+
155
+          let prescribing_number = ''
156
+          let single_dose = ''
157
+          let drug_spec = ''
158
+
159
+          if (doctor_advice[i].prescribing_number > 0) {
160
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
161
+          }
162
+          if (doctor_advice[i].single_dose > 0) {
163
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
164
+          }
165
+
166
+          if (doctor_advice[i].drug_spec > 0) {
167
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
168
+          }
169
+
170
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
171
+
172
+          if (doctor_advice[i].child.length > 0) {
173
+
174
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
175
+
176
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
177
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
178
+              } else {
179
+                doctor_advice[i].child[a]['presc'] = ''
180
+              }
181
+
182
+              if (doctor_advice[i].child[a].single_dose > 0) {
183
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
184
+              } else {
185
+                doctor_advice[i].child[a]['single'] = ''
186
+              }
187
+
188
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
189
+                + doctor_advice[i].child[a].advice_desc
190
+                + doctor_advice[i].child[a].drug_spec_unit
191
+                + doctor_advice[i].child[a].presc
192
+                + doctor_advice[i].child[a].single + "\n"
193
+            }
194
+
195
+          }
196
+        }
197
+          return name
198
+
199
+
200
+        }
201
+
202
+      },
203
+      printAction: function() {
204
+        const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
205
+
206
+        printJS({
207
+          printable: 'print_content',
208
+          type: 'html',
209
+          documentTitle: '  ',
210
+          style: style,
211
+          scanStyles: false
212
+        })
213
+      }, getSchedulesType: function(type) {
214
+        let type_name = ''
215
+        switch (type) {
216
+          case 1:
217
+            type_name = '上午'
218
+            break
219
+          case 2:
220
+            type_name = '下午'
221
+            break
222
+          case 3:
223
+            type_name = '晚上'
224
+            break
225
+        }
226
+        return type_name
227
+      },
228
+      getCurrentDate: function () {
229
+        console.log(this.$route.query.week_type)
230
+        var myDate = new Date();
231
+        var year = myDate.getFullYear(); //年
232
+        var month = myDate.getMonth() + 1; //月
233
+        var day = myDate.getDate() + 7; //日
234
+        var newday = myDate.getDay();
235
+        var days = parseInt(this.$route.query.week_type);
236
+        var dayNum = parseInt(this.$route.query.week_type);
237
+        switch(days) {
238
+          case 1:
239
+            days = '星期一';
240
+            break;
241
+          case 2:
242
+            days = '星期二';
243
+            break;
244
+          case 3:
245
+            days = '星期三';
246
+            break;
247
+          case 4:
248
+            days = '星期四';
249
+            break;
250
+          case 5:
251
+            days = '星期五';
252
+            break;
253
+          case 6:
254
+            days = '星期六';
255
+            break;
256
+          case 7:
257
+            days = '星期日';
258
+            break;
259
+        }
260
+        if(newday > dayNum){
261
+          let lastDay = day - (newday - dayNum)
262
+          console.log("lastDay1",lastDay)
263
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
264
+          return str;
265
+        }else if(newday < dayNum){
266
+          let lastDay = day + (dayNum - newday)
267
+          console.log("lastDay2",lastDay)
268
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
269
+          return str;
270
+        }else{
271
+          var str = year + "年" + month + "月" + day + "日  " + days;
272
+          return str;
273
+        }
274
+        
275
+        
276
+      },
277
+
278
+       compare(property) {
279
+       return function (a, b) {
280
+          var value1 = a[property];
281
+          var value2 = b[property];
282
+          return value1 - value2;
283
+      }
284
+     },
285
+     getTime(val) {
286
+         if(val == ""){
287
+          return ""
288
+         }else {
289
+          return uParseTime(val, '{y}-{m}-{d}')
290
+         }
291
+      },
292
+     getPrintList(){
293
+      getPrintList().then(response=>{
294
+         if(response.data.state == 1){
295
+           var list = response.data.data.list
296
+           console.log("list222222222",list)
297
+           this.printObj = list
298
+         }
299
+      })
300
+     }
301
+    }
302
+  }
303
+</script>
304
+
305
+<style rel="stylesheet/scss" lang="scss" scoped>
306
+.print_main_content {
307
+  background-color: white;
308
+  max-width: 1500px;
309
+  margin: 0 auto;
310
+  padding: 0 0 20px 0;
311
+
312
+  .order_title_panl {
313
+    text-align: center;
314
+
315
+    .main_title {
316
+      font-size: 18px;
317
+      line-height: 40px;
318
+      font-weight: 500;
319
+    }
320
+  }
321
+  .table_panel {
322
+    .table {
323
+      width: 100%;
324
+      border: 1px solid;
325
+      border-collapse: collapse;
326
+      padding: 2px;
327
+
328
+      thead {
329
+        tr {
330
+          td {
331
+            border: 1px solid;
332
+            text-align: center;
333
+            font-size: 20px;
334
+            padding: 15px 5px;
335
+          }
336
+        }
337
+      }
338
+      tbody {
339
+        tr {
340
+          td {
341
+            border: 1px solid;
342
+            text-align: center;
343
+            font-size: 18px;
344
+            padding: 10px 5px;
345
+
346
+            .proj {
347
+              padding: 5px 0;
348
+              text-align: left;
349
+
350
+              .proj_title {
351
+                font-size: 16px;
352
+                font-weight: 500;
353
+                line-height: 25px;
354
+              }
355
+
356
+              .proj_item {
357
+                font-size: 15px;
358
+                line-height: 20px;
359
+
360
+                .zone_name {
361
+                  font-weight: 500;
362
+                }
363
+              }
364
+            }
365
+          }
366
+        }
367
+      }
368
+    }
369
+  }
370
+}
371
+</style>