Selaa lähdekoodia

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 10 kuukautta sitten
vanhempi
commit
1cb00d4635

+ 39 - 58
src/xt_pages/Dialysisanalysis/summary/index.vue Näytä tiedosto

@@ -40,64 +40,9 @@
40 40
           color: '#606266'
41 41
         }"
42 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 v-for="column in columns" :key="column.prop" :prop="column.prop?column.prop:''" :label="column.label?column.label:''">
44
+                  </el-table-column>
45
+
101 46
               </el-table>
102 47
             </div>
103 48
           </div>
@@ -119,7 +64,10 @@ export default {
119 64
         BreadCrumb,
120 65
     },
121 66
     data() {
67
+
122 68
         return {
69
+          tableData: [], // 数据源
70
+          columns: [], // 表头
123 71
           start_month:new Date(new Date().getFullYear(), new Date().getMonth()).toLocaleDateString('en-CA'),
124 72
           start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
125 73
           end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
@@ -201,6 +149,24 @@ export default {
201 149
         GetFiveInstatistisc(params).then(response => {
202 150
           if (response.data.state == 1) {
203 151
             this.patientTableData  =  response.data.data.list
152
+
153
+            this.columns = Object.keys(response.data.data.list[0]).map(key => ({
154
+              prop: key,
155
+              label: key // 可以自定义表头名称
156
+            }));
157
+            // this.tableData = response.data.data.list
158
+
159
+
160
+            this.tableData = response.data.data.list.map(row => {
161
+              let newRow = {};
162
+              for (let key in row) {
163
+                newRow[key] = row[key] === 0 ? '' : row[key];
164
+              }
165
+              return newRow;
166
+            });
167
+
168
+            // 将 JSON 数据设置为表格数据
169
+
204 170
           } else {
205 171
             this.$message.error(response.data.msg)
206 172
           }
@@ -219,6 +185,21 @@ export default {
219 185
     },created() {
220 186
       this.getData()
221 187
 
188
+  },computed: {
189
+    processedTableData() {
190
+      // 处理数据,将值为0的情况设为空字符串
191
+      return this.tableData.map(row => {
192
+        let newRow = {};
193
+        for (let key in row) {
194
+          if (row[key] === 0) {
195
+            newRow[key] = '';
196
+          } else {
197
+            newRow[key] = row[key];
198
+          }
199
+        }
200
+        return newRow;
201
+      });
202
+    }
222 203
   }
223 204
 }
224 205
 </script>

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Näytä tiedosto

@@ -5304,7 +5304,7 @@ mu
5304 5304
       'dialysisPrescription.prescription_water':function(){
5305 5305
         if(this.$store.getters.xt_user.template_info.org_id==10598){
5306 5306
            
5307
-          if(this.dialysisPrescription.mode_id == 3){
5307
+          if(this.dialysisPrescription.mode_id == 2 || this.dialysisPrescription.mode_id == 3){
5308 5308
              this.dialysisPrescription.target_ultrafiltration = parseFloat(this.dialysisPrescription.prescription_water)  + 0.3
5309 5309
           }else{
5310 5310
             if(this.dialysisPrescription.prescription_water > this.dialysisPrescription.target_ultrafiltration){

+ 1 - 3
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Näytä tiedosto

@@ -961,9 +961,7 @@
961 961
             align="center"
962 962
             label="Kt/V"
963 963
             width="140"
964
-            v-if="
965
-              isShow('KT/V') &&
966
-              (org_id == 9987 || org_id == 10215 || org_id == 9800 || org_id == 9598 || org_id ==10517)
964
+            v-if="isShow('KT/V')
967 965
             "
968 966
           >
969 967
             <template slot-scope="scope">

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue Näytä tiedosto

@@ -47,7 +47,7 @@
47 47
           <th v-if="isShow('脱水')" width="92px">脱水(L)</th>
48 48
           <th v-if="isShow('滤前压')" width="92px">滤前压(mmHg)</th>
49 49
         
50
-          <th v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800 || org_id ==  9598)" width="92px">Kt/V</th>
50
+          <th v-if="isShow('KT/V')" width="92px">Kt/V</th>
51 51
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
52 52
 
53 53
           <th v-if="isShow('处理')" width="92px">处理</th>
@@ -102,7 +102,7 @@
102 102
           <th v-if="isShow('脱水')" width="92px">{{monitor.dehydration ? monitor.dehydration : ""}}</th>
103 103
           <th v-if="isShow('滤前压')" width="92px">{{monitor.filter_pressure ? monitor.filter_pressure : ""}}</th>
104 104
           
105
-          <td v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800 || org_id ==  9598 || org_id ==10517)">{{ monitor.ktv?monitor.ktv:""}}</td>
105
+          <td v-if="isShow('KT/V')">{{ monitor.ktv?monitor.ktv:""}}</td>
106 106
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}
107 107
             <span v-if="(index == monitores.length-1) && (org_id == 0 || org_id == 10340)">累计血容量:{{monitor.accumulated_blood_volume }}L</span>
108 108
           </td>

+ 5 - 0
src/xt_pages/dialysis/details/index.vue Näytä tiedosto

@@ -536,6 +536,11 @@
536 536
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
537 537
                   </span>
538 538
                 </div>
539
+                <div class="printCell" style="display:flex;" v-if="org_id ==10598 || org_id == 0">
540
+                  <div style="">透析时长:
541
+                   <span>{{main_collection.prescription.dialysis_duration_hour }}小时 <span v-if="main_collection.prescription.dialysis_duration_minute>0">{{main_collection.prescription.dialysis_duration_minute }}分 </span></span>
542
+                  </div>
543
+                </div>
539 544
               </div>
540 545
             </div>
541 546
 

+ 4 - 1
src/xt_pages/hospitalStation/components/chargeDialog.vue Näytä tiedosto

@@ -181,7 +181,7 @@
181 181
     <span slot="footer" class="dialog-footer">
182 182
     <el-button @click="cancel('formValue')">取 消</el-button>
183 183
 <!--      <el-button @click="init">调试</el-button>-->
184
-    <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
184
+    <el-button type="primary" :disabled="isdisable" @click="confirm('formValue')">确 定</el-button>
185 185
   </span>
186 186
   </el-dialog>
187 187
 </template>
@@ -201,6 +201,7 @@
201 201
       return {
202 202
         tmp_pay: "",
203 203
         isshow: false,
204
+        isdisable:false,
204 205
         id: 0,
205 206
         decimal: 0,//当前押金余额
206 207
         record_date: '',
@@ -394,6 +395,7 @@
394 395
 
395 396
         },
396 397
         hide: function() {
398
+          this.isdisable = false
397 399
           this.form = Object.assign({}, this.resetForm);
398 400
           this.loadingtwo = false;
399 401
           this.visibility = false
@@ -411,6 +413,7 @@
411 413
           }
412 414
           this.$refs['formValue'].validate((valid) => {
413 415
             if (valid) {
416
+              this.isdisable = true
414 417
               let value = {};
415 418
               value = this.getValue();
416 419
               this.$emit('confirm', value);

+ 242 - 129
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Näytä tiedosto

@@ -378,6 +378,7 @@
378 378
                   </div>
379 379
 
380 380
                 </div>
381
+                
381 382
                 <div class="printCell" style="display:flex;">
382 383
                   <span style="display: block;width: 45%;">
383 384
                     床号:{{ main_collection.number.number }}
@@ -639,6 +640,11 @@
639 640
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
640 641
                   </span>
641 642
                 </div>
643
+                <div class="printCell" style="display:flex;" v-if="org_id ==10598 || org_id == 0">
644
+                  <div style="">透析时长:
645
+                   <span>{{main_collection.prescription.dialysis_duration_hour }}小时 <span v-if="main_collection.prescription.dialysis_duration_minute>0">{{main_collection.prescription.dialysis_duration_minute }}分</span></span>
646
+                  </div>
647
+                </div>
642 648
               </div>
643 649
             </div>
644 650
           </div>
@@ -1990,9 +1996,11 @@ export default {
1990 1996
               //   }
1991 1997
               //   tempAddition.push(obj)
1992 1998
               // }
1999
+              console.log("test2")
2000
+
1993 2001
 
1994 2002
               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) {
2003
+              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 2004
                 if (prescription.pre_time == 0) {
1997 2005
                   if (this.schedule.schedule_type == 1) {
1998 2006
                     if (this.org_id == 10028) {
@@ -2016,9 +2024,27 @@ export default {
2016 2024
                 } else {
2017 2025
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2018 2026
                 }
2027
+
2019 2028
               } else {
2029
+                console.log("test")
2020 2030
                 if (prescription.pre_time == 0) {
2021
-                  preTime = nowTime
2031
+                  console.log("++=========")
2032
+                  console.log(nowTime.split(" ")[0])
2033
+                  console.log(this.record_date)
2034
+                  console.log("++=========")
2035
+
2036
+                  if(nowTime.split(" ")[0] != this.record_date){
2037
+                    // preTime = this.record_date
2038
+                    if(this.schedule.schedule_type == 1){
2039
+                      preTime = this.record_date + ' ' + '7:00'
2040
+                    }else if(this.schedule.schedule_type == 2){
2041
+                      preTime = this.record_date + ' ' + '11:00'
2042
+
2043
+                    }else{
2044
+                      preTime = this.record_date + ' ' + '17:00'
2045
+                    }
2046
+
2047
+                  }
2022 2048
                 } else {
2023 2049
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2024 2050
                 }
@@ -2039,8 +2065,9 @@ export default {
2039 2065
               }
2040 2066
               this.prescriptions.push(obj)
2041 2067
             }
2042
-          } else {
2043 2068
 
2069
+          } else {
2070
+            console.log("----======0000000")
2044 2071
             if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2045 2072
               for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2046 2073
                 var prescription = response.data.data.sch_prescriptions[i]
@@ -2183,6 +2210,20 @@ export default {
2183 2210
                     preTime = this.record_date + ' ' + '17:00'
2184 2211
                   }
2185 2212
                 }
2213
+                console.log("++=========")
2214
+                console.log(nowTime.split(" ")[0])
2215
+                console.log(this.record_date)
2216
+                console.log("++=========")
2217
+                if(nowTime.split(" ")[0] != this.record_date){
2218
+                  if(this.schedule.schedule_type == 1){
2219
+                    preTime = this.record_date + ' ' + '7:00'
2220
+                  }else if(this.schedule.schedule_type == 2){
2221
+                    preTime = this.record_date + ' ' + '11:00'
2222
+
2223
+                  }else{
2224
+                    preTime = this.record_date + ' ' + '17:00'
2225
+                  }
2226
+                }
2186 2227
 
2187 2228
                 let index = i + 1
2188 2229
                 let obj = {
@@ -2217,6 +2258,25 @@ export default {
2217 2258
               }
2218 2259
 
2219 2260
             } else {
2261
+              console.log("----======1111111")
2262
+              console.log(nowTime.split(" ")[0])
2263
+              console.log(this.record_date)
2264
+
2265
+              if(nowTime.split(" ")[0] != this.record_date){
2266
+                // preTime = this.record_date
2267
+                if(this.schedule.schedule_type == 1){
2268
+                  preTime = this.record_date + ' ' + '7:00'
2269
+                }else if(this.schedule.schedule_type == 2){
2270
+                  preTime = this.record_date + ' ' + '11:00'
2271
+
2272
+                }else{
2273
+                  preTime = this.record_date + ' ' + '17:00'
2274
+                }
2275
+
2276
+              }else{
2277
+
2278
+                preTime = nowTime
2279
+              }
2220 2280
               let obj = {
2221 2281
                 id: 0,
2222 2282
                 name: '处方' + 1,
@@ -2224,7 +2284,7 @@ export default {
2224 2284
                 project: [],
2225 2285
                 addition: [],
2226 2286
                 order_status: 0,
2227
-                pre_time: nowTime,
2287
+                pre_time: preTime,
2228 2288
                 med_type: '',
2229 2289
                 is_medicine_status: false
2230 2290
               }
@@ -2523,7 +2583,17 @@ export default {
2523 2583
                       }
2524 2584
                     } else {
2525 2585
                       if (prescription.pre_time == 0) {
2526
-                        preTime = nowTime
2586
+                        if(nowTime.split(" ")[0] != this.record_date){
2587
+                          if(this.schedule.schedule_type == 1){
2588
+                            preTime = this.record_date + ' ' + '7:00'
2589
+                          }else if(this.schedule.schedule_type == 2){
2590
+                            preTime = this.record_date + ' ' + '11:00'
2591
+
2592
+                          }else{
2593
+                            preTime = this.record_date + ' ' + '17:00'
2594
+                          }
2595
+                        }
2596
+                        // preTime = nowTime
2527 2597
                       } else {
2528 2598
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2529 2599
                       }
@@ -2692,6 +2762,16 @@ export default {
2692 2762
                           preTime = this.record_date + ' ' + '17:00'
2693 2763
                         }
2694 2764
                       }
2765
+                      if(nowTime.split(" ")[0] != this.record_date){
2766
+                        if(this.schedule.schedule_type == 1){
2767
+                          preTime = this.record_date + ' ' + '7:00'
2768
+                        }else if(this.schedule.schedule_type == 2){
2769
+                          preTime = this.record_date + ' ' + '11:00'
2770
+
2771
+                        }else{
2772
+                          preTime = this.record_date + ' ' + '17:00'
2773
+                        }
2774
+                      }
2695 2775
 
2696 2776
                       let index = i + 1
2697 2777
                       let obj = {
@@ -2724,6 +2804,18 @@ export default {
2724 2804
                     }
2725 2805
 
2726 2806
                   } else {
2807
+                    if(nowTime.split(" ")[0] != this.record_date){
2808
+                      if(this.schedule.schedule_type == 1){
2809
+                        preTime = this.record_date + ' ' + '7:00'
2810
+                      }else if(this.schedule.schedule_type == 2){
2811
+                        preTime = this.record_date + ' ' + '11:00'
2812
+
2813
+                      }else{
2814
+                        preTime = this.record_date + ' ' + '17:00'
2815
+                      }
2816
+                    }else{
2817
+                      preTime = nowTime
2818
+                    }
2727 2819
                     let obj = {
2728 2820
                       id: 0,
2729 2821
                       name: '处方' + 1,
@@ -2731,7 +2823,7 @@ export default {
2731 2823
                       project: [],
2732 2824
                       addition: [],
2733 2825
                       order_status: 0,
2734
-                      pre_time: nowTime,
2826
+                      pre_time: preTime,
2735 2827
                       med_type: ''
2736 2828
 
2737 2829
                     }
@@ -3091,7 +3183,17 @@ export default {
3091 3183
                     var preTime = ''
3092 3184
 
3093 3185
                     if (prescription.pre_time == 0) {
3094
-                      preTime = nowTime
3186
+                      // preTime = nowTime
3187
+                      if(nowTime.split(" ")[0] != this.record_date){
3188
+                        if(this.schedule.schedule_type == 1){
3189
+                          preTime = this.record_date + ' ' + '7:00'
3190
+                        }else if(this.schedule.schedule_type == 2){
3191
+                          preTime = this.record_date + ' ' + '11:00'
3192
+
3193
+                        }else{
3194
+                          preTime = this.record_date + ' ' + '17:00'
3195
+                        }
3196
+                      }
3095 3197
                     } else {
3096 3198
                       preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3097 3199
                     }
@@ -3232,6 +3334,16 @@ export default {
3232 3334
                       }
3233 3335
 
3234 3336
                       var preTime = nowTime
3337
+                      if(nowTime.split(" ")[0] != this.record_date){
3338
+                        if(this.schedule.schedule_type == 1){
3339
+                          preTime = this.record_date + ' ' + '7:00'
3340
+                        }else if(this.schedule.schedule_type == 2){
3341
+                          preTime = this.record_date + ' ' + '11:00'
3342
+
3343
+                        }else{
3344
+                          preTime = this.record_date + ' ' + '17:00'
3345
+                        }
3346
+                      }
3235 3347
 
3236 3348
                       let index = i + 1
3237 3349
                       let obj = {
@@ -3262,6 +3374,19 @@ export default {
3262 3374
                     }
3263 3375
 
3264 3376
                   } else {
3377
+                    if(nowTime.split(" ")[0] != this.record_date){
3378
+                      if(this.schedule.schedule_type == 1){
3379
+                        preTime = this.record_date + ' ' + '7:00'
3380
+                      }else if(this.schedule.schedule_type == 2){
3381
+                        preTime = this.record_date + ' ' + '11:00'
3382
+
3383
+                      }else{
3384
+                        preTime = this.record_date + ' ' + '17:00'
3385
+                      }
3386
+                    }else{
3387
+
3388
+                      preTime = nowTime
3389
+                    }
3265 3390
                     let obj = {
3266 3391
                       id: 0,
3267 3392
                       name: '处方' + 1,
@@ -3269,7 +3394,7 @@ export default {
3269 3394
                       project: [],
3270 3395
                       addition: [],
3271 3396
                       order_status: 0,
3272
-                      pre_time: nowTime,
3397
+                      pre_time: preTime,
3273 3398
                       med_type: ''
3274 3399
 
3275 3400
                     }
@@ -3614,7 +3739,17 @@ export default {
3614 3739
                   var preTime = ''
3615 3740
 
3616 3741
                   if (prescription.pre_time == 0) {
3617
-                    preTime = nowTime
3742
+                    // preTime = nowTime
3743
+                    if(nowTime.split(" ")[0] != this.record_date){
3744
+                      if(this.schedule.schedule_type == 1){
3745
+                        preTime = this.record_date + ' ' + '7:00'
3746
+                      }else if(this.schedule.schedule_type == 2){
3747
+                        preTime = this.record_date + ' ' + '11:00'
3748
+
3749
+                      }else{
3750
+                        preTime = this.record_date + ' ' + '17:00'
3751
+                      }
3752
+                    }
3618 3753
                   } else {
3619 3754
                     preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3620 3755
                   }
@@ -3754,6 +3889,16 @@ export default {
3754 3889
                     }
3755 3890
 
3756 3891
                     var preTime = nowTime
3892
+                    if(nowTime.split(" ")[0] != this.record_date){
3893
+                      if(this.schedule.schedule_type == 1){
3894
+                        preTime = this.record_date + ' ' + '7:00'
3895
+                      }else if(this.schedule.schedule_type == 2){
3896
+                        preTime = this.record_date + ' ' + '11:00'
3897
+
3898
+                      }else{
3899
+                        preTime = this.record_date + ' ' + '17:00'
3900
+                      }
3901
+                    }
3757 3902
 
3758 3903
                     let index = i + 1
3759 3904
                     let obj = {
@@ -3785,6 +3930,19 @@ export default {
3785 3930
                   }
3786 3931
 
3787 3932
                 } else {
3933
+                  if(nowTime.split(" ")[0] != this.record_date){
3934
+                    if(this.schedule.schedule_type == 1){
3935
+                      preTime = this.record_date + ' ' + '7:00'
3936
+                    }else if(this.schedule.schedule_type == 2){
3937
+                      preTime = this.record_date + ' ' + '11:00'
3938
+
3939
+                    }else{
3940
+                      preTime = this.record_date + ' ' + '17:00'
3941
+                    }
3942
+                  }else{
3943
+
3944
+                    preTime = nowTime
3945
+                  }
3788 3946
                   let obj = {
3789 3947
                     id: 0,
3790 3948
                     name: '处方' + 1,
@@ -3792,7 +3950,7 @@ export default {
3792 3950
                     project: [],
3793 3951
                     addition: [],
3794 3952
                     order_status: 0,
3795
-                    pre_time: nowTime,
3953
+                    pre_time: preTime,
3796 3954
                     med_type: ''
3797 3955
 
3798 3956
                   }
@@ -4250,8 +4408,19 @@ export default {
4250 4408
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4251 4409
                       }
4252 4410
                     } else {
4411
+                      console.log("0---00000000000")
4253 4412
                       if (prescription.pre_time == 0) {
4254
-                        preTime = nowTime
4413
+                        // preTime = nowTime
4414
+                        if(nowTime.split(" ")[0] != this.record_date){
4415
+                          if(this.schedule.schedule_type == 1){
4416
+                            preTime = this.record_date + ' ' + '7:00'
4417
+                          }else if(this.schedule.schedule_type == 2){
4418
+                            preTime = this.record_date + ' ' + '11:00'
4419
+
4420
+                          }else{
4421
+                            preTime = this.record_date + ' ' + '17:00'
4422
+                          }
4423
+                        }
4255 4424
                       } else {
4256 4425
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4257 4426
                       }
@@ -4416,6 +4585,16 @@ export default {
4416 4585
                           preTime = this.record_date + ' ' + '17:00'
4417 4586
                         }
4418 4587
                       }
4588
+                      if(nowTime.split(" ")[0] != this.record_date){
4589
+                        if(this.schedule.schedule_type == 1){
4590
+                          preTime = this.record_date + ' ' + '7:00'
4591
+                        }else if(this.schedule.schedule_type == 2){
4592
+                          preTime = this.record_date + ' ' + '11:00'
4593
+
4594
+                        }else{
4595
+                          preTime = this.record_date + ' ' + '17:00'
4596
+                        }
4597
+                      }
4419 4598
 
4420 4599
                       let index = i + 1
4421 4600
                       let obj = {
@@ -4453,6 +4632,21 @@ export default {
4453 4632
                     }
4454 4633
 
4455 4634
                   } else {
4635
+
4636
+                    if(nowTime.split(" ")[0] != this.record_date){
4637
+                      if(this.schedule.schedule_type == 1){
4638
+                        preTime = this.record_date + ' ' + '7:00'
4639
+                      }else if(this.schedule.schedule_type == 2){
4640
+                        preTime = this.record_date + ' ' + '11:00'
4641
+
4642
+                      }else{
4643
+                        preTime = this.record_date + ' ' + '17:00'
4644
+                      }
4645
+                    }else{
4646
+                      preTime = nowTime
4647
+                    }
4648
+
4649
+
4456 4650
                     let obj = {
4457 4651
                       id: 0,
4458 4652
                       name: '处方' + 1,
@@ -4460,7 +4654,7 @@ export default {
4460 4654
                       project: [],
4461 4655
                       addition: [],
4462 4656
                       order_status: 0,
4463
-                      pre_time: nowTime,
4657
+                      pre_time: preTime,
4464 4658
                       med_type: ''
4465 4659
 
4466 4660
                     }
@@ -4472,122 +4666,6 @@ export default {
4472 4666
 
4473 4667
                     this.prescriptions.push(obj)
4474 4668
 
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 4669
                   }
4592 4670
                 }
4593 4671
                 console.log("jin5")
@@ -4935,6 +5013,16 @@ export default {
4935 5013
                     } else {
4936 5014
                       if (prescription.pre_time == 0) {
4937 5015
                         preTime = nowTime
5016
+                        if(nowTime.split(" ")[0] != this.record_date){
5017
+                          if(this.schedule.schedule_type == 1){
5018
+                            preTime = this.record_date + ' ' + '7:00'
5019
+                          }else if(this.schedule.schedule_type == 2){
5020
+                            preTime = this.record_date + ' ' + '11:00'
5021
+
5022
+                          }else{
5023
+                            preTime = this.record_date + ' ' + '17:00'
5024
+                          }
5025
+                        }
4938 5026
 
4939 5027
                       } else {
4940 5028
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
@@ -5101,6 +5189,16 @@ export default {
5101 5189
                           preTime = this.record_date + ' ' + '17:00'
5102 5190
                         }
5103 5191
                       }
5192
+                      if(nowTime.split(" ")[0] != this.record_date){
5193
+                        if(this.schedule.schedule_type == 1){
5194
+                          preTime = this.record_date + ' ' + '7:00'
5195
+                        }else if(this.schedule.schedule_type == 2){
5196
+                          preTime = this.record_date + ' ' + '11:00'
5197
+
5198
+                        }else{
5199
+                          preTime = this.record_date + ' ' + '17:00'
5200
+                        }
5201
+                      }
5104 5202
 
5105 5203
                       let index = i + 1
5106 5204
                       let obj = {
@@ -5138,6 +5236,21 @@ export default {
5138 5236
                     }
5139 5237
 
5140 5238
                   } else {
5239
+                    if(nowTime.split(" ")[0] != this.record_date){
5240
+                      if(this.schedule.schedule_type == 1){
5241
+                        preTime = this.record_date + ' ' + '7:00'
5242
+                      }else if(this.schedule.schedule_type == 2){
5243
+                        preTime = this.record_date + ' ' + '11:00'
5244
+
5245
+                      }else{
5246
+                        preTime = this.record_date + ' ' + '17:00'
5247
+                      }
5248
+                    }else{
5249
+
5250
+                      preTime = nowTime
5251
+                    }
5252
+
5253
+
5141 5254
                     let obj = {
5142 5255
                       id: 0,
5143 5256
                       name: '处方' + 1,
@@ -5145,7 +5258,7 @@ export default {
5145 5258
                       project: [],
5146 5259
                       addition: [],
5147 5260
                       order_status: 0,
5148
-                      pre_time: nowTime,
5261
+                      pre_time: preTime,
5149 5262
                       med_type: ''
5150 5263
 
5151 5264
                     }

+ 2 - 0
src/xt_pages/role/admin.vue Näytä tiedosto

@@ -240,6 +240,8 @@
240 240
           icon="el-icon-circle-plus-outline"
241 241
           style="float:left"
242 242
           @click="toZiDuanJiaoBen">字段脚本</el-button> -->
243
+
244
+
243 245
      </div>
244 246
 
245 247
 

+ 2 - 2
src/xt_pages/stock/drugs/components/drugQuery.vue Näytä tiedosto

@@ -207,12 +207,12 @@
207 207
                     @click="handleBatch(scope.row)"
208 208
                     >批次
209 209
                     </el-button>
210
-                    <!-- <el-button
210
+                    <el-button
211 211
                       size="small"
212 212
                       type="primary"
213 213
                       @click="handleCheckBatch(scope.row)"
214 214
                       >自查
215
-                    </el-button> -->
215
+                    </el-button>
216 216
                 </template>
217 217
 
218 218
                  

+ 2 - 2
src/xt_pages/stock/drugs/drugStockOutOrder.vue Näytä tiedosto

@@ -456,7 +456,7 @@
456 456
 
457 457
            
458 458
           </el-table-column>
459
-          <!-- <el-table-column label="自查自检" align="center">
459
+          <el-table-column label="自查自检" align="center">
460 460
             <template slot-scope="scope">
461 461
               <span style="color: #589ff8" @click="getDrugPatientName(scope.row)"
462 462
                 >自查</span
@@ -464,7 +464,7 @@
464 464
             </template>
465 465
 
466 466
            
467
-          </el-table-column> -->
467
+          </el-table-column>
468 468
         </el-table>
469 469
       </div>
470 470
     </div>

+ 28 - 2
src/xt_pages/stock/drugs/newDrugInventory.vue Näytä tiedosto

@@ -74,7 +74,7 @@
74 74
 
75 75
             <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
76 76
             <template slot-scope="scope">
77
-                <el-input style="width:100px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
77
+                <el-input style="width:100px" v-model="scope.row.last_stock_max_number" @input="getSupplyCount(scope.row.warehousing_count,scope.row.max_unit,scope.row.last_stock_max_number,scope.row.max_unit,scope.row.last_stock_min_number,scope.row.min_unit,scope.row.XtBaseDrug.min_number,scope.row.XtBaseDrug.max_unit,scope.row.XtBaseDrug.min_unit)"></el-input>{{scope.row.max_unit}}
78 78
                 <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span> 
79 79
                 </template> 
80 80
             </el-table-column>
@@ -193,6 +193,31 @@ export default {
193 193
         }
194 194
     },
195 195
     methods:{
196
+        getSupplyCount(warehousing_count,max_unit,last_stock_max_number,max_unit_one,last_stock_min_number,min_unit_one,base_min_number,base_max_unit,base_min_unit){
197
+          
198
+          var total_one  = 0
199
+          var total_two =0
200
+
201
+          if(max_unit == base_max_unit && base_max_unit!=base_min_unit){
202
+             total_one = warehousing_count *base_min_number
203
+          }
204
+
205
+          if(max_unit == base_min_unit && base_max_unit!=base_min_unit){
206
+            total_one = warehousing_count 
207
+          }
208
+          if(max_unit == base_min_unit && base_max_unit==base_min_unit){
209
+            total_one = warehousing_count 
210
+          }
211
+
212
+          total_two = last_stock_max_number * base_min_number + last_stock_min_number 
213
+         
214
+          console.log("total_one",total_one)
215
+          console.log("total_two",total_two)
216
+          if(total_two > total_one){
217
+            this.$message.error("盘点后数量大于该批次入库数量!")
218
+          }
219
+          
220
+        },   
196 221
         changeNumber(val){
197 222
           this.form.warehouse_info_id = val
198 223
           this.getDrugWarehouseInfoTotal(val)
@@ -830,7 +855,8 @@ export default {
830 855
             this.tableData = list
831 856
         }
832 857
       }) 
833
-    }
858
+    },
859
+    
834 860
     },
835 861
     created(){
836 862
       this.unitList =  this.getDataConfig('hemodialysis','units')

+ 9 - 1
src/xt_pages/stock/newInventory.vue Näytä tiedosto

@@ -71,7 +71,7 @@
71 71
 
72 72
              <el-table-column prop="name" label="盘点后数量" width="120"  align="center">
73 73
                 <template slot-scope="scope">
74
-                  <el-input style="width:80px" v-model="scope.row.last_stock_count"></el-input>
74
+                  <el-input style="width:80px" v-model="scope.row.last_stock_count"  @input="getSupplyCount(scope.row.warehousing_count,scope.row.last_stock_count)"></el-input>
75 75
                  </template> 
76 76
               </el-table-column>
77 77
 
@@ -469,6 +469,14 @@ export default {
469 469
        }  
470 470
      })    
471 471
     },
472
+    getSupplyCount(val1,val2){
473
+      // console.log("val2",val2)
474
+      // console.log("val1",val1)
475
+      if(val2 >val1){
476
+        console.log("JINLAAAA")
477
+         this.$message.error("盘点后数量大于该批次入库数量!")
478
+      }
479
+    }
472 480
     
473 481
    },
474 482