Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
124054f1b3

+ 1 - 0
src/api/dialysis.js View File

208
 }
208
 }
209
 
209
 
210
 export function postTreatmentsummary(params) {
210
 export function postTreatmentsummary(params) {
211
+  console.log('param223322323', params)
211
   return request({
212
   return request({
212
     url: '/api/dialysis/treatmentsummary',
213
     url: '/api/dialysis/treatmentsummary',
213
     method: 'Post',
214
     method: 'Post',

+ 54 - 91
src/xt_pages/data/components/drugs.vue View File

47
     <div style="display:flex; align-items:center;margin-bottom:10px;">
47
     <div style="display:flex; align-items:center;margin-bottom:10px;">
48
         <!--<el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>-->
48
         <!--<el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>-->
49
         <el-button type="primary" size="small"  @click="GDYBBatchPutOnRecord()">批量备案</el-button>
49
         <el-button type="primary" size="small"  @click="GDYBBatchPutOnRecord()">批量备案</el-button>
50
-        <el-link target="_blank" href="https://kuyi.shengws.com/drugTemplate.xlsx" :underline="false"
50
+        <el-link target="_blank" href="https://kuyi.shengws.com/drugsTemplate.xlsx" :underline="false"
51
                  style="margin-left:15px">
51
                  style="margin-left:15px">
52
           <el-button
52
           <el-button
53
             class="filter-item"
53
             class="filter-item"
89
           </div>
89
           </div>
90
         </template>
90
         </template>
91
       </el-table-column>
91
       </el-table-column>
92
-      <!-- <el-table-column prop="date" label="最大单位" width="60" align="center">
93
-        <template slot-scope="scope">
94
-          <div>{{scope.row.max_unit}}</div>
95
-        </template>
96
-      </el-table-column>
97
-      <el-table-column label="最小单位" width="60" align="center">
98
-        <template slot-scope="scope">
99
-          <div>{{scope.row.min_unit}}</div>
100
-        </template>
101
-      </el-table-column> -->
92
+  
102
       <el-table-column prop="date" label="进货价" width="100" align="center">
93
       <el-table-column prop="date" label="进货价" width="100" align="center">
103
         <template slot-scope="scope">
94
         <template slot-scope="scope">
104
           <div>{{scope.row.last_price}}</div>
95
           <div>{{scope.row.last_price}}</div>
937
 
928
 
938
           var isHasDrugName = header.includes('*药品名称');
929
           var isHasDrugName = header.includes('*药品名称');
939
           console.log("isHasDrugName",isHasDrugName)
930
           console.log("isHasDrugName",isHasDrugName)
940
-          var isHasUnval = header.includes('*拆零');
941
-          console.log("isHasUnval",isHasUnval)
942
-          var isHasMinUnit= header.includes('*拆零单位');
943
-           console.log("isHasMinUnit",isHasMinUnit)
944
           var isHasDosage =  header.includes('*剂量')
931
           var isHasDosage =  header.includes('*剂量')
945
           console.log("isHasDosage",isHasDosage)
932
           console.log("isHasDosage",isHasDosage)
946
-
947
           var isHasMaxUnit= header.includes('*剂量单位');
933
           var isHasMaxUnit= header.includes('*剂量单位');
948
           console.log("isHasMaxUnit",isHasMaxUnit)
934
           console.log("isHasMaxUnit",isHasMaxUnit)
935
+            var isHasUnval = header.includes('*拆零');
936
+          console.log("isHasUnval",isHasUnval)
937
+          var isHasMinUnit= header.includes('*拆零单位');
938
+           console.log("isHasMinUnit",isHasMinUnit)
949
           var isHasPackingUnit = header.includes('*包装单位')
939
           var isHasPackingUnit = header.includes('*包装单位')
950
           console.log("isHasPackingUnit",isHasPackingUnit)
940
           console.log("isHasPackingUnit",isHasPackingUnit)
941
+        
951
           var isHasDrugType =  header.includes('*药品类型');
942
           var isHasDrugType =  header.includes('*药品类型');
952
           console.log("isHasDrugType",isHasDrugType)
943
           console.log("isHasDrugType",isHasDrugType)
953
           var isHasDrugStockLimit =  header.includes('*库存警戒');
944
           var isHasDrugStockLimit =  header.includes('*库存警戒');
956
           console.log("isHasDrugOriginPlace",isHasDrugOriginPlace)
947
           console.log("isHasDrugOriginPlace",isHasDrugOriginPlace)
957
           var isHasDrugDosageForm = header.includes('*药品剂型');
948
           var isHasDrugDosageForm = header.includes('*药品剂型');
958
           console.log("isHasDrugDosageForm",isHasDrugDosageForm)
949
           console.log("isHasDrugDosageForm",isHasDrugDosageForm)
959
-
960
-          var isHasUnitMatrixing= header.includes("*单位换算");
961
-          console.log("isHasUnitMatrixing",isHasUnitMatrixing)
950
+         
962
           var isHasRetailPrice = header.includes('*拆零零售价');
951
           var isHasRetailPrice = header.includes('*拆零零售价');
963
           console.log("isHasRetailPrice",isHasRetailPrice)
952
           console.log("isHasRetailPrice",isHasRetailPrice)
964
-          var isHasLastPrice = header.includes('*进货价');
965
           var isHasPackingPrice= header.includes('*包装零售价');
953
           var isHasPackingPrice= header.includes('*包装零售价');
966
-         console.log("isHasLastPrice",isHasLastPrice)
954
+          console.log("isHasLastPrice",isHasPackingPrice)
955
+          var isHasLastPrice = header.includes('*进货价');
956
+          console.log("进货价",isHasLastPrice)
957
+          
967
           var isHasDrugClassifye = header.includes('*药物分类');
958
           var isHasDrugClassifye = header.includes('*药物分类');
968
          console.log("isHasDrugClassifye",isHasDrugClassifye)
959
          console.log("isHasDrugClassifye",isHasDrugClassifye)
969
          var isHasManufacturer = header.includes('*生产厂商');
960
          var isHasManufacturer = header.includes('*生产厂商');
972
         console.log("isHasDrugDose",isHasDrugDose)
963
         console.log("isHasDrugDose",isHasDrugDose)
973
          var isDrugDoseUnit = header.includes('*默认单次用量单位');
964
          var isDrugDoseUnit = header.includes('*默认单次用量单位');
974
          console.log("isDrugDoseUnit",isDrugDoseUnit)
965
          console.log("isDrugDoseUnit",isDrugDoseUnit)
975
-          if (!(isHasDrugName  && isHasUnval && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit &&  isHasMinUnit && isHasUnitMatrixing &&  isHasRetailPrice && isHasLastPrice && isHasPackingPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit && isHasDosage && isHasPackingUnit)) {
976
-            console.log("分区222222222222222222222222222222")
966
+          if (!(isHasDrugName  && isHasDosage && isHasMaxUnit && isHasUnval && isHasMinUnit && isHasPackingUnit && isHasDrugType &&  isHasDrugStockLimit && isHasDrugOriginPlace &&
967
+          isHasDrugDosageForm &&  isHasRetailPrice && isHasPackingPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit)) {
968
+           
977
             this.dialogVisible = true;
969
             this.dialogVisible = true;
978
             return
970
             return
979
           }
971
           }
996
            }
988
            }
997
 
989
 
998
 
990
 
999
-          if (results[i]['*拆零'] === undefined) {
1000
-                obj['min_number'] = ''
1001
-              } else {
1002
-           if (key == '*拆零') {
1003
-               obj['min_number'] = results[i][key].replace(/\s/g,"")
1004
-              }
1005
-           }
1006
-
1007
-           if (results[i]['*拆零单位'] === undefined) {
1008
-                obj['min_unit'] = ''
1009
-              } else {
1010
-           if (key == '*拆零单位') {
1011
-               obj['min_unit'] = results[i][key].replace(/\s/g,"")
1012
-              }
1013
-           }
1014
-
1015
-
1016
-            if (results[i]['*剂量'] === undefined) {
1017
-                obj['dosage'] = ''
991
+          if (results[i]['*剂量'] === undefined) {
992
+                obj['dose'] = ''
1018
               } else {
993
               } else {
1019
             if (key == '*剂量') {
994
             if (key == '*剂量') {
1020
-                obj['dosage'] = results[i][key].replace(/\s/g,"")
995
+                obj['dose'] = results[i][key].replace(/\s/g,"")
1021
               }
996
               }
1022
            }
997
            }
1023
 
998
 
1024
            if (results[i]['*剂量单位'] === undefined) {
999
            if (results[i]['*剂量单位'] === undefined) {
1025
-                obj['max_unit'] = ''
1000
+                obj['dose_unit'] = ''
1026
               } else {
1001
               } else {
1027
            if (key == '*剂量单位') {
1002
            if (key == '*剂量单位') {
1028
-               obj['max_unit'] = results[i][key].replace(/\s/g,"")
1029
-              }
1030
-           }
1031
-
1032
-            if (results[i]['*包装单位'] === undefined) {
1033
-                obj['packing_unit'] = ''
1034
-              } else {
1035
-           if (key == '*包装单位') {
1036
-               obj['packing_unit'] = results[i][key].replace(/\s/g,"")
1003
+               obj['dose_unit'] = results[i][key].replace(/\s/g,"")
1037
               }
1004
               }
1038
            }
1005
            }
1039
 
1006
 
1040
 
1007
 
1041
-          if (results[i]['默认给药途径'] === undefined) {
1042
-                obj['delivery_way'] = ''
1008
+  
1009
+          if (results[i]['*拆零'] === undefined) {
1010
+                obj['min_number'] = ''
1043
               } else {
1011
               } else {
1044
-           if (key == '默认给药途径') {
1045
-               obj['delivery_way'] = results[i][key].replace(/\s/g,"")
1012
+           if (key == '*拆零') {
1013
+               obj['min_number'] = results[i][key].replace(/\s/g,"")
1046
               }
1014
               }
1047
            }
1015
            }
1048
 
1016
 
1049
-           if (results[i]['默认执行频率'] === undefined) {
1050
-                obj['execution_frequency'] = ''
1017
+           if (results[i]['*拆零单位'] === undefined) {
1018
+                obj['min_unit'] = ''
1051
               } else {
1019
               } else {
1052
-           if (key == '默认执行频率') {
1053
-               obj['execution_frequency'] = results[i][key].replace(/\s/g,"")
1020
+           if (key == '*拆零单位') {
1021
+               obj['min_unit'] = results[i][key].replace(/\s/g,"")
1054
               }
1022
               }
1055
            }
1023
            }
1056
 
1024
 
1057
-          if (results[i]['默认开药天数'] === undefined) {
1058
-                obj['drug_day'] = ''
1025
+
1026
+            if (results[i]['*包装单位'] === undefined) {
1027
+                obj['max_unit'] = ''
1059
               } else {
1028
               } else {
1060
-           if (key == '默认开药天数') {
1061
-               obj['drug_day'] = results[i][key].replace(/\s/g,"")
1029
+           if (key == '*包装单位') {
1030
+               obj['max_unit'] = results[i][key].replace(/\s/g,"")
1062
               }
1031
               }
1063
            }
1032
            }
1064
 
1033
 
1065
-
1066
-
1067
             if (results[i]['*药品类型'] === undefined) {
1034
             if (results[i]['*药品类型'] === undefined) {
1068
                 obj['drug_type'] = ''
1035
                 obj['drug_type'] = ''
1069
               } else {
1036
               } else {
1099
            }
1066
            }
1100
 
1067
 
1101
 
1068
 
1102
-            if (results[i]['*医保等级'] === undefined) {
1103
-                obj['medical_insurance_level'] = ''
1104
-              } else {
1105
-           if (key == '*医保等级') {
1106
-               obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
1107
-              }
1108
-           }
1109
-
1110
-
1111
-
1112
-
1113
-            if (results[i]['*单位换算'] === undefined) {
1114
-                obj['unit_matrixing'] = ''
1115
-              } else {
1116
-           if (key == '*单位换算') {
1117
-               obj['unit_matrixing'] = results[i][key].replace(/\s/g,"")
1118
-              }
1119
-           }
1120
-
1121
-
1122
-
1123
-
1124
           if (results[i]['*拆零零售价'] === undefined) {
1069
           if (results[i]['*拆零零售价'] === undefined) {
1125
                 obj['retail_price'] = ''
1070
                 obj['retail_price'] = ''
1126
               } else {
1071
               } else {
1195
               }
1140
               }
1196
            }
1141
            }
1197
 
1142
 
1143
+            if (results[i]['默认给药途径'] === undefined) {
1144
+                obj['delivery_way'] = ''
1145
+              } else {
1146
+            if (key == '经销商') {
1147
+                obj['delivery_way'] = results[i][key].replace(/\s/g,"")
1148
+              }
1149
+           }
1150
+
1151
+              if (results[i]['默认执行频率'] === undefined) {
1152
+                obj['execution_frequency'] = ''
1153
+              } else {
1154
+            if (key == '默认执行频率') {
1155
+                obj['execution_frequency'] = results[i][key].replace(/\s/g,"")
1156
+              }
1157
+           }
1158
+
1198
            if (results[i]['限制性用药'] === undefined) {
1159
            if (results[i]['限制性用药'] === undefined) {
1199
                 obj['lmt_used_flag'] = ''
1160
                 obj['lmt_used_flag'] = ''
1200
               } else {
1161
               } else {
1415
 
1376
 
1416
         }
1377
         }
1417
        }
1378
        }
1418
-
1379
+       for(let i=0;i<tableData.length;i++){
1380
+          tableData[i].dose = parseInt(tableData[i].dose)
1381
+       }
1419
        let params = {
1382
        let params = {
1420
           'drugs':tableData
1383
           'drugs':tableData
1421
         };
1384
         };
1422
         console.log("params222222222",params)
1385
         console.log("params222222222",params)
1423
-
1386
+        
1424
         postDrugInformation(params).then(response=>{
1387
         postDrugInformation(params).then(response=>{
1425
            if(response.data.state == 1){
1388
            if(response.data.state == 1){
1426
              var msg =  response.data.data.msg;
1389
              var msg =  response.data.data.msg;

+ 4 - 6
src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue View File

184
     show(record,date) {
184
     show(record,date) {
185
       this.isVisibility = true
185
       this.isVisibility = true
186
       this.record = record
186
       this.record = record
187
-      console.log(111111111111111,date)
187
+      
188
       if(date){
188
       if(date){
189
         this.date = date
189
         this.date = date
190
         this.record_date = uParseTime(this.date, '{y}-{m}-{d}')
190
         this.record_date = uParseTime(this.date, '{y}-{m}-{d}')
191
-        console.log(22222222222,this.record_date)
191
+       
192
       }
192
       }
193
       
193
       
194
       console.log('治疗小结', record)
194
       console.log('治疗小结', record)
320
       })
320
       })
321
     },
321
     },
322
     getPermission() {
322
     getPermission() {
323
-      request
324
-        .get('/api/func_per/get', {
323
+      request.get('/api/func_per/get', {
325
           params: {
324
           params: {
326
             create_url: '/api/dialysis/treatmentsummary?mode=1',
325
             create_url: '/api/dialysis/treatmentsummary?mode=1',
327
             modify_url: '/api/dialysis/treatmentsummary?mode=2',
326
             modify_url: '/api/dialysis/treatmentsummary?mode=2',
328
             modify_other_url: '/api/dialysis/treatmentsummary?mode=3',
327
             modify_other_url: '/api/dialysis/treatmentsummary?mode=3',
329
             module: 9
328
             module: 9
330
           }
329
           }
331
-        })
332
-        .then(res => {
330
+        }).then(res => {
333
           if (res.data.state == 0) {
331
           if (res.data.state == 0) {
334
             this.hasPermission = false
332
             this.hasPermission = false
335
           } else if (res.data.state == 1) {
333
           } else if (res.data.state == 1) {

+ 1 - 1
src/xt_pages/stock/detail/stockOutDetail.vue View File

751
 
751
 
752
        const data = this.formatJson(filterVal, this.tableOut)
752
        const data = this.formatJson(filterVal, this.tableOut)
753
        console.log("date2332323232",data)
753
        console.log("date2332323232",data)
754
-        return
754
+      
755
         excel.export_json_to_excel({
755
         excel.export_json_to_excel({
756
            header: tHeader,
756
            header: tHeader,
757
            data,
757
            data,

+ 31 - 8
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

541
         }
541
         }
542
         for(let i=0;i<this.tablePrint.length;i++){
542
         for(let i=0;i<this.tablePrint.length;i++){
543
            if(this.org_id == 9671 || this.org_id == 9919 ){
543
            if(this.org_id == 9671 || this.org_id == 9919 ){
544
-             this.tablePrint[i].price = this.tablePrint[i].last_price
544
+           
545
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
545
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
546
-             this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].last_price)
546
+             this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
547
              this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
547
              this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
548
-             this.tablePrint[i].total = this.getCountSenvenOne(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].last_price)
548
+             this.tablePrint[i].total = this.getCountSenvenOne(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
549
            }else{
549
            }else{
550
               this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
550
               this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
551
               this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price)
551
               this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price)
552
               this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
552
               this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
553
               this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price) 
553
               this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price) 
554
            }
554
            }
555
-         
556
-          
557
         }
555
         }
558
        console.log("列表数据333333333",this.tablePrint)
556
        console.log("列表数据333333333",this.tablePrint)
559
-    
557
+      
560
        import('@/vendor/Export2Excel').then(excel => {
558
        import('@/vendor/Export2Excel').then(excel => {
561
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
559
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
562
        const filterVal = ['index','drug_name', 'unit', 'min_unit','count','price','total_price','remark']
560
        const filterVal = ['index','drug_name', 'unit', 'min_unit','count','price','total_price','remark']
659
             var list = response.data.data.list
657
             var list = response.data.data.list
660
             console.log("药品出库详情",list)
658
             console.log("药品出库详情",list)
661
             let objInfo = {}
659
             let objInfo = {}
662
-            list.forEach((item,index)=>{
660
+            if(this.org_id == 9671 || this.org_id == 9919){
661
+              list.forEach((item,index)=>{
662
+              let { drug_id } = item
663
+              if(!objInfo[drug_id]){
664
+                objInfo[drug_id] = {
665
+                  drug_id,
666
+                  child:[],
667
+                  drug_name:item.XtBaseDrug.drug_name,
668
+                  drug_spec:item.XtBaseDrug.drug_spec,
669
+                  min_unit:item.XtBaseDrug.min_unit,
670
+                  count:0,
671
+                  price:item.XtBaseDrug.last_price,
672
+                  remark:item.XtBaseDrug.remark,
673
+                  total_price:"",
674
+                  dose:item.XtBaseDrug.dose,
675
+                  dose_unit:item.XtBaseDrug.dose_unit,
676
+                  min_number:item.XtBaseDrug.min_number,
677
+                  max_unit:item.XtBaseDrug.max_unit,
678
+                  min_price:item.XtBaseDrug.min_price,
679
+                }
680
+              }
681
+            })
682
+            }else{
683
+               list.forEach((item,index)=>{
663
               let { drug_id } = item
684
               let { drug_id } = item
664
               if(!objInfo[drug_id]){
685
               if(!objInfo[drug_id]){
665
                 objInfo[drug_id] = {
686
                 objInfo[drug_id] = {
680
                 }
701
                 }
681
               }
702
               }
682
             })
703
             })
704
+            }
705
+           
683
             let newArr = Object.values(objInfo);
706
             let newArr = Object.values(objInfo);
684
             for(let i=0;i<newArr.length;i++){
707
             for(let i=0;i<newArr.length;i++){
685
               for(let j=0;j<list.length;j++){
708
               for(let j=0;j<list.length;j++){
752
         return total*min_price
775
         return total*min_price
753
       },
776
       },
754
       getCountSix(drug_id,val){
777
       getCountSix(drug_id,val){
755
-        console.log("val233232",val)
778
+     
756
         var count = 0 
779
         var count = 0 
757
         for(let i=0;i<val.length;i++){
780
         for(let i=0;i<val.length;i++){
758
           count+= val[i].count
781
           count+= val[i].count

+ 3 - 0
src/xt_pages/stock/stockPrint.vue View File

14
                     <div class="order_title_panl">
14
                     <div class="order_title_panl">
15
                         <span class="main_title">耗材管理查询表</span>
15
                         <span class="main_title">耗材管理查询表</span>
16
                     </div>
16
                     </div>
17
+                    <div style="text-align:left;margin-bottom:20px;font-size: 18px;margin-bottom:-30px" v-if="org_id == 3907 || org_id == 9671">
18
+                      <span v-if="end_time!=''">查询日期:{{start_time}} ~</span>  {{end_time}}
19
+                    </div>
17
                     <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
20
                     <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
                       打印时间:{{time_now}}
21
                       打印时间:{{time_now}}
19
                     </div>
22
                     </div>

+ 13 - 12
src/xt_pages/workforce/template.vue View File

103
 
103
 
104
 
104
 
105
         <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
105
         <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
106
-        <!-- <el-button size="small" icon="el-icon-setting" type="primary" @click="setData">同步数据</el-button> -->
106
+        <el-button size="small" icon="el-icon-setting" type="primary" @click="setData">同步数据</el-button>
107
       </div>
107
       </div>
108
       <!-- </el-col> -->
108
       <!-- </el-col> -->
109
     </div>
109
     </div>
117
                           :patients="patients"></template-table>
117
                           :patients="patients"></template-table>
118
         </el-tab-pane>
118
         </el-tab-pane>
119
         <el-tab-pane name="first" :disabled="template_mode.mode == 0">
119
         <el-tab-pane name="first" :disabled="template_mode.mode == 0">
120
-          <span slot="label"> 第一周
121
-             <span v-if="schedule.execute_times%2==0">(本周)</span>
122
-             <span v-if="schedule.execute_times%2!=0">(下一周)</span>
120
+          <span slot="label"> 模板一
121
+            <span v-if="schedule.mode ==1">(本周)</span>
122
+             <span v-if="schedule.mode == 2 && schedule.execute_times%2==0">(下一周)</span>
123
+             <span v-if="schedule.mode == 2 && schedule.execute_times%2!=0">(本周)</span>
123
           </span>
124
           </span>
124
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
125
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
125
                           :patients="patients" @cancel_sch="refresh"></template-table>
126
                           :patients="patients" @cancel_sch="refresh"></template-table>
126
         </el-tab-pane>
127
         </el-tab-pane>
127
 
128
 
128
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
129
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
129
-          <span slot="label"> 第二周
130
-             <span v-if="schedule.execute_times%2==0">(下一周)</span>
131
-             <span v-if="schedule.execute_times%2!=0">(本周)</span>
130
+          <span slot="label"> 模板二
131
+             <span v-if="schedule.mode == 2 && schedule.execute_times%2==0">(本周)</span>
132
+             <span v-if="schedule.mode == 2 && schedule.execute_times%2!=0">(下一周)</span>
132
            </span>
133
            </span>
133
           <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
134
           <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
134
                           :patients="patients" @cancel_sch="refresh"></template-table>
135
                           :patients="patients" @cancel_sch="refresh"></template-table>
141
 
142
 
142
      <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
143
      <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
143
             <el-form :model="form"  ref="form" label-width="90px" :rules="rules">
144
             <el-form :model="form"  ref="form" label-width="90px" :rules="rules">
144
-                <el-form-item label="同步周次:">
145
-                   <el-radio v-model="form.firstWeek" label="1">第一周</el-radio>
146
-                   <el-radio v-model="form.firstWeek" label="2">第二周</el-radio>
145
+                <el-form-item label="同步模板:">
146
+                   <el-radio v-model="form.firstWeek" label="1">模板一</el-radio>
147
+                   <el-radio v-model="form.firstWeek" label="2">模板二</el-radio>
147
                 </el-form-item>
148
                 </el-form-item>
148
                 <el-form-item label="同步到 :">
149
                 <el-form-item label="同步到 :">
149
                   <el-select v-model="form.copyWeek" placeholder="请选择" required  prop="copyWeek">
150
                   <el-select v-model="form.copyWeek" placeholder="请选择" required  prop="copyWeek">
267
      for(let i = 0; i < this.weekList.length; i++){
268
      for(let i = 0; i < this.weekList.length; i++){
268
          if(this.weekNum + i + 1 <= 53){
269
          if(this.weekNum + i + 1 <= 53){
269
              let num = this.weekNum + i 
270
              let num = this.weekNum + i 
270
-            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
271
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] 
271
              this.typeOptions.push({value:i,label:str})
272
              this.typeOptions.push({value:i,label:str})
272
             let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
273
             let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
273
             this.timeOptions.push({value:i,label:stt})
274
             this.timeOptions.push({value:i,label:stt})
274
         }else{
275
         }else{
275
 
276
 
276
             newNum++
277
             newNum++
277
-            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + newNum + ')'
278
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] 
278
             this.typeOptions.push({value:i,label:str})
279
             this.typeOptions.push({value:i,label:str})
279
             let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
280
             let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
280
             this.timeOptions.push({value:i,label:stt})
281
             this.timeOptions.push({value:i,label:stt})