XMLWAN vor 2 Jahren
Ursprung
Commit
747427cb29

+ 8 - 0
src/api/dialysis.js Datei anzeigen

@@ -347,3 +347,11 @@ export function getDialysisGoodTotalCount(params) {
347 347
     params: params
348 348
   })
349 349
 }
350
+
351
+export function getDialysisAdviceSchedudeList(params) {
352
+  return request({
353
+    url: '/api/patient/getdialysisadvicescheduelist',
354
+    method: 'get',
355
+    params: params
356
+  })
357
+}

+ 183 - 4
src/xt_pages/dialysis/details/consumable/dialysisDrug.vue Datei anzeigen

@@ -105,13 +105,79 @@
105 105
     >
106 106
     </el-pagination>
107 107
 
108
-   
108
+    
109
+     <el-dialog
110
+      title="药品统计表"
111
+      :visible.sync="startdialogVisible"
112
+      width="70%">
113
+      <span>
114
+        <div class="cell clearfix">
115
+          <label class="title"> <span class="name">排班班次</span> : </label>
116
+           <el-select v-model="schedule_type" placeholder="请选择">
117
+            <el-option
118
+              v-for="item in schedulArr"
119
+              :key="item.value"
120
+              :label="item.label"
121
+              :value="item.value">
122
+            </el-option>
123
+           </el-select>
124
+           <label class="title"> <span class="name">病区选择</span> : </label>
125
+           <el-select v-model="partion_type" placeholder="请选择">
126
+            <el-option
127
+              v-for="item in partitionArr"
128
+              :key="item.id"
129
+              :label="item.name"
130
+              :value="item.id">
131
+            </el-option>
132
+           </el-select>
133
+        </div> 
134
+       <el-table
135
+        :data="tableList"
136
+        border
137
+        :row-style="{ color: '#303133' }"
138
+        :header-cell-style="{
139
+          backgroundColor: 'rgb(245, 247, 250)',
140
+          color: '#606266'
141
+        }"
142
+      >
143
+         <el-table-column  align="center"  label="序号">
144
+           <template slot-scope="scope">
145
+              {{scope.$index+1}}
146
+           </template>
147
+        </el-table-column>
148
+        <el-table-column  align="center"   label="药品名称">
149
+         <template slot-scope="scope">
150
+            {{scope.row.advice_name}}
151
+          </template>
152
+        </el-table-column>
153
+        <el-table-column  align="center"  label="规格">
154
+           <template slot-scope="scope">
155
+             {{scope.row.specification_name}}
156
+           </template>
157
+        </el-table-column>
158
+       
159
+        <el-table-column  align="center"   label="数量">
160
+           <template slot-scope="scope">
161
+              {{getCount(scope.row.child)}}
162
+           </template>
163
+        </el-table-column>
164
+        
165
+     
166
+
167
+      </el-table>
168
+      </span>
169
+      <span slot="footer" class="dialog-footer">
170
+        <el-button @click="startdialogVisible = false">取 消</el-button>
171
+        <el-button type="primary" @click="startdialogVisible = false">确 定</el-button>
172
+      </span>
173
+    </el-dialog>
174
+
109 175
   </div>
110 176
 </template>
111 177
 
112 178
 
113 179
 <script>
114
-  import { GetAllZone,getDialysisAdviceTemplateList } from '@/api/dialysis'
180
+  import { GetAllZone,getDialysisAdviceTemplateList,getDialysisAdviceSchedudeList } from '@/api/dialysis'
115 181
 
116 182
   import { uParseTime } from "@/utils/tools";
117 183
 
@@ -125,6 +191,7 @@
125 191
           total:"",
126 192
           schedule_date:"",
127 193
           schedule_type:0,
194
+        
128 195
           partition_id:0,
129 196
           page:1,
130 197
           limit:10,
@@ -164,7 +231,12 @@
164 231
         arrList:[],
165 232
         total:0,
166 233
         adviceList:[],
167
-        templateList:[]
234
+        templateList:[],
235
+        startdialogVisible:false,
236
+        schedule_type:"",
237
+        partion_type:"",
238
+        druglist:[],
239
+        tableList:[],
168 240
       }
169 241
     },
170 242
     created() {
@@ -265,7 +337,92 @@
265 337
         })
266 338
       },
267 339
       statistics() {
268
-        this.$refs.consumables.show()
340
+          var params = {
341
+            schedule_type:this.schedule_type,
342
+            partion_type:this.partion_type,
343
+            selected_date:this.query.schedule_date,
344
+          }
345
+        console.log("params2332232wo",params)
346
+        getDialysisAdviceSchedudeList(params).then(response=>{
347
+          if(response.data.state == 1){
348
+             var doctorList = []
349
+             var hisDoctorList = []
350
+             var druglist = response.data.data.drug
351
+             console.log("druglsit",druglist)
352
+             this.druglist = druglist
353
+             this.startdialogVisible = true
354
+             var list = response.data.data.list
355
+             console.log("listwo222222",list)
356
+             var adviceList = response.data.data.adviceList
357
+             console.log("adviceList",adviceList)
358
+             if(adviceList!=null && adviceList.length > 0){
359
+               let dataInfo = {}
360
+                adviceList.forEach((item, index) => {
361
+                let { advice_name } = item
362
+                if (!dataInfo[advice_name]) {
363
+                  dataInfo[advice_name] = {
364
+                    advice_name:item.advice_name,
365
+                    child: [],
366
+                    count:0,
367
+                    drug_id:item.drug_id,
368
+                    specification_name:item.advice_desc,
369
+                  }
370
+                }
371
+              })
372
+              let arr = Object.values(dataInfo)
373
+               if(arr.length > 0){
374
+                 for(let i=0;i<adviceList.length;i++){
375
+                  for(let j=0;j<arr.length;j++){
376
+                     if(adviceList[i].advice_name == arr[j].advice_name){
377
+                        arr[j].child.push(adviceList[i])
378
+                     }
379
+                  }
380
+                 }
381
+               }
382
+              console.log("xinar232323232",arr)
383
+              this.tableList = []
384
+              this.tableList = arr
385
+             }
386
+           
387
+
388
+
389
+             var templateList = response.data.data.templateList
390
+           
391
+              console.log("templateList",templateList)
392
+             if(templateList!=null && templateList.length > 0){
393
+                let dataInfoOne = {}
394
+                adviceList.forEach((item, index) => {
395
+                let { advice_name } = item
396
+                if (!dataInfoOne[advice_name]) {
397
+                  dataInfoOne[advice_name] = {
398
+                    advice_name:item.advice_name,
399
+                    child: [],
400
+                    count:0,
401
+                    specification_name:this.getSpecification(item.drug_id),
402
+                    drug_id:item.drug_id,
403
+                  }
404
+                }
405
+              })
406
+              let hisarr = Object.values(dataInfoOne)
407
+               if(hisarr.length > 0){
408
+                 for(let i=0;i<templateList.length;i++){
409
+                  for(let j=0;j<hisarr.length;j++){
410
+                     if(templateList[i].advice_name == hisarr[j].advice_name){
411
+                        hisarr[j].child.push(templateList[i])
412
+                     }
413
+                  }
414
+                 }
415
+               }
416
+              this.tableList = []
417
+              console.log("hisarrw22222222",hisarr)
418
+              this.tableList = hisarr
419
+             }
420
+           
421
+           
422
+            
423
+          }
424
+        })
425
+        
269 426
       },
270 427
       handleScheduleDateChange(val) {
271 428
         this.query.schedule_date = val
@@ -339,6 +496,28 @@
339 496
           }
340 497
         }
341 498
         return str 
499
+      },
500
+      getSpecification(id){
501
+        var specification_name = ""
502
+        for(let i=0;i<this.druglist.length;i++){
503
+          if(id == this.druglist[i].id){
504
+            specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_nubmer +this.druglist[i].min_unit +"/"+this.druglist[i].max_unt
505
+          }
506
+        }
507
+        return specification_name
508
+      },
509
+      getCount(val){
510
+       var count = 0
511
+       if(val!=null && val.length > 0){
512
+        for(let i=0;i<val.length;i++){
513
+          count += parseInt(val[i].prescribing_number)
514
+        }
515
+       }
516
+       if(count > 0){
517
+        return count
518
+       }else{
519
+        return 0
520
+       }
342 521
       }
343 522
     }
344 523
   }

+ 95 - 5
src/xt_pages/dialysis/details/consumable/dialysisGood.vue Datei anzeigen

@@ -168,23 +168,23 @@
168 168
       >
169 169
          <el-table-column  align="center"  label="序号">
170 170
            <template slot-scope="scope">
171
-            
171
+              {{scope.$index+1}}
172 172
            </template>
173 173
         </el-table-column>
174 174
         <el-table-column  align="center"   label="耗材名称">
175 175
          <template slot-scope="scope">
176
-           
177
-           </template>
176
+             {{scope.row.name}}
177
+          </template>
178 178
         </el-table-column>
179 179
         <el-table-column  align="center"  label="规格">
180 180
            <template slot-scope="scope">
181
-          
181
+             {{scope.row.specification_name}}
182 182
            </template>
183 183
         </el-table-column>
184 184
        
185 185
         <el-table-column  align="center"   label="数量">
186 186
            <template slot-scope="scope">
187
-          
187
+             {{scope.row.count}}
188 188
            </template>
189 189
         </el-table-column>
190 190
         
@@ -399,6 +399,96 @@
399 399
             this.startDialogVisible = true
400 400
             var list = response.data.data.list
401 401
             console.log("list232323223222wid",list)
402
+            if(list!=null && list.length>0){
403
+              for(let i=0;i<list.length;i++){
404
+                 list[i].dialysis_dialyszers_arr = []
405
+                 list[i].dialyzer_perfusion_apparatus_arr = []
406
+                 list[i].dialysis_irrigation_arr = []
407
+                 if(list[i].dialysis_prescription.dialysis_dialyszers!=""){
408
+                   list[i].dialysis_dialyszers_arr = list[i].dialysis_prescription.dialysis_dialyszers.split(",")
409
+                 }
410
+                 if(list[i].dialysis_prescription.dialyzer_perfusion_apparatus!=""){
411
+                   list[i].dialyzer_perfusion_apparatus_arr = list[i].dialysis_prescription.dialyzer_perfusion_apparatus.split(",")
412
+                 }
413
+                 if(list[i].dialysis_prescription.dialysis_irrigation!=""){
414
+                   list[i].dialysis_irrigation_arr = list[i].dialysis_prescription.dialysis_irrigation.split(",")
415
+                 }
416
+              }
417
+            }
418
+            var dialysisDialyszersArr = []
419
+            var dialyzerPerfusionApparaArr = []
420
+            var dialysisIrrigationArr = []
421
+            for(let i=0;i<list.length;i++){
422
+             for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
423
+              console.log("list23323232",list[i].dialysis_dialyszers_arr[j])
424
+               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
425
+             }
426
+             for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
427
+              dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
428
+             }
429
+             for(let y=0;y<list[i].dialysis_irrigation_arr.length;y++){
430
+              dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
431
+             }
432
+            }
433
+            console.log("透析器",dialysisDialyszersArr)
434
+            console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
435
+            console.log("灌流器",dialysisIrrigationArr)
436
+             
437
+           let obj = {}
438
+           let objOne = {}
439
+           let objTwo = {}
440
+           for(let i = 0 ; i < dialysisDialyszersArr.length; i++){
441
+            if(obj[dialysisDialyszersArr[i]]){
442
+               obj[dialysisDialyszersArr[i]] +=1
443
+            }else{
444
+              obj[dialysisDialyszersArr[i]] = 1
445
+            }
446
+           }
447
+           let Arr = [];
448
+            for (let i in obj) {
449
+              let a = {};
450
+              a[i] = obj[i];
451
+              a.name = "透析器"
452
+              a.count = obj[i]
453
+              a.specification_name = i
454
+              Arr.push(a);
455
+            }
456
+          
457
+           for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
458
+            if(objOne[dialyzerPerfusionApparaArr[i]]){
459
+                objOne[dialyzerPerfusionApparaArr[i]] +=1
460
+             }else{
461
+              objOne[dialyzerPerfusionApparaArr[i]] = 1
462
+             }   
463
+           }
464
+           
465
+           for (let i in objOne) {
466
+              let a = {};
467
+              a[i] = objOne[i];
468
+              a.name = "透析器/灌流器"
469
+              a.count = objOne[i]
470
+              a.specification_name = i
471
+              Arr.push(a);
472
+            }
473
+
474
+           for(let i=0;i<dialysisIrrigationArr.length;i++){
475
+            if(objTwo[dialysisIrrigationArr[i]]){
476
+              objTwo[dialysisIrrigationArr[i]] +=1
477
+             }else{
478
+              objTwo[dialysisIrrigationArr[i]] = 1
479
+             }   
480
+           }
481
+
482
+           for (let i in objTwo) {
483
+              let a = {};
484
+              a[i] = objTwo[i];
485
+              a.name = "灌流器"
486
+              a.count = objTwo[i]
487
+              a.specification_name = i
488
+              Arr.push(a);
489
+            }
490
+            console.log("newa",Arr)
491
+            this.tableList = Arr
402 492
           }
403 493
        })
404 494
         

+ 10 - 4
src/xt_pages/stock/drugs/drugNewQuery.vue Datei anzeigen

@@ -9,9 +9,11 @@
9 9
             <el-tab-pane label="库存查询" name="first">
10 10
               <DrugQuery></DrugQuery>
11 11
             </el-tab-pane>
12
-            <el-tab-pane label="进销存查询" name="second">
13
-               <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
14
-           </el-tab-pane>
12
+            <div v-if="org_id!=10265">
13
+              <el-tab-pane label="进销存查询" name="second">
14
+                <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
15
+              </el-tab-pane>
16
+           </div>
15 17
             <el-tab-pane label="有效期查询" name="third">
16 18
                 <ExpiryDateDrugQuery ref="mychildOne"></ExpiryDateDrugQuery>
17 19
             </el-tab-pane>
@@ -47,7 +49,8 @@ export default {
47 49
       ],
48 50
       multipleSelection: [],
49 51
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
50
-      activeName: 'first'
52
+      activeName: 'first',
53
+      org_id:0,
51 54
     };
52 55
   },
53 56
   methods:{
@@ -62,6 +65,9 @@ export default {
62 65
         this.$refs.mychildtwo.open()
63 66
       }
64 67
     }
68
+  },
69
+  created(){
70
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
65 71
   }
66 72
 };
67 73
 </script>

+ 9 - 2
src/xt_pages/stock/stockNewQuery.vue Datei anzeigen

@@ -9,9 +9,11 @@
9 9
             <el-tab-pane label="库存查询" name="first">
10 10
               <GoodNewQuery></GoodNewQuery>
11 11
             </el-tab-pane>
12
+           <div v-if="org_id!=10265">
12 13
             <el-tab-pane label="进销存查询" name="second">
13 14
                <PurchaseStockQuery ref="mychild"></PurchaseStockQuery>
14
-           </el-tab-pane>
15
+            </el-tab-pane>
16
+           </div>
15 17
             <el-tab-pane label="有效期查询" name="third">
16 18
                 <expiryDateQuery ref="mychildone"></expiryDateQuery>
17 19
             </el-tab-pane>
@@ -47,7 +49,8 @@ export default {
47 49
       ],
48 50
       multipleSelection: [],
49 51
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
50
-      activeName: 'first'
52
+      activeName: 'first',
53
+      org_id:0,
51 54
     };
52 55
   },
53 56
   methods:{
@@ -62,6 +65,10 @@ export default {
62 65
        this.$refs.mychildtwo.open()
63 66
       }
64 67
     }
68
+  },
69
+  created(){
70
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
71
+    console.log("机构ID",this.org_id)
65 72
   }
66 73
 };
67 74
 </script>