test_user 2 years ago
parent
commit
348f5d9b74

+ 18 - 0
src/api/schedule_template/sch_template.js View File

@@ -141,3 +141,21 @@ export function updateEditSchedules(obj,delObj) {
141 141
     params: params,
142 142
   })
143 143
 }
144
+
145
+
146
+export function getSmartSchByPatient(patient_id) {
147
+  console.log("patinet_id")
148
+  console.log(patient_id)
149
+
150
+  var params = {
151
+    "patient_id": patient_id,
152
+
153
+  }
154
+  return request({
155
+    url: '/api/smartsch/get',
156
+    method: 'get',
157
+    params: params,
158
+  })
159
+}
160
+
161
+

+ 136 - 136
src/xt_pages/dialysis/details/consumable/dialysisGood.vue View File

@@ -44,7 +44,7 @@
44 44
       </div>
45 45
       <div>
46 46
         <el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
47
-        <el-button size="small" icon="el-icon-printer" @click="toClick" type="primary">脚本</el-button>
47
+<!--        <el-button size="small" icon="el-icon-printer" @click="toClick" type="primary">脚本</el-button>-->
48 48
         <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
49 49
         <el-button size="small"  @click="exportListOne" type="primary" v-if="his_config.is_open == 1">导出</el-button>
50 50
         <el-button size="small" @click="exportList" type="primary" v-if="his_config.is_open != 1">导出</el-button>
@@ -52,7 +52,7 @@
52 52
         <el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
53 53
       </div>
54 54
     </div>
55
-   
55
+
56 56
     <div v-if="his_config.is_open != 1">
57 57
       <el-table
58 58
         @selection-change="handleSelectionChange"
@@ -84,13 +84,13 @@
84 84
             {{scope.row.patient.name}}
85 85
            </template>
86 86
         </el-table-column>
87
-       
87
+
88 88
         <el-table-column  align="center"  width="55" label="透析号">
89 89
            <template slot-scope="scope">
90 90
             {{scope.row.patient.dialysis_no}}
91 91
            </template>
92 92
         </el-table-column>
93
-        
93
+
94 94
         <el-table-column
95 95
           align="center"
96 96
           prop="name"
@@ -157,13 +157,13 @@
157 157
             {{scope.row.patient.name}}
158 158
            </template>
159 159
         </el-table-column>
160
-       
160
+
161 161
         <el-table-column  align="center"  width="55" label="透析号">
162 162
            <template slot-scope="scope">
163 163
             {{scope.row.patient.dialysis_no}}
164 164
            </template>
165 165
         </el-table-column>
166
-        
166
+
167 167
         <el-table-column
168 168
           align="center"
169 169
           prop="name"
@@ -177,7 +177,7 @@
177 177
 
178 178
         </el-table-column>
179 179
 
180
-      
180
+
181 181
 
182 182
       </el-table>
183 183
 
@@ -195,7 +195,7 @@
195 195
       </el-pagination>
196 196
     </div>
197 197
 
198
-    
198
+
199 199
     <el-dialog
200 200
       title="耗材统计表"
201 201
       :visible.sync="startDialogVisible"
@@ -223,7 +223,7 @@
223 223
 
224 224
          <el-button size="small" icon="el-icon-printer"  @click="toPrintOne" type="primary">打印</el-button>
225 225
          <el-button size="small"  @click="toExportListOne" type="primary">导出</el-button>
226
-        </div> 
226
+        </div>
227 227
        <el-table
228 228
         :data="tableList"
229 229
         border
@@ -248,14 +248,14 @@
248 248
              {{scope.row.specification_name}}
249 249
            </template>
250 250
         </el-table-column>
251
-       
251
+
252 252
         <el-table-column  align="center"   label="数量">
253 253
            <template slot-scope="scope">
254 254
              {{scope.row.count}}
255 255
            </template>
256 256
         </el-table-column>
257
-        
258
-     
257
+
258
+
259 259
 
260 260
       </el-table>
261 261
       </span>
@@ -272,29 +272,29 @@
272 272
       width="60%">
273 273
       <span>
274 274
         <div v-for="(item,index) in goodTypeList" :key="index">
275
-          <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span> 
276
-          <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span> 
277
-          <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span> 
278
-          <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span> 
279
-          <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span> 
280
-          <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span> 
281
-          <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span> 
282
-          <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span> 
283
-          <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span> 
284
-          <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span> 
285
-          <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span> 
275
+          <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span>
276
+          <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span>
277
+          <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span>
278
+          <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span>
279
+          <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span>
280
+          <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span>
281
+          <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span>
282
+          <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span>
283
+          <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span>
284
+          <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span>
285
+          <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span>
286 286
           <span v-if="index == 11"><el-checkbox v-model="checkedTwenty">{{item.type_name}}</el-checkbox></span>
287
-          <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span> 
288
-          <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span> 
289
-          <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span> 
290
-          <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span> 
291
-          <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span> 
292
-          <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span> 
287
+          <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span>
288
+          <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span>
289
+          <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span>
290
+          <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span>
291
+          <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span>
292
+          <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span>
293 293
           <span v-if="index == 18"><el-checkbox v-model="checkedTwentySeven">{{item.type_name}}</el-checkbox></span>
294
-          <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span> 
295
-          <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>   
294
+          <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span>
295
+          <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>
296 296
         </div>
297
-        
297
+
298 298
       </span>
299 299
       <span slot="footer" class="dialog-footer">
300 300
         <el-button @click="startDialogVisibleOne = false">取 消</el-button>
@@ -330,7 +330,7 @@
330 330
            </el-select>
331 331
            <el-button size="small" icon="el-icon-printer" @click="toHisPrint" type="primary">打印</el-button>
332 332
            <el-button size="small"  @click="toExportListTwo" type="primary">导出</el-button>
333
-        </div> 
333
+        </div>
334 334
        <el-table
335 335
         :data="tableList"
336 336
         border
@@ -355,14 +355,14 @@
355 355
              {{scope.row.specification_name}}
356 356
            </template>
357 357
         </el-table-column>
358
-       
358
+
359 359
         <el-table-column  align="center"   label="数量">
360 360
            <template slot-scope="scope">
361 361
              {{scope.row.count}}
362 362
            </template>
363 363
         </el-table-column>
364
-        
365
-     
364
+
365
+
366 366
 
367 367
       </el-table>
368 368
       </span>
@@ -383,7 +383,7 @@
383 383
   import { getDataConfig } from '@/utils/data'
384 384
   export default {
385 385
     components: {
386
-      
386
+
387 387
     },
388 388
     data() {
389 389
       return {
@@ -494,7 +494,7 @@
494 494
       this.query.page = 1
495 495
       this.query.ids = this.ids
496 496
       this.getAllZone()
497
-      this.dialysate_formulation =  getDataConfig(  
497
+      this.dialysate_formulation =  getDataConfig(
498 498
             'hemodialysis',
499 499
             'dialysate_formulation'
500 500
       )
@@ -512,24 +512,24 @@
512 512
       this.getlist()
513 513
     },
514 514
     methods: {
515
-    
515
+
516 516
       exportList(){
517 517
         import('@/vendor/Export2Excel').then(excel => {
518
-         
518
+
519 519
          var arr= []
520
-        
520
+
521 521
          arr.push('序号')
522 522
          arr.push('透析机号')
523 523
          arr.push('姓名')
524 524
          arr.push('透析号')
525
-       
525
+
526 526
         //  console.log("list23322323232",this.rowList)
527 527
          if(this.rowList!=null && this.rowList.length > 0){
528 528
            for(let i=0;i<this.rowList.length;i++){
529 529
              arr.push(this.rowList[i].filed_name_cn)
530 530
            }
531 531
          }
532
-        
532
+
533 533
          arr.push("备注")
534 534
         //  console.log("arr",arr)
535 535
 
@@ -540,7 +540,7 @@
540 540
         //  console.log("arrTwo",arrTwo)
541 541
          const tHeader = arr
542 542
         const filterVal = arrTwo
543
-        
543
+
544 544
         if(this.list!=null && this.list.length > 0){
545 545
           for(let i=0;i<this.list.length;i++){
546 546
             this.list[i].name0 = i+1
@@ -553,7 +553,7 @@
553 553
                 this.list[i]['name'+(this.rowList.length+4)] = this.list[i].dialysis_solution.remark
554 554
               }
555 555
             }
556
-         
556
+
557 557
           }
558 558
         }
559 559
         // console.log("list32232232323wi",this.list)
@@ -564,18 +564,18 @@
564 564
            filename: '透析耗材查询'
565 565
          })
566 566
           this.downloadLoading = false
567
-        }) 
567
+        })
568 568
       },
569 569
       exportListOne(){
570 570
         import('@/vendor/Export2Excel').then(excel => {
571
-         
571
+
572 572
          var arr= []
573
-        
573
+
574 574
          arr.push('序号')
575 575
          arr.push('透析机号')
576 576
          arr.push('姓名')
577 577
          arr.push('透析号')
578
-       
578
+
579 579
         //  console.log("list23322323232",this.typeList)
580 580
          if(this.typeList!=null && this.typeList.length > 0){
581 581
            for(let i=0;i<this.typeList.length;i++){
@@ -603,12 +603,12 @@
603 603
                 this.list[i]['name'+(j+4)] = this.getStr(this.list[i].typeList[j].id,this.list[i].projectList,this.list[i].patient_id)
604 604
               }
605 605
             }
606
-         
606
+
607 607
           }
608 608
         }
609 609
 
610 610
         console.log("list32232232323wi",this.list)
611
-      
611
+
612 612
         const data = this.formatJson(filterVal, this.list)
613 613
          excel.export_json_to_excel({
614 614
            header: tHeader,
@@ -616,7 +616,7 @@
616 616
            filename: '透析耗材查询'
617 617
          })
618 618
           this.downloadLoading = false
619
-        }) 
619
+        })
620 620
       },
621 621
       formatJson(filterVal, jsonData) {
622 622
         return jsonData.map(v => filterVal.map(j => v[j]));
@@ -642,7 +642,7 @@
642 642
         getPatientDialysisSolutionGroupList(this.query).then(response=>{
643 643
            if(response.data.state == 1){
644 644
              var list = response.data.data.list
645
-             
645
+
646 646
              var total = response.data.data.total
647 647
              this.total = total
648 648
              var goodType = response.data.data.goodType
@@ -672,7 +672,7 @@
672 672
                   list[i].typeList = []
673 673
                   list[i].typeList = this.typeList
674 674
                 }
675
-              
675
+
676 676
                  for(let i=0;i<list.length;i++){
677 677
                    if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
678 678
                     for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
@@ -681,9 +681,9 @@
681 681
                      }
682 682
                    }
683 683
                    }
684
-                   
684
+
685 685
                  }
686
-                 this.list = list 
686
+                 this.list = list
687 687
                }
688 688
              }
689 689
            }
@@ -784,7 +784,7 @@
784 784
                  list[i].dialyzer_perfusion_apparatus_arr = []
785 785
                  list[i].dialysis_irrigation_arr = []
786 786
                  list[i].puncture_needle_arr = []
787
-                
787
+
788 788
                  if(list[i].dialysis_solution.dialysis_dialyszers!=""){
789 789
                    list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
790 790
                  }
@@ -797,11 +797,11 @@
797 797
                  if(list[i].dialysis_solution.puncture_needle!="" ){
798 798
                     list[i].puncture_needle_arr = list[i].dialysis_solution.puncture_needle.split(",")
799 799
                  }
800
-                 kaliumCount += parseInt(list[i].dialysis_solution.kalium) 
800
+                 kaliumCount += parseInt(list[i].dialysis_solution.kalium)
801 801
                  sodiumCount += parseInt(list[i].dialysis_solution.sodium)
802 802
                  calciumCount +=parseInt(list[i].dialysis_solution.calcium)
803 803
                  glucoseCount += parseInt(list[i].dialysis_solution.glucose)
804
-                  
804
+
805 805
                 if(list[i].dialysis_solution!=null &&list[i].dialysis_solution.kalium > 0){
806 806
                     list[i].dialysis_solution.specification = "钾" + list[i].dialysis_solution.kalium
807 807
                     kaliumArr.push(list[i].dialysis_solution)
@@ -821,7 +821,7 @@
821 821
                   list[i].dialysis_solution.specification_three = "葡萄糖" + list[i].dialysis_solution.amylaceum
822 822
                   glucoseArr.push(list[i].dialysis_solution)
823 823
                 }
824
-              
824
+
825 825
 
826 826
               }
827 827
             }
@@ -843,7 +843,7 @@
843 843
             })
844 844
             let newArr = Object.values(dataInfo)
845 845
 
846
-          
846
+
847 847
             for(let i=0;i<kaliumArr.length;i++){
848 848
               for(let j=0;j<newArr.length;j++){
849 849
                 if(kaliumArr[i].specification == newArr[j].specification){
@@ -855,7 +855,7 @@
855 855
             for(let i=0;i<newArr.length;i++){
856 856
                newArr[i].count = newArr[i].child.length
857 857
             }
858
-           
858
+
859 859
             console.log("newArr",newArr)
860 860
             for(let i=0;i<newArr.length;i++){
861 861
               this.tableList.push(newArr[i])
@@ -880,7 +880,7 @@
880 880
             })
881 881
             let newArr = Object.values(dataInfo)
882 882
 
883
-          
883
+
884 884
             for(let i=0;i<sodiumArr.length;i++){
885 885
               for(let j=0;j<newArr.length;j++){
886 886
                 if(sodiumArr[i].specification_one == newArr[j].specification_one){
@@ -891,16 +891,16 @@
891 891
 
892 892
             for(let i=0;i<newArr.length;i++){
893 893
              newArr[i].count += newArr[i].child.length
894
-              
894
+
895 895
             }
896
-           
896
+
897 897
             console.log("newArr",newArr)
898 898
             for(let i=0;i<newArr.length;i++){
899 899
               this.tableList.push(newArr[i])
900 900
             }
901 901
            }
902 902
 
903
-          
903
+
904 904
           if(calciumArr!=null && calciumArr.length > 0){
905 905
               let dataInfo = {}
906 906
               calciumArr.forEach((item, index) => {
@@ -917,7 +917,7 @@
917 917
             })
918 918
             let newArr = Object.values(dataInfo)
919 919
 
920
-          
920
+
921 921
             for(let i=0;i<calciumArr.length;i++){
922 922
               for(let j=0;j<newArr.length;j++){
923 923
                 if(calciumArr[i].specification_two == newArr[j].specification_two){
@@ -928,9 +928,9 @@
928 928
 
929 929
             for(let i=0;i<newArr.length;i++){
930 930
               newArr[i].count = newArr[i].child.length
931
-              
931
+
932 932
             }
933
-           
933
+
934 934
             console.log("newArr",newArr)
935 935
             for(let i=0;i<newArr.length;i++){
936 936
               this.tableList.push(newArr[i])
@@ -938,7 +938,7 @@
938 938
            }
939 939
 
940 940
 
941
-                
941
+
942 942
           if(glucoseArr!=null && glucoseArr.length > 0){
943 943
               let dataInfo = {}
944 944
               glucoseArr.forEach((item, index) => {
@@ -955,7 +955,7 @@
955 955
             })
956 956
             let newArr = Object.values(dataInfo)
957 957
 
958
-          
958
+
959 959
             for(let i=0;i<glucoseArr.length;i++){
960 960
               for(let j=0;j<newArr.length;j++){
961 961
                 if(glucoseArr[i].specification_three == newArr[j].specification_three){
@@ -966,9 +966,9 @@
966 966
 
967 967
             for(let i=0;i<newArr.length;i++){
968 968
              newArr[i].count += newArr[i].child.length
969
-              
969
+
970 970
             }
971
-           
971
+
972 972
             console.log("newArr",newArr)
973 973
             for(let i=0;i<newArr.length;i++){
974 974
               this.tableList.push(newArr[i])
@@ -979,12 +979,12 @@
979 979
             var dialyzerPerfusionApparaArr = []
980 980
             var dialysisIrrigationArr = []
981 981
             var punctureNeedleArr = []
982
-            
983
-          
982
+
983
+
984 984
             for(let i=0;i<list.length;i++){
985 985
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
986
-             
987
-               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
986
+
987
+               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])
988 988
              }
989 989
              for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
990 990
               dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
@@ -993,7 +993,7 @@
993 993
               dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
994 994
              }
995 995
              for(let h=0;h<list[i].puncture_needle_arr.length;h++){
996
-               punctureNeedleArr.push(list[i].puncture_needle_arr[h])   
996
+               punctureNeedleArr.push(list[i].puncture_needle_arr[h])
997 997
              }
998 998
             }
999 999
            let obj = {}
@@ -1016,15 +1016,15 @@
1016 1016
               a.specification_name = i
1017 1017
               Arr.push(a);
1018 1018
             }
1019
-          
1019
+
1020 1020
            for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
1021 1021
             if(objOne[dialyzerPerfusionApparaArr[i]]){
1022 1022
                 objOne[dialyzerPerfusionApparaArr[i]] +=1
1023 1023
              }else{
1024 1024
               objOne[dialyzerPerfusionApparaArr[i]] = 1
1025
-             }   
1025
+             }
1026 1026
            }
1027
-           
1027
+
1028 1028
            for (let i in objOne) {
1029 1029
               let a = {};
1030 1030
               a[i] = objOne[i];
@@ -1039,7 +1039,7 @@
1039 1039
               objTwo[dialysisIrrigationArr[i]] +=1
1040 1040
              }else{
1041 1041
               objTwo[dialysisIrrigationArr[i]] = 1
1042
-             }   
1042
+             }
1043 1043
            }
1044 1044
 
1045 1045
            for (let i in objTwo) {
@@ -1050,7 +1050,7 @@
1050 1050
               a.specification_name = i
1051 1051
               Arr.push(a);
1052 1052
             }
1053
-            
1053
+
1054 1054
           for(let i = 0 ; i < punctureNeedleArr.length; i++){
1055 1055
             if(objThree[punctureNeedleArr[i]]){
1056 1056
                objThree[punctureNeedleArr[i]] +=1
@@ -1066,26 +1066,26 @@
1066 1066
               a.specification_name = i
1067 1067
               Arr.push(a);
1068 1068
             }
1069
-            
1070
-          
1069
+
1070
+
1071 1071
 
1072 1072
 
1073 1073
           //  var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
1074 1074
           //  var objsix =  {name:"钠(mmol/L)",specification_name:"1.25",count:""}
1075 1075
           //  var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
1076 1076
           //  var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
1077
-         
1078
-           
1077
+
1078
+
1079 1079
             // objfive.count = kaliumCount
1080 1080
             // objsix.count = sodiumCount
1081 1081
             // objseven.count = calciumCount
1082 1082
             // objeight.count = glucoseCount
1083
-            
1083
+
1084 1084
             // this.tableList.push(objfive)
1085 1085
             // this.tableList.push(objsix)
1086 1086
             // this.tableList.push(objseven)
1087 1087
             // this.tableList.push(objeight)
1088
-           
1088
+
1089 1089
             for(let i=0;i<Arr.length;i++){
1090 1090
               for(let j=0;j<this.rowList.length;j++){
1091 1091
                 if(Arr[i].name == this.rowList[j].filed_name_cn){
@@ -1093,12 +1093,12 @@
1093 1093
                 }
1094 1094
               }
1095 1095
             }
1096
-            
1096
+
1097 1097
             console.log("tablistlist233323232",this.tableList)
1098
-           
1098
+
1099 1099
           }
1100 1100
        })
1101
-        
1101
+
1102 1102
       },
1103 1103
       toStatistics(){
1104 1104
         this.tableList = []
@@ -1123,14 +1123,14 @@
1123 1123
                 }
1124 1124
              }
1125 1125
             //  console.log("projectList",projectList)
1126
-             
1126
+
1127 1127
              if(projectList!=null && projectList.length > 0){
1128 1128
                for(let i=0;i<projectList.length;i++){
1129 1129
                  projectList[i].good_id = 0
1130 1130
                  projectList[i].good_id = projectList[i].good_info.id
1131 1131
                }
1132 1132
              }
1133
-             
1133
+
1134 1134
              let dataInfo = {}
1135 1135
               projectList.forEach((item, index) => {
1136 1136
               let { good_id } = item
@@ -1145,7 +1145,7 @@
1145 1145
               }
1146 1146
             })
1147 1147
             let newArr = Object.values(dataInfo)
1148
-          
1148
+
1149 1149
             for(let i=0;i<projectList.length;i++){
1150 1150
               for(let j=0;j<newArr.length;j++){
1151 1151
                  if(projectList[i].good_id == newArr[j].good_id){
@@ -1153,7 +1153,7 @@
1153 1153
                  }
1154 1154
               }
1155 1155
             }
1156
-            
1156
+
1157 1157
             for(let i=0;i<newArr.length;i++){
1158 1158
               for(let j=0;j<newArr[i].child.length;j++){
1159 1159
                  newArr[i].count += parseInt(newArr[i].child[j].count)
@@ -1186,7 +1186,7 @@
1186 1186
           }else{
1187 1187
            return ""
1188 1188
           }
1189
-          
1189
+
1190 1190
         }
1191 1191
         if(filed_name_cn == "目标超滤量"){
1192 1192
 
@@ -1250,14 +1250,14 @@
1250 1250
          return val.special_medicine_other
1251 1251
         }
1252 1252
         if(filed_name_cn == "置换液"){
1253
-          return this.getDisplace(val.displace_liqui_part) 
1253
+          return this.getDisplace(val.displace_liqui_part)
1254 1254
         }
1255 1255
         if(filed_name_cn == "血管通路"){
1256 1256
           return this.getBloodAccess(val.blood_access)
1257 1257
         }
1258 1258
         if(filed_name_cn == "体液过多其他症状"){
1259 1259
           return val.body_fluid_other
1260
-        }  
1260
+        }
1261 1261
         if(filed_name_cn == "透析时长"){
1262 1262
           return   val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
1263 1263
         }
@@ -1488,7 +1488,7 @@
1488 1488
       for(let i=0;i<this.displace_liqui_part_option.length;i++){
1489 1489
         if(id == this.displace_liqui_part_option[i].id){
1490 1490
            name = this.displace_liqui_part_option[i].name
1491
-        } 
1491
+        }
1492 1492
       }
1493 1493
       return name
1494 1494
     },
@@ -1582,13 +1582,13 @@
1582 1582
             if(i == 20 && this.goodTypeList[i].is_open == 1){
1583 1583
                this.checkedTwentyNight= true
1584 1584
             }
1585
-           
1585
+
1586 1586
           }
1587 1587
           this.startDialogVisibleOne = true
1588 1588
         }
1589
-      }) 
1589
+      })
1590 1590
     },
1591
-    saveHisDialysis(){ 
1591
+    saveHisDialysis(){
1592 1592
       var index = 0
1593 1593
       var arr = []
1594 1594
       if(this.checkedOne == true){
@@ -1601,7 +1601,7 @@
1601 1601
          arr.push(this.goodTypeList[i].id)
1602 1602
         }
1603 1603
       }
1604
-      
1604
+
1605 1605
      var index_one = 0
1606 1606
      if(this.checkedTwo == true){
1607 1607
         index_one = 1
@@ -1613,7 +1613,7 @@
1613 1613
          arr.push(this.goodTypeList[i].id)
1614 1614
         }
1615 1615
       }
1616
-   
1616
+
1617 1617
     var index_two = 0
1618 1618
     if(this.checkedThree == true){
1619 1619
         index_two = 2
@@ -1625,7 +1625,7 @@
1625 1625
          arr.push(this.goodTypeList[i].id)
1626 1626
         }
1627 1627
       }
1628
-    
1628
+
1629 1629
     var index_three = 0
1630 1630
      if(this.checkedFour == true){
1631 1631
         index_three = 3
@@ -1637,7 +1637,7 @@
1637 1637
          arr.push(this.goodTypeList[i].id)
1638 1638
         }
1639 1639
       }
1640
-     
1640
+
1641 1641
      var index_four = 0
1642 1642
       if(this.checkedFive == true){
1643 1643
         index_four = 4
@@ -1649,7 +1649,7 @@
1649 1649
          arr.push(this.goodTypeList[i].id)
1650 1650
         }
1651 1651
       }
1652
-      
1652
+
1653 1653
       var index_five = 0
1654 1654
       if(this.checkedSix == true){
1655 1655
         index_five = 5
@@ -1661,7 +1661,7 @@
1661 1661
          arr.push(this.goodTypeList[i].id)
1662 1662
         }
1663 1663
       }
1664
-     
1664
+
1665 1665
      var index_six = 0
1666 1666
      if(this.checkedSeven == true){
1667 1667
         index_six = 6
@@ -1673,7 +1673,7 @@
1673 1673
          arr.push(this.goodTypeList[i].id)
1674 1674
         }
1675 1675
       }
1676
-     
1676
+
1677 1677
      var index_seven = 0
1678 1678
       if(this.checkedEnight == true){
1679 1679
         index_seven = 7
@@ -1698,7 +1698,7 @@
1698 1698
          arr.push(this.goodTypeList[i].id)
1699 1699
         }
1700 1700
       }
1701
-   
1701
+
1702 1702
    var index_night = 0
1703 1703
     if(this.checkedTen == true){
1704 1704
         index_night = 9
@@ -1710,7 +1710,7 @@
1710 1710
          arr.push(this.goodTypeList[i].id)
1711 1711
         }
1712 1712
       }
1713
-     
1713
+
1714 1714
      var index_ten = 0
1715 1715
      if(this.checkedEleven == true){
1716 1716
         index_ten = 10
@@ -1722,7 +1722,7 @@
1722 1722
          arr.push(this.goodTypeList[i].id)
1723 1723
         }
1724 1724
       }
1725
-     
1725
+
1726 1726
      var index_eleven =0
1727 1727
      if(this.checkedTwenty == true){
1728 1728
         index_eleven = 11
@@ -1746,7 +1746,7 @@
1746 1746
          arr.push(this.goodTypeList[i].id)
1747 1747
         }
1748 1748
       }
1749
-    
1749
+
1750 1750
     var index_twenty_two = 0
1751 1751
      if(this.checkedTwentyTwo == true){
1752 1752
         index_twenty_two = 13
@@ -1758,7 +1758,7 @@
1758 1758
          arr.push(this.goodTypeList[i].id)
1759 1759
         }
1760 1760
       }
1761
-    
1761
+
1762 1762
      var index_twenty_three = 0
1763 1763
      if(this.checkedTwentyThree == true){
1764 1764
         index_twenty_three = 14
@@ -1770,7 +1770,7 @@
1770 1770
          arr.push(this.goodTypeList[i].id)
1771 1771
         }
1772 1772
       }
1773
-     
1773
+
1774 1774
      var index_twenty_four = 0
1775 1775
       if(this.checkedTwentyFour == true){
1776 1776
         index_twenty_four = 15
@@ -1782,7 +1782,7 @@
1782 1782
          arr.push(this.goodTypeList[i].id)
1783 1783
         }
1784 1784
       }
1785
-     
1785
+
1786 1786
      var index_twenty_five = 0
1787 1787
      if(this.checkedTwentyFive == true){
1788 1788
         index_twenty_five = 16
@@ -1794,7 +1794,7 @@
1794 1794
          arr.push(this.goodTypeList[i].id)
1795 1795
         }
1796 1796
       }
1797
-     
1797
+
1798 1798
      var index_twenty_six = 0
1799 1799
      if(this.checkedTwentySix == true){
1800 1800
         index_twenty_six = 17
@@ -1818,7 +1818,7 @@
1818 1818
          arr.push(this.goodTypeList[i].id)
1819 1819
         }
1820 1820
       }
1821
-     
1821
+
1822 1822
      var index_twenty_eight = 0
1823 1823
      if(this.checkedTwentyEight == true){
1824 1824
         index_twenty_eight = 19
@@ -1830,7 +1830,7 @@
1830 1830
          arr.push(this.goodTypeList[i].id)
1831 1831
         }
1832 1832
       }
1833
-     
1833
+
1834 1834
      var index_twenty_night =0
1835 1835
      if(this.checkedTwentyNight == true){
1836 1836
         index_twenty_night = 20
@@ -1855,10 +1855,10 @@
1855 1855
            this.getlist()
1856 1856
         }
1857 1857
       })
1858
-    
1858
+
1859 1859
     },
1860 1860
     getTypeName(val,patient_id){
1861
-   
1861
+
1862 1862
     var str = ""
1863 1863
     var arrNew = []
1864 1864
      if(val.project!=null){
@@ -1867,7 +1867,7 @@
1867 1867
         if(val.project!=null){
1868 1868
         for(let i=0;i<val.project.length;i++){
1869 1869
             arr.push(val.project[i])
1870
-         }  
1870
+         }
1871 1871
          for(let i=0;i<arr.length;i++){
1872 1872
            arr[i].good_type_id = 0
1873 1873
            arr[i].good_type_id = arr[i].good_info.good_type_id
@@ -1894,7 +1894,7 @@
1894 1894
             }
1895 1895
            }
1896 1896
          }
1897
-       
1897
+
1898 1898
          if(newArr!=null && newArr.length > 0){
1899 1899
           for(let i=0;i<newArr.length;i++){
1900 1900
            for(let j=0;j<newArr[i].child.length;j++){
@@ -1902,20 +1902,20 @@
1902 1902
            }
1903 1903
           }
1904 1904
          }
1905
-         
1905
+
1906 1906
           if(newArr!=null && newArr.length >0){
1907 1907
             for(let i=0;i<newArr.length;i++){
1908 1908
               arrNew.push(newArr[i])
1909 1909
             }
1910 1910
           }
1911
-      
1911
+
1912 1912
         }
1913 1913
       }
1914
-     
1914
+
1915 1915
       return arrNew
1916
-     
1916
+
1917 1917
      }
1918
-   
1918
+
1919 1919
     },
1920 1920
     getStr(good_type_id,arrNew,patient_id){
1921 1921
       // console.log("ARR233323",arrNew)
@@ -1932,7 +1932,7 @@
1932 1932
           }
1933 1933
         }
1934 1934
       }
1935
-      
1935
+
1936 1936
        let dataInfo = {}
1937 1937
        if(arr!=null && arr.length > 0){
1938 1938
         arr.forEach((item, index) => {
@@ -1955,7 +1955,7 @@
1955 1955
               }
1956 1956
             }
1957 1957
           }
1958
-            
1958
+
1959 1959
           if(newArr!=null && newArr.length > 0){
1960 1960
             for(let j=0;j<newArr.length;j++){
1961 1961
               for(let z=0;z<newArr[j].child.length;z++){
@@ -1967,7 +1967,7 @@
1967 1967
             }
1968 1968
           }
1969 1969
        }
1970
-    
1970
+
1971 1971
       return str
1972 1972
     },
1973 1973
     toPrint(){
@@ -1981,7 +1981,7 @@
1981 1981
     },
1982 1982
     toExportListOne(){
1983 1983
       import('@/vendor/Export2Excel').then(excel => {
1984
-         
1984
+
1985 1985
         if(this.tableList!=null && this.tableList.length > 0){
1986 1986
            for(let i=0;i<this.tableList.length;i++){
1987 1987
              this.tableList[i].index = i+1
@@ -1997,10 +1997,10 @@
1997 1997
            filename: '透析耗材统计'
1998 1998
          })
1999 1999
           this.downloadLoading = false
2000
-        }) 
2000
+        })
2001 2001
     },
2002 2002
     toExportListTwo(){
2003
-      import('@/vendor/Export2Excel').then(excel => { 
2003
+      import('@/vendor/Export2Excel').then(excel => {
2004 2004
         if(this.tableList!=null && this.tableList.length > 0){
2005 2005
            for(let i=0;i<this.tableList.length;i++){
2006 2006
              this.tableList[i].index = i+1
@@ -2016,7 +2016,7 @@
2016 2016
            filename: '透析耗材统计'
2017 2017
          })
2018 2018
           this.downloadLoading = false
2019
-        })  
2019
+        })
2020 2020
     },
2021 2021
     handleSelectionChange(val){
2022 2022
       var arr = []

+ 4 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -180,7 +180,7 @@
180 180
                               <div>
181 181
 
182 182
                                 <el-button
183
-                                    v-if="(hisPatientInfo.id_card_type == 4 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0 && org_id != 10340)"
183
+                                    v-if="(hisPatientInfo.id_card_type == 4 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0  && org_id != 10340)"
184 184
                                     size="small"
185 185
                                     @click="open(50,items.med_type,items.prescriptions[0].order,items.prescriptions)"
186 186
                                     type="primary"
@@ -203,8 +203,6 @@
203 203
                                 </el-button>
204 204
                                 <!--<div>{{ items.curPrescriptions.order.order_status}}</div>-->
205 205
                                 <!--<div>{{ items.prescriptions[0].order.order_status}}</div>-->
206
-
207
-
208 206
                                 <el-button v-loading="loadingtwo"
209 207
                                            v-if="((hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3) && org_id != 10340"
210 208
                                            size="small"
@@ -2980,7 +2978,7 @@ export default {
2980 2978
         }
2981 2979
 
2982 2980
         if (this.hisPatientInfo.id_card_type == 1) {
2983
-          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10191) {
2981
+          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id !=  10318) {
2984 2982
             this.pwdFormVisible = true
2985 2983
             this.pwd = ''
2986 2984
           } else {
@@ -2992,7 +2990,8 @@ export default {
2992 2990
 
2993 2991
           }
2994 2992
         } else {
2995
-          if (this.activeName == 'first') {/////////////////////////押金shows
2993
+          if (this.activeName == 'first') {
2994
+            //押金shows
2996 2995
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
2997 2996
           } else {
2998 2997
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)

+ 7 - 7
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -55,13 +55,13 @@
55 55
          :balanceAccounts="balanceAccounts"
56 56
      >
57 57
      </printSeven>
58
-
59
-      <printOne :info="info" v-if="org_id != 9990 &&
60
-          org_id != 10138 &&
61
-          org_id != 9504 &&
62
-          org_id != 10028 &&
63
-          org_id != 4 &&
64
-          org_id != 10278 && org_id != 10191 && org_id != 10387"></printOne>
58
+   <printOne :info="info" v-else></printOne>
59
+<!--      <printOne :info="info" v-if="org_id != 9990 &&-->
60
+<!--          org_id != 10138 &&-->
61
+<!--          org_id != 9504 &&-->
62
+<!--          org_id != 10028 &&-->
63
+<!--          org_id != 4 &&-->
64
+<!--          org_id != 10278 && org_id != 10191 && org_id != 10387"></printOne>-->
65 65
       <!-- 测试医保环境下表格样式放开以下这条 -->
66 66
       <!-- <testVue :info="info" v-else></testVue> -->
67 67
     </div>

+ 139 - 131
src/xt_pages/workforce/components/editTableData.vue View File

@@ -1633,7 +1633,7 @@
1633 1633
             :label="item.title"
1634 1634
             :name="item.name"
1635 1635
         >
1636
-          <el-table border :data="item.tableWeekArrage" style="width: 100%">
1636
+          <el-table v-loading="dataloading" border :data="item.tableWeekArrage" style="width: 100%">
1637 1637
             <!-- 自定义表结构 -->
1638 1638
             <el-table-column
1639 1639
                 label="星期"
@@ -1824,6 +1824,7 @@ const moment = require("moment");
1824 1824
 import {
1825 1825
   PostSearchSmartSchPatient,
1826 1826
   getSmartDevices,
1827
+  getSmartSchByPatient
1827 1828
 } from "@/api/schedule_template/sch_template";
1828 1829
 
1829 1830
 import {
@@ -1903,6 +1904,7 @@ export default {
1903 1904
 
1904 1905
   data() {
1905 1906
     return {
1907
+      dataloading:false,
1906 1908
       current_patient_data:[],
1907 1909
       week_zhongwens: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
1908 1910
       week_type: "",
@@ -2575,159 +2577,165 @@ export default {
2575 2577
       return "";
2576 2578
     },
2577 2579
     handleSelect(val) {
2578
-      this.editableTabsValue = "1";
2579
-
2580
-      this.editableTabs[0].tableWeekArrage = [];
2581
-      this.editableTabs[1].tableWeekArrage = [];
2582
-      this.editableTabs[2].tableWeekArrage = [];
2580
+      this.dataloading = true
2581
+      getSmartSchByPatient(val.id).then((response) => {
2582
+        this.dataloading = false
2583
+        var sch = response.data.data.sch
2584
+        this.editableTabsValue = "1";
2585
+        this.editableTabs[0].tableWeekArrage = [];
2586
+        this.editableTabs[1].tableWeekArrage = [];
2587
+        this.editableTabs[2].tableWeekArrage = [];
2588
+        this.editableTabs[0].checkedWeek = [];
2589
+        this.editableTabs[1].checkedWeek = [];
2590
+        this.editableTabs[2].checkedWeek = [];
2583 2591
 
2584
-      this.editableTabs[0].checkedWeek = [];
2585
-      this.editableTabs[1].checkedWeek = [];
2586
-      this.editableTabs[2].checkedWeek = [];
2592
+        var tempDate = new Date();
2593
+        var day = tempDate.getDay();
2594
+        console.log(day);
2595
+        if (day == 0) {
2596
+          day = 7;
2597
+        }
2598
+        console.log(val);
2599
+        this.smart_keyword = val.name;
2600
+        this.cur_smart_patient_id = val.id;
2601
+        this.cur_smart_patient_name = val.name;
2602
+        this.cur_smart_patient_no = val.dialysis_no;
2603
+        //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
2604
+        //根据患者的排班日期判断属于本周还是下周还是下下周
2605
+        for (let i = 0; i < sch.length; i++) {
2606
+          var week_type = this.getWeekType(
2607
+            this.getTime(sch[i].schedule_date, "{y}-{m}-{d}")
2608
+          );
2587 2609
 
2588
-      var tempDate = new Date();
2589
-      var day = tempDate.getDay();
2590
-      console.log(day);
2591
-      if (day == 0) {
2592
-        day = 7;
2593
-      }
2594
-      console.log(val);
2595
-      this.smart_keyword = val.name;
2596
-      this.cur_smart_patient_id = val.id;
2597
-      this.cur_smart_patient_name = val.name;
2598
-      this.cur_smart_patient_no = val.dialysis_no;
2599
-      //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
2600
-      //根据患者的排班日期判断属于本周还是下周还是下下周
2601
-      for (let i = 0; i < val.sch.length; i++) {
2602
-        var week_type = this.getWeekType(
2603
-            this.getTime(val.sch[i].schedule_date, "{y}-{m}-{d}")
2604
-        );
2605
-
2606
-        switch (week_type) {
2607
-          case "1":
2608
-            var obj = {
2609
-              mode_id: val.sch[i].mode_id,
2610
-              sch_type: val.sch[i].schedule_type,
2611
-              zone_id: val.sch[i].partition_id,
2612
-              jihao_id: val.sch[i].bed_id,
2613
-              is_edit: false,
2614
-              week: this.getWeek(val.sch[i].schedule_week),
2615
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2616
-              schedule_date: this.getDate(val.sch[i].schedule_week),
2617
-              sch_id: val.sch[i].id,
2618
-            };
2619
-            let is_edit = true;
2620
-            console.log("val.sch[i].order.id");
2621
-            console.log(val.sch[i].order.id);
2622
-            console.log("val.sch[i].order.id");
2610
+          switch (week_type) {
2611
+            case "1":
2612
+              var obj = {
2613
+                mode_id: sch[i].mode_id,
2614
+                sch_type: sch[i].schedule_type,
2615
+                zone_id:  sch[i].partition_id,
2616
+                jihao_id:sch[i].bed_id,
2617
+                is_edit: false,
2618
+                week: this.getWeek(sch[i].schedule_week),
2619
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2620
+                schedule_date: this.getDate(sch[i].schedule_week),
2621
+                sch_id: sch[i].id,
2622
+              };
2623
+              let is_edit = true;
2624
+              console.log("val.sch[i].order.id");
2625
+              console.log(sch[i].order.id);
2626
+              console.log("val.sch[i].order.id");
2623 2627
 
2624
-            if (val.sch[i].schedule_week < day || val.sch[i].order.id > 0) {
2625
-              is_edit = false;
2626
-            } else {
2627
-              is_edit = true;
2628
-            }
2629
-            obj.is_edit = is_edit;
2628
+              if (sch[i].schedule_week < day || sch[i].order.id > 0) {
2629
+                is_edit = false;
2630
+              } else {
2631
+                is_edit = true;
2632
+              }
2633
+              obj.is_edit = is_edit;
2630 2634
 
2631
-            for (let b = 0; b < this.weeks.length; b++) {
2632
-              console.log(val.sch[i].schedule_week);
2633
-              console.log(this.weeks[b].week_type);
2634
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2635
-                if (
2635
+              for (let b = 0; b < this.weeks.length; b++) {
2636
+                console.log(sch[i].schedule_week);
2637
+                console.log(this.weeks[b].week_type);
2638
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2639
+                  if (
2636 2640
                     this.weeks[b].week_type >= day ||
2637
-                    val.sch[i].order.id == 0
2638
-                ) {
2639
-                  this.weeks[b].is_edit = true;
2640
-                } else {
2641
-                  this.weeks[b].is_edit = false;
2641
+                    sch[i].order.id == 0
2642
+                  ) {
2643
+                    this.weeks[b].is_edit = true;
2644
+                  } else {
2645
+                    this.weeks[b].is_edit = false;
2646
+                  }
2647
+                  this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2642 2648
                 }
2643
-                this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2644
-              }
2645 2649
 
2646 2650
 
2647 2651
 
2648
-            }
2652
+              }
2649 2653
 
2650
-            this.editableTabs[0].tableWeekArrage.push(obj);
2651
-            break;
2652
-          case "2":
2653
-            var obj2 = {
2654
-              mode_id: val.sch[i].mode_id,
2655
-              sch_type: val.sch[i].schedule_type,
2656
-              zone_id: val.sch[i].partition_id,
2657
-              jihao_id: val.sch[i].bed_id,
2658
-              is_edit: false,
2659
-              week: this.getWeek(val.sch[i].schedule_week),
2660
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2661
-              schedule_date: this.getDate(val.sch[i].schedule_week + 7),
2662
-              sch_id: val.sch[i].id,
2663
-            };
2664
-            let is_edit2 = true;
2665
-            obj2.is_edit = is_edit2;
2654
+              this.editableTabs[0].tableWeekArrage.push(obj);
2655
+              break;
2656
+            case "2":
2657
+              var obj2 = {
2658
+                mode_id: sch[i].mode_id,
2659
+                sch_type: sch[i].schedule_type,
2660
+                zone_id: sch[i].partition_id,
2661
+                jihao_id: sch[i].bed_id,
2662
+                is_edit: false,
2663
+                week: this.getWeek(sch[i].schedule_week),
2664
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2665
+                schedule_date: this.getDate(sch[i].schedule_week + 7),
2666
+                sch_id: sch[i].id,
2667
+              };
2668
+              let is_edit2 = true;
2669
+              obj2.is_edit = is_edit2;
2666 2670
 
2667
-            // let checkObj2={
2668
-            //   name:this.getWeek(val.sch[i].schedule_week),
2669
-            //   week_type:val.sch[i].schedule_week,
2670
-            //   is_edit:is_edit2
2671
-            // }
2671
+              // let checkObj2={
2672
+              //   name:this.getWeek(val.sch[i].schedule_week),
2673
+              //   week_type:val.sch[i].schedule_week,
2674
+              //   is_edit:is_edit2
2675
+              // }
2672 2676
 
2673
-            // this.editableTabs[1].checkedWeek.push(checkObj2)
2677
+              // this.editableTabs[1].checkedWeek.push(checkObj2)
2674 2678
 
2675
-            for (let b = 0; b < this.weeks.length; b++) {
2676
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2677
-                // this.weeks[b].is_edit = true;
2678
-                this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2679
-              }
2679
+              for (let b = 0; b < this.weeks.length; b++) {
2680
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2681
+                  // this.weeks[b].is_edit = true;
2682
+                  this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2683
+                }
2680 2684
 
2681 2685
 
2682
-            }
2686
+              }
2683 2687
 
2684
-            this.editableTabs[1].tableWeekArrage.push(obj2);
2685
-            break;
2686
-
2687
-          case "3":
2688
-            let obj3 = {
2689
-              mode_id: val.sch[i].mode_id,
2690
-              sch_type: val.sch[i].schedule_type,
2691
-              zone_id: val.sch[i].partition_id,
2692
-              jihao_id: val.sch[i].bed_id,
2693
-              is_edit: false,
2694
-              week: this.getWeek(val.sch[i].schedule_week),
2695
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2696
-              schedule_date: this.getDate(val.sch[i].schedule_week + 14),
2697
-              sch_id: val.sch[i].id,
2698
-            };
2699
-            let is_edit3 = true;
2700
-            obj3.is_edit = is_edit3;
2701
-            for (let b = 0; b < this.weeks.length; b++) {
2702
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2703
-                // this.weeks[b].is_edit = true;
2704
-                this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2688
+              this.editableTabs[1].tableWeekArrage.push(obj2);
2689
+              break;
2705 2690
 
2706
-              }
2691
+            case "3":
2692
+              let obj3 = {
2693
+                mode_id: sch[i].mode_id,
2694
+                sch_type: sch[i].schedule_type,
2695
+                zone_id: sch[i].partition_id,
2696
+                jihao_id: sch[i].bed_id,
2697
+                is_edit: false,
2698
+                week: this.getWeek(sch[i].schedule_week),
2699
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2700
+                schedule_date: this.getDate(sch[i].schedule_week + 14),
2701
+                sch_id: sch[i].id,
2702
+              };
2703
+              let is_edit3 = true;
2704
+              obj3.is_edit = is_edit3;
2705
+              for (let b = 0; b < this.weeks.length; b++) {
2706
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2707
+                  // this.weeks[b].is_edit = true;
2708
+                  this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2707 2709
 
2710
+                }
2708 2711
 
2709
-            }
2710 2712
 
2711
-            this.editableTabs[2].tableWeekArrage.push(obj3);
2712
-            break;
2713
-        }
2714
-      }
2715
-      if(this.editableTabsValue == "1") {
2716
-        var tempDate = new Date();
2717
-        var day = tempDate.getDay();
2718
-        if (day == 0) {
2719
-          day = 7;
2713
+              }
2714
+
2715
+              this.editableTabs[2].tableWeekArrage.push(obj3);
2716
+              break;
2717
+          }
2720 2718
         }
2721
-        for (let i = 0; i < this.weeks.length; i++) {
2722
-          if (this.weeks[i].week_type < day) {
2723
-            this.weeks[i].is_edit = false;
2719
+        if(this.editableTabsValue == "1") {
2720
+          var tempDate = new Date();
2721
+          var day = tempDate.getDay();
2722
+          if (day == 0) {
2723
+            day = 7;
2724
+          }
2725
+          for (let i = 0; i < this.weeks.length; i++) {
2726
+            if (this.weeks[i].week_type < day) {
2727
+              this.weeks[i].is_edit = false;
2728
+            }
2724 2729
           }
2725 2730
         }
2726
-      }
2727 2731
 
2728
-      this.current_patient_data = this.editableTabs
2732
+        this.current_patient_data = this.editableTabs
2733
+
2734
+        this.current_all_sch = this.editableTabs;
2735
+
2736
+      });
2737
+
2729 2738
 
2730
-      this.current_all_sch = this.editableTabs;
2731 2739
     },
2732 2740
     getDate(week_type) {
2733 2741
       console.log(week_type);
@@ -2849,6 +2857,7 @@ export default {
2849 2857
       }
2850 2858
     },
2851 2859
     showSmartDialog() {
2860
+      this.dataloading = true
2852 2861
       this.editableTabsValue = "1";
2853 2862
       for (let i = 0; i < this.patientList.length; i++) {
2854 2863
         if (this.patientList[i].id == this.cur_info.patient_id) {
@@ -2887,8 +2896,7 @@ export default {
2887 2896
           return false;
2888 2897
         }
2889 2898
         var schedules = response.data.data.schedules;
2890
-
2891
-
2899
+        this.dataloading = false
2892 2900
         this.current_all_sch[0].tableWeekArrage = [];
2893 2901
         this.current_all_sch[1].tableWeekArrage = [];
2894 2902
         this.current_all_sch[2].tableWeekArrage = [];

+ 32 - 7
src/xt_pages/workforce/components/template_table.vue View File

@@ -885,7 +885,7 @@
885 885
                       v-model="scope.row.device_number_id"
886 886
                       placeholder="请选择"
887 887
                       size="mini"
888
-                      @click.native="changeArea(scope.row)"
888
+                      @click.native="changeJihao(scope.row)"
889 889
                       class="select_list_arrage"
890 890
                     >
891 891
                       <el-option
@@ -1786,13 +1786,38 @@ export default {
1786 1786
           }
1787 1787
         }
1788 1788
       }
1789
-      console.log(row.jihaos)
1790
-      if(row.jihaos.length > 0){
1791
-        // row.device_number_id = row.jihaos[0].id;
1792
-      }else{
1793
-        row.device_number_id = ""
1789
+      row.device_number_id = ""
1790
+    },
1791
+    changeJihao(row) {
1792
+      let devices = [];
1793
+      devices = this.opera_device_numbers_two;
1794
+      let cur_key =
1795
+        this.getWeekByzhongwen(row.week).toString() +
1796
+        "_" +
1797
+        row.time_type.toString();
1798
+      row.jihaos = [];
1799
+      for (let i = 0; i < devices.length; i++) {
1800
+        if (devices[i].zone_id == row.zone_id) {
1801
+          let is_sch = false; //是否有排班
1802
+          for (let key in devices[i]) {
1803
+            if (key == cur_key) {
1804
+              if (
1805
+                devices[i][key].pid > 0 &&
1806
+                devices[i][key].treat_mode_id > 0 &&
1807
+                devices[i][key].pid != this.cur_smart_patient_id
1808
+              ) {
1809
+                is_sch = true;
1810
+              }
1811
+            }
1812
+          }
1813
+          if (!is_sch) {
1814
+            row.jihaos.push(devices[i]);
1815
+          }
1816
+        }
1794 1817
       }
1818
+      row.device_number_id = ""
1795 1819
     },
1820
+
1796 1821
     select_week(val) {
1797 1822
       this.handledDataLoading = true;
1798 1823
       let params = {
@@ -2054,7 +2079,7 @@ export default {
2054 2079
       }
2055 2080
       setTimeout(function (){
2056 2081
         that.GetTemplate(template)
2057
-        that.opera_device_numbers_two = that.deepClone(that.opera_device_numbers )
2082
+        that.GetTemplateTwo(template)
2058 2083
 
2059 2084
       }, 1000);
2060 2085