浏览代码

8月15日

XMLWAN 2 年前
父节点
当前提交
6b9898a3dc

+ 46 - 7
src/router/modules/dialysis.js 查看文件

87
         noCache: true
87
         noCache: true
88
       }
88
       }
89
     },
89
     },
90
+    {
91
+      path: '/dialysis/consumable/dialysisdrugprint',
92
+      component: () => import('@/xt_pages/dialysis/details/consumable/dialysisDrugPrint'),
93
+      name: '透析药品',
94
+      meta: {
95
+        title: '透析药品',
96
+        noCache: true
97
+      },
98
+      is_menu: false,
99
+      hidden: true
100
+    },
101
+    {
102
+      path: '/dialysis/consumable/dialysisdrugcountprint',
103
+      component: () => import('@/xt_pages/dialysis/details/consumable/dialysisDrugCountPrint'),
104
+      name: '透析药品',
105
+      meta: {
106
+        title: '透析药品',
107
+        noCache: true
108
+      },
109
+      is_menu: false,
110
+      hidden: true
111
+    },
90
     {
112
     {
91
       path: '/dialysis/consumable/dialysisgoodprint',
113
       path: '/dialysis/consumable/dialysisgoodprint',
92
       component: () => import('@/xt_pages/dialysis/details/consumable/dialysisGoodPrint'),
114
       component: () => import('@/xt_pages/dialysis/details/consumable/dialysisGoodPrint'),
109
       is_menu: false,
131
       is_menu: false,
110
       hidden: true
132
       hidden: true
111
     },
133
     },
134
+
112
     // {
135
     // {
113
     //   path: '/dialysis/consumable/dialysis/print',
136
     //   path: '/dialysis/consumable/dialysis/print',
114
     //   component: () => import('@/xt_pages/dialysis/details/consumable/signPrint'),
137
     //   component: () => import('@/xt_pages/dialysis/details/consumable/signPrint'),
116
     //   is_menu: false,
139
     //   is_menu: false,
117
     //   hidden: true
140
     //   hidden: true
118
     // },
141
     // },
119
-    // {
120
-    //   path: '/dialysis/consumable/dialysis/parameter/print',
121
-    //   component: () => import('@/xt_pages/dialysis/details/consumable/dialysisParameterPrint'),
122
-    //   name: '透析参数打印',
123
-    //   is_menu: false,
124
-    //   hidden: true
125
-    // },
142
+    {
143
+      path: '/dialysis/consumable/dialysis/parameter/print',
144
+      component: () => import('@/xt_pages/dialysis/details/consumable/dialysisParameterPrint'),
145
+      name: '透析统计耗材',
146
+      meta: {
147
+        title: '透析统计耗材',
148
+        noCache: true
149
+      },
150
+      is_menu: false,
151
+      hidden: true
152
+    },
153
+    {
154
+      path: '/dialysis/consumable/dialysis/count/print',
155
+      component: () => import('@/xt_pages/dialysis/details/consumable/dialysisParameterCountPrint'),
156
+      name: '透析参数耗材',
157
+      meta: {
158
+        title: '透析参数耗材',
159
+        noCache: true
160
+      },
161
+      is_menu: false,
162
+      hidden: true
163
+    },
126
     {
164
     {
127
       path: '/dialysis/consumableDrugs_print',
165
       path: '/dialysis/consumableDrugs_print',
128
       component: () => import('@/xt_pages/dialysis/consumableDrugs_print'),
166
       component: () => import('@/xt_pages/dialysis/consumableDrugs_print'),
156
         noCache: true
194
         noCache: true
157
       }
195
       }
158
     },
196
     },
197
+
159
     {
198
     {
160
       path: '/dialysis/allSummary_print',
199
       path: '/dialysis/allSummary_print',
161
       component: () => import('@/xt_pages/dialysis/allSummary_print'),
200
       component: () => import('@/xt_pages/dialysis/allSummary_print'),

+ 172 - 54
src/xt_pages/dialysis/details/consumable/dialysisDrug.vue 查看文件

42
         </div>
42
         </div>
43
       </div>
43
       </div>
44
       <div>
44
       <div>
45
-        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
45
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
46
+        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
47
+        <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
47
       </div>
48
       </div>
48
     </div>
49
     </div>
49
   
50
   
56
           backgroundColor: 'rgb(245, 247, 250)',
57
           backgroundColor: 'rgb(245, 247, 250)',
57
           color: '#606266'
58
           color: '#606266'
58
         }"
59
         }"
60
+        @selection-change="handleSelectionChange"
59
       >
61
       >
62
+        <el-table-column
63
+          align="center"
64
+          type="selection"
65
+          width="55">
66
+        </el-table-column>
60
         <el-table-column label="序号" align="center"  width="55">
67
         <el-table-column label="序号" align="center"  width="55">
61
            <template slot-scope="scope">
68
            <template slot-scope="scope">
62
              {{scope.$index + 1}}
69
              {{scope.$index + 1}}
113
       <span>
120
       <span>
114
         <div class="cell clearfix">
121
         <div class="cell clearfix">
115
           <label class="title"> <span class="name">排班班次</span> : </label>
122
           <label class="title"> <span class="name">排班班次</span> : </label>
116
-           <el-select v-model="schedule_type" placeholder="请选择">
123
+           <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
117
             <el-option
124
             <el-option
118
               v-for="item in schedulArr"
125
               v-for="item in schedulArr"
119
               :key="item.value"
126
               :key="item.value"
122
             </el-option>
129
             </el-option>
123
            </el-select>
130
            </el-select>
124
            <label class="title"> <span class="name">病区选择</span> : </label>
131
            <label class="title"> <span class="name">病区选择</span> : </label>
125
-           <el-select v-model="partion_type" placeholder="请选择">
132
+           <el-select v-model="partion_type" placeholder="请选择" @change="changePartionType">
126
             <el-option
133
             <el-option
127
               v-for="item in partitionArr"
134
               v-for="item in partitionArr"
128
               :key="item.id"
135
               :key="item.id"
130
               :value="item.id">
137
               :value="item.id">
131
             </el-option>
138
             </el-option>
132
            </el-select>
139
            </el-select>
140
+           <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
141
+           <el-button size="small" icon="el-icon-printer" @click="toExportListOne" type="primary">导出</el-button>
133
         </div> 
142
         </div> 
143
+
134
        <el-table
144
        <el-table
135
         :data="tableList"
145
         :data="tableList"
136
         border
146
         border
197
           limit:10,
207
           limit:10,
198
           keywords:"",
208
           keywords:"",
199
           good_type:0,
209
           good_type:0,
210
+          ids:"",
200
         },
211
         },
201
         schedulType: 0,
212
         schedulType: 0,
202
         schedulArr: [
213
         schedulArr: [
238
         druglist:[],
249
         druglist:[],
239
         tableList:[],
250
         tableList:[],
240
         config:{},
251
         config:{},
252
+        ids:"",
241
       }
253
       }
242
     },
254
     },
243
     created() {
255
     created() {
251
         y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
263
         y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
252
 
264
 
253
       this.selected_date = date
265
       this.selected_date = date
266
+      this.query.ids = this.ids
254
       this.query.schedule_date = schedule_date
267
       this.query.schedule_date = schedule_date
255
       this.query.schedule_type = 0
268
       this.query.schedule_type = 0
256
       this.query.partition_id = 0
269
       this.query.partition_id = 0
259
     },
272
     },
260
     methods: {
273
     methods: {
261
       open(){
274
       open(){
262
-
275
+       this.templateList = []
276
+       this.getlist()
263
       },
277
       },
264
       getlist(){
278
       getlist(){
265
         getDialysisAdviceTemplateList(this.query).then(response=>{
279
         getDialysisAdviceTemplateList(this.query).then(response=>{
270
             this.total = response.data.data.total
284
             this.total = response.data.data.total
271
             var adviceList = response.data.data.adviceList
285
             var adviceList = response.data.data.adviceList
272
             this.adviceList = adviceList
286
             this.adviceList = adviceList
273
-            var templateList = response.data.data.templateList
287
+            // var templateList = response.data.data.templateList
274
             var druglist = response.data.data.drugList
288
             var druglist = response.data.data.drugList
275
-            for(let i=0;i<templateList.length;i++){
276
-              templateList[i].advice_desc = ""
289
+            // for(let i=0;i<templateList.length;i++){
290
+            //   templateList[i].advice_desc = ""
291
+            //  for(let j=0;j<druglist.length;j++){
292
+            //    if(templateList[i].drug_id == druglist[j].id){
293
+            //      templateList[i].advice_desc = druglist[j].dose + druglist[j].dose_unit +"*"+druglist[j].min_unit +druglist[j].min_number+"/"+druglist[j].max_unit
294
+            //    }
295
+            //  }
296
+            // }
297
+            // console.log("医嘱模版",templateList)
298
+            // this.templateList = templateList
299
+           
300
+            this.config = response.data.data.config
301
+             
302
+            var tablelist =  response.data.data.tablelist
303
+             console.log("tablelist233232232",tablelist)
304
+             var hisArr= []
305
+             if(tablelist!=null && tablelist.length > 0){
306
+               for(let i=0;i<tablelist.length;i++){
307
+                 if(tablelist[i].his_prescription_template!=null){
308
+                  if(tablelist[i].his_prescription_template.his_prescription_info!=null){
309
+                    for(let j=0;j<tablelist[i].his_prescription_template.his_prescription_info.length>0;j++){
310
+                      if(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice!=null){
311
+                         for(let z=0;z<tablelist[i].his_prescription_template.his_prescription_info[j].his_advice.length>0;z++){
312
+                          hisArr.push(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice[z])
313
+                         }
314
+                      }
315
+                    }
316
+                   }
317
+                 }
318
+               }
319
+             }
320
+            console.log("hisArr223323323223",hisArr)
321
+            for(let i=0;i<hisArr.length;i++){
322
+              hisArr[i].advice_desc = ""
277
              for(let j=0;j<druglist.length;j++){
323
              for(let j=0;j<druglist.length;j++){
278
-               if(templateList[i].drug_id == druglist[j].id){
279
-                 templateList[i].advice_desc = druglist[j].dose + druglist[j].dose_unit +"*"+druglist[j].min_unit +druglist[j].min_number+"/"+druglist[j].max_unit
324
+               if(hisArr[i].drug_id == druglist[j].id){
325
+                 hisArr[i].advice_desc = druglist[j].dose + druglist[j].dose_unit +"*" +druglist[j].min_number+ druglist[j].min_unit +"/"+druglist[j].max_unit
280
                }
326
                }
281
              }
327
              }
282
             }
328
             }
283
-            console.log("医嘱模版",templateList)
284
-            this.templateList = templateList
285
-           
286
-            this.config = response.data.data.config
287
-            
329
+            this.templateList = hisArr
288
           }
330
           }
289
         })
331
         })
290
       },
332
       },
354
         })
396
         })
355
       },
397
       },
356
       statistics() {
398
       statistics() {
399
+         this.tableList = []
357
           var params = {
400
           var params = {
358
             schedule_type:this.schedule_type,
401
             schedule_type:this.schedule_type,
359
             partion_type:this.partion_type,
402
             partion_type:this.partion_type,
363
         getDialysisAdviceSchedudeList(params).then(response=>{
406
         getDialysisAdviceSchedudeList(params).then(response=>{
364
           if(response.data.state == 1){
407
           if(response.data.state == 1){
365
              var doctorList = []
408
              var doctorList = []
366
-             var hisDoctorList = []
367
              var druglist = response.data.data.drug
409
              var druglist = response.data.data.drug
368
              console.log("druglsit",druglist)
410
              console.log("druglsit",druglist)
369
              this.druglist = druglist
411
              this.druglist = druglist
374
              console.log("adviceList",adviceList)
416
              console.log("adviceList",adviceList)
375
              var config = response.data.data.config
417
              var config = response.data.data.config
376
              console.log("config",config)
418
              console.log("config",config)
419
+             
420
+             if(list!=null && list.length > 0){
421
+               for(let i=0;i<list.length;i++){
422
+                for(let j=0;j<adviceList.length;j++){
423
+                  if(list[i].patient_id == adviceList[j].patient_id){
424
+                     doctorList.push(adviceList[j])
425
+                  }
426
+                }
427
+               }
428
+             }
429
+             console.log("doctorlist23323232232332",doctorList)
430
+
377
              if(config.is_open!=1){
431
              if(config.is_open!=1){
378
-               if(adviceList!=null && adviceList.length > 0){
432
+               if(doctorList!=null && doctorList.length > 0){
379
                 let dataInfo = {}
433
                 let dataInfo = {}
380
-                  adviceList.forEach((item, index) => {
434
+                  doctorList.forEach((item, index) => {
381
                   let { advice_name } = item
435
                   let { advice_name } = item
382
                   if (!dataInfo[advice_name]) {
436
                   if (!dataInfo[advice_name]) {
383
                     dataInfo[advice_name] = {
437
                     dataInfo[advice_name] = {
391
                   }
445
                   }
392
                 })
446
                 })
393
                 let arr = Object.values(dataInfo)
447
                 let arr = Object.values(dataInfo)
448
+                console.log("arr23332323232",arr)
394
                 if(arr.length > 0){
449
                 if(arr.length > 0){
395
-                  for(let i=0;i<adviceList.length;i++){
450
+                  for(let i=0;i<doctorList.length;i++){
396
                     for(let j=0;j<arr.length;j++){
451
                     for(let j=0;j<arr.length;j++){
397
-                      if(adviceList[i].advice_name == arr[j].advice_name){
398
-                          arr[j].child.push(adviceList[i])
452
+                      if(doctorList[i].advice_name == arr[j].advice_name){
453
+                          arr[j].child.push(doctorList[i])
399
                       }
454
                       }
400
                     }
455
                     }
401
                   }
456
                   }
418
 
473
 
419
              var templateList = response.data.data.templateList
474
              var templateList = response.data.data.templateList
420
              console.log("templatelist",templateList)
475
              console.log("templatelist",templateList)
476
+             var tablelist =  response.data.data.tablelist
477
+             console.log("tablelist233232232",tablelist)
478
+             var hisArr= []
479
+             if(tablelist!=null && tablelist.length > 0){
480
+               for(let i=0;i<tablelist.length;i++){
481
+                 if(tablelist[i].his_prescription_template!=null){
482
+                  if(tablelist[i].his_prescription_template.his_prescription_info!=null){
483
+                    for(let j=0;j<tablelist[i].his_prescription_template.his_prescription_info.length>0;j++){
484
+                      if(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice!=null){
485
+                         for(let z=0;z<tablelist[i].his_prescription_template.his_prescription_info[j].his_advice.length>0;z++){
486
+                          hisArr.push(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice[z])
487
+                         }
488
+                      }
489
+                    }
490
+                   }
491
+                 
492
+                 }
493
+               }
494
+             }
495
+             console.log("hisArr223323323223",hisArr)
421
              if(config.is_open == 1){
496
              if(config.is_open == 1){
422
-               if(templateList!=null && templateList.length > 0){
497
+               if(hisArr!=null && hisArr.length > 0){
423
                   let dataInfoOne = {}
498
                   let dataInfoOne = {}
424
-                  templateList.forEach((item, index) => {
499
+                  hisArr.forEach((item, index) => {
425
                   let { advice_name } = item
500
                   let { advice_name } = item
426
                   if (!dataInfoOne[advice_name]) {
501
                   if (!dataInfoOne[advice_name]) {
427
                     dataInfoOne[advice_name] = {
502
                     dataInfoOne[advice_name] = {
435
                   }
510
                   }
436
                 })
511
                 })
437
                 let hisarr = Object.values(dataInfoOne)
512
                 let hisarr = Object.values(dataInfoOne)
513
+                console.log("hisarr233232233232",hisarr)
438
                 if(hisarr.length > 0){
514
                 if(hisarr.length > 0){
439
-                  for(let i=0;i<templateList.length;i++){
515
+                  for(let i=0;i<hisArr.length;i++){
440
                     for(let j=0;j<hisarr.length;j++){
516
                     for(let j=0;j<hisarr.length;j++){
441
-                      if(templateList[i].drug_id == hisarr[j].drug_id){
442
-                          hisarr[j].child.push(templateList[i])
517
+                      if(hisArr[i].drug_id == hisarr[j].drug_id){
518
+                          hisarr[j].child.push(hisArr[i])
443
                       }
519
                       }
444
                     }
520
                     }
445
                   }
521
                   }
473
         this.getlist()
549
         this.getlist()
474
       },
550
       },
475
 
551
 
476
-       exportList(){
477
-         import('@/vendor/Export2Excel').then(excel => {
478
-
479
-
480
-
481
-         var arrTwo = []
482
-         for(let i=0;i<this.arrKey.length;i++){
483
-            arrTwo.push('name'+i)
484
-         }
485
-         console.log("arrKey88888",arrTwo)
486
-
487
-        //  console.log("9999999",this.list)
488
-         const tHeader = this.good_types
489
-         const filterVal = arrTwo
490
-         console.log("thedad",tHeader)
491
-         console.log("filterval",filterVal)
492
-         console.log("33333",this.arrList)
493
-         const data = this.formatJson(filterVal,this.arrList)
494
-         console.log("data",data)
495
-
496
-         excel.export_json_to_excel({
497
-           header: tHeader,
498
-           data,
499
-           filename: '透析耗材查询'
500
-         })
501
-          this.downloadLoading = false
502
-        })
503
-       },
552
+      exportList(){
553
+        import('@/vendor/Export2Excel').then(excel => { 
554
+          if(this.list!=null && this.list.length > 0){
555
+            for(let i=0;i<this.list.length;i++){
556
+              this.list[i].index = i+1
557
+              this.list[i].number = this.list[i].device_number.number
558
+              this.list[i].patient_name = this.list[i].patient.name
559
+              this.list[i].dialysis_no = this.list[i].patient.dialysis_no
560
+              if(this.config.is_open != 1){
561
+                this.list[i].str_content = this.getAdviceContent(this.list[i].patient_id)
562
+              }
563
+              if(this.config.is_open == 1){
564
+               this.list[i].str_content = this.getHisAdviceContent(this.list[i].patient_id)
565
+              }
566
+            }
567
+          }
568
+          const tHeader = ['序号','透析机号','姓名','透析号','医嘱']
569
+          const filterVal = ['index','number','patient_name','dialysis_no','str_content']
570
+
571
+          const data = this.formatJson(filterVal, this.list)
572
+          excel.export_json_to_excel({
573
+            header: tHeader,
574
+            data,
575
+            filename: '透析药品'
576
+          })
577
+            this.downloadLoading = false
578
+          })  
579
+      },
580
+      toExportListOne(){
581
+        import('@/vendor/Export2Excel').then(excel => { 
582
+         
583
+          if(this.tableList!=null && this.tableList.length > 0){
584
+            for(let i=0;i<this.tableList.length;i++){
585
+              this.tableList[i].index = i+1
586
+              this.tableList[i].total_count = this.getCount(this.tableList[i].child)
587
+            }
588
+          }
589
+          const tHeader = ['序号','药品名称','规格','数量']
590
+          const filterVal = ['index','advice_name','specification_name','total_count']
591
+
592
+          const data = this.formatJson(filterVal, this.tableList)
593
+          excel.export_json_to_excel({
594
+            header: tHeader,
595
+            data,
596
+            filename: '药品统计'
597
+          })
598
+            this.downloadLoading = false
599
+          })  
600
+      },
504
       formatJson(filterVal, jsonData) {
601
       formatJson(filterVal, jsonData) {
505
         return jsonData.map(v => filterVal.map(j => v[j]));
602
         return jsonData.map(v => filterVal.map(j => v[j]));
506
       },
603
       },
558
        }else{
655
        }else{
559
         return 0
656
         return 0
560
        }
657
        }
561
-      }
658
+      },
659
+      handleSelectionChange(val){
660
+        var arr = []
661
+        for(let i=0;i<val.length;i++){
662
+          arr.push(val[i].id)
663
+        }
664
+        this.ids = arr.join(",")
665
+      },
666
+      toPrint(){
667
+       this.$router.push({path:'/dialysis/consumable/dialysisdrugprint?limit='+this.query.limit+"&page="+this.query.page+"&partition_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&schedule_type="+this.query.schedule_type+"&keywords="+this.query.keywords+"&ids="+this.ids})
668
+      },
669
+      toPrintOne(){
670
+        this.$router.push({path:'/dialysis/consumable/dialysisdrugcountprint?schedule_type='+this.schedule_type+"&partion_type="+this.partion_type+"&schedule_date="+this.query.schedule_date+"&is_open="+this.config.is_open})
671
+      },
672
+     changeScheduleType(){
673
+      this.tableList = []
674
+      this.statistics()
675
+     },
676
+     changePartionType(){
677
+      this.tableList = []
678
+      this.statistics()
679
+     }
562
     }
680
     }
563
   }
681
   }
564
 </script>
682
 </script>

+ 374 - 53
src/xt_pages/dialysis/details/consumable/dialysisGood.vue 查看文件

54
    
54
    
55
     <div v-if="his_config.is_open != 1">
55
     <div v-if="his_config.is_open != 1">
56
       <el-table
56
       <el-table
57
+        @selection-change="handleSelectionChange"
57
         :data="list"
58
         :data="list"
58
         border
59
         border
59
         :row-style="{ color: '#303133' }"
60
         :row-style="{ color: '#303133' }"
126
 
127
 
127
    <div v-if="his_config.is_open == 1">
128
    <div v-if="his_config.is_open == 1">
128
       <el-table
129
       <el-table
130
+        @selection-change="handleSelectionChange"
129
         :data="list"
131
         :data="list"
130
         border
132
         border
131
         :row-style="{ color: '#303133' }"
133
         :row-style="{ color: '#303133' }"
179
       </el-table>
181
       </el-table>
180
 
182
 
181
       <el-pagination
183
       <el-pagination
182
-        @size-change="handleSizeChange"
183
-        @current-change="handleCurrentChange"
184
+        @size-change="handleSizeChangeOne"
185
+        @current-change="handleSizeChangeOne"
184
         :page-sizes="[10, 50, 100]"
186
         :page-sizes="[10, 50, 100]"
185
         :page-size="10"
187
         :page-size="10"
186
         background
188
         background
200
       <span>
202
       <span>
201
         <div class="cell clearfix">
203
         <div class="cell clearfix">
202
           <label class="title"> <span class="name">排班班次</span> : </label>
204
           <label class="title"> <span class="name">排班班次</span> : </label>
203
-           <el-select v-model="schedule_type" placeholder="请选择">
205
+           <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
204
             <el-option
206
             <el-option
205
               v-for="item in schedulArr"
207
               v-for="item in schedulArr"
206
               :key="item.value"
208
               :key="item.value"
209
             </el-option>
211
             </el-option>
210
            </el-select>
212
            </el-select>
211
            <label class="title"> <span class="name">病区选择</span> : </label>
213
            <label class="title"> <span class="name">病区选择</span> : </label>
212
-           <el-select v-model="partion_type" placeholder="请选择">
214
+           <el-select v-model="partion_type" placeholder="请选择" @change="changePartionType">
213
             <el-option
215
             <el-option
214
               v-for="item in partitionArr"
216
               v-for="item in partitionArr"
215
               :key="item.id"
217
               :key="item.id"
219
            </el-select>
221
            </el-select>
220
 
222
 
221
          <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
223
          <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
224
+         <el-button size="small" icon="el-icon-printer" @click="toExportListOne" type="primary">导出</el-button>
222
         </div> 
225
         </div> 
223
        <el-table
226
        <el-table
224
         :data="tableList"
227
         :data="tableList"
307
       <span>
310
       <span>
308
         <div class="cell clearfix">
311
         <div class="cell clearfix">
309
           <label class="title"> <span class="name">排班班次</span> : </label>
312
           <label class="title"> <span class="name">排班班次</span> : </label>
310
-           <el-select v-model="schedule_type" placeholder="请选择">
313
+           <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
311
             <el-option
314
             <el-option
312
               v-for="item in schedulArr"
315
               v-for="item in schedulArr"
313
               :key="item.value"
316
               :key="item.value"
316
             </el-option>
319
             </el-option>
317
            </el-select>
320
            </el-select>
318
            <label class="title"> <span class="name">病区选择</span> : </label>
321
            <label class="title"> <span class="name">病区选择</span> : </label>
319
-           <el-select v-model="partion_type" placeholder="请选择">
322
+           <el-select v-model="partion_type" placeholder="请选择" @change="changePartionType">
320
             <el-option
323
             <el-option
321
               v-for="item in partitionArr"
324
               v-for="item in partitionArr"
322
               :key="item.id"
325
               :key="item.id"
324
               :value="item.id">
327
               :value="item.id">
325
             </el-option>
328
             </el-option>
326
            </el-select>
329
            </el-select>
330
+           <el-button size="small" icon="el-icon-printer" @click="toHisPrint" type="primary">打印</el-button>
331
+           <el-button size="small" icon="el-icon-printer" @click="toExportListTwo" type="primary">导出</el-button>
327
         </div> 
332
         </div> 
328
        <el-table
333
        <el-table
329
         :data="tableList"
334
         :data="tableList"
390
           limit:10,
395
           limit:10,
391
           keywords:"",
396
           keywords:"",
392
           good_type:0,
397
           good_type:0,
398
+          ids:""
393
         },
399
         },
394
         schedulType: 0,
400
         schedulType: 0,
395
         schedulArr: [
401
         schedulArr: [
466
         checkedTwentyNight:false,
472
         checkedTwentyNight:false,
467
         startHisDialogVisible:false,
473
         startHisDialogVisible:false,
468
         typeList:[],
474
         typeList:[],
475
+        ids:""
469
       }
476
       }
470
     },
477
     },
471
     created() {
478
     created() {
482
       this.query.schedule_type = 0
489
       this.query.schedule_type = 0
483
       this.query.partition_id = 0
490
       this.query.partition_id = 0
484
       this.query.page = 1
491
       this.query.page = 1
492
+      this.query.ids = this.ids
485
       this.getAllZone()
493
       this.getAllZone()
486
       this.dialysate_formulation =  getDataConfig(  
494
       this.dialysate_formulation =  getDataConfig(  
487
             'hemodialysis',
495
             'hemodialysis',
494
       this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
502
       this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
495
       var filedList = this.$store.getters.xt_user.fileds
503
       var filedList = this.$store.getters.xt_user.fileds
496
       for (let i = 0; i < filedList.length; i++) {
504
       for (let i = 0; i < filedList.length; i++) {
497
-        if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器'  || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖'  || filedList[i].filed_name_cn == '穿刺针'  || filedList[i].filed_name_cn == '穿刺针支数')) {
505
+        if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器'  || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖'  || filedList[i].filed_name_cn == '穿刺针')) {
498
           this.rowList.push(filedList[i])
506
           this.rowList.push(filedList[i])
499
         }
507
         }
500
       }
508
       }
512
          arr.push('姓名')
520
          arr.push('姓名')
513
          arr.push('透析号')
521
          arr.push('透析号')
514
        
522
        
515
-         console.log("list23322323232",this.rowList)
523
+        //  console.log("list23322323232",this.rowList)
516
          if(this.rowList!=null && this.rowList.length > 0){
524
          if(this.rowList!=null && this.rowList.length > 0){
517
            for(let i=0;i<this.rowList.length;i++){
525
            for(let i=0;i<this.rowList.length;i++){
518
              arr.push(this.rowList[i].filed_name_cn)
526
              arr.push(this.rowList[i].filed_name_cn)
520
          }
528
          }
521
         
529
         
522
          arr.push("备注")
530
          arr.push("备注")
523
-         console.log("arr",arr)
531
+        //  console.log("arr",arr)
524
 
532
 
525
          var arrTwo = []
533
          var arrTwo = []
526
          for(let i=0;i<arr.length;i++){
534
          for(let i=0;i<arr.length;i++){
527
             arrTwo.push('name'+i)
535
             arrTwo.push('name'+i)
528
          }
536
          }
529
-         console.log("arrTwo",arrTwo)
537
+        //  console.log("arrTwo",arrTwo)
530
          const tHeader = arr
538
          const tHeader = arr
531
         const filterVal = arrTwo
539
         const filterVal = arrTwo
532
         
540
         
545
          
553
          
546
           }
554
           }
547
         }
555
         }
548
-        console.log("list32232232323wi",this.list)
556
+        // console.log("list32232232323wi",this.list)
557
+        const data = this.formatJson(filterVal, this.list)
558
+         excel.export_json_to_excel({
559
+           header: tHeader,
560
+           data,
561
+           filename: '透析耗材查询'
562
+         })
563
+          this.downloadLoading = false
564
+        }) 
565
+      },
566
+      exportListOne(){
567
+        import('@/vendor/Export2Excel').then(excel => {
568
+         
569
+         var arr= []
570
+        
571
+         arr.push('序号')
572
+         arr.push('透析机号')
573
+         arr.push('姓名')
574
+         arr.push('透析号')
575
+       
576
+        //  console.log("list23322323232",this.typeList)
577
+         if(this.typeList!=null && this.typeList.length > 0){
578
+           for(let i=0;i<this.typeList.length;i++){
579
+             arr.push(this.typeList[i].type_name)
580
+           }
581
+         }
582
+        //  console.log("arr",arr)
583
+
584
+         var arrTwo = []
585
+         for(let i=0;i<arr.length;i++){
586
+            arrTwo.push('name'+i)
587
+         }
588
+        //  console.log("arrTwo",arrTwo)
589
+         const tHeader = arr
590
+        const filterVal = arrTwo
591
+        
592
+        if(this.list!=null && this.list.length > 0){
593
+          for(let i=0;i<this.list.length;i++){
594
+            this.list[i].name0 = i+1
595
+            this.list[i].name1= this.list[i].device_number.number
596
+            this.list[i].name2 = this.list[i].patient.name
597
+            this.list[i].name3 = this.list[i].patient.dialysis_no
598
+            if(this.typeList!=null && this.typeList.length > 0){
599
+              for(let j=0;j<this.typeList.length;j++){
600
+                this.list[i]['name'+(j+4)] = this.getStr(this.list[i].typeList[j].id,this.list[i].projectList,this.list[i].patient_id)
601
+              }
602
+            }
603
+         
604
+          }
605
+        }
606
+        // console.log("list32232232323wi",this.list)
549
         const data = this.formatJson(filterVal, this.list)
607
         const data = this.formatJson(filterVal, this.list)
550
          excel.export_json_to_excel({
608
          excel.export_json_to_excel({
551
            header: tHeader,
609
            header: tHeader,
569
        this.getlist()
627
        this.getlist()
570
       },
628
       },
571
       getlist(){
629
       getlist(){
572
-         console.log("paramsy2332322323",this.query)
630
+        //  console.log("paramsy2332322323",this.query)
573
         getPatientDialysisSolutionGroupList(this.query).then(response=>{
631
         getPatientDialysisSolutionGroupList(this.query).then(response=>{
574
            if(response.data.state == 1){
632
            if(response.data.state == 1){
575
              var list = response.data.data.list
633
              var list = response.data.data.list
614
                    }
672
                    }
615
                    
673
                    
616
                  }
674
                  }
617
-                console.log("list列表",list)
675
+                // console.log("list列表",list)
618
                  this.list = list 
676
                  this.list = list 
619
                }
677
                }
620
              }
678
              }
621
            }
679
            }
622
         })
680
         })
623
       },
681
       },
682
+      handleSizeChangeOne(val) {
683
+        this.query.limit = val;
684
+        this.getlist();
685
+      },
686
+      handleCurrentChangeOne(val) {
687
+        this.query.page = val;
688
+        this.getlist();
689
+      },
624
       handleSizeChange(val) {
690
       handleSizeChange(val) {
625
         this.query.limit = val;
691
         this.query.limit = val;
626
-        this.GetDialysisgoods();
692
+        this.getlist();
627
       },
693
       },
628
       handleCurrentChange(val) {
694
       handleCurrentChange(val) {
629
         this.query.page = val;
695
         this.query.page = val;
630
-        this.GetDialysisgoods();
696
+        this.getlist();
631
       },
697
       },
632
 
698
 
633
       calCount(query_warehouseout_info) {
699
       calCount(query_warehouseout_info) {
683
         })
749
         })
684
       },
750
       },
685
       statistics() {
751
       statistics() {
752
+        this.tableList = []
686
         var params = {
753
         var params = {
687
           schedule_type:this.schedule_type,
754
           schedule_type:this.schedule_type,
688
           partion_type:this.partion_type,
755
           partion_type:this.partion_type,
696
             var sodiumCount = 0
763
             var sodiumCount = 0
697
             var calciumCount = 0
764
             var calciumCount = 0
698
             var glucoseCount = 0
765
             var glucoseCount = 0
699
-            var punctureNeedleCount = 0
700
-            console.log("list232323223222wid",list)
766
+            var kaliumArr = []
767
+            var sodiumArr = []
768
+            var calciumArr = []
769
+            var glucoseArr = []
770
+            console.log("rowlist233223323223w",this.rowList)
701
             if(list!=null && list.length>0){
771
             if(list!=null && list.length>0){
702
               for(let i=0;i<list.length;i++){
772
               for(let i=0;i<list.length;i++){
703
                  list[i].dialysis_dialyszers_arr = []
773
                  list[i].dialysis_dialyszers_arr = []
704
                  list[i].dialyzer_perfusion_apparatus_arr = []
774
                  list[i].dialyzer_perfusion_apparatus_arr = []
705
                  list[i].dialysis_irrigation_arr = []
775
                  list[i].dialysis_irrigation_arr = []
706
                  list[i].puncture_needle_arr = []
776
                  list[i].puncture_needle_arr = []
777
+                
707
                  if(list[i].dialysis_solution.dialysis_dialyszers!=""){
778
                  if(list[i].dialysis_solution.dialysis_dialyszers!=""){
708
                    list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
779
                    list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
709
                  }
780
                  }
720
                  sodiumCount += parseInt(list[i].dialysis_solution.sodium)
791
                  sodiumCount += parseInt(list[i].dialysis_solution.sodium)
721
                  calciumCount +=parseInt(list[i].dialysis_solution.calcium)
792
                  calciumCount +=parseInt(list[i].dialysis_solution.calcium)
722
                  glucoseCount += parseInt(list[i].dialysis_solution.glucose)
793
                  glucoseCount += parseInt(list[i].dialysis_solution.glucose)
723
-                 punctureNeedleCount += parseInt(list[i].dialysis_solution.puncture_needle_count)
794
+                  
795
+                if(list[i].dialysis_solution!=null &&list[i].dialysis_solution.kalium > 0){
796
+                    list[i].dialysis_solution.specification = "钾" + list[i].dialysis_solution.kalium
797
+                    kaliumArr.push(list[i].dialysis_solution)
798
+                }
799
+
800
+                if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.sodium > 0){
801
+                  list[i].dialysis_solution.specification_one = "钠" + list[i].dialysis_solution.sodium
802
+                  sodiumArr.push(list[i].dialysis_solution)
803
+                }
804
+
805
+                if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.calcium > 0){
806
+                  list[i].dialysis_solution.specification_two = "钙" + list[i].dialysis_solution.calcium
807
+                  calciumArr.push(list[i].dialysis_solution)
808
+                }
809
+
810
+                if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.glucose > 0){
811
+                  list[i].dialysis_solution.specification_three = "葡萄糖" + list[i].dialysis_solution.glucose
812
+                  glucoseArr.push(list[i].dialysis_solution)
813
+                }
814
+              
815
+
816
+              }
817
+            }
818
+
819
+            console.log("kaliumArr",kaliumArr)
820
+            if(kaliumArr!=null && kaliumArr.length > 0){
821
+              let dataInfo = {}
822
+              kaliumArr.forEach((item, index) => {
823
+              let { specification } = item
824
+              if (!dataInfo[specification]) {
825
+                dataInfo[specification] = {
826
+                  name:"钾(mmol/L)",
827
+                  specification:item.specification,
828
+                  specification_name:item.kalium,
829
+                  child: [],
830
+                  count:0,
831
+                }
832
+              }
833
+            })
834
+            let newArr = Object.values(dataInfo)
835
+
836
+          
837
+            for(let i=0;i<kaliumArr.length;i++){
838
+              for(let j=0;j<newArr.length;j++){
839
+                if(kaliumArr[i].specification == newArr[j].specification){
840
+                    newArr[j].child.push(kaliumArr[i])
841
+                }
842
+              }
843
+            }
844
+
845
+            for(let i=0;i<newArr.length;i++){
846
+              for(let j=0;j<newArr[i].child.length;j++){
847
+                newArr[i].count += newArr[i].child[j].kalium
848
+              }
849
+            }
850
+           
851
+            console.log("newArr",newArr)
852
+            for(let i=0;i<newArr.length;i++){
853
+              this.tableList.push(newArr[i])
854
+            }
855
+
856
+           }
857
+
858
+
859
+           if(sodiumArr!=null && sodiumArr.length > 0){
860
+              let dataInfo = {}
861
+              sodiumArr.forEach((item, index) => {
862
+              let { specification_one } = item
863
+              if (!dataInfo[specification_one]) {
864
+                dataInfo[specification_one] = {
865
+                  name:"钠(mmol/L)",
866
+                  specification_one:item.specification_one,
867
+                  specification_name:item.sodium,
868
+                  child: [],
869
+                  count:0,
870
+                }
871
+              }
872
+            })
873
+            let newArr = Object.values(dataInfo)
874
+
875
+          
876
+            for(let i=0;i<sodiumArr.length;i++){
877
+              for(let j=0;j<newArr.length;j++){
878
+                if(sodiumArr[i].specification_one == newArr[j].specification_one){
879
+                    newArr[j].child.push(sodiumArr[i])
880
+                }
881
+              }
882
+            }
883
+
884
+            for(let i=0;i<newArr.length;i++){
885
+              for(let j=0;j<newArr[i].child.length;j++){
886
+                newArr[i].count += newArr[i].child[j].sodium
887
+              }
888
+            }
889
+           
890
+            console.log("newArr",newArr)
891
+            for(let i=0;i<newArr.length;i++){
892
+              this.tableList.push(newArr[i])
893
+            }
894
+           }
895
+
896
+          
897
+          if(calciumArr!=null && calciumArr.length > 0){
898
+              let dataInfo = {}
899
+              calciumArr.forEach((item, index) => {
900
+              let { specification_two } = item
901
+              if (!dataInfo[specification_two]) {
902
+                dataInfo[specification_two] = {
903
+                  name:"钠(mmol/L)",
904
+                  specification_two:item.specification_two,
905
+                  specification_name:item.calcium,
906
+                  child: [],
907
+                  count:0,
908
+                }
909
+              }
910
+            })
911
+            let newArr = Object.values(dataInfo)
912
+
913
+          
914
+            for(let i=0;i<calciumArr.length;i++){
915
+              for(let j=0;j<newArr.length;j++){
916
+                if(calciumArr[i].specification_two == newArr[j].specification_two){
917
+                    newArr[j].child.push(calciumArr[i])
918
+                }
919
+              }
920
+            }
921
+
922
+            for(let i=0;i<newArr.length;i++){
923
+              for(let j=0;j<newArr[i].child.length;j++){
924
+                newArr[i].count += newArr[i].child[j].calcium
925
+              }
926
+            }
927
+           
928
+            console.log("newArr",newArr)
929
+            for(let i=0;i<newArr.length;i++){
930
+              this.tableList.push(newArr[i])
931
+            }
932
+           }
933
+
934
+
935
+                
936
+          if(glucoseArr!=null && glucoseArr.length > 0){
937
+              let dataInfo = {}
938
+              glucoseArr.forEach((item, index) => {
939
+              let { specification_three } = item
940
+              if (!dataInfo[specification_three]) {
941
+                dataInfo[specification_three] = {
942
+                  name:"钠(mmol/L)",
943
+                  specification_three:item.specification_three,
944
+                  specification_name:item.glucose,
945
+                  child: [],
946
+                  count:0,
947
+                }
948
+              }
949
+            })
950
+            let newArr = Object.values(dataInfo)
951
+
952
+          
953
+            for(let i=0;i<glucoseArr.length;i++){
954
+              for(let j=0;j<newArr.length;j++){
955
+                if(glucoseArr[i].specification_three == newArr[j].specification_three){
956
+                    newArr[j].child.push(glucoseArr[i])
957
+                }
958
+              }
959
+            }
724
 
960
 
961
+            for(let i=0;i<newArr.length;i++){
962
+              for(let j=0;j<newArr[i].child.length;j++){
963
+                newArr[i].count += newArr[i].child[j].glucose
725
               }
964
               }
726
             }
965
             }
966
+           
967
+            console.log("newArr",newArr)
968
+            for(let i=0;i<newArr.length;i++){
969
+              this.tableList.push(newArr[i])
970
+            }
971
+           }
972
+
727
             var dialysisDialyszersArr = []
973
             var dialysisDialyszersArr = []
728
             var dialyzerPerfusionApparaArr = []
974
             var dialyzerPerfusionApparaArr = []
729
             var dialysisIrrigationArr = []
975
             var dialysisIrrigationArr = []
730
             var punctureNeedleArr = []
976
             var punctureNeedleArr = []
977
+            
978
+          
731
             for(let i=0;i<list.length;i++){
979
             for(let i=0;i<list.length;i++){
732
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
980
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
733
              
981
              
743
                punctureNeedleArr.push(list[i].puncture_needle_arr[h])   
991
                punctureNeedleArr.push(list[i].puncture_needle_arr[h])   
744
              }
992
              }
745
             }
993
             }
746
-            console.log("透析器",dialysisDialyszersArr)
747
-            console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
748
-            console.log("灌流器",dialysisIrrigationArr)
749
-            console.log("穿刺针",punctureNeedleArr)  
750
            let obj = {}
994
            let obj = {}
751
            let objOne = {}
995
            let objOne = {}
752
            let objTwo = {}
996
            let objTwo = {}
801
               a.specification_name = i
1045
               a.specification_name = i
802
               Arr.push(a);
1046
               Arr.push(a);
803
             }
1047
             }
804
-            console.log("newa",Arr)
805
-          
1048
+            
806
           for(let i = 0 ; i < punctureNeedleArr.length; i++){
1049
           for(let i = 0 ; i < punctureNeedleArr.length; i++){
807
             if(objThree[punctureNeedleArr[i]]){
1050
             if(objThree[punctureNeedleArr[i]]){
808
                objThree[punctureNeedleArr[i]] +=1
1051
                objThree[punctureNeedleArr[i]] +=1
819
               Arr.push(a);
1062
               Arr.push(a);
820
             }
1063
             }
821
             
1064
             
1065
+          
1066
+
822
 
1067
 
823
-           var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
824
-           var objsix =  {name:"钠(mmol/L)",specification_name:"1.25",count:""}
825
-           var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
826
-           var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
827
-           var objten = {name:"穿刺针支数",specification_name:"穿刺针支数",count:""}
1068
+          //  var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
1069
+          //  var objsix =  {name:"钠(mmol/L)",specification_name:"1.25",count:""}
1070
+          //  var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
1071
+          //  var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
1072
+         
1073
+           
1074
+            // objfive.count = kaliumCount
1075
+            // objsix.count = sodiumCount
1076
+            // objseven.count = calciumCount
1077
+            // objeight.count = glucoseCount
1078
+            
1079
+            // this.tableList.push(objfive)
1080
+            // this.tableList.push(objsix)
1081
+            // this.tableList.push(objseven)
1082
+            // this.tableList.push(objeight)
828
            
1083
            
829
-            objfive.count = kaliumCount
830
-            objsix.count = sodiumCount
831
-            objseven.count = calciumCount
832
-            objeight.count = glucoseCount
833
-            objten.count = punctureNeedleCount
834
-            this.tableList.push(objfive)
835
-            this.tableList.push(objsix)
836
-            this.tableList.push(objseven)
837
-            this.tableList.push(objeight)
838
-            this.tableList.push(objten)
839
             for(let i=0;i<Arr.length;i++){
1084
             for(let i=0;i<Arr.length;i++){
840
-
841
-              this.tableList.push(Arr[i])
1085
+              for(let j=0;j<this.rowList.length;j++){
1086
+                if(Arr[i].name == this.rowList[j].filed_name_cn){
1087
+                  this.tableList.push(Arr[i])
1088
+                }
1089
+              }
842
             }
1090
             }
843
             
1091
             
1092
+            console.log("tablistlist233323232",this.tableList)
844
            
1093
            
845
           }
1094
           }
846
        })
1095
        })
847
         
1096
         
848
       },
1097
       },
849
       toStatistics(){
1098
       toStatistics(){
1099
+        this.tableList = []
850
          var params = {
1100
          var params = {
851
           schedule_type:this.schedule_type,
1101
           schedule_type:this.schedule_type,
852
           partion_type:this.partion_type,
1102
           partion_type:this.partion_type,
855
         getHisDialysisGoodCount(params).then(response=>{
1105
         getHisDialysisGoodCount(params).then(response=>{
856
           if(response.data.state == 1){
1106
           if(response.data.state == 1){
857
              var list = response.data.data.list
1107
              var list = response.data.data.list
858
-             console.log("list23233223232wode",list)
1108
+            //  console.log("list23233223232wode",list)
859
             this.startHisDialogVisible = true
1109
             this.startHisDialogVisible = true
860
              var projectList = []
1110
              var projectList = []
861
              for(let i=0;i<list.length;i++){
1111
              for(let i=0;i<list.length;i++){
867
                      }
1117
                      }
868
                 }
1118
                 }
869
              }
1119
              }
870
-             console.log("projectList",projectList)
1120
+            //  console.log("projectList",projectList)
871
              
1121
              
872
              if(projectList!=null && projectList.length > 0){
1122
              if(projectList!=null && projectList.length > 0){
873
                for(let i=0;i<projectList.length;i++){
1123
                for(let i=0;i<projectList.length;i++){
904
                  newArr[i].count += parseInt(newArr[i].child[j].count)
1154
                  newArr[i].count += parseInt(newArr[i].child[j].count)
905
               }
1155
               }
906
             }
1156
             }
907
-            console.log("newArr32323233223wo",newArr)
1157
+            // console.log("newArr32323233223wo",newArr)
908
             this.tableList = newArr
1158
             this.tableList = newArr
909
           }
1159
           }
910
         })
1160
         })
1065
        if(filed_name_cn == "穿刺针"){
1315
        if(filed_name_cn == "穿刺针"){
1066
           return val.puncture_needle
1316
           return val.puncture_needle
1067
         }
1317
         }
1068
-       if(filed_name_cn == "穿刺针支数"){
1069
-          return val.puncture_needle_count
1070
-        }
1318
+      //  if(filed_name_cn == "穿刺针支数"){
1319
+      //     return val.puncture_needle_count
1320
+      //   }
1071
        if(filed_name_cn == "促红素"){
1321
        if(filed_name_cn == "促红素"){
1072
           return val.epo_count
1322
           return val.epo_count
1073
         }
1323
         }
1260
           this.goodTypeList = []
1510
           this.goodTypeList = []
1261
           this.goodTypeList = response.data.data.goodType
1511
           this.goodTypeList = response.data.data.goodType
1262
 
1512
 
1263
-          console.log("typelist2332233223wo",this.goodTypeList)
1513
+          // console.log("typelist2332233223wo",this.goodTypeList)
1264
           for(let i=0;i<this.goodTypeList.length;i++){
1514
           for(let i=0;i<this.goodTypeList.length;i++){
1265
             if(i == 0 && this.goodTypeList[i].is_open == 1){
1515
             if(i == 0 && this.goodTypeList[i].is_open == 1){
1266
               this.checkedOne = true
1516
               this.checkedOne = true
1275
                this.checkedFour = true
1525
                this.checkedFour = true
1276
             }
1526
             }
1277
             if(i == 4 && this.goodTypeList[i].is_open == 1){
1527
             if(i == 4 && this.goodTypeList[i].is_open == 1){
1278
-              console.log("进来22323")
1528
+              // console.log("进来22323")
1279
                this.checkedFive = true
1529
                this.checkedFive = true
1280
             }
1530
             }
1281
             if(i == 5 && this.goodTypeList[i].is_open == 1){
1531
             if(i == 5 && this.goodTypeList[i].is_open == 1){
1590
       var params = {
1840
       var params = {
1591
         ids:arr.join(","),
1841
         ids:arr.join(","),
1592
       }
1842
       }
1593
-      console.log("params23322322332",params)
1843
+      // console.log("params23322322332",params)
1594
       saveHisDialysis(params).then(response=>{
1844
       saveHisDialysis(params).then(response=>{
1595
         if(response.data.state == 1){
1845
         if(response.data.state == 1){
1596
            var msg = response.data.data.msg
1846
            var msg = response.data.data.msg
1691
           }
1941
           }
1692
         })
1942
         })
1693
          let newArr = Object.values(dataInfo)
1943
          let newArr = Object.values(dataInfo)
1694
-         console.log("newArr",newArr)
1944
+        //  console.log("newArr",newArr)
1695
           for(let i=0;i<arr.length;i++){
1945
           for(let i=0;i<arr.length;i++){
1696
             for(let j=0;j<newArr.length;j++){
1946
             for(let j=0;j<newArr.length;j++){
1697
               if( arr[i].good_info.id == newArr[j].good_id){
1947
               if( arr[i].good_info.id == newArr[j].good_id){
1715
       return str
1965
       return str
1716
     },
1966
     },
1717
     toPrint(){
1967
     toPrint(){
1718
-     this.$router.push({path:'/dialysis/consumable/dialysisgoodprint?limit='+this.query.limit+"&page="+this.query.page+"&partition_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&schedule_type="+this.query.schedule_type+"&keywords="+this.query.keywords})
1968
+     this.$router.push({path:'/dialysis/consumable/dialysisgoodprint?limit='+this.query.limit+"&page="+this.query.page+"&partition_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&schedule_type="+this.query.schedule_type+"&keywords="+this.query.keywords+"&ids="+this.ids})
1719
     },
1969
     },
1720
     toPrintOne(){
1970
     toPrintOne(){
1721
-      this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_type+"&selected_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
1971
+      this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_type+"&schedule_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
1972
+    },
1973
+    toHisPrint(){
1974
+      this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_type+"&schedule_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
1975
+    },
1976
+    toExportListOne(){
1977
+      import('@/vendor/Export2Excel').then(excel => {
1978
+         
1979
+        if(this.tableList!=null && this.tableList.length > 0){
1980
+           for(let i=0;i<this.tableList.length;i++){
1981
+             this.tableList[i].index = i+1
1982
+           }
1983
+        }
1984
+        const tHeader = ['序号','耗材名称','规格','数量']
1985
+        const filterVal = ['index', 'name','specification_name','count']
1986
+
1987
+        const data = this.formatJson(filterVal, this.tableList)
1988
+         excel.export_json_to_excel({
1989
+           header: tHeader,
1990
+           data,
1991
+           filename: '透析耗材统计'
1992
+         })
1993
+          this.downloadLoading = false
1994
+        }) 
1995
+    },
1996
+    toExportListTwo(){
1997
+      import('@/vendor/Export2Excel').then(excel => { 
1998
+        if(this.tableList!=null && this.tableList.length > 0){
1999
+           for(let i=0;i<this.tableList.length;i++){
2000
+             this.tableList[i].index = i+1
2001
+           }
2002
+        }
2003
+        const tHeader = ['序号','耗材名称','规格','数量']
2004
+        const filterVal = ['index', 'good_name','specification_name','count']
2005
+
2006
+        const data = this.formatJson(filterVal, this.tableList)
2007
+         excel.export_json_to_excel({
2008
+           header: tHeader,
2009
+           data,
2010
+           filename: '透析耗材统计'
2011
+         })
2012
+          this.downloadLoading = false
2013
+        })  
2014
+    },
2015
+    handleSelectionChange(val){
2016
+      var arr = []
2017
+      for(let i=0;i<val.length;i++){
2018
+        arr.push(val[i].id)
2019
+      }
2020
+      this.ids = arr.join(",")
2021
+      // console.log("ids23323232",this.ids)
2022
+    },
2023
+    changeScheduleType(){
2024
+      console.log("changeScheduleType",this.his_config)
2025
+     if(this.his_config.is_open != 1){
2026
+        this.tableList = []
2027
+        this.statistics()
2028
+     }
2029
+     if(this.his_config.is_open == 1){
2030
+       this.tableList = []
2031
+       this.toStatistics()
2032
+     }
2033
+    },
2034
+    changePartionType(){
2035
+     if(this.his_config.is_open != 1){
2036
+        this.tableList = []
2037
+        this.statistics()
2038
+     }
2039
+     if(this.his_config.is_open == 1){
2040
+       this.tableList = []
2041
+       this.toStatistics()
2042
+     }
1722
     }
2043
     }
1723
    }
2044
    }
1724
   }
2045
   }

+ 224 - 52
src/xt_pages/dialysis/details/consumable/dialysisParameter.vue 查看文件

61
           backgroundColor: 'rgb(245, 247, 250)',
61
           backgroundColor: 'rgb(245, 247, 250)',
62
           color: '#606266'
62
           color: '#606266'
63
         }"
63
         }"
64
+       @selection-change="handleSelectionChange"
64
       >
65
       >
65
         <el-table-column align="center"  type="selection" width="55">
66
         <el-table-column align="center"  type="selection" width="55">
66
         </el-table-column>
67
         </el-table-column>
91
         </el-table-column>
92
         </el-table-column>
92
         <el-table-column align="center" label="透前体重"  v-if="dialysisSett.weight_befor==1">
93
         <el-table-column align="center" label="透前体重"  v-if="dialysisSett.weight_befor==1">
93
            <template slot-scope="scope">
94
            <template slot-scope="scope">
94
-             {{scope.row.assessment_befor_dislysis.weight_before}}
95
+             {{scope.row.assessment_befor_dislysis.weight_before?scope.row.assessment_befor_dislysis.weight_before:""}}
95
            </template>
96
            </template>
96
         </el-table-column>
97
         </el-table-column>
97
          <el-table-column align="center" label="干体重" v-if="dialysisSett.dry_weight==1">
98
          <el-table-column align="center" label="干体重" v-if="dialysisSett.dry_weight==1">
98
            <template slot-scope="scope">
99
            <template slot-scope="scope">
99
-            {{scope.row.assessment_befor_dislysis.dry_weight}}
100
+            {{scope.row.assessment_befor_dislysis.dry_weight?scope.row.assessment_befor_dislysis.dry_weight:""}}
100
            </template>
101
            </template>
101
         </el-table-column>
102
         </el-table-column>
102
          <el-table-column align="center" label="透前血压"  v-if="dialysisSett.blood_pressure==1">
103
          <el-table-column align="center" label="透前血压"  v-if="dialysisSett.blood_pressure==1">
112
         </el-table-column>
113
         </el-table-column>
113
         <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)"  v-if="dialysisSett.anticoagulant==1">
114
         <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)"  v-if="dialysisSett.anticoagulant==1">
114
            <template slot-scope="scope">
115
            <template slot-scope="scope">
115
-             <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
116
-             <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
117
              <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
116
              <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
118
              <span v-if="scope.row.dialysis_prescription.anticoagulant_shouji > 0">({{scope.row.dialysis_prescription.anticoagulant_shouji}})</span>
117
              <span v-if="scope.row.dialysis_prescription.anticoagulant_shouji > 0">({{scope.row.dialysis_prescription.anticoagulant_shouji}})</span>
119
              <span v-if="scope.row.dialysis_prescription.anticoagulant_weichi > 0">({{scope.row.dialysis_prescription.anticoagulant_weichi}})</span>
118
              <span v-if="scope.row.dialysis_prescription.anticoagulant_weichi > 0">({{scope.row.dialysis_prescription.anticoagulant_weichi}})</span>
123
 
122
 
124
         <el-table-column align="center" label="透析时长" v-if="dialysisSett.dialysis_time ==1">
123
         <el-table-column align="center" label="透析时长" v-if="dialysisSett.dialysis_time ==1">
125
            <template slot-scope="scope">
124
            <template slot-scope="scope">
126
-             <span v-if="scope.row.dialysis_duration_hour >0">{{scope.row.dialysis_duration_hour}}时</span>
127
-             <span v-if="scope.row.dialysis_duration_minute >0">{{scope.row.dialysis_duration_minute}}分</span>
125
+             <span v-if="scope.row.dialysis_prescription.dialysis_duration_hour >0">{{scope.row.dialysis_prescription.dialysis_duration_hour}}时</span>
126
+             <span v-if="scope.row.dialysis_prescription.dialysis_duration_minute >0">{{scope.row.dialysis_prescription.dialysis_duration_minute}}分</span>
128
            </template>
127
            </template>
129
         </el-table-column>
128
         </el-table-column>
130
 
129
 
151
              <span>{{scope.row.dialysis_prescription.dialysis_irrigation}}</span>
150
              <span>{{scope.row.dialysis_prescription.dialysis_irrigation}}</span>
152
            </template>
151
            </template>
153
         </el-table-column>
152
         </el-table-column>
153
+        
154
+        <el-table-column align="center" label="置换液" v-if="dialysisSett.displace_liqui_part==1">
155
+           <template slot-scope="scope">
156
+             <span>{{getDisplaceLiquiPart(scope.row.dialysis_prescription.displace_liqui_part)}}</span>
157
+           </template>
158
+        </el-table-column>
154
 
159
 
155
-
156
-        <el-table-column align="center" label="置换总量" v-if="dialysisSett.displace_liqui_value==1">
160
+        <el-table-column align="center" label="置换液总量" v-if="dialysisSett.displace_liqui_value==1">
157
            <template slot-scope="scope">
161
            <template slot-scope="scope">
158
-             <span>{{scope.row.dialysis_prescription.replacement_total}}</span>
162
+             <span v-if="scope.row.dialysis_prescription.displace_liqui_value>0">{{scope.row.dialysis_prescription.displace_liqui_value}}</span>
159
            </template>
163
            </template>
160
         </el-table-column>
164
         </el-table-column>
161
        
165
        
162
 
166
 
163
         <el-table-column align="center" label="钾"  v-if="dialysisSett.kalium==1">
167
         <el-table-column align="center" label="钾"  v-if="dialysisSett.kalium==1">
164
            <template slot-scope="scope">
168
            <template slot-scope="scope">
165
-             <span>{{scope.row.dialysis_prescription.kalium}}</span>
169
+             <span v-if="scope.row.dialysis_prescription.kalium>0">{{scope.row.dialysis_prescription.kalium}}</span>
166
            </template>
170
            </template>
167
         </el-table-column>
171
         </el-table-column>
168
 
172
 
169
         <el-table-column align="center" label="钠" v-if="dialysisSett.sodium==1">
173
         <el-table-column align="center" label="钠" v-if="dialysisSett.sodium==1">
170
            <template slot-scope="scope">
174
            <template slot-scope="scope">
171
-             <span>{{scope.row.dialysis_prescription.sodium}}</span>
175
+             <span v-if="scope.row.dialysis_prescription.sodium>0">{{scope.row.dialysis_prescription.sodium}}</span>
172
            </template>
176
            </template>
173
         </el-table-column>
177
         </el-table-column>
174
 
178
 
176
 
180
 
177
         <el-table-column align="center" label="钙" v-if="dialysisSett.calcium==1">
181
         <el-table-column align="center" label="钙" v-if="dialysisSett.calcium==1">
178
            <template slot-scope="scope">
182
            <template slot-scope="scope">
179
-             <span>{{scope.row.dialysis_prescription.calcium}}</span>
183
+             <span v-if="scope.row.dialysis_prescription.calcium>0">{{scope.row.dialysis_prescription.calcium}}</span>
180
            </template>
184
            </template>
181
         </el-table-column>
185
         </el-table-column>
182
 
186
 
183
         <el-table-column align="center" label="碳酸氢盐"  v-if="dialysisSett.bicarbonate == 1">
187
         <el-table-column align="center" label="碳酸氢盐"  v-if="dialysisSett.bicarbonate == 1">
184
            <template slot-scope="scope">
188
            <template slot-scope="scope">
185
-              <span>{{scope.row.dialysis_prescription.bicarbonate}}</span>
189
+              <span v-if="scope.row.dialysis_prescription.bicarbonate>0">{{scope.row.dialysis_prescription.bicarbonate}}</span>
186
            </template>
190
            </template>
187
         </el-table-column>
191
         </el-table-column>
188
 
192
 
194
 
198
 
195
        <el-table-column align="center" label="封管液" v-if="dialysisSett.sealing_fluid_dispose == 1">
199
        <el-table-column align="center" label="封管液" v-if="dialysisSett.sealing_fluid_dispose == 1">
196
            <template slot-scope="scope">
200
            <template slot-scope="scope">
197
-             {{scope.row.xt_assesment_after_dislysis.sealing_fluid_dispose}}
201
+             <span v-if="scope.row.xt_assesment_after_dislysis.sealing_fluid_dispose>0">{{scope.row.xt_assesment_after_dislysis.sealing_fluid_dispose}} </span> 
198
            </template>
202
            </template>
199
         </el-table-column>
203
         </el-table-column>
200
 
204
 
201
         <el-table-column align="center" label="葡萄糖"  v-if="dialysisSett.glucose==1">
205
         <el-table-column align="center" label="葡萄糖"  v-if="dialysisSett.glucose==1">
202
            <template slot-scope="scope">
206
            <template slot-scope="scope">
203
-             {{scope.row.dialysis_prescription.amylaceum}}
207
+             <span  v-if="scope.row.dialysis_prescription.amylaceum>0">{{scope.row.dialysis_prescription.amylaceum}} </span> 
204
            </template>
208
            </template>
205
         </el-table-column>
209
         </el-table-column>
206
       </el-table>
210
       </el-table>
229
            <el-checkbox v-model="dialysis_dialyszers" label="透析器"></el-checkbox>
233
            <el-checkbox v-model="dialysis_dialyszers" label="透析器"></el-checkbox>
230
            <el-checkbox v-model="dialysis_irrigation" label="灌流器"></el-checkbox>
234
            <el-checkbox v-model="dialysis_irrigation" label="灌流器"></el-checkbox>
231
            <el-checkbox v-model="kalium" label="钾"></el-checkbox>
235
            <el-checkbox v-model="kalium" label="钾"></el-checkbox>
232
-           <el-checkbox v-model="displace_liqui_value" label="置换总量"></el-checkbox>
236
+           <el-checkbox v-model="displace_liqui_value" label="置换总量"></el-checkbox>
233
            <el-checkbox v-model="bicarbonate" label="碳酸氢根"></el-checkbox>
237
            <el-checkbox v-model="bicarbonate" label="碳酸氢根"></el-checkbox>
234
            <el-checkbox v-model="glucose" label="葡萄糖"></el-checkbox>
238
            <el-checkbox v-model="glucose" label="葡萄糖"></el-checkbox>
235
 
239
 
315
 
319
 
316
 
320
 
317
    <el-dialog
321
    <el-dialog
318
-      title="药品统计表"
322
+      title="透析参数统计表"
319
       :visible.sync="startdialogVisible"
323
       :visible.sync="startdialogVisible"
320
       width="70%">
324
       width="70%">
321
       <span>
325
       <span>
322
         <div class="cell clearfix">
326
         <div class="cell clearfix">
323
           <label class="title"> <span class="name">排班班次</span> : </label>
327
           <label class="title"> <span class="name">排班班次</span> : </label>
324
-           <el-select v-model="schedule_type" placeholder="请选择">
328
+           <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
325
             <el-option
329
             <el-option
326
               v-for="item in schedulArr"
330
               v-for="item in schedulArr"
327
               :key="item.value"
331
               :key="item.value"
330
             </el-option>
334
             </el-option>
331
            </el-select>
335
            </el-select>
332
            <label class="title"> <span class="name">病区选择</span> : </label>
336
            <label class="title"> <span class="name">病区选择</span> : </label>
333
-           <el-select v-model="partion_type" placeholder="请选择">
337
+           <el-select v-model="partion_type" placeholder="请选择" @change="changePartionType">
334
             <el-option
338
             <el-option
335
               v-for="item in partitionArr"
339
               v-for="item in partitionArr"
336
               :key="item.id"
340
               :key="item.id"
338
               :value="item.id">
342
               :value="item.id">
339
             </el-option>
343
             </el-option>
340
            </el-select>
344
            </el-select>
345
+           <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
346
+           <el-button size="small" icon="el-icon-printer" @click="exportListOne" type="primary">导出</el-button>
341
         </div> 
347
         </div> 
342
        <el-table
348
        <el-table
343
         :data="tableList"
349
         :data="tableList"
404
           limit:10,
410
           limit:10,
405
           keywords:"",
411
           keywords:"",
406
           good_type:0,
412
           good_type:0,
413
+          ids:"",
407
         },
414
         },
408
         schedulType: 0,
415
         schedulType: 0,
409
         schedulArr: [
416
         schedulArr: [
489
         anticoagulant: false,
496
         anticoagulant: false,
490
         anticoagulant_zongliang: false,
497
         anticoagulant_zongliang: false,
491
         doctor_advice: false,
498
         doctor_advice: false,
499
+        displace_liqui_part_option:[],
500
+        ids:""
492
       }
501
       }
493
     },
502
     },
494
     created() {
503
     created() {
495
        this.blood_access_option  = getDataConfig('hemodialysis', 'vascular_access_desc')
504
        this.blood_access_option  = getDataConfig('hemodialysis', 'vascular_access_desc')
505
+       this.displace_liqui_part_option = this.$store.getters.displace_liqui
506
+       console.log("志愿液",this.displace_liqui_part_option)
496
        var filedList = store.getters.xt_user.fileds
507
        var filedList = store.getters.xt_user.fileds
497
        var newArr = [
508
        var newArr = [
498
         {value:999999,filed_name_cn:"姓名"},
509
         {value:999999,filed_name_cn:"姓名"},
537
               this.list = list
548
               this.list = list
538
               this.total = response.data.data.total
549
               this.total = response.data.data.total
539
               this.dialysisSett = response.data.data.dialysisSett
550
               this.dialysisSett = response.data.data.dialysisSett
540
-              console.log("设置",this.dialysisSett)
551
+              // console.log("设置",this.dialysisSett)
541
             }
552
             }
542
         }) 
553
         }) 
543
       },
554
       },
621
         })
632
         })
622
       },
633
       },
623
       statistics() {
634
       statistics() {
635
+         this.tableList = []
624
          var params = {
636
          var params = {
625
           schedule_type:this.schedule_type,
637
           schedule_type:this.schedule_type,
626
           partion_type:this.partion_type,
638
           partion_type:this.partion_type,
630
            if(response.data.state == 1){
642
            if(response.data.state == 1){
631
             this.startdialogVisible = true
643
             this.startdialogVisible = true
632
             var list = response.data.data.list
644
             var list = response.data.data.list
633
-            console.log("list232323223222wid",list)
645
+            // console.log("list232323223222wid",list)
634
             var total = 0
646
             var total = 0
635
             var total_one = 0
647
             var total_one = 0
636
             var total_two = 0
648
             var total_two = 0
705
             var dialysisIrrigationArr = []
717
             var dialysisIrrigationArr = []
706
             for(let i=0;i<list.length;i++){
718
             for(let i=0;i<list.length;i++){
707
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
719
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
708
-              console.log("list23323232",list[i].dialysis_dialyszers_arr[j])
720
+              // console.log("list23323232",list[i].dialysis_dialyszers_arr[j])
709
                dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
721
                dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
710
              }
722
              }
711
              for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
723
              for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
715
               dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
727
               dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
716
              }
728
              }
717
             }
729
             }
718
-            console.log("透析器",dialysisDialyszersArr)
719
-            console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
720
-            console.log("灌流器",dialysisIrrigationArr)
730
+            // console.log("透析器",dialysisDialyszersArr)
731
+            // console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
732
+            // console.log("灌流器",dialysisIrrigationArr)
721
              
733
              
722
            let obj = {}
734
            let obj = {}
723
            let objOne = {}
735
            let objOne = {}
772
               a.specification_name = i
784
               a.specification_name = i
773
               Arr.push(a);
785
               Arr.push(a);
774
             }
786
             }
775
-            console.log("newa",Arr)
776
-           console.log("total_one",total_one)
787
+          //   console.log("newa",Arr)
788
+          //  console.log("total_one",total_one)
777
            var  objArr = {name:"抗凝剂",specification_name:"无肝素",count:0}
789
            var  objArr = {name:"抗凝剂",specification_name:"无肝素",count:0}
778
            objArr.count = total
790
            objArr.count = total
779
            var objArrOne = {name:"抗凝剂",specification_name:"普通肝素",count:0}
791
            var objArrOne = {name:"抗凝剂",specification_name:"普通肝素",count:0}
800
             objArrEleven.count = total_elven
812
             objArrEleven.count = total_elven
801
            var objArrTwenty = {name:"抗凝剂",specification_name:"那屈肝素钙",count:0}
813
            var objArrTwenty = {name:"抗凝剂",specification_name:"那屈肝素钙",count:0}
802
             objArrTwenty.count = total_twenty
814
             objArrTwenty.count = total_twenty
803
-             console.log("objArrOne",objArrOne.count)
815
+            //  console.log("objArrOne",objArrOne.count)
816
+             this.tableList = []
804
               if(parseInt(objArr.count) > 0){
817
               if(parseInt(objArr.count) > 0){
805
                 this.tableList.push(objArr)
818
                 this.tableList.push(objArr)
806
               }
819
               }
807
-              console.log("objArrOne",parseInt(objArrOne.count))
820
+              // console.log("objArrOne",parseInt(objArrOne.count))
808
              if(parseInt(objArrOne.count) > 0){
821
              if(parseInt(objArrOne.count) > 0){
809
-                console.log("j你了了呃呃呃呃呃呃")
822
+                // console.log("j你了了呃呃呃呃呃呃")
810
                 this.tableList.push(objArrOne)
823
                 this.tableList.push(objArrOne)
811
               }
824
               }
812
               if(parseInt(objArrTwo).count > 0){
825
               if(parseInt(objArrTwo).count > 0){
864
 
877
 
865
        exportList(){
878
        exportList(){
866
          import('@/vendor/Export2Excel').then(excel => {
879
          import('@/vendor/Export2Excel').then(excel => {
880
+      
881
+         if(this.list!=null && this.list.length > 0){
882
+            // console.log("hhhahhah",this.list)
883
+            for(let i=0;i<this.list.length;i++){
884
+              this.list[i].index = i+1
885
+              this.list[i].device_number_one =  this.list[i].device_number.zone.name + this.list[i].device_number.number
886
+              this.list[i].patient_name = this.list[i].patient.name
887
+              this.list[i].dialysis_no = this.list[i].patient.dialysis_no
888
+              this.list[i].admission_number = this.list[i].xt_receive_treatment_asses.admission_number
889
+              this.list[i].weight_before = this.list[i].assessment_befor_dislysis.weight_befor
890
+              this.list[i].dry_weight = this.list[i].assessment_befor_dislysis.dry_weight
891
+              this.list[i].blood_pressure = this.list[i].assessment_befor_dislysis.systolic_blood_pressure + "/" + this.list[i].assessment_befor_dislysis.diastolic_blood_pressure
892
+              this.list[i].ultrafiltration_volume = this.list[i].dialysis_prescription.target_ultrafiltration
893
+             
894
+              this.list[i].anticoagulant_one = this.getAnticoagualnt(this.list[i].dialysis_prescription.anticoagulant) + this.list[i].dialysis_prescription.anticoagulant_shouji + this.list[i].dialysis_prescription.anticoagulant_weichi+this.list[i].dialysis_prescription.anticoagulant_zongliang
895
+              
896
+              this.list[i].dialysis_time = this.list[i].dialysis_prescription.dialysis_duration_hour + "时"+ this.list[i].dialysis_prescription.dialysis_duration_minute + "分"
897
+              this.list[i].device_type = this.list[i].assessment_befor_dislysis.machine_type
898
+              this.list[i].dialyzer_perfusion_apparatus = this.list[i].dialysis_prescription.dialyzer_perfusion_apparatus
899
+              this.list[i].dialysis_dialyszers = this.list[i].dialysis_prescription.dialysis_dialyszers
900
+              this.list[i].dialysis_irrigation = this.list[i].dialysis_prescription.dialysis_irrigation
901
+              this.list[i].displace_liqui_value = this.list[i].dialysis_prescription.replacement_total
902
+              this.list[i].kalium = this.list[i].dialysis_prescription.kalium
903
+              this.list[i].sodium = this.list[i].dialysis_prescription.sodium
904
+              this.list[i].calcium = this.list[i].dialysis_prescription.bicarbonate
905
+              this.list[i].blood_access = this.getBloodAccessOption(this.list[i].dialysis_prescription.blood_access)
906
+              this.list[i].sealing_fluid_dispose =this.list[i].xt_assesment_after_dislysis.sealing_fluid_dispose
907
+              this.list[i].glucose = this.list[i].dialysis_prescription.amylaceum
908
+            }
909
+         }
867
 
910
 
868
-
869
-
911
+        // console.log("list23323232322323wode",this.list)
912
+         var arr= []
870
          var arrTwo = []
913
          var arrTwo = []
871
-         for(let i=0;i<this.arrKey.length;i++){
872
-            arrTwo.push('name'+i)
914
+         arr.push('序号')
915
+         arrTwo.push("index")
916
+         if(this.dialysisSett.device_number == 1){
917
+           arr.push("透析机号")
918
+           arrTwo.push("device_number_one")
919
+         }
920
+         if(this.dialysisSett.name == 1){
921
+           arr.push("姓名")
922
+           arrTwo.push("patient_name")
923
+         }
924
+         if(this.dialysisSett.dialysis_no == 1){
925
+           arr.push("透析号")
926
+           arrTwo.push("dialysis_no")
927
+         }
928
+         if(this.dialysisSett.admission_number == 1){
929
+           arr.push("住院(门诊)号")
930
+           arrTwo.push("admission_number")
931
+         }
932
+         if(this.dialysisSett.weight_befor == 1){
933
+           arr.push("透前体重")
934
+           arrTwo.push("weight_befor")
935
+         }
936
+         if(this.dialysisSett.dry_weight == 1){
937
+           arr.push("干体重")
938
+           arrTwo.push("dry_weight")
939
+         }
940
+         if(this.dialysisSett.blood_pressure == 1){
941
+            arr.push("透前血压")
942
+            arrTwo.push("blood_pressure")
943
+         }
944
+         if(this.dialysisSett.ultrafiltration_volume == 1){
945
+           arr.push("目标脱水量")
946
+           arrTwo.push("ultrafiltration_volume")
947
+         }
948
+         if(this.dialysisSett.anticoagulant == 1){
949
+           arr.push("抗凝剂(首剂)(维持)(总量)")
950
+           arrTwo.push("anticoagulant_one")
951
+         }
952
+         if(this.dialysisSett.dialysis_time == 1){
953
+           arr.push("透析时长")
954
+           arrTwo.push("dialysis_time")
955
+         }
956
+         if(this.dialysisSett.device_type == 1){
957
+           arr.push("设备型号")
958
+           arrTwo.push("device_type")
959
+         } 
960
+         if(this.dialysisSett.dialyzer_perfusion_apparatus == 1){
961
+            arr.push("透析器/灌流器")
962
+            arrTwo.push("dialyzer_perfusion_apparatus")
963
+         }
964
+         if(this.dialysisSett.dialysis_dialyszers == 1){
965
+           arr.push("透析器")
966
+           arrTwo.push("dialysis_dialyszers")
967
+         }
968
+         if(this.dialysisSett.dialysis_irrigation == 1){
969
+           arr.push("灌流器")
970
+           arrTwo.push("dialysis_irrigation")
971
+         }
972
+         if(this.dialysisSett.displace_liqui_value == 1){
973
+           arr.push("置换液总量")
974
+           arrTwo.push("displace_liqui_value")
975
+         }
976
+         if(this.dialysisSett.kalium == 1){
977
+           arr.push("钾")
978
+           arrTwo.push("kalium")
979
+         }
980
+         if(this.dialysisSett.sodium == 1){
981
+           arr.push("钠")
982
+           arrTwo.push("sodium")
983
+         }
984
+         if(this.dialysisSett.calcium == 1){
985
+           arr.push("钙")
986
+           arrTwo.push("calcium")
987
+         }
988
+         if(this.dialysisSett.bicarbonate == 1){
989
+           arr.push("碳酸氢盐")
990
+           arrTwo.push("bicarbonate")
991
+         }
992
+         if(this.dialysisSett.blood_access == 1){
993
+           arr.push("血管通路")
994
+           arrTwo.push("blood_access")
873
          }
995
          }
874
-         console.log("arrKey88888",arrTwo)
875
 
996
 
876
-        //  console.log("9999999",this.list)
877
-         const tHeader = this.good_types
878
-         const filterVal = arrTwo
879
-         console.log("thedad",tHeader)
880
-         console.log("filterval",filterVal)
881
-         console.log("33333",this.arrList)
882
-         const data = this.formatJson(filterVal,this.arrList)
883
-         console.log("data",data)
997
+        if(this.dialysisSett.sealing_fluid_dispose == 1){
998
+           arr.push("封管液")
999
+           arrTwo.push("sealing_fluid_dispose")
1000
+         }
884
 
1001
 
1002
+        if(this.dialysisSett.glucose == 1){
1003
+           arr.push("葡萄糖")
1004
+           arrTwo.push("glucose")
1005
+        }
1006
+         
1007
+       
1008
+        const tHeader = arr
1009
+        const filterVal = arrTwo
1010
+        const data = this.formatJson(filterVal, this.list)
885
          excel.export_json_to_excel({
1011
          excel.export_json_to_excel({
886
            header: tHeader,
1012
            header: tHeader,
887
            data,
1013
            data,
888
-           filename: '透析耗材查询'
1014
+           filename: '透析参数查询'
889
          })
1015
          })
890
           this.downloadLoading = false
1016
           this.downloadLoading = false
891
         })
1017
         })
893
       formatJson(filterVal, jsonData) {
1019
       formatJson(filterVal, jsonData) {
894
         return jsonData.map(v => filterVal.map(j => v[j]));
1020
         return jsonData.map(v => filterVal.map(j => v[j]));
895
       },
1021
       },
1022
+      exportListOne(){
1023
+        import('@/vendor/Export2Excel').then(excel => { 
1024
+        if(this.tableList!=null && this.tableList.length > 0){
1025
+           for(let i=0;i<this.tableList.length;i++){
1026
+             this.tableList[i].index = i+1
1027
+           }
1028
+        }
1029
+        const tHeader = ['序号','名称','规格','数量']
1030
+        const filterVal = ['index', 'name','specification_name','count']
1031
+
1032
+        const data = this.formatJson(filterVal, this.tableList)
1033
+         excel.export_json_to_excel({
1034
+           header: tHeader,
1035
+           data,
1036
+           filename: '透析参数统计'
1037
+         })
1038
+          this.downloadLoading = false
1039
+        })  
1040
+      },
896
      toDialog(){
1041
      toDialog(){
897
       getDialysisSetting().then(response=>{
1042
       getDialysisSetting().then(response=>{
898
         if(response.data.state == 1){
1043
         if(response.data.state == 1){
1269
           dialyzer_perfusion_apparatus_set:dialyzer_perfusion_apparatus_set,
1414
           dialyzer_perfusion_apparatus_set:dialyzer_perfusion_apparatus_set,
1270
           displace_liqui_part_set:displace_liqui_part_set,
1415
           displace_liqui_part_set:displace_liqui_part_set,
1271
         }
1416
         }
1272
-        console.log("patam223232332",params)
1417
+        // console.log("patam223232332",params)
1273
        saveDialysisSetting(params).then(response=>{
1418
        saveDialysisSetting(params).then(response=>{
1274
          if(response.data.state == 1){
1419
          if(response.data.state == 1){
1275
            var dialysisSetting = response.data.data.dialysisSetting
1420
            var dialysisSetting = response.data.data.dialysisSetting
1343
         getRemindPrintList().then(response => {
1488
         getRemindPrintList().then(response => {
1344
           if (response.data.state == 1) {
1489
           if (response.data.state == 1) {
1345
             var list = response.data.data.list
1490
             var list = response.data.data.list
1346
-            console.log('list222332', list)
1491
+            // console.log('list222332', list)
1347
             if (list.anticoagulant == 1) {
1492
             if (list.anticoagulant == 1) {
1348
-              console.log('进来22222')
1493
+              // console.log('进来22222')
1349
               this.anticoagulant = true
1494
               this.anticoagulant = true
1350
             }
1495
             }
1351
             if (list.anticoagulant == 2) {
1496
             if (list.anticoagulant == 2) {
1426
        
1571
        
1427
 
1572
 
1428
         if (this.perfusion_apparatus == true) {
1573
         if (this.perfusion_apparatus == true) {
1429
-          console.log('3333')
1574
+          // console.log('3333')
1430
           this.form.perfusion_apparatus = 1
1575
           this.form.perfusion_apparatus = 1
1431
         }
1576
         }
1432
         if (this.perfusion_apparatus == false) {
1577
         if (this.perfusion_apparatus == false) {
1499
         if (this.doctor_advice == false) {
1644
         if (this.doctor_advice == false) {
1500
           this.form.doctor_advice = 2
1645
           this.form.doctor_advice = 2
1501
         }
1646
         }
1502
-        console.log('555555555', this.form.prescription_status)
1647
+        // console.log('555555555', this.form.prescription_status)
1503
         var params = {
1648
         var params = {
1504
           id: this.form.id,
1649
           id: this.form.id,
1505
           prescription_status: this.form.prescription_status,
1650
           prescription_status: this.form.prescription_status,
1515
           anticoagulant_zongliang: this.form.anticoagulant_zongliang,
1660
           anticoagulant_zongliang: this.form.anticoagulant_zongliang,
1516
           doctor_advice: this.form.doctor_advice
1661
           doctor_advice: this.form.doctor_advice
1517
         }
1662
         }
1518
-        console.log('params', params)
1663
+        // console.log('params', params)
1519
         saveRemindPrint(params).then(response => {
1664
         saveRemindPrint(params).then(response => {
1520
           if (response.data.state == 1) {
1665
           if (response.data.state == 1) {
1521
             var settting = response.data.data.setting
1666
             var settting = response.data.data.setting
1526
         })
1671
         })
1527
       },
1672
       },
1528
       toPrint(){
1673
       toPrint(){
1529
-        this.$router.push({path: '/dialysis/consumable/dialysis/parameter/print?schedule_type='+this.query.schedule_type+"&partion_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&keyword="+this.query.keywords+"&page="+this.query.page+"&limit="+this.query.limit})
1530
-      }
1674
+        this.$router.push({path: '/dialysis/consumable/dialysis/parameter/print?schedule_type='+this.query.schedule_type+"&partion_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&keyword="+this.query.keywords+"&page="+this.query.page+"&limit="+this.query.limit+"&ids="+this.ids})
1675
+      },
1676
+      toPrintOne(){
1677
+        this.$router.push({path:"/dialysis/consumable/dialysis/count/print?schedule_type="+this.schedule_type+"&partion_type="+this.partion_type+"&schedule_date="+this.query.schedule_date})
1678
+      },
1679
+      handleSelectionChange(val){
1680
+        var arr = []
1681
+        for(let i=0;i<val.length;i++){
1682
+          arr.push(val[i].id)
1683
+        }
1684
+        this.ids = arr.join(",")
1685
+     }, 
1686
+     changeScheduleType(){
1687
+      this.tableList = []
1688
+      this.statistics()
1689
+     },
1690
+     changePartionType(){
1691
+      this.tableList = []
1692
+      this.statistics()
1693
+     },
1694
+     getDisplaceLiquiPart(id){
1695
+       var name = ""
1696
+       for(let i=0;i<this.displace_liqui_part_option.length;i++){
1697
+         if(id == this.displace_liqui_part_option[i].id){
1698
+            name = this.displace_liqui_part_option[i].name
1699
+         }
1700
+       }
1701
+       return name
1702
+     }
1531
     }
1703
     }
1532
   }
1704
   }
1533
 </script>
1705
 </script>

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

2162
           }
2162
           }
2163
           if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ) {
2163
           if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ) {
2164
             this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2164
             this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2165
-          }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9990){
2165
+          }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9990 || this.$store.getters.xt_user.org.id==10432){
2166
             if (schedual.schedule_type == 1) {
2166
             if (schedual.schedule_type == 1) {
2167
               this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
2167
               this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
2168
             } else if (schedual.schedule_type == 2) {
2168
             } else if (schedual.schedule_type == 2) {

+ 6 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue 查看文件

1853
         this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
1853
         this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
1854
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume: "";
1854
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume: "";
1855
         // 静脉压
1855
         // 静脉压
1856
-        if (this.org_id == 10060 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10387) {
1856
+        if (this.org_id == 10060 || this.org_id == 10387) {
1857
           this.form.venous_pressure = resp.monitor.venous_pressure;
1857
           this.form.venous_pressure = resp.monitor.venous_pressure;
1858
+        }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 ){
1859
+          this.form.venous_pressure = 80
1858
         } else {
1860
         } else {
1859
           this.form.venous_pressure = ""; // this.last_monitor_record.venous_pressure;
1861
           this.form.venous_pressure = ""; // this.last_monitor_record.venous_pressure;
1860
         }
1862
         }
1869
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type
1871
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type
1870
           ? resp.monitor.arterial_pressure_type
1872
           ? resp.monitor.arterial_pressure_type
1871
           : 1;
1873
           : 1;
1872
-        if (this.org_id == 10060 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10387) {
1874
+        if (this.org_id == 10060  || this.org_id == 10387) {
1873
           this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
1875
           this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
1876
+        }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340){
1877
+          this.form.transmembrane_pressure = 60
1874
         } else {
1878
         } else {
1875
           this.form.transmembrane_pressure = ""; // this.last_monitor_record.transmembrane_pressure;
1879
           this.form.transmembrane_pressure = ""; // this.last_monitor_record.transmembrane_pressure;
1876
         }
1880
         }

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderFiftyThree.vue 查看文件

55
                           </span>
55
                           </span>
56
                         </div>
56
                         </div>
57
                         <div style="width: 250px">
57
                         <div style="width: 250px">
58
-                          透析次数:&nbsp;<span>
58
+                          透析次数:&nbsp;<span>
59
                             {{
59
                             {{
60
                               patientInfo.total_dialysis +
60
                               patientInfo.total_dialysis +
61
                               patientInfo.user_sys_before_count
61
                               patientInfo.user_sys_before_count
948
                         : 0
948
                         : 0
949
                     }}kg
949
                     }}kg
950
                   </td>
950
                   </td>
951
-                  <td v-if="advice_index === 4" width="145">脱水量:</td>
951
+                  <td v-if="advice_index === 4" width="145">机器显示脱水量:</td>
952
                   <td v-if="advice_index === 4" width="60">
952
                   <td v-if="advice_index === 4" width="60">
953
                     {{
953
                     {{
954
                       patientInfo.total_dialysis +
954
                       patientInfo.total_dialysis +

+ 12 - 1
src/xt_pages/outpatientCharges/statementPrint.vue 查看文件

47
           :paramsObj="paramsObj"
47
           :paramsObj="paramsObj"
48
           :balanceAccounts="balanceAccounts"
48
           :balanceAccounts="balanceAccounts"
49
       ></printFive>
49
       ></printFive>
50
+
51
+     <printSeven
52
+         v-if="org_id == 10387"
53
+         :info="info"
54
+         :paramsObj="paramsObj"
55
+         :balanceAccounts="balanceAccounts"
56
+     >
57
+     </printSeven>
58
+
50
       <printOne :info="info" v-if="org_id != 9990 &&
59
       <printOne :info="info" v-if="org_id != 9990 &&
51
           org_id != 10138 &&
60
           org_id != 10138 &&
52
           org_id != 9504 &&
61
           org_id != 9504 &&
53
           org_id != 10028 &&
62
           org_id != 10028 &&
54
           org_id != 4 &&
63
           org_id != 4 &&
55
-          org_id != 10278 && org_id != 10191"></printOne>
64
+          org_id != 10278 && org_id != 10191 && org_id != 10387"></printOne>
56
       <!-- 测试医保环境下表格样式放开以下这条 -->
65
       <!-- 测试医保环境下表格样式放开以下这条 -->
57
       <!-- <testVue :info="info" v-else></testVue> -->
66
       <!-- <testVue :info="info" v-else></testVue> -->
58
     </div>
67
     </div>
75
 import testVue from "./statementTemplate/test";
84
 import testVue from "./statementTemplate/test";
76
 import {getAllDoctorList, getAllHisPatientList,} from "@/api/project/project";
85
 import {getAllDoctorList, getAllHisPatientList,} from "@/api/project/project";
77
 import {getPrivateExpenses, getPrivateExpensesOrder} from "@/api/his/his";
86
 import {getPrivateExpenses, getPrivateExpensesOrder} from "@/api/his/his";
87
+import printSeven from "./statementTemplate/printSeven";
78
 // import PrintOther from '../hospitalStation/statementTemplate/printOther'
88
 // import PrintOther from '../hospitalStation/statementTemplate/printOther'
79
 export default {
89
 export default {
80
   name: "dialysisPrintOrder",
90
   name: "dialysisPrintOrder",
81
   components: {
91
   components: {
92
+    printSeven,
82
     BreadCrumb,
93
     BreadCrumb,
83
     printOne,
94
     printOne,
84
     privateChargePrint,
95
     privateChargePrint,

+ 2 - 6
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue 查看文件

1
 <template>
1
 <template>
2
   <div id="statement-print" class="statement-print">
2
   <div id="statement-print" class="statement-print">
3
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
3
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
4
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10387">湖南省社会医疗保险医疗费用结算单</div>
5
-
6
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10191">福建省社会医疗保险医疗费用结算单</div>
4
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10191">福建省社会医疗保险医疗费用结算单</div>
7
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
5
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
8
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10387 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
6
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
9
 
7
 
10
     <table class="statementTable" border="1">
8
     <table class="statementTable" border="1">
11
       <tr>
9
       <tr>
31
       <tr>
29
       <tr>
32
         <td width="90">就医登记号</td>
30
         <td width="90">就医登记号</td>
33
         <td colspan="11">{{info.psn_no}}</td>
31
         <td colspan="11">{{info.psn_no}}</td>
34
-        <td width="80">门诊号</td>
35
-        <td colspan="3">{{info.number}}</td>
36
       </tr>
32
       </tr>
37
       <tr>
33
       <tr>
38
         <td width="80">姓名</td>
34
         <td width="80">姓名</td>
89
         <td width="80">身份证号</td>
85
         <td width="80">身份证号</td>
90
         <td colspan="3">{{info.certno}}</td>
86
         <td colspan="3">{{info.certno}}</td>
91
       </tr>
87
       </tr>
92
-      <tr v-if="this.$store.getters.xt_user.org_id != 10387">
88
+      <tr>
93
         <td>住院号</td>
89
         <td>住院号</td>
94
         <td>{{info.number}}</td>
90
         <td>{{info.number}}</td>
95
         <td>科别</td>
91
         <td>科别</td>

+ 12 - 2
src/xt_pages/stock/stockOutOrder.vue 查看文件

367
             </template>
367
             </template>
368
           </el-table-column>
368
           </el-table-column>
369
          
369
          
370
-          <el-table-column label="注册编码" align="center">
370
+          <el-table-column label="注册编码" align="center" v-if="is_sys == 1">
371
             <template slot-scope="scope">
371
             <template slot-scope="scope">
372
              
372
              
373
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
373
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
374
                   <td style="border-right: none; border-inline-end: none;text-align: center">
374
                   <td style="border-right: none; border-inline-end: none;text-align: center">
375
-                   {{getRegisterNumber(scope.row.child,item.warehousing_id)}}
375
+                    <span>{{getRegisterNumber(scope.row.child,item.warehousing_id)}}</span> 
376
+                  </td>
377
+               </tr>
378
+            </template>
379
+          </el-table-column>
380
+          <el-table-column label="注册编码" align="center" v-if="is_sys == 0">
381
+            <template slot-scope="scope">
382
+             
383
+               <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
384
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
385
+                     <span>{{scope.row.register_number}}</span> 
376
                   </td>
386
                   </td>
377
                </tr>
387
                </tr>
378
             </template>
388
             </template>

+ 440 - 93
src/xt_pages/user/dialysisSolution.vue 查看文件

3
     <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
3
     <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
4
     <div class="patient-app-container app-container">
4
     <div class="patient-app-container app-container">
5
       <div class="Total">
5
       <div class="Total">
6
-        <!-- <div class="plan" >透析计划</div> -->
7
-        <!-- <table-title title="长期透析处方"></table-title> -->
8
         <div class="sum">
6
         <div class="sum">
9
-          <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
10
           <el-button
7
           <el-button
11
             type="primary"
8
             type="primary"
12
             size="small"
9
             size="small"
42
           min-width="50"
39
           min-width="50"
43
         >
40
         >
44
           <template slot-scope="scope">
41
           <template slot-scope="scope">
45
-            {{ modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:'' }}
42
+            {{modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:''}}
46
           </template>
43
           </template>
47
         </el-table-column>
44
         </el-table-column>
48
         <el-table-column
45
         <el-table-column
56
             {{ scope.row.dialysis_duration_minute }} 分钟
53
             {{ scope.row.dialysis_duration_minute }} 分钟
57
           </template>
54
           </template>
58
         </el-table-column>
55
         </el-table-column>
59
-        <!-- <el-table-column
60
-          prop="period"
61
-          label="频率"
62
-          align="center"
63
-          min-width="50">
64
-          <template slot-scope="scope" >
65
-              <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
66
-              <span v-else >--</span>
67
-          </template>
68
-        </el-table-column> -->
69
-        <!-- <el-table-column
70
-          prop="name"
71
-          label="处方名"
72
-          align="center"
73
-          min-width="50">
74
-          <template slot-scope="scope" >
75
-              <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
76
-          </template>
77
-        </el-table-column> -->
56
+      
78
         <el-table-column
57
         <el-table-column
79
           prop="doctor"
58
           prop="doctor"
80
           label="医生"
59
           label="医生"
107
             <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
86
             <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
108
           </template>
87
           </template>
109
         </el-table-column>
88
         </el-table-column>
110
-        <!-- <el-table-column
111
-           prop="state"
112
-           label="状态"
113
-           align="center"
114
-           min-width="40">
115
-           <template slot-scope="scope" >
116
-               <span v-if="scope.row.initiate_mode==1">启用</span>
117
-               <span v-else-if="scope.row.initiate_mode==2">停用</span>
118
-               <span v-else>未知</span>
119
-             </template>
120
-        </el-table-column> -->
89
+
90
+        <el-table-column  align="center" label="状态" width="60">
91
+          <template slot-scope="scope">
92
+            <span v-if="scope.row.solution_status == 1">生效</span>
93
+            <span v-if="scope.row.solution_status == 2">失效</span>
94
+          </template>
95
+        </el-table-column>
121
         <el-table-column label="操作" align="center" min-width="140">
96
         <el-table-column label="操作" align="center" min-width="140">
122
           <template slot-scope="scope">
97
           <template slot-scope="scope">
123
             <el-tooltip
98
             <el-tooltip
133
                 @click="openEdit(scope.$index, scope.row)"
108
                 @click="openEdit(scope.$index, scope.row)"
134
               ></el-button>
109
               ></el-button>
135
             </el-tooltip>
110
             </el-tooltip>
136
-            <!--   <el-button
137
-                 size="mini"
138
-                 type="primary"
139
-                 @click="openChildEdit(scope.$index, scope.row)" v-else>编辑</el-button>
140
-
141
-               <el-button
142
-                 size="mini"
143
-                 type="success"
144
-                 @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0">新增</el-button>
145
-               <el-button
146
-                 size="mini"
147
-                 type="danger"
148
-                 @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
111
+
112
+
113
+             <el-tooltip
114
+              class="item"
115
+              effect="dark"
116
+              content="查看更多"
117
+              placement="top"
118
+            >
119
+              <el-button
120
+                size="small"
121
+                type="primary"
122
+                @click="toClick(scope.row)">
123
+                查看更多
124
+              </el-button>
125
+            </el-tooltip>
126
+         
149
           </template>
127
           </template>
150
         </el-table-column>
128
         </el-table-column>
151
       </el-table>
129
       </el-table>
162
         :total="total"
140
         :total="total"
163
       >
141
       >
164
       </el-pagination>
142
       </el-pagination>
143
+      
144
+      <div v-show="startShow">
145
+        <el-row :gutter="20" v-if="isShows('透析模式')">
146
+          <el-col :span="6"><div class="grid-content bg-purple">透析模式:{{modeOptions[current_solution.mode_id]?modeOptions[current_solution.mode_id].name:''}}</div></el-col>
147
+        </el-row>
148
+         <el-row :gutter="20">
149
+          <el-col :span="6"  v-if="isShows('透析时长')"><div class="grid-content bg-purple">透析时长:{{current_solution.dialysis_duration_hour}}小时{{current_solution.dialysis_duration_minute}}分钟</div></el-col>
150
+          <el-col :span="6"  v-if="isShows('血流量')"><div class="grid-content bg-purple">血流量(ml/min):{{current_solution.blood_flow_volume}}</div></el-col>
151
+          <el-col :span="6"  v-if="isShows('透析液配方')"><div class="grid-content bg-purple">透析液配方:{{getDialysateFormulation(current_solution.dialysate_formulation)}}</div></el-col>
152
+          <el-col :span="6"  v-if="isShows('抗凝剂')"><div class="grid-content bg-purple">抗凝剂:{{getAnticoagulant(current_solution.anticoagulant)}}</div></el-col>
153
+        </el-row>
154
+
155
+         <el-row :gutter="20">
156
+          <el-col :span="6"  v-if="isShows('首剂')"><div class="grid-content bg-purple">首剂
157
+            <span v-if="current_solution.anticoagulant == 6">(iu):</span>
158
+            <span v-if="current_solution.anticoagulant == 7">(iu):</span>
159
+            <span v-if="current_solution.anticoagulant == 5">(mg):</span>
160
+            <span v-if="current_solution.anticoagulant == 4">(mg):</span>
161
+            <span v-if="current_solution.anticoagulant == 3">(iu):</span>
162
+            <span v-if="current_solution.anticoagulant == 2">(mg):</span>
163
+            <span v-if="current_solution.anticoagulant == 1">(mg):</span>
164
+            {{current_solution.anticoagulant_shouji}}</div></el-col>
165
+          <el-col :span="6"  v-if="isShows('维持')"><div class="grid-content bg-purple">维持
166
+              <span v-if="current_solution.anticoagulant == 7">(iu/h):</span>
167
+              <span v-if="current_solution.anticoagulant == 6">(iu/h):</span>
168
+              <span v-if="current_solution.anticoagulant == 5">(ml/h):</span>
169
+              <span v-if="current_solution.anticoagulant == 4">(mg/h):</span>
170
+              <span v-if="current_solution.anticoagulant == 3">(iu/h):</span>
171
+              <span v-if="current_solution.anticoagulant == 2">(mg/h):</span>
172
+              <span v-if="current_solution.anticoagulant == 1">(mg/h):</span>
173
+            {{current_solution.anticoagulant_weichi}}</div></el-col>
174
+          <el-col :span="6" v-if="isShows('总量')"><div class="grid-content bg-purple">总量
175
+            <span v-if="current_solution.anticoagulant == 5">(mg):</span>
176
+            <span v-if="current_solution.anticoagulant == 6">(iu):</span>
177
+            <span v-if="current_solution.anticoagulant == 7">(iu):</span>
178
+            <span v-if="current_solution.anticoagulant == 4">(mg):</span>
179
+            <span v-if="current_solution.anticoagulant == 3">(iu):</span>
180
+            <span v-if="current_solution.anticoagulant == 2">(mg):</span>
181
+            <span v-if="current_solution.anticoagulant == 1">(mg):</span>
182
+            {{current_solution.anticoagulant_zongliang}}</div></el-col>
183
+          <el-col :span="6"><div class="grid-content bg-purple">钾(mmol/L):{{current_solution.kalium}}</div></el-col>
184
+        </el-row>
185
+
186
+       <el-row :gutter="20">
187
+          <el-col :span="6" v-if="isShows('钠')"><div class="grid-content bg-purple">钠(mmol/L):{{current_solution.sodium}}</div></el-col>
188
+          <el-col :span="6" v-if="isShows('钙')"><div class="grid-content bg-purple">钙:(mmol/L):{{current_solution.calcium}}</div></el-col>
189
+          <el-col :span="6" v-if="isShows('透析器/灌流器')"><div class="grid-content bg-purple">透析器/灌流器:{{current_solution.dialyzer_perfusion_apparatus}}</div></el-col>
190
+        </el-row>
191
+
192
+          <el-row :gutter="20">
193
+            <el-col :span="6" v-if="isShows('透析器')"><div class="grid-content bg-purple">透析器:{{current_solution.dialysis_dialyszers}}</div></el-col>
194
+            <el-col :span="6" v-if="isShows('灌流器')"><div class="grid-content bg-purple">灌流器:{{current_solution.dialysis_irrigation}}</div></el-col>
195
+            <el-col :span="6" v-if="isShows('碳酸氢盐')"><div class="grid-content bg-purple">碳酸氢盐(mmol/L):{{current_solution.bicarbonate}}</div></el-col>
196
+            <el-col :span="6" v-if="isShows('葡萄糖')"><div class="grid-content bg-purple">葡萄糖(mmol/L):{{current_solution.glucose}}</div></el-col>
197
+         </el-row>
198
+
199
+            <el-row :gutter="20">
200
+            <el-col :span="6" v-if="isShows('透析液流量')"><div class="grid-content bg-purple">透析液流量(ml/min):{{current_solution.dialysate_flow}}</div></el-col>
201
+            <el-col :span="6" v-if="isShows('透析液温度')"><div class="grid-content bg-purple">透析液温度(℃):{{current_solution.dialysate_temperature}}</div></el-col>
202
+            <el-col :span="6" v-if="isShows('电导度')"><div class="grid-content bg-purple">电导度(mS/cm):{{current_solution.conductivity}}</div></el-col>
203
+            <el-col :span="6" v-if="isShows('体液过多症状')"><div class="grid-content bg-purple">体液过多症状:{{getBodyFluid(current_solution.body_fluid)}}</div></el-col>
204
+         </el-row>
205
+
206
+           <el-row :gutter="20">
207
+            <el-col :span="6" v-if="isShows('体液过多其他症状')"><div class="grid-content bg-purple">体液过多其他症状:{{current_solution.body_fluid_other}}</div></el-col>
208
+            <el-col :span="6" v-if="isShows('透析前使用特殊药物')"><div class="grid-content bg-purple">透析前使用特殊药物:{{getSpecialMedicine(current_solution.special_medicine)}}</div></el-col>
209
+            <el-col :span="6" v-if="isShows('使用其他特殊药物')"><div class="grid-content bg-purple">使用其他特殊药物:{{current_solution.special_medicine_other}}</div></el-col>
210
+            <el-col :span="6" v-if="isShows('血管通路')"><div class="grid-content bg-purple">血管通路:{{getBloodAccess(current_solution.blood_access)}}</div></el-col>
211
+         </el-row>
212
+
213
+           <el-row :gutter="20">
214
+            <el-col :span="6" v-if="isShows('血浆分离器')"><div class="grid-content bg-purple">血浆分离器:{{current_solution.plasma_separator}}</div></el-col>
215
+            <el-col :span="6" v-if="isShows('透析管路')"><div class="grid-content bg-purple">透析管路:{{current_solution.hemodialysis_pipelines}}</div></el-col>
216
+            <el-col :span="6" v-if="isShows('透析管路支数')"><div class="grid-content bg-purple">透析管路支数:{{current_solution.hemodialysis_pipelines_count}}</div></el-col>
217
+            <el-col :span="6" v-if="isShows('穿刺针')"><div class="grid-content bg-purple">穿刺针:{{current_solution.puncture_needle}}</div></el-col>
218
+         </el-row>
219
+
220
+           <el-row :gutter="20">
221
+            <el-col :span="6"  v-if="isShows('穿刺针支数')"><div class="grid-content bg-purple">穿刺针支数:{{current_solution.puncture_needle_count}}</div></el-col>
222
+            <el-col :span="6"  v-if="isShows('促红素')"><div class="grid-content bg-purple">促红素:{{current_solution.epo_count}}</div></el-col>
223
+            <el-col :span="6" v-if="isShows('促红素支数')"><div class="grid-content bg-purple">促红素支数:{{current_solution.epo_count}}</div></el-col>
224
+            <el-col :span="6" v-if="isShows('最大超滤率')"><div class="grid-content bg-purple">最大超滤率(ml/h):{{current_solution.max_ultrafiltration_rate}}</div></el-col>
225
+           </el-row>
226
+             <el-row :gutter="20">
227
+              <el-col :span="6"  v-if="isShows('置换液') && (current_solution.mode_id == 2 || current_solution.mode_id == 5 || current_solution.mode_id == 12)"><div class="grid-content bg-purple">置换液:{{getDisplaceLiqui(current_solution.displace_liqui_part)}}</div></el-col>
228
+              <el-col :span="6"  v-if="isShows('置换液总量') && (current_solution.mode_id == 2 || current_solution.mode_id == 5 || current_solution.mode_id == 12)"><div class="grid-content bg-purple">置换液总量:{{current_solution.displace_liqui_value}}</div></el-col>
229
+           </el-row>
230
+            <el-row :gutter="20">
231
+              <el-col :span="6"  v-if="isShows('吸氧')"><div class="grid-content bg-purple">吸氧:
232
+                 <span v-if="current_solution.oxygen_uptake == 1">需</span>
233
+                 <span v-if="current_solution.oxygen_uptake == 2">无</span>
234
+               </div></el-col>
235
+              <el-col :span="6"  v-if="isShows('吸氧') && current_solution.oxygen_uptake == 1"><div class="grid-content bg-purple">吸氧流量(L/分):{{current_solution.oxygen_flow}}</div></el-col>
236
+              <el-col :span="6"  v-if="isShows('吸氧') && current_solution.oxygen_uptake == 1"><div class="grid-content bg-purple">吸氧时长(h):{{current_solution.oxygen_time}}</div></el-col>
237
+           </el-row>
238
+           <el-row :gutter="20">
239
+            <el-col :span="6"><div class="grid-content bg-purple">备注:{{current_solution.remark}}</div></el-col>
240
+         </el-row>
241
+      </div>
242
+
165
     </div>
243
     </div>
166
 
244
 
245
+   
246
+
247
+
167
     <el-dialog
248
     <el-dialog
168
       :title="isEdit ? '编辑透析处方' : '新增透析处方'"
249
       :title="isEdit ? '编辑透析处方' : '新增透析处方'"
169
       :visible.sync="dialogVisible"
250
       :visible.sync="dialogVisible"
537
               </el-select>
618
               </el-select>
538
             </el-form-item>
619
             </el-form-item>
539
 
620
 
540
-            <!-- <el-form-item
541
-              label="置换方式:"
542
-              v-if="
543
-                isShows('置换液')   && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)
544
-              "
545
-            >
546
-              <el-select
547
-                v-model="addPlan.displace_liqui_part"
548
-                placeholder="请选择"
549
-              >
550
-                <el-option :key="0" label="请选择" :value="0"></el-option>
551
-                <el-option
552
-                  v-for="(option, index) in displace_liqui_part_option"
553
-                  :key="index"
554
-                  :label="option.name"
555
-                  :value="option.id"
556
-                ></el-option>
557
-              </el-select>
558
-            </el-form-item> -->
559
           </el-col>
621
           </el-col>
560
 
622
 
561
           <el-col :span="8" v-if="isShows('置换液总量')  && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
623
           <el-col :span="8" v-if="isShows('置换液总量')  && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
579
             </el-form-item>
641
             </el-form-item>
580
           </el-col>
642
           </el-col>
581
 
643
 
582
-          <!-- </el-row>
583
-          <el-row :gutter="20" > -->
584
           <el-col :span="8" v-if="isShows('实际超滤量')">
644
           <el-col :span="8" v-if="isShows('实际超滤量')">
585
             <el-form-item label="实际超滤量(L)">
645
             <el-form-item label="实际超滤量(L)">
586
               <el-input v-model="addPlan.ultrafiltration"></el-input>
646
               <el-input v-model="addPlan.ultrafiltration"></el-input>
729
       v-on:dialog-comfirm="innerDialogComfirm"
789
       v-on:dialog-comfirm="innerDialogComfirm"
730
       v-on:dialog-cancle="innerDialogCancle">
790
       v-on:dialog-cancle="innerDialogCancle">
731
     </multi-select-box>
791
     </multi-select-box>
792
+     
793
+
732
 
794
 
733
 
795
 
796
+    <el-dialog
797
+      :visible.sync="startDialogVisible"
798
+      width="1010px"
799
+    >
800
+      <el-table
801
+        ref="solutionTable"
802
+        :data="tableList"
803
+        border
804
+        fit
805
+        highlight-current-row
806
+        :header-cell-style="{
807
+          backgroundColor: 'rgb(245, 247, 250)',
808
+          color: '#606266'
809
+        }"
810
+        :row-style="{ color: '#303133' }"
811
+        style="width: 100%"
812
+      >
813
+        <el-table-column type="index" align="center" label="序号" width="60">
814
+        </el-table-column>
815
+        <el-table-column
816
+          prop="mode_name"
817
+          align="center"
818
+          label="透析模式"
819
+          min-width="50"
820
+        >
821
+          <template slot-scope="scope">
822
+            {{modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:''}}
823
+          </template>
824
+        </el-table-column>
825
+        <el-table-column
826
+          prop="dialysis_duration"
827
+          align="center"
828
+          label="透析时长"
829
+          min-width="50"
830
+        >
831
+          <template slot-scope="scope">
832
+            {{ scope.row.dialysis_duration_hour }} 小时
833
+            {{ scope.row.dialysis_duration_minute }} 分钟
834
+          </template>
835
+        </el-table-column>
836
+      
837
+        <el-table-column
838
+          prop="doctor"
839
+          label="医生"
840
+          align="center"
841
+          min-width="110"
842
+        >
843
+          <template slot-scope="scope">
844
+            <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
845
+          </template>
846
+        </el-table-column>
847
+
848
+        <el-table-column
849
+          prop="created_time"
850
+          align="center"
851
+          label="创建日期"
852
+          min-width="60"
853
+        >
854
+          <template slot-scope="scope">
855
+            <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
856
+          </template>
857
+        </el-table-column>
858
+
859
+        <el-table-column
860
+          prop="updated_time"
861
+          align="center"
862
+          label="更新日期"
863
+          min-width="60"
864
+        >
865
+          <template slot-scope="scope">
866
+            <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
867
+          </template>
868
+        </el-table-column>
869
+        <el-table-column  align="center" label="状态" width="60">
870
+          <template slot-scope="scope">
871
+            <span v-if="scope.row.solution_status == 1">生效</span>
872
+            <span v-if="scope.row.solution_status == 2">失效</span>
873
+          </template>
874
+        </el-table-column>
875
+      </el-table>
876
+      <el-pagination
877
+        align="right"
878
+        @size-change="handleSizeChangeOne"
879
+        @current-change="handleCurrentChangeOne"
880
+        :current-page="pageOne"
881
+        :page-sizes="[10, 20, 50, 100]"
882
+        :page-size="10"
883
+        background
884
+        style="margin-top:20px;"
885
+        layout="total, sizes, prev, pager, next, jumper"
886
+        :total="totalOne"
887
+      >
888
+      </el-pagination>
889
+      <span slot="footer" class="dialog-footer">
890
+        <el-button
891
+          type="primary"
892
+          @click="startDialogVisible = false"
893
+          >取消</el-button
894
+        >
895
+        <el-button
896
+          type="primary"
897
+          @click="startDialogVisible = false"
898
+         
899
+          >确定</el-button
900
+        >
901
+      </span>
902
+    </el-dialog>
903
+
734
   </div>
904
   </div>
735
 </template>
905
 </template>
736
 
906
 
745
   editChildPatientDialysisSolution,
915
   editChildPatientDialysisSolution,
746
   editDialysisSolutionDetail,
916
   editDialysisSolutionDetail,
747
   editPatientDialysisSolution,
917
   editPatientDialysisSolution,
748
-  fetchPatientDialysisSolutions
918
+  findePatientDialysisLongSolutions,
919
+  getDialysisSolutionDetailList
749
 } from '@/api/patient'
920
 } from '@/api/patient'
750
 
921
 
751
 import { getSystemPrescription } from '@/api/config'
922
 import { getSystemPrescription } from '@/api/config'
1031
       {id:2,name:"无"}
1202
       {id:2,name:"无"}
1032
      ],
1203
      ],
1033
      oxygenShow:false,
1204
      oxygenShow:false,
1205
+     startDialogVisible:false,
1206
+     tableList:[],
1207
+     totalOne:0,
1208
+     pageOne:1,
1209
+     limitOne:10,
1210
+     startShow:false,
1211
+     solutionDetail:{},
1034
     }
1212
     }
1035
   },
1213
   },
1036
   watch: {
1214
   watch: {
1196
     },
1374
     },
1197
 
1375
 
1198
     tableCurrentChange(current) {
1376
     tableCurrentChange(current) {
1377
+      console.log("current",current)
1378
+      this.startShow = true
1199
       if (typeof current === 'undefined' || current == null) {
1379
       if (typeof current === 'undefined' || current == null) {
1200
         this.current_solution = {
1380
         this.current_solution = {
1201
           id: 0,
1381
           id: 0,
1320
               duration: 2000
1500
               duration: 2000
1321
             })
1501
             })
1322
             this.tableData.splice(index, 1)
1502
             this.tableData.splice(index, 1)
1323
-            // if (row.parent_id>0) {
1324
-            //   this.tableData.splice(index,1);
1325
-            // }else {
1326
-            //     var resetTableData = this.tableData;
1327
-            //     this.tableData = [];
1328
-            //     var that = this;
1329
-            //     resetTableData.forEach(function(item, itemindex){
1330
-            //         if (item.id != row.id && item.parent_id != row.id) {
1331
-            //             that.tableData.push(item);
1332
-            //         }
1333
-            //     });
1334
-            // }
1503
+           
1335
           }
1504
           }
1336
         })
1505
         })
1337
       })
1506
       })
1486
           this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
1655
           this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
1487
           this.addPlan.dialysis_irrigation = this.dialysis_irrigation
1656
           this.addPlan.dialysis_irrigation = this.dialysis_irrigation
1488
           this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
1657
           this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
1489
-          if(this.addPlan.mode_id!=2 && this.addPlan.mode_id!=5&&this.addPlan.mode_id!=12){
1658
+          if(this.addPlan.mode!=2 && this.addPlan.mode!=5&&this.addPlan.mode!=12){
1490
             this.addPlan.displace_liqui_part = 0
1659
             this.addPlan.displace_liqui_part = 0
1491
             this.addPlan.displace_liqui_value = 0
1660
             this.addPlan.displace_liqui_value = 0
1492
           }
1661
           }
1662
+          console.log("this.addplan",this.addPlan)
1663
+          
1493
           editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
1664
           editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
1494
             if (response.data.state == 0) {
1665
             if (response.data.state == 0) {
1495
               this.$message.error(response.data.msg)
1666
               this.$message.error(response.data.msg)
1515
               // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
1686
               // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
1516
 
1687
 
1517
               this.current_index = -1
1688
               this.current_index = -1
1518
-              this.fetchPatientDialysisSolutions()
1689
+             
1690
+              console.log("responsedd23332233223wo",response.data.data.solution)
1691
+              this.current_solution.mode_name = response.data.data.solution.mode_name
1692
+              this.current_solution.dialysis_duration_hour = response.data.data.solution.dialysis_duration_hour
1693
+              this.current_solution.dialysis_duration_minute = response.data.data.solution.dialysis_duration_minute
1694
+              this.current_solution.blood_flow_volume = response.data.data.solution.blood_flow_volume
1695
+              this.current_solution.dialysate_formulation = response.data.data.solution.dialysate_formulation
1696
+              this.current_solution.anticoagulant = response.data.data.solution.anticoagulant
1697
+              this.current_solution.anticoagulant_shouji  = response.data.data.solution.anticoagulant_shouji
1698
+              this.current_solution.anticoagulant_weichi = response.data.data.solution.anticoagulant_weichi
1699
+              this.current_solution.anticoagulant_zongliang = response.data.data.solution.anticoagulant_zongliang
1700
+              this.current_solution.sodium =response.data.data.solution.sodium
1701
+              this.current_solution.calcium = response.data.data.solution.calcium
1702
+              this.current_solution.dialyzer_perfusion_apparatus = response.data.data.solution.dialyzer_perfusion_apparatus
1703
+              this.current_solution.dialysis_dialyszers = response.data.data.solution.dialysis_dialyszers
1704
+              this.current_solution.dialysis_irrigation = response.data.data.solution.dialysis_irrigation
1705
+              this.current_solution.bicarbonate = response.data.data.solution.bicarbonate
1706
+              this.current_solution.glucose = response.data.data.data.solution.glucose
1707
+              this.current_solution.dialysate_flow = response.data.data.solution.dialysate_flow
1708
+              this.current_solution.dialysate_temperature = response.data.data.solution.dialysate_temperature
1709
+              this.current_solution.conductivity = response.data.data.solution.conductivity
1710
+              this.current_solution.body_fluid = response.data.data.solution.body_fluid
1711
+              this.current_solution.body_fluid_other = response.data.data.solution.body_fluid_other
1712
+              this.current_solution.special_medicine = response.data.data.solution.special_medicine
1713
+              this.current_solution.special_medicine_other = response.data.data.solution.special_medicine_other
1714
+              this.current_solution.blood_access = response.data.data.solution.blood_access
1715
+              this.current_solution.plasma_separator = response.data.data.solution.plasma_separator
1716
+              this.current_solution.hemodialysis_pipelines = response.data.data.solution.hemodialysis_pipelines
1717
+              this.current_solution.hemodialysis_pipelines_count = response.data.data.solution.hemodialysis_pipelines_count
1718
+              this.current_solution.puncture_needle =response.data.data.solution.puncture_needle
1719
+              this.current_solution.puncture_needle_count = response.data.solution.puncture_needle_count
1720
+              this.current_solution.epo_count = response.data.data.solution.epo_count
1721
+              this.current_solution.max_ultrafiltration_rate = response.data.data.solution.max_ultrafiltration_rate
1722
+              this.current_solution.remark = response.data.data.solution.remark
1723
+              this.FindePatientDialysisLongSolutions()
1519
               return false
1724
               return false
1520
             }
1725
             }
1521
           })
1726
           })
1557
               }
1762
               }
1558
               this.total += 1
1763
               this.total += 1
1559
               // this.$refs[formName].resetFields()
1764
               // this.$refs[formName].resetFields()
1560
-              this.fetchPatientDialysisSolutions()
1765
+              this.FindePatientDialysisLongSolutions()
1561
               return false
1766
               return false
1562
             }
1767
             }
1563
           })
1768
           })
1569
     },
1774
     },
1570
     handleSizeChange(val) {
1775
     handleSizeChange(val) {
1571
       this.queryParams.limit = val
1776
       this.queryParams.limit = val
1572
-      this.fetchPatientDialysisSolutions()
1777
+      this.FindePatientDialysisLongSolutions()
1573
     },
1778
     },
1574
     handleCurrentChange(val) {
1779
     handleCurrentChange(val) {
1575
       this.queryParams.page = val
1780
       this.queryParams.page = val
1576
-      this.fetchPatientDialysisSolutions()
1781
+      this.FindePatientDialysisLongSolutions()
1782
+    },
1783
+     handleSizeChangeOne(val) {
1784
+      this.limitOne = val
1785
+      this.getDialysisSolutionDetailList()
1786
+    },
1787
+     handleCurrentChangeOne(val) {
1788
+      this.pageOne = val
1789
+      this.getDialysisSolutionDetailList()
1577
     },
1790
     },
1578
     openEdit(index, row) {
1791
     openEdit(index, row) {
1579
-      console.log("ro233344433344444444",row)
1792
+      
1580
       this.current_index = index
1793
       this.current_index = index
1581
       this.addPlan.id = row.id
1794
       this.addPlan.id = row.id
1582
       this.addPlan.mode = row.mode_id
1795
       this.addPlan.mode = row.mode_id
1881
         }
2094
         }
1882
       })
2095
       })
1883
     },
2096
     },
1884
-    fetchPatientDialysisSolutions() {
1885
-      fetchPatientDialysisSolutions(this.queryParams).then(response => {
2097
+    FindePatientDialysisLongSolutions() {
2098
+      findePatientDialysisLongSolutions(this.queryParams).then(response => {
1886
         if (response.data.state == 1) {
2099
         if (response.data.state == 1) {
1887
           this.tableData = response.data.data.solutions
2100
           this.tableData = response.data.data.solutions
1888
           this.total = response.data.data.total
2101
           this.total = response.data.data.total
1944
         return false
2157
         return false
1945
       }
2158
       }
1946
       this.anticoagulant = this.anticoagulantsConfit[thismode]
2159
       this.anticoagulant = this.anticoagulantsConfit[thismode]
1947
-
2160
+      console.log("数据",this.anticoagulant)
1948
       if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
2161
       if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
1949
          this.addPlan.anticoagulant_zongliang = ""
2162
          this.addPlan.anticoagulant_zongliang = ""
1950
          this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
2163
          this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
1971
       ) {
2184
       ) {
1972
         return false
2185
         return false
1973
       }
2186
       }
1974
-      // this.current_model = this.modeOptions[thismode];
1975
       this.addPlan.mode_name = this.modeOptions[thismode].name
2187
       this.addPlan.mode_name = this.modeOptions[thismode].name
1976
       const params = {
2188
       const params = {
1977
         id: thismode
2189
         id: thismode
1978
       }
2190
       }
1979
-
1980
       getSystemPrescription(params).then(response => {
2191
       getSystemPrescription(params).then(response => {
1981
         if (response.data.state == 1) {
2192
         if (response.data.state == 1) {
1982
            var prescription =   response.data.data.prescription
2193
            var prescription =   response.data.data.prescription
2160
       this.addPlan.oxygen_time = ""
2371
       this.addPlan.oxygen_time = ""
2161
      }
2372
      }
2162
     },
2373
     },
2374
+    toClick(val){
2375
+      this.solutionDetail = val
2376
+      var params = {
2377
+        mode_id:val.mode_id,
2378
+        patient_id:val.patient_id,
2379
+        page:this.pageOne,
2380
+        limit:this.limitOne,
2381
+      }
2382
+      getDialysisSolutionDetailList(params).then(response=>{
2383
+        if(response.data.state == 1){
2384
+          this.startDialogVisible = true
2385
+          var list = response.data.data.list
2386
+          this.totalOne = response.data.data.total
2387
+          this.tableList = list
2388
+        }
2389
+      })
2390
+    },
2391
+    getDialysisSolutionDetailList(){
2392
+       var params = {
2393
+         mode_id:this.solutionDetail.mode_id,
2394
+         patient_id:this.solutionDetail.patient_id,
2395
+         page:this.pageOne,
2396
+         limit:this.limitOne,
2397
+       }
2398
+       console.log("params2222222",params)
2399
+      getDialysisSolutionDetailList(params).then(response=>{
2400
+         if(response.data.state == 1){
2401
+          var list = response.data.data.list
2402
+          this.totalOne = 0
2403
+          this.totalOne = response.data.data.total
2404
+          this.tableList = []
2405
+          this.tableList = list
2406
+         }
2407
+      })
2408
+    },
2409
+
2410
+    //修改
2411
+    getDialysateFormulation(id){
2412
+      var name = ""
2413
+      for(let i=0;i<this.dialysate_formulation.length;i++){
2414
+        if(id == this.dialysate_formulation[i].id){
2415
+          name = this.dialysate_formulation[i].name
2416
+        }
2417
+      }
2418
+      return name
2419
+    },
2420
+    getAnticoagulant(id){
2421
+      var name = ""
2422
+      if(id == 1){
2423
+         name = "无肝素"
2424
+      }
2425
+      if(id == 2){
2426
+        name = "普通肝素"
2427
+      }
2428
+      if(id == 3){
2429
+        name = "低分子肝素"
2430
+      }
2431
+      if(id == 4){
2432
+        name = "阿加曲班"
2433
+      }
2434
+      if(id == 5){
2435
+         name ="枸橼酸钠"
2436
+      }
2437
+      if(id == 6){
2438
+        name = "低分子肝素钙"
2439
+      }
2440
+      if(id == 7){
2441
+        name = "低分子肝素钠"
2442
+      }
2443
+      if(id ==8){
2444
+        name = "依诺肝素"
2445
+      }
2446
+      if(id ==9){
2447
+        name = "达肝素"
2448
+      }
2449
+      if(id ==10){
2450
+        name = "体外抗凝"
2451
+      }
2452
+      if(id ==11){
2453
+        name = "那曲肝素"
2454
+      }
2455
+      if(id ==12){
2456
+        name = "无抗凝剂"
2457
+      }
2458
+     if(id ==13){
2459
+        name = "那曲肝素钙"
2460
+      }
2461
+      return name
2462
+    },
2463
+    getBodyFluid(id){
2464
+     var name = ""
2465
+     for(let i=0;i<this.body_fluid_option.length;i++){
2466
+       if(id == this.body_fluid_option[i].id){
2467
+          name = this.body_fluid_option[i].name
2468
+       }
2469
+     }
2470
+     return name
2471
+    },
2472
+    getBloodAccess(id){
2473
+      var name = ""
2474
+      for(let i=0;i<this.blood_access_option.length;i++){
2475
+        if(id == this.blood_access_option[i].id){
2476
+           name = this.blood_access_option[i].name
2477
+        }
2478
+      }
2479
+      return name
2480
+    },
2481
+    getHemodialysisPipelines(id){
2482
+      console.log("管路",this.hemodialysisPipelinesOptions,id)
2483
+      var name = ""
2484
+      for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
2485
+        if(id == this.hemodialysisPipelinesOptions[i].id){
2486
+            name = this.hemodialysisPipelinesOptions[i].name
2487
+        }
2488
+      }
2489
+      return name
2490
+    },
2491
+    getDisplaceLiqui(id){
2492
+     var name = ""
2493
+     for(let i=0;i<this.displace_liqui_part_option.length;i++){
2494
+       if(id == this.displace_liqui_part_option[i].id){
2495
+          name = this.displace_liqui_part_option[i].name
2496
+       }
2497
+     } 
2498
+     return name
2499
+    },
2500
+    getSpecialMedicine(id){
2501
+      var name = ""
2502
+      for(let i=0;i<this.special_medicine_option.length;i++){
2503
+         if(id == this.special_medicine_option[i].id){
2504
+            name = this.special_medicine_option[i].name
2505
+         }
2506
+      }
2507
+      return name
2508
+    }
2163
   },
2509
   },
2164
   created() {
2510
   created() {
2165
     const id = this.$route.params && this.$route.params.id
2511
     const id = this.$route.params && this.$route.params.id
2177
 
2523
 
2178
     this.GetDeviceData()
2524
     this.GetDeviceData()
2179
     this.fetchAllAdminUsers()
2525
     this.fetchAllAdminUsers()
2180
-    this.fetchPatientDialysisSolutions()
2526
+    this.FindePatientDialysisLongSolutions()
2181
     this.modeOptions = this.$store.getters.treatment_mode
2527
     this.modeOptions = this.$store.getters.treatment_mode
2182
     this.anticoagulantsSet = this.$store.getters.anticoagulants_set
2528
     this.anticoagulantsSet = this.$store.getters.anticoagulants_set
2183
     this.replacementWays = this.$store.getters.replacement_ways
2529
     this.replacementWays = this.$store.getters.replacement_ways
2184
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
2530
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
2531
+   
2185
     this.blood_filters = this.$store.getters.blood_filters
2532
     this.blood_filters = this.$store.getters.blood_filters
2186
     this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
2533
     this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
2187
     this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
2534
     this.hemodialysis_machines = this.$store.getters.hemodialysis_machines