瀏覽代碼

耗材参数

XMLWAN 4 年之前
父節點
當前提交
2bab86d513

+ 164 - 12
src/xt_pages/dialysis/components/allSummary.vue 查看文件

43
       </div>
43
       </div>
44
       <div>
44
       <div>
45
           <el-table
45
           <el-table
46
-            :data="tableData"
46
+            :data="list"
47
             height="500px"
47
             height="500px"
48
             border
48
             border
49
             style="width: 100%"
49
             style="width: 100%"
53
             </el-table-column>
53
             </el-table-column>
54
             <el-table-column align="center" prop="name" label="姓名" width="180">
54
             <el-table-column align="center" prop="name" label="姓名" width="180">
55
                <template slot-scope="scope">
55
                <template slot-scope="scope">
56
-                   {{scope.row.patient.name}}
56
+                   <!-- {{scope.row.patient.name}} -->
57
+                   {{scope.row.patient_name}}
57
                </template>
58
                </template>
58
             </el-table-column>
59
             </el-table-column>
59
             <el-table-column align="center" prop="address" label="透析模式">
60
             <el-table-column align="center" prop="address" label="透析模式">
60
               <template slot-scope="scope">
61
               <template slot-scope="scope">
61
-                 {{scope.row.treatment_mode.name}}
62
+                 <!-- {{scope.row.treatment_mode.name}} -->
63
+
64
+                 {{scope.row.mode_id}}
62
               </template>
65
               </template>
63
             </el-table-column>
66
             </el-table-column>
64
             <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
67
             <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
65
                <template slot-scope="scope"> 
68
                <template slot-scope="scope"> 
66
-                   {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}}
69
+                   <!-- {{getCount(scope.row.patient.id,item.id)?getCount(scope.row.patient.id,item.id):""}} -->
70
+                   {{scope.row.good_type[index].name}}
67
                </template>
71
                </template>
68
             </el-table-column>
72
             </el-table-column>
69
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
73
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
171
             total:0,
175
             total:0,
172
             selecting_schs: [],
176
             selecting_schs: [],
173
             prescriptionList:[],
177
             prescriptionList:[],
174
-            reduceList:[]
178
+            reduceList:[],
179
+            dialysis_gooods:[],
180
+            allGoodInfo:[],
181
+            list:[],
182
+            new_list:[],
183
+            good_types: [],
175
         }
184
         }
176
     },
185
     },
177
     created(){
186
     created(){
238
                this.prescriptionList = prescription
247
                this.prescriptionList = prescription
239
                var reducelist =  response.data.data.reducelist
248
                var reducelist =  response.data.data.reducelist
240
                this.reduceList = reducelist
249
                this.reduceList = reducelist
250
+                 var good_type = response.data.data.good_type
251
+               console.log("godd_type",good_type)
252
+              this.tableName = good_type
253
+              this.allGoodInfo = response.data.data.dialysis_goods
254
+              console.log("1111111",response.data.data.dialysis_goods)
255
+              this.list = []
256
+              this.good_types = []
257
+              this.allGoodInfo = []
258
+              this.good_types.push("姓名")
259
+           
260
+             for (let a = 0; a <  response.data.data.good_type.length; a++){
261
+                this.good_types.push(response.data.data.good_type[a].type_name)
262
+              }
263
+             for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
264
+              let arr =[]
265
+              // let obj = {
266
+              //   id:0,
267
+              //   name:  response.data.data.dialysis_goods[i].patient.name,
268
+
269
+              // }
270
+              // arr.push(obj)
271
+              // console.log("arr=========",arr)
272
+              for (let a = 0; a <  response.data.data.good_type.length; a++){
273
+                let obj = {
274
+                  id:response.data.data.good_type[a].id,
275
+                  name:""
276
+
277
+                }
278
+                arr.push(obj)
279
+              }
280
+
281
+
282
+             console.log("2222222",arr)
283
+            
284
+
285
+              let newObj = {
286
+                "patient_id":response.data.data.dialysis_goods[i].patient_id,
287
+                "patient_name":response.data.data.dialysis_goods[i].patient.name,
288
+                "mode_id":response.data.data.dialysis_goods[i].mode_id,
289
+                "good_type":arr,
290
+                "good_user":response.data.data.dialysis_goods[i].good_user,
291
+                "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
292
+                "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
293
+                "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
294
+              }
295
+             
296
+              this.list.push(newObj)
297
+              }
298
+              
299
+            for (let a = 0; a <  this.list.length; a++){
300
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
301
+                if(this.list[a].good_type[b].id > 0){
302
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
303
+                }
304
+
305
+              }
306
+              }
307
+              console.log("list22222",this.list)
241
              }
308
              }
242
           })
309
           })
243
         },
310
         },
255
              if(response.data.state == 1){
322
              if(response.data.state == 1){
256
                var material =  response.data.data.material
323
                var material =  response.data.data.material
257
                console.log("material",material)
324
                console.log("material",material)
258
-               this.tableName = material
325
+              //  this.tableName = material
259
              }
326
              }
260
           })
327
           })
261
         },
328
         },
282
               page:this.page, 
349
               page:this.page, 
283
               keyword:this.search_input,
350
               keyword:this.search_input,
284
             }
351
             }
352
+          console.log("params====",params)
285
           getCollectList(params).then(response=>{
353
           getCollectList(params).then(response=>{
286
              if(response.data.state == 1){
354
              if(response.data.state == 1){
287
                var schedule = response.data.data.schedule      
355
                var schedule = response.data.data.schedule      
294
                this.prescriptionList = prescription
362
                this.prescriptionList = prescription
295
                var reducelist =  response.data.data.reducelist          
363
                var reducelist =  response.data.data.reducelist          
296
                this.reduceList = reducelist
364
                this.reduceList = reducelist
365
+               console.log("reducelist",reducelist)
366
+               var good_type = response.data.data.good_type
367
+               console.log("godd_type",good_type)
368
+              this.tableName = good_type
369
+              this.allGoodInfo = response.data.data.dialysis_goods
370
+              console.log("1111111",response.data.data.dialysis_goods)
371
+              this.list = []
372
+              this.good_types = []
373
+              this.allGoodInfo = []
374
+              this.good_types.push("姓名")
375
+           
376
+             for (let a = 0; a <  response.data.data.good_type.length; a++){
377
+                this.good_types.push(response.data.data.good_type[a].type_name)
378
+              }
379
+             for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
380
+              let arr =[]
381
+              // let obj = {
382
+              //   id:0,
383
+              //   name:  response.data.data.dialysis_goods[i].patient.name,
384
+
385
+              // }
386
+              // arr.push(obj)
387
+              // console.log("arr=========",arr)
388
+              for (let a = 0; a <  response.data.data.good_type.length; a++){
389
+                let obj = {
390
+                  id:response.data.data.good_type[a].id,
391
+                  name:""
392
+
393
+                }
394
+                arr.push(obj)
395
+              }
396
+
397
+
398
+             console.log("2222222",arr)
399
+            
400
+
401
+              let newObj = {
402
+                "patient_id":response.data.data.dialysis_goods[i].patient_id,
403
+                "patient_name":response.data.data.dialysis_goods[i].patient.name,
404
+                "mode_id":response.data.data.dialysis_goods[i].mode_id,
405
+                "good_type":arr,
406
+                "good_user":response.data.data.dialysis_goods[i].good_user,
407
+                "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
408
+                "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
409
+                "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
410
+              }
411
+             
412
+              this.list.push(newObj)
413
+              }
414
+              
415
+            for (let a = 0; a <  this.list.length; a++){
416
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
417
+                if(this.list[a].good_type[b].id > 0){
418
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
419
+                }
420
+
421
+              }
422
+              }
423
+              console.log("list22222",this.list)
297
              }
424
              }
298
           })
425
           })
299
         },
426
         },
300
         getCount(patientid,goodid){
427
         getCount(patientid,goodid){
301
           var count = 0
428
           var count = 0
302
-           for(let i=0;i<this.reduceList.length;i++){
303
-              if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
304
-                 count = this.reduceList[i].count
305
-              }
306
-           }
429
+          //  for(let i=0;i<this.reduceList.length;i++){
430
+          //     if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
431
+          //        count = this.reduceList[i].count
432
+          //     }
433
+          //  }
307
            return count
434
            return count
308
         },
435
         },
309
         handleSelectionChange(val){
436
         handleSelectionChange(val){
356
           }
483
           }
357
         } 
484
         } 
358
        return zongliang
485
        return zongliang
359
-     }
486
+     },
487
+     getGoodUserInfo(good_type_id,good_user,last_good_user) {
488
+        if (good_user != null && good_user.length > 0) {
489
+          let desc = ""
490
+          for (let b = 0; b < good_user.length; b++){
491
+            if(good_type_id == good_user[b].good_type_id)
492
+              desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
493
+          }
494
+         
495
+
496
+          return desc
497
+        } else if (good_user != null && good_user.length <= 0) {
498
+          if (last_good_user != null && last_good_user.length > 0) {
499
+            let desc = ""
500
+            for (let b = 0; b < last_good_user.length; b++){
501
+              if(good_type_id == last_good_user[b].good_type_id)
502
+                desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
503
+            }
504
+          
505
+
506
+            return desc
507
+
508
+          }
509
+          return ""
510
+        }
511
+      },
360
     }
512
     }
361
 }
513
 }
362
 </script>
514
 </script>

+ 10 - 8
src/xt_pages/dialysis/components/consumables.vue 查看文件

69
           </template>
69
           </template>
70
 
70
 
71
         </el-table-column>
71
         </el-table-column>
72
-
72
+        
73
       </el-table>
73
       </el-table>
74
     </div>
74
     </div>
75
 
75
 
179
             if(good_type_id == good_user[b].good_type_id)
179
             if(good_type_id == good_user[b].good_type_id)
180
               desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
180
               desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
181
           }
181
           }
182
-          console.log(desc)
182
+         
183
 
183
 
184
           return desc
184
           return desc
185
         } else if (good_user != null && good_user.length <= 0) {
185
         } else if (good_user != null && good_user.length <= 0) {
189
               if(good_type_id == last_good_user[b].good_type_id)
189
               if(good_type_id == last_good_user[b].good_type_id)
190
                 desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
190
                 desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
191
             }
191
             }
192
-            console.log(desc)
192
+          
193
 
193
 
194
             return desc
194
             return desc
195
 
195
 
211
             var res = response.data
211
             var res = response.data
212
             this.total = res.data.total
212
             this.total = res.data.total
213
             this.good_types.push("姓名")
213
             this.good_types.push("姓名")
214
+
214
             for (let a = 0; a <  res.data.good_type.length; a++){
215
             for (let a = 0; a <  res.data.good_type.length; a++){
215
               this.good_types.push(res.data.good_type[a].type_name)
216
               this.good_types.push(res.data.good_type[a].type_name)
216
             }
217
             }
218
+            console.log("res====",res.data.good_type)
217
             this.allGoodInfo = res.data.dialysis_goods
219
             this.allGoodInfo = res.data.dialysis_goods
218
-
220
+            console.log("dis===",res.data.dialysis_goods)
219
             for(let i = 0; i < res.data.dialysis_goods.length; i++){
221
             for(let i = 0; i < res.data.dialysis_goods.length; i++){
220
               let arr =[]
222
               let arr =[]
221
               let obj = {
223
               let obj = {
222
                 id:0,
224
                 id:0,
223
-                name:  res.data.dialysis_goods[i].patient.name
224
-
225
+                name:  res.data.dialysis_goods[i].patient.name,
225
               }
226
               }
226
               arr.push(obj)
227
               arr.push(obj)
227
 
228
 
245
                 "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
246
                 "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
246
                 "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
247
                 "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
247
               }
248
               }
249
+             
248
               this.list.push(newObj)
250
               this.list.push(newObj)
249
             }
251
             }
250
 
252
 
251
-
253
+          
252
             for (let a = 0; a <  this.list.length; a++){
254
             for (let a = 0; a <  this.list.length; a++){
253
               for (let b = 0; b <  this.list[a].good_type.length; b++){
255
               for (let b = 0; b <  this.list[a].good_type.length; b++){
254
 
256
 
261
 
263
 
262
           }
264
           }
263
 
265
 
264
-
266
+         console.log("list",this.list)
265
 
267
 
266
         })
268
         })
267
 
269
 

+ 1 - 1
src/xt_pages/dialysis/consumables_print.vue 查看文件

12
             <div id="print_content">
12
             <div id="print_content">
13
                 <div class="print_main_content">
13
                 <div class="print_main_content">
14
                     <div class="order_title_panl">
14
                     <div class="order_title_panl">
15
-                        <span class="main_title">耗材统计表</span>
15
+                        <span class="main_title">透析参数统计表</span>
16
                     </div>
16
                     </div>
17
                     <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
17
                     <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
18
                         <p>统计时间:{{query.start_time}} - {{query.end_time}}</p>
18
                         <p>统计时间:{{query.start_time}} - {{query.end_time}}</p>