Browse Source

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

XMLWAN 3 years ago
parent
commit
7f5a302630

+ 29 - 0
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue View File

224
         let allPrescriptions = [];
224
         let allPrescriptions = [];
225
         let targetPrescriptions = [];
225
         let targetPrescriptions = [];
226
         let prescriptions = [];
226
         let prescriptions = [];
227
+
228
+
229
+
230
+
231
+
232
+
227
         for (let i = 0; i < this.allPrescription.length; i++) {
233
         for (let i = 0; i < this.allPrescription.length; i++) {
228
           for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
234
           for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
229
             checkGroup.push(this.allPrescription[i].check_group[a])
235
             checkGroup.push(this.allPrescription[i].check_group[a])
240
           }
246
           }
241
         }
247
         }
242
 
248
 
249
+        for (let i = 0; i < targetPrescriptions.length; i++) {
250
+          var prescription = targetPrescriptions[i];
251
+          for (let b = 0; b < prescription.doctor_advice.length; b++) {
252
+            console.log(prescription.doctor_advice[b].drug.is_special_diseases)
253
+            if (prescription.med_type == "14" && prescription.doctor_advice[b].drug.is_special_diseases != 1) {
254
+              prescription.doctor_advice.splice(b--,1)
255
+            }
256
+          }
257
+          for (let b = 0; b < prescription.project.length; b++) {
258
+            if(prescription.project[b].type == 2){
259
+              if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
260
+                prescription.project.splice(b--,1)
261
+              }
262
+            }else if(prescription.project[b].type == 3){
263
+              if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
264
+                prescription.project.splice(b--,1)
265
+              }
266
+            }
267
+          }
268
+        }
269
+
270
+
271
+
243
         if (targetPrescriptions.length > 0) {
272
         if (targetPrescriptions.length > 0) {
244
           for (let i = 0; i < targetPrescriptions.length; i++) {
273
           for (let i = 0; i < targetPrescriptions.length; i++) {
245
             var prescription = targetPrescriptions[i];
274
             var prescription = targetPrescriptions[i];

+ 0 - 9
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

2655
       comfirm() {
2655
       comfirm() {
2656
 
2656
 
2657
         if (this.curDrugs.length > 0) {
2657
         if (this.curDrugs.length > 0) {
2658
-          if (this.$store.getters.xt_user.org_id == 10138) {
2659
             for (let i = 0; i < this.curDrugs.length; i++) {
2658
             for (let i = 0; i < this.curDrugs.length; i++) {
2660
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2659
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2661
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2660
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2663
               }
2662
               }
2664
 
2663
 
2665
             }
2664
             }
2666
-          }
2667
         }
2665
         }
2668
         if (this.teamList.length > 0) {
2666
         if (this.teamList.length > 0) {
2669
-          if (this.$store.getters.xt_user.org_id == 10138) {
2670
             for (let i = 0; i < this.teamList.length; i++) {
2667
             for (let i = 0; i < this.teamList.length; i++) {
2671
               if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
2668
               if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
2672
                 this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
2669
                 this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
2674
               }
2671
               }
2675
 
2672
 
2676
             }
2673
             }
2677
-          }
2678
 
2674
 
2679
-          if(this.$store.getters.xt_user.org_id == 10138){
2680
             let arr = this.teamList
2675
             let arr = this.teamList
2681
             let newArr = []
2676
             let newArr = []
2682
             arr.map(item => {
2677
             arr.map(item => {
2688
               }
2683
               }
2689
             })
2684
             })
2690
             this.teamList = newArr
2685
             this.teamList = newArr
2691
-          }
2692
         }
2686
         }
2693
 
2687
 
2694
 
2688
 
2695
 
2689
 
2696
         if (this.curDrugs.length == 0) {
2690
         if (this.curDrugs.length == 0) {
2697
-          if (this.$store.getters.xt_user.org_id == 10138) {
2698
             for (let i = 0; i < this.curDrugs.length; i++) {
2691
             for (let i = 0; i < this.curDrugs.length; i++) {
2699
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2692
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2700
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2693
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2701
                 return
2694
                 return
2702
               }
2695
               }
2703
-
2704
             }
2696
             }
2705
-          }
2706
         }
2697
         }
2707
 
2698
 
2708
         // if (this.curPrescriptions.order_status == 2) {
2699
         // if (this.curPrescriptions.order_status == 2) {

+ 22 - 0
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue View File

297
           }
297
           }
298
         }
298
         }
299
 
299
 
300
+        for (let i = 0; i < targetPrescriptions.length; i++) {
301
+          var prescription = targetPrescriptions[i];
302
+          for (let b = 0; b < prescription.doctor_advice.length; b++) {
303
+            console.log(prescription.doctor_advice[b].drug.is_special_diseases)
304
+            if (prescription.med_type == "14" && prescription.doctor_advice[b].drug.is_special_diseases != 1) {
305
+              prescription.doctor_advice.splice(b--,1)
306
+            }
307
+          }
308
+          for (let b = 0; b < prescription.project.length; b++) {
309
+            if(prescription.project[b].type == 2){
310
+              if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
311
+                prescription.project.splice(b--,1)
312
+              }
313
+            }else if(prescription.project[b].type == 3){
314
+              if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
315
+                prescription.project.splice(b--,1)
316
+              }
317
+            }
318
+          }
319
+        }
320
+
321
+
300
         if (targetPrescriptions.length > 0) {
322
         if (targetPrescriptions.length > 0) {
301
           for (let i = 0; i < targetPrescriptions.length; i++) {
323
           for (let i = 0; i < targetPrescriptions.length; i++) {
302
             var prescription = targetPrescriptions[i];
324
             var prescription = targetPrescriptions[i];

+ 129 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

1436
             } else {
1436
             } else {
1437
 
1437
 
1438
               if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1438
               if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1439
+                for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1440
+                  var prescription = response.data.data.sch_prescriptions[i];
1441
+                  for (let b = 0; b < prescription.advices.length; b++) {
1442
+                    console.log(prescription.advices[b].drug.is_special_diseases)
1443
+                    if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
1444
+                      prescription.advices.splice(b--,1)
1445
+                    }
1446
+                  }
1447
+                  for (let b = 0; b < prescription.project.length; b++) {
1448
+                    if(prescription.project[b].type == 2){
1449
+                      if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
1450
+                        prescription.project.splice(b--,1)
1451
+                      }
1452
+                    }else if(prescription.project[b].type == 3){
1453
+                      if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
1454
+                        prescription.project.splice(b--,1)
1455
+                      }
1456
+                    }
1457
+                  }
1458
+                }
1459
+
1460
+
1461
+
1439
 
1462
 
1440
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1463
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1441
                   var prescription = response.data.data.sch_prescriptions[i]
1464
                   var prescription = response.data.data.sch_prescriptions[i]
1797
 
1820
 
1798
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1821
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1799
 
1822
 
1823
+                      for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1824
+                        var prescription = response.data.data.sch_prescriptions[i];
1825
+                        for (let b = 0; b < prescription.advices.length; b++) {
1826
+                          console.log(prescription.advices[b].drug.is_special_diseases)
1827
+                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
1828
+                            prescription.advices.splice(b--,1)
1829
+                          }
1830
+                        }
1831
+                        for (let b = 0; b < prescription.project.length; b++) {
1832
+                          if(prescription.project[b].type == 2){
1833
+                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
1834
+                              prescription.project.splice(b--,1)
1835
+                            }
1836
+                          }else if(prescription.project[b].type == 3){
1837
+                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
1838
+                              prescription.project.splice(b--,1)
1839
+                            }
1840
+                          }
1841
+                        }
1842
+                      }
1843
+
1844
+
1800
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1845
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1801
                         var prescription = response.data.data.sch_prescriptions[i]
1846
                         var prescription = response.data.data.sch_prescriptions[i]
1802
                         let tempAdvice = []
1847
                         let tempAdvice = []
2246
                   } else {
2291
                   } else {
2247
 
2292
 
2248
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2293
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2294
+                      for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2295
+                        var prescription = response.data.data.sch_prescriptions[i];
2296
+                        for (let b = 0; b < prescription.advices.length; b++) {
2297
+                          console.log(prescription.advices[b].drug.is_special_diseases)
2298
+                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
2299
+                            prescription.advices.splice(b--,1)
2300
+                          }
2301
+                        }
2302
+                        for (let b = 0; b < prescription.project.length; b++) {
2303
+                          if(prescription.project[b].type == 2){
2304
+                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
2305
+                              prescription.project.splice(b--,1)
2306
+                            }
2307
+                          }else if(prescription.project[b].type == 3){
2308
+                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
2309
+                              prescription.project.splice(b--,1)
2310
+                            }
2311
+                          }
2312
+                        }
2313
+                      }
2314
+
2249
 
2315
 
2250
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2316
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2251
                         var prescription = response.data.data.sch_prescriptions[i]
2317
                         var prescription = response.data.data.sch_prescriptions[i]
2684
                 } else {
2750
                 } else {
2685
 
2751
 
2686
                   if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2752
                   if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2753
+                    for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2754
+                      var prescription = response.data.data.sch_prescriptions[i];
2755
+                      for (let b = 0; b < prescription.advices.length; b++) {
2756
+                        console.log(prescription.advices[b].drug.is_special_diseases)
2757
+                        if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
2758
+                          prescription.advices.splice(b--,1)
2759
+                        }
2760
+                      }
2761
+                      for (let b = 0; b < prescription.project.length; b++) {
2762
+                        if(prescription.project[b].type == 2){
2763
+                          if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
2764
+                            prescription.project.splice(b--,1)
2765
+                          }
2766
+                        }else if(prescription.project[b].type == 3){
2767
+                          if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
2768
+                            prescription.project.splice(b--,1)
2769
+                          }
2770
+                        }
2771
+                      }
2772
+                    }
2773
+
2687
 
2774
 
2688
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2775
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2689
                       var prescription = response.data.data.sch_prescriptions[i]
2776
                       var prescription = response.data.data.sch_prescriptions[i]
3189
                   } else {
3276
                   } else {
3190
 
3277
 
3191
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3278
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3279
+                      for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3280
+                        var prescription = response.data.data.sch_prescriptions[i];
3281
+                        for (let b = 0; b < prescription.advices.length; b++) {
3282
+                          console.log(prescription.advices[b].drug.is_special_diseases)
3283
+                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
3284
+                            prescription.advices.splice(b--,1)
3285
+                          }
3286
+                        }
3287
+                        for (let b = 0; b < prescription.project.length; b++) {
3288
+                          if(prescription.project[b].type == 2){
3289
+                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
3290
+                              prescription.project.splice(b--,1)
3291
+                            }
3292
+                          }else if(prescription.project[b].type == 3){
3293
+                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
3294
+                              prescription.project.splice(b--,1)
3295
+                            }
3296
+                          }
3297
+                        }
3298
+                      }
3299
+
3192
 
3300
 
3193
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3301
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3194
                         var prescription = response.data.data.sch_prescriptions[i]
3302
                         var prescription = response.data.data.sch_prescriptions[i]
3715
                   } else {
3823
                   } else {
3716
 
3824
 
3717
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3825
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3826
+                      for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3827
+                        var prescription = response.data.data.sch_prescriptions[i];
3828
+                        for (let b = 0; b < prescription.advices.length; b++) {
3829
+                          console.log(prescription.advices[b].drug.is_special_diseases)
3830
+                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
3831
+                            prescription.advices.splice(b--,1)
3832
+                          }
3833
+                        }
3834
+                        for (let b = 0; b < prescription.project.length; b++) {
3835
+                          if(prescription.project[b].type == 2){
3836
+                            if (prescription.med_type == "14" && prescription.project[b].project.specail_project != 1) {
3837
+                              prescription.project.splice(b--,1)
3838
+                            }
3839
+                          }else if(prescription.project[b].type == 3){
3840
+                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
3841
+                              prescription.project.splice(b--,1)
3842
+                            }
3843
+                          }
3844
+                        }
3845
+                      }
3846
+
3718
 
3847
 
3719
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3848
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3720
                         var prescription = response.data.data.sch_prescriptions[i]
3849
                         var prescription = response.data.data.sch_prescriptions[i]

+ 0 - 4
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

1280
         //   return
1280
         //   return
1281
         // }
1281
         // }
1282
        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1282
        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1283
-          if (this.$store.getters.xt_user.org_id == 10138) {
1284
             for (let i = 0; i < this.curDrugs.length; i++) {
1283
             for (let i = 0; i < this.curDrugs.length; i++) {
1285
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1284
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1286
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1285
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1288
               }
1287
               }
1289
 
1288
 
1290
             }
1289
             }
1291
-          }
1292
         }
1290
         }
1293
 
1291
 
1294
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1292
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1295
-          if (this.$store.getters.xt_user.org_id == 10138) {
1296
             for (let i = 0; i < this.curDrugs.length; i++) {
1293
             for (let i = 0; i < this.curDrugs.length; i++) {
1297
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1294
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1298
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1295
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1300
               }
1297
               }
1301
 
1298
 
1302
             }
1299
             }
1303
-          }
1304
         }
1300
         }
1305
         if (this.curStatus == 1 && this.rightTab == 2) {
1301
         if (this.curStatus == 1 && this.rightTab == 2) {
1306
           this.$message.error('改处方是药品,无法添加项目')
1302
           this.$message.error('改处方是药品,无法添加项目')