see999 3 년 전
부모
커밋
f99cb0fc66
1개의 변경된 파일86개의 추가작업 그리고 15개의 파일을 삭제
  1. 86 15
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue

+ 86 - 15
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 파일 보기

@@ -1276,6 +1276,7 @@
1276 1276
             this.case_history = response.data.data.case_history
1277 1277
             this.info = response.data.data.info
1278 1278
             this.last_info = response.data.data.last_info
1279
+            this.schedule = response.data.data.schedule
1279 1280
 
1280 1281
             this.doctors = response.data.data.doctors
1281 1282
             this.department = response.data.data.department
@@ -1413,7 +1414,14 @@
1413 1414
                 var preTime = "";
1414 1415
 
1415 1416
                 if (prescription.pre_time == 0) {
1416
-                  preTime = nowTime
1417
+                  if(this.schedule.schedule_type == 1){
1418
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1419
+                  }else if(this.schedule.schedule_type == 2){
1420
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1421
+                  }else if(this.schedule.schedule_type == 3){
1422
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1423
+                  }
1424
+                  // preTime = nowTime
1417 1425
                 } else {
1418 1426
                   preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1419 1427
                 }
@@ -1494,8 +1502,14 @@
1494 1502
                     tempProject.push(obj)
1495 1503
                   }
1496 1504
 
1497
-
1498
-                  var preTime = nowTime
1505
+                  if(this.schedule.schedule_type == 1){
1506
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1507
+                  }else if(this.schedule.schedule_type == 2){
1508
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1509
+                  }else if(this.schedule.schedule_type == 3){
1510
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1511
+                  }
1512
+                  
1499 1513
 
1500 1514
 
1501 1515
                   let index = i + 1;
@@ -1580,6 +1594,19 @@
1580 1594
                 'p_type':2,
1581 1595
 
1582 1596
               };
1597
+              var nowDate = new Date()
1598
+              var nowYear = nowDate.getFullYear()
1599
+              var nowMonth = nowDate.getMonth() + 1
1600
+              var nowDay = nowDate.getDate()
1601
+              var hours = nowDate.getHours()
1602
+              var min = nowDate.getMinutes()
1603
+              var nowTime =
1604
+                nowYear +
1605
+                '-' +
1606
+                (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
1607
+                '-' +
1608
+                (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1609
+                ':' + (min < 10 ? '0' + min : min)
1583 1610
               getPatientInfo(params).then(response => {
1584 1611
                 if (response.data.state == 0) {
1585 1612
                   this.$message.error(response.data.msg);
@@ -1598,6 +1625,7 @@
1598 1625
                   this.case_history = response.data.data.case_history;
1599 1626
                   this.info = response.data.data.info;
1600 1627
                   this.last_info = response.data.data.last_info
1628
+                  this.schedule = response.data.data.schedule
1601 1629
 
1602 1630
                   this.doctors = response.data.data.doctors;
1603 1631
                   this.department = response.data.data.department;
@@ -1729,7 +1757,14 @@
1729 1757
                       var preTime = "";
1730 1758
 
1731 1759
                       if (prescription.pre_time == 0) {
1732
-                        preTime = nowTime
1760
+                        // preTime = nowTime
1761
+                        if(this.schedule.schedule_type == 1){
1762
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1763
+                        }else if(this.schedule.schedule_type == 2){
1764
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1765
+                        }else if(this.schedule.schedule_type == 3){
1766
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1767
+                        }
1733 1768
                       } else {
1734 1769
                         preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1735 1770
                       }
@@ -1812,8 +1847,15 @@
1812 1847
                         }
1813 1848
 
1814 1849
 
1815
-                        var preTime = nowTime
1816
-
1850
+                        // var preTime = nowTime
1851
+                        var preTime = ''
1852
+                        if(this.schedule.schedule_type == 1){
1853
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1854
+                        }else if(this.schedule.schedule_type == 2){
1855
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1856
+                        }else if(this.schedule.schedule_type == 3){
1857
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1858
+                        }
1817 1859
 
1818 1860
 
1819 1861
 
@@ -1853,7 +1895,6 @@
1853 1895
                       }
1854 1896
 
1855 1897
                     }else{
1856
-
1857 1898
                       let obj = {
1858 1899
                         id: 0,
1859 1900
                         name: '处方' + 1,
@@ -2840,8 +2881,7 @@
2840 2881
               });
2841 2882
             this.$refs.child.watchSign = 0
2842 2883
           }
2843
-        }
2844
-        else{
2884
+        }else{
2845 2885
         var nowDate = new Date();
2846 2886
         var nowYear = nowDate.getFullYear();
2847 2887
         var nowMonth = nowDate.getMonth() + 1;
@@ -2924,6 +2964,7 @@
2924 2964
                 this.setMonthPrescription(month_prescriptions)
2925 2965
                 this.doctors = response.data.data.doctors
2926 2966
                 this.department = response.data.data.department
2967
+                this.schedule = response.data.data.schedule
2927 2968
 
2928 2969
                 for (let i = 0; i < this.doctors.length; i++) {
2929 2970
                   if (this.doctors[i].user_type == 1) {
@@ -3056,7 +3097,14 @@
3056 3097
                     var preTime = "";
3057 3098
 
3058 3099
                     if (prescription.pre_time == 0) {
3059
-                      preTime = nowTime
3100
+                      // preTime = nowTime
3101
+                      if(this.schedule.schedule_type == 1){
3102
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3103
+                      }else if(this.schedule.schedule_type == 2){
3104
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3105
+                      }else if(this.schedule.schedule_type == 3){
3106
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3107
+                      }
3060 3108
                     } else {
3061 3109
                       preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
3062 3110
                     }
@@ -3139,7 +3187,15 @@
3139 3187
                       }
3140 3188
 
3141 3189
 
3142
-                      var preTime = nowTime
3190
+                      // var preTime = nowTime
3191
+                      var preTime = ''
3192
+                      if(this.schedule.schedule_type == 1){
3193
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3194
+                      }else if(this.schedule.schedule_type == 2){
3195
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3196
+                      }else if(this.schedule.schedule_type == 3){
3197
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3198
+                      }
3143 3199
 
3144 3200
                       let index = i + 1;
3145 3201
                       let obj = {
@@ -3174,7 +3230,6 @@
3174 3230
                     }
3175 3231
 
3176 3232
                   }else{
3177
-
3178 3233
                     let obj = {
3179 3234
                       id: 0,
3180 3235
                       name: '处方' + 1,
@@ -3346,7 +3401,7 @@
3346 3401
               this.case_history = response.data.data.case_history
3347 3402
               this.info = response.data.data.info
3348 3403
               this.last_info = response.data.data.last_info
3349
-
3404
+              this.schedule = response.data.data.schedule
3350 3405
               this.doctors = response.data.data.doctors
3351 3406
               this.department = response.data.data.department
3352 3407
 
@@ -3475,9 +3530,17 @@
3475 3530
                   }
3476 3531
 
3477 3532
                   var preTime = "";
3533
+                  
3478 3534
 
3479 3535
                   if (prescription.pre_time == 0) {
3480
-                    preTime = nowTime
3536
+                    // preTime = nowTime
3537
+                    if(this.schedule.schedule_type == 1){
3538
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3539
+                    }else if(this.schedule.schedule_type == 2){
3540
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3541
+                    }else if(this.schedule.schedule_type == 3){
3542
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3543
+                    }
3481 3544
                   } else {
3482 3545
                     preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
3483 3546
                   }
@@ -3560,7 +3623,15 @@
3560 3623
                     }
3561 3624
 
3562 3625
 
3563
-                    var preTime = nowTime
3626
+                    // var preTime = nowTime
3627
+                    var preTime = ''
3628
+                    if(this.schedule.schedule_type == 1){
3629
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3630
+                    }else if(this.schedule.schedule_type == 2){
3631
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3632
+                    }else if(this.schedule.schedule_type == 3){
3633
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3634
+                    }
3564 3635
 
3565 3636
 
3566 3637
                     let index = i + 1;