Przeglądaj źródła

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

yq1 10 miesięcy temu
rodzic
commit
1cb00d4635

+ 39 - 58
src/xt_pages/Dialysisanalysis/summary/index.vue Wyświetl plik

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 v-for="column in columns" :key="column.prop" :prop="column.prop?column.prop:''" :label="column.label?column.label:''">
44
+                  </el-table-column>
45
+
101
               </el-table>
46
               </el-table>
102
             </div>
47
             </div>
103
           </div>
48
           </div>
119
         BreadCrumb,
64
         BreadCrumb,
120
     },
65
     },
121
     data() {
66
     data() {
67
+
122
         return {
68
         return {
69
+          tableData: [], // 数据源
70
+          columns: [], // 表头
123
           start_month:new Date(new Date().getFullYear(), new Date().getMonth()).toLocaleDateString('en-CA'),
71
           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'),
72
           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'),
73
           end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
201
         GetFiveInstatistisc(params).then(response => {
149
         GetFiveInstatistisc(params).then(response => {
202
           if (response.data.state == 1) {
150
           if (response.data.state == 1) {
203
             this.patientTableData  =  response.data.data.list
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
           } else {
170
           } else {
205
             this.$message.error(response.data.msg)
171
             this.$message.error(response.data.msg)
206
           }
172
           }
219
     },created() {
185
     },created() {
220
       this.getData()
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
 </script>
205
 </script>

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Wyświetl plik

5304
       'dialysisPrescription.prescription_water':function(){
5304
       'dialysisPrescription.prescription_water':function(){
5305
         if(this.$store.getters.xt_user.template_info.org_id==10598){
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
              this.dialysisPrescription.target_ultrafiltration = parseFloat(this.dialysisPrescription.prescription_water)  + 0.3
5308
              this.dialysisPrescription.target_ultrafiltration = parseFloat(this.dialysisPrescription.prescription_water)  + 0.3
5309
           }else{
5309
           }else{
5310
             if(this.dialysisPrescription.prescription_water > this.dialysisPrescription.target_ultrafiltration){
5310
             if(this.dialysisPrescription.prescription_water > this.dialysisPrescription.target_ultrafiltration){

+ 1 - 3
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Wyświetl plik

961
             align="center"
961
             align="center"
962
             label="Kt/V"
962
             label="Kt/V"
963
             width="140"
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
             <template slot-scope="scope">
967
             <template slot-scope="scope">

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue Wyświetl plik

47
           <th v-if="isShow('脱水')" width="92px">脱水(L)</th>
47
           <th v-if="isShow('脱水')" width="92px">脱水(L)</th>
48
           <th v-if="isShow('滤前压')" width="92px">滤前压(mmHg)</th>
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
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
51
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
52
 
52
 
53
           <th v-if="isShow('处理')" width="92px">处理</th>
53
           <th v-if="isShow('处理')" width="92px">处理</th>
102
           <th v-if="isShow('脱水')" width="92px">{{monitor.dehydration ? monitor.dehydration : ""}}</th>
102
           <th v-if="isShow('脱水')" width="92px">{{monitor.dehydration ? monitor.dehydration : ""}}</th>
103
           <th v-if="isShow('滤前压')" width="92px">{{monitor.filter_pressure ? monitor.filter_pressure : ""}}</th>
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
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}
106
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}
107
             <span v-if="(index == monitores.length-1) && (org_id == 0 || org_id == 10340)">累计血容量:{{monitor.accumulated_blood_volume }}L</span>
107
             <span v-if="(index == monitores.length-1) && (org_id == 0 || org_id == 10340)">累计血容量:{{monitor.accumulated_blood_volume }}L</span>
108
           </td>
108
           </td>

+ 5 - 0
src/xt_pages/dialysis/details/index.vue Wyświetl plik

536
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
536
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
537
                   </span>
537
                   </span>
538
                 </div>
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
               </div>
544
               </div>
540
             </div>
545
             </div>
541
 
546
 

+ 4 - 1
src/xt_pages/hospitalStation/components/chargeDialog.vue Wyświetl plik

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

+ 242 - 129
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Wyświetl plik

378
                   </div>
378
                   </div>
379
 
379
 
380
                 </div>
380
                 </div>
381
+                
381
                 <div class="printCell" style="display:flex;">
382
                 <div class="printCell" style="display:flex;">
382
                   <span style="display: block;width: 45%;">
383
                   <span style="display: block;width: 45%;">
383
                     床号:{{ main_collection.number.number }}
384
                     床号:{{ main_collection.number.number }}
639
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
640
                     血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
640
                   </span>
641
                   </span>
641
                 </div>
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
               </div>
648
               </div>
643
             </div>
649
             </div>
644
           </div>
650
           </div>
1990
               //   }
1996
               //   }
1991
               //   tempAddition.push(obj)
1997
               //   tempAddition.push(obj)
1992
               // }
1998
               // }
1999
+              console.log("test2")
2000
+
1993
 
2001
 
1994
               var preTime = nowTime
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
                 if (prescription.pre_time == 0) {
2004
                 if (prescription.pre_time == 0) {
1997
                   if (this.schedule.schedule_type == 1) {
2005
                   if (this.schedule.schedule_type == 1) {
1998
                     if (this.org_id == 10028) {
2006
                     if (this.org_id == 10028) {
2016
                 } else {
2024
                 } else {
2017
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2025
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2018
                 }
2026
                 }
2027
+
2019
               } else {
2028
               } else {
2029
+                console.log("test")
2020
                 if (prescription.pre_time == 0) {
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
                 } else {
2048
                 } else {
2023
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2049
                   preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2024
                 }
2050
                 }
2039
               }
2065
               }
2040
               this.prescriptions.push(obj)
2066
               this.prescriptions.push(obj)
2041
             }
2067
             }
2042
-          } else {
2043
 
2068
 
2069
+          } else {
2070
+            console.log("----======0000000")
2044
             if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2071
             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++) {
2072
               for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2046
                 var prescription = response.data.data.sch_prescriptions[i]
2073
                 var prescription = response.data.data.sch_prescriptions[i]
2183
                     preTime = this.record_date + ' ' + '17:00'
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
                 let index = i + 1
2228
                 let index = i + 1
2188
                 let obj = {
2229
                 let obj = {
2217
               }
2258
               }
2218
 
2259
 
2219
             } else {
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
               let obj = {
2280
               let obj = {
2221
                 id: 0,
2281
                 id: 0,
2222
                 name: '处方' + 1,
2282
                 name: '处方' + 1,
2224
                 project: [],
2284
                 project: [],
2225
                 addition: [],
2285
                 addition: [],
2226
                 order_status: 0,
2286
                 order_status: 0,
2227
-                pre_time: nowTime,
2287
+                pre_time: preTime,
2228
                 med_type: '',
2288
                 med_type: '',
2229
                 is_medicine_status: false
2289
                 is_medicine_status: false
2230
               }
2290
               }
2523
                       }
2583
                       }
2524
                     } else {
2584
                     } else {
2525
                       if (prescription.pre_time == 0) {
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
                       } else {
2597
                       } else {
2528
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2598
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
2529
                       }
2599
                       }
2692
                           preTime = this.record_date + ' ' + '17:00'
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
                       let index = i + 1
2776
                       let index = i + 1
2697
                       let obj = {
2777
                       let obj = {
2724
                     }
2804
                     }
2725
 
2805
 
2726
                   } else {
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
                     let obj = {
2819
                     let obj = {
2728
                       id: 0,
2820
                       id: 0,
2729
                       name: '处方' + 1,
2821
                       name: '处方' + 1,
2731
                       project: [],
2823
                       project: [],
2732
                       addition: [],
2824
                       addition: [],
2733
                       order_status: 0,
2825
                       order_status: 0,
2734
-                      pre_time: nowTime,
2826
+                      pre_time: preTime,
2735
                       med_type: ''
2827
                       med_type: ''
2736
 
2828
 
2737
                     }
2829
                     }
3091
                     var preTime = ''
3183
                     var preTime = ''
3092
 
3184
 
3093
                     if (prescription.pre_time == 0) {
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
                     } else {
3197
                     } else {
3096
                       preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3198
                       preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3097
                     }
3199
                     }
3232
                       }
3334
                       }
3233
 
3335
 
3234
                       var preTime = nowTime
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
                       let index = i + 1
3348
                       let index = i + 1
3237
                       let obj = {
3349
                       let obj = {
3262
                     }
3374
                     }
3263
 
3375
 
3264
                   } else {
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
                     let obj = {
3390
                     let obj = {
3266
                       id: 0,
3391
                       id: 0,
3267
                       name: '处方' + 1,
3392
                       name: '处方' + 1,
3269
                       project: [],
3394
                       project: [],
3270
                       addition: [],
3395
                       addition: [],
3271
                       order_status: 0,
3396
                       order_status: 0,
3272
-                      pre_time: nowTime,
3397
+                      pre_time: preTime,
3273
                       med_type: ''
3398
                       med_type: ''
3274
 
3399
 
3275
                     }
3400
                     }
3614
                   var preTime = ''
3739
                   var preTime = ''
3615
 
3740
 
3616
                   if (prescription.pre_time == 0) {
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
                   } else {
3753
                   } else {
3619
                     preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3754
                     preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
3620
                   }
3755
                   }
3754
                     }
3889
                     }
3755
 
3890
 
3756
                     var preTime = nowTime
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
                     let index = i + 1
3903
                     let index = i + 1
3759
                     let obj = {
3904
                     let obj = {
3785
                   }
3930
                   }
3786
 
3931
 
3787
                 } else {
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
                   let obj = {
3946
                   let obj = {
3789
                     id: 0,
3947
                     id: 0,
3790
                     name: '处方' + 1,
3948
                     name: '处方' + 1,
3792
                     project: [],
3950
                     project: [],
3793
                     addition: [],
3951
                     addition: [],
3794
                     order_status: 0,
3952
                     order_status: 0,
3795
-                    pre_time: nowTime,
3953
+                    pre_time: preTime,
3796
                     med_type: ''
3954
                     med_type: ''
3797
 
3955
 
3798
                   }
3956
                   }
4250
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4408
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4251
                       }
4409
                       }
4252
                     } else {
4410
                     } else {
4411
+                      console.log("0---00000000000")
4253
                       if (prescription.pre_time == 0) {
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
                       } else {
4424
                       } else {
4256
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4425
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
4257
                       }
4426
                       }
4416
                           preTime = this.record_date + ' ' + '17:00'
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
                       let index = i + 1
4599
                       let index = i + 1
4421
                       let obj = {
4600
                       let obj = {
4453
                     }
4632
                     }
4454
 
4633
 
4455
                   } else {
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
                     let obj = {
4650
                     let obj = {
4457
                       id: 0,
4651
                       id: 0,
4458
                       name: '处方' + 1,
4652
                       name: '处方' + 1,
4460
                       project: [],
4654
                       project: [],
4461
                       addition: [],
4655
                       addition: [],
4462
                       order_status: 0,
4656
                       order_status: 0,
4463
-                      pre_time: nowTime,
4657
+                      pre_time: preTime,
4464
                       med_type: ''
4658
                       med_type: ''
4465
 
4659
 
4466
                     }
4660
                     }
4472
 
4666
 
4473
                     this.prescriptions.push(obj)
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
                 console.log("jin5")
4671
                 console.log("jin5")
4935
                     } else {
5013
                     } else {
4936
                       if (prescription.pre_time == 0) {
5014
                       if (prescription.pre_time == 0) {
4937
                         preTime = nowTime
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
                       } else {
5027
                       } else {
4940
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
5028
                         preTime = this.getTime(prescription.pre_time, '{y}-{m}-{d} {h}:{i}')
5101
                           preTime = this.record_date + ' ' + '17:00'
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
                       let index = i + 1
5203
                       let index = i + 1
5106
                       let obj = {
5204
                       let obj = {
5138
                     }
5236
                     }
5139
 
5237
 
5140
                   } else {
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
                     let obj = {
5254
                     let obj = {
5142
                       id: 0,
5255
                       id: 0,
5143
                       name: '处方' + 1,
5256
                       name: '处方' + 1,
5145
                       project: [],
5258
                       project: [],
5146
                       addition: [],
5259
                       addition: [],
5147
                       order_status: 0,
5260
                       order_status: 0,
5148
-                      pre_time: nowTime,
5261
+                      pre_time: preTime,
5149
                       med_type: ''
5262
                       med_type: ''
5150
 
5263
 
5151
                     }
5264
                     }

+ 2 - 0
src/xt_pages/role/admin.vue Wyświetl plik

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

+ 2 - 2
src/xt_pages/stock/drugs/components/drugQuery.vue Wyświetl plik

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

+ 2 - 2
src/xt_pages/stock/drugs/drugStockOutOrder.vue Wyświetl plik

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

+ 28 - 2
src/xt_pages/stock/drugs/newDrugInventory.vue Wyświetl plik

74
 
74
 
75
             <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
75
             <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
76
             <template slot-scope="scope">
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
                 <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> 
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
                 </template> 
79
                 </template> 
80
             </el-table-column>
80
             </el-table-column>
193
         }
193
         }
194
     },
194
     },
195
     methods:{
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
         changeNumber(val){
221
         changeNumber(val){
197
           this.form.warehouse_info_id = val
222
           this.form.warehouse_info_id = val
198
           this.getDrugWarehouseInfoTotal(val)
223
           this.getDrugWarehouseInfoTotal(val)
830
             this.tableData = list
855
             this.tableData = list
831
         }
856
         }
832
       }) 
857
       }) 
833
-    }
858
+    },
859
+    
834
     },
860
     },
835
     created(){
861
     created(){
836
       this.unitList =  this.getDataConfig('hemodialysis','units')
862
       this.unitList =  this.getDataConfig('hemodialysis','units')

+ 9 - 1
src/xt_pages/stock/newInventory.vue Wyświetl plik

71
 
71
 
72
              <el-table-column prop="name" label="盘点后数量" width="120"  align="center">
72
              <el-table-column prop="name" label="盘点后数量" width="120"  align="center">
73
                 <template slot-scope="scope">
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
                  </template> 
75
                  </template> 
76
               </el-table-column>
76
               </el-table-column>
77
 
77
 
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