Browse Source

耗材参数

XMLWAN 4 years ago
parent
commit
ac9e9893ac

+ 9 - 0
src/api/consumable.js View File

@@ -77,3 +77,12 @@ export function getGatherList(params){
77 77
     params:params
78 78
   })
79 79
 }
80
+
81
+export function GetAnticoagulantCount(params){
82
+  console.log("params22222",params)
83
+  return request({
84
+    url:"/api/dialysis/getanticoagulantcount",
85
+    method:"get",
86
+    params:params
87
+  })
88
+}

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

@@ -123,6 +123,12 @@ export default {
123 123
         noCache: true
124 124
       }
125 125
     },
126
+    {
127
+      path:'/dialysis/dialysisdrugs_print',
128
+      component:()=>import('@/xt_pages/dialysis/dialysisDrugs_print'),
129
+      hidden:true,
130
+      is_menu:false
131
+    },
126 132
     {
127 133
       path: '/dialysis/record/:id',
128 134
       component: () => import('@/xt_pages/dialysis/dialysisPage'),

+ 65 - 7
src/xt_pages/dialysis/allSummaryDialog_print.vue View File

@@ -12,24 +12,41 @@
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>统计时间:{{start_time}}-{{end_time}}</p>
19
+                        <p>印单日期:{{print_date}}</p>
20 20
                     </div>
21 21
                     <div class="table_panel">
22 22
                         <table class="table">
23 23
                             <thead>
24 24
                                 <tr>
25
-                                    <td>药品名称</td>
25
+                                    <td width="120">商品类型</td>
26
+                                    <td width="120">规格名称</td>
26 27
                                     <td width="120">数量</td>
27 28
                                 </tr>
28 29
                             </thead>
29 30
                             <tbody>
30
-                                <tr v-for='item in 6'>
31
-                                    <td>张三</td>
32
-                                    <td>张三</td>
31
+                                <tr v-for='(item,index) in tableData' :key="index">
32
+                                    <td>
33
+                                      <span v-if="item.stage == 1">{{item.type_name}}</span>
34
+                                      <span v-if="item.stage == 2">抗凝剂</span>
35
+                                    </td>
36
+                                    <td>
37
+                                       <span v-if="item.stage == 1">{{item.specification_name}}</span>
38
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 1">无肝素</span>
39
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 2">普通肝素</span>
40
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 3">低分子肝素</span>
41
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 4">阿加曲班</span>
42
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 5">枸橼酸钠</span>
43
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 6">低分子肝素钙</span>
44
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 7">低分子肝素钠</span>
45
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 8">依诺肝素</span>
46
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 9">达肝素</span>
47
+                                      <span v-if="item.stage == 2 && item.anticoagulant == 10">体外抗凝</span>
48
+                                    </td>
49
+                                    <td>{{item.count}}</td>
33 50
                                 </tr>
34 51
                             </tbody>
35 52
                         </table>
@@ -43,6 +60,8 @@
43 60
 <script>
44 61
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
45 62
 import print from 'print-js'
63
+import {getGatherList} from "@/api/consumable"
64
+const moment = require('moment')
46 65
 export default {
47 66
     components:{
48 67
         BreadCrumb
@@ -53,6 +72,10 @@ export default {
53 72
                 { path: false, name: '耗材药品' },
54 73
                 { path: false, name: '药品打印' }
55 74
             ],
75
+            tableData:[],
76
+            start_time:"",
77
+            end_time:"",
78
+            print_date:"",
56 79
         }
57 80
     },
58 81
     methods:{
@@ -66,7 +89,42 @@ export default {
66 89
             style: style,
67 90
             scanStyles: false
68 91
             })
92
+        },
93
+        getlist(startime,endtime){
94
+            const params = {
95
+              start_time:startime,
96
+              end_time:endtime
97
+            }
98
+           getGatherList(params).then(response=>{
99
+             if(response.data.state == 1){
100
+                var arr = []
101
+                var warehouselist = response.data.data.warehouselist
102
+                for(let i=0;i<warehouselist.length;i++){
103
+                  warehouselist[i].stage = 1
104
+                }
105
+              console.log("warehouselist",warehouselist)
106
+                arr.push(...warehouselist)
107
+                var consumables =  response.data.data.consumables
108
+
109
+                var count = response.data.data.count
110
+                for(let j=0;j<count.length;j++){
111
+                  count[j].stage = 2
112
+                }
113
+              arr.push(...count)
114
+              console.log("arr344444",arr)
115
+              this.tableData = arr
116
+             }
117
+           })   
69 118
         }
119
+    },
120
+    created(){
121
+       var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
122
+      this.print_date = startime
123
+      var startime =  this.$route.query.startime
124
+      this.start_time = startime
125
+      var endtime =  this.$route.query.endtime
126
+      this.end_time = endtime
127
+      this.getlist(startime,endtime)
70 128
     }
71 129
 }
72 130
 </script>

+ 176 - 10
src/xt_pages/dialysis/components/allSummary.vue View File

@@ -37,13 +37,13 @@
37 37
           </div>
38 38
         </div>
39 39
         <div>
40
-            <el-button size="small" icon="el-icon-printer" type="primary" @click="toPrint">打印</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
-            :data="tableData"
46
+            :data="list"
47 47
             border
48 48
             style="width: 100%"
49 49
             :row-style="{ color: '#303133' }"
@@ -57,17 +57,37 @@
57 57
             </el-table-column>
58 58
             <el-table-column align="center" prop="name" label="姓名" width="180">
59 59
                <template slot-scope="scope">
60
-                   {{scope.row.patient.name}}
60
+                   <!-- {{scope.row.patient.name}} -->
61
+                    {{scope.row.patient_name}}
61 62
                </template>
62 63
             </el-table-column>
63 64
             <el-table-column align="center" prop="address" label="透析模式">
64 65
               <template slot-scope="scope">
65
-                 {{scope.row.treatment_mode.name}}
66
+                 <!-- {{scope.row.mode_id}} -->
67
+                 <span v-if="scope.row.mode_id == 1">HD</span>
68
+                <span v-if="scope.row.mode_id == 2">HDF</span>
69
+                <span v-if="scope.row.mode_id == 3">HD+HP</span>
70
+                <span v-if="scope.row.mode_id == 4">HP</span>
71
+                <span v-if="scope.row.mode_id == 5">HF</span>
72
+                <span v-if="scope.row.mode_id == 6">SCUF</span>
73
+                <span v-if="scope.row.mode_id == 7">IUF</span>
74
+                <span v-if="scope.row.mode_id == 8">HFHD</span>
75
+                <span v-if="scope.row.mode_id == 9">HFHD+HP</span>
76
+                <span v-if="scope.row.mode_id == 10">PHF</span>
77
+                <span v-if="scope.row.mode_id == 11">HFR</span>
78
+                <span v-if="scope.row.mode_id == 12">HDF+HP</span>
79
+                <span v-if="scope.row.mode_id == 13">CRRT</span>
80
+                <span v-if="scope.row.mode_id == 14">腹水回输</span>
81
+                <span v-if="scope.row.mode_id == 15">HD前置换</span>
82
+                <span v-if="scope.row.mode_id == 16">HD后置换</span>
83
+                <span v-if="scope.row.mode_id == 17">HDF前置换</span>
84
+                <span v-if="scope.row.mode_id == 18"> HDF后置换</span> 
66 85
               </template>
67 86
             </el-table-column>
68 87
             <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
69 88
                <template slot-scope="scope"> 
70
-                   {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}}
89
+                   <!-- {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}} -->
90
+                     {{scope.row.good_type[index].name}}
71 91
                </template>
72 92
             </el-table-column>
73 93
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
@@ -175,7 +195,11 @@ export default {
175 195
             total:0,
176 196
             selecting_schs: [],
177 197
             prescriptionList:[],
178
-            reduceList:[]
198
+            reduceList:[],
199
+            allGoodInfo:[],
200
+            list:[],
201
+            new_list:[],
202
+            good_types: [],
179 203
         }
180 204
     },
181 205
     created(){
@@ -215,7 +239,7 @@ export default {
215 239
           this.getlist()
216 240
           this.getAllMaterial()
217 241
         },
218
-        search(){
242
+           search(){
219 243
            if(this.selected_date==""){
220 244
               this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
221 245
             }
@@ -242,9 +266,68 @@ export default {
242 266
                this.prescriptionList = prescription
243 267
                var reducelist =  response.data.data.reducelist
244 268
                this.reduceList = reducelist
269
+              var good_type = response.data.data.good_type
270
+               console.log("godd_type",good_type)
271
+              this.tableName = good_type
272
+              this.allGoodInfo = response.data.data.dialysis_goods
273
+              console.log("1111111",response.data.data.dialysis_goods)
274
+              this.list = []
275
+              this.good_types = []
276
+              this.allGoodInfo = []
277
+              this.good_types.push("姓名")
278
+           
279
+             for (let a = 0; a <  response.data.data.good_type.length; a++){
280
+                this.good_types.push(response.data.data.good_type[a].type_name)
281
+              }
282
+             for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
283
+              let arr =[]
284
+              // let obj = {
285
+              //   id:0,
286
+              //   name:  response.data.data.dialysis_goods[i].patient.name,
287
+
288
+              // }
289
+              // arr.push(obj)
290
+              // console.log("arr=========",arr)
291
+              for (let a = 0; a <  response.data.data.good_type.length; a++){
292
+                let obj = {
293
+                  id:response.data.data.good_type[a].id,
294
+                  name:""
295
+
296
+                }
297
+                arr.push(obj)
298
+              }
299
+
300
+
301
+             console.log("2222222",arr)
302
+            
303
+
304
+              let newObj = {
305
+                "patient_id":response.data.data.dialysis_goods[i].patient_id,
306
+                "patient_name":response.data.data.dialysis_goods[i].patient.name,
307
+                "mode_id":response.data.data.dialysis_goods[i].mode_id,
308
+                "good_type":arr,
309
+                "good_user":response.data.data.dialysis_goods[i].good_user,
310
+                "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
311
+                "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
312
+                "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
313
+              }
314
+             
315
+              this.list.push(newObj)
316
+              }
317
+              
318
+            for (let a = 0; a <  this.list.length; a++){
319
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
320
+                if(this.list[a].good_type[b].id > 0){
321
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
322
+                }
323
+
324
+              }
325
+              }
326
+              console.log("list22222",this.list)
245 327
              }
246 328
           })
247 329
         },
330
+
248 331
         getAllMaterial(){
249 332
           if(this.selected_date==""){
250 333
               this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
@@ -258,8 +341,8 @@ export default {
258 341
           getAllMaterial(params).then(response=>{
259 342
              if(response.data.state == 1){
260 343
                var material =  response.data.data.material
261
-               console.log("material",material)
262
-               this.tableName = material
344
+              //  console.log("material",material)
345
+              //  this.tableName = material
263 346
              }
264 347
           })
265 348
         },
@@ -298,6 +381,64 @@ export default {
298 381
                this.prescriptionList = prescription
299 382
                var reducelist =  response.data.data.reducelist          
300 383
                this.reduceList = reducelist
384
+                var good_type = response.data.data.good_type
385
+               console.log("godd_type",good_type)
386
+              this.tableName = good_type
387
+              this.allGoodInfo = response.data.data.dialysis_goods
388
+              console.log("1111111",response.data.data.dialysis_goods)
389
+              this.list = []
390
+              this.good_types = []
391
+              this.allGoodInfo = []
392
+              this.good_types.push("姓名")
393
+           
394
+             for (let a = 0; a <  response.data.data.good_type.length; a++){
395
+                this.good_types.push(response.data.data.good_type[a].type_name)
396
+              }
397
+             for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
398
+              let arr =[]
399
+              // let obj = {
400
+              //   id:0,
401
+              //   name:  response.data.data.dialysis_goods[i].patient.name,
402
+
403
+              // }
404
+              // arr.push(obj)
405
+              // console.log("arr=========",arr)
406
+              for (let a = 0; a <  response.data.data.good_type.length; a++){
407
+                let obj = {
408
+                  id:response.data.data.good_type[a].id,
409
+                  name:""
410
+
411
+                }
412
+                arr.push(obj)
413
+              }
414
+
415
+
416
+             console.log("2222222",arr)
417
+            
418
+
419
+              let newObj = {
420
+                "patient_id":response.data.data.dialysis_goods[i].patient_id,
421
+                "patient_name":response.data.data.dialysis_goods[i].patient.name,
422
+                "mode_id":response.data.data.dialysis_goods[i].mode_id,
423
+                "good_type":arr,
424
+                "good_user":response.data.data.dialysis_goods[i].good_user,
425
+                "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
426
+                "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
427
+                "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
428
+              }
429
+             
430
+              this.list.push(newObj)
431
+              }
432
+              
433
+            for (let a = 0; a <  this.list.length; a++){
434
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
435
+                if(this.list[a].good_type[b].id > 0){
436
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
437
+                }
438
+
439
+              }
440
+              }
441
+              console.log("list22222",this.list) 
301 442
              }
302 443
           })
303 444
         },
@@ -360,7 +501,32 @@ export default {
360 501
           }
361 502
         } 
362 503
        return zongliang
363
-     }
504
+     },
505
+      getGoodUserInfo(good_type_id,good_user,last_good_user) {
506
+        if (good_user != null && good_user.length > 0) {
507
+          let desc = ""
508
+          for (let b = 0; b < good_user.length; b++){
509
+            if(good_type_id == good_user[b].good_type_id)
510
+              desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
511
+          }
512
+         
513
+
514
+          return desc
515
+        } else if (good_user != null && good_user.length <= 0) {
516
+          if (last_good_user != null && last_good_user.length > 0) {
517
+            let desc = ""
518
+            for (let b = 0; b < last_good_user.length; b++){
519
+              if(good_type_id == last_good_user[b].good_type_id)
520
+                desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
521
+            }
522
+          
523
+
524
+            return desc
525
+
526
+          }
527
+          return ""
528
+        }
529
+      },
364 530
     }
365 531
 }
366 532
 </script>

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

@@ -110,7 +110,7 @@ export default {
110 110
         },
111 111
         toPrint(){
112 112
             this.$router.push({
113
-                path: '/dialysis/allsummarydialog_print',
113
+                path: '/dialysis/allsummarydialog_print?startime='+this.start_time+"&endtime="+this.end_time,
114 114
                 // query: { date: date }
115 115
             })
116 116
         },

+ 1 - 0
src/xt_pages/dialysis/components/dialysisDrugs.vue View File

@@ -140,6 +140,7 @@ export default {
140 140
     },
141 141
     created(){
142 142
         this.getAllZone()
143
+        
143 144
     },
144 145
     methods:{
145 146
         selectSchedulType(scheduleType) {

+ 6 - 3
src/xt_pages/dialysis/components/dialysisParameters.vue View File

@@ -167,7 +167,8 @@
167 167
       ></el-pagination>
168 168
       </div>
169 169
 
170
-      <consumables-dialog ref="consumables"></consumables-dialog>
170
+      <!-- <consumables-dialog ref="consumables"></consumables-dialog> -->
171
+      <dialysisParameters-dialog ref="dialysisParameters"></dialysisParameters-dialog>
171 172
     </div>
172 173
 </template>
173 174
 
@@ -175,12 +176,14 @@
175 176
 <script>
176 177
 import { GetAllZone } from "@/api/dialysis";
177 178
 import consumablesDialog from './consumablesDialog'
179
+import dialysisParametersDialog from './dialysisParametersDialog'
178 180
 import { parseTime } from "@/utils";
179 181
 import { getDialysisParameters } from "@/api/consumable"
180 182
 const moment = require('moment')
181 183
 export default {
182 184
     components:{
183
-        consumablesDialog
185
+        consumablesDialog,
186
+        dialysisParametersDialog
184 187
     },
185 188
     data(){
186 189
         return{
@@ -234,7 +237,7 @@ export default {
234 237
             });
235 238
         },
236 239
         statistics(){
237
-            this.$refs.consumables.show();
240
+            this.$refs.dialysisParameters.show();
238 241
         },
239 242
         search(){
240 243
             if(this.selected_date==""){

+ 56 - 35
src/xt_pages/dialysis/components/dialysisParametersDialog.vue View File

@@ -10,7 +10,8 @@
10 10
         style="width:140px;margin-right:10px"
11 11
         v-model="startTime"
12 12
         type="date"
13
-        placeholder="选择日期">
13
+        placeholder="选择日期"
14
+        @change="selectStartime">
14 15
         </el-date-picker>
15 16
         <el-date-picker
16 17
         style="width:140px;margin-right:10px"
@@ -18,43 +19,33 @@
18 19
         type="date"
19 20
         placeholder="选择日期">
20 21
         </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 22
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
38 23
 
39 24
     </div>
40 25
     <div style="margin-top:10px;">
41 26
         <el-table :data="tableData" border style="width: 100%" height="300">
42
-            <el-table-column
43
-            align="center"
44
-            prop="address"
45
-            label="商品类型">
27
+            <el-table-column align="center" prop="address" label="商品类型">
28
+                <template slot-scope="scope">
29
+                   抗凝剂
30
+                </template>
46 31
             </el-table-column>
47
-            <el-table-column
48
-            align="center"
49
-            prop="name"
50
-            label="规格名称"
51
-            >
32
+            <el-table-column align="center" prop="name" label="规格名称"> 
33
+                <template slot-scope="scope">
34
+                   <span v-if="scope.row.anticoagulant==1">无肝素</span>
35
+                   <span v-if="scope.row.anticoagulant==2">普通肝素</span>
36
+                   <span v-if="scope.row.anticoagulant==4">阿加曲班</span>
37
+                   <span v-if="scope.row.anticoagulant==5">枸橼酸钠</span>
38
+                   <span v-if="scope.row.anticoagulant==6">低分子肝素钙</span>
39
+                   <span v-if="scope.row.anticoagulant==7">低分子肝素钠</span>
40
+                   <span v-if="scope.row.anticoagulant==8">依诺肝素</span>
41
+                   <span v-if="scope.row.anticoagulant==9">达肝素</span>
42
+                   <span v-if="scope.row.anticoagulant==10">体外抗凝</span>
43
+                </template>
52 44
             </el-table-column>
53
-            <el-table-column
54
-            align="center"
55
-            prop="name"
56
-            label="数量"
57
-            >
45
+            <el-table-column align="center" prop="name"label="数量">
46
+              <template slot-scope="scope">
47
+                 {{scope.row.count}}
48
+              </template>
58 49
             </el-table-column>
59 50
         </el-table>
60 51
     </div>
@@ -68,13 +59,16 @@
68 59
 
69 60
 
70 61
 <script>
62
+const moment = require('moment')
63
+import { parseTime } from '@/utils'
71 64
 import { GetAllZone } from "@/api/dialysis";
65
+import { GetAnticoagulantCount} from "@/api/consumable"
72 66
 export default {
73 67
     data(){
74 68
         return{
75 69
             visible: false,
76
-            startTime:'',
77
-            endTime:'',
70
+            startTime:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
71
+            endTime:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
78 72
             schedulArr: [
79 73
                 {value: 0, label: '全部班'},
80 74
                 {value: 1, label: '上午'},
@@ -84,11 +78,16 @@ export default {
84 78
             schedulType: 0,
85 79
             partitionArr:[],
86 80
             partitionType: 0,
87
-            tableData: []
81
+            tableData: [],
82
+            query:{
83
+             start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
84
+             end_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD')
85
+          },
88 86
         }
89 87
     },
90 88
     created(){
91 89
         this.getAllZone()
90
+        this.getlist()
92 91
     },
93 92
     methods:{
94 93
         _close: function(done) {
@@ -110,9 +109,31 @@ export default {
110 109
         },
111 110
         toPrint(){
112 111
             this.$router.push({
113
-                path: '/dialysis/dialysisParameters_print',
112
+                // path: '/dialysis/dialysisParameters_print',
114 113
                 // query: { date: date }
114
+                path:"/dialysis/dialysisdrugs_print?startime="+this.query.start_time+"&endtime="+this.query.end_time
115 115
             })
116
+        },
117
+       selectStartime() {
118
+        this.start_time = parseTime(this.startTime, '{y}-{m}-{d}')
119
+        this.query.start_time = parseTime(this.startTime, '{y}-{m}-{d}')
120
+        this.getlist()
121
+
122
+      },
123
+      selectEndtime() {
124
+        this.end_time = parseTime(this.endTime, '{y}-{m}-{d}')
125
+        this.query.end_time = parseTime(this.endTime, '{y}-{m}-{d}')
126
+        this.getlist()
127
+
128
+      },
129
+        getlist(){
130
+          GetAnticoagulantCount(this.query).then(response=>{
131
+             if(response.data.state == 1){
132
+               var count =  response.data.data.count
133
+               console.log("count22222",count)
134
+               this.tableData = count
135
+             }
136
+          })  
116 137
         }
117 138
     }
118 139
 }

+ 50 - 8
src/xt_pages/dialysis/dialysisDrugs_print.vue View File

@@ -12,24 +12,38 @@
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>统计时间:{{start_time}}-{{end_time}}</p>
19
+                        <p>印单日期:{{print_time}}</p>
20 20
                     </div>
21 21
                     <div class="table_panel">
22 22
                         <table class="table">
23 23
                             <thead>
24 24
                                 <tr>
25
-                                    <td>药品名称</td>
26
-                                    <td width="120">数量</td>
25
+                                    <td width="120">商品类型</td>
26
+                                    <td width="120">规格名称</td>
27
+                                     <td width="120">数量</td>
27 28
                                 </tr>
28 29
                             </thead>
29 30
                             <tbody>
30
-                                <tr v-for='item in 6'>
31
-                                    <td>张三</td>
32
-                                    <td>张三</td>
31
+                                <tr v-for='(item,index) in tableData' :key="index">
32
+                                    <td>抗凝剂</td>
33
+                                    <td>
34
+                                      <span v-if="item.anticoagulant==1">无肝素</span>
35
+                                      <span v-if="item.anticoagulant==2">普通肝素</span>
36
+                                      <span v-if="item.anticoagulant==4">阿加曲班</span>
37
+                                      <span v-if="item.anticoagulant==5">枸橼酸钠</span>
38
+                                      <span v-if="item.anticoagulant==6">低分子肝素钙</span>
39
+                                      <span v-if="item.anticoagulant==7">低分子肝素钠</span>
40
+                                      <span v-if="item.anticoagulant==8">依诺肝素</span>
41
+                                      <span v-if="item.anticoagulant==9">达肝素</span>
42
+                                      <span v-if="item.anticoagulant==10">体外抗凝</span> 
43
+                                    </td>
44
+                                    <td>
45
+                                      {{item.count}}
46
+                                    </td>
33 47
                                 </tr>
34 48
                             </tbody>
35 49
                         </table>
@@ -42,7 +56,9 @@
42 56
 
43 57
 <script>
44 58
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
59
+import { GetAnticoagulantCount} from "@/api/consumable"
45 60
 import print from 'print-js'
61
+const moment = require('moment')
46 62
 export default {
47 63
     components:{
48 64
         BreadCrumb
@@ -53,6 +69,10 @@ export default {
53 69
                 { path: false, name: '耗材药品' },
54 70
                 { path: false, name: '药品打印' }
55 71
             ],
72
+            tableData:[],
73
+            start_time:"",
74
+            end_time:"",
75
+            print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
56 76
         }
57 77
     },
58 78
     methods:{
@@ -66,7 +86,29 @@ export default {
66 86
             style: style,
67 87
             scanStyles: false
68 88
             })
89
+        },
90
+        getlist(startime,endtime){
91
+             const params= {
92
+               start_time:startime,
93
+               end_time:endtime
94
+             }
95
+           GetAnticoagulantCount(params).then(response=>{
96
+             if(response.data.state == 1){
97
+               var count =  response.data.data.count
98
+               console.log("99999count",count)
99
+               this.tableData = count
100
+             }
101
+           })
69 102
         }
103
+    },
104
+    created(){
105
+      var startime = this.$route.query.startime
106
+      console.log("startime3333",startime)
107
+      var endtime = this.$route.query.endtime
108
+      console.log("endtime6666",endtime)
109
+      this.getlist(startime,endtime)
110
+      this.start_time = startime
111
+      this.end_time = endtime
70 112
     }
71 113
 }
72 114
 </script>