csx преди 2 години
родител
ревизия
6b83fd2d1c

+ 26 - 14
src/xt_pages/hospitalStation/components/deskPrescription.vue Целия файл

@@ -233,6 +233,8 @@
233 233
                   v-if="dayorMonth == 'month'">{{ getMonthTotal() ? getMonthTotal() : '' }}元</span>
234 234
 
235 235
           </div>
236
+          <span   v-if="dayorMonth =='day'&&curPrescriptions.advices.length > 0"  :class="!curPrescriptions.is_medicine_status ? 'statusRed' : ''">{{curPrescriptions.is_medicine_status?'已发药':'未发药'}}</span>
237
+          <span   v-else></span>
236 238
           <span :class="order_status == '未收费' ? 'statusRed' : ''">{{ order_status }}</span>
237 239
 
238 240
         </div>
@@ -2202,7 +2204,7 @@ export default {
2202 2204
       }
2203 2205
     },
2204 2206
     open(index, isLoading) {
2205
-     
2207
+
2206 2208
       if (!isLoading) {
2207 2209
         if (this.dayorMonth == 'day') {
2208 2210
           if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
@@ -2391,7 +2393,7 @@ export default {
2391 2393
                 'prescriptions': this.prescriptions
2392 2394
               }
2393 2395
               isLoading = true
2394
-             
2396
+
2395 2397
               let num = 0
2396 2398
               // this.prescriptions.map(item => {
2397 2399
               //   if (item.advices.length > 0) {
@@ -2409,8 +2411,8 @@ export default {
2409 2411
                   var arr = []//新增处方
2410 2412
                   var arr_one = []
2411 2413
                 for(let i=0;i<this.prescriptions.length;i++){
2412
-                  if(this.prescriptions[i].id == 0){ 
2413
-                  
2414
+                  if(this.prescriptions[i].id == 0){
2415
+
2414 2416
                     for(let j=0;j<this.prescriptions[i].advices.length;j++){
2415 2417
                        arr.push(this.prescriptions[i].advices[j])
2416 2418
                     }
@@ -2431,7 +2433,7 @@ export default {
2431 2433
                       });
2432 2434
                       let newArr = Object.values(objInfo);
2433 2435
                       console.log("newArr",newArr)
2434
-                      
2436
+
2435 2437
                       for(let i=0;i<arr.length;i++){
2436 2438
                         for(let j=0;j<newArr.length;j++){
2437 2439
                           if(arr[i].id == newArr[j].drug_id){
@@ -2439,18 +2441,18 @@ export default {
2439 2441
                           }
2440 2442
                         }
2441 2443
                       }
2442
-                      
2444
+
2443 2445
                       if(newArr.length >0){
2444 2446
                         for(let i=0;i<newArr.length;i++){
2445 2447
                           for(let j=0;j<newArr[i].child.length;j++){
2446 2448
                             if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.max_unit){
2447 2449
                                 newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number) * newArr[i].child[j].drug.min_number
2448
-                            }  
2450
+                            }
2449 2451
                             newArr[i].out_count +=  newArr[i].child[j].prescribing_number_total
2450 2452
                           }
2451 2453
                         }
2452 2454
                       }
2453
-                      
2455
+
2454 2456
                       if(newArr.length > 0){
2455 2457
                         for(let i=0;i<newArr.length;i++){
2456 2458
                           if(newArr[i].out_count > newArr[i].sum_count){
@@ -2466,7 +2468,7 @@ export default {
2466 2468
                   }
2467 2469
 
2468 2470
                   if(this.prescriptions[i].id > 0){ //修改处方
2469
-                   
2471
+
2470 2472
                      for(let j=0;j<this.prescriptions[i].advices.length;j++){
2471 2473
                        if(this.prescriptions[i].advices[j].advice_id == 0){ //新增列
2472 2474
                          arr_one.push(this.prescriptions[i].advices[j])
@@ -2489,7 +2491,7 @@ export default {
2489 2491
                       });
2490 2492
                       let newArr = Object.values(objInfo);
2491 2493
                       console.log("newArr",newArr)
2492
-                      
2494
+
2493 2495
                       for(let i=0;i<arr_one.length;i++){
2494 2496
                         for(let j=0;j<newArr.length;j++){
2495 2497
                           if(arr_one[i].id == newArr[j].drug_id){
@@ -2497,7 +2499,7 @@ export default {
2497 2499
                           }
2498 2500
                         }
2499 2501
                       }
2500
-                      
2502
+
2501 2503
                       if(newArr.length >0){
2502 2504
                         for(let i=0;i<newArr.length;i++){
2503 2505
                           for(let j=0;j<newArr[i].child.length;j++){
@@ -2507,10 +2509,10 @@ export default {
2507 2509
                             }
2508 2510
                             if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.min_unit && newArr[i].child[j].drug.max_unit!=newArr[i].child[j].drug.min_unit){
2509 2511
                               newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number)
2510
-                             } 
2512
+                             }
2511 2513
                              if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.max_unit && newArr[i].child[j].drug.max_unit ==newArr[i].child[j].drug.min_unit){
2512 2514
                                 newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number)
2513
-                             } 
2515
+                             }
2514 2516
                           }
2515 2517
                         }
2516 2518
                          console.log("wodeshju",newArr)
@@ -2520,7 +2522,7 @@ export default {
2520 2522
                           }
2521 2523
                         }
2522 2524
                       }
2523
-                      
2525
+
2524 2526
                       if(newArr.length > 0){
2525 2527
                         for(let i=0;i<newArr.length;i++){
2526 2528
                           if(newArr[i].out_count > newArr[i].sum_count){
@@ -2636,6 +2638,12 @@ export default {
2636 2638
       }
2637 2639
     },
2638 2640
     addTab(targetName) {
2641
+      for(let i = 0; i < this.prescriptions.length; i++){
2642
+        if (this.prescriptions[i].is_medicine_status) {
2643
+          this.$message.error('处方中包含已发药处方,无法新增')
2644
+          return
2645
+        }
2646
+      }
2639 2647
       // if (this.curPrescriptions.order_status == 2) {
2640 2648
       //   this.$message.error('该处方已经结算或者退费,无法继续添加处方')
2641 2649
       //   return
@@ -2707,6 +2715,10 @@ export default {
2707 2715
 
2708 2716
     },
2709 2717
     removeTab(targetName) {
2718
+      if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 || this.curPrescriptions.is_medicine_status) {
2719
+        this.$message.error('该处方已经结算或者记账或者已发药,无法删除')
2720
+        return
2721
+      }
2710 2722
       if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 4) {
2711 2723
         this.$message.error('该处方已经结算或者已经上传医保系统,无法删除')
2712 2724
         return

+ 14 - 10
src/xt_pages/hospitalStation/components/prescriptionTable.vue Целия файл

@@ -6,7 +6,7 @@
6 6
       <el-table-column align="center" prop="day" width="70" label="序号">
7 7
         <template slot-scope="scope">
8 8
           <div style="display:flex;align-items:center;">
9
-            <el-input v-model="scope.row.groupno" placeholder=""></el-input>
9
+            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.groupno" placeholder=""></el-input>
10 10
           </div>
11 11
         </template>
12 12
       </el-table-column>
@@ -28,10 +28,10 @@
28 28
       <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
29 29
         <template slot-scope="scope">
30 30
           <div style="display:flex;align-items:center;">
31
-            <el-input v-model="scope.row.single_dose" @input="getAllChange(scope)"
31
+            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.single_dose" @input="getAllChange(scope)"
32 32
                       style="width:50%;"></el-input>
33 33
             <!-- <div>{{scope.row.single_dose_unit}}</div> -->
34
-            <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
34
+            <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
35 35
                        @change="getAllChange(scope)">
36 36
               <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
37 37
               <el-option :label="scope.row.drug.dose_unit"
@@ -43,7 +43,7 @@
43 43
       </el-table-column>
44 44
       <el-table-column align="center" prop="delivery_way" width="100" label="用法">
45 45
         <template slot-scope="scope">
46
-          <el-select v-model="scope.row.delivery_way" placeholder="请选择">
46
+          <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.delivery_way" placeholder="请选择">
47 47
             <el-option
48 48
                     v-for="(item,index) in drugways"
49 49
                     :key="index"
@@ -55,7 +55,7 @@
55 55
       </el-table-column>
56 56
       <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
57 57
         <template slot-scope="scope">
58
-          <el-select v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
58
+          <el-select  :disabled="prescription.is_medicine_status"  v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
59 59
             <el-option
60 60
                     v-for="item,index in efs"
61 61
                     :key="index"
@@ -70,7 +70,7 @@
70 70
       <el-table-column align="center" prop="day" width="70" label="天数">
71 71
         <template slot-scope="scope">
72 72
           <div style="display:flex;align-items:center;">
73
-            <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
73
+            <el-input  :disabled="prescription.is_medicine_status"  v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
74 74
             {{'天'}}
75 75
           </div>
76 76
         </template>
@@ -79,10 +79,10 @@
79 79
       <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
80 80
         <template slot-scope="scope">
81 81
           <div style="display:flex;align-items:center;">
82
-            <el-input v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
82
+            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
83 83
                       style="width:50%" placeholder=""></el-input>
84 84
             <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
85
-            <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
85
+            <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
86 86
                        @change="getPrescribingNumberUnit(scope)">
87 87
               <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
88 88
               <el-option :label="scope.row.drug.max_unit"
@@ -103,7 +103,7 @@
103 103
       </el-table-column>
104 104
       <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
105 105
         <template slot-scope="scope">
106
-          <el-select v-model="scope.row.hosp_appr_flag" placeholder="请选择">
106
+          <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.hosp_appr_flag" placeholder="请选择">
107 107
             <el-option label="审批通过" value="1"></el-option>
108 108
             <el-option label="无须审批" value="3"></el-option>
109 109
             <el-option label="审批不通过" value="2"></el-option>
@@ -112,7 +112,7 @@
112 112
       </el-table-column>
113 113
       <el-table-column align="center" prop="remark" width="50" label="备注">
114 114
         <template slot-scope="scope">
115
-          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
115
+          <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
116 116
         </template>
117 117
       </el-table-column>
118 118
       <el-table-column align="center" width="40" prop="name" label="操作">
@@ -335,6 +335,10 @@
335 335
         })
336 336
 
337 337
       }, deleteDrug: function(index, row) {
338
+        if (this.prescription.is_medicine_status){
339
+          this.$message.error('该处方包含已发药的药品,无法删除')
340
+          return
341
+        }
338 342
         if (this.prescription.order_status == 2  || this.prescription.order_status == 4) {
339 343
           this.$message.error('该处方已经结算,无法删除')
340 344
           return

+ 80 - 24
src/xt_pages/hospitalStation/doctorDesk.vue Целия файл

@@ -1006,13 +1006,13 @@
1006 1006
             // }
1007 1007
 
1008 1008
             this.drugs = drugs
1009
-           
1009
+
1010 1010
             this.allDrugs = response.data.data.drugs
1011 1011
             this.advices_template = response.data.data.advices_template
1012
-          
1012
+
1013 1013
             this.department = response.data.data.department
1014 1014
             this.sick = response.data.data.sick
1015
-          
1015
+
1016 1016
             this.diagnoses = response.data.data.diagnose
1017 1017
             this.additions = response.data.data.additions
1018 1018
 
@@ -1183,6 +1183,7 @@
1183 1183
                 let tempAdvice = []
1184 1184
                 let tempProject = []
1185 1185
                 let tempAddition = []
1186
+                var is_medicine  = false
1186 1187
 
1187 1188
                 //药品
1188 1189
                 for (let b = 0; b < prescription.advices.length; b++) {
@@ -1203,11 +1204,15 @@
1203 1204
                     drug: prescription.advices[b].drug,
1204 1205
                     groupno: prescription.advices[b].groupno,
1205 1206
                     hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1207
+                    is_medicine: prescription.advices[b].is_medicine,
1206 1208
 
1207 1209
 
1208 1210
 
1209 1211
                   }
1210 1212
                   tempAdvice.push(obj)
1213
+                  if (prescription.advices[b].is_medicine == 1){
1214
+                    is_medicine = true
1215
+                  }
1211 1216
                 }
1212 1217
 
1213 1218
                 //项目
@@ -1286,7 +1291,9 @@
1286 1291
                   addition: tempAddition,
1287 1292
                   order_status: prescription.order_status,
1288 1293
                   pre_time: preTime,
1289
-                  med_type: parseInt(prescription.med_type)
1294
+                  med_type: parseInt(prescription.med_type),
1295
+                  is_medicine_status: is_medicine,
1296
+
1290 1297
                 }
1291 1298
                 this.prescriptions.push(obj)
1292 1299
               }
@@ -1590,6 +1597,7 @@
1590 1597
                       let tempAdvice = []
1591 1598
                       let tempProject = []
1592 1599
                       let tempAddition = []
1600
+                      var is_medicine  = false
1593 1601
 
1594 1602
                       //药品
1595 1603
                       for (let b = 0; b < prescription.advices.length; b++) {
@@ -1609,10 +1617,15 @@
1609 1617
                           id: prescription.advices[b].drug_id,
1610 1618
                           drug: prescription.advices[b].drug,
1611 1619
                           groupno: prescription.advices[b].groupno,
1612
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
1620
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1621
+                          is_medicine: prescription.advices[b].is_medicine,
1622
+
1613 1623
 
1614 1624
                         }
1615 1625
                         tempAdvice.push(obj)
1626
+                        if (prescription.advices[b].is_medicine == 1){
1627
+                          is_medicine = true
1628
+                        }
1616 1629
                       }
1617 1630
 
1618 1631
                       //项目
@@ -1688,7 +1701,9 @@
1688 1701
                         addition: tempAddition,
1689 1702
                         order_status: prescription.order_status,
1690 1703
                         pre_time: preTime,
1691
-                        med_type: parseInt(prescription.med_type)
1704
+                        med_type: parseInt(prescription.med_type),
1705
+                        is_medicine_status: is_medicine,
1706
+
1692 1707
                       }
1693 1708
                       this.prescriptions.push(obj)
1694 1709
                     }
@@ -1836,8 +1851,8 @@
1836 1851
                         addition: [],
1837 1852
                         order_status: 0,
1838 1853
                         pre_time: nowTime,
1839
-                        med_type: ''
1840
-
1854
+                        med_type: '',
1855
+                        is_medicine_status:false,
1841 1856
                       }
1842 1857
 
1843 1858
                       obj.med_type = 14
@@ -2074,6 +2089,7 @@
2074 2089
                       let tempAdvice = []
2075 2090
                       let tempProject = []
2076 2091
                       let tempAddition = []
2092
+                      var is_medicine  = false
2077 2093
 
2078 2094
                       //药品
2079 2095
                       for (let b = 0; b < prescription.advices.length; b++) {
@@ -2093,10 +2109,14 @@
2093 2109
                           id: prescription.advices[b].drug_id,
2094 2110
                           drug: prescription.advices[b].drug,
2095 2111
                           groupno: prescription.advices[b].groupno,
2096
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
2112
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
2113
+                          is_medicine: prescription.advices[b].is_medicine,
2097 2114
 
2098 2115
                         }
2099 2116
                         tempAdvice.push(obj)
2117
+                        if (prescription.advices[b].is_medicine == 1){
2118
+                          is_medicine = true
2119
+                        }
2100 2120
                       }
2101 2121
 
2102 2122
                       //项目
@@ -2165,7 +2185,9 @@
2165 2185
                         addition: tempAddition,
2166 2186
                         order_status: prescription.order_status,
2167 2187
                         pre_time: preTime,
2168
-                        med_type: parseInt(prescription.med_type)
2188
+                        med_type: parseInt(prescription.med_type),
2189
+                        is_medicine_status: is_medicine,
2190
+
2169 2191
                       }
2170 2192
                       this.prescriptions.push(obj)
2171 2193
                     }
@@ -2274,7 +2296,8 @@
2274 2296
                           addition: tempAddition,
2275 2297
                           order_status: 1,
2276 2298
                           pre_time: preTime,
2277
-                          med_type: ''
2299
+                          med_type: '',
2300
+                          is_medicine_status:false,
2278 2301
 
2279 2302
                         }
2280 2303
                         if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -2300,7 +2323,8 @@
2300 2323
                         addition: [],
2301 2324
                         order_status: 0,
2302 2325
                         pre_time: nowTime,
2303
-                        med_type: ''
2326
+                        med_type: '',
2327
+                        is_medicine_status:false
2304 2328
 
2305 2329
                       }
2306 2330
 
@@ -2537,6 +2561,7 @@
2537 2561
                     let tempAdvice = []
2538 2562
                     let tempProject = []
2539 2563
                     let tempAddition = []
2564
+                    var is_medicine  = false
2540 2565
 
2541 2566
                     //药品
2542 2567
                     for (let b = 0; b < prescription.advices.length; b++) {
@@ -2556,10 +2581,14 @@
2556 2581
                         id: prescription.advices[b].drug_id,
2557 2582
                         drug: prescription.advices[b].drug,
2558 2583
                         groupno: prescription.advices[b].groupno,
2559
-                        hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
2584
+                        hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
2585
+                        is_medicine: prescription.advices[b].is_medicine,
2560 2586
 
2561 2587
                       }
2562 2588
                       tempAdvice.push(obj)
2589
+                      if (prescription.advices[b].is_medicine == 1){
2590
+                        is_medicine = true
2591
+                      }
2563 2592
                     }
2564 2593
 
2565 2594
                     //项目
@@ -2628,7 +2657,9 @@
2628 2657
                       addition: tempAddition,
2629 2658
                       order_status: prescription.order_status,
2630 2659
                       pre_time: preTime,
2631
-                      med_type: parseInt(prescription.med_type)
2660
+                      med_type: parseInt(prescription.med_type),
2661
+                      is_medicine_status: is_medicine,
2662
+
2632 2663
                     }
2633 2664
                     this.prescriptions.push(obj)
2634 2665
                   }
@@ -2736,7 +2767,8 @@
2736 2767
                         addition: tempAddition,
2737 2768
                         order_status: 1,
2738 2769
                         pre_time: preTime,
2739
-                        med_type: ''
2770
+                        med_type: '',
2771
+                        is_medicine_status:false,
2740 2772
 
2741 2773
                       }
2742 2774
                       if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -2763,7 +2795,8 @@
2763 2795
                       addition: [],
2764 2796
                       order_status: 0,
2765 2797
                       pre_time: nowTime,
2766
-                      med_type: ''
2798
+                      med_type: '',
2799
+                      is_medicine_status:false,
2767 2800
 
2768 2801
                     }
2769 2802
 
@@ -3059,6 +3092,7 @@
3059 3092
                       let tempAdvice = []
3060 3093
                       let tempProject = []
3061 3094
                       let tempAddition = []
3095
+                      var is_medicine  = false
3062 3096
 
3063 3097
                       //药品
3064 3098
                       for (let b = 0; b < prescription.advices.length; b++) {
@@ -3078,10 +3112,14 @@
3078 3112
                           id: prescription.advices[b].drug_id,
3079 3113
                           drug: prescription.advices[b].drug,
3080 3114
                           groupno: prescription.advices[b].groupno,
3081
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
3115
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
3116
+                          is_medicine: prescription.advices[b].is_medicine,
3082 3117
 
3083 3118
                         }
3084 3119
                         tempAdvice.push(obj)
3120
+                        if (prescription.advices[b].is_medicine == 1){
3121
+                          is_medicine = true
3122
+                        }
3085 3123
                       }
3086 3124
 
3087 3125
                       //项目
@@ -3157,7 +3195,9 @@
3157 3195
                         addition: tempAddition,
3158 3196
                         order_status: prescription.order_status,
3159 3197
                         pre_time: preTime,
3160
-                        med_type: parseInt(prescription.med_type)
3198
+                        med_type: parseInt(prescription.med_type),
3199
+                        is_medicine_status: is_medicine,
3200
+
3161 3201
                       }
3162 3202
                       this.prescriptions.push(obj)
3163 3203
                     }
@@ -3273,7 +3313,9 @@
3273 3313
                           addition: tempAddition,
3274 3314
                           order_status: 1,
3275 3315
                           pre_time: preTime,
3276
-                          med_type: ''
3316
+                          med_type: '',
3317
+                          is_medicine_status: false,
3318
+
3277 3319
 
3278 3320
                         }
3279 3321
                         if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -3301,7 +3343,9 @@
3301 3343
                         addition: [],
3302 3344
                         order_status: 0,
3303 3345
                         pre_time: nowTime,
3304
-                        med_type: ''
3346
+                        med_type: '',
3347
+                        is_medicine_status: false,
3348
+
3305 3349
 
3306 3350
                       }
3307 3351
 
@@ -3502,6 +3546,8 @@
3502 3546
                       let tempAdvice = []
3503 3547
                       let tempProject = []
3504 3548
                       let tempAddition = []
3549
+                      var is_medicine  = false
3550
+
3505 3551
 
3506 3552
                       //药品
3507 3553
                       for (let b = 0; b < prescription.advices.length; b++) {
@@ -3521,10 +3567,14 @@
3521 3567
                           id: prescription.advices[b].drug_id,
3522 3568
                           drug: prescription.advices[b].drug,
3523 3569
                           groupno: prescription.advices[b].groupno,
3524
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
3570
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
3571
+                          is_medicine: prescription.advices[b].is_medicine,
3525 3572
 
3526 3573
                         }
3527 3574
                         tempAdvice.push(obj)
3575
+                        if (prescription.advices[b].is_medicine == 1){
3576
+                          is_medicine = true
3577
+                        }
3528 3578
                       }
3529 3579
 
3530 3580
                       //项目
@@ -3600,7 +3650,9 @@
3600 3650
                         addition: tempAddition,
3601 3651
                         order_status: prescription.order_status,
3602 3652
                         pre_time: preTime,
3603
-                        med_type: parseInt(prescription.med_type)
3653
+                        med_type: parseInt(prescription.med_type),
3654
+                        is_medicine_status: is_medicine,
3655
+
3604 3656
                       }
3605 3657
                       this.prescriptions.push(obj)
3606 3658
                     }
@@ -3717,7 +3769,9 @@
3717 3769
                           addition: tempAddition,
3718 3770
                           order_status: 1,
3719 3771
                           pre_time: preTime,
3720
-                          med_type: ''
3772
+                          med_type: '',
3773
+                          is_medicine_status: false,
3774
+
3721 3775
 
3722 3776
                         }
3723 3777
                         if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -3744,7 +3798,9 @@
3744 3798
                         addition: [],
3745 3799
                         order_status: 0,
3746 3800
                         pre_time: nowTime,
3747
-                        med_type: ''
3801
+                        med_type: '',
3802
+                        is_medicine_status: false,
3803
+
3748 3804
 
3749 3805
                       }
3750 3806
 

+ 0 - 1
src/xt_pages/outpatientCharges/invoicePrint.vue Целия файл

@@ -21,7 +21,6 @@
21 21
           <printFour v-if="org_id == 10215 || org_id == 4" :paramsObj="invoiceParams"></printFour>
22 22
           <printFive v-if="org_id == 10188 " :paramsObj="invoiceParams"></printFive>
23 23
           <printSix v-if="org_id == 10217" :paramsObj="invoiceParams"></printSix>
24
-
25 24
         </div>
26 25
     </div>
27 26
   </div>

+ 38 - 30
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Целия файл

@@ -230,8 +230,10 @@
230 230
 
231 231
 
232 232
                     </div>
233
-                    <span :class="order_status == '未收费' ? 'statusRed' : ''">{{order_status}}</span>
233
+                  <span   v-if="dayorMonth =='day'&&curPrescriptions.advices.length > 0"  :class="!curPrescriptions.is_medicine_status ? 'statusRed' : ''">{{curPrescriptions.is_medicine_status?'已发药':'未发药'}}</span>
234
+                  <span   v-else></span>
234 235
 
236
+                  <span :class="order_status == '未收费' ? 'statusRed' : ''">{{order_status}}</span>
235 237
                 </div>
236 238
             </div>
237 239
             <div class='centerRight'>
@@ -1157,6 +1159,7 @@
1157 1159
                     project: tempProject,
1158 1160
                     addition: tempAddition,
1159 1161
                     order_status: prescription.order_status
1162
+
1160 1163
                   }
1161 1164
                   this.month_prescriptions.push(obj)
1162 1165
                 }
@@ -1297,7 +1300,7 @@
1297 1300
         })
1298 1301
 
1299 1302
       }, saveTemplate(val) {
1300
-        
1303
+
1301 1304
         let params = {
1302 1305
           name: val.name,
1303 1306
           mode: val.mode,
@@ -1306,12 +1309,12 @@
1306 1309
         let data = {
1307 1310
           'prescriptions': val.prescriptions
1308 1311
         }
1309
-      
1312
+
1310 1313
         createdTemplate(params, data).then(response => {
1311 1314
           if (response.data.state == 1) {
1312 1315
             this.$refs.saveTemplate.hide()
1313 1316
             this.$message.success('保存成功')
1314
-          
1317
+
1315 1318
           } else {
1316 1319
             this.$message.error(response.data.msg)
1317 1320
           }
@@ -1815,7 +1818,7 @@
1815 1818
       },
1816 1819
 
1817 1820
       tabclickEvent(val) {
1818
-       
1821
+
1819 1822
         for (let i = 0; i < this.prescriptions.length; i++) {
1820 1823
           if (this.prescriptions[i].name == val.name) {
1821 1824
             this.prescription_id = this.prescriptions[i].id
@@ -2413,7 +2416,7 @@
2413 2416
                 var arr_one = []
2414 2417
                 console.log("ooo233323233232323232",this.prescriptions)
2415 2418
                 for(let i=0;i<this.prescriptions.length;i++){
2416
-                  if(this.prescriptions[i].id == 0){ 
2419
+                  if(this.prescriptions[i].id == 0){
2417 2420
                     for(let j=0;j<this.prescriptions[i].advices.length;j++){
2418 2421
                        arr.push(this.prescriptions[i].advices[j])
2419 2422
                     }
@@ -2434,8 +2437,8 @@
2434 2437
                         }
2435 2438
                       });
2436 2439
                       let newArr = Object.values(objInfo);
2437
-                   
2438
-                      
2440
+
2441
+
2439 2442
                       for(let i=0;i<arr.length;i++){
2440 2443
                         for(let j=0;j<newArr.length;j++){
2441 2444
                           if(arr[i].id == newArr[j].drug_id){
@@ -2453,10 +2456,10 @@
2453 2456
                             }
2454 2457
                             if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.min_unit && newArr[i].child[j].drug.max_unit!=newArr[i].child[j].drug.min_unit){
2455 2458
                               newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number)
2456
-                             } 
2459
+                             }
2457 2460
                              if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.max_unit && newArr[i].child[j].drug.max_unit ==newArr[i].child[j].drug.min_unit){
2458 2461
                                 newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number)
2459
-                             } 
2462
+                             }
2460 2463
                           }
2461 2464
                         }
2462 2465
                          console.log("wodeshju",newArr)
@@ -2466,7 +2469,7 @@
2466 2469
                           }
2467 2470
                         }
2468 2471
                       }
2469
-                      
2472
+
2470 2473
                       if(newArr.length > 0){
2471 2474
                         for(let i=0;i<newArr.length;i++){
2472 2475
                           if(newArr[i].out_count > newArr[i].sum_count){
@@ -2482,7 +2485,7 @@
2482 2485
                   }
2483 2486
 
2484 2487
                   if(this.prescriptions[i].id > 0){ //修改处方
2485
-                     
2488
+
2486 2489
                      for(let j=0;j<this.prescriptions[i].advices.length;j++){
2487 2490
                        if(this.prescriptions[i].advices[j].advice_id == 0){ //新增列
2488 2491
                          arr_one.push(this.prescriptions[i].advices[j])
@@ -2505,7 +2508,7 @@
2505 2508
                       });
2506 2509
                       let newArr = Object.values(objInfo);
2507 2510
                       console.log("newArr",newArr)
2508
-                      
2511
+
2509 2512
                       for(let i=0;i<arr_one.length;i++){
2510 2513
                         for(let j=0;j<newArr.length;j++){
2511 2514
                           if(arr_one[i].id == newArr[j].drug_id){
@@ -2513,13 +2516,13 @@
2513 2516
                           }
2514 2517
                         }
2515 2518
                       }
2516
-                      
2519
+
2517 2520
                       if(newArr.length >0){
2518 2521
                         for(let i=0;i<newArr.length;i++){
2519 2522
                           for(let j=0;j<newArr[i].child.length;j++){
2520 2523
                             if(newArr[i].child[j].prescribing_number_unit == newArr[i].child[j].drug.max_unit){
2521 2524
                                 newArr[i].child[j].prescribing_number_total = parseInt(newArr[i].child[j].prescribing_number) * newArr[i].child[j].drug.min_number
2522
-                            }  
2525
+                            }
2523 2526
                             newArr[i].out_count +=  newArr[i].child[j].prescribing_number_total
2524 2527
                           }
2525 2528
                         }
@@ -2539,7 +2542,7 @@
2539 2542
                     }
2540 2543
                   }
2541 2544
                 }
2542
-               
2545
+
2543 2546
                 createHisPrescription(data, params).then(response => {
2544 2547
                   if (response.data.state == 1) {
2545 2548
                     this.$emit('change', this.patientInfo.id)
@@ -2549,7 +2552,7 @@
2549 2552
                   } else {
2550 2553
                     this.$message.error(response.data.msg)
2551 2554
                     this.$emit('editKeepLoad', false)
2552
-                    
2555
+
2553 2556
                   }
2554 2557
                 })
2555 2558
               }
@@ -2640,10 +2643,15 @@
2640 2643
         }
2641 2644
       },
2642 2645
       addTab(targetName) {
2643
-        // if (this.curPrescriptions.order_status == 2) {
2644
-        //   this.$message.error('该处方已经结算或者退费,无法继续添加处方')
2645
-        //   return
2646
-        // }
2646
+
2647
+        for(let i = 0; i < this.prescriptions.length; i++){
2648
+          if (this.prescriptions[i].is_medicine_status) {
2649
+            this.$message.error('处方中包含已发药处方,无法新增')
2650
+            return
2651
+          }
2652
+        }
2653
+
2654
+
2647 2655
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2648 2656
           this.$message.error('当前处方无数据,新增数据后才能新增处方')
2649 2657
           return
@@ -2712,9 +2720,9 @@
2712 2720
 
2713 2721
       },
2714 2722
       removeTab(targetName) {
2715
-        console.log("处方了免费打打啊发发大发阿道夫")
2716
-        if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5) {
2717
-          this.$message.error('该处方已经结算或者记账,无法删除')
2723
+
2724
+        if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 || this.curPrescriptions.is_medicine_status) {
2725
+          this.$message.error('该处方已经结算或者记账或者已发药,无法删除')
2718 2726
           return
2719 2727
         }
2720 2728
         this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
@@ -2745,7 +2753,7 @@
2745 2753
             }
2746 2754
             this.editableTabsValue = activeName
2747 2755
             this.prescriptions = tabs.filter(tab => tab.name !== targetName)
2748
-           
2756
+
2749 2757
             for (let i = 0; i < this.prescriptions.length; i++) {
2750 2758
               if (activeName == this.prescriptions[i].name) {
2751 2759
                 this.curPrescriptions = this.prescriptions[i]
@@ -2787,7 +2795,7 @@
2787 2795
                 }
2788 2796
                 this.editableTabsValue = activeName
2789 2797
                 this.prescriptions = tabs.filter(tab => tab.name !== targetName)
2790
-               
2798
+
2791 2799
                 for (let i = 0; i < this.prescriptions.length; i++) {
2792 2800
                   if (activeName == this.prescriptions[i].name) {
2793 2801
                     this.curPrescriptions = this.prescriptions[i]
@@ -2799,12 +2807,12 @@
2799 2807
                     }
2800 2808
                   }
2801 2809
                 }
2802
-              
2810
+
2803 2811
                 if (this.prescriptions.length == 0) {
2804 2812
                   this.curPrescriptions = []
2805 2813
                   this.curStatus = 0
2806 2814
                 }
2807
-                
2815
+
2808 2816
                 this.$parent.getInitData()
2809 2817
                 this.$parent.getInitDataOne(this.prescriptions)
2810 2818
                 console.log("删除后的数据是",this.prescriptions)
@@ -3056,7 +3064,7 @@
3056 3064
             var temp2 = this.deepClone(this.teamList)
3057 3065
 
3058 3066
             var temp3 = this.deepClone(templateDrugs)
3059
-           
3067
+
3060 3068
             if (temp3.length > 0) {
3061 3069
               for (let b = 0; b < temp3.length; b++) {
3062 3070
                 let obj = {
@@ -3116,7 +3124,7 @@
3116 3124
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
3117 3125
                   obj.prescribing_number = 1
3118 3126
                 }
3119
-               
3127
+
3120 3128
                 this.prescriptions[i].advices.push(obj)
3121 3129
               }
3122 3130
               this.curStatus = 1

+ 65 - 11
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Целия файл

@@ -6,7 +6,7 @@
6 6
             <el-table-column align="center" prop="day" width="70" label="序号">
7 7
                 <template slot-scope="scope">
8 8
                     <div style="display:flex;align-items:center;">
9
-                        <el-input v-model="scope.row.groupno" placeholder=""></el-input>
9
+                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.groupno" placeholder=""></el-input>
10 10
                     </div>
11 11
                 </template>
12 12
             </el-table-column>
@@ -21,11 +21,11 @@
21 21
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
22 22
                 <template slot-scope="scope">
23 23
                     <div style="display:flex;align-items:center;">
24
-                        <el-input v-model="scope.row.single_dose" @input="getAllChange(scope)"
24
+                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.single_dose" @input="getAllChangeTwo(scope)"
25 25
                                   style="width:50%;"></el-input>
26 26
                         <!-- <div>{{scope.row.single_dose_unit}}</div> -->
27 27
                         <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
28
-                                   @change="getAllChange(scope)">
28
+                                   @change="getAllChangeTwo(scope)" :disabled="prescription.is_medicine_status" >
29 29
                             <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
30 30
                             <el-option :label="scope.row.drug.dose_unit"
31 31
                                        v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
@@ -36,7 +36,7 @@
36 36
             </el-table-column>
37 37
             <el-table-column align="center" prop="delivery_way" width="100" label="用法">
38 38
                 <template slot-scope="scope">
39
-                    <el-select v-model="scope.row.delivery_way" placeholder="请选择">
39
+                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.delivery_way" placeholder="请选择">
40 40
                         <el-option
41 41
                                 v-for="(item,index) in drugways"
42 42
                                 :key="index"
@@ -48,7 +48,7 @@
48 48
             </el-table-column>
49 49
             <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
50 50
                 <template slot-scope="scope">
51
-                    <el-select v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
51
+                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChangeTwo(scope)">
52 52
                         <el-option
53 53
                                 v-for="item,index in efs"
54 54
                                 :key="index"
@@ -63,7 +63,7 @@
63 63
             <el-table-column align="center" prop="day" width="70" label="天数">
64 64
                 <template slot-scope="scope">
65 65
                     <div style="display:flex;align-items:center;">
66
-                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
66
+                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.day" @input="getAllChangeTwo(scope)" placeholder=""></el-input>
67 67
                         {{'天'}}
68 68
                     </div>
69 69
                 </template>
@@ -72,10 +72,10 @@
72 72
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
73 73
                 <template slot-scope="scope">
74 74
                     <div style="display:flex;align-items:center;">
75
-                        <el-input v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
75
+                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
76 76
                                   style="width:50%" placeholder=""></el-input>
77 77
                         <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
78
-                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
78
+                        <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
79 79
                                    @change="getPrescribingNumberUnit(scope)">
80 80
                             <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
81 81
                             <el-option :label="scope.row.drug.max_unit"
@@ -96,7 +96,7 @@
96 96
             </el-table-column>
97 97
             <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
98 98
                 <template slot-scope="scope">
99
-                    <el-select v-model="scope.row.hosp_appr_flag" placeholder="请选择">
99
+                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.hosp_appr_flag" placeholder="请选择">
100 100
                         <el-option label="审批通过" value="1"></el-option>
101 101
                         <el-option label="无须审批" value="3"></el-option>
102 102
                         <el-option label="审批不通过" value="2"></el-option>
@@ -105,7 +105,7 @@
105 105
             </el-table-column>
106 106
             <el-table-column align="center" prop="remark" width="50" label="备注">
107 107
                 <template slot-scope="scope">
108
-                    <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
108
+                    <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
109 109
                 </template>
110 110
             </el-table-column>
111 111
             <el-table-column align="center" width="40" prop="name" label="操作">
@@ -324,6 +324,10 @@
324 324
         })
325 325
 
326 326
       }, deleteDrug: function(index, row) {
327
+        if (this.prescription.is_medicine_status){
328
+          this.$message.error('该处方包含已发药的药品,无法删除')
329
+          return
330
+        }
327 331
         if (this.prescription.order_status == 2 ||  this.prescription.order_status ==5) {
328 332
           this.$message.error('该处方已经结算或记账,无法删除')
329 333
           return
@@ -432,6 +436,48 @@
432 436
 
433 437
       },
434 438
       getAllChange(scope) {
439
+        // if (this.prescription.is_medicine_status){
440
+        //   this.$message.error('该处方已经结算或记账,无法删除')
441
+        //
442
+        // }
443
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
444
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
445
+            console.log(1)
446
+            scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
447
+          } else {
448
+            console.log(12)
449
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
450
+          }
451
+        } else {
452
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
453
+            console.log(123)
454
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
455
+          } else {
456
+            console.log(1234)
457
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
458
+          }
459
+        }
460
+        if (scope.row.prescribing_number == 0) {
461
+          scope.row.prescribing_number = 1
462
+        }
463
+        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
464
+          // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
465
+          if (scope.row.prescribing_number > scope.row.drug.sum_count) {
466
+            this.$message.error(scope.row.drug_name + '库存不足')
467
+          }
468
+        } else {
469
+          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
470
+            this.$message.error(scope.row.drug_name + '库存不足')
471
+          }
472
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
473
+        }
474
+
475
+      },
476
+      getAllChangeTwo(scope) {
477
+        if (this.prescription.is_medicine_status){
478
+          this.$message.error('该处方包含已发药的药品,无法修改')
479
+          return
480
+        }
435 481
         if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
436 482
           if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
437 483
             console.log(1)
@@ -465,8 +511,12 @@
465 511
         }
466 512
 
467 513
       },
468
-      getPrescribingNumberUnit(scope) {
469 514
 
515
+      getPrescribingNumberUnit(scope) {
516
+        if (this.prescription.is_medicine_status){
517
+          this.$message.error('该处方包含已发药的药品,无法修改')
518
+          return
519
+        }
470 520
          console.log('scope',scope)
471 521
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
472 522
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
@@ -497,6 +547,10 @@
497 547
         }
498 548
       },
499 549
       changePrescribingNumber(scope) {
550
+        if (this.prescription.is_medicine_status){
551
+          this.$message.error('该处方包含已发药的药品,无法修改')
552
+          return
553
+        }
500 554
         //  var max_number = 0
501 555
         //  if(scope.row.prescribing_number_unit == scope.row.drug.max_unit){
502 556
         //     max_number = parseInt(scope.row.prescribing_number) * scope.row.drug.min_number

+ 50 - 17
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Целия файл

@@ -445,7 +445,7 @@ export default {
445 445
     },
446 446
 
447 447
     // 电子病历打印
448
-    opentwo(index) {  
448
+    opentwo(index) {
449 449
       if (index == 1) {
450 450
         if (this.patientInfo.id == undefined) {
451 451
           this.$message.error('请先选择病人')
@@ -1239,13 +1239,13 @@ export default {
1239 1239
           //     }
1240 1240
           //   }
1241 1241
           // }
1242
-       
1242
+
1243 1243
           this.drugs = drugs
1244
-        
1244
+
1245 1245
 
1246 1246
           this.allDrugs = response.data.data.drugs
1247 1247
           this.advices_template = response.data.data.advices_template
1248
-         
1248
+
1249 1249
           this.department = response.data.data.department
1250 1250
           this.sick = response.data.data.sick
1251 1251
           this.diagnoses = response.data.data.diagnose
@@ -1464,7 +1464,7 @@ export default {
1464 1464
 
1465 1465
           //处方相关
1466 1466
           this.prescriptionList = response.data.data.prescription
1467
-
1467
+          let  is_medicine = false
1468 1468
           if (response.data.data.prescription.length > 0) {
1469 1469
             for (let i = 0; i < response.data.data.prescription.length; i++) {
1470 1470
               var prescription = response.data.data.prescription[i]
@@ -1492,9 +1492,15 @@ export default {
1492 1492
                   groupno: prescription.advices[b].groupno,
1493 1493
                   hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1494 1494
                   execution_state: prescription.advices[b].execution_state,
1495
+                  is_medicine: prescription.advices[b].is_medicine,
1495 1496
 
1496 1497
                 }
1497 1498
                 tempAdvice.push(obj)
1499
+                console.log( prescription.advices[b].is_medicine)
1500
+                if(prescription.advices[b].is_medicine == 1){
1501
+                  console.log("~~~~~~~")
1502
+                  is_medicine = true
1503
+                }
1498 1504
               }
1499 1505
 
1500 1506
               //项目
@@ -1561,6 +1567,8 @@ export default {
1561 1567
               } else {
1562 1568
                 preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
1563 1569
               }
1570
+              console.log("is_medicine")
1571
+              console.log(is_medicine)
1564 1572
 
1565 1573
               let index = i + 1
1566 1574
               let obj = {
@@ -1571,7 +1579,8 @@ export default {
1571 1579
                 addition: tempAddition,
1572 1580
                 order_status: prescription.order_status,
1573 1581
                 pre_time: preTime,
1574
-                med_type: parseInt(prescription.med_type)
1582
+                med_type: parseInt(prescription.med_type),
1583
+                is_medicine_status: is_medicine,
1575 1584
               }
1576 1585
               this.prescriptions.push(obj)
1577 1586
             }
@@ -1709,8 +1718,8 @@ export default {
1709 1718
                   addition: tempAddition,
1710 1719
                   order_status: 1,
1711 1720
                   pre_time: preTime,
1712
-                  med_type: ''
1713
-
1721
+                  med_type: '',
1722
+                  is_medicine_status:false,
1714 1723
                 }
1715 1724
                 if (prescription.med_type == 0 || prescription.med_type == '') {
1716 1725
 
@@ -1735,8 +1744,8 @@ export default {
1735 1744
                 addition: [],
1736 1745
                 order_status: 0,
1737 1746
                 pre_time: nowTime,
1738
-                med_type: ''
1739
-
1747
+                med_type: '',
1748
+                is_medicine_status:false,
1740 1749
               }
1741 1750
               obj.med_type = 14
1742 1751
               this.prescriptions.push(obj)
@@ -1919,7 +1928,7 @@ export default {
1919 1928
                     let tempAdvice = []
1920 1929
                     let tempProject = []
1921 1930
                     let tempAddition = []
1922
-
1931
+                    var is_medicine  = false
1923 1932
                     //药品
1924 1933
                     for (let b = 0; b < prescription.advices.length; b++) {
1925 1934
                       let obj = {
@@ -1940,10 +1949,15 @@ export default {
1940 1949
                         groupno: prescription.advices[b].groupno,
1941 1950
                         hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1942 1951
                         execution_state: prescription.advices[b].execution_state,
1952
+                        is_medicine: prescription.advices[b].is_medicine,
1953
+
1943 1954
 
1944 1955
 
1945 1956
                       }
1946 1957
                       tempAdvice.push(obj)
1958
+                      if (prescription.advices[b].is_medicine == 1){
1959
+                        is_medicine = true
1960
+                      }
1947 1961
                     }
1948 1962
 
1949 1963
                     //项目
@@ -2018,7 +2032,8 @@ export default {
2018 2032
                       addition: tempAddition,
2019 2033
                       order_status: prescription.order_status,
2020 2034
                       pre_time: preTime,
2021
-                      med_type: parseInt(prescription.med_type)
2035
+                      med_type: parseInt(prescription.med_type),
2036
+                      is_medicine_status: is_medicine,
2022 2037
                     }
2023 2038
                     this.prescriptions.push(obj)
2024 2039
                   }
@@ -3559,6 +3574,8 @@ export default {
3559 3574
                     let tempAdvice = []
3560 3575
                     let tempProject = []
3561 3576
                     let tempAddition = []
3577
+                    var is_medicine  = false
3578
+
3562 3579
 
3563 3580
                     //药品
3564 3581
                     for (let b = 0; b < prescription.advices.length; b++) {
@@ -3579,11 +3596,18 @@ export default {
3579 3596
                         drug: prescription.advices[b].drug,
3580 3597
                         groupno: prescription.advices[b].groupno,
3581 3598
                         hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
3582
-                        execution_state: prescription.advices[b].execution_state
3599
+                        execution_state: prescription.advices[b].execution_state,
3600
+                        is_medicine: prescription.advices[b].is_medicine,
3583 3601
 
3584 3602
 
3585 3603
                       }
3604
+                      console.log("电子处方")
3605
+                      console.log( prescription.advices[b].is_medicine)
3606
+
3586 3607
                       tempAdvice.push(obj)
3608
+                      if (prescription.advices[b].is_medicine == 1){
3609
+                        is_medicine = true
3610
+                      }
3587 3611
                     }
3588 3612
 
3589 3613
                     //项目
@@ -3660,7 +3684,9 @@ export default {
3660 3684
                       addition: tempAddition,
3661 3685
                       order_status: prescription.order_status,
3662 3686
                       pre_time: preTime,
3663
-                      med_type: parseInt(prescription.med_type)
3687
+                      med_type: parseInt(prescription.med_type),
3688
+                      is_medicine_status: is_medicine,
3689
+
3664 3690
                     }
3665 3691
                     this.prescriptions.push(obj)
3666 3692
                   }
@@ -4178,6 +4204,7 @@ export default {
4178 4204
                     let tempAdvice = []
4179 4205
                     let tempProject = []
4180 4206
                     let tempAddition = []
4207
+                    var is_medicine  = false
4181 4208
 
4182 4209
                     //药品
4183 4210
                     for (let b = 0; b < prescription.advices.length; b++) {
@@ -4198,11 +4225,15 @@ export default {
4198 4225
                         drug: prescription.advices[b].drug,
4199 4226
                         groupno: prescription.advices[b].groupno,
4200 4227
                         hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
4201
-                        execution_state: prescription.advices[b].execution_state
4228
+                        execution_state: prescription.advices[b].execution_state,
4229
+                        is_medicine: prescription.advices[b].is_medicine,
4202 4230
 
4203 4231
 
4204 4232
                       }
4205 4233
                       tempAdvice.push(obj)
4234
+                      if (prescription.advices[b].is_medicine == 1){
4235
+                        is_medicine = true
4236
+                      }
4206 4237
                     }
4207 4238
 
4208 4239
                     //项目
@@ -4280,7 +4311,9 @@ export default {
4280 4311
                       addition: tempAddition,
4281 4312
                       order_status: prescription.order_status,
4282 4313
                       pre_time: preTime,
4283
-                      med_type: parseInt(prescription.med_type)
4314
+                      med_type: parseInt(prescription.med_type),
4315
+                      is_medicine_status: is_medicine,
4316
+
4284 4317
                     }
4285 4318
                     this.prescriptions.push(obj)
4286 4319
                   }
@@ -4596,7 +4629,7 @@ export default {
4596 4629
       this.$refs.prescriptions.open_three()
4597 4630
     },
4598 4631
     open(index) {
4599
-    
4632
+
4600 4633
       this.index = index
4601 4634
       if (index == 1) {
4602 4635
         this.$refs.prescriptions.open(1, this.saveLoading)