XMLWAN пре 4 година
родитељ
комит
b6147762bd

+ 39 - 3
src/api/consumable.js Прегледај датотеку

24
 
24
 
25
 
25
 
26
 export function getDialysisBatchParameters(sch_ids){
26
 export function getDialysisBatchParameters(sch_ids){
27
-  
27
+
28
   return request({
28
   return request({
29
     url:"/api/dialysis/getdialysisbatchparameters",
29
     url:"/api/dialysis/getdialysisbatchparameters",
30
     method:"get",
30
     method:"get",
35
 }
35
 }
36
 
36
 
37
 export function getWareHouseOutList(params){
37
 export function getWareHouseOutList(params){
38
-  
39
   return request({
38
   return request({
40
     url:"/api/dialysis/getwarehouseoutlist",
39
     url:"/api/dialysis/getwarehouseoutlist",
41
     method:"get",
40
     method:"get",
42
     params:params
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 Прегледај датотеку

102
         noCache: true
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
       path: '/dialysis/record/:id',
117
       path: '/dialysis/record/:id',
107
       component: () => import('@/xt_pages/dialysis/dialysisPage'),
118
       component: () => import('@/xt_pages/dialysis/dialysisPage'),

+ 141 - 0
src/xt_pages/dialysis/allSummaryDialog_print.vue Прегледај датотеку

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 Прегледај датотеку

12
             <div id="print_content">
12
             <div id="print_content">
13
                 <div class="print_main_content">
13
                 <div class="print_main_content">
14
                     <div class="order_title_panl">
14
                     <div class="order_title_panl">
15
-                        <span class="main_title">透前准备汇总统计表</span>
15
+                        <span class="main_title">汇总统计表</span>
16
                     </div>
16
                     </div>
17
                     <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
17
                     <div style="display:flex;justify-content: space-between;margin-bottom:10px;">
18
-                        <p>统计时间:2020.8.19-2020.8.20</p>
19
-                        <p>印单日期:2020.8.20</p>
18
+                        <p>印单日期:{{print_date}}</p>
20
                     </div>
19
                     </div>
21
                     <div class="table_panel">
20
                     <div class="table_panel">
22
                         <table class="table">
21
                         <table class="table">
23
                             <thead>
22
                             <thead>
24
                                 <tr>
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
                                 </tr>
32
                                 </tr>
29
                             </thead>
33
                             </thead>
30
                             <tbody>
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
                                 </tr>
93
                                 </tr>
36
                             </tbody>
94
                             </tbody>
37
                         </table>
95
                         </table>
45
 <script>
103
 <script>
46
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
104
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
47
 import print from 'print-js'
105
 import print from 'print-js'
106
+import {getBatchCollection,getAllMaterial} from "@/api/consumable"
107
+const moment = require('moment')
48
 export default {
108
 export default {
49
     components:{
109
     components:{
50
         BreadCrumb
110
         BreadCrumb
55
                 { path: false, name: '耗材药品' },
115
                 { path: false, name: '耗材药品' },
56
                 { path: false, name: '汇总打印' }
116
                 { path: false, name: '汇总打印' }
57
             ],
117
             ],
118
+            tableName:[],
119
+            consuMables:[],
120
+            tableData:[],
121
+            print_date:""
58
         }
122
         }
59
     },
123
     },
60
     methods:{
124
     methods:{
68
             style: style,
132
             style: style,
69
             scanStyles: false
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
 </script>
187
 </script>

+ 206 - 65
src/xt_pages/dialysis/components/allSummary.vue Прегледај датотеку

5
         <div class="time">
5
         <div class="time">
6
           <ul class>
6
           <ul class>
7
             <li
7
             <li
8
-              :class="item.value == schedulType ? 'active' : ''"
8
+              :class="item.value == scheduleType ? 'active' : ''"
9
               @click="selectSchedulType(item.value)"
9
               @click="selectSchedulType(item.value)"
10
               v-for="item in schedulArr"
10
               v-for="item in schedulArr"
11
               :key="item.value"
11
               :key="item.value"
37
           </div>
37
           </div>
38
         </div>
38
         </div>
39
         <div>
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
             <el-button size="small" type="primary" @click="statistics">统计表</el-button>
41
             <el-button size="small" type="primary" @click="statistics">统计表</el-button>
42
         </div>
42
         </div>
43
       </div>
43
       </div>
44
       <div>
44
       <div>
45
           <el-table
45
           <el-table
46
             :data="tableData"
46
             :data="tableData"
47
-            height="350"
47
+            height="500px"
48
             border
48
             border
49
-            style="width: 100%">
49
+            style="width: 100%"
50
+            @selection-change="handleSelectionChange">
51
+            >
50
             <el-table-column  align="center" type="selection" width="55">
52
             <el-table-column  align="center" type="selection" width="55">
51
             </el-table-column>
53
             </el-table-column>
52
             <el-table-column align="center" prop="name" label="姓名" width="180">
54
             <el-table-column align="center" prop="name" label="姓名" width="180">
55
+               <template slot-scope="scope">
56
+                   {{scope.row.patient.name}}
57
+               </template>
53
             </el-table-column>
58
             </el-table-column>
54
             <el-table-column align="center" prop="address" label="透析模式">
59
             <el-table-column align="center" prop="address" label="透析模式">
60
+              <template slot-scope="scope">
61
+                 {{scope.row.treatment_mode.name}}
62
+              </template>
55
             </el-table-column>
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
             </el-table-column>
68
             </el-table-column>
58
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
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
             </el-table-column>
120
             </el-table-column>
60
         </el-table>
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
       </div>
133
       </div>
62
 
134
 
63
       <all-summary-dialog ref="allSummary"></all-summary-dialog >
135
       <all-summary-dialog ref="allSummary"></all-summary-dialog >
68
 <script>
140
 <script>
69
 import { GetAllZone } from "@/api/dialysis";
141
 import { GetAllZone } from "@/api/dialysis";
70
 import allSummaryDialog from './allSummaryDialog'
142
 import allSummaryDialog from './allSummaryDialog'
143
+import { getAllMaterial,getCollectList } from "@/api/consumable"
144
+import { parseTime } from "@/utils";
71
 export default {
145
 export default {
72
     components:{
146
     components:{
73
         allSummaryDialog
147
         allSummaryDialog
74
     },
148
     },
75
     data(){
149
     data(){
76
         return{
150
         return{
77
-            schedulType: 0,
151
+            scheduleType: 0,
78
             schedulArr: [
152
             schedulArr: [
79
                 { value: 0, label: "全部" },
153
                 { value: 0, label: "全部" },
80
                 { value: 1, label: "上午" },
154
                 { value: 1, label: "上午" },
81
                 { value: 2, label: "下午" },
155
                 { value: 2, label: "下午" },
82
                 { value: 3, label: "晚上" }
156
                 { value: 3, label: "晚上" }
83
             ],
157
             ],
84
-            selected_date:new Date(),
158
+            selected_date:"",
85
             partitionArr:[],
159
             partitionArr:[],
86
             partitionType: 0,
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
     created(){
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
     methods:{
181
     methods:{
143
         selectSchedulType(scheduleType) {
182
         selectSchedulType(scheduleType) {
144
-            this.schedulType = scheduleType;
183
+            this.scheduleType = scheduleType;
184
+            this.getlist()
145
         },
185
         },
146
         selectPartitionType(partitionType) {
186
         selectPartitionType(partitionType) {
147
             this.partitionType = partitionType;
187
             this.partitionType = partitionType;
188
+            this.getlist()
148
         },
189
         },
149
         getAllZone: function() {
190
         getAllZone: function() {
150
             GetAllZone().then(response => {
191
             GetAllZone().then(response => {
161
             this.$refs.allSummary.show();
202
             this.$refs.allSummary.show();
162
         },
203
         },
163
         handleScheduleDateChange(){
204
         handleScheduleDateChange(){
164
-
205
+          var startime = parseTime(this.selected_date,'{y}-{m}-{d}')
206
+          this.start_time = startime
207
+          this.getlist()
165
         },
208
         },
166
         search(){
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
         getAllMaterial(){
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
            const params = {
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
 </script>
322
 </script>

+ 45 - 65
src/xt_pages/dialysis/components/allSummaryDialog.vue Прегледај датотеку

7
     >
7
     >
8
     <div>
8
     <div>
9
         <el-date-picker
9
         <el-date-picker
10
-        style="width:140px;margin-right:10px"
10
+        style="width:150px;margin-right:10px"
11
         v-model="startTime"
11
         v-model="startTime"
12
         type="date"
12
         type="date"
13
         placeholder="选择日期">
13
         placeholder="选择日期">
14
         </el-date-picker>
14
         </el-date-picker>
15
         <el-date-picker
15
         <el-date-picker
16
-        style="width:140px;margin-right:10px"
16
+        style="width:150px;margin-right:10px"
17
         v-model="endTime"
17
         v-model="endTime"
18
         type="date"
18
         type="date"
19
         placeholder="选择日期">
19
         placeholder="选择日期">
20
         </el-date-picker>
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
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
21
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
38
         
22
         
39
     </div>
23
     </div>
40
     <div style="margin-top:10px;">
24
     <div style="margin-top:10px;">
41
         <el-table :data="tableData" border style="width: 100%" height="300">
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
40
             </el-table-column>
59
         </el-table>
41
         </el-table>
60
     </div>
42
     </div>
68
 
50
 
69
 
51
 
70
 <script>
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
 export default {
56
 export default {
73
     data(){
57
     data(){
74
         return{
58
         return{
75
             visible: false,
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
             schedulArr: [
62
             schedulArr: [
79
                 {value: 0, label: '全部班'},
63
                 {value: 0, label: '全部班'},
80
                 {value: 1, label: '上午'},
64
                 {value: 1, label: '上午'},
84
             schedulType: 0,
68
             schedulType: 0,
85
             partitionArr:[],
69
             partitionArr:[],
86
             partitionType: 0,
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
     created(){
74
     created(){
107
-        this.getAllZone()
75
+      //获取统计表数据
76
+      this.getlist()   
108
     },
77
     },
109
     methods:{
78
     methods:{
110
         _close: function(done) {
79
         _close: function(done) {
113
         show() {
82
         show() {
114
             this.visible = true;
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
         toPrint(){
85
         toPrint(){
128
             this.$router.push({
86
             this.$router.push({
129
-                path: '/dialysis/allSummary_print',
87
+                path: '/dialysis/allsummarydialog_print',
130
                 // query: { date: date }
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 Прегледај датотеку

50
             @selection-change="handleSelectionChange">
50
             @selection-change="handleSelectionChange">
51
             <el-table-column align="center" type="selection" width="55">
51
             <el-table-column align="center" type="selection" width="55">
52
             </el-table-column>
52
             </el-table-column>
53
-            <el-table-column align="center"  label="姓名" width="80">
53
+            <el-table-column align="center" fixed  label="姓名" width="80">
54
                <template slot-scope="scope">
54
                <template slot-scope="scope">
55
                    {{scope.row.patient.name?scope.row.patient.name:""}}
55
                    {{scope.row.patient.name?scope.row.patient.name:""}}
56
                </template>
56
                </template>
62
             </el-table-column>
62
             </el-table-column>
63
             <el-table-column align="center" label="上次透后体重(kg)" width="280">
63
             <el-table-column align="center" label="上次透后体重(kg)" width="280">
64
                 <template slot-scope="scope">
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
                 </template>
66
                 </template>
67
             </el-table-column>
67
             </el-table-column>
68
             <el-table-column align="center" label="透前体重(kg)" width="120">
68
             <el-table-column align="center" label="透前体重(kg)" width="120">
69
                <template slot-scope="scope">
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
                </template>
71
                </template>
72
             </el-table-column>
72
             </el-table-column>
73
             <el-table-column align="center" label="干体重(kg)" width="140">
73
             <el-table-column align="center" label="干体重(kg)" width="140">
74
                <template slot-scope="scope">
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
                </template>
76
                </template>
77
             </el-table-column>
77
             </el-table-column>
78
             <el-table-column align="center" label="透前血压(mmhg)" width="180">
78
             <el-table-column align="center" label="透前血压(mmhg)" width="180">
79
               <template slot-scope="scope">
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
               </template>
81
               </template>
82
             </el-table-column>
82
             </el-table-column>
83
             <el-table-column align="center" label="目标超滤量" width="120">
83
             <el-table-column align="center" label="目标超滤量" width="120">
84
                <template slot-scope="scope">
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
                </template>
86
                </template>
87
             </el-table-column>
87
             </el-table-column>
88
             <el-table-column align="center" label="血流量(ml/min)" width="180">
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
                </template>
91
                </template>
92
             </el-table-column>
92
             </el-table-column>
93
              <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)" width="220">
93
              <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)" width="220">
94
                 <template slot-scope="scope">
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
                     <span>
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
                     </span>
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
                     </span>
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
                     </span>
144
                     </span>
143
                 </template>
145
                 </template>
144
             </el-table-column>
146
             </el-table-column>
145
              <el-table-column align="center" label="透析器/灌流器" width="200">
147
              <el-table-column align="center" label="透析器/灌流器" width="200">
146
                <template slot-scope="scope">
148
                <template slot-scope="scope">
147
-                 {{scope.row.prescription.dialyzer_perfusion_apparatus}}
149
+                 {{getDialyzerPerfusionApparatus(scope.row.patient_id)?getDialyzerPerfusionApparatus(scope.row.patient_id):""}}
148
                </template>
150
                </template>
149
             </el-table-column>
151
             </el-table-column>
150
         </el-table>
152
         </el-table>
171
 import consumablesDialog from './consumablesDialog'
173
 import consumablesDialog from './consumablesDialog'
172
 import { parseTime } from "@/utils";
174
 import { parseTime } from "@/utils";
173
 import { getDialysisParameters } from "@/api/consumable"
175
 import { getDialysisParameters } from "@/api/consumable"
176
+const moment = require('moment')
174
 export default {
177
 export default {
175
     components:{
178
     components:{
176
         consumablesDialog
179
         consumablesDialog
184
                 { value: 2, label: "下午" },
187
                 { value: 2, label: "下午" },
185
                 { value: 3, label: "晚上" }
188
                 { value: 3, label: "晚上" }
186
             ],
189
             ],
187
-            selected_date:new Date(),
190
+            // selected_date:new Date(),
191
+            selected_date:"",
188
             partitionArr:[],
192
             partitionArr:[],
189
             partitionType: 0,
193
             partitionType: 0,
190
             tableData: [],
194
             tableData: [],
194
             total:0,
198
             total:0,
195
             start_time:0,
199
             start_time:0,
196
             selecting_schs: [],
200
             selecting_schs: [],
197
-            start_time:0
198
-            
201
+            start_time:0,
202
+            prescriptionList:[],
203
+            dialysisBefor:[]
199
         }
204
         }
200
     },
205
     },
201
     created(){
206
     created(){
228
             this.$refs.consumables.show();
233
             this.$refs.consumables.show();
229
         },
234
         },
230
         search(){
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
             const params ={
242
             const params ={
233
               start_time:this.start_time,
243
               start_time:this.start_time,
234
               keyword:this.search_input,
244
               keyword:this.search_input,
235
               scheduleType: this.scheduleType,
245
               scheduleType: this.scheduleType,
236
               partitionType:this.partitionType,
246
               partitionType:this.partitionType,
237
               limit:this.limit,
247
               limit:this.limit,
238
-              page:this.page 
248
+              page:this.page
239
             }
249
             }
240
           getDialysisParameters(params).then(response=>{
250
           getDialysisParameters(params).then(response=>{
241
              if(response.data.state == 1){
251
              if(response.data.state == 1){
243
                 console.log("schedule",schedule)
253
                 console.log("schedule",schedule)
244
                 this.tableData = schedule
254
                 this.tableData = schedule
245
                 var total = response.data.data.total
255
                 var total = response.data.data.total
246
-                console.log("total",total)
256
+               
247
                 this.total = total
257
                 this.total = total
248
              }
258
              }
249
           })
259
           })
258
           return new Date(time).getTime() / 1000;
268
           return new Date(time).getTime() / 1000;
259
          },
269
          },
260
         getlist(){
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
             const params ={
277
             const params ={
264
               start_time:this.start_time,
278
               start_time:this.start_time,
265
               keyword:this.search_input,
279
               keyword:this.search_input,
266
               scheduleType: this.scheduleType,
280
               scheduleType: this.scheduleType,
267
               partitionType:this.partitionType,
281
               partitionType:this.partitionType,
268
               limit:this.limit,
282
               limit:this.limit,
269
-              page:this.page 
283
+              page:this.page
270
             }
284
             }
271
-          
272
           getDialysisParameters(params).then(response=>{
285
           getDialysisParameters(params).then(response=>{
273
              if(response.data.state == 1){
286
              if(response.data.state == 1){
274
                 var schedule = response.data.data.schedule
287
                 var schedule = response.data.data.schedule
275
                 console.log("schedule",schedule)
288
                 console.log("schedule",schedule)
276
                 this.tableData = schedule
289
                 this.tableData = schedule
277
                 var total = response.data.data.total
290
                 var total = response.data.data.total
278
-                console.log("total",total)
279
                 this.total = total
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
        this.page = val;
320
        this.page = val;
304
        this.getlist()
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
 </script>
424
 </script>