Procházet zdrojové kódy

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

see999 před 3 roky
rodič
revize
cfd7b68f1e
29 změnil soubory, kde provedl 651 přidání a 157 odebrání
  1. 9 0
      src/api/drug/drug_stock.js
  2. 26 0
      src/api/schedule.js
  3. 9 1
      src/api/stock.js
  4. 2 0
      src/xt_pages/dialysis/batch_print/batch_print_order_thirty.vue
  5. 1 1
      src/xt_pages/dialysis/components/dialysisDrugs.vue
  6. 11 5
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  7. 2 2
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  8. 26 9
      src/xt_pages/dialysis/details/dialog/doubleCheckDialog.vue
  9. 2 1
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue
  10. 3 6
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  11. 17 1
      src/xt_pages/outpatientCharges/summary.vue
  12. 19 10
      src/xt_pages/stock/detail/print.vue
  13. 54 27
      src/xt_pages/stock/detail/stockInDetail.vue
  14. 4 5
      src/xt_pages/stock/detail/stockOutDetail.vue
  15. 9 3
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  16. 2 2
      src/xt_pages/stock/drugs/drugCancelDetailPrint.vue
  17. 2 2
      src/xt_pages/stock/drugs/drugCancelOurderPrint.vue
  18. 2 1
      src/xt_pages/stock/drugs/drugOutOrderPrint.vue
  19. 2 2
      src/xt_pages/stock/drugs/drugQueryPrint.vue
  20. 15 11
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  21. 55 5
      src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue
  22. 1 1
      src/xt_pages/stock/drugs/query.vue
  23. 2 2
      src/xt_pages/stock/stockOutOrderDetail.vue
  24. 58 5
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  25. 4 3
      src/xt_pages/stock/stockPrint.vue
  26. 3 1
      src/xt_pages/stock/stockQuery.vue
  27. 2 2
      src/xt_pages/workforce/appointment.vue
  28. 53 27
      src/xt_pages/workforce/components/tableData.vue
  29. 256 22
      src/xt_pages/workforce/scheduleTablePrint.vue

+ 9 - 0
src/api/drug/drug_stock.js Zobrazit soubor

428
 }
428
 }
429
 
429
 
430
 
430
 
431
+export function getDrugWarehouseOrderInfo(params){
432
+   
433
+  return request({
434
+    url:"/api/drugstock/getdrugwarehouseorderinfo",
435
+    method:"get",
436
+    params:params
437
+  })
438
+}
439
+
431
 
440
 
432
 
441
 
433
 
442
 

+ 26 - 0
src/api/schedule.js Zobrazit soubor

8
   })
8
   })
9
 }
9
 }
10
 
10
 
11
+
12
+export function getWeekPanelsOne(t,patitionId){
13
+  
14
+  return request({
15
+    url: '/api/schedule/weekpanelone?data=' + t+"&patitionid="+patitionId,
16
+    method: 'get'
17
+  })
18
+}
19
+
11
 export function getSchedules(params) {
20
 export function getSchedules(params) {
12
   return request({
21
   return request({
13
     url: '/api/schedule/schedules',
22
     url: '/api/schedule/schedules',
16
   })
25
   })
17
 }
26
 }
18
 
27
 
28
+export function getSchedulesOne(params){
29
+  return request({
30
+    url: '/api/schedule/schedulesone',
31
+    method: 'get',
32
+    params:params,
33
+  })
34
+}
35
+
19
 export function getSchedulePatients(params) {
36
 export function getSchedulePatients(params) {
20
   return request({
37
   return request({
21
     url: '/api/schedule/patients',
38
     url: '/api/schedule/patients',
194
     method:"get",
211
     method:"get",
195
     params:params
212
     params:params
196
   })
213
   })
214
+}
215
+
216
+export function getPatientSheduleCount(params){
217
+   
218
+  return request({
219
+    url:"/api/schedule/getpatientschedulecount",
220
+    method:"get",
221
+    params:params
222
+  })
197
 }
223
 }

+ 9 - 1
src/api/stock.js Zobrazit soubor

610
     method:"get",
610
     method:"get",
611
     params:params
611
     params:params
612
   })
612
   })
613
-}
613
+}
614
+
615
+export function getWarehouseOrderInfoList(params){
616
+   return request({
617
+      url:"/api/good/getwarehouseorderinfolist",
618
+      method:"get",
619
+      params:params
620
+   })
621
+} 

+ 2 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_thirty.vue Zobrazit soubor

154
                                          
154
                                          
155
                                         <label-box :isChecked="isBbloodAccessParOperaCheck(record.assessment_before_dislysis, '人造血管')" showValue="人造血管"></label-box>
155
                                         <label-box :isChecked="isBbloodAccessParOperaCheck(record.assessment_before_dislysis, '人造血管')" showValue="人造血管"></label-box>
156
                                         &nbsp;
156
                                         &nbsp;
157
+                                         <label-box :isChecked="isBbloodAccessParOperaCheck(record.assessment_before_dislysis, '扣眼')" showValue="扣眼"></label-box>
158
+                                        &nbsp;
157
                                     </div>
159
                                     </div>
158
                                 </td>
160
                                 </td>
159
                                 <td width='20'></td>
161
                                 <td width='20'></td>

+ 1 - 1
src/xt_pages/dialysis/components/dialysisDrugs.vue Zobrazit soubor

510
                 }
510
                 }
511
             })
511
             })
512
             this.indexInfoList = newArr
512
             this.indexInfoList = newArr
513
-            console.log("过年9999999999",this.scheduleMap)
513
+           
514
            }
514
            }
515
          
515
          
516
   
516
   

+ 11 - 5
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Zobrazit soubor

588
               <el-input v-model="form.dosage_of_anticoagulants"></el-input>
588
               <el-input v-model="form.dosage_of_anticoagulants"></el-input>
589
           </el-form-item>
589
           </el-form-item>
590
         </el-col>
590
         </el-col>
591
-        
591
+
592
 
592
 
593
         <el-col :span="8" v-if="isShow('并发症其他')">
593
         <el-col :span="8" v-if="isShow('并发症其他')">
594
           <el-form-item label="并发症其他: ">
594
           <el-form-item label="并发症其他: ">
603
         </el-col>
603
         </el-col>
604
         <el-col :span="8" v-if="isShow('透析相关高血压')">
604
         <el-col :span="8" v-if="isShow('透析相关高血压')">
605
             <el-form-item label="透析相关高血压:">
605
             <el-form-item label="透析相关高血压:">
606
-        
606
+
607
              <el-select v-model="form.hypertenison">
607
              <el-select v-model="form.hypertenison">
608
               <el-option :key="0" label="请选择" :value="0"></el-option>
608
               <el-option :key="0" label="请选择" :value="0"></el-option>
609
               <el-option
609
               <el-option
681
             </el-form-item>
681
             </el-form-item>
682
         </el-col>
682
         </el-col>
683
       </el-form>
683
       </el-form>
684
-         
684
+
685
 
685
 
686
       <span slot="footer" class="dialog-footer">
686
       <span slot="footer" class="dialog-footer">
687
         <el-button @click="hide">取 消</el-button>
687
         <el-button @click="hide">取 消</el-button>
1215
       this.form.observation_content = predialysis.observation_content
1215
       this.form.observation_content = predialysis.observation_content
1216
       this.form.inpatient_department = predialysis.inpatient_department
1216
       this.form.inpatient_department = predialysis.inpatient_department
1217
       this.form.observation_content_other = predialysis.observation_content_other
1217
       this.form.observation_content_other = predialysis.observation_content_other
1218
+      if(predialysis.id > 0){
1219
+        this.form.hypertenison = predialysis.hypertenison.toString()
1220
+      }
1221
+      if(predialysis.id > 0){
1222
+        this.form.hypopiesia = predialysis.hypopiesia.toString()
1223
+      }
1218
       if(predialysis.id > 0){
1224
       if(predialysis.id > 0){
1219
          this.form.hypertenison = predialysis.hypertenison.toString()
1225
          this.form.hypertenison = predialysis.hypertenison.toString()
1220
       }
1226
       }
1221
       if(predialysis.id > 0){
1227
       if(predialysis.id > 0){
1222
         this.form.hypopiesia = predialysis.hypopiesia.toString()
1228
         this.form.hypopiesia = predialysis.hypopiesia.toString()
1223
       }
1229
       }
1224
-    
1225
-    
1230
+
1231
+
1226
       this.form.leave_office_method = predialysis.leave_office_method
1232
       this.form.leave_office_method = predialysis.leave_office_method
1227
       this.form.lapse = predialysis.lapse
1233
       this.form.lapse = predialysis.lapse
1228
       // console.log("透后", predialysis);
1234
       // console.log("透后", predialysis);

+ 2 - 2
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Zobrazit soubor

325
             </el-form-item>
325
             </el-form-item>
326
           </el-col>
326
           </el-col>
327
 
327
 
328
-          <el-col :span="8" v-if="isShows('葡萄糖')">
328
+          <!-- <el-col :span="8" v-if="isShows('葡萄糖')">
329
             <el-form-item label="葡萄糖(mmol/L):">
329
             <el-form-item label="葡萄糖(mmol/L):">
330
               <el-input
330
               <el-input
331
                 type="number"
331
                 type="number"
332
                 v-model="dialysisPrescription.glucose"
332
                 v-model="dialysisPrescription.glucose"
333
               ></el-input>
333
               ></el-input>
334
             </el-form-item>
334
             </el-form-item>
335
-          </el-col>
335
+          </el-col> -->
336
           <el-col :span="8" v-if="isShows('透析液流量')">
336
           <el-col :span="8" v-if="isShows('透析液流量')">
337
             <el-form-item label="透析液流量(ml/min):">
337
             <el-form-item label="透析液流量(ml/min):">
338
               <el-input
338
               <el-input

+ 26 - 9
src/xt_pages/dialysis/details/dialog/doubleCheckDialog.vue Zobrazit soubor

2
   <el-dialog title="双人核对"
2
   <el-dialog title="双人核对"
3
              :visible.sync="isVisibility"
3
              :visible.sync="isVisibility"
4
              :modal-append-to-body="false"
4
              :modal-append-to-body="false"
5
-             width="854px">
5
+             width="854px"
6
+            >
6
 
7
 
7
     <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
8
     <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
8
       
9
       
202
         blood_access_part_opera_id:"通路类型:"
203
         blood_access_part_opera_id:"通路类型:"
203
       }
204
       }
204
     }, methods: {
205
     }, methods: {
206
+      
205
       show() {
207
       show() {
206
-        console.log(this.double_check)
207
-
208
+        
208
         this.isVisibility = true
209
         this.isVisibility = true
209
         if (this.double_check.id > 0) {
210
         if (this.double_check.id > 0) {
210
 
211
 
252
         }
253
         }
253
       },
254
       },
254
       hide() {
255
       hide() {
256
+      
255
         this.isVisibility = false
257
         this.isVisibility = false
256
       },
258
       },
257
       handleCancle: function() {
259
       handleCancle: function() {
260
+      
258
         this.isVisibility = false
261
         this.isVisibility = false
259
 
262
 
260
       }, 
263
       }, 
776
       GetDialysateFormulationById(val) {
779
       GetDialysateFormulationById(val) {
777
          this.dialysate_formulation_options = getDataConfig('hemodialysis','dialysate_formulation')
780
          this.dialysate_formulation_options = getDataConfig('hemodialysis','dialysate_formulation')
778
          console.log("透析液配方",this.dialysate_formulation_options)
781
          console.log("透析液配方",this.dialysate_formulation_options)
782
+        
779
         let name = ''
783
         let name = ''
780
         let dfl = this.dialysate_formulation_options.length
784
         let dfl = this.dialysate_formulation_options.length
781
         for (let index = 0; index < dfl; index++) {
785
         for (let index = 0; index < dfl; index++) {
924
     },
928
     },
925
     watch: {
929
     watch: {
926
       isVisibility(val) {
930
       isVisibility(val) {
927
-      
931
+        
928
         if(this.prescription!=null && this.prescription.id!=0){
932
         if(this.prescription!=null && this.prescription.id!=0){
933
+
929
           this.diazes = this.diazes + this.prescription.dialyzer_perfusion_apparatus
934
           this.diazes = this.diazes + this.prescription.dialyzer_perfusion_apparatus
935
+          this.prescription.dialyzer_perfusion_apparatus = ""
930
           this.dialysate_formulation = this.dialysate_formulation + this.GetDialysateFormulationById(this.prescription.dialysate_formulation)
936
           this.dialysate_formulation = this.dialysate_formulation + this.GetDialysateFormulationById(this.prescription.dialysate_formulation)
931
-         
937
+          // this.prescription.dialysate_formulation = ""
932
           this.kalium = this.kalium + (this.prescription.kalium?this.prescription.kalium:"")
938
           this.kalium = this.kalium + (this.prescription.kalium?this.prescription.kalium:"")
933
-         
939
+          this.prescription.kalium = ""
934
           this.calcium = this.calcium + (this.prescription.calcium?this.prescription.calcium:"")
940
           this.calcium = this.calcium + (this.prescription.calcium?this.prescription.calcium:"")
941
+          this.prescription.calcium = ""
935
           this.dialys_mode = this.dialys_mode + this.getMode(this.prescription.mode_id)
942
           this.dialys_mode = this.dialys_mode + this.getMode(this.prescription.mode_id)
936
-          this.long_time = this.long_time + (this.prescription.dialysis_duration?this.prescription.dialysate_formulation:"")
943
+          this.prescription.mode_id= ""
944
+          this.long_time = this.long_time + (this.prescription.dialysis_duration?this.prescription.dialysis_duration:"")
945
+          this.prescription.dialysis_duration=""
937
           this.target_ultrafiltration = this.target_ultrafiltration + (this.prescription.target_ultrafiltration?this.prescription.target_ultrafiltration:"")
946
           this.target_ultrafiltration = this.target_ultrafiltration + (this.prescription.target_ultrafiltration?this.prescription.target_ultrafiltration:"")
947
+          this.prescription.target_ultrafiltration = ""
938
           this.anticoagulant = this.anticoagulant + this.getAnticoagulant(this.prescription.anticoagulant)
948
           this.anticoagulant = this.anticoagulant + this.getAnticoagulant(this.prescription.anticoagulant)
949
+          this.prescription.anticoagulant=""
939
           this.anticoagulant_shouji = this.anticoagulant_shouji + (this.prescription.anticoagulant_shouji?this.prescription.anticoagulant_shouji:"")
950
           this.anticoagulant_shouji = this.anticoagulant_shouji + (this.prescription.anticoagulant_shouji?this.prescription.anticoagulant_shouji:"")
951
+          this.prescription.anticoagulant_shouji = ""
940
           this.anticoagulant_weichi = this.anticoagulant_weichi + (this.prescription.anticoagulant_weichi?this.prescription.anticoagulant_weichi:"")
952
           this.anticoagulant_weichi = this.anticoagulant_weichi + (this.prescription.anticoagulant_weichi?this.prescription.anticoagulant_weichi:"")
941
-          this.anticoagulant_zongliang = this.anticoagulant_zongliang+(this.prescription.anticoagulant_zongliang?this.prescription.anticoagulant_zongliang:"")
942
-          this.displace_liqui_part = this.displace_liqui_part + (this.prescription.displace_liqui_part?this.prescription.displace_liqui_part:"")
953
+         this.prescription.anticoagulant_weichi=""
954
+         this.anticoagulant_zongliang = this.anticoagulant_zongliang+(this.prescription.anticoagulant_zongliang?this.prescription.anticoagulant_zongliang:"")
955
+         this.prescription.anticoagulant_zongliang = ""
956
+         this.displace_liqui_part = this.displace_liqui_part + (this.prescription.displace_liqui_part?this.prescription.displace_liqui_part:"")
957
+          this.prescription.displace_liqui_part
943
           this.replacement_total = this.replacement_total + (this.prescription.replacement_total?this.prescription.replacement_total:"")
958
           this.replacement_total = this.replacement_total + (this.prescription.replacement_total?this.prescription.replacement_total:"")
959
+          this.prescription.replacement_total= ""
944
           this.dialysate_flow = this.dialysate_flow + (this.prescription.dialysate_flow?this.prescription.dialysate_flow:"")
960
           this.dialysate_flow = this.dialysate_flow + (this.prescription.dialysate_flow?this.prescription.dialysate_flow:"")
961
+          this.prescription.dialysate_flow= ""
945
         }
962
         }
946
         if(this.predialysis_evaluation!=null && this.predialysis_evaluation.id!=0){
963
         if(this.predialysis_evaluation!=null && this.predialysis_evaluation.id!=0){
947
           this.puncture_needle = this.puncture_needle + this.predialysis_evaluation.puncture_needle
964
           this.puncture_needle = this.puncture_needle + this.predialysis_evaluation.puncture_needle

+ 2 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue Zobrazit soubor

176
                     <td width="100">体液过多症状:</td>
176
                     <td width="100">体液过多症状:</td>
177
                     <td width="50">
177
                     <td width="50">
178
                       <div>
178
                       <div>
179
-                        <label-box :isChecked="predialysis.humor_excessive_symptom ? getHumorExcessiveSymptom(predialysis.humor_excessive_symptom).indexOf('无') > -1 : false" showValue="无"></label-box>
179
+                         <label-box :isChecked="prescription.body_fluid == 1 ? true : false" showValue="无"></label-box>
180
+                        <!-- <label-box :isChecked="predialysis.humor_excessive_symptom ? getHumorExcessiveSymptom(predialysis.humor_excessive_symptom).indexOf('无') > -1 : false" showValue="无"></label-box> -->
180
                       </div>
181
                       </div>
181
                     </td>
182
                     </td>
182
                     <td width="180">
183
                     <td width="180">

+ 3 - 6
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Zobrazit soubor

715
                   that.loadingtwo = false;
715
                   that.loadingtwo = false;
716
                   that.cal_one = this.cal_one - 1;
716
                   that.cal_one = this.cal_one - 1;
717
                   that.cal_two = this.cal_two + 1;
717
                   that.cal_two = this.cal_two + 1;
718
-                  that.patientTableData.splice(this.current_index, 1)
718
+                  // that.patientTableData.splice(this.current_index, 1)
719
 
719
 
720
 
720
 
721
                 }
721
                 }
2023
         console.log(id);
2023
         console.log(id);
2024
         this.radioStatus = id;
2024
         this.radioStatus = id;
2025
         this.getPatientList()
2025
         this.getPatientList()
2026
-      },      changeRadioAndPatient(id) {
2026
+      },   changeRadioAndPatient(id) {
2027
         // console.log(id)
2027
         // console.log(id)
2028
         // this.radioStatus = id
2028
         // this.radioStatus = id
2029
         // this.getPatientList()
2029
         // this.getPatientList()
2169
             for (let i = 0; i < this.patientTableData.length; i++){
2169
             for (let i = 0; i < this.patientTableData.length; i++){
2170
               if(this.patientInfo.id == this.patientTableData[i].id)
2170
               if(this.patientInfo.id == this.patientTableData[i].id)
2171
               this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2171
               this.$refs.tab.setCurrentRow(this.patientTableData[i]);
2172
-              this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number,this.patientTableData[0].his_patient.id)
2172
+              this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number,this.patientTableData[i].his_patient.id)
2173
             }
2173
             }
2174
 
2174
 
2175
           }
2175
           }
2625
           'type': this.radio,
2625
           'type': this.radio,
2626
           'p_type':2,
2626
           'p_type':2,
2627
           'his_patient_id':his_patient_id
2627
           'his_patient_id':his_patient_id
2628
-
2629
-
2630
-
2631
         };
2628
         };
2632
         this.loading = true;
2629
         this.loading = true;
2633
 
2630
 

+ 17 - 1
src/xt_pages/outpatientCharges/summary.vue Zobrazit soubor

487
                     }
487
                     }
488
                 }
488
                 }
489
               }
489
               }
490
+              var hifmi_pay = 0.00;
491
+
492
+              if(order.setl_detail.length > 0){
493
+                var jsonObj = JSON.parse(order.setl_detail);
494
+                for (let i = 0; i < jsonObj.length; i++) {
495
+                  if (order.insutype == '310') {
496
+                    if (jsonObj[i].fund_pay_type == '310300') {
497
+                      hifmi_pay = jsonObj[i].fund_payamt
498
+                    }
499
+                  }
500
+                  if (order.insutype == '390')
501
+                    if (jsonObj[i].fund_pay_type == '390200') {
502
+                      hifmi_pay = jsonObj[i].fund_payamt
503
+                    }
504
+                }
505
+              }
490
 
506
 
491
               let obj = {
507
               let obj = {
492
                 '就诊号': order.mdtrt_id,
508
                 '就诊号': order.mdtrt_id,
495
                 '险种类型': insutypeName,
511
                 '险种类型': insutypeName,
496
                 '应收金额': order.medfee_sumamt,
512
                 '应收金额': order.medfee_sumamt,
497
                 '实收金额': order.medfee_sumamt,
513
                 '实收金额': order.medfee_sumamt,
498
-                '医保统筹金额': order.fund_pay_sumamt,
514
+                '医保统筹金额': order.hifp_pay,
499
                 '大额基金金额': order.hifob_pay,
515
                 '大额基金金额': order.hifob_pay,
500
                 '大病基金金额': hifmi_pay,
516
                 '大病基金金额': hifmi_pay,
501
                 '补充保险基金金额': order.hifes_pay,
517
                 '补充保险基金金额': order.hifes_pay,

+ 19 - 10
src/xt_pages/stock/detail/print.vue Zobrazit soubor

81
               <td width="633" style="line-height: 50px">合计</td>
81
               <td width="633" style="line-height: 50px">合计</td>
82
               <td width="80" style="line-height: 50px">
82
               <td width="80" style="line-height: 50px">
83
                 <span v-if="type == 1">{{calTotalPrice()}}</span>
83
                 <span v-if="type == 1">{{calTotalPrice()}}</span>
84
-                <span v-if="type == 3">{{getTotalPrice().toFixed(2)}}</span>
84
+                <span v-if="type == 3 && org_id!=10090">{{getTotalPrice().toFixed(2)}}</span>
85
+                <span v-if="type == 3 && org_id==10090">{{getTotalPriceOne().toFixed(2)}}</span>
85
               </td>
86
               </td>
86
               <td></td>
87
               <td></td>
87
             </tr>
88
             </tr>
186
         getPrintStockGood(this.queryParams).then(response => {
187
         getPrintStockGood(this.queryParams).then(response => {
187
           if (response.data.state == 1) {
188
           if (response.data.state == 1) {
188
             var stockTotal = response.data.data.stockTotal
189
             var stockTotal = response.data.data.stockTotal
189
-            console.log("stocktOTl",stockTotal)
190
+          
190
             this.stockTotal = stockTotal
191
             this.stockTotal = stockTotal
191
-            console.log("导出数据",response.data.data.list)
192
+           
192
             var info = response.data.data.info
193
             var info = response.data.data.info
193
-            console.log("infor2222222",info)
194
+           
194
             this.wareOutInfo = info
195
             this.wareOutInfo = info
195
             var org_id = response.data.data.orgid
196
             var org_id = response.data.data.orgid
196
-            console.log("org_id",org_id)
197
+          
197
             this.org_id = org_id
198
             this.org_id = org_id
198
 
199
 
199
             var informationlist = response.data.data.infomationList
200
             var informationlist = response.data.data.infomationList
200
-            console.log('数据列表',informationlist)
201
+           
201
             this.informationList = informationlist
202
             this.informationList = informationlist
202
             this.stockDatas = []
203
             this.stockDatas = []
203
             for (let i = 0; i < response.data.data.list.length; i++) {
204
             for (let i = 0; i < response.data.data.list.length; i++) {
205
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
206
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
206
                   this.stockDatas.push(response.data.data.list[i])
207
                   this.stockDatas.push(response.data.data.list[i])
207
                 }
208
                 }
208
-
209
+                console.log("入库打印数据源",this.stockDatas)
209
               } else if (this.type == 2) {
210
               } else if (this.type == 2) {
210
                 if (response.data.data.list[i].query_sales_return_info.length > 0) {
211
                 if (response.data.data.list[i].query_sales_return_info.length > 0) {
211
                   this.stockDatas.push(response.data.data.list[i])
212
                   this.stockDatas.push(response.data.data.list[i])
218
                 }
219
                 }
219
                
220
                
220
                 console.log("出库打印数据源",this.stockDatas)
221
                 console.log("出库打印数据源",this.stockDatas)
222
+
221
                 
223
                 
222
               } else if (this.type == 4) {
224
               } else if (this.type == 4) {
223
                 if (response.data.data.list[i].query_cancel_stock_info.length > 0) {
225
                 if (response.data.data.list[i].query_cancel_stock_info.length > 0) {
373
        for(let i=0;i<this.informationList.length;i++){
375
        for(let i=0;i<this.informationList.length;i++){
374
         for(let j=0;j<this.wareOutInfo.length;j++){
376
         for(let j=0;j<this.wareOutInfo.length;j++){
375
            if(this.informationList[i].id == this.wareOutInfo[j].good_id){
377
            if(this.informationList[i].id == this.wareOutInfo[j].good_id){
376
-             this.wareOutInfo[j].retail_price =  this.informationList[i].retail_price 
378
+             this.wareOutInfo[j].buy_price =  this.informationList[i].buy_price 
377
            }
379
            }
378
         }
380
         }
379
        }
381
        }
380
       
382
       
381
        for(let j=0;j<this.wareOutInfo.length;j++){
383
        for(let j=0;j<this.wareOutInfo.length;j++){
382
          if(id == this.wareOutInfo[j].good_id){
384
          if(id == this.wareOutInfo[j].good_id){
383
-            sum += (this.wareOutInfo[j].retail_price * this.wareOutInfo[j].count).toFixed(2)
385
+            sum += (this.wareOutInfo[j].buy_price * this.wareOutInfo[j].count).toFixed(2)
384
          }
386
          }
385
        }
387
        }
386
        
388
        
391
        var price = 0
393
        var price = 0
392
        for(let i=0;i<this.informationList.length;i++){
394
        for(let i=0;i<this.informationList.length;i++){
393
           if(id == this.informationList[i].id){
395
           if(id == this.informationList[i].id){
394
-             price = this.informationList[i].retail_price
396
+             price = this.informationList[i].buy_price
395
           }
397
           }
396
        }
398
        }
397
        return price
399
        return price
403
        }
405
        }
404
        return total_price
406
        return total_price
405
      },
407
      },
408
+     getTotalPriceOne(){
409
+       var total_price = 0
410
+       for(let i=0;i<this.stockDatas.length;i++){
411
+         total_price +=(this.getWareOut(this.stockDatas[i].id) * this.getReailPrice(this.stockDatas[i].id))
412
+       }
413
+       return total_price
414
+     },
406
      unique(arr) {
415
      unique(arr) {
407
         const res = new Map();
416
         const res = new Map();
408
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
417
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));

+ 54 - 27
src/xt_pages/stock/detail/stockInDetail.vue Zobrazit soubor

235
     this.goodUnit = this.$store.getters.good_unit
235
     this.goodUnit = this.$store.getters.good_unit
236
 
236
 
237
     this.getPrintStockGood()
237
     this.getPrintStockGood()
238
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
239
+    console.log("机构ID",this.org_id)
238
   },
240
   },
239
   data() {
241
   data() {
240
     return {
242
     return {
268
       dealer: [],
270
       dealer: [],
269
       tableList:[],
271
       tableList:[],
270
       goodUnit:[],
272
       goodUnit:[],
271
-      stockTotal:[]
273
+      stockTotal:[],
274
+      org_id:0,
272
     };
275
     };
273
   },
276
   },
274
   methods: {
277
   methods: {
389
           return false;
392
           return false;
390
         } else {
393
         } else {
391
           this.total = response.data.data.total;
394
           this.total = response.data.data.total;
392
-          console.log("数据源头list2222222",response.data.data.list)
393
-
394
           for (let i = 0; i < response.data.data.list.length; i++) {
395
           for (let i = 0; i < response.data.data.list.length; i++) {
395
             var obj = response.data.data.list[i];
396
             var obj = response.data.data.list[i];
396
             obj["is_total"] = 0;
397
             obj["is_total"] = 0;
397
             this.cancelStockDate.push(obj);
398
             this.cancelStockDate.push(obj);
398
-            // this.tableList.push(obj)
399
           }
399
           }
400
           this.cancelStockDate.push({
400
           this.cancelStockDate.push({
401
             warehousing_order: "合计",
401
             warehousing_order: "合计",
439
           var alen = this.adminUserOptions.length;
439
           var alen = this.adminUserOptions.length;
440
           for (let index = 0; index < alen; index++) {
440
           for (let index = 0; index < alen; index++) {
441
             if (this.adminUserOptions[index].user_type == 2) {
441
             if (this.adminUserOptions[index].user_type == 2) {
442
-              // this.doctorOptions.push(this.adminUserOptions[index]);
442
+            
443
             }
443
             }
444
           }
444
           }
445
         }
445
         }
642
        end_time:this.end_time,
642
        end_time:this.end_time,
643
        type:1,
643
        type:1,
644
      }
644
      }
645
-   
645
+     
646
      getPrintStockGood(params).then(response=>{
646
      getPrintStockGood(params).then(response=>{
647
         if(response.data.state == 1){
647
         if(response.data.state == 1){
648
+          this.tableList = []
648
           var stockTotal =  response.data.data.stockTotal
649
           var stockTotal =  response.data.data.stockTotal
649
         
650
         
650
           this.stockTotal = stockTotal
651
           this.stockTotal = stockTotal
655
                this.tableList.push(list[i])
656
                this.tableList.push(list[i])
656
              }
657
              }
657
           }
658
           }
658
-         
659
-       
660
-       
659
+          console.log("数据源头2222222222",this.tableList)
661
         }
660
         }
662
      })
661
      })
663
    },
662
    },
727
         const res = new Map();
726
         const res = new Map();
728
         return arr.filter((arr) => !res.has(arr.specification_name) && res.set(arr.specification_name, 1));
727
         return arr.filter((arr) => !res.has(arr.specification_name) && res.set(arr.specification_name, 1));
729
       },
728
       },
729
+      uniqueOne(arr) {
730
+        const res = new Map();
731
+        return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
732
+      },
733
+      
730
       exportList(){
734
       exportList(){
731
         var obj = {index:"合计",total:0}
735
         var obj = {index:"合计",total:0}
732
         obj.total = this.calTotalPrice()
736
         obj.total = this.calTotalPrice()
740
           this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
744
           this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
741
 
745
 
742
         }
746
         }
743
-        var arr = this.unique(this.tableList)
744
-        console.log("arrrr",arr)
745
-        this.tableList = arr
746
-        this.tableList.push(obj)
747
-        console.log("数据222222",this.tableList)
748
-      
749
-        import('@/vendor/Export2Excel').then(excel => {
750
-        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
751
-        const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
747
+        console.log("总共条数",this.tableList)
748
+        if(this.org_id == 10024){
749
+          var arr = this.uniqueOne(this.tableList)
750
+          this.tableList = arr
751
+          this.tableList.push(obj)
752
+          console.log("去重后条数",this.tableList)
752
         
753
         
753
-        const data = this.formatJson(filterVal, this.tableList)
754
-        
755
-          excel.export_json_to_excel({
756
-            header: tHeader,
757
-            data,
758
-            filename: '耗材入库明细'
759
-          })
760
-            this.downloadLoading = false
761
-          })
754
+          import('@/vendor/Export2Excel').then(excel => {
755
+          const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
756
+          const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
757
+          
758
+          const data = this.formatJson(filterVal, this.tableList)
759
+          console.log("data222222222",data)
760
+            excel.export_json_to_excel({
761
+              header: tHeader,
762
+              data,
763
+              filename: '耗材入库明细'
764
+            })
765
+              this.downloadLoading = false
766
+            })
767
+        }
768
+        if(this.org_id !=10024){
769
+           var arr = this.unique(this.tableList)
770
+            this.tableList = arr
771
+            this.tableList.push(obj)
772
+            console.log("去重后条数",this.tableList)
773
+          
774
+            import('@/vendor/Export2Excel').then(excel => {
775
+            const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
776
+            const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
777
+            
778
+            const data = this.formatJson(filterVal, this.tableList)
779
+            console.log("data222222222",data)
780
+              excel.export_json_to_excel({
781
+                header: tHeader,
782
+                data,
783
+                filename: '耗材入库明细'
784
+              })
785
+                this.downloadLoading = false
786
+              })
787
+        }
788
+     
762
         },
789
         },
763
      formatJson(filterVal, jsonData) {
790
      formatJson(filterVal, jsonData) {
764
         return jsonData.map(v => filterVal.map(j => v[j]));
791
         return jsonData.map(v => filterVal.map(j => v[j]));

+ 4 - 5
src/xt_pages/stock/detail/stockOutDetail.vue Zobrazit soubor

743
       },
743
       },
744
 
744
 
745
      exportList(){
745
      exportList(){
746
-      console.log("数据22222",this.tableList)
747
-      console.log("数据3333",this.goodInfoData)
746
+      
748
       for(let i=0;i<this.tableList.length;i++){
747
       for(let i=0;i<this.tableList.length;i++){
749
          for(let j=0;j<this.goodInfoData.length;j++){
748
          for(let j=0;j<this.goodInfoData.length;j++){
750
             if(this.tableList[i].id === this.goodInfoData[j].id){
749
             if(this.tableList[i].id === this.goodInfoData[j].id){
751
-               this.tableList[i].retail_price = this.goodInfoData[j].retail_price
750
+               this.tableList[i].buy_price = this.goodInfoData[j].buy_price
752
             }
751
             }
753
          }
752
          }
754
       }
753
       }
760
         this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
759
         this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
761
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
760
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
762
         // this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].buy_price
761
         // this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].buy_price
763
-        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].retail_price).toFixed(2)
762
+        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
764
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
763
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
765
        }
764
        }
766
        var arr = this.unique(this.tableList)
765
        var arr = this.unique(this.tableList)
769
        this.tableList.push(obj)
768
        this.tableList.push(obj)
770
        import('@/vendor/Export2Excel').then(excel => {
769
        import('@/vendor/Export2Excel').then(excel => {
771
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
770
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
772
-       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','retail_price','total','remark']
771
+       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','buy_price','total','remark']
773
 
772
 
774
        const data = this.formatJson(filterVal, this.tableList)
773
        const data = this.formatJson(filterVal, this.tableList)
775
        console.log("data",data)
774
        console.log("data",data)

+ 9 - 3
src/xt_pages/stock/drugs/components/drugOutDetail.vue Zobrazit soubor

456
         for(let i=0;i<this.tableList.length;i++){
456
         for(let i=0;i<this.tableList.length;i++){
457
           for(let j=0;j<this.drugList.length;j++){
457
           for(let j=0;j<this.drugList.length;j++){
458
              if(this.tableList[i].drug_id == this.drugList[j].id){
458
              if(this.tableList[i].drug_id == this.drugList[j].id){
459
-               this.tableList[i].retail_price = this.drugList[j].retail_price
459
+               this.tableList[i].last_price = this.drugList[j].last_price
460
+               
460
              }
461
              }
461
           }
462
           }
462
           this.tableList[i].index = i+1
463
           this.tableList[i].index = i+1
463
         }
464
         }
465
+        for(let i=0;i<this.tableList.length;i++){
466
+           this.tableList[i].total_price = this.tableList[i].last_price * this.tableList[i].count
467
+        }
468
+       console.log("列表数据333333333",this.tableList)
469
+      
464
        import('@/vendor/Export2Excel').then(excel => {
470
        import('@/vendor/Export2Excel').then(excel => {
465
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
471
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
466
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','retail_price','total_price','remark']
472
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','last_price','total_price','remark']
467
        let obj = {'index':'合计','total_price':0}
473
        let obj = {'index':'合计','total_price':0}
468
        for(let i=0;i<this.tableList.length;i++){
474
        for(let i=0;i<this.tableList.length;i++){
469
-         obj.total_price += this.tableList[i].retail_price * this.tableList[i].count
475
+         obj.total_price += (this.tableList[i].last_price * this.tableList[i].count)
470
        }
476
        }
471
        for(let j=0;j<this.tableList.length;j++){
477
        for(let j=0;j<this.tableList.length;j++){
472
           this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
478
           this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)

+ 2 - 2
src/xt_pages/stock/drugs/drugCancelDetailPrint.vue Zobrazit soubor

56
             <tbody>
56
             <tbody>
57
             <tr>
57
             <tr>
58
               <td width="633" style="line-height: 50px">合计</td>
58
               <td width="633" style="line-height: 50px">合计</td>
59
-              <td width="80" style="line-height: 50px">{{getTotal()}}</td>
59
+              <td width="80" style="line-height: 50px">{{getTotal().toFixed(2)}}</td>
60
               <td></td>
60
               <td></td>
61
             </tr>
61
             </tr>
62
 
62
 
172
       getTotal(){
172
       getTotal(){
173
          var total = 0
173
          var total = 0
174
          for(let i=0;i<this.cancelStockDate.length;i++){
174
          for(let i=0;i<this.cancelStockDate.length;i++){
175
-            total += this.cancelStockDate[i].price
175
+            total += this.cancelStockDate[i].price*this.cancelStockDate[i].count 
176
          }
176
          }
177
          return total
177
          return total
178
       }
178
       }

+ 2 - 2
src/xt_pages/stock/drugs/drugCancelOurderPrint.vue Zobrazit soubor

55
             <tbody>
55
             <tbody>
56
             <tr>
56
             <tr>
57
               <td width="633" style="line-height: 50px">合计</td>
57
               <td width="633" style="line-height: 50px">合计</td>
58
-              <td width="80" style="line-height: 50px">{{getTotal()}}</td>
58
+              <td width="80" style="line-height: 50px">{{getTotal().toFixed(2)}}</td>
59
               <td></td>
59
               <td></td>
60
             </tr>
60
             </tr>
61
 
61
 
171
       getTotal(){
171
       getTotal(){
172
          var total = 0
172
          var total = 0
173
          for(let i=0;i<this.cancelStockDate.length;i++){
173
          for(let i=0;i<this.cancelStockDate.length;i++){
174
-            total += this.cancelStockDate[i].price
174
+            total += this.cancelStockDate[i].price*this.cancelStockDate[i].count
175
          }
175
          }
176
          return total
176
          return total
177
       }
177
       }

+ 2 - 1
src/xt_pages/stock/drugs/drugOutOrderPrint.vue Zobrazit soubor

168
         limit:this.limit,
168
         limit:this.limit,
169
         page:this.page,
169
         page:this.page,
170
        }
170
        }
171
+       console.log("出库数据22222",params)
171
       getDrugOutDetail(params).then(response=>{
172
       getDrugOutDetail(params).then(response=>{
172
         if(response.data.state == 1){
173
         if(response.data.state == 1){
173
           var drugInOrder = response.data.data.order
174
           var drugInOrder = response.data.data.order
249
         var price = 0
250
         var price = 0
250
         for(let i=0;i<this.drugList.length;i++){
251
         for(let i=0;i<this.drugList.length;i++){
251
           if(id == this.drugList[i].id){
252
           if(id == this.drugList[i].id){
252
-             price = this.drugList[i].retail_price
253
+             price = this.drugList[i].last_price
253
           }
254
           }
254
         }
255
         }
255
         return price
256
         return price

+ 2 - 2
src/xt_pages/stock/drugs/drugQueryPrint.vue Zobrazit soubor

93
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
93
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
94
         start_time: '',
94
         start_time: '',
95
         end_time: '',
95
         end_time: '',
96
-        page: 1,
97
-        limit: 10000,
96
+        page: this.$route.query.page,
97
+        limit: this.$route.query.limit,
98
         goodType: [],
98
         goodType: [],
99
         goodInfo: [],
99
         goodInfo: [],
100
         tempArr: [],
100
         tempArr: [],

+ 15 - 11
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Zobrazit soubor

10
         <div class="dialysis-print-order">
10
         <div class="dialysis-print-order">
11
           <div style="font-size:22px;font-weight:bold;text-align:center;">{{ orgName }}</div>
11
           <div style="font-size:22px;font-weight:bold;text-align:center;">{{ orgName }}</div>
12
           <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
12
           <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
13
-         
13
+
14
           <div style="float: right;margin-bottom: 1px;">{{getDateTwo()}}</div>
14
           <div style="float: right;margin-bottom: 1px;">{{getDateTwo()}}</div>
15
 
15
 
16
           <table class="print-table" border="1">
16
           <table class="print-table" border="1">
22
               <td style="line-height:18px;" width="80">生产<br>厂商</td>
22
               <td style="line-height:18px;" width="80">生产<br>厂商</td>
23
               <td style="line-height:18px;" width="80">单位</td>
23
               <td style="line-height:18px;" width="80">单位</td>
24
               <td style="line-height:18px;" width="80">进货价</td>
24
               <td style="line-height:18px;" width="80">进货价</td>
25
-              <td style="line-height:18px;" width="80">入库<br>数量</td> 
25
+              <td style="line-height:18px;" width="80">入库<br>数量</td>
26
               <td style="line-height:18px;" width="60">总价</td>
26
               <td style="line-height:18px;" width="60">总价</td>
27
               <td style="line-height:18px;" width="80">批号</td>
27
               <td style="line-height:18px;" width="80">批号</td>
28
               <td style="line-height:18px;" width="120">生产日期</td>
28
               <td style="line-height:18px;" width="120">生产日期</td>
50
               <td style="line-height: 18px">
50
               <td style="line-height: 18px">
51
                    <span>{{ item.warehousing_count }}</span>
51
                    <span>{{ item.warehousing_count }}</span>
52
               </td>
52
               </td>
53
-              
53
+
54
               <td style="line-height:18px">
54
               <td style="line-height:18px">
55
                   <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
55
                   <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
56
               </td>
56
               </td>
66
             </tr>
66
             </tr>
67
             </tbody>
67
             </tbody>
68
           </table>
68
           </table>
69
-        
70
 
69
 
71
-          <div style="display:flex;margin-top:1px;float:right;">
70
+          <div style="display:flex;margin-top:1px;float:right;" v-if="orgId == 10024">
72
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
71
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
73
-            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
74
             <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
72
             <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
75
             <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
73
             <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
76
             <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
74
             <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
77
           </div>
75
           </div>
76
+          <div style="display:flex;margin-top:1px;float:right;" v-if="orgId !=10024">
77
+            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
78
+            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
79
+            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
80
+            <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
81
+          </div>
78
         </div>
82
         </div>
79
 
83
 
80
       </div>
84
       </div>
165
         }
169
         }
166
         return ''
170
         return ''
167
       },
171
       },
168
-     
172
+
169
       printThisPage() {
173
       printThisPage() {
170
         var ptime = Math.round(new Date().getTime() / 1000)
174
         var ptime = Math.round(new Date().getTime() / 1000)
171
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
175
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
177
           scanStyles: false
181
           scanStyles: false
178
         })
182
         })
179
       },
183
       },
180
-   
184
+
181
       getUnit(id){
185
       getUnit(id){
182
         var name = ""
186
         var name = ""
183
         for(let i=0;i<this.goodUnit.length;i++){
187
         for(let i=0;i<this.goodUnit.length;i++){
229
             for (let i = 0; i < response.data.data.list.length; i++) {
233
             for (let i = 0; i < response.data.data.list.length; i++) {
230
               this.list.push(response.data.data.list[i])
234
               this.list.push(response.data.data.list[i])
231
             }
235
             }
232
-           
236
+
233
             for(let j=0;j<this.list.length;j++){
237
             for(let j=0;j<this.list.length;j++){
234
               this.list[j].manufacturer_name = ""
238
               this.list[j].manufacturer_name = ""
235
             }
239
             }
236
 
240
 
237
             for(let i=0;i<this.list.length;i++){
241
             for(let i=0;i<this.list.length;i++){
238
-           
242
+
239
               for(let j=0;j<this.manufacturer.length;j++){
243
               for(let j=0;j<this.manufacturer.length;j++){
240
                  if(this.list[i].manufacturer == this.manufacturer[j].id){
244
                  if(this.list[i].manufacturer == this.manufacturer[j].id){
241
                     this.list[i].manufacturer_name = this.manufacturer[j].manufacturer_name
245
                     this.list[i].manufacturer_name = this.manufacturer[j].manufacturer_name
331
       const order_id = this.$route.query.id;
335
       const order_id = this.$route.query.id;
332
       this.GetOrderDetail(order_id);
336
       this.GetOrderDetail(order_id);
333
       this.getList()
337
       this.getList()
334
-      
338
+
335
     }
339
     }
336
 
340
 
337
   }
341
   }

+ 55 - 5
src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue Zobrazit soubor

8
     <div class="app-container ">
8
     <div class="app-container ">
9
       <div id="dialysis-print-box">
9
       <div id="dialysis-print-box">
10
         <div class="dialysis-print-order">
10
         <div class="dialysis-print-order">
11
+         <div class="order-yy-name" style="font-weight:bold;">{{orgName}}</div>
12
+          <div class="order-title" style="font-weight:normal;">药品出库登记表</div>
11
          <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
13
          <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
14
           <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
13
 
15
 
47
              <td  style="line-height:50px">
49
              <td  style="line-height:50px">
48
                 {{(item.count * item.price).toFixed(2)}}
50
                 {{(item.count * item.price).toFixed(2)}}
49
              </td>
51
              </td>
50
-             <td></td>
51
-             <td></td>
52
-             <td></td>
52
+             <td>{{getNumber(item.drug_id)}}</td>
53
+             <td>{{getProductDate(item.drug_id)}}</td>
54
+             <td>{{getExpiryDate(item.drug_id)}}</td>
53
             </tr>
55
             </tr>
54
              <tr>
56
              <tr>
55
                <td style="line-height:50px">合计</td>
57
                <td style="line-height:50px">合计</td>
90
   import { jsGetAge, uParseTime } from '@/utils/tools'
92
   import { jsGetAge, uParseTime } from '@/utils/tools'
91
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
93
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
92
   import print from 'print-js'
94
   import print from 'print-js'
93
-  import {  getDrugWarehouseOutInfo } from '@/api/drug/drug_stock'
95
+  import {  getDrugWarehouseOutInfo,getDrugWarehouseOrderInfo } from '@/api/drug/drug_stock'
94
   import {getBaseDrugLibList} from '@/api/data'
96
   import {getBaseDrugLibList} from '@/api/data'
95
   export default {
97
   export default {
96
     name: 'dialysisPrintOrder',
98
     name: 'dialysisPrintOrder',
128
         limit:10000,
130
         limit:10000,
129
         keywords:"",
131
         keywords:"",
130
         orgId:'',
132
         orgId:'',
131
-        orgName:""
133
+        orgName:"",
134
+        drugOrderList:[]
132
       }
135
       }
133
     },
136
     },
134
     methods: {
137
     methods: {
256
         });
259
         });
257
         this.sameRowArr = sameRowArr
260
         this.sameRowArr = sameRowArr
258
       },
261
       },
262
+      getDrugWarehouseOrderInfo(){
263
+        getDrugWarehouseOrderInfo().then(response=>{
264
+           if(response.data.state == 1){
265
+             var list =  response.data.data.list
266
+             console.log("入库单详情",list)
267
+             this.drugOrderList = list
268
+           }
269
+        })
270
+      },
271
+      getNumber(id){
272
+        var number = ""
273
+        for(let i=0;i<this.drugOrderList.length;i++){
274
+          if(id == this.drugOrderList[i].drug_id){
275
+              number = this.drugOrderList[i].number
276
+          }
277
+        }
278
+        return number
279
+      },
280
+      getProductDate(id){
281
+        var product_date = ""
282
+        for(let i=0;i<this.drugOrderList.length;i++){
283
+           if(id == this.drugOrderList[i].drug_id){
284
+             product_date = this.drugOrderList[i].product_date
285
+           }
286
+        }
287
+        return this.getTime(product_date)
288
+      },
289
+      getExpiryDate(id){
290
+         var expiry_date = ""
291
+         for(let i=0;i<this.drugOrderList.length;i++){
292
+           if(id == this.drugOrderList[i].drug_id){
293
+             expiry_date = this.drugOrderList[i].expiry_date
294
+           }
295
+        }
296
+        return this.getTime(expiry_date)
297
+      },
298
+      getTime(val) {
299
+         if(val < 0){
300
+           return ""
301
+         }
302
+         if(val == ""){
303
+          return ""
304
+         }else {
305
+          return uParseTime(val, '{y}-{m}-{d}')
306
+         }
307
+      },
259
     },
308
     },
260
     created() {
309
     created() {
261
       this.orgName = this.$store.getters.xt_user.org.org_name;
310
       this.orgName = this.$store.getters.xt_user.org.org_name;
263
       this.orgId = this.$store.getters.xt_user.org.id;
312
       this.orgId = this.$store.getters.xt_user.org.id;
264
       this.GetOrderDetail(order_id);
313
       this.GetOrderDetail(order_id);
265
       this.getList()
314
       this.getList()
315
+      this.getDrugWarehouseOrderInfo()
266
     }
316
     }
267
 
317
 
268
   }
318
   }

+ 1 - 1
src/xt_pages/stock/drugs/query.vue Zobrazit soubor

455
       printOrder(){
455
       printOrder(){
456
         this.$router.push({
456
         this.$router.push({
457
           name: "drugQueryPrint",
457
           name: "drugQueryPrint",
458
-          query: {drug_category:this.drug_category,keyword:this.keywords,start_time:this.start_time,end_time:this.end_time}
458
+          query: {drug_category:this.drug_category,keyword:this.keywords,start_time:this.start_time,end_time:this.end_time,page:this.page,limit:this.limit}
459
         });
459
         });
460
       }
460
       }
461
     }
461
     }

+ 2 - 2
src/xt_pages/stock/stockOutOrderDetail.vue Zobrazit soubor

124
     created() {
124
     created() {
125
       const order_id = this.$route.query.id
125
       const order_id = this.$route.query.id
126
       const warehouse_out_time = this.$route.query.warehouse_out_time
126
       const warehouse_out_time = this.$route.query.warehouse_out_time
127
-      console.log("时间搓",warehouse_out_time)
127
+     
128
       this.GetConfigInfo()
128
       this.GetConfigInfo()
129
       this.GetOrderDetail(order_id)
129
       this.GetOrderDetail(order_id)
130
       this.GetTotalCount(warehouse_out_time)
130
       this.GetTotalCount(warehouse_out_time)
234
             }
234
             }
235
             this.warehousingOutInfo.info = response.data.data.info
235
             this.warehousingOutInfo.info = response.data.data.info
236
           
236
           
237
-            console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
237
+          
238
             this.handleSpanTempArr()
238
             this.handleSpanTempArr()
239
           }
239
           }
240
         })
240
         })

+ 58 - 5
src/xt_pages/stock/stockOutOrderDetailPrint.vue Zobrazit soubor

41
                                     <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td>
41
                                     <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td>
42
                                     <td>{{item.price}}</td>
42
                                     <td>{{item.price}}</td>
43
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
43
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
44
-                                    <td></td>
45
-                                    <td></td>
46
-                                    <td></td>
44
+                                    <td>{{getNumber(item.good_id)}}</td>
45
+                                    <td>{{getProductDate(item.good_id)}}</td>
46
+                                    <td>{{getExpiryDate(item.good_id)}}</td>
47
                                 </tr>
47
                                 </tr>
48
                                 <tr>
48
                                 <tr>
49
                                   <td>合计</td>
49
                                   <td>合计</td>
77
 
77
 
78
 <script>
78
 <script>
79
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
79
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
80
-import { GetAllConfig,getWarehouseOutInfo,GetOutStockTotalCount,getGoodInfoList } from "@/api/stock";
80
+import { GetAllConfig,getWarehouseOutInfo,GetOutStockTotalCount,getGoodInfoList,getWarehouseOrderInfoList } from "@/api/stock";
81
 import print from 'print-js'
81
 import print from 'print-js'
82
 const moment = require('moment');
82
 const moment = require('moment');
83
+import { uParseTime } from '@/utils/tools'
83
 export default {
84
 export default {
84
     components:{
85
     components:{
85
         BreadCrumb
86
         BreadCrumb
117
             wareoutList:[],
118
             wareoutList:[],
118
             orgId:'',
119
             orgId:'',
119
             orgName:'',
120
             orgName:'',
121
+            orderInList:[]
120
         }
122
         }
121
     },
123
     },
122
     methods:{
124
     methods:{
272
             }
274
             }
273
          }
275
          }
274
         return count
276
         return count
275
-      }
277
+      },
278
+
279
+      getWarehouseOrderInfoList(){
280
+         getWarehouseOrderInfoList().then(response=>{
281
+             if(response.data.state == 1){
282
+               var list = response.data.data.list
283
+               console.log("入库单详情",list)
284
+               this.orderInList = list
285
+             }
286
+         })
287
+      },
288
+      getNumber(id){
289
+        var name = ""
290
+        for(let i=0;i<this.orderInList.length;i++){
291
+           if(id == this.orderInList[i].good_id){
292
+               name = this.orderInList[i].number
293
+           }
294
+        }
295
+        return name
296
+      },
297
+      getProductDate(id){
298
+        var product_date = ""
299
+         for(let i=0;i<this.orderInList.length;i++){
300
+           if(id == this.orderInList[i].good_id){
301
+               product_date =  this.orderInList[i].product_date
302
+           }
303
+         }
304
+         return this.getTime(product_date)
305
+      },
306
+
307
+      getExpiryDate(id){
308
+         var expiry_date = ""
309
+         for(let i=0;i<this.orderInList.length;i++){
310
+           if(id == this.orderInList[i].good_id){
311
+              expiry_date = this.orderInList[i].expiry_date
312
+           }
313
+         }
314
+         return this.getTime(expiry_date)
315
+      },
316
+      getTime(val) {
317
+         if(val < 0){
318
+           return ""
319
+         }
320
+         if(val == ""){
321
+          return ""
322
+         }else {
323
+          return uParseTime(val, '{y}-{m}-{d}')
324
+         }
325
+      },
326
+
276
 
327
 
277
     },
328
     },
278
     created(){
329
     created(){
284
       this.GetOrderDetail(order_id);
335
       this.GetOrderDetail(order_id);
285
       this.GetTotalCount(warehouse_out_time);
336
       this.GetTotalCount(warehouse_out_time);
286
       this.getList()
337
       this.getList()
338
+      //获取所有入库单
339
+      this.getWarehouseOrderInfoList()
287
     }
340
     }
288
 }
341
 }
289
 </script>
342
 </script>

+ 4 - 3
src/xt_pages/stock/stockPrint.vue Zobrazit soubor

83
           tableData:[],
83
           tableData:[],
84
           time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
84
           time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
85
           type_name:"",
85
           type_name:"",
86
-          limit:20,
87
-          page:1,
86
+          limit:"",
87
+          page:"",
88
           WarehouseInfo: {
88
           WarehouseInfo: {
89
           loading: false,
89
           loading: false,
90
           warehouseInfoDate: []
90
           warehouseInfoDate: []
173
       this.type_name = type_name
173
       this.type_name = type_name
174
       var keyword = this.$route.query.keyword
174
       var keyword = this.$route.query.keyword
175
       this.keyword = keyword
175
       this.keyword = keyword
176
-
176
+      this.page = this.$route.query.page
177
+      this.limit = this.$route.query.limit
177
       this.getlist()
178
       this.getlist()
178
     }
179
     }
179
 }
180
 }

+ 3 - 1
src/xt_pages/stock/stockQuery.vue Zobrazit soubor

332
         this.$message.error("开始时间不能大于结束时间");
332
         this.$message.error("开始时间不能大于结束时间");
333
         this.start_time = "";
333
         this.start_time = "";
334
       } else {
334
       } else {
335
+        this.start_time = val
335
         this.GetAllStockQuery();
336
         this.GetAllStockQuery();
336
       }
337
       }
337
     },
338
     },
341
         this.$message.error("结束时间不能小于开始时间");
342
         this.$message.error("结束时间不能小于开始时间");
342
         this.end_time = "";
343
         this.end_time = "";
343
       } else {
344
       } else {
345
+        this.end_time = val
344
         this.GetAllStockQuery();
346
         this.GetAllStockQuery();
345
       }
347
       }
346
      
348
      
405
        this.GetAllStockQuery()
407
        this.GetAllStockQuery()
406
       },
408
       },
407
       toPrint(){
409
       toPrint(){
408
-        this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name)
410
+        this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name+"&page="+this.page+"&limit="+this.limit)
409
         
411
         
410
       },
412
       },
411
 
413
 

+ 2 - 2
src/xt_pages/workforce/appointment.vue Zobrazit soubor

68
     <div class="position">
68
     <div class="position">
69
       <bread-crumb :crumbs="crumbs"></bread-crumb>
69
       <bread-crumb :crumbs="crumbs"></bread-crumb>
70
         <div style="display:flex;align-items:center">
70
         <div style="display:flex;align-items:center">
71
-          <el-button @click="printTable">打印表格</el-button>
72
           <schedule-upload-excel style="margin-right:10px;" :on-success='handleSuccess' ></schedule-upload-excel>
71
           <schedule-upload-excel style="margin-right:10px;" :on-success='handleSuccess' ></schedule-upload-excel>
72
+           <el-button @click="printTable" type="primary" size="small">打印排班</el-button>
73
           <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
73
           <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
74
             导出模版
74
             导出模版
75
           </el-button>
75
           </el-button>
228
     },
228
     },
229
     methods: {
229
     methods: {
230
       printTable(){
230
       printTable(){
231
-        this.$router.push({path: '/scheduleTablePrint'})
231
+        this.$router.push({path: '/scheduleTablePrint?partition_id='+this.partition_id+"&weekTime="+this.activeName})
232
       },
232
       },
233
       generateTxt: function(log) {
233
       generateTxt: function(log) {
234
         var content = ''
234
         var content = ''

+ 53 - 27
src/xt_pages/workforce/components/tableData.vue Zobrazit soubor

2
   <div id="table_data">
2
   <div id="table_data">
3
     <div style="margin-bottom:-30px;margin-left:300px">
3
     <div style="margin-bottom:-30px;margin-left:300px">
4
       <span>分区:</span>
4
       <span>分区:</span>
5
-       <el-select v-model="partition_id" placeholder="请选择" @change="changePartiton">
5
+       <el-select v-model="partition_id" multiple placeholder="请选择" @change="changePartiton">
6
         <el-option
6
         <el-option
7
           v-for="item in this.zones"
7
           v-for="item in this.zones"
8
           :key="item.id"
8
           :key="item.id"
10
           :value="item.id">
10
           :value="item.id">
11
          </el-option>
11
          </el-option>
12
         </el-select>
12
         </el-select>
13
+      
13
        <!-- <span style="margin-left:100px">班次:</span>
14
        <!-- <span style="margin-left:100px">班次:</span>
14
        <el-select v-model="schedule_type" placeholder="请选择" @change="changeSchedule_type">
15
        <el-select v-model="schedule_type" placeholder="请选择" @change="changeSchedule_type">
15
         <el-option
16
         <el-option
623
   ChangeSchedule,
624
   ChangeSchedule,
624
   CreateSchedule,
625
   CreateSchedule,
625
   getSchedulePatients,
626
   getSchedulePatients,
626
-  getSchedules,
627
+  getSchedulesOne,
627
   getSearchResult,
628
   getSearchResult,
628
   getUrgentScheduleInitData,
629
   getUrgentScheduleInitData,
629
-  getWeekPanels,
630
+  getWeekPanelsOne,
630
   getAllZones,
631
   getAllZones,
631
 } from "@/api/schedule";
632
 } from "@/api/schedule";
632
 import ScheduleItem from "./ScheduleItem";
633
 import ScheduleItem from "./ScheduleItem";
760
       ],
761
       ],
761
       partition_id:0,
762
       partition_id:0,
762
       schedule_type:"",
763
       schedule_type:"",
763
-      zones:[{id:0,name:"全部"}],
764
+      zones:[],
764
       theType:"",
765
       theType:"",
765
       scheduleZone:[],
766
       scheduleZone:[],
766
       theWeek: {
767
       theWeek: {
769
         nextWeek: 0,
770
         nextWeek: 0,
770
         nextTwoWeek: 0
771
         nextTwoWeek: 0
771
       },
772
       },
773
+      zoneIdList:[],
774
+      strArr:""
772
     };
775
     };
773
   },
776
   },
774
 
777
 
797
   },
800
   },
798
   methods: {
801
   methods: {
799
        getWeekPanels() {
802
        getWeekPanels() {
800
-        this.scheduleZone=[]
801
-        getWeekPanels(1,this.partition_id).then(response => {
803
+         this.scheduleZone=[]
804
+         var partionStr = this.partition_id
805
+         var arr = this.zoneIdList.join(',')
806
+         
807
+         var str = ""
808
+         if(partionStr == 0){
809
+            str = arr
810
+         }
811
+         if(partionStr != 0){
812
+            str = partionStr.join(',')
813
+         }
814
+       
815
+      
816
+        getWeekPanelsOne(1,str).then(response => {
802
           if (response.data.state == 0) {
817
           if (response.data.state == 0) {
803
             return false
818
             return false
804
           }
819
           }
805
           var partitions = response.data.data.partitions
820
           var partitions = response.data.data.partitions
806
-          console.log("分区",partitions)
807
-          console.log("scheduleZoneRow",this.scheduleZoneRow)
821
+        
808
           this.theWeek.thisWeek = response.data.data.theWeek
822
           this.theWeek.thisWeek = response.data.data.theWeek
809
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
823
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
810
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
824
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
818
               that.scheduleZoneRow.push(partition.jihaos.length)
832
               that.scheduleZoneRow.push(partition.jihaos.length)
819
 
833
 
820
               that.partitions[partition.id] = partition
834
               that.partitions[partition.id] = partition
821
-              
822
-              console.log("partition",partition)
823
-
824
-             
835
+                
825
               partition.jihaos.forEach(function(jihao) {
836
               partition.jihaos.forEach(function(jihao) {
826
                 var thisPa = {
837
                 var thisPa = {
827
                   area: partition.name,
838
                   area: partition.name,
978
                   },
989
                   },
979
                   total: 0
990
                   total: 0
980
                 }
991
                 }
981
-                // tha.scheduleZone = []
992
+               
982
                 that.scheduleZone.push(thisPa)
993
                 that.scheduleZone.push(thisPa)
994
+               
983
               })
995
               })
984
             })
996
             })
985
-            console.log("分区列表22222222222222",this.scheduleZone)
986
           }
997
           }
998
+            console.log("34455555566666",this.scheduleZone)
987
         })
999
         })
988
      },
1000
      },
989
     cellClass({ row, column, rowIndex, columnIndex }) {
1001
     cellClass({ row, column, rowIndex, columnIndex }) {
1058
       return sums;
1070
       return sums;
1059
     },
1071
     },
1060
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
1072
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
1073
+    
1061
       var that = this;
1074
       var that = this;
1062
       var rowNum = 0;
1075
       var rowNum = 0;
1063
       rowNumber = 0;
1076
       rowNumber = 0;
1102
       this.currentData.patient_id = 0;
1115
       this.currentData.patient_id = 0;
1103
     },
1116
     },
1104
     getSchedules() {
1117
     getSchedules() {
1118
+         var partionStr = this.partition_id
1119
+         var arr = this.zoneIdList.join(',')
1120
+         var str = ""
1121
+         if(partionStr == 0){
1122
+            str = arr
1123
+         }
1124
+         if(partionStr != 0){
1125
+            str = partionStr.join(',')
1126
+         }
1105
         const params = {
1127
         const params = {
1106
           weekTime:this.theType,
1128
           weekTime:this.theType,
1107
-          partition_id:this.partition_id,
1129
+          patitionid:str,
1108
           schedule_type:this.schedule_type,
1130
           schedule_type:this.schedule_type,
1109
         }
1131
         }
1110
-
1111
-      getSchedules(params).then(response => {
1132
+     
1133
+      getSchedulesOne(params).then(response => {
1112
         if (response.data.state == 1) {
1134
         if (response.data.state == 1) {
1113
           this.weekTitle = response.data.data.weekTitle;
1135
           this.weekTitle = response.data.data.weekTitle;
1114
           this.weekDays = response.data.data.days;
1136
           this.weekDays = response.data.data.days;
1115
           this.toDay = response.data.data.today;
1137
           this.toDay = response.data.data.today;
1116
           var theSchedules = response.data.data.schdules;
1138
           var theSchedules = response.data.data.schdules;
1117
           
1139
           
1118
-          // console.log("分区2222222222",this.scheduleZone)
1119
-          
1120
-        
1121
           var that = this;
1140
           var that = this;
1122
-          console.log('that.scheduleZonethat.scheduleZone',that.scheduleZone)
1141
+          
1123
           this.scheduleZone.forEach(function(zone, index) {
1142
           this.scheduleZone.forEach(function(zone, index) {
1124
            
1143
            
1125
             that.scheduleZone[index].Mon_M = {
1144
             that.scheduleZone[index].Mon_M = {
1254
               theSchedules.forEach(function(schedule, sindex) {
1273
               theSchedules.forEach(function(schedule, sindex) {
1255
 
1274
 
1256
                 if (zone.jihao_id == schedule.bed_id) {
1275
                 if (zone.jihao_id == schedule.bed_id) {
1257
-                  // if(zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
1276
+                
1258
                   var weekPath = that.weekPath(
1277
                   var weekPath = that.weekPath(
1259
                     schedule.schedule_week,
1278
                     schedule.schedule_week,
1260
                     schedule.schedule_type
1279
                     schedule.schedule_type
2192
       getAllZones().then(response=>{
2211
       getAllZones().then(response=>{
2193
          if(response.data.state == 1){
2212
          if(response.data.state == 1){
2194
            var zones = response.data.data.zones
2213
            var zones = response.data.data.zones
2195
-           this.zones.push(...zones)
2196
-           
2214
+           for(let i=0;i<zones.length;i++){
2215
+              this.zoneIdList.push(zones[i].id)
2216
+           }
2217
+          this.zones.push(...zones)
2218
+          var strArr =  this.zoneIdList.join(",")
2219
+         
2220
+          this.strArr = strArr
2221
+          this.getWeekPanels()
2197
          }
2222
          }
2198
       })
2223
       })
2199
     },
2224
     },
2216
   mounted() {
2241
   mounted() {
2217
   
2242
   
2218
     this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 120;
2243
     this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 120;
2219
-    console.log(this.tableContainHeight);
2244
+   
2220
     // var theType = this.weekType(this.weekTime);
2245
     // var theType = this.weekType(this.weekTime);
2221
     // this.getSchedules(theType);
2246
     // this.getSchedules(theType);
2222
     const that = this;
2247
     const that = this;
2235
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2260
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2236
   // },
2261
   // },
2237
   created() {
2262
   created() {
2238
-    this.getWeekPanels()
2263
+    this.getAllZones()
2264
+ 
2239
     this.changeScheduleType(1)
2265
     this.changeScheduleType(1)
2240
     rowNumber = 0;
2266
     rowNumber = 0;
2241
     this.modeOptions = this.$store.getters.treatment_mode;
2267
     this.modeOptions = this.$store.getters.treatment_mode;
2260
     if (this.weekday == 0) {
2286
     if (this.weekday == 0) {
2261
       this.weekday = 7;
2287
       this.weekday = 7;
2262
     }
2288
     }
2263
-    this.getAllZones()
2289
+   
2264
   }
2290
   }
2265
 };
2291
 };
2266
 </script>
2292
 </script>

+ 256 - 22
src/xt_pages/workforce/scheduleTablePrint.vue Zobrazit soubor

12
                 <td colspan="3">周五({{ weekTitle[4] }})</td>
12
                 <td colspan="3">周五({{ weekTitle[4] }})</td>
13
                 <td colspan="3">周六({{ weekTitle[5] }})</td>
13
                 <td colspan="3">周六({{ weekTitle[5] }})</td>
14
                 <td colspan="3">周日({{ weekTitle[6] }})</td>
14
                 <td colspan="3">周日({{ weekTitle[6] }})</td>
15
+                <td colspan="3">总数</td>
15
             </tr>
16
             </tr>
16
             <tr>
17
             <tr>
17
                 <td>上午</td>
18
                 <td>上午</td>
165
                         <div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }}</div>
166
                         <div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }}</div>
166
                     </span>
167
                     </span>
167
                 </td>
168
                 </td>
169
+                <td>{{item.total}}</td>
168
             </tr>
170
             </tr>
169
         </table>
171
         </table>
170
     </div>
172
     </div>
173
 
175
 
174
 
176
 
175
 <script>
177
 <script>
176
-import {getSchedules,getWeekPanels} from "@/api/schedule";
178
+import {getSchedulesOne,getWeekPanelsOne,getPatientSheduleCount,getAllZones} from "@/api/schedule";
177
 import print from 'print-js'
179
 import print from 'print-js'
178
 export default {
180
 export default {
179
     props:{
181
     props:{
191
             weekTitle:[],
193
             weekTitle:[],
192
             scheduleZoneRow: [],
194
             scheduleZoneRow: [],
193
             partitions: {},
195
             partitions: {},
196
+            theWeek: {
197
+              lastWeek: 0,
198
+              thisWeek: 0,
199
+              nextWeek: 0,
200
+              nextTwoWeek: 0
201
+           },
202
+           scheduleCountList:[],
203
+           total:0,
204
+           zones:[],
205
+           zoneIdList:[],
206
+           strArr:""
194
         }
207
         }
195
     },
208
     },
196
     created(){
209
     created(){
210
+        this.getAllZones()
197
         this.modeOptions = this.$store.getters.treatment_mode;
211
         this.modeOptions = this.$store.getters.treatment_mode;
198
-        this.getWeekPanels()
212
+        this.partition_id = this.$route.query.partition_id
213
+       
199
         
214
         
200
     },
215
     },
201
     methods:{
216
     methods:{
217
+         getAllZones(){
218
+           getAllZones().then(response=>{
219
+             if(response.data.state == 1){
220
+                var zones = response.data.data.zones
221
+               for(let i=0;i<zones.length;i++){
222
+                    this.zoneIdList.push(zones[i].id)
223
+                }
224
+                this.zones.push(...zones)
225
+                var strArr =  this.zoneIdList.join(",")
226
+                
227
+                this.strArr = strArr
228
+                this.getWeekPanels()
229
+                //统计患者排班数量
230
+                this.getPatientSheduleCount()
231
+            }
232
+          })
233
+        },
202
         getWeekPanels() {
234
         getWeekPanels() {
203
-            // this.scheduleZoneRow = []
204
-            // this.scheduleZone = []
205
-            getWeekPanels(1,this.partition_id).then(response => {
235
+             this.scheduleZone = []
236
+              var partionStr = this.partition_id
237
+              var arr = this.zoneIdList.join(',')
238
+               var str = ""
239
+                if(partionStr == 0){
240
+                    str = arr
241
+                }
242
+                if(partionStr != 0){
243
+                    str = partionStr
244
+                }
245
+            getWeekPanelsOne(1,str).then(response => {
206
                 if (response.data.state == 0) {
246
                 if (response.data.state == 0) {
207
                     return false
247
                     return false
208
                 }
248
                 }
209
                 var partitions = response.data.data.partitions
249
                 var partitions = response.data.data.partitions
210
                 console.log("分区",partitions)
250
                 console.log("分区",partitions)
211
-                // this.theWeek.thisWeek = response.data.data.theWeek
212
-                // this.theWeek.lastWeek = this.theWeek.thisWeek - 1
213
-                // this.theWeek.nextWeek = this.theWeek.thisWeek + 1
214
-                // this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
215
-                // 在控制变量改变的时候进行 强制渲染更新
216
-                // let childrenRefs = this.$refs.elTabs.$children
217
-                // this.$nextTick(() => {
218
-                //     childrenRefs.forEach(child => child.$forceUpdate())
219
-                // })
220
-
251
+                this.theWeek.thisWeek = response.data.data.theWeek
252
+                this.theWeek.lastWeek = this.theWeek.thisWeek - 1
253
+                this.theWeek.nextWeek = this.theWeek.thisWeek + 1
254
+                this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
221
                 var that = this
255
                 var that = this
222
                 if (partitions.length > 0) {
256
                 if (partitions.length > 0) {
223
                     partitions.forEach(function(partition) {
257
                     partitions.forEach(function(partition) {
391
             })
425
             })
392
         },
426
         },
393
         getSchedules() {
427
         getSchedules() {
428
+            var theType = 2;
429
+            if(this.$route.query.weekTime == "lastWeek"){
430
+               theType = 1
431
+            }
432
+           if(this.$route.query.weekTime == "thisWeek"){
433
+               theType = 2
434
+            }
435
+            if(this.$route.query.weekTime == "nextWeek"){
436
+               theType = 3
437
+            }
438
+           if(this.$route.query.weekTime == "nextTwoWeek"){
439
+               theType = 4
440
+            }
441
+            var partionStr = this.partition_id
442
+            var arr = this.zoneIdList.join(',')
443
+            var str = ""
444
+            if(partionStr == 0){
445
+                str = arr
446
+            }
447
+            if(partionStr != 0){
448
+                str = partionStr
449
+            }
394
             const params = {
450
             const params = {
395
-                weekTime:this.theType,
396
-                partition_id:this.partition_id,
451
+                weekTime:theType,
452
+                patitionid:str,
397
                 schedule_type:this.schedule_type,
453
                 schedule_type:this.schedule_type,
398
             }
454
             }
399
-            getSchedules(params).then(response => {
455
+            getSchedulesOne(params).then(response => {
400
                 if (response.data.state == 1) {
456
                 if (response.data.state == 1) {
401
                     this.weekTitle = response.data.data.weekTitle;
457
                     this.weekTitle = response.data.data.weekTitle;
402
                     this.weekDays = response.data.data.days;
458
                     this.weekDays = response.data.data.days;
403
                     this.toDay = response.data.data.today;
459
                     this.toDay = response.data.data.today;
404
                     var theSchedules = response.data.data.schdules;
460
                     var theSchedules = response.data.data.schdules;
405
-                    
406
-                    
407
-                    
408
                     var that = this;
461
                     var that = this;
409
                     that.scheduleZone.forEach(function(zone, index) {
462
                     that.scheduleZone.forEach(function(zone, index) {
410
                         
463
                         
570
                                 
623
                                 
571
                             });
624
                             });
572
                         }
625
                         }
573
-                        console.log('that.scheduleZone',that.scheduleZone)
626
+                       
574
                     });
627
                     });
628
+                    var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":""}]
629
+                     
630
+                     
631
+                     for(let i=0;i<newArr.length;i++){
632
+                       for(let j=0;j<this.scheduleCountList.length;j++){
633
+                            newArr[i].cut = this.total
634
+                         //礼拜一上午
635
+                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
636
+                            
637
+                              newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
638
+                          } 
639
+                        //礼拜一下午
640
+                         if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
641
+                           
642
+                              newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
643
+                          } 
644
+
645
+                         //礼拜一晚上
646
+                         if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
647
+                            
648
+                              newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
649
+                          } 
650
+                         
651
+                        //礼拜二上午
652
+                         if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
653
+                            
654
+                              newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
655
+                          } 
656
+                         //礼拜二下午
657
+                         if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
658
+                            
659
+                              newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
660
+                          } 
661
+                        
662
+                         //礼拜二晚上
663
+                         if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
664
+                            
665
+                              newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
666
+                          } 
667
+
668
+                         //礼拜三上午
669
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
670
+                            
671
+                              newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
672
+                          } 
673
+
674
+                         //礼拜三下午
675
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
676
+                            
677
+                              newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
678
+                          }
679
+
680
+                         //礼拜三晚上
681
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
682
+                            
683
+                              newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
684
+                          }
685
+
686
+
687
+
688
+                        //礼拜四上午
689
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
690
+                            
691
+                              newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
692
+                          } 
693
+
694
+                         //礼拜四下午
695
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
696
+                            
697
+                              newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
698
+                          }
699
+
700
+                         //礼拜四晚上
701
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
702
+                            
703
+                              newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
704
+                          }
705
+
706
+
707
+                        //礼拜五上午
708
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
709
+                            
710
+                              newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
711
+                          } 
712
+
713
+                         //礼拜五下午
714
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
715
+                            
716
+                              newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
717
+                          }
718
+
719
+                         //礼拜五晚上
720
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
721
+                            
722
+                              newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
723
+                          }
724
+
725
+
726
+                        //礼拜六上午
727
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
728
+                            
729
+                              newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
730
+                          } 
731
+
732
+                         //礼拜六下午
733
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
734
+                            
735
+                              newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
736
+                          }
737
+
738
+                         //礼拜六晚上
739
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
740
+                            
741
+                              newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
742
+                          }
743
+                         
744
+
745
+                          //礼拜日上午
746
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
747
+                            
748
+                              newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
749
+                          } 
750
+
751
+                         //礼拜日下午
752
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
753
+                            
754
+                              newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
755
+                          }
756
+
757
+                         //礼拜日晚上
758
+                         if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
759
+                            
760
+                              newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
761
+                          }
762
+
763
+
764
+                       }
765
+                     }
766
+                    console.log("newArr222222222",newArr)
767
+                    that.scheduleZone.push(...newArr)
768
+                    console.log('总数据77777777777',that.scheduleZone)
575
                     
769
                     
576
                 } else {
770
                 } else {
577
                     this.$message.error("网络错误");
771
                     this.$message.error("网络错误");
609
             scanStyles: false
803
             scanStyles: false
610
             })
804
             })
611
         },
805
         },
806
+        getPatientSheduleCount(){
807
+            var theType = 2;
808
+            if(this.$route.query.weekTime == "lastWeek"){
809
+               theType = 1
810
+            }
811
+           if(this.$route.query.weekTime == "thisWeek"){
812
+               theType = 2
813
+            }
814
+            if(this.$route.query.weekTime == "nextWeek"){
815
+               theType = 3
816
+            }
817
+           if(this.$route.query.weekTime == "nextTwoWeek"){
818
+               theType = 4
819
+            }
820
+           var partionStr = this.partition_id
821
+            var arr = this.zoneIdList.join(',')
822
+            var str = ""
823
+            if(partionStr == 0){
824
+                str = arr
825
+            }
826
+            if(partionStr != 0){
827
+                str = partionStr.join(',')
828
+            }
829
+            var params = {
830
+             weekTime:theType,
831
+             partition_id:str,
832
+
833
+            }
834
+           getPatientSheduleCount(params).then(response=>{
835
+               if(response.data.state == 1){
836
+                  var list = response.data.data.list
837
+                  console.log("list22222",list)
838
+                  
839
+                  this.scheduleCountList = list
840
+                  var total = response.data.data.total
841
+                  console.log("totalw222",total)
842
+                  this.total = total
843
+               }
844
+           }) 
845
+        }
612
     }
846
     }
613
 }
847
 }
614
 </script>
848
 </script>