Browse Source

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

csx 4 years ago
parent
commit
57075f4459

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

498
 }
498
 }
499
 
499
 
500
 export function getSchedualDoctors (params) {
500
 export function getSchedualDoctors (params) {
501
+  console.log("params-----",params)
501
   return request({
502
   return request({
502
     url: '/api/schedule/advices',
503
     url: '/api/schedule/advices',
503
     method: 'get',
504
     method: 'get',

+ 7 - 1
src/views/layout/components/Navbar.vue View File

305
               this.showWsErr = true;
305
               this.showWsErr = true;
306
               this.wsErrMsg = "网络已断开,请检查网络后重新打开页面";
306
               this.wsErrMsg = "网络已断开,请检查网络后重新打开页面";
307
               console.log('navigator',navigator)
307
               console.log('navigator',navigator)
308
+              let http = 'wss://socket.sgjyun.com?token=' 
309
+              // let http = 'ws://socket.szjkhd.com?token=' //测试
310
+              let token = localStorage.getItem("token")
311
+              this.$store.state.user.websocket = new ReconnectingWebSocket(
312
+                http + token
313
+              );
308
             } else if (
314
             } else if (
309
               navigator.onLine == true &&
315
               navigator.onLine == true &&
310
               this.websocket.readyState == 1
316
               this.websocket.readyState == 1
312
               this.showWsErr = false;
318
               this.showWsErr = false;
313
             }
319
             }
314
             this.websocket.send("1");
320
             this.websocket.send("1");
315
-          }, 55000);
321
+          }, 30000);
316
         }
322
         }
317
         
323
         
318
       }).catch(error => {
324
       }).catch(error => {

+ 55 - 4
src/xt_pages/dialysis/details/index.vue View File

1696
         // let res = re.data;
1696
         // let res = re.data;
1697
         // console.log('res3333333333',res)
1697
         // console.log('res3333333333',res)
1698
         if(res.channel == 'queue/join'){
1698
         if(res.channel == 'queue/join'){
1699
-          if(res.data.fisrtQueueInfo != null){
1700
-            if(res.data.fisrtQueueInfo.create_time){
1701
-              res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1699
+          let timeType = null
1700
+          if(this.scheduleStateVal == 1){
1701
+            timeType = 1
1702
+          }else if(this.scheduleStateVal == 2){
1703
+            timeType = 2
1704
+          }else{
1705
+            if(new Date().getHours() < 10){
1706
+              timeType = 1
1707
+            }else if(new Date().getHours() >= 10){
1708
+              timeType = 2
1702
             }
1709
             }
1703
           }
1710
           }
1711
+          let fisrtQueueInfo = []
1712
+          this.newFisrtQueueInfo = res.data.fisrtQueueInfo
1713
+          if(res.data.fisrtQueueInfo != null){
1714
+              if(timeType == 1){
1715
+                  fisrtQueueInfo = res.data.fisrtQueueInfo.morning
1716
+                  if(fisrtQueueInfo.create_time){
1717
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1718
+                  }
1719
+              }else if(timeType == 2){
1720
+                  fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
1721
+                  if(fisrtQueueInfo.create_time){
1722
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1723
+                  }
1724
+              }
1725
+          }
1726
+          this.fisrtQueueInfo = fisrtQueueInfo
1704
           this.queueConfig = res.data.queueConfig
1727
           this.queueConfig = res.data.queueConfig
1705
-          this.fisrtQueueInfo = res.data.fisrtQueueInfo
1728
+          // this.fisrtQueueInfo = res.data.fisrtQueueInfo
1706
           let arr = res.data.patientQueueList.data
1729
           let arr = res.data.patientQueueList.data
1707
           let waitingCalledArr = []
1730
           let waitingCalledArr = []
1708
           let calledArr = []
1731
           let calledArr = []
1737
         }else if(res.channel == 'patientCallInfo'){
1760
         }else if(res.channel == 'patientCallInfo'){
1738
           res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1761
           res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1739
           this.fisrtQueueInfo = res.data.patientInfo
1762
           this.fisrtQueueInfo = res.data.patientInfo
1763
+        }else if(res.channel == 'fisrtQueueInfo'){
1764
+          if(this.scheduleStateVal == 1){
1765
+            timeType = 1
1766
+          }else if(this.scheduleStateVal == 2){
1767
+            timeType = 2
1768
+          }else{
1769
+            if(new Date().getHours() < 10){
1770
+              timeType = 1
1771
+            }else if(new Date().getHours() >= 10){
1772
+              timeType = 2
1773
+            }
1774
+          }
1775
+          let fisrtQueueInfo = []
1776
+          this.newFisrtQueueInfo = res.data.patientInfo
1777
+          if(res.data.patientInfo != null){
1778
+              if(timeType == 1){
1779
+                  fisrtQueueInfo = res.data.patientInfo.morning
1780
+                  if(fisrtQueueInfo.create_time){
1781
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1782
+                  }
1783
+              }else if(timeType == 2){
1784
+                  fisrtQueueInfo = res.data.patientInfo.afternoon
1785
+                  if(fisrtQueueInfo.create_time){
1786
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1787
+                  }
1788
+              }
1789
+          }
1790
+          this.fisrtQueueInfo = fisrtQueueInfo
1740
         }
1791
         }
1741
       }
1792
       }
1742
     },
1793
     },

+ 55 - 7
src/xt_pages/dialysis/dialysisDoctorAdvice.vue View File

64
           </ul>
64
           </ul>
65
         </div>
65
         </div>
66
       </div>
66
       </div>
67
-
67
+     
68
+     <div class="cell clearfix">
69
+        <label class="title"> <span class="name">给药途径</span> : </label>
70
+        <div class="time">
71
+          <ul class>
72
+            <li
73
+              :class="item.id == delivery_way ? 'active' : ''"
74
+              @click="selectDeliveryWay(item.id)"
75
+              v-for="item in deliveryWay"
76
+              :key="item.id"
77
+            >
78
+              {{ item.name }}
79
+            </li>
80
+          </ul>
81
+        </div>
82
+      </div>
83
+    
68
       <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
84
       <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
69
         @selection-change="handleSelectionChange"
85
         @selection-change="handleSelectionChange"
70
         :row-class-name="tableRowClassName"
86
         :row-class-name="tableRowClassName"
353
         schedul_type: 0,
369
         schedul_type: 0,
354
         partition_type: 0,
370
         partition_type: 0,
355
         schedul_time: "",
371
         schedul_time: "",
356
-        keywords: ""
372
+        keywords: "",
357
       },
373
       },
358
       selecting_schs: [],
374
       selecting_schs: [],
359
       partitionArr: [],
375
       partitionArr: [],
361
       scheduleMap:[],
377
       scheduleMap:[],
362
       show:true,
378
       show:true,
363
       showOne:false,
379
       showOne:false,
380
+      deliveryWay:[],
381
+      delivery_way:0,
364
     };
382
     };
365
   },
383
   },
366
   created() {
384
   created() {
410
       // alert(scheduleType);/
428
       // alert(scheduleType);/
411
       this.schedulType = scheduleType;
429
       this.schedulType = scheduleType;
412
       this.listQuery.schedul_type = scheduleType;
430
       this.listQuery.schedul_type = scheduleType;
413
-      this.requestSchedualDoctors();
431
+      this.requestSchedualDoctors(this.time);
414
     },
432
     },
415
     selectPartitionType(partitionType) {
433
     selectPartitionType(partitionType) {
416
       this.partitionType = partitionType;
434
       this.partitionType = partitionType;
417
       this.listQuery.partition_type = partitionType;
435
       this.listQuery.partition_type = partitionType;
418
-      this.requestSchedualDoctors();
436
+      this.requestSchedualDoctors(this.time);
437
+    },
438
+    
439
+    selectDeliveryWay(val){
440
+       this.delivery_way = val
441
+       this.requestSchedualDoctors(this.time)
419
     },
442
     },
420
 
443
 
444
+
421
     changeTime() {
445
     changeTime() {
422
       this.listQuery.schedul_time = this.time;
446
       this.listQuery.schedul_time = this.time;
423
       this.requestSchedualDoctors(this.time)
447
       this.requestSchedualDoctors(this.time)
430
         } else {
454
         } else {
431
           this.partitionArr = response.data.data.zone;
455
           this.partitionArr = response.data.data.zone;
432
           this.partitionArr.unshift({ id: 0, name: "全部" });
456
           this.partitionArr.unshift({ id: 0, name: "全部" });
457
+          var dics  =  response.data.data.dics
458
+          var obj = {id:0,name:"全部"}
459
+          this.deliveryWay.push(obj)
460
+          this.deliveryWay.push(...dics)
433
         }
461
         }
434
       });
462
       });
435
     },
463
     },
436
     requestSchedualDoctors (time) {
464
     requestSchedualDoctors (time) {
465
+        
466
+        var name = ""
467
+        for(let i=0;i<this.deliveryWay.length;i++){
468
+            if(this.delivery_way == this.deliveryWay[i].id){
469
+              name = this.deliveryWay[i].name
470
+            }
471
+        }
472
+        if(name == '全部'){
473
+          name = ""
474
+        }
475
+
437
         let newTime =  moment(time).format('YYYY-MM-DD')
476
         let newTime =  moment(time).format('YYYY-MM-DD')
438
         getSchedualDoctors({
477
         getSchedualDoctors({
439
         date: newTime,
478
         date: newTime,
440
         patient_type: 0,
479
         patient_type: 0,
441
-        advice_type: 2
442
-        }).then(rs => {
480
+        advice_type: 2,
481
+        delivery_way:name}).then(rs => {
443
         var resp = rs.data
482
         var resp = rs.data
444
         if (resp.state == 1) {
483
         if (resp.state == 1) {
445
             this.admin_users = resp.data.adminUser
484
             this.admin_users = resp.data.adminUser
609
       }
648
       }
610
     //   console.log("sch_ids",sch_ids)
649
     //   console.log("sch_ids",sch_ids)
611
       this.$store.dispatch("SetAdviceIDs", sch_ids);
650
       this.$store.dispatch("SetAdviceIDs", sch_ids);
612
-      this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime()} });
651
+       var name = ""
652
+        for(let i=0;i<this.deliveryWay.length;i++){
653
+            if(this.delivery_way == this.deliveryWay[i].id){
654
+              name = this.deliveryWay[i].name
655
+            }
656
+        }
657
+        if(name == '全部'){
658
+          name = ""
659
+       }
660
+      this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
613
 
661
 
614
     },
662
     },
615
     batchPrintActionOne: function() {
663
     batchPrintActionOne: function() {

+ 6 - 1
src/xt_pages/dialysis/doctorAdvicePrint.vue View File

258
             time:'',
258
             time:'',
259
             show:true,
259
             show:true,
260
             showOne:false,
260
             showOne:false,
261
+            delivery_way:""
261
         }
262
         }
262
     },
263
     },
263
     methods:{
264
     methods:{
277
             getSchedualDoctors({
278
             getSchedualDoctors({
278
             date: newTime,
279
             date: newTime,
279
             patient_type: 0,
280
             patient_type: 0,
280
-            advice_type: 2
281
+            advice_type: 2,
282
+            delivery_way:this.delivery_way,
281
             }).then(rs => {
283
             }).then(rs => {
282
                 var resp = rs.data
284
                 var resp = rs.data
283
                 if (resp.state == 1) {
285
                 if (resp.state == 1) {
741
     },
743
     },
742
     created(){
744
     created(){
743
       var time = this.$route.query.time
745
       var time = this.$route.query.time
746
+      var delivery_way = this.$route.query.delivery_way
747
+      console.log("delivery_Way",delivery_way)
748
+      this.delivery_way = delivery_way
744
       this.time = moment(time).format('YYYY-MM-DD')
749
       this.time = moment(time).format('YYYY-MM-DD')
745
       console.log(11,this.$route.query)
750
       console.log(11,this.$route.query)
746
       this.requestSchedualDoctors(time)
751
       this.requestSchedualDoctors(time)

+ 45 - 2
src/xt_pages/dialysis/schedualPatient.vue View File

279
       }
279
       }
280
     },
280
     },
281
     created() {
281
     created() {
282
+      if(sessionStorage.getItem('signIn') != null){
283
+        setTimeout(() => {    
284
+          if(sessionStorage.getItem('signIn') == 1){
285
+            this.$router.replace({ path: '/signIn' })
286
+          }else if(sessionStorage.getItem('signIn') == 2){
287
+            this.$router.replace({ path: '/lineUp' })
288
+          }
289
+        },1000)
290
+      }
282
       var schedule_type_selected = this.$store.getters.schedule_type_selected
291
       var schedule_type_selected = this.$store.getters.schedule_type_selected
283
       var zone_selected = this.$store.getters.zone_selected
292
       var zone_selected = this.$store.getters.zone_selected
284
       var patient_state_selected = this.$store.getters.patient_state_selected
293
       var patient_state_selected = this.$store.getters.patient_state_selected
379
           console.log('res3333333333',res)
388
           console.log('res3333333333',res)
380
           if(res.channel == 'queue/join'){
389
           if(res.channel == 'queue/join'){
381
             let timeType = null
390
             let timeType = null
382
-            if(new Date().getHours() < 11){
391
+            if(this.schedule_type_selected == 1){
383
               timeType = 1
392
               timeType = 1
384
-            }else if(new Date().getHours() >= 11){
393
+            }else if(this.schedule_type_selected == 2){
385
               timeType = 2
394
               timeType = 2
395
+            }else{
396
+              if(new Date().getHours() < 10){
397
+                timeType = 1
398
+              }else if(new Date().getHours() >= 10){
399
+                timeType = 2
400
+              }
386
             }
401
             }
387
             let fisrtQueueInfo = []
402
             let fisrtQueueInfo = []
388
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
403
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
436
           }else if(res.channel == 'patientCallInfo'){
451
           }else if(res.channel == 'patientCallInfo'){
437
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
452
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
438
             this.fisrtQueueInfo = res.data.patientInfo
453
             this.fisrtQueueInfo = res.data.patientInfo
454
+          }else if(res.channel == 'fisrtQueueInfo'){
455
+            if(this.schedule_type_selected == 1){
456
+              timeType = 1
457
+            }else if(this.schedule_type_selected == 2){
458
+              timeType = 2
459
+            }else{
460
+              if(new Date().getHours() < 10){
461
+                timeType = 1
462
+              }else if(new Date().getHours() >= 10){
463
+                timeType = 2
464
+              }
465
+            }
466
+            let fisrtQueueInfo = []
467
+            this.newFisrtQueueInfo = res.data.patientInfo
468
+            if(res.data.patientInfo != null){
469
+                if(timeType == 1){
470
+                    fisrtQueueInfo = res.data.patientInfo.morning
471
+                    if(fisrtQueueInfo.create_time){
472
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
473
+                    }
474
+                }else if(timeType == 2){
475
+                    fisrtQueueInfo = res.data.patientInfo.afternoon
476
+                    if(fisrtQueueInfo.create_time){
477
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
478
+                    }
479
+                }
480
+            }
481
+            this.fisrtQueueInfo = fisrtQueueInfo
439
           }
482
           }
440
         }
483
         }
441
       },
484
       },

+ 1 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

1458
         }
1458
         }
1459
 
1459
 
1460
         this.advices = response.data.data.advices
1460
         this.advices = response.data.data.advices
1461
+        console.log("医嘱数据2222222222",this.advices)
1461
         this.monitors = response.data.data.monitors
1462
         this.monitors = response.data.data.monitors
1462
         this.summary = response.data.data.summary
1463
         this.summary = response.data.data.summary
1463
         this.org_template_info = response.data.data.org_template_info
1464
         this.org_template_info = response.data.data.org_template_info

+ 10 - 9
src/xt_pages/index/verify_token.vue View File

11
     this.$store.dispatch('VerifyToken', this.$route.query.token).then(() => {
11
     this.$store.dispatch('VerifyToken', this.$route.query.token).then(() => {
12
       this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
12
       this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
13
         this.$store.dispatch('VerifyConfigList').then(() => {
13
         this.$store.dispatch('VerifyConfigList').then(() => {
14
-          // alert('token 验证成功')
15
-          // console.log(this.$store.getters.xt_permission.addRouters)
16
-          this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
17
-  //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
18
-          if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
19
-            this.$router.replace({ path: '/dialysis/dialysisrecord' })
14
+          
15
+            // alert('token 验证成功')
16
+            // console.log(this.$store.getters.xt_permission.addRouters)
17
+            this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
18
+    //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
19
+            if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
20
+              this.$router.replace({ path: '/dialysis/dialysisrecord' })
20
 
21
 
21
-          }else{
22
-            this.$router.replace({ path: '/home' })
22
+            }else{
23
+              this.$router.replace({ path: '/home' })
23
 
24
 
24
 
25
 
25
-          }
26
+            }
26
 
27
 
27
         })
28
         })
28
       })
29
       })

+ 6 - 7
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

80
               :label="item.name"
80
               :label="item.name"
81
               :name="item.name"
81
               :name="item.name"
82
             >
82
             >
83
+            <div class="RP">Rp
83
               <el-date-picker
84
               <el-date-picker
84
                 v-model="item.pre_time"
85
                 v-model="item.pre_time"
85
                 type="datetime"
86
                 type="datetime"
88
                 value-format="yyyy-MM-dd hh:mm"
89
                 value-format="yyyy-MM-dd hh:mm"
89
                 placeholder="选择日期">
90
                 placeholder="选择日期">
90
               </el-date-picker>
91
               </el-date-picker>
91
-
92
-            </el-tab-pane>
93
-            <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
94
-            </el-tab-pane>
95
-            <div class="RP">Rp
96
               <div style="float: right;margin-bottom:5px;margin-right:1%;">
92
               <div style="float: right;margin-bottom:5px;margin-right:1%;">
97
                 <el-button
93
                 <el-button
98
                   round
94
                   round
109
                 </el-button>
105
                 </el-button>
110
               </div>
106
               </div>
111
             </div>
107
             </div>
108
+              
112
 
109
 
113
-
114
-
110
+            </el-tab-pane>
111
+            <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
112
+            </el-tab-pane>
113
+            
115
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
114
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
116
                                 :activeType="customTabIndex"></prescription-table>
115
                                 :activeType="customTabIndex"></prescription-table>
117
           </el-tabs>
116
           </el-tabs>

+ 6 - 4
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue View File

233
 
233
 
234
     },
234
     },
235
     changeEndTime(val) {
235
     changeEndTime(val) {
236
-      var time =
237
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
236
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
238
       if (time < 0) {
237
       if (time < 0) {
239
         this.$message.error("结束时间不能小于开始时间");
238
         this.$message.error("结束时间不能小于开始时间");
240
         this.listQuery.end_time = "";
239
         this.listQuery.end_time = "";
291
      })
290
      })
292
    },
291
    },
293
     geStatistics(){
292
     geStatistics(){
293
+       console.log("this9999999",this.listQuery)
294
       geStatistics(this.listQuery).then(response=>{
294
       geStatistics(this.listQuery).then(response=>{
295
+
295
         if(response.data.state === 1){
296
         if(response.data.state === 1){
296
           var statistics =  response.data.data.statistics
297
           var statistics =  response.data.data.statistics
297
           var treatinfo = response.data.data.treatinfo
298
           var treatinfo = response.data.data.treatinfo
330
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
331
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
331
             }
332
             }
332
           }
333
           }
333
-          console.log("dd",dd)
334
+          
334
           for (const key in dd) {
335
           for (const key in dd) {
335
             var total = 0;
336
             var total = 0;
336
             for (const mkey in this.modeOptions) {
337
             for (const mkey in this.modeOptions) {
337
               if (mkey in dd[key]) {
338
               if (mkey in dd[key]) {
338
-                console.log("=====",mkey)
339
+               
339
                 console.log(this.modeOptions[mkey].name)
340
                 console.log(this.modeOptions[mkey].name)
340
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
341
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
341
                 var number = parseInt(dd[key][mkey].number);
342
                 var number = parseInt(dd[key][mkey].number);
352
                 };
353
                 };
353
               }
354
               }
354
             }
355
             }
356
+            this.tableData = []
355
             this.tableData.push({ date: key, data: dd[key], total: total });
357
             this.tableData.push({ date: key, data: dd[key], total: total });
356
           }
358
           }
357
         }
359
         }

+ 87 - 6
src/xt_pages/sign/components/beforeDialysisCalling.vue View File

22
                 <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
22
                 <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
23
                 <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
23
                 <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
24
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下一位</el-button>
24
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下一位</el-button>
25
+                <!-- <el-button style="margin:0 auto;" @click="nextFive(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下五位</el-button> -->
25
             </div>
26
             </div>
26
         </div>
27
         </div>
27
     </div>
28
     </div>
104
             data: {type:3},
105
             data: {type:3},
105
         };
106
         };
106
         this.websocketSend(unObj)
107
         this.websocketSend(unObj)
108
+
109
+        let unObj1 = {
110
+            cmd: "queue/unjoin",
111
+            data: {type:4},
112
+        };
113
+        this.websocketSend(unObj1)
107
     },
114
     },
108
     methods:{
115
     methods:{
109
         websocketSend(data) {
116
         websocketSend(data) {
130
                             if(res.data.fisrtQueueInfo != null){
137
                             if(res.data.fisrtQueueInfo != null){
131
                                 if(this.patientStateVal == 0){
138
                                 if(this.patientStateVal == 0){
132
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.morning
139
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.morning
133
-                                    if(fisrtQueueInfo.create_time){
134
-                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
140
+                                    if(fisrtQueueInfo != null){
141
+                                        if(fisrtQueueInfo.create_time){
142
+                                            fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
143
+                                        }
135
                                     }
144
                                     }
136
                                 }else if(this.patientStateVal == 1){
145
                                 }else if(this.patientStateVal == 1){
137
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
146
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
138
-                                    if(fisrtQueueInfo.create_time){
139
-                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
147
+                                    if(fisrtQueueInfo != null){
148
+                                        if(fisrtQueueInfo.create_time){
149
+                                            fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
150
+                                        }
140
                                     }
151
                                     }
141
                                 }
152
                                 }
142
                             }
153
                             }
163
                             // this.waitingCalled = waitingCalledArr
174
                             // this.waitingCalled = waitingCalledArr
164
                             this.waitingCalledAm = waitingCalledAm
175
                             this.waitingCalledAm = waitingCalledAm
165
                             this.waitingCalledPm = waitingCalledPm
176
                             this.waitingCalledPm = waitingCalledPm
177
+                            // this.called = calledArr
178
+                        }
179
+                        if(res.data.type == 4){
180
+                            let arr = res.data.patientQueueList.data
181
+                            let calledArr = []
182
+                            arr.map(item => {
183
+                                if(item.status == 2){
184
+                                    item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
185
+                                    calledArr.push(item)
186
+                                }
187
+                            })
166
                             this.called = calledArr
188
                             this.called = calledArr
167
                         }
189
                         }
168
                     }else if(res.channel == 'allQueueList'){
190
                     }else if(res.channel == 'allQueueList'){
188
                         // this.waitingCalled = waitingCalledArr
210
                         // this.waitingCalled = waitingCalledArr
189
                         this.waitingCalledAm = waitingCalledAm
211
                         this.waitingCalledAm = waitingCalledAm
190
                         this.waitingCalledPm = waitingCalledPm
212
                         this.waitingCalledPm = waitingCalledPm
191
-                        this.called = calledArr
213
+                        // this.called = calledArr
192
                     }else if(res.channel == 'patientCallInfo'){
214
                     }else if(res.channel == 'patientCallInfo'){
193
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
215
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
194
                         this.fisrtQueueInfo = res.data.patientInfo
216
                         this.fisrtQueueInfo = res.data.patientInfo
195
                         this.newFisrtQueueInfo = res.data.patientInfo
217
                         this.newFisrtQueueInfo = res.data.patientInfo
218
+                    }else if(res.channel == 'fisrtQueueInfo'){
219
+                        let fisrtQueueInfo = []
220
+                        this.newFisrtQueueInfo = res.data.patientInfo
221
+                        if(res.data.patientInfo != null){
222
+                            if(this.patientStateVal == 0){
223
+                                fisrtQueueInfo = res.data.patientInfo.morning
224
+                                if(fisrtQueueInfo != null){
225
+                                    if(fisrtQueueInfo.create_time){
226
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
227
+                                    }
228
+                                }
229
+                            }else if(this.patientStateVal == 1){
230
+                                fisrtQueueInfo = res.data.patientInfo.afternoon
231
+                                if(fisrtQueueInfo != null){
232
+                                    if(fisrtQueueInfo.create_time){
233
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
234
+                                    }
235
+                                }
236
+                            }
237
+                        }
238
+                        this.fisrtQueueInfo = fisrtQueueInfo
196
                     }
239
                     }
197
                 
240
                 
198
             }
241
             }
218
             //     }) 
261
             //     }) 
219
             //     this.waitingCalledPm = newArr
262
             //     this.waitingCalledPm = newArr
220
             // }
263
             // }
264
+            if(index == 2){
265
+                let obj = {
266
+                    cmd: "queue/join",
267
+                    data: {type:4,page:0,size:0},
268
+                };
269
+                this.websocketSend(obj)
270
+            }
221
             let fisrtQueueInfo = []
271
             let fisrtQueueInfo = []
222
             if(this.newFisrtQueueInfo != null){
272
             if(this.newFisrtQueueInfo != null){
223
                 if(this.patientStateVal == 0){
273
                 if(this.patientStateVal == 0){
286
                 }
336
                 }
287
             })
337
             })
288
         },
338
         },
339
+        nextFive(patient_id){
340
+            if(patient_id == undefined || patient_id == ""){
341
+                this.$message.error('已经是最后一位了');
342
+                return
343
+            }
344
+            let schedule_type = null
345
+            if(this.patientStateVal == 0){
346
+                schedule_type = 1
347
+            }else if(this.patientStateVal == 1){
348
+                schedule_type = 2
349
+            }
350
+            console.log('patient_id',patient_id)
351
+            let org_id =  parseInt(sessionStorage.getItem("org_id"));
352
+            let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
353
+            axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type + '&num=5').then(res => {
354
+                console.log(res)
355
+                // let patientArr = res.data.queue_list.data
356
+                // this.patientArr = patientArr
357
+                // this.$emit('child-event',this.patientArr)
358
+                if(res.data.data.patientInfo == null){
359
+                    this.$message.error('已经是最后一位了');
360
+                    return
361
+                }
362
+                if(res.data.code == 200){
363
+                    this.$message({
364
+                        message: res.data.msg,
365
+                        type: 'success'
366
+                    });
367
+                }
368
+            })
369
+        },
289
         pass(patient_id){
370
         pass(patient_id){
290
             console.log('patient_id',patient_id)
371
             console.log('patient_id',patient_id)
291
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
372
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
324
     height: 313px;
405
     height: 313px;
325
     border: 1px solid #e5e5ee;
406
     border: 1px solid #e5e5ee;
326
     // flex: 1;
407
     // flex: 1;
327
-    width: 12%;
408
+    width: 14%;
328
     text-align: center;
409
     text-align: center;
329
     .nowCallingTitle{
410
     .nowCallingTitle{
330
         font-size: 20px;
411
         font-size: 20px;

+ 1 - 1
src/xt_pages/sign/components/called.vue View File

83
         padding: 9px 0;
83
         padding: 9px 0;
84
         margin: 0 15px 15px 0;
84
         margin: 0 15px 15px 0;
85
         float: left;
85
         float: left;
86
-        width: 360px;
86
+        width: 400px;
87
         cursor: pointer;
87
         cursor: pointer;
88
         display: flex;
88
         display: flex;
89
         justify-content: space-between;
89
         justify-content: space-between;

+ 59 - 5
src/xt_pages/sign/components/computerCalling.vue View File

21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
22
                 <p><el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
22
                 <p><el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
23
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
23
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
24
+                <el-button style="margin:0 auto;" @click="nextFive(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下五位</el-button>
24
             </div>
25
             </div>
25
         </div>
26
         </div>
26
     </div>
27
     </div>
105
                         if(res.data.fisrtQueueInfo != null){
106
                         if(res.data.fisrtQueueInfo != null){
106
                             if(this.patientStateVal == 0){
107
                             if(this.patientStateVal == 0){
107
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.morning
108
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.morning
108
-                                if(fisrtQueueInfo.create_time){
109
-                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
109
+                                if(fisrtQueueInfo != null){
110
+                                    if(fisrtQueueInfo.create_time){
111
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
112
+                                    }
110
                                 }
113
                                 }
111
                             }else if(this.patientStateVal == 1){
114
                             }else if(this.patientStateVal == 1){
112
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
115
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
113
-                                if(fisrtQueueInfo.create_time){
114
-                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
116
+                                if(fisrtQueueInfo != null){
117
+                                    if(fisrtQueueInfo.create_time){
118
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
119
+                                    }
115
                                 }
120
                                 }
116
                             }
121
                             }
117
                         }
122
                         }
138
                         // this.waitingCalled = waitingCalledArr
143
                         // this.waitingCalled = waitingCalledArr
139
                         this.waitingCalledAm = waitingCalledAm
144
                         this.waitingCalledAm = waitingCalledAm
140
                         this.waitingCalledPm = waitingCalledPm
145
                         this.waitingCalledPm = waitingCalledPm
146
+                        // this.called = calledArr
147
+                    }
148
+                    if(res.data.type == 5){
149
+                        let arr = res.data.patientQueueList.data
150
+                        let calledArr = []
151
+                        arr.map(item => {
152
+                            if(item.status == 3){
153
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
154
+                                calledArr.push(item)
155
+                            }
156
+                        })
141
                         this.called = calledArr
157
                         this.called = calledArr
142
                     }
158
                     }
143
                 }else if(res.channel == 'allQueueList'){
159
                 }else if(res.channel == 'allQueueList'){
163
                     // this.waitingCalled = waitingCalledArr
179
                     // this.waitingCalled = waitingCalledArr
164
                     this.waitingCalledAm = waitingCalledAm
180
                     this.waitingCalledAm = waitingCalledAm
165
                     this.waitingCalledPm = waitingCalledPm
181
                     this.waitingCalledPm = waitingCalledPm
166
-                    this.called = calledArr
182
+                    // this.called = calledArr
167
                 }else if(res.channel == 'patientCallInfo'){
183
                 }else if(res.channel == 'patientCallInfo'){
168
                     res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
184
                     res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
169
                     this.fisrtQueueInfo = res.data.patientInfo
185
                     this.fisrtQueueInfo = res.data.patientInfo
192
             //     }) 
208
             //     }) 
193
             //     this.waitingCalledPm = newArr
209
             //     this.waitingCalledPm = newArr
194
             // }
210
             // }
211
+            if(index == 2){
212
+                let obj = {
213
+                    cmd: "queue/join",
214
+                    data: {type:5,page:0,size:0},
215
+                };
216
+                this.websocketSend(obj)
217
+            }
195
             let fisrtQueueInfo = []
218
             let fisrtQueueInfo = []
196
             if(this.newFisrtQueueInfo != null){
219
             if(this.newFisrtQueueInfo != null){
197
                 if(this.patientStateVal == 0){
220
                 if(this.patientStateVal == 0){
260
                 }
283
                 }
261
             })
284
             })
262
         },
285
         },
286
+        nextFive(patient_id){
287
+            if(patient_id == undefined || patient_id == ""){
288
+                this.$message.error('已经是最后一位了');
289
+                return
290
+            }
291
+            console.log('patient_id',patient_id)
292
+            let schedule_type = null
293
+            if(this.patientStateVal == 0){
294
+                schedule_type = 1
295
+            }else if(this.patientStateVal == 1){
296
+                schedule_type = 2
297
+            }
298
+            let org_id =  parseInt(sessionStorage.getItem("org_id"));
299
+            let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
300
+            axios.get('/api/index/nextupcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type + '&num=5').then(res => {
301
+                console.log(res)
302
+                // let patientArr = res.data.queue_list.data
303
+                // this.patientArr = patientArr
304
+                // this.$emit('child-event',this.patientArr)
305
+                if(res.data.data.patientInfo == null){
306
+                    this.$message.error('已经是最后一位了');
307
+                    return
308
+                }
309
+                if(res.data.code == 200){
310
+                    this.$message({
311
+                        message: res.data.msg,
312
+                        type: 'success'
313
+                    });
314
+                }
315
+            })
316
+        },
263
     }
317
     }
264
 }
318
 }
265
 </script>
319
 </script>

+ 41 - 4
src/xt_pages/sign/components/waitingCalled.vue View File

9
                 </div>
9
                 </div>
10
             </div>
10
             </div>
11
             <div class="waitingOneRight">
11
             <div class="waitingOneRight">
12
-                <span v-if="item.schedule_type == 1">上午</span>
13
-                <span v-if="item.schedule_type == 2">下午</span>
14
-                <span v-if="item.schedule_type == 3">晚上</span>
15
-                <span>{{ item.queue_no }}号</span>
12
+                <div>
13
+                    <span v-if="item.schedule_type == 1">上午</span>
14
+                    <span v-if="item.schedule_type == 2">下午</span>
15
+                    <span v-if="item.schedule_type == 3">晚上</span>
16
+                    <span>{{ item.queue_no }}号</span>
17
+                </div>
18
+                <i class="el-icon-delete deleteIcon" @click="deletePatient(item.patient_id)"></i>
16
             </div>
19
             </div>
17
             <!-- <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
20
             <!-- <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
18
                 <img src="../../../assets/img/volume.png" alt="">
21
                 <img src="../../../assets/img/volume.png" alt="">
56
                 }
59
                 }
57
                 
60
                 
58
             })
61
             })
62
+        },
63
+        deletePatient(patient_id){
64
+            this.$confirm('是否删除?', '提示', {
65
+                confirmButtonText: '确定',
66
+                cancelButtonText: '取消',
67
+                type: 'warning'
68
+            }).then(() => {
69
+                let org_id =  parseInt(sessionStorage.getItem("org_id"));
70
+                let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
71
+                axios.get('/api/index/delpatient?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
72
+                    console.log(res)
73
+                    // let patientArr = res.data.queue_list.data
74
+                    // this.patientArr = patientArr
75
+                    // this.$emit('child-event',this.patientArr)
76
+                    if(res.data.code == 200){
77
+                        this.$message({
78
+                            type: 'success',
79
+                            message: '删除成功!'
80
+                        });
81
+                    }
82
+                })
83
+                
84
+            }).catch(() => {
85
+                        
86
+            });
87
+
88
+
59
             
89
             
60
         }
90
         }
91
+        
61
     }
92
     }
62
     // watch:{
93
     // watch:{
63
     //     waitingCalled:{
94
     //     waitingCalled:{
109
         }
140
         }
110
         .waitingOneRight{
141
         .waitingOneRight{
111
             color:#999;
142
             color:#999;
143
+            text-align: center;
112
             img{
144
             img{
113
                 width: 30px;
145
                 width: 30px;
114
                 margin-top: 6px;
146
                 margin-top: 6px;
115
             }
147
             }
148
+            .deleteIcon{
149
+                font-size: 22px;
150
+                color:red;
151
+                margin-top: 10px;
152
+            }
116
         }
153
         }
117
     }
154
     }
118
 }
155
 }

+ 11 - 8
src/xt_pages/sign/lineUp.vue View File

251
         },
251
         },
252
     },
252
     },
253
     created(){
253
     created(){
254
-        if(sessionStorage.getItem('lineUpKey') != null){
255
-            if(sessionStorage.getItem('lineUpKey') == 1){
254
+        if(sessionStorage.getItem('signIn') != null){
255
+            if(sessionStorage.getItem('signIn') == 2){
256
                 this.dialogTableVisible = true
256
                 this.dialogTableVisible = true
257
             }
257
             }
258
+            sessionStorage.removeItem('signIn')
258
         }
259
         }
259
         this.initData = {
260
         this.initData = {
260
             cmd: "queue/join",
261
             cmd: "queue/join",
326
             this.updateTime()
327
             this.updateTime()
327
         }, 1000);
328
         }, 1000);
328
         this.newTimes = setInterval(() => {
329
         this.newTimes = setInterval(() => {
329
-            this.reload()
330
+            // this.reload()
331
+            sessionStorage.setItem('signIn',2);
332
+            window.location.reload()
330
         }, 1000 * 60 * 30);
333
         }, 1000 * 60 * 30);
331
     },
334
     },
332
     beforeDestroy(){
335
     beforeDestroy(){
334
         this.timer = null
337
         this.timer = null
335
         clearInterval(this.timerID);
338
         clearInterval(this.timerID);
336
         this.timerID = null;  // 清除定时器
339
         this.timerID = null;  // 清除定时器
337
-        clearInterval(this.newTimes);  // 清除定时器
338
-        this.newTimes = null
340
+        // clearInterval(this.newTimes);  // 清除定时器
341
+        // this.newTimes = null
339
         let unObj = {
342
         let unObj = {
340
             cmd:'queue/unjoin',
343
             cmd:'queue/unjoin',
341
             data:{type:2}
344
             data:{type:2}
394
                         // })
397
                         // })
395
                     }else if(res.channel == 'patientCallInfo'){
398
                     }else if(res.channel == 'patientCallInfo'){
396
                         console.log(999999999999,res.data)
399
                         console.log(999999999999,res.data)
397
-                        
398
-                        
400
+                        let second = res.data.second
401
+                    
399
                         console.log('执行几次',this.voiceNum)
402
                         console.log('执行几次',this.voiceNum)
400
                         if(this.voice == true){
403
                         if(this.voice == true){
401
                             this.patient_id = res.data.patientInfo.patient_id
404
                             this.patient_id = res.data.patientInfo.patient_id
423
                                     clearInterval(this.voiceTime);
426
                                     clearInterval(this.voiceTime);
424
                                     this.voiceTime = null
427
                                     this.voiceTime = null
425
                                 }
428
                                 }
426
-                            },6000)
429
+                            },1000 * second)
427
                         }else {
430
                         }else {
428
                             // this.$message({
431
                             // this.$message({
429
                             //     message: '警告哦,这是一条警告消息',
432
                             //     message: '警告哦,这是一条警告消息',

+ 11 - 3
src/xt_pages/sign/signIn.vue View File

170
         },
170
         },
171
     },
171
     },
172
     created(){
172
     created(){
173
-        if(sessionStorage.getItem('signInKey') != null){
174
-            if(sessionStorage.getItem('signInKey') == 1){
173
+        if(sessionStorage.getItem('signIn') != null){
174
+            if(sessionStorage.getItem('signIn') == 1){
175
                 this.dialogTableVisible = true
175
                 this.dialogTableVisible = true
176
             }
176
             }
177
+            sessionStorage.removeItem('signIn')
177
         }
178
         }
179
+        // if(sessionStorage.getItem('signInKey') != null){
180
+        //     if(sessionStorage.getItem('signInKey') == 1){
181
+        //         this.dialogTableVisible = true
182
+        //     }
183
+        // }
178
         this.initData = {
184
         this.initData = {
179
             cmd: "queue/join",
185
             cmd: "queue/join",
180
             data: {type:1,page:1,size:10},
186
             data: {type:1,page:1,size:10},
210
         }, 1000);
216
         }, 1000);
211
         // this.updateTime();
217
         // this.updateTime();
212
         this.newTimes = setInterval(() => {
218
         this.newTimes = setInterval(() => {
213
-            this.reload()
219
+            // this.reload()
220
+            sessionStorage.setItem('signIn',1);
221
+            window.location.reload()
214
         }, 1000 * 60 * 30);
222
         }, 1000 * 60 * 30);
215
     },
223
     },
216
     beforeDestroy(){
224
     beforeDestroy(){

+ 6 - 6
src/xt_pages/stock/detail/print.vue View File

31
 
31
 
32
               <td style="line-height: 50px" width="80">数量</td>
32
               <td style="line-height: 50px" width="80">数量</td>
33
               <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
33
               <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
34
-             <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
34
+              <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
35
               <td style="line-height: 50px" width="80" v-if="type == 1 || type == 3">总价</td>
35
               <td style="line-height: 50px" width="80" v-if="type == 1 || type == 3">总价</td>
36
               <td style="line-height: 50px" width="">备 注</td>
36
               <td style="line-height: 50px" width="">备 注</td>
37
             </tr>
37
             </tr>
40
               <td style="line-height: 50px">&nbsp;
40
               <td style="line-height: 50px">&nbsp;
41
                 {{index+1}}
41
                 {{index+1}}
42
               </td>
42
               </td>
43
-               <td style="line-height: 50px">
43
+              <td style="line-height: 50px">
44
                 <span>{{stock.good_name}}</span>
44
                 <span>{{stock.good_name}}</span>
45
               </td>
45
               </td>
46
-               <td style="line-height: 50px">
46
+              <td style="line-height: 50px">
47
                 <span v-if="stock">{{stock.specification_name}}</span>
47
                 <span v-if="stock">{{stock.specification_name}}</span>
48
               </td>
48
               </td>
49
               <td style="line-height: 50px">
49
               <td style="line-height: 50px">
287
       getUnit(id){
287
       getUnit(id){
288
         var name = ""
288
         var name = ""
289
         for(let i=0;i<this.goodUnit.length;i++){
289
         for(let i=0;i<this.goodUnit.length;i++){
290
-           if(this.goodUnit[i].id == id){
291
-              name = this.goodUnit[i].name
292
-           }
290
+          if(this.goodUnit[i].id == id){
291
+            name = this.goodUnit[i].name
292
+          }
293
         }
293
         }
294
         return name
294
         return name
295
       }
295
       }

+ 25 - 5
src/xt_pages/stock/stockQuery.vue View File

310
     calculate: function(val) {
310
     calculate: function(val) {
311
       return Math.round(parseFloat(val) * 100) / 100;
311
       return Math.round(parseFloat(val) * 100) / 100;
312
     },
312
     },
313
-    startTimeChange: function() {
314
-      this.GetAllStockQuery();
313
+    startTimeChange: function(val) {
314
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
315
+      
316
+      if (time > 0) {
317
+        this.$message.error("开始时间不能大于结束时间");
318
+        this.start_time = "";
319
+      } else {
320
+        this.GetAllStockQuery();
321
+      }
315
     },
322
     },
316
-    endTimeChange: function() {
317
-      this.GetAllStockQuery();
323
+    endTimeChange: function(val) {
324
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
325
+      if (time < 0) {
326
+        this.$message.error("结束时间不能小于开始时间");
327
+        this.end_time = "";
328
+      } else {
329
+        this.GetAllStockQuery();
330
+      }
331
+     
318
     },
332
     },
319
     stockInCount: function(row) {
333
     stockInCount: function(row) {
320
       let total = 0;
334
       let total = 0;
331
       return total;
345
       return total;
332
     },
346
     },
333
     stockOutCount: function(row) {
347
     stockOutCount: function(row) {
348
+      console.log("row------",row)
334
       let total = 0;
349
       let total = 0;
335
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
336
         total = total + row.query_warehouseout_info[i].count;
351
         total = total + row.query_warehouseout_info[i].count;
386
            } 
401
            } 
387
         }
402
         }
388
         return name
403
         return name
389
-      }
404
+      },
405
+
406
+      getTimestamp(time) {
407
+      // 把时间日期转成时间戳
408
+      return new Date(time).getTime() / 1000;
409
+    },
390
   }
410
   }
391
 };
411
 };
392
 </script>
412
 </script>

+ 16 - 1
src/xt_pages/workforce/next_remind_print.vue View File

145
         var resp = rs.data
145
         var resp = rs.data
146
         console.log(resp)
146
         console.log(resp)
147
         if (resp.state == 1) {
147
         if (resp.state == 1) {
148
-          this.scheduleData = resp.data.schedule
148
+         var scheduleData = resp.data.schedule
149
+
150
+         for(let i=0;i<scheduleData.length;i++){
151
+             scheduleData[i].sort = scheduleData[i].number.sort
152
+          }
153
+          var arr = scheduleData.sort(this.compare('sort'))
154
+          console.log("打印数据",arr)
155
+          this.scheduleData = arr
149
         } else {
156
         } else {
150
           this.$message.error(resp.msg)
157
           this.$message.error(resp.msg)
151
         }
158
         }
281
         }
288
         }
282
         
289
         
283
         
290
         
291
+      },
292
+
293
+       compare(property) {
294
+       return function (a, b) {
295
+          var value1 = a[property];
296
+          var value2 = b[property];
297
+          return value1 - value2;
284
       }
298
       }
299
+     },
285
     }
300
     }
286
   }
301
   }
287
 </script>
302
 </script>

+ 17 - 4
src/xt_pages/workforce/remind_print.vue View File

134
         var resp = rs.data
134
         var resp = rs.data
135
         console.log(resp)
135
         console.log(resp)
136
         if (resp.state == 1) {
136
         if (resp.state == 1) {
137
-          this.scheduleData = resp.data.schdules
137
+           var scheduleData = resp.data.schdules
138
+           console.log("树",scheduleData)
139
+          for(let i=0;i<scheduleData.length;i++){
140
+             scheduleData[i].sort = scheduleData[i].number.sort
141
+          }
142
+          var arr = scheduleData.sort(this.compare('sort'))
143
+          console.log("打印数据",arr)
144
+          this.scheduleData = arr
138
         } else {
145
         } else {
139
           this.$message.error(resp.msg)
146
           this.$message.error(resp.msg)
140
         }
147
         }
267
         }else{
274
         }else{
268
           var str = year + "年" + month + "月" + day + "日  " + days;
275
           var str = year + "年" + month + "月" + day + "日  " + days;
269
           return str;
276
           return str;
270
-        }
271
-        
272
-        
277
+        } 
278
+      },
279
+      compare(property) {
280
+       return function (a, b) {
281
+          var value1 = a[property];
282
+          var value2 = b[property];
283
+          return value1 - value2;
273
       }
284
       }
285
+     },
274
     }
286
     }
287
+   
275
   }
288
   }
276
 </script>
289
 </script>
277
 
290