Browse Source

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

陈少旭 1 year ago
parent
commit
8d913b52ae

+ 18 - 3
src/xt_pages/outpatientDoctorStation/checkTemplate/printThree.vue View File

88
             padding: 0 10px;
88
             padding: 0 10px;
89
           "
89
           "
90
         >
90
         >
91
-          <div>开单医生:{{ doctor ? doctor : "" }}</div>
91
+          <div>开单医生: {{ getAdminUser(item.creator) }}</div>
92
           <div>
92
           <div>
93
             开单日期:
93
             开单日期:
94
             {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
94
             {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
145
       org_id: "",
145
       org_id: "",
146
       singleProjectPrint: [],
146
       singleProjectPrint: [],
147
       operatorMaps: {},
147
       operatorMaps: {},
148
+      adminUser:[],
148
     };
149
     };
149
   },
150
   },
150
   methods: {
151
   methods: {
198
       }
199
       }
199
       return "";
200
       return "";
200
     },
201
     },
201
-
202
+    // 数据源
202
     getPrescriptionPrint() {
203
     getPrescriptionPrint() {
203
       var params = {
204
       var params = {
204
         // patient_id:this.patient_id,
205
         // patient_id:this.patient_id,
217
           console.log("adviceprint9999", advicePrint);
218
           console.log("adviceprint9999", advicePrint);
218
           this.advicePrint = advicePrint;
219
           this.advicePrint = advicePrint;
219
           this.prescriptions = advicePrint;
220
           this.prescriptions = advicePrint;
220
-          // console.log("处方222222", this.prescriptions);
221
+          console.log("处方222222", response.data.data);
221
           var hisPatient = response.data.data.hisPatient;
222
           var hisPatient = response.data.data.hisPatient;
223
+          this.adminUser = response.data.data.roles
222
           // console.log("hisPatient", hisPatient);
224
           // console.log("hisPatient", hisPatient);
223
           this.hisPatient = hisPatient;
225
           this.hisPatient = hisPatient;
224
           let projectPrint = [];
226
           let projectPrint = [];
292
         return "";
294
         return "";
293
       }
295
       }
294
     },
296
     },
297
+    getAdminUser(id) {
298
+      if (id == 0) {
299
+        return "";
300
+      }
301
+      if (id == undefined) {
302
+        return "";
303
+      }
304
+      for (let i = 0; i < this.adminUser.length; i++) {
305
+        if (this.adminUser[i].admin_user_id == id) {
306
+          return this.adminUser[i].user_name;
307
+        }
308
+      }
309
+    },
295
     getHisPatientDetail() {
310
     getHisPatientDetail() {
296
       const params = {
311
       const params = {
297
         patient_id: this.patient_id,
312
         patient_id: this.patient_id,

+ 39 - 14
src/xt_pages/outpatientDoctorStation/template/prinSeven.vue View File

289
               <template v-if="index==yi&&item.advices.length>5">
289
               <template v-if="index==yi&&item.advices.length>5">
290
                 <div style="margin: 20px 0px;">
290
                 <div style="margin: 20px 0px;">
291
                   <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
291
                   <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
292
-                    <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
292
+                    <p style="text-align: right;">医师:{{ getAdminUser(item.creator)}}</p>
293
+                    <!-- <span v-if="setAdminUserES(item.creator)==''" ></span>{{ item.doctor ? item.doctor : "" }} -->
294
+                    <!-- <img style="height:30px;" :src="setAdminUserES(item.creator)" alt srcset /> -->
293
                   </div>
295
                   </div>
294
 
296
 
295
                   <div class="actionBar" >
297
                   <div class="actionBar" >
404
             <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
406
             <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
405
           </div> -->
407
           </div> -->
406
           <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
408
           <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
407
-            <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
409
+            <!-- <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p> -->
410
+            <p style="text-align: right;">医师:{{ getAdminUser(item.creator)}}</p>
411
+            <!-- <span ></span>  -->
412
+            <!-- <img style="height:30px;" :src="setAdminUserES(item.creator)" alt srcset /> -->
408
           </div>
413
           </div>
409
           <!-- <div style="display: flex;justify-content: space-around;border-bottom: 2px solid #000;">
414
           <!-- <div style="display: flex;justify-content: space-around;border-bottom: 2px solid #000;">
410
             <p style="width:300px;">大额处方患者意见:
415
             <p style="width:300px;">大额处方患者意见:
488
       operatorMaps: {},
493
       operatorMaps: {},
489
       operators: [],
494
       operators: [],
490
       doctorList_1: [],
495
       doctorList_1: [],
496
+      adminUser:[],
491
     };
497
     };
492
   },
498
   },
493
   methods: {
499
   methods: {
494
     // 电子签名
500
     // 电子签名
495
-    setAdminUserES(id,name) {
496
-      console.log(id)
497
-      console.log(name)
498
-      console.log(this.operatorMaps)
499
-
500
-
501
+    // setAdminUserES(id,name) {
502
+    //   console.log(id)
503
+    //   console.log(name)
504
+    //   console.log(this.operatorMaps)
505
+    //   if (id == 0) {
506
+    //     return "";
507
+    //   }
508
+    //   if (id in this.operatorMaps) {
509
+    //     return this.operatorMaps[id].url;
510
+    //   } else {
511
+    //     this.doc_name = name
512
+    //     return "";
513
+    //   }
514
+    // },
515
+    setAdminUserES(id) {
516
+      console.log('5555555555',this.operatorMaps);
501
       if (id == 0) {
517
       if (id == 0) {
502
         return "";
518
         return "";
503
       }
519
       }
504
       if (id in this.operatorMaps) {
520
       if (id in this.operatorMaps) {
505
         return this.operatorMaps[id].url;
521
         return this.operatorMaps[id].url;
506
       } else {
522
       } else {
507
-        this.doc_name = name
508
         return "";
523
         return "";
509
       }
524
       }
510
     },
525
     },
526
+    getAdminUser(id) {
527
+      if (id == 0) {
528
+        return "";
529
+      }
530
+      if (id == undefined) {
531
+        return "";
532
+      }
533
+      for (let i = 0; i < this.adminUser.length; i++) {
534
+        if (this.adminUser[i].admin_user_id == id) {
535
+          return this.adminUser[i].user_name;
536
+        }
537
+      }
538
+    },
511
     getAge(patient) {
539
     getAge(patient) {
512
       if(patient.id_card_no == "TWN001836483"){
540
       if(patient.id_card_no == "TWN001836483"){
513
         return patient.age
541
         return patient.age
556
       }
584
       }
557
       return "";
585
       return "";
558
     },
586
     },
587
+    //数据源
559
     getPrescriptionPrint() {
588
     getPrescriptionPrint() {
560
       var params = {
589
       var params = {
561
         patient_id: this.patient_id,
590
         patient_id: this.patient_id,
571
           console.log("response.data.data", response.data.data);
600
           console.log("response.data.data", response.data.data);
572
           this.advicePrint = advicePrint;
601
           this.advicePrint = advicePrint;
573
           this.prescriptions = advicePrint;
602
           this.prescriptions = advicePrint;
574
-
603
+          this.adminUser = response.data.data.roles
575
           this.doctorList_1 = response.data.data.eles;
604
           this.doctorList_1 = response.data.data.eles;
576
          for(let i=0;i<this.advicePrint.length;i++){
605
          for(let i=0;i<this.advicePrint.length;i++){
577
           const arr = new Array()
606
           const arr = new Array()
586
             }
615
             }
587
           }
616
           }
588
 
617
 
589
-        //   this.advicePrint[i]['advices'][0]['arr'] = arr
590
-        //  this.advicePrint[i]["arr"]    = arr
591
-        //  console.log('55555',arr);
592
-        //   console.log('ttttt',arr);
593
           for(let x in arr){
618
           for(let x in arr){
594
             for(let j in this.advicePrint[i].advices){
619
             for(let j in this.advicePrint[i].advices){
595
               if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
620
               if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){

+ 20 - 4
src/xt_pages/outpatientDoctorStation/treatTemplate/printThree.vue View File

77
           </div>
77
           </div>
78
 
78
 
79
           <div style="display: flex; margin-top: 10px; line-height: 24px;padding: 0 10px;">
79
           <div style="display: flex; margin-top: 10px; line-height: 24px;padding: 0 10px;">
80
-              <div style="width: 300px;">开单医生:{{item.doctor?item.doctor:''}}</div>
80
+              <div style="width: 300px;">开单医生:{{getAdminUser(item.creator)}}</div>
81
               <div style="width: 300px;">签章:</div>
81
               <div style="width: 300px;">签章:</div>
82
               <div style="width: 300px;">费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
82
               <div style="width: 300px;">费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
83
           </div>
83
           </div>
250
 
250
 
251
         ],
251
         ],
252
       hisPatient: {},
252
       hisPatient: {},
253
-      diagnoses: []
253
+      diagnoses: [],
254
+      adminUser:[]
254
     }
255
     }
255
   },
256
   },
256
   methods: {
257
   methods: {
293
         }
294
         }
294
       })
295
       })
295
     },
296
     },
296
-
297
+    // 医生签名
298
+    getAdminUser(id) {
299
+      if (id == 0) {
300
+        return "";
301
+      }
302
+      if (id == undefined) {
303
+        return "";
304
+      }
305
+      for (let i = 0; i < this.adminUser.length; i++) {
306
+        if (this.adminUser[i].admin_user_id == id) {
307
+          return this.adminUser[i].user_name;
308
+        }
309
+      }
310
+    },
297
     getDoctor(id) {
311
     getDoctor(id) {
298
       var name = ''
312
       var name = ''
299
       for (let i = 0; i < this.doctorList.length; i++) {
313
       for (let i = 0; i < this.doctorList.length; i++) {
309
       }
323
       }
310
       return ''
324
       return ''
311
     },
325
     },
326
+    // 数据源
312
     getPrescriptionPrint() {
327
     getPrescriptionPrint() {
313
       var params = {
328
       var params = {
314
         patient_id: this.patient_id,
329
         patient_id: this.patient_id,
317
         ids: this.ids,
332
         ids: this.ids,
318
         p_type:2,
333
         p_type:2,
319
       }
334
       }
320
-      console.log('999999', params)
321
       getPrescriptionPrint(params).then(response => {
335
       getPrescriptionPrint(params).then(response => {
322
         if (response.data.state == 1) {
336
         if (response.data.state == 1) {
323
           var advicePrint = response.data.data.advicePrint
337
           var advicePrint = response.data.data.advicePrint
338
+          console.log('ttttttt',response.data.data);
324
           console.log('adviceprint', advicePrint)
339
           console.log('adviceprint', advicePrint)
325
           this.advicePrint = advicePrint
340
           this.advicePrint = advicePrint
326
           this.prescriptions = advicePrint
341
           this.prescriptions = advicePrint
327
           var projectlist = response.data.data.projectlist
342
           var projectlist = response.data.data.projectlist
343
+          this.adminUser = response.data.data.roles
328
           console.log('所有项目列表', projectlist)
344
           console.log('所有项目列表', projectlist)
329
           this.projectList = projectlist
345
           this.projectList = projectlist
330
           this.hisPatient = response.data.data.hisPatient
346
           this.hisPatient = response.data.data.hisPatient