瀏覽代碼

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 20220812

XMLWAN 2 年之前
父節點
當前提交
37f6b46315

+ 34 - 0
src/api/schedule_template/sch_template.js 查看文件

@@ -125,3 +125,37 @@ export function BatchSmartSch(params,patient_id) {
125 125
     data: params
126 126
   })
127 127
 }
128
+
129
+
130
+
131
+
132
+export function updateEditSchedules(obj,delObj) {
133
+  var params = {
134
+    edit_schs: obj,
135
+    del_schs: delObj,
136
+
137
+  }
138
+  return request({
139
+    url: '/api/schedule/update_schtemplate',
140
+    method: 'post',
141
+    params: params,
142
+  })
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 查看文件

@@ -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 = []

文件差異過大導致無法顯示
+ 504 - 488
src/xt_pages/dialysis/doctorAdvicePrint.vue


+ 4 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

@@ -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 查看文件

@@ -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>

+ 3 - 0
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue 查看文件

@@ -1129,6 +1129,9 @@ export default {
1129 1129
         totalthree +=arr3[i].count
1130 1130
       }
1131 1131
     }
1132
+    console.log("totalone2332323",totalone)
1133
+    console.log("totaltwo",totaltwo)
1134
+    console.log("totalthr3eee",totalthree)
1132 1135
     total = totalone + totaltwo - totalthree
1133 1136
     if (total < min_number) {
1134 1137
       min_str = total + min_unit;

+ 14 - 3
src/xt_pages/stock/stockOutOrder.vue 查看文件

@@ -270,16 +270,27 @@
270 270
             </template>
271 271
           </el-table-column>
272 272
 
273
-          <el-table-column label="仓库名称" align="center">
273
+          <!-- <el-table-column label="仓库名称" align="center">
274 274
             <template slot-scope="scope">
275 275
               {{ getHouseName(scope.row.storehouse_id) }}
276 276
             </template>
277
-          </el-table-column>
277
+          </el-table-column> -->
278 278
           <!-- <el-table-column label="剩余库存" align="center" v-if="is_sys== 0">
279 279
             <template slot-scope="scope">
280 280
               <span>{{scope.row.stock_count}}</span>
281 281
             </template>
282 282
           </el-table-column> -->
283
+
284
+          <el-table-column label="出库数量" align="center">
285
+            <template slot-scope="scope">
286
+               <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
287
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
288
+                      {{ getHouseName(item.storehouse_id) }}
289
+                  </td>
290
+               </tr>
291
+             
292
+            </template>
293
+          </el-table-column>
283 294
        
284 295
           <el-table-column label="出库数量" align="center">
285 296
             <template slot-scope="scope">
@@ -2343,7 +2354,7 @@ export default {
2343 2354
     },
2344 2355
     // 合并单元格样式
2345 2356
     cellStyle({ row, column, rowIndex, columnIndex }) {
2346
-      let arr = [4,5,6,7,8,9,10,11,12,13];
2357
+      let arr = [3,4,5,6,7,8,9,10,11,12,13];
2347 2358
       if (arr.indexOf(columnIndex) > -1) {
2348 2359
         return "spanClass";
2349 2360
       }

+ 9 - 290
src/xt_pages/workforce/appointment.vue 查看文件

@@ -356,290 +356,6 @@ export default {
356 356
           }
357 357
       )
358 358
 
359
-    },getWeekPanelsTwo() {
360
-      // this.scheduleZoneRow = []
361
-      // this.scheduleZone = []
362
-      getWeekPanels(1, this.partition_id).then(response => {
363
-        if (response.data.state == 0) {
364
-          return false
365
-        }
366
-        var partitions = response.data.data.partitions
367
-        // console.log("分区",partitions)
368
-        this.theWeek.thisWeek = response.data.data.theWeek
369
-        this.theWeek.lastWeek = response.data.data.theLastWeek
370
-        this.theWeek.nextWeek = response.data.data.theNextWeek
371
-        this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
372
-        // 在控制变量改变的时候进行 强制渲染更新
373
-        let childrenRefs = this.$refs.elTabs.$children
374
-        this.$nextTick(() => {
375
-          childrenRefs.forEach(child => child.$forceUpdate())
376
-        })
377
-
378
-        var that = this
379
-
380
-        if (partitions.length > 0) {
381
-          let arrSort = []
382
-          partitions.forEach((item) => {
383
-            let num = Math.max.apply(Math, item.jihaos.map(function (o) {
384
-              return o.sort
385
-            }))
386
-            item.sort = num
387
-            arrSort.push(item)
388
-          })
389
-          arrSort.sort(this.compare('sort'))
390
-          partitions = arrSort
391
-          partitions.forEach(function (partition) {
392
-            if (partition.jihaos.length == 0) {
393
-              return false
394
-            }
395
-            that.scheduleZoneRow.push(partition.jihaos.length)
396
-            that.partitions[partition.id] = partition
397
-            partition.jihaos.forEach(function (jihao) {
398
-              var thisPa = {
399
-                area: partition.name,
400
-                zone_id: partition.id,
401
-                zone_type: partition.type,
402
-                cut: jihao.number,
403
-                jihao_id: jihao.id,
404
-                Mon_M: {
405
-                  schedule_id: 0,
406
-                  mode_id: 0,
407
-                  mode_name: '',
408
-                  dialysis_machine_name:"",
409
-                  patient_id: 0,
410
-                  patient: '',
411
-                  zone_id:partition.id,
412
-                  jihao_id: jihao.id,
413
-                },
414
-                Mon_A: {
415
-                  schedule_id: 0,
416
-                  mode_id: 0,
417
-                  mode_name: '',
418
-                  dialysis_machine_name:"",
419
-
420
-                  patient_id: 0,
421
-                  patient: '',
422
-                  zone_id:partition.id,
423
-                  jihao_id: jihao.id,
424
-                },
425
-                Mon_N: {
426
-                  schedule_id: 0,
427
-                  mode_id: 0,
428
-                  mode_name: '',
429
-                  patient_id: 0,
430
-                  dialysis_machine_name:"",
431
-
432
-                  patient: '',
433
-                  zone_id:partition.id,
434
-                  jihao_id: jihao.id,
435
-                },
436
-                Tue_M: {
437
-                  schedule_id: 0,
438
-                  mode_id: 0,
439
-                  mode_name: '',
440
-                  dialysis_machine_name:"",
441
-
442
-                  patient_id: 0,
443
-                  patient: '',
444
-                  zone_id:partition.id,
445
-                  jihao_id: jihao.id,
446
-                },
447
-                Tue_A: {
448
-                  schedule_id: 0,
449
-                  mode_id: 0,
450
-                  mode_name: '',
451
-                  dialysis_machine_name:"",
452
-
453
-                  patient_id: 0,
454
-                  patient: '',
455
-                  zone_id:partition.id,
456
-                  jihao_id: jihao.id,
457
-                },
458
-                Tue_N: {
459
-                  schedule_id: 0,
460
-                  mode_id: 0,
461
-                  mode_name: '',
462
-                  patient_id: 0,
463
-                  dialysis_machine_name:"",
464
-
465
-                  patient: '',
466
-                  zone_id:partition.id,
467
-                  jihao_id: jihao.id,
468
-                },
469
-                Wed_M: {
470
-                  schedule_id: 0,
471
-                  mode_id: 0,
472
-                  mode_name: '',
473
-                  patient_id: 0,
474
-                  dialysis_machine_name:"",
475
-
476
-                  patient: '',
477
-                  zone_id:partition.id,
478
-                  jihao_id: jihao.id,
479
-                },
480
-                Wed_A: {
481
-                  schedule_id: 0,
482
-                  mode_id: 0,
483
-                  mode_name: '',
484
-                  patient_id: 0,
485
-                  dialysis_machine_name:"",
486
-
487
-                  patient: '',
488
-                  zone_id:partition.id,
489
-                  jihao_id: jihao.id,
490
-                },
491
-                Wed_N: {
492
-                  schedule_id: 0,
493
-                  mode_id: 0,
494
-                  mode_name: '',
495
-                  patient_id: 0,
496
-                  dialysis_machine_name:"",
497
-
498
-                  patient: '',
499
-                  zone_id:partition.id,
500
-                  jihao_id: jihao.id,
501
-                },
502
-                Thurs_M: {
503
-                  schedule_id: 0,
504
-                  mode_id: 0,
505
-                  mode_name: '',
506
-                  patient_id: 0,
507
-                  dialysis_machine_name:"",
508
-
509
-                  patient: '',
510
-                  zone_id:partition.id,
511
-                  jihao_id: jihao.id,
512
-                },
513
-                Thurs_A: {
514
-                  schedule_id: 0,
515
-                  mode_id: 0,
516
-                  mode_name: '',
517
-                  patient_id: 0,
518
-                  dialysis_machine_name:"",
519
-
520
-                  patient: '',
521
-                  zone_id:partition.id,
522
-                  jihao_id: jihao.id,
523
-                },
524
-                Thurs_N: {
525
-                  schedule_id: 0,
526
-                  mode_id: 0,
527
-                  mode_name: '',
528
-                  patient_id: 0,
529
-                  dialysis_machine_name:"",
530
-
531
-                  patient: '',
532
-                  zone_id:partition.id,
533
-                  jihao_id: jihao.id,
534
-                },
535
-                Fri_M: {
536
-                  schedule_id: 0,
537
-                  mode_id: 0,
538
-                  mode_name: '',
539
-                  dialysis_machine_name:"",
540
-
541
-                  patient_id: 0,
542
-                  patient: '',
543
-                  zone_id:partition.id,
544
-                  jihao_id: jihao.id,
545
-                },
546
-                Fri_A: {
547
-                  schedule_id: 0,
548
-                  mode_id: 0,
549
-                  mode_name: '',
550
-                  dialysis_machine_name:"",
551
-
552
-                  patient_id: 0,
553
-                  patient: '',
554
-                  zone_id:partition.id,
555
-                  jihao_id: jihao.id,
556
-                },
557
-                Fri_N: {
558
-                  schedule_id: 0,
559
-                  mode_id: 0,
560
-                  mode_name: '',
561
-                  patient_id: 0,
562
-                  dialysis_machine_name:"",
563
-
564
-                  patient: '',
565
-                  zone_id:partition.id,
566
-                  jihao_id: jihao.id,
567
-                },
568
-                Sat_M: {
569
-                  schedule_id: 0,
570
-                  mode_id: 0,
571
-                  mode_name: '',
572
-                  patient_id: 0,
573
-                  dialysis_machine_name:"",
574
-
575
-                  patient: '',
576
-                  zone_id:partition.id,
577
-                  jihao_id: jihao.id,
578
-                },
579
-                Sat_A: {
580
-                  schedule_id: 0,
581
-                  mode_id: 0,
582
-                  mode_name: '',
583
-                  dialysis_machine_name:"",
584
-
585
-                  patient_id: 0,
586
-                  patient: '',
587
-                  zone_id:partition.id,
588
-                  jihao_id: jihao.id,
589
-                },
590
-                Sat_N: {
591
-                  schedule_id: 0,
592
-                  mode_id: 0,
593
-                  mode_name: '',
594
-                  patient_id: 0,
595
-                  dialysis_machine_name:"",
596
-
597
-                  patient: '',
598
-                  zone_id:partition.id,
599
-                  jihao_id: jihao.id,
600
-                },
601
-                Sun_A: {
602
-                  schedule_id: 0,
603
-                  mode_id: 0,
604
-                  mode_name: '',
605
-                  patient_id: 0,
606
-                  dialysis_machine_name:"",
607
-
608
-                  patient: '',
609
-                  zone_id:partition.id,
610
-                  jihao_id: jihao.id,
611
-                },
612
-                Sun_N: {
613
-                  schedule_id: 0,
614
-                  mode_id: 0,
615
-                  mode_name: '',
616
-                  dialysis_machine_name:"",
617
-
618
-                  patient_id: 0,
619
-                  patient: '',
620
-                  zone_id:partition.id,
621
-                  jihao_id: jihao.id,
622
-                },
623
-                Sun_M: {
624
-                  schedule_id: 0,
625
-                  mode_id: 0,
626
-                  mode_name: '',
627
-                  dialysis_machine_name:"",
628
-
629
-                  patient_id: 0,
630
-                  patient: '',
631
-                  zone_id:partition.id,
632
-                  jihao_id: jihao.id,
633
-                },
634
-                total: 0
635
-              }
636
-              that.scheduleZone.push(thisPa)
637
-            })
638
-
639
-          })
640
-        }
641
-        this.export_file_step_two()
642
-      })
643 359
     },
644 360
     getWeekPanels() {
645 361
       // this.scheduleZoneRow = []
@@ -921,7 +637,10 @@ export default {
921 637
               that.scheduleZone.push(thisPa)
922 638
             })
923 639
           })
640
+
924 641
         }
642
+        console.log("111111111")
643
+        console.log(that.scheduleZone)
925 644
       })
926 645
     },changeSch(val){
927 646
       console.log(this.partitions)
@@ -3085,12 +2804,12 @@ export default {
3085 2804
 
3086 2805
     changePartition(val) {
3087 2806
       this.partition_id = val
3088
-      this.getThreeWeekList()
3089
-      this.getWeekPanels()
3090
-    },
2807
+      // this.getThreeWeekList()
2808
+      // this.getWeekPanels()
2809
+   },
3091 2810
 
3092 2811
     changeSchedule(val) {
3093
-      this.schedule_type = val
2812
+      this.schedule_type = vald
3094 2813
       this.getThreeWeekList()
3095 2814
       this.getWeekPanels()
3096 2815
     },
@@ -3307,8 +3026,8 @@ export default {
3307 3026
     }
3308 3027
     let newNum = 0
3309 3028
     for (let i = 0; i < this.weekList.length; i++) {
3310
-      if (this.weekNum + i + 1 <= 53) {
3311
-        let num = this.weekNum + i
3029
+      if (this.weekNum + i +2 <= 53) {
3030
+        let num = this.weekNum + i +1
3312 3031
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3313 3032
         this.typeOptions.push({value: i, label: str})
3314 3033
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]

+ 291 - 165
src/xt_pages/workforce/components/editTableData.vue 查看文件

@@ -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,8 @@ export default {
1903 1904
 
1904 1905
   data() {
1905 1906
     return {
1907
+      dataloading:false,
1908
+      current_patient_data:[],
1906 1909
       week_zhongwens: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
1907 1910
       week_type: "",
1908 1911
       saveloading: false,
@@ -1919,18 +1922,23 @@ export default {
1919 1922
           title: "本周",
1920 1923
           name: "1",
1921 1924
           tableWeekArrage: [],
1925
+          weeks:[],
1922 1926
         },
1923 1927
         {
1924 1928
           checkedWeek: [],
1925 1929
           title: "下周",
1926 1930
           name: "2",
1927 1931
           tableWeekArrage: [],
1932
+          weeks:[],
1933
+
1928 1934
         },
1929 1935
         {
1930 1936
           checkedWeek: [],
1931 1937
           title: "下下周",
1932 1938
           name: "3",
1933 1939
           tableWeekArrage: [],
1940
+          weeks:[],
1941
+
1934 1942
         },
1935 1943
       ],
1936 1944
 
@@ -2344,7 +2352,9 @@ export default {
2344 2352
       this.smart_keyword = "";
2345 2353
     },
2346 2354
     batchSetSch() {
2347
-      var tempData = [];
2355
+      var saveOrEditTempData = [];
2356
+      var delTempData = [];
2357
+
2348 2358
       var day = new Date().getDay();
2349 2359
       if (day == 0) {
2350 2360
         day = 7;
@@ -2372,7 +2382,7 @@ export default {
2372 2382
             week_type: "1",
2373 2383
             week_name: this.editableTabs[0].tableWeekArrage[b].week,
2374 2384
           };
2375
-          tempData.push(obj);
2385
+          saveOrEditTempData.push(obj);
2376 2386
         }
2377 2387
       }
2378 2388
       for (let b = 0; b < this.editableTabs[1].tableWeekArrage.length; b++) {
@@ -2389,9 +2399,8 @@ export default {
2389 2399
           week_type: "2",
2390 2400
           week_name: this.editableTabs[1].tableWeekArrage[b].week,
2391 2401
         };
2392
-        tempData.push(obj);
2402
+        saveOrEditTempData.push(obj);
2393 2403
       }
2394
-
2395 2404
       for (let b = 0; b < this.editableTabs[2].tableWeekArrage.length; b++) {
2396 2405
         let obj = {
2397 2406
           schedule_date: this.editableTabs[2].tableWeekArrage[b].schedule_date,
@@ -2406,21 +2415,100 @@ export default {
2406 2415
           week_type: "3",
2407 2416
           week_name: this.editableTabs[2].tableWeekArrage[b].week,
2408 2417
         };
2409
-        tempData.push(obj);
2418
+        saveOrEditTempData.push(obj);
2410 2419
       }
2411 2420
 
2412
-      for (let i = 0; i < tempData.length; i++) {
2413
-        if (tempData[i].bed_id == "" || tempData[i].zone_id == "") {
2421
+      //原始数据,用来与智能排版的数据进行比对,查出有排班记录,取消勾选的数据,作为删除的数据,提交给后端
2422
+
2423
+      for (let b = 0; b < this.current_patient_data[0].tableWeekArrage.length; b++) {
2424
+        //只有大于等于今天的数据才能保存和没有上机的
2425
+        if (
2426
+          this.getWeekByzhongwen(
2427
+            this.current_patient_data[0].tableWeekArrage[b].week
2428
+          ) >= day &&
2429
+          this.current_patient_data[0].tableWeekArrage[b].is_edit
2430
+        ) {
2431
+          let obj = {
2432
+            schedule_date:
2433
+            this.current_patient_data[0].tableWeekArrage[b].schedule_date,
2434
+            schedule_type: this.current_patient_data[0].tableWeekArrage[b].sch_type,
2435
+            bed_id: this.current_patient_data[0].tableWeekArrage[b].jihao_id,
2436
+            schedule_week: this.getWeekByzhongwen(
2437
+              this.current_patient_data[0].tableWeekArrage[b].week
2438
+            ),
2439
+            mode_id: this.current_patient_data[0].tableWeekArrage[b].mode_id,
2440
+            sch_id: this.current_patient_data[0].tableWeekArrage[b].sch_id,
2441
+            zone_id: this.current_patient_data[0].tableWeekArrage[b].zone_id,
2442
+            week_type: "1",
2443
+            week_name: this.current_patient_data[0].tableWeekArrage[b].week,
2444
+          };
2445
+          delTempData.push(obj);
2446
+        }
2447
+      }
2448
+      for (let b = 0; b < this.current_patient_data[1].tableWeekArrage.length; b++) {
2449
+        let obj = {
2450
+          schedule_date: this.current_patient_data[1].tableWeekArrage[b].schedule_date,
2451
+          schedule_type: this.current_patient_data[1].tableWeekArrage[b].sch_type,
2452
+          bed_id: this.current_patient_data[1].tableWeekArrage[b].jihao_id,
2453
+          schedule_week: this.getWeekByzhongwen(
2454
+            this.current_patient_data[1].tableWeekArrage[b].week
2455
+          ),
2456
+          mode_id: this.current_patient_data[1].tableWeekArrage[b].mode_id,
2457
+          sch_id: this.current_patient_data[1].tableWeekArrage[b].sch_id,
2458
+          zone_id: this.current_patient_data[1].tableWeekArrage[b].zone_id,
2459
+          week_type: "2",
2460
+          week_name: this.current_patient_data[1].tableWeekArrage[b].week,
2461
+        };
2462
+        delTempData.push(obj);
2463
+      }
2464
+      for (let b = 0; b < this.current_patient_data[2].tableWeekArrage.length; b++) {
2465
+        let obj = {
2466
+          schedule_date: this.current_patient_data[2].tableWeekArrage[b].schedule_date,
2467
+          schedule_type: this.current_patient_data[2].tableWeekArrage[b].sch_type,
2468
+          bed_id: this.current_patient_data[2].tableWeekArrage[b].jihao_id,
2469
+          schedule_week: this.getWeekByzhongwen(
2470
+            this.current_patient_data[2].tableWeekArrage[b].week
2471
+          ),
2472
+          mode_id: this.current_patient_data[2].tableWeekArrage[b].mode_id,
2473
+          sch_id: this.current_patient_data[2].tableWeekArrage[b].sch_id,
2474
+          zone_id: this.current_patient_data[2].tableWeekArrage[b].zone_id,
2475
+          week_type: "3",
2476
+          week_name: this.current_patient_data[2].tableWeekArrage[b].week,
2477
+        };
2478
+        delTempData.push(obj);
2479
+      }
2480
+
2481
+
2482
+
2483
+      for (let i = 0; i < saveOrEditTempData.length; i++) {
2484
+        if (saveOrEditTempData[i].bed_id == "" || saveOrEditTempData[i].zone_id == "") {
2414 2485
           this.$message.error("分区或者床位不能空");
2415 2486
           return;
2416 2487
         }
2417 2488
       }
2489
+      console.log(saveOrEditTempData)
2490
+      console.log(delTempData)
2491
+
2492
+
2493
+      if (saveOrEditTempData.length > 0 ) {
2494
+        // console.log("111111")
2495
+
2496
+        // for(let i = 0; i < delTempData.length; i++){
2497
+        //   for(let b = 0; b < saveOrEditTempData.length; b++){
2498
+        //     console.log(delTempData[i].sch_id)
2499
+        //     console.log(saveOrEditTempData[b].sch_id)
2500
+        //
2501
+        //     if(delTempData[i].sch_id == saveOrEditTempData[b].sch_id){
2502
+        //         console.log("被删元素"+delTempData[i])
2503
+        //         delTempData.splice(i,1)
2504
+        //       }
2505
+        //   }
2506
+        // }
2418 2507
 
2419
-      if (tempData.length > 0) {
2420 2508
         let obj = {
2421
-          smart_schs: tempData,
2509
+          smart_schs: saveOrEditTempData,
2510
+          del_schs:[],
2422 2511
         };
2423
-        console.log(obj);
2424 2512
         this.saveloading = true;
2425 2513
         BatchSmartSch(obj, this.cur_smart_patient_id).then((response) => {
2426 2514
           if (response.data.state == 1) {
@@ -2489,137 +2577,165 @@ export default {
2489 2577
       return "";
2490 2578
     },
2491 2579
     handleSelect(val) {
2492
-      this.editableTabsValue = "1";
2493
-
2494
-      this.editableTabs[0].tableWeekArrage = [];
2495
-      this.editableTabs[1].tableWeekArrage = [];
2496
-      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 = [];
2497 2591
 
2498
-      this.editableTabs[0].checkedWeek = [];
2499
-      this.editableTabs[1].checkedWeek = [];
2500
-      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
+          );
2501 2609
 
2502
-      var tempDate = new Date();
2503
-      var day = tempDate.getDay();
2504
-      console.log(day);
2505
-      if (day == 0) {
2506
-        day = 7;
2507
-      }
2508
-      console.log(val);
2509
-      this.smart_keyword = val.name;
2510
-      this.cur_smart_patient_id = val.id;
2511
-      this.cur_smart_patient_name = val.name;
2512
-      this.cur_smart_patient_no = val.dialysis_no;
2513
-      //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
2514
-      //根据患者的排班日期判断属于本周还是下周还是下下周
2515
-      for (let i = 0; i < val.sch.length; i++) {
2516
-        var week_type = this.getWeekType(
2517
-            this.getTime(val.sch[i].schedule_date, "{y}-{m}-{d}")
2518
-        );
2519
-
2520
-        switch (week_type) {
2521
-          case "1":
2522
-            var obj = {
2523
-              mode_id: val.sch[i].mode_id,
2524
-              sch_type: val.sch[i].schedule_type,
2525
-              zone_id: val.sch[i].partition_id,
2526
-              jihao_id: val.sch[i].bed_id,
2527
-              is_edit: false,
2528
-              week: this.getWeek(val.sch[i].schedule_week),
2529
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2530
-              schedule_date: this.getDate(val.sch[i].schedule_week),
2531
-              sch_id: val.sch[i].id,
2532
-            };
2533
-            let is_edit = true;
2534
-            console.log("val.sch[i].order.id");
2535
-            console.log(val.sch[i].order.id);
2536
-            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");
2537 2627
 
2538
-            if (val.sch[i].schedule_week < day || val.sch[i].order.id > 0) {
2539
-              is_edit = false;
2540
-            } else {
2541
-              is_edit = true;
2542
-            }
2543
-            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;
2544 2634
 
2545
-            for (let b = 0; b < this.weeks.length; b++) {
2546
-              console.log(val.sch[i].schedule_week);
2547
-              console.log(this.weeks[b].week_type);
2548
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2549
-                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 (
2550 2640
                     this.weeks[b].week_type >= day ||
2551
-                    val.sch[i].order.id == 0
2552
-                ) {
2553
-                  this.weeks[b].is_edit = true;
2554
-                } else {
2555
-                  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]);
2556 2648
                 }
2557
-                this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2649
+
2650
+
2651
+
2558 2652
               }
2559
-            }
2560 2653
 
2561
-            this.editableTabs[0].tableWeekArrage.push(obj);
2562
-            break;
2563
-          case "2":
2564
-            var obj2 = {
2565
-              mode_id: val.sch[i].mode_id,
2566
-              sch_type: val.sch[i].schedule_type,
2567
-              zone_id: val.sch[i].partition_id,
2568
-              jihao_id: val.sch[i].bed_id,
2569
-              is_edit: false,
2570
-              week: this.getWeek(val.sch[i].schedule_week),
2571
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2572
-              schedule_date: this.getDate(val.sch[i].schedule_week + 7),
2573
-              sch_id: val.sch[i].id,
2574
-            };
2575
-            let is_edit2 = true;
2576
-            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;
2670
+
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
+              // }
2577 2676
 
2578
-            // let checkObj2={
2579
-            //   name:this.getWeek(val.sch[i].schedule_week),
2580
-            //   week_type:val.sch[i].schedule_week,
2581
-            //   is_edit:is_edit2
2582
-            // }
2677
+              // this.editableTabs[1].checkedWeek.push(checkObj2)
2678
+
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
+                }
2583 2684
 
2584
-            // this.editableTabs[1].checkedWeek.push(checkObj2)
2585 2685
 
2586
-            for (let b = 0; b < this.weeks.length; b++) {
2587
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2588
-                this.weeks[b].is_edit = true;
2589
-                this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2590 2686
               }
2591
-            }
2592 2687
 
2593
-            this.editableTabs[1].tableWeekArrage.push(obj2);
2594
-            break;
2595
-
2596
-          case "3":
2597
-            let obj3 = {
2598
-              mode_id: val.sch[i].mode_id,
2599
-              sch_type: val.sch[i].schedule_type,
2600
-              zone_id: val.sch[i].partition_id,
2601
-              jihao_id: val.sch[i].bed_id,
2602
-              is_edit: false,
2603
-              week: this.getWeek(val.sch[i].schedule_week),
2604
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2605
-              schedule_date: this.getDate(val.sch[i].schedule_week + 14),
2606
-              sch_id: val.sch[i].id,
2607
-            };
2608
-            let is_edit3 = true;
2609
-            obj3.is_edit = is_edit3;
2610
-            for (let b = 0; b < this.weeks.length; b++) {
2611
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2612
-                this.weeks[b].is_edit = true;
2613
-                this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2688
+              this.editableTabs[1].tableWeekArrage.push(obj2);
2689
+              break;
2690
+
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]);
2709
+
2710
+                }
2711
+
2712
+
2614 2713
               }
2615
-            }
2616 2714
 
2617
-            this.editableTabs[2].tableWeekArrage.push(obj3);
2618
-            break;
2715
+              this.editableTabs[2].tableWeekArrage.push(obj3);
2716
+              break;
2717
+          }
2718
+        }
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
+            }
2729
+          }
2619 2730
         }
2620
-      }
2621 2731
 
2622
-      this.current_all_sch = this.editableTabs;
2732
+        this.current_patient_data = this.editableTabs
2733
+
2734
+        this.current_all_sch = this.editableTabs;
2735
+
2736
+      });
2737
+
2738
+
2623 2739
     },
2624 2740
     getDate(week_type) {
2625 2741
       console.log(week_type);
@@ -2741,6 +2857,7 @@ export default {
2741 2857
       }
2742 2858
     },
2743 2859
     showSmartDialog() {
2860
+      this.dataloading = true
2744 2861
       this.editableTabsValue = "1";
2745 2862
       for (let i = 0; i < this.patientList.length; i++) {
2746 2863
         if (this.patientList[i].id == this.cur_info.patient_id) {
@@ -2779,6 +2896,7 @@ export default {
2779 2896
           return false;
2780 2897
         }
2781 2898
         var schedules = response.data.data.schedules;
2899
+        this.dataloading = false
2782 2900
         this.current_all_sch[0].tableWeekArrage = [];
2783 2901
         this.current_all_sch[1].tableWeekArrage = [];
2784 2902
         this.current_all_sch[2].tableWeekArrage = [];
@@ -2793,9 +2911,10 @@ export default {
2793 2911
         if (day == 0) {
2794 2912
           day = 7;
2795 2913
         }
2796
-        console.log(day);
2797 2914
 
2798 2915
         for (let i = 0; i < schedules.length; i++) {
2916
+
2917
+
2799 2918
           var week_type = this.getWeekType(
2800 2919
               this.getTime(schedules[i].schedule_date, "{y}-{m}-{d}")
2801 2920
           ).toString();
@@ -2826,18 +2945,20 @@ export default {
2826 2945
               }
2827 2946
               obj.is_edit = is_edit;
2828 2947
 
2948
+
2829 2949
               for (let b = 0; b < this.weeks.length; b++) {
2830
-                console.log(schedules[i].schedule_week);
2831
-                console.log(this.weeks[b].week_type);
2832 2950
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2833 2951
                   if (
2834
-                      this.weeks[b].week_type >= day ||
2952
+                      this.weeks[b].week_type >= day &&
2835 2953
                       schedules[i].order.id == 0
2836 2954
                   ) {
2955
+                    console.log( "this.weeks[b].week_type")
2956
+                    console.log( this.weeks[b].week_type )
2837 2957
                     this.weeks[b].is_edit = true;
2838 2958
                   } else {
2839 2959
                     this.weeks[b].is_edit = false;
2840 2960
                   }
2961
+
2841 2962
                   this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2842 2963
                 }
2843 2964
               }
@@ -2860,7 +2981,7 @@ export default {
2860 2981
 
2861 2982
               for (let b = 0; b < this.weeks.length; b++) {
2862 2983
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2863
-                  this.weeks[b].is_edit = true;
2984
+                  // this.weeks[b].is_edit = true;
2864 2985
                   this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2865 2986
                 }
2866 2987
               }
@@ -2882,7 +3003,7 @@ export default {
2882 3003
               };
2883 3004
               for (let b = 0; b < this.weeks.length; b++) {
2884 3005
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2885
-                  this.weeks[b].is_edit = true;
3006
+                  // this.weeks[b].is_edit = true;
2886 3007
                   this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2887 3008
                 }
2888 3009
               }
@@ -2894,47 +3015,53 @@ export default {
2894 3015
         }
2895 3016
       });
2896 3017
 
2897
-      for (let i = 0; i < this.weeks.length; i++) {
3018
+      if(this.editableTabsValue == "1") {
2898 3019
         var tempDate = new Date();
2899 3020
         var day = tempDate.getDay();
2900 3021
         if (day == 0) {
2901 3022
           day = 7;
2902 3023
         }
2903
-        if (this.weeks[i].week_type >= day) {
2904
-          this.weeks[i].is_edit = true;
2905
-        } else {
2906
-          this.weeks[i].is_edit = false;
3024
+        for (let i = 0; i < this.weeks.length; i++) {
3025
+          if (this.weeks[i].week_type < day) {
3026
+            this.weeks[i].is_edit = false;
3027
+          }
2907 3028
         }
2908 3029
       }
2909
-      console.log("weeks");
2910
-      console.log(this.weeks);
2911 3030
 
2912
-      this.smartVisible = true;
2913 3031
 
2914
-      var now = new Date();
2915
-      var day = now.getDay();
2916
-      switch (day) {
2917
-        case 0:
2918
-          break;
2919
-        case 1:
2920
-          break;
2921
-        case 2:
2922
-          break;
2923
-        case 3:
2924
-          break;
2925
-        case 4:
2926
-          break;
2927
-        case 5:
2928
-          break;
2929
-        case 6:
2930
-          break;
3032
+      for (let i = 0; i < this.editableTabs.length; i++) {
3033
+        for(let b = 0; b < this.editableTabs[i].tableWeekArrage.length;b++){
3034
+          data[i]["week_type"] = this.getWeekByzhongwen(data[i].week);
3035
+
3036
+
3037
+
3038
+        }
2931 3039
       }
2932
-      // this.current_all_sch = this.editableTabs
3040
+
3041
+      data.sort(function (a, b) {
3042
+        return a.week_type - b.week_type;
3043
+      });
3044
+
3045
+
3046
+
3047
+      this.current_patient_data = data
3048
+      this.smartVisible = true;
2933 3049
       this.current_all_sch = data;
2934 3050
     },
3051
+
2935 3052
     select_week(val) {
2936
-      // this.current_all_sch = this.editableTabs
2937
-      console.log(this.current_all_sch);
3053
+      // for(this)
3054
+
3055
+
3056
+      this.current_all_sch = this.editableTabs
3057
+      // for(let i = 0; i < this.editableTabs[0].tableWeekArrage.length; i++){
3058
+      //
3059
+      //
3060
+      // }
3061
+
3062
+
3063
+
3064
+
2938 3065
 
2939 3066
       var sch = [];
2940 3067
       for (let i = 0; i < this.current_all_sch.length; i++) {
@@ -2942,7 +3069,6 @@ export default {
2942 3069
           sch = this.current_all_sch[i];
2943 3070
         }
2944 3071
       }
2945
-      console.log(sch);
2946 3072
 
2947 3073
       let data = [];
2948 3074
 
@@ -2957,10 +3083,7 @@ export default {
2957 3083
             obj = sch.tableWeekArrage[b];
2958 3084
           }
2959 3085
         }
2960
-        console.log("日志");
2961 3086
 
2962
-        console.log(is_new);
2963
-        console.log(obj);
2964 3087
 
2965 3088
         let keyIndex = "";
2966 3089
         for (var key in this.partitionsProp) {
@@ -3023,7 +3146,9 @@ export default {
3023 3146
           this.editableTabs[i].tableWeekArrage = data;
3024 3147
         }
3025 3148
       }
3026
-      //
3149
+
3150
+      this.current_all_sch = this.editableTabs
3151
+
3027 3152
     },
3028 3153
     patientClick(row) {
3029 3154
       console.log(row);
@@ -3425,6 +3550,7 @@ export default {
3425 3550
             });
3426 3551
           });
3427 3552
         }
3553
+
3428 3554
         this.scheduleZone.sort(this.compare("sort"));
3429 3555
       });
3430 3556
     },
@@ -4730,7 +4856,7 @@ export default {
4730 4856
       this.$emit("event1", val);
4731 4857
       this.partition_id = val;
4732 4858
       this.getWeekPanels();
4733
-      this.getSchedules();
4859
+      // this.getSchedules();
4734 4860
     },
4735 4861
     changeSchedule_type(val) {
4736 4862
       this.$emit("event2", val);

+ 21 - 9
src/xt_pages/workforce/components/setup_template_dialog.vue 查看文件

@@ -23,6 +23,11 @@
23 23
         >
24 24
         </el-date-picker>
25 25
       </el-form-item>
26
+
27
+      <el-form-item label="模板生成起始周" v-if="template_mode.original_week">
28
+       <label>{{ template_mode.original_week?'第'+template_mode.original_week+'周':""}}</label>
29
+      </el-form-item>
30
+
26 31
     </el-form>
27 32
     <div slot="footer" class="dialog-footer">
28 33
       <el-button @click="hide">取 消</el-button>
@@ -43,16 +48,20 @@ export default {
43 48
       pickerOptions0: {
44 49
         'firstDayOfWeek': 1,
45 50
         disabledDate(time) {
46
-          var nowDate = new Date();
47
-          var nowYear = nowDate.getFullYear();
48
-          var nowMonth = nowDate.getMonth() + 1;
49
-          var nowDay = nowDate.getDate()+7;
51
+
52
+          let weekFirstDay = new Date(new Date() - (new Date().getDay() - 1) * 86400000)
53
+          let firstMonth = Number(weekFirstDay.getMonth()) + 1
54
+
55
+          if (firstMonth < 10) {
56
+            firstMonth = '0' + firstMonth
57
+          }
58
+          let weekFirstDays = weekFirstDay.getDate() + 7;
59
+          if (weekFirstDays < 10) {
60
+            weekFirstDays = '0' + weekFirstDays;
61
+          }
62
+
50 63
           let time_temp =
51
-              nowYear +
52
-              "-" +
53
-              (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
54
-              "-" +
55
-              (nowDay < 10 ? "0" + nowDay : nowDay);
64
+            weekFirstDay.getFullYear() + '-' + firstMonth + '-' + weekFirstDays
56 65
 
57 66
           time_temp = time_temp.replace(/-/g,'/'); // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串
58 67
 
@@ -113,6 +122,7 @@ export default {
113 122
     },
114 123
     show() {
115 124
       this.clear()
125
+      this.form.week_time = this.template_mode.origin_mode
116 126
       this.visible = true
117 127
     },
118 128
     hide() {
@@ -162,6 +172,8 @@ export default {
162 172
         var resp = rs.data
163 173
         if (resp.state == 1) {
164 174
           this.template_mode.mode = this.form.mode
175
+          this.template_mode.original_week = this.form.week_time
176
+
165 177
           this.hide()
166 178
           this.$emit('chenge_mode', this.form.mode)
167 179
         } else {

文件差異過大導致無法顯示
+ 1080 - 708
src/xt_pages/workforce/components/template_table.vue


+ 3 - 3
src/xt_pages/workforce/components/template_table_three.vue 查看文件

@@ -1658,18 +1658,18 @@ export default {
1658 1658
 
1659 1659
     },
1660 1660
     setEditData(patients,template,device_numbers) {
1661
+      this.device_numbers = []
1662
+      this.template = []
1661 1663
       this.patientList = patients
1662 1664
       this.template = template
1663 1665
       this.all_patients = patients
1664
-
1665 1666
       this.cur_info.patient_name = this.patientList[0].name
1666 1667
       this.cur_info.mode_name = this.modes[0].name
1667 1668
       this.cur_info.patient_id = this.patientList[0].id
1668 1669
       this.cur_info.mode_id = this.modes[0].id
1669 1670
       this.$refs.patient_table.setCurrentRow(this.patientList[0])
1670 1671
       this.$refs.mode_table.setCurrentRow(this.modes[0])
1671
-
1672
-
1672
+      this.device_numbers = device_numbers
1673 1673
 
1674 1674
     },search_two: function () {
1675 1675
       if (this.keywords.length == 0) {

+ 17 - 3
src/xt_pages/workforce/remind_print_setting_one.vue 查看文件

@@ -495,9 +495,18 @@
495 495
         //   str = zone.join(",")
496 496
         // }
497 497
         var now_time = parseInt(this.week_type) * 86400 + this.start_time
498
+
499
+       let weekOfDay = parseInt(moment().format('E'))
500
+        let next_monday = moment().add((7 - weekOfDay) + 1, 'days').format('YYYY-MM-DD');
501
+        console.log("卡 is h2323233232",this.toStamp(next_monday))
502
+        let next_sunday = moment().add((7 - weekOfDay) + 7, 'days').format('YYYY-MM-DD')
503
+        console.log("下周日",this.toStamp(next_sunday))
504
+
505
+      
506
+
498 507
         const params = {
499
-          start_time: moment().week(moment().week() + 1).startOf('week').unix(),
500
-          end_time: moment().week(moment().week() + 1).endOf('week').unix(),
508
+          start_time: this.toStamp(next_monday),
509
+          end_time: this.toStamp(next_sunday),
501 510
           week_type: this.week_type,
502 511
           week_time: this.week_time,
503 512
           zone: this.zone,
@@ -700,7 +709,12 @@
700 709
           }
701 710
         }
702 711
         return name
703
-      }
712
+      },
713
+      toStamp(date) {
714
+        const myDate = new Date(date).getTime()/1000 - 28800
715
+        // const stmapEg = Date.parse(myDate) / 1000
716
+       return myDate
717
+      },
704 718
 
705 719
     }
706 720
   }

+ 111 - 113
src/xt_pages/workforce/template.vue 查看文件

@@ -118,55 +118,59 @@
118 118
 <!--          <template-table :editable="false" :device_numbers="device_numbers" :template="this_week_schedules" :is_editing="false"-->
119 119
 <!--                          :patients="patients" :data="data"></template-table>-->
120 120
 <!--        </el-tab-pane>-->
121
-        <el-tab-pane name="first" :disabled="template_mode.mode == 0">
122
-          <span slot="label"> 一周模版 {{first_template.week?first_template.week+'周':""}}
123
-          </span>
124
-          <template-table  ref="table"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"
125
-                          :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>
126
-
121
+        <el-tab-pane name="first" :disabled="template_mode.mode == 0" :label=" first_template.week?'一周模版'+ first_template.week+'周':'一周模版'">
122
+<!--          <span slot="label">-->
123
+<!--          </span>-->
127 124
 
128 125
         </el-tab-pane>
129 126
 
130
-        <el-tab-pane name="second" :disabled="template_mode.mode != 2 && template_mode.mode != 3 && template_mode.mode  != 4">
131
-          <span slot="label">二周模版 {{  second_template.week?second_template.week+'周':""}}
132
-
133
-           </span>
134
-          <template-table-two  ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="second_template"
135
-                          :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh"></template-table-two>
127
+        <el-tab-pane :label="  second_template.week?'二周模版' + second_template.week+'周':'二周模版'" name="second" :disabled="template_mode.mode != 2 && template_mode.mode != 3 && template_mode.mode  != 4">
128
+<!--          <template-table   ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
129
+<!--                           :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
136 130
 
137 131
         </el-tab-pane>
138 132
 
139 133
 
140 134
 
141
-        <el-tab-pane name="third" :disabled="template_mode.mode != 3 && template_mode.mode  != 4">
142
-          <span slot="label">三周模版{{ third_template.week?third_template.week+'周':" "}}
135
+        <el-tab-pane :label="  third_template.week? '三周模版' + third_template.week+'周':'三周模版'" name="third" :disabled="template_mode.mode != 3 && template_mode.mode  != 4">
136
+<!--          <span slot="label">三周模版{{ third_template.week?third_template.week+'周':" "}}-->
143 137
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
144 138
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
145 139
 <!--                  <span v-if="schedule.execute_times%4==0">(本周)</span>-->
146 140
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
147 141
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
148 142
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
149
-           </span>
150
-          <template-table-three   ref="table_three" :editable="true" :device_numbers="device_numbers" :template="third_template" :is_editing="is_editing"
151
-                          :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh" ></template-table-three>
152
-
143
+<!--           </span>-->
144
+<!--          <template-table  ref="table_three"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
145
+<!--                           :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
153 146
         </el-tab-pane>
154 147
 
155
-      <el-tab-pane name="four" :disabled="template_mode.mode  != 4 ">
156
-          <span slot="label"> 四周模版 {{ four_template.week?four_template.week+'周':""}}
148
+      <el-tab-pane :label="four_template.week?'四周模版'+four_template.week+'周':'四周模版'" name="four" :disabled="template_mode.mode  != 4 ">
149
+<!--          <span slot="label"> 四周模版 {{ four_template.week?four_template.week+'周':""}}-->
157 150
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
158 151
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
159 152
 <!--            <span v-if="schedule.execute_times%4==0">(本周)</span>-->
160 153
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
161 154
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
162 155
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
163
-           </span>
164
-          <template-table-four   ref="table_four" :editable="true" :device_numbers="device_numbers" :template="four_template" :is_editing="is_editing"
165
-                      :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @saveSuccess="refresh" @cur_info="cur_info" @saveData="saveData"   @saveSuccessTwo="refresh"></template-table-four>
156
+<!--           </span>-->
157
+<!--        <template-table   ref="table_four"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
158
+<!--                         :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
166 159
 
167 160
         </el-tab-pane>
168 161
 
162
+
163
+<!--        <template-table-two   v-show="activeName =='second'"  ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="second_template"-->
164
+<!--                             :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh"></template-table-two>-->
165
+<!--        <template-table-three  v-show="activeName =='third'"  ref="table_three" :editable="true" :device_numbers="device_numbers" :template="third_template" :is_editing="is_editing"-->
166
+<!--                                :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh" ></template-table-three>-->
167
+<!--        <template-table-four  v-show="activeName =='four'" ref="table_four" :editable="true" :device_numbers="device_numbers" :template="four_template" :is_editing="is_editing"-->
168
+<!--                               :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @saveSuccess="refresh" @cur_info="cur_info" @saveData="saveData"   @saveSuccessTwo="refresh"></template-table-four>-->
169
+
170
+
169 171
       </el-tabs>
172
+      <template-table  v-loading="dataloading"  ref="table"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="template"
173
+                        :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh" @setTemplate="setTemplate" @changeLoading="changeLoading"></template-table>
170 174
 
171 175
 
172 176
 <!--      <template-table  ref="table" :editable="true" :device_numbers="device_numbers" :template="tar_template" :is_editing="is_editing"-->
@@ -178,10 +182,10 @@
178 182
 
179 183
 
180 184
 
181
-      <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
182
-                              @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
183 185
     </div>
184 186
 
187
+    <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
188
+                            @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
185 189
     <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
186 190
       <el-form :model="form" ref="form" label-width="90px" :rules="rules">
187 191
         <el-form-item label="同步模板:" v-if="template_mode.mode == 1">
@@ -260,6 +264,7 @@ export default {
260 264
   },
261 265
   data: function () {
262 266
     return {
267
+      dataloading:true,
263 268
       is_editing:true,
264 269
       editable:false,
265 270
       data:[],
@@ -326,9 +331,6 @@ export default {
326 331
       newVisible: false,
327 332
       weekList: [],
328 333
       currentFirstDate1: '',
329
-      rules: {
330
-        copyWeek: [{required: true, message: "请选择复制时间段", trigger: "blur"}],
331
-      },
332 334
       weekNum: '',
333 335
       weekDayArr: [],
334 336
       todayDate: '',
@@ -425,41 +427,16 @@ export default {
425 427
 
426 428
         }
427 429
 
428
-
429
-
430 430
         var patients = resp.data.patients
431
-        // var schedules = resp.data.schedules
432
-
433 431
         this.template_mode = mode
434 432
         this.origin_mode = mode.mode
435 433
         this.device_numbers = device_numbers
436 434
         this.patients = patients
437
-
438
-
439
-
440
-        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
441
-        this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
442
-        this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
443
-        this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
444
-
435
+        this.tar_template = this.first_template
436
+        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
445 437
 
446 438
         var fakeTemplateItems = []
447
-        // for (let index = 0; index < schedules.length; index++) {
448
-        //   const schedule = schedules[index]
449
-        //   var item = {}
450
-        //   this.$set(item, 'id', schedule.id)
451
-        //   this.$set(item, 'template_id', 0)
452
-        //   this.$set(item, 'device_number_id', schedule.bed_id)
453
-        //   this.$set(item, 'treat_mode', schedule.mode_id)
454
-        //   this.$set(item, 'weekday', schedule.schedule_week)
455
-        //   this.$set(item, 'time_type', schedule.schedule_type)
456
-        //   var patient = {}
457
-        //   this.$set(patient, 'id', schedule.patient_id)
458
-        //   this.$set(patient, 'name', schedule.patient)
459
-        //   this.$set(item, 'patient', patient)
460
-        //
461
-        //   fakeTemplateItems.push(item)
462
-        // }
439
+
463 440
         this.this_week_schedules.items = fakeTemplateItems
464 441
 
465 442
       } else {
@@ -470,19 +447,48 @@ export default {
470 447
 
471 448
   },
472 449
   methods: {
450
+    changeLoading(){
451
+      this.dataloading = false
452
+    },
453
+    setTemplate(items){
454
+      if(this.template_mode.mode == 1){
455
+        this.first_template = items[0]
456
+      }else   if(this.template_mode.mode == 2){
457
+        this.first_template = items[0]
458
+        this.second_template = items[1]
459
+      }else   if(this.template_mode.mode == 3){
460
+        this.first_template = items[0]
461
+        this.second_template = items[1]
462
+        this.third_template = items[2]
463
+      }else   if(this.template_mode.mode == 4){
464
+        this.first_template = items[0]
465
+        this.second_template = items[1]
466
+        this.third_template = items[2]
467
+        this.four_template = items[3]
468
+      }
469
+    },
473 470
     handleClick(val){
471
+      this.dataloading = true
474 472
       if(this.activeName == "first"){
475 473
         this.activeName = "first"
476
-        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
474
+        // this.tar_template = this.first_template
475
+
476
+        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
477 477
       }else if(this.activeName == "second"){
478 478
         this.activeName = "second"
479
-        this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
479
+        // this.tar_template = this.second_template
480
+
481
+        this.$refs.table.setEditData(this.patients,this.second_template,this.device_numbers,this.templates,  this.activeName)
480 482
       }else if(this.activeName == "third"){
481 483
         this.activeName = "third"
482
-        this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
484
+        // this.tar_template = this.third_template
485
+
486
+        this.$refs.table.setEditData(this.patients,this.third_template,this.device_numbers,this.templates,  this.activeName)
483 487
       }else {
484 488
         this.activeName = "four"
485
-        this.$refs.table_four.setEditData(this.patients, this.four_template,this.device_numbers)
489
+        // this.tar_template = this.four_template
490
+
491
+        this.$refs.table.setEditData(this.patients, this.four_template,this.device_numbers,this.templates,  this.activeName)
486 492
       }
487 493
 
488 494
     },
@@ -558,7 +564,7 @@ export default {
558 564
           var mode = resp.data.template_mode
559 565
           var device_numbers = resp.data.device_numbers
560 566
           var templates = resp.data.templates
561
-
567
+          this.templates = templates
562 568
           if(templates.length > 0){
563 569
             this.firstWeekData = templates[0].items
564 570
             this.first_template = templates[0]
@@ -1456,13 +1462,13 @@ export default {
1456 1462
       if (!is_system_zone || !is_device_number) {
1457 1463
         console.log("123123123123")
1458 1464
         this.dialogVisible = true
1459
-        return
1465
+
1460 1466
       } else {
1461 1467
 
1462 1468
 
1463 1469
         if (is_exist_repeat) {
1464 1470
           this.isExistRepeatVisible = true
1465
-          return
1471
+
1466 1472
         } else {
1467 1473
 
1468 1474
           this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
@@ -1475,8 +1481,7 @@ export default {
1475 1481
           let params = {
1476 1482
             schedule: datas
1477 1483
           }
1478
-          console.log("datas")
1479
-          console.log(datas)
1484
+
1480 1485
           //今天的时间
1481 1486
           var day2 = new Date()
1482 1487
           day2.setTime(day2.getTime())
@@ -1487,7 +1492,8 @@ export default {
1487 1492
             if (response.data.state == 0) {
1488 1493
               return false
1489 1494
             }
1490
-            this.getWeekPanels("")
1495
+            this.$message.success("导入成功")
1496
+            // this.getWeekPanels("")
1491 1497
             this.getInitData()
1492 1498
 
1493 1499
           })
@@ -1516,9 +1522,30 @@ export default {
1516 1522
 
1517 1523
           this.first_template = templates[0]
1518 1524
           this.second_template = templates[1]
1519
-
1525
+          this.templates = templates
1520 1526
           this.third_template = templates[2]
1521 1527
           this.four_template = templates[3]
1528
+          if(this.activeName == "first"){
1529
+            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
1530
+
1531
+
1532
+          }else if(this.activeName == "second"){
1533
+
1534
+            this.$refs.table.setEditData(this.patients,this.second_template,this.device_numbers,this.templates,  this.activeName)
1535
+
1536
+
1537
+          }else if(this.activeName == "third"){
1538
+
1539
+            this.$refs.table.setEditData(this.patients,this.third_template,this.device_numbers,this.templates,  this.activeName)
1540
+
1541
+
1542
+          }else if(this.activeName == "four"){
1543
+
1544
+            this.$refs.table.setEditData(this.patients,this.four_template,this.device_numbers,this.templates,  this.activeName)
1545
+
1546
+
1547
+          }
1548
+
1522 1549
 
1523 1550
           // var fakeTemplateItems = []
1524 1551
           // for (let index = 0; index < schedules.length; index++) {
@@ -3130,10 +3157,10 @@ export default {
3130 3157
 
3131 3158
 
3132 3159
 
3133
-          this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
3134
-          this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3135
-          this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3136
-          this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3160
+          this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,this.activeName)
3161
+          // this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3162
+          // this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3163
+          // this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3137 3164
 
3138 3165
 
3139 3166
           var fakeTemplateItems = []
@@ -3163,41 +3190,16 @@ export default {
3163 3190
 
3164 3191
     },saveData(val){
3165 3192
       var tempDataOne = []
3166
-      var tempDataTwo = []
3167
-      var tempDataThree = []
3168
-      var tempDataFour = []
3193
+      // var tempDataTwo = []
3194
+      // var tempDataThree = []
3195
+      // var tempDataFour = []
3169 3196
       for(let i = 0; i < val.length; i++){
3170
-        if(val[i].t_id == this.first_template.id){
3171 3197
           tempDataOne.push(val[i])
3172
-        }
3173
-        if(val[i].t_id == this.second_template.id){
3174
-          tempDataTwo.push(val[i])
3175
-        }
3176
-        if(val[i].t_id == this.third_template.id){
3177
-          tempDataThree.push(val[i])
3178
-        }
3179
-        if(val[i].t_id == this.four_template.id){
3180
-          tempDataFour.push(val[i])
3181
-        }
3182 3198
       }
3183 3199
 
3184 3200
       if(tempDataOne.length > 0){
3185 3201
         this.$refs.table.SetSmartSch(tempDataOne)
3186 3202
       }
3187
-      if(tempDataTwo.length > 0){
3188
-         this.$refs.table_two.SetSmartSch(tempDataTwo)
3189
-      }
3190
-      if(tempDataThree.length > 0){
3191
-         this.$refs.table_three.SetSmartSch(tempDataThree)
3192
-      }
3193
-      if(tempDataFour.length > 0){
3194
-        this.$refs.table_four.SetSmartSch(tempDataFour)
3195
-      }
3196
-
3197
-
3198
-
3199
-
3200
-
3201 3203
 
3202 3204
 
3203 3205
       // this.first_template.items.push({device_number_id:652,id:0,patient_id:7007,template_id:421,time_type:2,treat_mode:2,weekday:4})
@@ -3385,27 +3387,23 @@ export default {
3385 3387
           this.$refs.table.showSmartDialog()
3386 3388
         }else if(this.activeName == "second"){
3387 3389
           this.activeName = "second"
3388
-          this.$refs.table_two.showSmartDialog()
3390
+          this.$refs.table.showSmartDialog()
3389 3391
         }else if(this.activeName == "third"){
3390 3392
           this.activeName = "third"
3391
-          this.$refs.table_three.showSmartDialog()
3393
+          this.$refs.table.showSmartDialog()
3392 3394
         }else {
3393 3395
           this.activeName = "four"
3394
-          this.$refs.table_four.showSmartDialog()
3396
+          this.$refs.table.showSmartDialog()
3395 3397
         }
3396 3398
       })
3397 3399
 
3398 3400
     },saveClick:function (){
3399 3401
       if(this.template_mode.mode == 0){
3400
-        this.$router.go(-1)
3402
+        // this.$router.go(-1)
3403
+        this.$router.back()
3404
+
3401 3405
       }else{
3402 3406
         this.$message.success("保存成功")
3403
-
3404
-        // this.$refs.table.saveAction()
3405
-        // this.$refs.table_two.saveAction()
3406
-        // this.$refs.table_three.saveAction()
3407
-        // this.$refs.table_four.saveAction()
3408
-        // this.$router.go(-1)
3409 3407
         this.$router.back()
3410 3408
 
3411 3409
       }
@@ -3491,10 +3489,10 @@ export default {
3491 3489
 
3492 3490
 
3493 3491
 
3494
-            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
3495
-            this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3496
-            this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3497
-            this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3492
+            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
3493
+            // this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3494
+            // this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3495
+            // this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3498 3496
 
3499 3497
 
3500 3498
             var fakeTemplateItems = []