Browse Source

提交代码

陈少旭 9 months ago
parent
commit
4c9a6aa324

+ 98 - 58
src/xt_pages/Dialysisanalysis/summary/index.vue View File

40
           color: '#606266'
40
           color: '#606266'
41
         }"
41
         }"
42
                 style="width: 100%;">
42
                 style="width: 100%;">
43
-                <el-table-column type="index" label="序号" align="center" width="60">
44
-                </el-table-column>
45
-                <el-table-column
46
-                  prop="count"
47
-                  label="姓名"
48
-                >
49
-                  <template slot-scope="scope">
50
-                    {{ scope.row.name }}
51
-                  </template>
52
-                </el-table-column>
53
-                <el-table-column
54
-                  prop="count"
55
-                  label="月"
56
-                >
57
-                  <template slot-scope="scope">
58
-                    {{start_month.split("-")[1]}}
59
-                  </template>
60
-                </el-table-column>
61
-                <el-table-column
62
-                  prop="count"
63
-                  label="IPTH"
64
-                >
65
-                  <template slot-scope="scope">
66
-                    {{scope.row.ipth}}
67
-                  </template>
68
-                </el-table-column>
69
-                <el-table-column
70
-                  prop="count"
71
-                  label="血红蛋白"
72
-                >
73
-                  <template slot-scope="scope">
74
-                    {{scope.row.xhdb}}
75
-                  </template>
76
-                </el-table-column>
77
-                <el-table-column
78
-                  prop="count"
79
-                  label="血钾"
80
-                >
81
-                  <template slot-scope="scope">
82
-                    {{scope.row.xuejia}}
83
-                  </template>
84
-                </el-table-column>
85
-                <el-table-column
86
-                  prop="count"
87
-                  label="白蛋白"
88
-                >
89
-                  <template slot-scope="scope">
90
-                    {{scope.row.bdb}}
91
-                  </template>
92
-                </el-table-column>
93
-                <el-table-column
94
-                  prop="count"
95
-                  label="血磷"
96
-                >
97
-                  <template slot-scope="scope">
98
-                    {{scope.row.xuelin}}
99
-                  </template>
100
-                </el-table-column>
43
+<!--                <el-table-column type="index" label="序号" align="center" width="60">-->
44
+<!--                </el-table-column>-->
45
+<!--                <el-table-column-->
46
+<!--                  prop="count"-->
47
+<!--                  label="姓名"-->
48
+<!--                >-->
49
+<!--                  <template slot-scope="scope">-->
50
+<!--                    {{ scope.row.name }}-->
51
+<!--                  </template>-->
52
+<!--                </el-table-column>-->
53
+<!--                <el-table-column-->
54
+<!--                  prop="count"-->
55
+<!--                  label="月"-->
56
+<!--                >-->
57
+<!--                  <template slot-scope="scope">-->
58
+<!--                    {{start_month.split("-")[1]}}-->
59
+<!--                  </template>-->
60
+<!--                </el-table-column>-->
61
+<!--                <el-table-column-->
62
+<!--                  prop="count"-->
63
+<!--                  label="IPTH"-->
64
+<!--                >-->
65
+<!--                  <template slot-scope="scope">-->
66
+<!--                    {{scope.row.ipth}}-->
67
+<!--                  </template>-->
68
+<!--                </el-table-column>-->
69
+<!--                <el-table-column-->
70
+<!--                  prop="count"-->
71
+<!--                  label="血红蛋白"-->
72
+<!--                >-->
73
+<!--                  <template slot-scope="scope">-->
74
+<!--                    {{scope.row.xhdb}}-->
75
+<!--                  </template>-->
76
+<!--                </el-table-column>-->
77
+<!--                <el-table-column-->
78
+<!--                  prop="count"-->
79
+<!--                  label="血钾"-->
80
+<!--                >-->
81
+<!--                  <template slot-scope="scope">-->
82
+<!--                    {{scope.row.xuejia}}-->
83
+<!--                  </template>-->
84
+<!--                </el-table-column>-->
85
+<!--                <el-table-column-->
86
+<!--                  prop="count"-->
87
+<!--                  label="白蛋白"-->
88
+<!--                >-->
89
+<!--                  <template slot-scope="scope">-->
90
+<!--                    {{scope.row.bdb}}-->
91
+<!--                  </template>-->
92
+<!--                </el-table-column>-->
93
+<!--                <el-table-column-->
94
+<!--                  prop="count"-->
95
+<!--                  label="血磷"-->
96
+<!--                >-->
97
+<!--                  <template slot-scope="scope">-->
98
+<!--                    {{scope.row.xuelin}}-->
99
+<!--                  </template>-->
100
+<!--                </el-table-column>-->
101
+
102
+                  <el-table-column v-for="column in columns" :key="column.prop" :prop="column.prop?column.prop:''" :label="column.label?column.label:''">
103
+                  </el-table-column>
104
+
101
               </el-table>
105
               </el-table>
102
             </div>
106
             </div>
103
           </div>
107
           </div>
119
         BreadCrumb,
123
         BreadCrumb,
120
     },
124
     },
121
     data() {
125
     data() {
126
+
122
         return {
127
         return {
128
+          tableData: [], // 数据源
129
+          columns: [], // 表头
123
           start_month:new Date(new Date().getFullYear(), new Date().getMonth()).toLocaleDateString('en-CA'),
130
           start_month:new Date(new Date().getFullYear(), new Date().getMonth()).toLocaleDateString('en-CA'),
124
           start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
131
           start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
125
           end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
132
           end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
201
         GetFiveInstatistisc(params).then(response => {
208
         GetFiveInstatistisc(params).then(response => {
202
           if (response.data.state == 1) {
209
           if (response.data.state == 1) {
203
             this.patientTableData  =  response.data.data.list
210
             this.patientTableData  =  response.data.data.list
211
+
212
+            this.columns = Object.keys(response.data.data.list[0]).map(key => ({
213
+              prop: key,
214
+              label: key // 可以自定义表头名称
215
+            }));
216
+            // this.tableData = response.data.data.list
217
+
218
+
219
+            this.tableData = response.data.data.list.map(row => {
220
+              let newRow = {};
221
+              for (let key in row) {
222
+                newRow[key] = row[key] === 0 ? '' : row[key];
223
+              }
224
+              return newRow;
225
+            });
226
+
227
+            // 将 JSON 数据设置为表格数据
228
+
204
           } else {
229
           } else {
205
             this.$message.error(response.data.msg)
230
             this.$message.error(response.data.msg)
206
           }
231
           }
219
     },created() {
244
     },created() {
220
       this.getData()
245
       this.getData()
221
 
246
 
247
+  },computed: {
248
+    processedTableData() {
249
+      // 处理数据,将值为0的情况设为空字符串
250
+      return this.tableData.map(row => {
251
+        let newRow = {};
252
+        for (let key in row) {
253
+          if (row[key] === 0) {
254
+            newRow[key] = '';
255
+          } else {
256
+            newRow[key] = row[key];
257
+          }
258
+        }
259
+        return newRow;
260
+      });
261
+    }
222
   }
262
   }
223
 }
263
 }
224
 </script>
264
 </script>

+ 236 - 129
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

1990
               //   }
1990
               //   }
1991
               //   tempAddition.push(obj)
1991
               //   tempAddition.push(obj)
1992
               // }
1992
               // }
1993
+              console.log("test2")
1994
+
1993
 
1995
 
1994
               var preTime = nowTime
1996
               var preTime = nowTime
1995
-              if ( this.$store.getters.xt_user.org.id != 9919 && this.$store.getters.xt_user.org.id != 10485 && this.$store.getters.xt_user.org.id != 10191 && this.$store.getters.xt_user.org.id != 10375) {
1997
+              if ( this.$store.getters.xt_user.org.id != 9919 && this.$store.getters.xt_user.org.id != 10485 && this.$store.getters.xt_user.org.id != 10191 && this.$store.getters.xt_user.org.id != 10375 && this.$store.getters.xt_user.org.id != 0) {
1996
                 if (prescription.pre_time == 0) {
1998
                 if (prescription.pre_time == 0) {
1997
                   if (this.schedule.schedule_type == 1) {
1999
                   if (this.schedule.schedule_type == 1) {
1998
                     if (this.org_id == 10028) {
2000
                     if (this.org_id == 10028) {
2016
                 } else {
2018
                 } else {
2017
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2019
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2018
                 }
2020
                 }
2021
+
2019
               } else {
2022
               } else {
2023
+                console.log("test")
2020
                 if (prescription.pre_time == 0) {
2024
                 if (prescription.pre_time == 0) {
2021
-                  preTime = nowTime
2025
+                  console.log("++=========")
2026
+                  console.log(nowTime.split(" ")[0])
2027
+                  console.log(this.record_date)
2028
+                  console.log("++=========")
2029
+
2030
+                  if(nowTime.split(" ")[0] != this.record_date){
2031
+                    // preTime = this.record_date
2032
+                    if(this.schedule.schedule_type == 1){
2033
+                      preTime = this.record_date + ' ' + '7:00'
2034
+                    }else if(this.schedule.schedule_type == 2){
2035
+                      preTime = this.record_date + ' ' + '11:00'
2036
+
2037
+                    }else{
2038
+                      preTime = this.record_date + ' ' + '17:00'
2039
+                    }
2040
+
2041
+                  }
2022
                 } else {
2042
                 } else {
2023
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2043
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2024
                 }
2044
                 }
2039
               }
2059
               }
2040
               this.prescriptions.push(obj)
2060
               this.prescriptions.push(obj)
2041
             }
2061
             }
2042
-          } else {
2043
 
2062
 
2063
+          } else {
2064
+            console.log("----======0000000")
2044
             if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2065
             if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2045
               for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2066
               for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2046
                 var prescription = response.data.data.sch_prescriptions[i]
2067
                 var prescription = response.data.data.sch_prescriptions[i]
2183
                     preTime = this.record_date + ' ' + '17:00'
2204
                     preTime = this.record_date + ' ' + '17:00'
2184
                   }
2205
                   }
2185
                 }
2206
                 }
2207
+                console.log("++=========")
2208
+                console.log(nowTime.split(" ")[0])
2209
+                console.log(this.record_date)
2210
+                console.log("++=========")
2211
+                if(nowTime.split(" ")[0] != this.record_date){
2212
+                  if(this.schedule.schedule_type == 1){
2213
+                    preTime = this.record_date + ' ' + '7:00'
2214
+                  }else if(this.schedule.schedule_type == 2){
2215
+                    preTime = this.record_date + ' ' + '11:00'
2216
+
2217
+                  }else{
2218
+                    preTime = this.record_date + ' ' + '17:00'
2219
+                  }
2220
+                }
2186
 
2221
 
2187
                 let index = i + 1
2222
                 let index = i + 1
2188
                 let obj = {
2223
                 let obj = {
2217
               }
2252
               }
2218
 
2253
 
2219
             } else {
2254
             } else {
2255
+              console.log("----======1111111")
2256
+              console.log(nowTime.split(" ")[0])
2257
+              console.log(this.record_date)
2258
+
2259
+              if(nowTime.split(" ")[0] != this.record_date){
2260
+                // preTime = this.record_date
2261
+                if(this.schedule.schedule_type == 1){
2262
+                  preTime = this.record_date + ' ' + '7:00'
2263
+                }else if(this.schedule.schedule_type == 2){
2264
+                  preTime = this.record_date + ' ' + '11:00'
2265
+
2266
+                }else{
2267
+                  preTime = this.record_date + ' ' + '17:00'
2268
+                }
2269
+
2270
+              }else{
2271
+
2272
+                preTime = nowTime
2273
+              }
2220
               let obj = {
2274
               let obj = {
2221
                 id: 0,
2275
                 id: 0,
2222
                 name: '处方' + 1,
2276
                 name: '处方' + 1,
2224
                 project: [],
2278
                 project: [],
2225
                 addition: [],
2279
                 addition: [],
2226
                 order_status: 0,
2280
                 order_status: 0,
2227
-                pre_time: nowTime,
2281
+                pre_time: preTime,
2228
                 med_type: '',
2282
                 med_type: '',
2229
                 is_medicine_status: false
2283
                 is_medicine_status: false
2230
               }
2284
               }
2523
                       }
2577
                       }
2524
                     } else {
2578
                     } else {
2525
                       if (prescription.pre_time == 0) {
2579
                       if (prescription.pre_time == 0) {
2526
-                        preTime = nowTime
2580
+                        if(nowTime.split(" ")[0] != this.record_date){
2581
+                          if(this.schedule.schedule_type == 1){
2582
+                            preTime = this.record_date + ' ' + '7:00'
2583
+                          }else if(this.schedule.schedule_type == 2){
2584
+                            preTime = this.record_date + ' ' + '11:00'
2585
+
2586
+                          }else{
2587
+                            preTime = this.record_date + ' ' + '17:00'
2588
+                          }
2589
+                        }
2590
+                        // preTime = nowTime
2527
                       } else {
2591
                       } else {
2528
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2592
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2529
                       }
2593
                       }
2692
                           preTime = this.record_date + ' ' + '17:00'
2756
                           preTime = this.record_date + ' ' + '17:00'
2693
                         }
2757
                         }
2694
                       }
2758
                       }
2759
+                      if(nowTime.split(" ")[0] != this.record_date){
2760
+                        if(this.schedule.schedule_type == 1){
2761
+                          preTime = this.record_date + ' ' + '7:00'
2762
+                        }else if(this.schedule.schedule_type == 2){
2763
+                          preTime = this.record_date + ' ' + '11:00'
2764
+
2765
+                        }else{
2766
+                          preTime = this.record_date + ' ' + '17:00'
2767
+                        }
2768
+                      }
2695
 
2769
 
2696
                       let index = i + 1
2770
                       let index = i + 1
2697
                       let obj = {
2771
                       let obj = {
2724
                     }
2798
                     }
2725
 
2799
 
2726
                   } else {
2800
                   } else {
2801
+                    if(nowTime.split(" ")[0] != this.record_date){
2802
+                      if(this.schedule.schedule_type == 1){
2803
+                        preTime = this.record_date + ' ' + '7:00'
2804
+                      }else if(this.schedule.schedule_type == 2){
2805
+                        preTime = this.record_date + ' ' + '11:00'
2806
+
2807
+                      }else{
2808
+                        preTime = this.record_date + ' ' + '17:00'
2809
+                      }
2810
+                    }else{
2811
+                      preTime = nowTime
2812
+                    }
2727
                     let obj = {
2813
                     let obj = {
2728
                       id: 0,
2814
                       id: 0,
2729
                       name: '处方' + 1,
2815
                       name: '处方' + 1,
2731
                       project: [],
2817
                       project: [],
2732
                       addition: [],
2818
                       addition: [],
2733
                       order_status: 0,
2819
                       order_status: 0,
2734
-                      pre_time: nowTime,
2820
+                      pre_time: preTime,
2735
                       med_type: ''
2821
                       med_type: ''
2736
 
2822
 
2737
                     }
2823
                     }
3091
                     var preTime = ''
3177
                     var preTime = ''
3092
 
3178
 
3093
                     if (prescription.pre_time == 0) {
3179
                     if (prescription.pre_time == 0) {
3094
-                      preTime = nowTime
3180
+                      // preTime = nowTime
3181
+                      if(nowTime.split(" ")[0] != this.record_date){
3182
+                        if(this.schedule.schedule_type == 1){
3183
+                          preTime = this.record_date + ' ' + '7:00'
3184
+                        }else if(this.schedule.schedule_type == 2){
3185
+                          preTime = this.record_date + ' ' + '11:00'
3186
+
3187
+                        }else{
3188
+                          preTime = this.record_date + ' ' + '17:00'
3189
+                        }
3190
+                      }
3095
                     } else {
3191
                     } else {
3096
                       preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3192
                       preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3097
                     }
3193
                     }
3232
                       }
3328
                       }
3233
 
3329
 
3234
                       var preTime = nowTime
3330
                       var preTime = nowTime
3331
+                      if(nowTime.split(" ")[0] != this.record_date){
3332
+                        if(this.schedule.schedule_type == 1){
3333
+                          preTime = this.record_date + ' ' + '7:00'
3334
+                        }else if(this.schedule.schedule_type == 2){
3335
+                          preTime = this.record_date + ' ' + '11:00'
3336
+
3337
+                        }else{
3338
+                          preTime = this.record_date + ' ' + '17:00'
3339
+                        }
3340
+                      }
3235
 
3341
 
3236
                       let index = i + 1
3342
                       let index = i + 1
3237
                       let obj = {
3343
                       let obj = {
3262
                     }
3368
                     }
3263
 
3369
 
3264
                   } else {
3370
                   } else {
3371
+                    if(nowTime.split(" ")[0] != this.record_date){
3372
+                      if(this.schedule.schedule_type == 1){
3373
+                        preTime = this.record_date + ' ' + '7:00'
3374
+                      }else if(this.schedule.schedule_type == 2){
3375
+                        preTime = this.record_date + ' ' + '11:00'
3376
+
3377
+                      }else{
3378
+                        preTime = this.record_date + ' ' + '17:00'
3379
+                      }
3380
+                    }else{
3381
+
3382
+                      preTime = nowTime
3383
+                    }
3265
                     let obj = {
3384
                     let obj = {
3266
                       id: 0,
3385
                       id: 0,
3267
                       name: '处方' + 1,
3386
                       name: '处方' + 1,
3269
                       project: [],
3388
                       project: [],
3270
                       addition: [],
3389
                       addition: [],
3271
                       order_status: 0,
3390
                       order_status: 0,
3272
-                      pre_time: nowTime,
3391
+                      pre_time: preTime,
3273
                       med_type: ''
3392
                       med_type: ''
3274
 
3393
 
3275
                     }
3394
                     }
3614
                   var preTime = ''
3733
                   var preTime = ''
3615
 
3734
 
3616
                   if (prescription.pre_time == 0) {
3735
                   if (prescription.pre_time == 0) {
3617
-                    preTime = nowTime
3736
+                    // preTime = nowTime
3737
+                    if(nowTime.split(" ")[0] != this.record_date){
3738
+                      if(this.schedule.schedule_type == 1){
3739
+                        preTime = this.record_date + ' ' + '7:00'
3740
+                      }else if(this.schedule.schedule_type == 2){
3741
+                        preTime = this.record_date + ' ' + '11:00'
3742
+
3743
+                      }else{
3744
+                        preTime = this.record_date + ' ' + '17:00'
3745
+                      }
3746
+                    }
3618
                   } else {
3747
                   } else {
3619
                     preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3748
                     preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3620
                   }
3749
                   }
3754
                     }
3883
                     }
3755
 
3884
 
3756
                     var preTime = nowTime
3885
                     var preTime = nowTime
3886
+                    if(nowTime.split(" ")[0] != this.record_date){
3887
+                      if(this.schedule.schedule_type == 1){
3888
+                        preTime = this.record_date + ' ' + '7:00'
3889
+                      }else if(this.schedule.schedule_type == 2){
3890
+                        preTime = this.record_date + ' ' + '11:00'
3891
+
3892
+                      }else{
3893
+                        preTime = this.record_date + ' ' + '17:00'
3894
+                      }
3895
+                    }
3757
 
3896
 
3758
                     let index = i + 1
3897
                     let index = i + 1
3759
                     let obj = {
3898
                     let obj = {
3785
                   }
3924
                   }
3786
 
3925
 
3787
                 } else {
3926
                 } else {
3927
+                  if(nowTime.split(" ")[0] != this.record_date){
3928
+                    if(this.schedule.schedule_type == 1){
3929
+                      preTime = this.record_date + ' ' + '7:00'
3930
+                    }else if(this.schedule.schedule_type == 2){
3931
+                      preTime = this.record_date + ' ' + '11:00'
3932
+
3933
+                    }else{
3934
+                      preTime = this.record_date + ' ' + '17:00'
3935
+                    }
3936
+                  }else{
3937
+
3938
+                    preTime = nowTime
3939
+                  }
3788
                   let obj = {
3940
                   let obj = {
3789
                     id: 0,
3941
                     id: 0,
3790
                     name: '处方' + 1,
3942
                     name: '处方' + 1,
3792
                     project: [],
3944
                     project: [],
3793
                     addition: [],
3945
                     addition: [],
3794
                     order_status: 0,
3946
                     order_status: 0,
3795
-                    pre_time: nowTime,
3947
+                    pre_time: preTime,
3796
                     med_type: ''
3948
                     med_type: ''
3797
 
3949
 
3798
                   }
3950
                   }
4250
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4402
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4251
                       }
4403
                       }
4252
                     } else {
4404
                     } else {
4405
+                      console.log("0---00000000000")
4253
                       if (prescription.pre_time == 0) {
4406
                       if (prescription.pre_time == 0) {
4254
-                        preTime = nowTime
4407
+                        // preTime = nowTime
4408
+                        if(nowTime.split(" ")[0] != this.record_date){
4409
+                          if(this.schedule.schedule_type == 1){
4410
+                            preTime = this.record_date + ' ' + '7:00'
4411
+                          }else if(this.schedule.schedule_type == 2){
4412
+                            preTime = this.record_date + ' ' + '11:00'
4413
+
4414
+                          }else{
4415
+                            preTime = this.record_date + ' ' + '17:00'
4416
+                          }
4417
+                        }
4255
                       } else {
4418
                       } else {
4256
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4419
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4257
                       }
4420
                       }
4416
                           preTime = this.record_date + ' ' + '17:00'
4579
                           preTime = this.record_date + ' ' + '17:00'
4417
                         }
4580
                         }
4418
                       }
4581
                       }
4582
+                      if(nowTime.split(" ")[0] != this.record_date){
4583
+                        if(this.schedule.schedule_type == 1){
4584
+                          preTime = this.record_date + ' ' + '7:00'
4585
+                        }else if(this.schedule.schedule_type == 2){
4586
+                          preTime = this.record_date + ' ' + '11:00'
4587
+
4588
+                        }else{
4589
+                          preTime = this.record_date + ' ' + '17:00'
4590
+                        }
4591
+                      }
4419
 
4592
 
4420
                       let index = i + 1
4593
                       let index = i + 1
4421
                       let obj = {
4594
                       let obj = {
4453
                     }
4626
                     }
4454
 
4627
 
4455
                   } else {
4628
                   } else {
4629
+
4630
+                    if(nowTime.split(" ")[0] != this.record_date){
4631
+                      if(this.schedule.schedule_type == 1){
4632
+                        preTime = this.record_date + ' ' + '7:00'
4633
+                      }else if(this.schedule.schedule_type == 2){
4634
+                        preTime = this.record_date + ' ' + '11:00'
4635
+
4636
+                      }else{
4637
+                        preTime = this.record_date + ' ' + '17:00'
4638
+                      }
4639
+                    }else{
4640
+                      preTime = nowTime
4641
+                    }
4642
+
4643
+
4456
                     let obj = {
4644
                     let obj = {
4457
                       id: 0,
4645
                       id: 0,
4458
                       name: '处方' + 1,
4646
                       name: '处方' + 1,
4460
                       project: [],
4648
                       project: [],
4461
                       addition: [],
4649
                       addition: [],
4462
                       order_status: 0,
4650
                       order_status: 0,
4463
-                      pre_time: nowTime,
4651
+                      pre_time: preTime,
4464
                       med_type: ''
4652
                       med_type: ''
4465
 
4653
 
4466
                     }
4654
                     }
4472
 
4660
 
4473
                     this.prescriptions.push(obj)
4661
                     this.prescriptions.push(obj)
4474
 
4662
 
4475
-                    // if(response.data.data.count <= 1 ){
4476
-                    //   if(response.data.data.last_prescriptions.length == 0){
4477
-                    //     let obj = {
4478
-                    //       id: 0,
4479
-                    //       name: '处方' + 1,
4480
-                    //       advices: [],
4481
-                    //       project: [],
4482
-                    //       addition: [],
4483
-                    //       order_status: 0,
4484
-                    //       pre_time: nowTime,
4485
-                    //
4486
-                    //     };
4487
-                    //     this.prescriptions.push(obj)
4488
-                    //
4489
-                    //
4490
-                    //   }
4491
-                    //   else {
4492
-                    //     for (let i = 0; i < response.data.data.last_prescriptions.length; i++) {
4493
-                    //       var prescription = response.data.data.last_prescriptions[i];
4494
-                    //       let tempAdvice = [];
4495
-                    //       let tempProject = [];
4496
-                    //       let tempAddition = [];
4497
-                    //
4498
-                    //       //药品
4499
-                    //       for (let b = 0; b < prescription.advices.length; b++) {
4500
-                    //         let obj = {
4501
-                    //           advice_id:0,
4502
-                    //           drug_name: prescription.advices[b].advice_name,
4503
-                    //           single_dose: prescription.advices[b].single_dose,
4504
-                    //           delivery_way: prescription.advices[b].delivery_way,
4505
-                    //           execution_frequency: prescription.advices[b].execution_frequency,
4506
-                    //           retail_price: prescription.advices[b].price.toString(),
4507
-                    //           remark: prescription.advices[b].remark,
4508
-                    //           day: prescription.advices[b].day,
4509
-                    //           prescribing_number: prescription.advices[b].prescribing_number.toString(),
4510
-                    //           single_dose_unit: prescription.advices[b].single_dose_unit,
4511
-                    //           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
4512
-                    //           medical_insurance_number: prescription.advices[b].med_list_codg,
4513
-                    //           id: prescription.advices[b].drug_id,
4514
-                    //           drug:prescription.advices[b].drug
4515
-                    //
4516
-                    //         };
4517
-                    //         tempAdvice.push(obj)
4518
-                    //       }
4519
-                    //
4520
-                    //       //项目
4521
-                    //       for (let b = 0; b < prescription.project.length; b++) {
4522
-                    //         let obj = {
4523
-                    //           id:0,
4524
-                    //           project_id: prescription.project[b].project_id,
4525
-                    //           project_name: prescription.project[b].project.project_name,
4526
-                    //           statistical_classification: prescription.project[b].project.statistical_classification,
4527
-                    //           single_dose: prescription.project[b].single_dose,
4528
-                    //           delivery_way: prescription.project[b].delivery_way,
4529
-                    //           execution_frequency: prescription.project[b].execution_frequency,
4530
-                    //           number_days: prescription.project[b].day,
4531
-                    //           total: prescription.project[b].count.toString(),
4532
-                    //           price: prescription.project[b].price,
4533
-                    //           remark: prescription.project[b].remark,
4534
-                    //           medical_code: prescription.project[b].project.medical_code,
4535
-                    //           unit: prescription.project[b].project.unit,
4536
-                    //           type: prescription.project[b].type
4537
-                    //         };
4538
-                    //
4539
-                    //         if (prescription.project[b].type == 2) {
4540
-                    //           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
4541
-                    //           obj['medical_code'] = prescription.project[b].project.medical_code
4542
-                    //           obj['project_name'] = prescription.project[b].project.project_name
4543
-                    //
4544
-                    //         } else if (prescription.project[b].type == 3) {
4545
-                    //           obj['statistical_classification'] = ""
4546
-                    //           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
4547
-                    //           obj['project_name'] = prescription.project[b].good_info.good_name
4548
-                    //         }
4549
-                    //         tempProject.push(obj)
4550
-                    //       }
4551
-                    //
4552
-                    //       //附加收费
4553
-                    //       for (let b = 0; b < prescription.addition.length; b++) {
4554
-                    //         let obj = {
4555
-                    //           item_name: prescription.addition[b].item_name,
4556
-                    //           price: prescription.addition[b].price,
4557
-                    //           count: prescription.addition[b].count,
4558
-                    //           item_id: prescription.addition[b].item_id,
4559
-                    //         };
4560
-                    //         tempAddition.push(obj)
4561
-                    //       }
4562
-                    //
4563
-                    //       var preTime = nowTime
4564
-                    //
4565
-                    //       let index = i + 1;
4566
-                    //       let obj = {
4567
-                    //         id: 0,
4568
-                    //         name: '处方' + index,
4569
-                    //         advices: tempAdvice,
4570
-                    //         project: tempProject,
4571
-                    //         addition: tempAddition,
4572
-                    //         order_status: 1,
4573
-                    //         pre_time: preTime
4574
-                    //       };
4575
-                    //       this.prescriptions.push(obj)
4576
-                    //     }
4577
-                    //   }
4578
-                    // }else{
4579
-                    //   let obj = {
4580
-                    //     id: 0,
4581
-                    //     name: '处方' + 1,
4582
-                    //     advices: [],
4583
-                    //     project: [],
4584
-                    //     addition: [],
4585
-                    //     order_status: 0,
4586
-                    //     pre_time: nowTime,
4587
-                    //
4588
-                    //   };
4589
-                    //   this.prescriptions.push(obj)
4590
-                    // }
4591
                   }
4663
                   }
4592
                 }
4664
                 }
4593
                 console.log("jin5")
4665
                 console.log("jin5")
4935
                     } else {
5007
                     } else {
4936
                       if (prescription.pre_time == 0) {
5008
                       if (prescription.pre_time == 0) {
4937
                         preTime = nowTime
5009
                         preTime = nowTime
5010
+                        if(nowTime.split(" ")[0] != this.record_date){
5011
+                          if(this.schedule.schedule_type == 1){
5012
+                            preTime = this.record_date + ' ' + '7:00'
5013
+                          }else if(this.schedule.schedule_type == 2){
5014
+                            preTime = this.record_date + ' ' + '11:00'
5015
+
5016
+                          }else{
5017
+                            preTime = this.record_date + ' ' + '17:00'
5018
+                          }
5019
+                        }
4938
 
5020
 
4939
                       } else {
5021
                       } else {
4940
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
5022
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
5101
                           preTime = this.record_date + ' ' + '17:00'
5183
                           preTime = this.record_date + ' ' + '17:00'
5102
                         }
5184
                         }
5103
                       }
5185
                       }
5186
+                      if(nowTime.split(" ")[0] != this.record_date){
5187
+                        if(this.schedule.schedule_type == 1){
5188
+                          preTime = this.record_date + ' ' + '7:00'
5189
+                        }else if(this.schedule.schedule_type == 2){
5190
+                          preTime = this.record_date + ' ' + '11:00'
5191
+
5192
+                        }else{
5193
+                          preTime = this.record_date + ' ' + '17:00'
5194
+                        }
5195
+                      }
5104
 
5196
 
5105
                       let index = i + 1
5197
                       let index = i + 1
5106
                       let obj = {
5198
                       let obj = {
5138
                     }
5230
                     }
5139
 
5231
 
5140
                   } else {
5232
                   } else {
5233
+                    if(nowTime.split(" ")[0] != this.record_date){
5234
+                      if(this.schedule.schedule_type == 1){
5235
+                        preTime = this.record_date + ' ' + '7:00'
5236
+                      }else if(this.schedule.schedule_type == 2){
5237
+                        preTime = this.record_date + ' ' + '11:00'
5238
+
5239
+                      }else{
5240
+                        preTime = this.record_date + ' ' + '17:00'
5241
+                      }
5242
+                    }else{
5243
+
5244
+                      preTime = nowTime
5245
+                    }
5246
+
5247
+
5141
                     let obj = {
5248
                     let obj = {
5142
                       id: 0,
5249
                       id: 0,
5143
                       name: '处方' + 1,
5250
                       name: '处方' + 1,
5145
                       project: [],
5252
                       project: [],
5146
                       addition: [],
5253
                       addition: [],
5147
                       order_status: 0,
5254
                       order_status: 0,
5148
-                      pre_time: nowTime,
5255
+                      pre_time: preTime,
5149
                       med_type: ''
5256
                       med_type: ''
5150
 
5257
 
5151
                     }
5258
                     }