陈少旭 1 gadu atpakaļ
vecāks
revīzija
993a5d4d85

+ 47 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Parādīt failu

@@ -1509,6 +1509,7 @@ export default {
1509 1509
         var hours = nowDate.getHours()
1510 1510
         var min = nowDate.getMinutes()
1511 1511
 
1512
+        var preTime = ""
1512 1513
         var nowTime =
1513 1514
           nowYear +
1514 1515
           '-' +
@@ -1516,7 +1517,19 @@ export default {
1516 1517
           '-' +
1517 1518
           (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1518 1519
           ':' + (min < 10 ? '0' + min : min)
1519
-        this.prescriptions[i]['pre_time'] = nowTime
1520
+        if(nowTime.split(" ")[0] != this.record_date){
1521
+          if(this.org_id == 10206  || this.org_id == 0) {
1522
+            preTime = this.record_date+ ' '  + (hours < 10 ? '0' + hours : hours) +
1523
+              ':' + (min < 10 ? '0' + min : min)
1524
+          }else {
1525
+            preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1526
+              ':' + (min < 10 ? '0' + min : min)
1527
+          }
1528
+        } else {
1529
+          preTime = nowTime
1530
+        }
1531
+
1532
+        this.prescriptions[i]['pre_time'] = preTime
1520 1533
 
1521 1534
         this.prescriptions[i].name = '处方' + (i + 1)
1522 1535
         if (i == 0) {
@@ -1569,9 +1582,23 @@ export default {
1569 1582
         '-' +
1570 1583
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1571 1584
         ':' + (min < 10 ? '0' + min : min)
1585
+      var preTime  = ""
1586
+      console.log(nowTime.split(" ")[0] )
1587
+      console.log(this.record_date)
1588
+
1589
+      if(nowTime.split(" ")[0] != this.record_date){
1590
+          preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1591
+            ':' + (min < 10 ? '0' + min : min)
1592
+      } else {
1593
+        preTime = nowTime
1594
+      }
1595
+
1596
+
1597
+
1598
+
1572 1599
       for (let i = 0; i < this.prescriptions.length; i++) {
1573 1600
         this.prescriptions[i].name = '处方' + (i + 1)
1574
-        this.prescriptions[i]['pre_time'] = nowTime
1601
+        this.prescriptions[i]['pre_time'] = preTime
1575 1602
 
1576 1603
         if (i == 0) {
1577 1604
           if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
@@ -3226,6 +3253,23 @@ export default {
3226 3253
         '-' +
3227 3254
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
3228 3255
         ':' + (min < 10 ? '0' + min : min)
3256
+
3257
+
3258
+      var preTime  = ""
3259
+      console.log(nowTime.split(" ")[0] )
3260
+      console.log(this.record_date)
3261
+
3262
+      if(nowTime.split(" ")[0] != this.record_date){
3263
+
3264
+            preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
3265
+              ':' + (min < 10 ? '0' + min : min)
3266
+
3267
+      } else {
3268
+        preTime = nowTime
3269
+      }
3270
+
3271
+
3272
+
3229 3273
       let obj = {
3230 3274
         id: 0,
3231 3275
         name: newTabName,
@@ -3233,7 +3277,7 @@ export default {
3233 3277
         advices: [],
3234 3278
         project: [],
3235 3279
         addition: [],
3236
-        pre_time: nowTime
3280
+        pre_time: preTime
3237 3281
 
3238 3282
       }
3239 3283