Browse Source

耗材参数

XMLWAN 4 years ago
parent
commit
b6147762bd

+ 39 - 3
src/api/consumable.js View File

@@ -24,7 +24,7 @@ export function getDialysisParameters(params){
24 24
 
25 25
 
26 26
 export function getDialysisBatchParameters(sch_ids){
27
-  
27
+
28 28
   return request({
29 29
     url:"/api/dialysis/getdialysisbatchparameters",
30 30
     method:"get",
@@ -35,10 +35,46 @@ export function getDialysisBatchParameters(sch_ids){
35 35
 }
36 36
 
37 37
 export function getWareHouseOutList(params){
38
-  
39 38
   return request({
40 39
     url:"/api/dialysis/getwarehouseoutlist",
41 40
     method:"get",
42 41
     params:params
43 42
   })
44
-}
43
+}
44
+
45
+
46
+export function getAllMaterial(params){
47
+  console.log("params",params)
48
+  return request({
49
+     url:"/api/dialysis/getallmaterial",
50
+     method:"Get",
51
+     params:params
52
+  })
53
+}
54
+
55
+
56
+export function getCollectList(params){
57
+   console.log("数据手机",params)
58
+  return request({
59
+    url:"/api/dialysis/getcollectlist",
60
+    method:"get",
61
+    params:params
62
+  })
63
+}
64
+
65
+export function getBatchCollection(params){
66
+  return request({
67
+    url:"/api/dialysis/getbatchcollection",
68
+    method:"get",
69
+    params:params
70
+  })
71
+}
72
+
73
+export function getGatherList(params){
74
+  console.log("params======",params)
75
+  return request({
76
+    url:"/api/dialysis/getgatherlist",
77
+    method:"get",
78
+    params:params
79
+  })
80
+}

+ 11 - 0
src/router/modules/dialysis.js View File

@@ -102,6 +102,17 @@ export default {
102 102
         noCache: true
103 103
       }
104 104
     },
105
+    {
106
+      path: '/dialysis/allsummarydialog_print',
107
+      component: () => import('@/xt_pages/dialysis/allSummaryDialog_print'),
108
+      hidden: true,
109
+      is_menu: false,
110
+      name: 'allsummarydialog_print',
111
+      meta: {
112
+        title: 'allsummarydialog_print',
113
+        noCache: true
114
+      }
115
+    },
105 116
     {
106 117
       path: '/dialysis/record/:id',
107 118
       component: () => import('@/xt_pages/dialysis/dialysisPage'),

+ 141 - 0
src/xt_pages/dialysis/allSummaryDialog_print.vue View File

@@ -0,0 +1,141 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">药品统计表</span>
16
+                    </div>
17
+                    <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
18
+                        <p>统计时间:2020.8.19-2020.8.20</p>
19
+                        <p>印单日期:2020.8.20</p>
20
+                    </div>
21
+                    <div class="table_panel">
22
+                        <table class="table">
23
+                            <thead>
24
+                                <tr>
25
+                                    <td>药品名称</td>
26
+                                    <td width="120">数量</td>
27
+                                </tr>
28
+                            </thead>
29
+                            <tbody>
30
+                                <tr v-for='item in 6'>
31
+                                    <td>张三</td>
32
+                                    <td>张三</td>
33
+                                </tr>
34
+                            </tbody>
35
+                        </table>
36
+                    </div>
37
+                </div>
38
+            </div>
39
+        </div>
40
+    </div>
41
+</template>
42
+
43
+<script>
44
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
45
+import print from 'print-js'
46
+export default {
47
+    components:{
48
+        BreadCrumb
49
+    },
50
+    data(){
51
+        return{
52
+            crumbs: [
53
+                { path: false, name: '耗材药品' },
54
+                { path: false, name: '药品打印' }
55
+            ],
56
+        }
57
+    },
58
+    methods:{
59
+        printAction: function() {
60
+            const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
61
+
62
+            printJS({
63
+            printable: 'print_content',
64
+            type: 'html',
65
+            documentTitle: '  ',
66
+            style: style,
67
+            scanStyles: false
68
+            })
69
+        }
70
+    }
71
+}
72
+</script>
73
+
74
+
75
+<style rel="stylesheet/scss" lang="scss" scoped>
76
+.print_main_content {
77
+  background-color: white;
78
+  max-width: 1500px;
79
+  margin: 0 auto;
80
+  padding: 0 0 20px 0;
81
+
82
+  .order_title_panl {
83
+    text-align: center;
84
+
85
+    .main_title {
86
+      font-size: 18px;
87
+      line-height: 40px;
88
+      font-weight: 500;
89
+    }
90
+  }
91
+  .table_panel {
92
+    .table {
93
+      width: 100%;
94
+      border: 1px solid;
95
+      border-collapse: collapse;
96
+      padding: 2px;
97
+
98
+      thead {
99
+        tr {
100
+          td {
101
+            border: 1px solid;
102
+            text-align: center;
103
+            font-size: 20px;
104
+            padding: 15px 5px;
105
+          }
106
+        }
107
+      }
108
+      tbody {
109
+        tr {
110
+          td {
111
+            border: 1px solid;
112
+            text-align: center;
113
+            font-size: 18px;
114
+            padding: 10px 5px;
115
+
116
+            .proj {
117
+              padding: 5px 0;
118
+              text-align: left;
119
+
120
+              .proj_title {
121
+                font-size: 16px;
122
+                font-weight: 500;
123
+                line-height: 25px;
124
+              }
125
+
126
+              .proj_item {
127
+                font-size: 15px;
128
+                line-height: 20px;
129
+
130
+                .zone_name {
131
+                  font-weight: 500;
132
+                }
133
+              }
134
+            }
135
+          }
136
+        }
137
+      }
138
+    }
139
+  }
140
+}
141
+</style>

+ 123 - 10
src/xt_pages/dialysis/allSummary_print.vue View File

@@ -12,26 +12,84 @@
12 12
             <div id="print_content">
13 13
                 <div class="print_main_content">
14 14
                     <div class="order_title_panl">
15
-                        <span class="main_title">透前准备汇总统计表</span>
15
+                        <span class="main_title">汇总统计表</span>
16 16
                     </div>
17 17
                     <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
18
-                        <p>统计时间:2020.8.19-2020.8.20</p>
19
-                        <p>印单日期:2020.8.20</p>
18
+                        <p>印单日期:{{print_date}}</p>
20 19
                     </div>
21 20
                     <div class="table_panel">
22 21
                         <table class="table">
23 22
                             <thead>
24 23
                                 <tr>
25
-                                    <td>商品类型/药品名称</td>
26
-                                    <td>规格名称</td>
27
-                                    <td width="120">数量</td>
24
+                                    <td>姓名</td>
25
+                                    <td>透析模式</td>
26
+                                    <td width="120" v-for="(item,index) in tableName" :key="index">
27
+                                       {{item.type_name}}
28
+                                    </td>
29
+                                    <td>
30
+                                      抗凝剂(首剂)(维持)(总量)
31
+                                    </td>
28 32
                                 </tr>
29 33
                             </thead>
30 34
                             <tbody>
31
-                                <tr v-for='item in 6'>
32
-                                    <td>张三</td>
33
-                                    <td>张三</td>
34
-                                    <td>张三</td>
35
+                                <tr v-for="(it,i) in tableData" :key="i">
36
+                                    <td>{{it.patient.name}}</td>
37
+                                    <td>{{it.treatment_mode.name}}</td>
38
+                                    <td v-for="(item,index) in tableName" :key="index"
39
+                                     >{{getCount(it.patient.id,item.good_id)}}
40
+                                    </td>
41
+                                    <td>
42
+                                       <span>
43
+                                        <span v-if="it.prescription.anticoagulant == 0"></span>
44
+                                        <span v-if="it.prescription.anticoagulant == 1">无肝素</span>
45
+                                        <span v-if="it.prescription.anticoagulant == 2">普通肝素</span>
46
+                                        <span v-if="it.prescription.anticoagulant == 3">低分子肝素</span>
47
+                                        <span v-if="it.prescription.anticoagulant == 4">阿加曲班</span>
48
+                                        <span v-if="it.prescription.anticoagulant == 5">枸橼酸钠</span>
49
+                                        <span v-if="it.prescription.anticoagulant == 6">低分子肝素钙</span>
50
+                                        <span v-if="it.prescription.anticoagulant == 7">低分子肝素钠</span>
51
+                                        <span v-if="it.prescription.anticoagulant == 8">依诺肝素</span>
52
+                                        <span v-if="it.prescription.anticoagulant == 9">达肝素</span>
53
+                                        <span v-if="it.prescription.anticoagulant == 10">体外抗凝</span>
54
+                                       </span>
55
+                                        <span>
56
+                                            {{it.prescription.anticoagulant_shouji?it.prescription.anticoagulant_shouji:""}}
57
+                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_shouji!=''">mg</span>
58
+                                            <span v-if="it.prescription.anticoagulant == 2  && it.prescription.anticoagulant_shouji!=''">iu/h</span>
59
+                                            <span v-if="it.prescription.anticoagulant == 3  && it.prescription.anticoagulant_shouji!=''">iu</span>
60
+                                            <span v-if="it.prescription.anticoagulant == 4  && it.prescription.anticoagulant_shouji!=''">mg</span>
61
+                                            <span v-if="it.prescription.anticoagulant == 5  && it.prescription.anticoagulant_shouji!=''">mg</span>
62
+                                            <span v-if="it.prescription.anticoagulant == 6  && it.prescription.anticoagulant_shouji!=''">iu</span>
63
+                                            <span v-if="it.prescription.anticoagulant == 7  && it.prescription.anticoagulant_shouji!=''">iu</span>
64
+                                            <span v-if="it.prescription.anticoagulant == 8  && it.prescription.anticoagulant_shouji!=''">iu</span>
65
+                                            <span v-if="it.prescription.anticoagulant == 9  && it.prescription.anticoagulant_shouji!=''">iu</span>
66
+                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_shouji!=''">mg</span>
67
+                                          </span>
68
+                                          <span>{{it.prescription.anticoagulant_weichi?it.prescription.anticoagulant_weichi:""}}
69
+                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_weichi!=''">mg/h</span>
70
+                                            <span v-if="it.prescription.anticoagulant == 2 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
71
+                                            <span v-if="it.prescription.anticoagulant == 3 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
72
+                                            <span v-if="it.prescription.anticoagulant == 4 && it.prescription.anticoagulant_weichi!=''">mg/h</span>
73
+                                            <span v-if="it.prescription.anticoagulant == 5 && it.prescription.anticoagulant_weichi!=''">ml/h</span>
74
+                                            <span v-if="it.prescription.anticoagulant == 6 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
75
+                                            <span v-if="it.prescription.anticoagulant == 7 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
76
+                                            <span v-if="it.prescription.anticoagulant == 8 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
77
+                                            <span v-if="it.prescription.anticoagulant == 9 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
78
+                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_weichi!=''">mg</span>
79
+                                          </span>
80
+                                          <span>{{it.prescription.anticoagulant_zongliang?it.prescription.anticoagulant_zongliang:""}}
81
+                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_zongliang!=''">mg</span>
82
+                                            <span v-if="it.prescription.anticoagulant == 2 && it.prescription.anticoagulant_zongliang!=''">iu</span>
83
+                                            <span v-if="it.prescription.anticoagulant == 3 && it.prescription.anticoagulant_zongliang!=''">iu</span>
84
+                                            <span v-if="it.prescription.anticoagulant == 4 && it.prescription.anticoagulant_zongliang!=''">mg</span>
85
+                                            <span v-if="it.prescription.anticoagulant == 5 && it.prescription.anticoagulant_zongliang!=''">mg</span>
86
+                                            <span v-if="it.prescription.anticoagulant == 6 && it.prescription.anticoagulant_zongliang!=''">iu/h</span>
87
+                                            <span v-if="it.prescription.anticoagulant == 7 && it.prescription.anticoagulant_zongliang!=''">iu</span>
88
+                                            <span v-if="it.prescription.anticoagulant == 8 && it.prescription.anticoagulant_zongliang!=''">iu</span>
89
+                                            <span v-if="it.prescription.anticoagulant == 9 && it.prescription.anticoagulant_zongliang!=''">iu/h</span>
90
+                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_zongliang!=''">mg</span>
91
+                                          </span>
92
+                                    </td>
35 93
                                 </tr>
36 94
                             </tbody>
37 95
                         </table>
@@ -45,6 +103,8 @@
45 103
 <script>
46 104
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
47 105
 import print from 'print-js'
106
+import {getBatchCollection,getAllMaterial} from "@/api/consumable"
107
+const moment = require('moment')
48 108
 export default {
49 109
     components:{
50 110
         BreadCrumb
@@ -55,6 +115,10 @@ export default {
55 115
                 { path: false, name: '耗材药品' },
56 116
                 { path: false, name: '汇总打印' }
57 117
             ],
118
+            tableName:[],
119
+            consuMables:[],
120
+            tableData:[],
121
+            print_date:""
58 122
         }
59 123
     },
60 124
     methods:{
@@ -68,7 +132,56 @@ export default {
68 132
             style: style,
69 133
             scanStyles: false
70 134
             })
135
+        },
136
+         getAllMaterial(){
137
+          var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
138
+          this.start_time = startime
139
+           const params = {
140
+              startime:this.start_time
141
+           }
142
+          getAllMaterial(params).then(response=>{
143
+             if(response.data.state == 1){
144
+               var material =  response.data.data.material
145
+               console.log("今日耗材",material)
146
+               this.tableName = material
147
+             }
148
+          })
149
+        },
150
+        getCount(patientid,goodid){
151
+           var count = 0
152
+           for(let i=0;i<this.consuMables.length;i++){
153
+              if(patientid == this.consuMables[i].patient_id && goodid == this.consuMables[i].good_id){
154
+                 count = this.consuMables[i].count
155
+              }
156
+           }
157
+           return count
71 158
         }
159
+    },
160
+    mounted(){
161
+      var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
162
+      console.log("打印数据",ids)
163
+       var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
164
+      const params = {
165
+         startime:startime,
166
+         ids:ids.join(',')
167
+      }
168
+      //获取汇总打印
169
+      getBatchCollection(params).then(response=>{
170
+         if(response.data.state == 1){
171
+            var schedule = response.data.data.schedule
172
+            console.log("schedule",schedule)
173
+            this.tableData = schedule
174
+           var consumables = response.data.data.consumables
175
+           console.log("consumables",consumables)
176
+           this.consuMables = consumables
177
+         }
178
+      })
179
+    },
180
+    created(){
181
+      var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
182
+      this.print_date = startime
183
+        //获取今日所有耗材
184
+      this.getAllMaterial()
72 185
     }
73 186
 }
74 187
 </script>

+ 206 - 65
src/xt_pages/dialysis/components/allSummary.vue View File

@@ -5,7 +5,7 @@
5 5
         <div class="time">
6 6
           <ul class>
7 7
             <li
8
-              :class="item.value == schedulType ? 'active' : ''"
8
+              :class="item.value == scheduleType ? 'active' : ''"
9 9
               @click="selectSchedulType(item.value)"
10 10
               v-for="item in schedulArr"
11 11
               :key="item.value"
@@ -37,27 +37,99 @@
37 37
           </div>
38 38
         </div>
39 39
         <div>
40
-            <el-button size="small" icon="el-icon-printer" type="primary">打印</el-button>
40
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
41 41
             <el-button size="small" type="primary" @click="statistics">统计表</el-button>
42 42
         </div>
43 43
       </div>
44 44
       <div>
45 45
           <el-table
46 46
             :data="tableData"
47
-            height="350"
47
+            height="500px"
48 48
             border
49
-            style="width: 100%">
49
+            style="width: 100%"
50
+            @selection-change="handleSelectionChange">
51
+            >
50 52
             <el-table-column  align="center" type="selection" width="55">
51 53
             </el-table-column>
52 54
             <el-table-column align="center" prop="name" label="姓名" width="180">
55
+               <template slot-scope="scope">
56
+                   {{scope.row.patient.name}}
57
+               </template>
53 58
             </el-table-column>
54 59
             <el-table-column align="center" prop="address" label="透析模式">
60
+              <template slot-scope="scope">
61
+                 {{scope.row.treatment_mode.name}}
62
+              </template>
55 63
             </el-table-column>
56
-            <el-table-column align="center" prop="address" label="透析模式">
64
+            <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
65
+               <template slot-scope="scope"> 
66
+                   {{getCount(scope.row.patient.id,item.good_id)}}
67
+               </template>
57 68
             </el-table-column>
58 69
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
70
+              <template slot-scope="scope">
71
+                   <span v-if="scope.row.prescription.anticoagulant == 0"></span>
72
+                    <span v-if="scope.row.prescription.anticoagulant == 1">无肝素</span>
73
+                    <span v-if="scope.row.prescription.anticoagulant == 2">普通肝素</span>
74
+                    <span v-if="scope.row.prescription.anticoagulant == 3">低分子肝素</span>
75
+                    <span v-if="scope.row.prescription.anticoagulant == 4">阿加曲班</span>
76
+                    <span v-if="scope.row.prescription.anticoagulant == 5">枸橼酸钠</span>
77
+                    <span v-if="scope.row.prescription.anticoagulant == 6">低分子肝素钙</span>
78
+                    <span v-if="scope.row.prescription.anticoagulant == 7">低分子肝素钠</span>
79
+                    <span v-if="scope.row.prescription.anticoagulant == 8">依诺肝素</span>
80
+                    <span v-if="scope.row.prescription.anticoagulant == 9">达肝素</span>
81
+                    <span v-if="scope.row.prescription.anticoagulant == 10">体外抗凝</span>
82
+                    <span>
83
+                      {{scope.row.prescription.anticoagulant_shouji?scope.row.prescription.anticoagulant_shouji:""}}
84
+                      <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
85
+                      <span v-if="scope.row.prescription.anticoagulant == 2 && scope.row.prescription.anticoagulant_shouji !=''">iu/h</span>
86
+                      <span v-if="scope.row.prescription.anticoagulant == 3 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
87
+                      <span v-if="scope.row.prescription.anticoagulant == 4 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
88
+                      <span v-if="scope.row.prescription.anticoagulant == 5 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
89
+                      <span v-if="scope.row.prescription.anticoagulant == 6 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
90
+                      <span v-if="scope.row.prescription.anticoagulant == 7 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
91
+                      <span v-if="scope.row.prescription.anticoagulant == 8 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
92
+                      <span v-if="scope.row.prescription.anticoagulant == 9 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
93
+                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
94
+                    </span>
95
+                    <span>{{scope.row.prescription.anticoagulant_weichi?scope.row.prescription.anticoagulant_weichi:""}}
96
+                      <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_weichi!=''">mg/h</span>
97
+                      <span v-if="scope.row.prescription.anticoagulant == 2  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
98
+                      <span v-if="scope.row.prescription.anticoagulant == 3  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
99
+                      <span v-if="scope.row.prescription.anticoagulant == 4  && scope.row.prescription.anticoagulant_weichi!=''">mg/h</span>
100
+                      <span v-if="scope.row.prescription.anticoagulant == 5  && scope.row.prescription.anticoagulant_weichi!=''">ml/h</span>
101
+                      <span v-if="scope.row.prescription.anticoagulant == 6  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
102
+                      <span v-if="scope.row.prescription.anticoagulant == 7  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
103
+                      <span v-if="scope.row.prescription.anticoagulant == 8  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
104
+                      <span v-if="scope.row.prescription.anticoagulant == 9  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
105
+                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_weichi!=''">mg</span>
106
+                    </span>
107
+                    <span>{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang:""}}
108
+                       <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
109
+                      <span v-if="scope.row.prescription.anticoagulant == 2 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
110
+                      <span v-if="scope.row.prescription.anticoagulant == 3 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
111
+                      <span v-if="scope.row.prescription.anticoagulant == 4 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
112
+                      <span v-if="scope.row.prescription.anticoagulant == 5 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
113
+                      <span v-if="scope.row.prescription.anticoagulant == 6 && scope.row.prescription.anticoagulant_zongliang!=''">iu/h</span>
114
+                      <span v-if="scope.row.prescription.anticoagulant == 7 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
115
+                      <span v-if="scope.row.prescription.anticoagulant == 8 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
116
+                      <span v-if="scope.row.prescription.anticoagulant == 9 && scope.row.prescription.anticoagulant_zongliang!=''">iu/h</span>
117
+                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
118
+                    </span>
119
+                </template>
59 120
             </el-table-column>
60 121
         </el-table>
122
+        <el-pagination
123
+         align="right"
124
+         @size-change="handleSizeChange"
125
+         @current-change="handleCurrentChange"
126
+         :page-sizes="[10, 20, 30, 50]"
127
+         :page-size="10"
128
+         background
129
+         style="margin-top:20px;"
130
+         layout="total, sizes, prev, pager, next, jumper"
131
+         :total="total"
132
+       ></el-pagination>
61 133
       </div>
62 134
 
63 135
       <all-summary-dialog ref="allSummary"></all-summary-dialog >
@@ -68,83 +140,52 @@
68 140
 <script>
69 141
 import { GetAllZone } from "@/api/dialysis";
70 142
 import allSummaryDialog from './allSummaryDialog'
143
+import { getAllMaterial,getCollectList } from "@/api/consumable"
144
+import { parseTime } from "@/utils";
71 145
 export default {
72 146
     components:{
73 147
         allSummaryDialog
74 148
     },
75 149
     data(){
76 150
         return{
77
-            schedulType: 0,
151
+            scheduleType: 0,
78 152
             schedulArr: [
79 153
                 { value: 0, label: "全部" },
80 154
                 { value: 1, label: "上午" },
81 155
                 { value: 2, label: "下午" },
82 156
                 { value: 3, label: "晚上" }
83 157
             ],
84
-            selected_date:new Date(),
158
+            selected_date:"",
85 159
             partitionArr:[],
86 160
             partitionType: 0,
87
-            tableData: [{
88
-                date: '2016-05-03',
89
-                name: '王小虎',
90
-                address: '上海市普陀区金沙江路 1518 弄'
91
-                }, {
92
-                date: '2016-05-02',
93
-                name: '王小虎',
94
-                address: '上海市普陀区金沙江路 1518 弄'
95
-                }, {
96
-                date: '2016-05-04',
97
-                name: '王小虎',
98
-                address: '上海市普陀区金沙江路 1518 弄'
99
-                }, {
100
-                date: '2016-05-01',
101
-                name: '王小虎',
102
-                address: '上海市普陀区金沙江路 1518 弄'
103
-                }, {
104
-                date: '2016-05-08',
105
-                name: '王小虎',
106
-                address: '上海市普陀区金沙江路 1518 弄'
107
-                }, {
108
-                date: '2016-05-06',
109
-                name: '王小虎',
110
-                address: '上海市普陀区金沙江路 1518 弄'
111
-                }, {
112
-                date: '2016-05-07',
113
-                name: '王小虎',
114
-                address: '上海市普陀区金沙江路 1518 弄'
115
-                },{
116
-                date: '2016-05-01',
117
-                name: '王小虎',
118
-                address: '上海市普陀区金沙江路 1518 弄'
119
-                }, {
120
-                date: '2016-05-08',
121
-                name: '王小虎',
122
-                address: '上海市普陀区金沙江路 1518 弄'
123
-                }, {
124
-                date: '2016-05-06',
125
-                name: '王小虎',
126
-                address: '上海市普陀区金沙江路 1518 弄'
127
-                }, {
128
-                date: '2016-05-07',
129
-                name: '王小虎',
130
-                address: '上海市普陀区金沙江路 1518 弄'
131
-                }
132
-            ],
133
-            search_input:""
161
+            tableData: [],
162
+            search_input:"",
163
+            start_time:"",
164
+            tableName:[],
165
+            limit:10,
166
+            page:1,
167
+            consuMables:[],
168
+            total:0,
169
+            selecting_schs: [],
170
+            prescriptionList:[]
134 171
         }
135 172
     },
136 173
     created(){
137 174
       //获取所有分区
138
-      this.getAllZone()
175
+       this.getAllZone()
139 176
       //获取今日所有耗材
140
-      this.getAllMaterial()
177
+       this.getAllMaterial()
178
+      //获取汇总数据
179
+       this.getlist()
141 180
     },
142 181
     methods:{
143 182
         selectSchedulType(scheduleType) {
144
-            this.schedulType = scheduleType;
183
+            this.scheduleType = scheduleType;
184
+            this.getlist()
145 185
         },
146 186
         selectPartitionType(partitionType) {
147 187
             this.partitionType = partitionType;
188
+            this.getlist()
148 189
         },
149 190
         getAllZone: function() {
150 191
             GetAllZone().then(response => {
@@ -161,21 +202,121 @@ export default {
161 202
             this.$refs.allSummary.show();
162 203
         },
163 204
         handleScheduleDateChange(){
164
-
205
+          var startime = parseTime(this.selected_date,'{y}-{m}-{d}')
206
+          this.start_time = startime
207
+          this.getlist()
165 208
         },
166 209
         search(){
167
-
210
+           if(this.selected_date==""){
211
+              this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
212
+            }
213
+            if(this.selected_date!=''){
214
+              this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
215
+            } 
216
+           const params ={
217
+              start_time:this.start_time,
218
+              scheduleType: this.scheduleType,
219
+              partitionType:this.partitionType,
220
+              limit:this.limit,
221
+              page:this.page, 
222
+              keyword:this.search_input,
223
+            }
224
+          getCollectList(params).then(response=>{
225
+             if(response.data.state == 1){
226
+               var schedule = response.data.data.schedule
227
+               console.log("打印schedule",schedule)
228
+               this.tableData = schedule
229
+               var total = response.data.data.total
230
+               console.log("total",total)
231
+               this.total = total
232
+               var consumables = response.data.data.consumables
233
+               console.log("consumables",consumables)
234
+               this.consuMables = consumables
235
+             }
236
+          })
168 237
         },
169 238
         getAllMaterial(){
170
-          var startime =  parseTime(this.selected_date, '{y}-{m}-{d}')
171
-          console.log("2222",startime)
239
+          if(this.selected_date==""){
240
+              this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
241
+            }
242
+            if(this.selected_date!=''){
243
+              this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
244
+            } 
172 245
            const params = {
173
-            
246
+              startime:this.start_time
174 247
            }
175
-          getAllMaterial().then(response=>{
176
-            
248
+          getAllMaterial(params).then(response=>{
249
+             if(response.data.state == 1){
250
+               var material =  response.data.data.material
251
+               console.log("material",material)
252
+               this.tableName = material
253
+             }
177 254
           })
178
-        }
255
+        },
256
+        handleSizeChange(val) {
257
+         this.limit = val;
258
+         this.getlist();
259
+       },
260
+        handleCurrentChange(val) {
261
+         this.page = val;
262
+         this.getlist()
263
+        },
264
+        getlist(){
265
+           if(this.selected_date==""){
266
+              this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
267
+            }
268
+            if(this.selected_date!=''){
269
+              this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
270
+            } 
271
+           const params ={
272
+              start_time:this.start_time,
273
+              scheduleType: this.scheduleType,
274
+              partitionType:this.partitionType,
275
+              limit:this.limit,
276
+              page:this.page, 
277
+              keyword:this.search_input,
278
+            }
279
+          getCollectList(params).then(response=>{
280
+             if(response.data.state == 1){
281
+               var schedule = response.data.data.schedule
282
+               console.log("打印schedule",schedule)
283
+               this.tableData = schedule
284
+               var total = response.data.data.total
285
+               console.log("total",total)
286
+               this.total = total
287
+               var consumables = response.data.data.consumables
288
+               console.log("consumables",consumables)
289
+               this.consuMables = consumables
290
+               var prescription =  response.data.data.prescription
291
+               this.prescriptionList = prescription
292
+             }
293
+          })
294
+        },
295
+        getCount(patientid,goodid){
296
+          var count = 0
297
+           for(let i=0;i<this.consuMables.length;i++){
298
+              if(patientid == this.consuMables[i].patient_id && goodid == this.consuMables[i].good_id){
299
+                 count = this.consuMables[i].count
300
+              }
301
+           }
302
+           return count
303
+        },
304
+        handleSelectionChange(val){
305
+          this.selecting_schs = val;
306
+        },
307
+        toPrint(){
308
+          if(this.selecting_schs.length === 0) {
309
+              this.$message.error("请至少选择一条需要打印的内容");
310
+              return false;
311
+          }
312
+          var sch_ids = [];
313
+          for (let index = 0; index < this.selecting_schs.length; index++) {
314
+              sch_ids.push(this.selecting_schs[index].id);
315
+          }
316
+           this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
317
+           this.$router.push("/dialysis/allSummary_print")
318
+        },
319
+
179 320
     }
180 321
 }
181 322
 </script>

+ 45 - 65
src/xt_pages/dialysis/components/allSummaryDialog.vue View File

@@ -7,54 +7,36 @@
7 7
     >
8 8
     <div>
9 9
         <el-date-picker
10
-        style="width:140px;margin-right:10px"
10
+        style="width:150px;margin-right:10px"
11 11
         v-model="startTime"
12 12
         type="date"
13 13
         placeholder="选择日期">
14 14
         </el-date-picker>
15 15
         <el-date-picker
16
-        style="width:140px;margin-right:10px"
16
+        style="width:150px;margin-right:10px"
17 17
         v-model="endTime"
18 18
         type="date"
19 19
         placeholder="选择日期">
20 20
         </el-date-picker>
21
-        <el-select style="width:140px;margin-right:10px" v-model="schedulType" placeholder="请选择">
22
-            <el-option
23
-            v-for="item in schedulArr"
24
-            :key="item.value"
25
-            :label="item.label"
26
-            :value="item.value">
27
-            </el-option>
28
-        </el-select>
29
-        <el-select style="width:140px;margin-right:10px" v-model="partitionType" placeholder="请选择">
30
-            <el-option
31
-            v-for="item in partitionArr"
32
-            :key="item.id"
33
-            :label="item.name"
34
-            :value="item.id">
35
-            </el-option>
36
-        </el-select>
37 21
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
38 22
         
39 23
     </div>
40 24
     <div style="margin-top:10px;">
41 25
         <el-table :data="tableData" border style="width: 100%" height="300">
42
-            <el-table-column
43
-            align="center"
44
-            prop="date"
45
-            label="日期"
46
-            width="180">
26
+            <el-table-column align="center" prop="date" label="商品类型" width="180">
27
+               <template slot-scope="scope">
28
+                   {{scope.row.type_name}}
29
+               </template>
47 30
             </el-table-column>
48
-            <el-table-column
49
-            align="center"
50
-            prop="name"
51
-            label="姓名"
52
-            width="180">
31
+            <el-table-column align="center" prop="name" label="规格名称" width="180">
32
+                <template slot-scope="scope">
33
+                  {{scope.row.specification_name}}
34
+               </template>
53 35
             </el-table-column>
54
-            <el-table-column
55
-            align="center"
56
-            prop="address"
57
-            label="地址">
36
+            <el-table-column align="center"  prop="address" label="数量">
37
+              <template slot-scope="scope">
38
+                  {{scope.row.count}}
39
+               </template>
58 40
             </el-table-column>
59 41
         </el-table>
60 42
     </div>
@@ -68,13 +50,15 @@
68 50
 
69 51
 
70 52
 <script>
71
-import { GetAllZone } from "@/api/dialysis";
53
+const moment = require('moment')
54
+import { parseTime } from "@/utils";
55
+import {getGatherList} from "@/api/consumable"
72 56
 export default {
73 57
     data(){
74 58
         return{
75 59
             visible: false,
76
-            startTime:'',
77
-            endTime:'',
60
+            startTime:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
61
+            endTime:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
78 62
             schedulArr: [
79 63
                 {value: 0, label: '全部班'},
80 64
                 {value: 1, label: '上午'},
@@ -84,27 +68,12 @@ export default {
84 68
             schedulType: 0,
85 69
             partitionArr:[],
86 70
             partitionType: 0,
87
-            tableData: [{
88
-                date: '2016-05-02',
89
-                name: '王小虎',
90
-                address: '上海市普陀区金沙江路 1518 弄'
91
-                }, {
92
-                date: '2016-05-04',
93
-                name: '王小虎',
94
-                address: '上海市普陀区金沙江路 1517 弄'
95
-                }, {
96
-                date: '2016-05-01',
97
-                name: '王小虎',
98
-                address: '上海市普陀区金沙江路 1519 弄'
99
-                }, {
100
-                date: '2016-05-03',
101
-                name: '王小虎',
102
-                address: '上海市普陀区金沙江路 1516 弄'
103
-            }]
71
+            tableData: []
104 72
         }
105 73
     },
106 74
     created(){
107
-        this.getAllZone()
75
+      //获取统计表数据
76
+      this.getlist()   
108 77
     },
109 78
     methods:{
110 79
         _close: function(done) {
@@ -113,22 +82,33 @@ export default {
113 82
         show() {
114 83
             this.visible = true;
115 84
         },
116
-        getAllZone: function() {
117
-            GetAllZone().then(response => {
118
-                if (response.data.state == 0) {
119
-                this.$message.error(response.data.msg);
120
-                return false;
121
-                } else {
122
-                this.partitionArr = response.data.data.zone;
123
-                this.partitionArr.unshift({ id: 0, name: "全部分区" });
124
-                }
125
-            });
126
-        },
127 85
         toPrint(){
128 86
             this.$router.push({
129
-                path: '/dialysis/allSummary_print',
87
+                path: '/dialysis/allsummarydialog_print',
130 88
                 // query: { date: date }
131 89
             })
90
+        },
91
+        getlist(){
92
+            // var startime = parseTime(this.startTime, '{y}-{m}-{d}')
93
+            // console.log("startime",startime)
94
+            // var endtime =  parseTime(this.endTime,'{y}-{m}-{d}')
95
+            // console.log("endtime",endtime)
96
+            const params = {
97
+              start_time:this.startTime,
98
+              end_time:this.endTime
99
+            }
100
+           console.log("params",params)
101
+          getGatherList(params).then(response=>{
102
+            if(response.data.state == 1){
103
+              var warehouselist = response.data.data.warehouselist
104
+              console.log("22222222",warehouselist)
105
+              var consumables =  response.data.data.consumables
106
+              console.log("3333333",consumables)
107
+              this.tableData = warehouselist
108
+              var count = response.data.data.count
109
+              console.log("count",count)
110
+            }
111
+          })
132 112
         }
133 113
     }
134 114
 }

+ 180 - 64
src/xt_pages/dialysis/components/dialysisParameters.vue View File

@@ -50,7 +50,7 @@
50 50
             @selection-change="handleSelectionChange">
51 51
             <el-table-column align="center" type="selection" width="55">
52 52
             </el-table-column>
53
-            <el-table-column align="center"  label="姓名" width="80">
53
+            <el-table-column align="center" fixed  label="姓名" width="80">
54 54
                <template slot-scope="scope">
55 55
                    {{scope.row.patient.name?scope.row.patient.name:""}}
56 56
                </template>
@@ -62,89 +62,91 @@
62 62
             </el-table-column>
63 63
             <el-table-column align="center" label="上次透后体重(kg)" width="280">
64 64
                 <template slot-scope="scope">
65
-                   {{scope.row.assessment_before_dislysis.weight_after_last_transparency?scope.row.assessment_before_dislysis.weight_after_last_transparency:""}}
65
+                  {{getLastWeight(scope.row.patient.id)?getLastWeight(scope.row.patient.id):""}}
66 66
                 </template>
67 67
             </el-table-column>
68 68
             <el-table-column align="center" label="透前体重(kg)" width="120">
69 69
                <template slot-scope="scope">
70
-                  {{scope.row.assessment_before_dislysis.weighing_before?scope.row.assessment_before_dislysis.weighing_before:""}}
70
+                  {{getWeightBefor(scope.row.patient_id)?getWeightBefor(scope.row.patient_id):""}}
71 71
                </template>
72 72
             </el-table-column>
73 73
             <el-table-column align="center" label="干体重(kg)" width="140">
74 74
                <template slot-scope="scope">
75
-                  {{scope.row.assessment_before_dislysis.dry_weight?scope.row.assessment_before_dislysis.dry_weight:""}}
75
+                 {{getDryWeight(scope.row.patient_id)?getDryWeight(scope.row.patient_id):""}}        
76 76
                </template>
77 77
             </el-table-column>
78 78
             <el-table-column align="center" label="透前血压(mmhg)" width="180">
79 79
               <template slot-scope="scope">
80
-                  {{scope.row.assessment_before_dislysis.systolic_blood_pressure?scope.row.assessment_before_dislysis.systolic_blood_pressure:""}}/{{scope.row.assessment_before_dislysis.diastolic_blood_pressure?scope.row.assessment_before_dislysis.diastolic_blood_pressure:""}}
80
+                  {{getSysBloodPressure(scope.row.patient_id)?getSysBloodPressure(scope.row.patient_id):""}} 
81 81
               </template>
82 82
             </el-table-column>
83 83
             <el-table-column align="center" label="目标超滤量" width="120">
84 84
                <template slot-scope="scope">
85
-                  {{scope.row.prescription.target_ultrafiltration?scope.row.prescription.target_ultrafiltration:""}}
85
+                 {{getTargetUltrafiltration(scope.row.patient_id)?getTargetUltrafiltration(scope.row.patient_id):""}}
86 86
                </template>
87 87
             </el-table-column>
88 88
             <el-table-column align="center" label="血流量(ml/min)" width="180">
89
-               <template slot-scope="scope"> 
90
-                   {{scope.row.prescription.blood_flow_volume?scope.row.prescription.blood_flow_volume:""}}
89
+               <template slot-scope="scope">
90
+                 {{getBloodFlowVolume(scope.row.patient_id)?getBloodFlowVolume(scope.row.patient_id):""}}  
91 91
                </template>
92 92
             </el-table-column>
93 93
              <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)" width="220">
94 94
                 <template slot-scope="scope">
95
-                   <span v-if="scope.row.prescription.anticoagulant == 0"></span>
96
-                    <span v-if="scope.row.prescription.anticoagulant == 1">无肝素</span>
97
-                    <span v-if="scope.row.prescription.anticoagulant == 2">普通肝素</span>
98
-                    <span v-if="scope.row.prescription.anticoagulant == 3">低分子肝素</span>
99
-                    <span v-if="scope.row.prescription.anticoagulant == 4">阿加曲班</span>
100
-                    <span v-if="scope.row.prescription.anticoagulant == 5">枸橼酸钠</span>
101
-                    <span v-if="scope.row.prescription.anticoagulant == 6">低分子肝素钙</span>
102
-                    <span v-if="scope.row.prescription.anticoagulant == 7">低分子肝素钠</span>
103
-                    <span v-if="scope.row.prescription.anticoagulant == 8">依诺肝素</span>
104
-                    <span v-if="scope.row.prescription.anticoagulant == 9">达肝素</span>
105
-                    <span v-if="scope.row.prescription.anticoagulant == 10">体外抗凝</span>
95
+                   <span v-if="getAnticoagulant(scope.row.patient_id) == 0"></span>
96
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 1">无肝素</span>
97
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 2">普通肝素</span>
98
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 3">低分子肝素</span>
99
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 4">阿加曲班</span>
100
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 5">枸橼酸钠</span>
101
+                    <span v-if="getAnticoagulant(scope.row.patient_id)== 6">低分子肝素钙</span>
102
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 7">低分子肝素钠</span>
103
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 8">依诺肝素</span>
104
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 9">达肝素</span>
105
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 10">体外抗凝</span>
106 106
                     <span>
107
-                      {{scope.row.prescription.anticoagulant_shouji?scope.row.prescription.anticoagulant_shouji:""}}
108
-                      <span v-if="scope.row.prescription.anticoagulant == 1">mg</span>
109
-                      <span v-if="scope.row.prescription.anticoagulant == 2">iu/h</span>
110
-                      <span v-if="scope.row.prescription.anticoagulant == 3">iu</span>
111
-                      <span v-if="scope.row.prescription.anticoagulant == 4">mg</span>
112
-                      <span v-if="scope.row.prescription.anticoagulant == 5">mg</span>
113
-                      <span v-if="scope.row.prescription.anticoagulant == 6">iu</span>
114
-                      <span v-if="scope.row.prescription.anticoagulant == 7">iu</span>
115
-                      <span v-if="scope.row.prescription.anticoagulant == 8">iu</span>
116
-                      <span v-if="scope.row.prescription.anticoagulant == 9">iu</span>
117
-                      <span v-if="scope.row.prescription.anticoagulant == 10">mg</span>
107
+                      {{getAnticoagulantShouji(scope.row.patient_id)?getAnticoagulantShouji(scope.row.patient_id):''}}
108
+                      <span v-if="getAnticoagulant(scope.row.patient_id) ==1 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
109
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu/h</span>
110
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
111
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
112
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
113
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
114
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
115
+                      <span v-if="getAnticoagulant(scope.row.patient_id)== 8 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
116
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
117
+                      <span v-if="getAnticoagulant(scope.row.patient_id)== 10 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
118 118
                     </span>
119
-                    <span>{{scope.row.prescription.anticoagulant_weichi?scope.row.prescription.anticoagulant_weichi:""}}
120
-                      <span v-if="scope.row.prescription.anticoagulant == 1">mg/h</span>
121
-                      <span v-if="scope.row.prescription.anticoagulant == 2">iu/h</span>
122
-                      <span v-if="scope.row.prescription.anticoagulant == 3">iu/h</span>
123
-                      <span v-if="scope.row.prescription.anticoagulant == 4">mg/h</span>
124
-                      <span v-if="scope.row.prescription.anticoagulant == 5">ml/h</span>
125
-                      <span v-if="scope.row.prescription.anticoagulant == 6">iu/h</span>
126
-                      <span v-if="scope.row.prescription.anticoagulant == 7">iu/h</span>
127
-                      <span v-if="scope.row.prescription.anticoagulant == 8">iu/h</span>
128
-                      <span v-if="scope.row.prescription.anticoagulant == 9">iu/h</span>
129
-                      <span v-if="scope.row.prescription.anticoagulant == 10">mg</span>
119
+                    <span>
120
+                       {{getAnticoagulantWeichi(scope.row.patient_id)?getAnticoagulantWeichi(scope.row.patient_id):''}}
121
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
122
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
123
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
124
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
125
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantWeichi(scope.row.patient_id)!=''">ml/h</span>
126
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
127
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
128
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
129
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
130
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg</span>
130 131
                     </span>
131
-                    <span>{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang:""}}
132
-                       <span v-if="scope.row.prescription.anticoagulant == 1">mg</span>
133
-                      <span v-if="scope.row.prescription.anticoagulant == 2">iu</span>
134
-                      <span v-if="scope.row.prescription.anticoagulant == 3">iu</span>
135
-                      <span v-if="scope.row.prescription.anticoagulant == 4">mg</span>
136
-                      <span v-if="scope.row.prescription.anticoagulant == 5">mg</span>
137
-                      <span v-if="scope.row.prescription.anticoagulant == 6">iu/h</span>
138
-                      <span v-if="scope.row.prescription.anticoagulant == 7">iu</span>
139
-                      <span v-if="scope.row.prescription.anticoagulant == 8">iu</span>
140
-                      <span v-if="scope.row.prescription.anticoagulant == 9">iu/h</span>
141
-                      <span v-if="scope.row.prescription.anticoagulant == 10">mg</span>
132
+                    <span>
133
+                      {{getAnticoagulantZongliang(scope.row.patient_id)?getAnticoagulantZongliang(scope.row.patient_id):''}}
134
+                       <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
135
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
136
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
137
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
138
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
139
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
140
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
141
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
142
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
143
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
142 144
                     </span>
143 145
                 </template>
144 146
             </el-table-column>
145 147
              <el-table-column align="center" label="透析器/灌流器" width="200">
146 148
                <template slot-scope="scope">
147
-                 {{scope.row.prescription.dialyzer_perfusion_apparatus}}
149
+                 {{getDialyzerPerfusionApparatus(scope.row.patient_id)?getDialyzerPerfusionApparatus(scope.row.patient_id):""}}
148 150
                </template>
149 151
             </el-table-column>
150 152
         </el-table>
@@ -171,6 +173,7 @@ import { GetAllZone } from "@/api/dialysis";
171 173
 import consumablesDialog from './consumablesDialog'
172 174
 import { parseTime } from "@/utils";
173 175
 import { getDialysisParameters } from "@/api/consumable"
176
+const moment = require('moment')
174 177
 export default {
175 178
     components:{
176 179
         consumablesDialog
@@ -184,7 +187,8 @@ export default {
184 187
                 { value: 2, label: "下午" },
185 188
                 { value: 3, label: "晚上" }
186 189
             ],
187
-            selected_date:new Date(),
190
+            // selected_date:new Date(),
191
+            selected_date:"",
188 192
             partitionArr:[],
189 193
             partitionType: 0,
190 194
             tableData: [],
@@ -194,8 +198,9 @@ export default {
194 198
             total:0,
195 199
             start_time:0,
196 200
             selecting_schs: [],
197
-            start_time:0
198
-            
201
+            start_time:0,
202
+            prescriptionList:[],
203
+            dialysisBefor:[]
199 204
         }
200 205
     },
201 206
     created(){
@@ -228,14 +233,19 @@ export default {
228 233
             this.$refs.consumables.show();
229 234
         },
230 235
         search(){
231
-            this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
236
+            if(this.selected_date==""){
237
+              this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
238
+            }
239
+            if(this.selected_date!=''){
240
+              this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
241
+            } 
232 242
             const params ={
233 243
               start_time:this.start_time,
234 244
               keyword:this.search_input,
235 245
               scheduleType: this.scheduleType,
236 246
               partitionType:this.partitionType,
237 247
               limit:this.limit,
238
-              page:this.page 
248
+              page:this.page
239 249
             }
240 250
           getDialysisParameters(params).then(response=>{
241 251
              if(response.data.state == 1){
@@ -243,7 +253,7 @@ export default {
243 253
                 console.log("schedule",schedule)
244 254
                 this.tableData = schedule
245 255
                 var total = response.data.data.total
246
-                console.log("total",total)
256
+               
247 257
                 this.total = total
248 258
              }
249 259
           })
@@ -258,25 +268,32 @@ export default {
258 268
           return new Date(time).getTime() / 1000;
259 269
          },
260 270
         getlist(){
261
-            var startime = parseTime(this.selected_date, '{y}-{m}-{d}')
262
-            this.start_time = startime
271
+            if(this.selected_date==""){
272
+              this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
273
+            }
274
+            if(this.selected_date!=''){
275
+              this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
276
+            } 
263 277
             const params ={
264 278
               start_time:this.start_time,
265 279
               keyword:this.search_input,
266 280
               scheduleType: this.scheduleType,
267 281
               partitionType:this.partitionType,
268 282
               limit:this.limit,
269
-              page:this.page 
283
+              page:this.page
270 284
             }
271
-          
272 285
           getDialysisParameters(params).then(response=>{
273 286
              if(response.data.state == 1){
274 287
                 var schedule = response.data.data.schedule
275 288
                 console.log("schedule",schedule)
276 289
                 this.tableData = schedule
277 290
                 var total = response.data.data.total
278
-                console.log("total",total)
279 291
                 this.total = total
292
+                var prescription =  response.data.data.prescription
293
+                this.prescriptionList = prescription
294
+                var dialysbefor = response.data.data.dialysbefor
295
+                this.dialysisBefor = dialysbefor
296
+                console.log("dialysbefor",dialysbefor)
280 297
              }
281 298
           })
282 299
         },
@@ -303,6 +320,105 @@ export default {
303 320
        this.page = val;
304 321
        this.getlist()
305 322
      },
323
+     getLastWeight(id){
324
+       var lastweight = ""
325
+        for(let i=0;i<this.dialysisBefor.length;i++){
326
+          if(this.dialysisBefor[i].patient_id == id){
327
+             lastweight = this.dialysisBefor[i].weight_after_last_transparency
328
+          }
329
+        }
330
+        return lastweight
331
+     },
332
+     getWeightBefor(id){
333
+       var assessmentBeforWeight = ""
334
+        for(let i=0;i<this.dialysisBefor.length;i++){
335
+          if(this.dialysisBefor[i].patient_id == id){
336
+             assessmentBeforWeight = this.dialysisBefor[i].weight_before
337
+          }
338
+        }
339
+       return assessmentBeforWeight
340
+     },
341
+     getDryWeight(id){
342
+        var dryWeight = ""
343
+        for(let i=0;i<this.dialysisBefor.length;i++){
344
+          if(this.dialysisBefor[i].patient_id == id){
345
+             dryWeight = this.dialysisBefor[i].dry_weight
346
+          }
347
+        }
348
+       return dryWeight
349
+     },
350
+     getSysBloodPressure(id){
351
+       var sysBloodPressure = ""
352
+        for(let i=0;i<this.dialysisBefor.length;i++){
353
+          if(this.dialysisBefor[i].patient_id == id){
354
+             sysBloodPressure = this.dialysisBefor[i].systolic_blood_pressure
355
+          }
356
+        }
357
+        return sysBloodPressure
358
+     },
359
+     getTargetUltrafiltration(id){
360
+       var targetUltrafiltration = ""
361
+       for(let i=0;i<this.prescriptionList.length;i++){
362
+          if(this.prescriptionList[i].patient_id == id){
363
+             targetUltrafiltration = this.prescriptionList[i].target_ultrafiltration
364
+          }
365
+        }
366
+        return targetUltrafiltration
367
+     },
368
+     getBloodFlowVolume(id){
369
+       var bloodFlowVolume = ""
370
+       for(let i=0;i<this.prescriptionList.length;i++){
371
+          if(this.prescriptionList[i].patient_id == id){
372
+             bloodFlowVolume = this.prescriptionList[i].blood_flow_volume
373
+          }
374
+        }
375
+       return bloodFlowVolume
376
+     },
377
+     getDialyzerPerfusionApparatus(id){
378
+       var dialyzerPerfusionApparatus = ""
379
+        for(let i=0;i<this.prescriptionList.length;i++){
380
+          if(this.prescriptionList[i].patient_id == id){
381
+             dialyzerPerfusionApparatus = this.prescriptionList[i].dialyzer_perfusion_apparatus
382
+          }
383
+        } 
384
+      return dialyzerPerfusionApparatus
385
+     },
386
+     getAnticoagulant(id){
387
+       var anticoagulant = ""
388
+        for(let i=0;i<this.prescriptionList.length;i++){
389
+          if(this.prescriptionList[i].patient_id == id){
390
+             anticoagulant = this.prescriptionList[i].anticoagulant
391
+          }
392
+        } 
393
+       return anticoagulant
394
+     },
395
+     getAnticoagulantShouji(id){
396
+       var shouji = ""
397
+       for(let i=0;i<this.prescriptionList.length;i++){
398
+         if(this.prescriptionList[i].patient_id == id){
399
+            shouji = this.prescriptionList[i].anticoagulant_shouji
400
+          }
401
+        } 
402
+       return shouji
403
+     },
404
+     getAnticoagulantWeichi(id){
405
+        var weichi = ""
406
+        for(let i=0;i<this.prescriptionList.length;i++){
407
+         if(this.prescriptionList[i].patient_id == id){
408
+            weichi = this.prescriptionList[i].anticoagulant_weichi
409
+        } 
410
+       return weichi
411
+      }
412
+     },
413
+     getAnticoagulantZongliang(id){
414
+       var zongliang = ""
415
+       for(let i=0;i<this.prescriptionList.length;i++){
416
+         if(this.prescriptionList[i].patient_id == id){
417
+            zongliang = this.prescriptionList[i].anticoagulant_zongliang
418
+          }
419
+        } 
420
+       return zongliang
421
+     }
306 422
     }
307 423
 }
308 424
 </script>