XMLWAN vor 2 Jahren
Ursprung
Commit
c026fe25cc

+ 395 - 0
src/xt_pages/dialysis/details/consumable/dialysisDrugCountPrint.vue Datei anzeigen

@@ -0,0 +1,395 @@
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
+
13
+      <div id="print_content">
14
+        <div class="print_main_content">
15
+          <div class="order_title_panl">
16
+            <span class="main_title"> &nbsp;
17
+              透析药品
18
+            </span>
19
+            <span  style="float:right;">打印日期: &nbsp;
20
+               {{$route.query.schedule_date}}
21
+            </span>
22
+          </div>
23
+          <div class="table_panel">
24
+
25
+            <table class="table">
26
+              <thead>
27
+              <tr>
28
+                <td width="50">序号</td>
29
+                <td width="100">药品名称</td>
30
+                <td width="100">规格</td>
31
+                <td width="100">数量</td>
32
+                
33
+              </tr>
34
+              </thead>
35
+              <tbody>
36
+               <tr v-for="(item,i) in tableList" :key="i">
37
+                <td>{{i+1}}</td>
38
+                <td>{{item.advice_name}}</td>
39
+                 <td>{{item.specification_name}}</td>
40
+                <td>
41
+                  <span v-if="config.is_open == 1">{{getHisCount(item.child,item.max_unit,item.min_unit,item.min_number)}}</span>
42
+                  <span v-if="config.is_open != 1">{{getCount(item.child)}}</span>
43
+                </td>
44
+               </tr>
45
+              </tbody>
46
+            </table>
47
+          </div>
48
+        </div>
49
+      </div>
50
+    </div>
51
+  </div>
52
+</template>
53
+
54
+<script>
55
+  import { getDialysisAdviceSchedudeList } from '@/api/dialysis'
56
+  import { parseTime } from '@/utils'
57
+  import { uParseTime } from '@/utils/tools'
58
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
59
+  import print from 'print-js'
60
+  import { getDataConfig } from '@/utils/data'
61
+  export default {
62
+    name: 'SchedulePrint',
63
+    data() {
64
+      return {
65
+        crumbs: [
66
+          { path: false, name: '排班管理' },
67
+          { path: false, name: '排班打印' }
68
+        ],
69
+        td_1_width: '8%',
70
+        td_2_width: '8%',
71
+        td_3_width: '64%',
72
+        td_4_width: '20%',
73
+        month: 1,
74
+        begin_day: 1,
75
+        total:[],
76
+        list:[],
77
+        schedule_date:"",
78
+        schedule_type:0,
79
+        partition_type:0,
80
+        keywords:"",
81
+        loading:false,
82
+        tableData:[],
83
+        numberList:[],
84
+        partitionArr:[],
85
+        his_config:{},
86
+        typeList:[],
87
+        rowList:[],
88
+        dialysate_formulation:[],
89
+        body_fluid_option:[],
90
+        displace_liqui_part_option:[],
91
+        blood_access_option:[],
92
+        hemodialysisPipelinesOptions:[],
93
+        tableList:[],
94
+        druglist:[],
95
+        config:{}
96
+      }
97
+    },
98
+    components: {
99
+      BreadCrumb
100
+    },
101
+    created() {
102
+      this.getDialysisAdviceSchedudeList()
103
+    },
104
+    methods: {
105
+      getDialysisAdviceSchedudeList() {
106
+          var params = {
107
+            schedule_type:this.$route.query.schedule_type,
108
+            partion_type:this.$route.query.partion_type,
109
+            selected_date:this.$route.query.schedule_date,
110
+          }
111
+        console.log("params2332232wo",params)
112
+        getDialysisAdviceSchedudeList(params).then(response=>{
113
+          if(response.data.state == 1){
114
+            var doctorList = []
115
+             var druglist = response.data.data.drug
116
+             this.druglist = druglist
117
+             this.startdialogVisible = true
118
+             var list = response.data.data.list
119
+             var adviceList = response.data.data.adviceList
120
+             var config = response.data.data.config
121
+             this.config = config
122
+             if(list!=null && list.length > 0){
123
+               for(let i=0;i<list.length;i++){
124
+                for(let j=0;j<adviceList.length;j++){
125
+                  if(list[i].patient_id == adviceList[j].patient_id){
126
+                     doctorList.push(adviceList[j])
127
+                  }
128
+                }
129
+               }
130
+             }
131
+             if(config.is_open!=1){
132
+               if(doctorList!=null && doctorList.length > 0){
133
+                let dataInfo = {}
134
+                  doctorList.forEach((item, index) => {
135
+                  let { advice_name } = item
136
+                  if (!dataInfo[advice_name]) {
137
+                    dataInfo[advice_name] = {
138
+                      advice_name:item.advice_name,
139
+                      child: [],
140
+                      count:0,
141
+                      drug_id:item.drug_id,
142
+                      specification_name:item.advice_desc+item.drug_spec_unit,
143
+                      patient_id:item.patient_id,
144
+                     
145
+                    }
146
+                  }
147
+                })
148
+                let arr = Object.values(dataInfo)
149
+                if(arr.length > 0){
150
+                  for(let i=0;i<doctorList.length;i++){
151
+                    for(let j=0;j<arr.length;j++){
152
+                      if(doctorList[i].advice_name == arr[j].advice_name){
153
+                          arr[j].child.push(doctorList[i])
154
+                      }
155
+                    }
156
+                  }
157
+                }
158
+               
159
+                this.tableList = []
160
+                for(let i=0;i<list.length;i++){
161
+                  for(let j=0;j<arr.length;j++){
162
+                    if(list[i].patient_id == arr[j].patient_id){
163
+                      this.tableList.push(arr[j])
164
+                    }
165
+                  }
166
+                }
167
+               
168
+              }
169
+             }
170
+             var tablelist =  response.data.data.tablelist
171
+             console.log("tablelist233232232",tablelist)
172
+            
173
+             var hisArr= []
174
+             if(tablelist!=null && tablelist.length > 0){
175
+               for(let i=0;i<tablelist.length;i++){
176
+                 if(tablelist[i].his_prescription_template!=null){
177
+                  if(tablelist[i].his_prescription_template.his_prescription_info!=null){
178
+                    for(let j=0;j<tablelist[i].his_prescription_template.his_prescription_info.length>0;j++){
179
+                      if(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice!=null){
180
+                         for(let z=0;z<tablelist[i].his_prescription_template.his_prescription_info[j].his_advice.length>0;z++){
181
+                          hisArr.push(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice[z])
182
+                         }
183
+                      }
184
+                    }
185
+                   }
186
+                 
187
+                 }
188
+               }
189
+             }
190
+            var newHisArr = []
191
+            for(let i=0;i<hisArr.length;i++){
192
+               hisArr[i].count_one = 0
193
+                 if(hisArr[i].prescribing_number_unit == hisArr[i].drug.max_unit){
194
+                    hisArr[i].prescribing_number = parseInt(hisArr[i].prescribing_number) * hisArr[i].drug.min_number
195
+                    hisArr[i].count_one =  parseInt(hisArr[i].prescribing_number) * hisArr[i].drug.min_number
196
+                 }
197
+            }
198
+            for(let i=0;i<hisArr.length;i++){
199
+              for(let j=0;j<druglist.length;j++){
200
+                if(hisArr[i].drug_id == druglist[j].id){
201
+                    newHisArr.push(hisArr[i])
202
+                }
203
+              }
204
+            }
205
+            console.log("下盘子3223323223",newHisArr)
206
+             if(config.is_open == 1){
207
+               if(newHisArr!=null && newHisArr.length > 0){
208
+                  let dataInfoOne = {}
209
+                  newHisArr.forEach((item, index) => {
210
+                  let { advice_name } = item
211
+                  if (!dataInfoOne[advice_name]) {
212
+                    dataInfoOne[advice_name] = {
213
+                      advice_name:item.advice_name,
214
+                      child: [],
215
+                      count:0,
216
+                      specification_name:this.getSpecification(item.drug_id),
217
+                      drug_id:item.drug_id,
218
+                      patient_id:item.patient_id,
219
+                      min_number:item.drug.min_number,
220
+                      max_unit:item.drug.max_unit,
221
+                      min_unit:item.drug.min_unit
222
+                    }
223
+                  }
224
+                })
225
+                let hisarr = Object.values(dataInfoOne)
226
+               
227
+                if(hisarr.length > 0){
228
+                  for(let i=0;i<newHisArr.length;i++){
229
+                    for(let j=0;j<hisarr.length;j++){
230
+                      if(newHisArr[i].drug_id == hisarr[j].drug_id){
231
+                          hisarr[j].child.push(newHisArr[i])
232
+                      }
233
+                    }
234
+                  }
235
+                }
236
+                console.log("hisarr",hisarr)
237
+                this.tableList = []
238
+                 for(let i=0;i<list.length;i++){
239
+                  for(let j=0;j<hisarr.length;j++){
240
+                    if(list[i].patient_id == hisarr[j].patient_id){
241
+                      this.tableList.push(hisarr[j])
242
+                    }
243
+                  }
244
+                }
245
+                console.log("h2hh32h3223h32",this.tableList)
246
+              }
247
+             }
248
+          }
249
+        })
250
+      },
251
+     getTimeOne(val) {
252
+        if(val == ""){
253
+        return ""
254
+        }else {
255
+        return uParseTime(val, '{y}-{m}-{d}')
256
+        }
257
+     },
258
+     getCount(val){
259
+       var count = 0
260
+       if(val!=null && val.length > 0){
261
+        for(let i=0;i<val.length;i++){
262
+          count += parseInt(val[i].prescribing_number)
263
+        }
264
+       }
265
+       if(count > 0){
266
+        return count
267
+       }else{
268
+        return 0
269
+       }
270
+     },
271
+    printAction: function() {
272
+    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; } }'
273
+
274
+    printJS({
275
+        printable: 'print_content',
276
+        type: 'html',
277
+        documentTitle: '  ',
278
+        style: style,
279
+        scanStyles: false
280
+     })
281
+    },
282
+    getSpecification(id){
283
+        var specification_name = ""
284
+        for(let i=0;i<this.druglist.length;i++){
285
+          if(id == this.druglist[i].id){
286
+            specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
287
+          }
288
+        }
289
+        return specification_name
290
+      },
291
+     getHisCount(val,max_unit,min_unit,min_number){
292
+        var total = 0
293
+        var max_str = "";
294
+        var min_str = "";
295
+        for(let i=0;i<val.length;i++){
296
+          total+=parseInt(val[i].prescribing_number)
297
+        }
298
+        if (total < min_number) {
299
+        min_str = total + min_unit;
300
+      }
301
+      if (total == 0) {
302
+        min_str = "";
303
+        max_str = "";
304
+      }
305
+      if (total >= min_number) {
306
+        if (parseInt(total / min_number) != 0) {
307
+          max_str = parseInt(total / min_number) + max_unit;
308
+        }
309
+        if (total % min_number != 0) {
310
+          min_str = (total % min_number) + min_unit;
311
+        }
312
+      }
313
+      return max_str + min_str;
314
+        
315
+      },
316
+   }
317
+  }
318
+</script>
319
+
320
+<style rel="stylesheet/scss" lang="scss" scoped>
321
+  .print_main_content {
322
+    background-color: white;
323
+    width: 960px;
324
+    margin: 0 auto;
325
+    padding: 0 0 20px 0;
326
+
327
+  .order_title_panl {
328
+    text-align: center;
329
+
330
+  .main_title {
331
+    font-size: 18px;
332
+    line-height: 40px;
333
+    font-weight: 500;
334
+  }
335
+
336
+  }
337
+  .table_panel {
338
+
339
+  .table {
340
+    width: 100%;
341
+    border: 1px solid;
342
+    border-collapse: collapse;
343
+    padding: 2px;
344
+
345
+  thead {
346
+
347
+  tr {
348
+
349
+  td {
350
+    border: 1px solid;
351
+    text-align: center;
352
+    font-size: 20px;
353
+    padding: 15px 5px;
354
+  }
355
+
356
+  }
357
+  }
358
+  tbody {
359
+
360
+  tr {
361
+
362
+  td {
363
+    border: 1px solid;
364
+    text-align: center;
365
+    font-size: 18px;
366
+    padding: 10px 5px;
367
+
368
+  .proj {
369
+    padding: 5px 0;
370
+    text-align: left;
371
+
372
+  .proj_title {
373
+    font-size: 16px;
374
+    font-weight: 500;
375
+    line-height: 25px;
376
+  }
377
+
378
+  .proj_item {
379
+    font-size: 15px;
380
+    line-height: 20px;
381
+
382
+  .zone_name {
383
+    font-weight: 500;
384
+  }
385
+
386
+  }
387
+  }
388
+  }
389
+  }
390
+  }
391
+  }
392
+  }
393
+  }
394
+</style>
395
+

+ 300 - 0
src/xt_pages/dialysis/details/consumable/dialysisDrugPrint.vue Datei anzeigen

@@ -0,0 +1,300 @@
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
+
13
+      <div id="print_content">
14
+        <div class="print_main_content">
15
+          <div class="order_title_panl">
16
+            <span class="main_title"> &nbsp;
17
+              透析药品
18
+            </span>
19
+            <span  style="float:right;">打印日期: &nbsp;
20
+               {{$route.query.schedule_date}}
21
+            </span>
22
+          </div>
23
+          <div class="table_panel">
24
+
25
+            <table class="table">
26
+              <thead>
27
+              <tr>
28
+                <td width="50">序号</td>
29
+                <td width="100">透析机号</td>
30
+                <td width="100">姓名</td>
31
+                <td width="100">透析号</td>
32
+                <td width="800">推送医嘱</td>
33
+             
34
+              </tr>
35
+              </thead>
36
+              <tbody>
37
+               <tr v-for="(item,i) in list" :key="i">
38
+                <td>{{i+1}}</td>
39
+                <td> {{item.device_number.zone.name}}  {{item.device_number.number}}</td>
40
+                <td>{{item.patient.name}}</td>
41
+                <td>{{item.patient.dialysis_no}}</td>
42
+                 <td width="800">
43
+                     <span v-if="config.is_open !=1">{{getAdviceContent(item.patient_id)}}</span> 
44
+                     <span v-if="config.is_open == 1"> {{getHisAdviceContent(item.patient_id)}}</span>
45
+                 </td>
46
+               </tr>
47
+              </tbody>
48
+            </table>
49
+            
50
+         
51
+
52
+          </div>
53
+        </div>
54
+      </div>
55
+    </div>
56
+  </div>
57
+</template>
58
+
59
+<script>
60
+ import { getDialysisAdviceTemplateList } from '@/api/dialysis'
61
+  import { parseTime } from '@/utils'
62
+  import { uParseTime } from '@/utils/tools'
63
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
64
+  import print from 'print-js'
65
+  import { getDataConfig } from '@/utils/data'
66
+  export default {
67
+    name: 'SchedulePrint',
68
+    data() {
69
+      return {
70
+        crumbs: [
71
+          { path: false, name: '排班管理' },
72
+          { path: false, name: '排班打印' }
73
+        ],
74
+        td_1_width: '8%',
75
+        td_2_width: '8%',
76
+        td_3_width: '64%',
77
+        td_4_width: '20%',
78
+        month: 1,
79
+        begin_day: 1,
80
+        total:[],
81
+        list:[],
82
+        schedule_date:"",
83
+        schedule_type:0,
84
+        partition_type:0,
85
+        keywords:"",
86
+        loading:false,
87
+        tableData:[],
88
+        numberList:[],
89
+        partitionArr:[],
90
+        his_config:{},
91
+        typeList:[],
92
+        rowList:[],
93
+        dialysate_formulation:[],
94
+        body_fluid_option:[],
95
+        displace_liqui_part_option:[],
96
+        blood_access_option:[],
97
+        hemodialysisPipelinesOptions:[],
98
+        adviceList:[],
99
+        templateList:[],
100
+        config:{},
101
+        list:[],
102
+        druglist:[]
103
+      }
104
+    },
105
+    components: {
106
+      BreadCrumb
107
+    },
108
+    created() {
109
+   
110
+     this.getlist()
111
+    },
112
+    methods: {
113
+
114
+      getlist(){
115
+         var params = {
116
+          schedule_date:this.$route.query.schedule_date,
117
+          limit:this.$route.query.limit,
118
+          page:this.$route.query.page,
119
+          partition_id:this.$route.query.partition_id,
120
+          ids:this.$route.query.ids,
121
+         }
122
+        getDialysisAdviceTemplateList(params).then(response=>{
123
+          if(response.data.state == 1){
124
+          
125
+            var list = response.data.data.list
126
+            this.list = list
127
+            this.total = response.data.data.total
128
+            var adviceList = response.data.data.adviceList
129
+            this.adviceList = adviceList
130
+          
131
+            var druglist = response.data.data.drugList
132
+            this.druglist = druglist
133
+           
134
+             var tablelist =  response.data.data.tablelist
135
+             console.log("tablelist233232232",tablelist)
136
+             var hisArr= []
137
+             if(tablelist!=null && tablelist.length > 0){
138
+               for(let i=0;i<tablelist.length;i++){
139
+                 if(tablelist[i].his_prescription_template!=null){
140
+                  if(tablelist[i].his_prescription_template.his_prescription_info!=null){
141
+                    for(let j=0;j<tablelist[i].his_prescription_template.his_prescription_info.length>0;j++){
142
+                      if(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice!=null){
143
+                         for(let z=0;z<tablelist[i].his_prescription_template.his_prescription_info[j].his_advice.length>0;z++){
144
+                          hisArr.push(tablelist[i].his_prescription_template.his_prescription_info[j].his_advice[z])
145
+                         }
146
+                      }
147
+                    }
148
+                   }
149
+                 }
150
+               }
151
+             }
152
+            console.log("hisArr223323323223",hisArr)
153
+
154
+            for(let i=0;i<hisArr.length;i++){
155
+              hisArr[i].advice_desc = ""
156
+             for(let j=0;j<druglist.length;j++){
157
+               if(hisArr[i].drug_id == druglist[j].id){
158
+                 hisArr[i].advice_desc = druglist[j].dose + druglist[j].dose_unit +"*"+druglist[j].min_number+druglist[j].min_unit +"/"+druglist[j].max_unit
159
+               }
160
+             }
161
+            }
162
+            this.templateList = hisArr
163
+           
164
+            this.config = response.data.data.config
165
+            
166
+          }
167
+        })
168
+      },
169
+     getTimeOne(val) {
170
+        if(val == ""){
171
+        return ""
172
+        }else {
173
+        return uParseTime(val, '{y}-{m}-{d}')
174
+        }
175
+     },
176
+      printAction: function() {
177
+        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; } }'
178
+
179
+        printJS({
180
+          printable: 'print_content',
181
+          type: 'html',
182
+          documentTitle: '  ',
183
+          style: style,
184
+          scanStyles: false
185
+        })
186
+      },
187
+    
188
+      getAdviceContent(patient_id){
189
+        var newArr = []
190
+        var his_str = ""
191
+        if(this.adviceList!=null && this.adviceList.length > 0){
192
+          for(let i=0;i<this.adviceList.length;i++){
193
+            if(patient_id == this.adviceList[i].patient_id){
194
+              newArr.push(this.adviceList[i])
195
+            }
196
+          }
197
+        }
198
+        if(newArr!=null && newArr.length > 0){
199
+          for(let i=0;i<newArr.length;i++){
200
+            his_str += newArr[i].advice_name +' '+newArr[i].advice_desc + newArr[i].drug_spec_unit +' ' +newArr[i].prescribing_number  +newArr[i].prescribing_number_unit + "。"
201
+          }
202
+        }
203
+        return his_str
204
+      },
205
+      getHisAdviceContent(patient_id){
206
+        var arr = []
207
+        for(let i=0;i<this.templateList.length;i++){
208
+          if(patient_id == this.templateList[i].patient_id){
209
+             arr.push(this.templateList[i])
210
+          }
211
+        } 
212
+        var str = ""
213
+        if(arr!=null && arr.length > 0){
214
+          for(let i=0;i<arr.length;i++){
215
+            str += arr[i].advice_name +' '+ arr[i].advice_desc+' ' + arr[i].prescribing_number+' ' + arr[i].prescribing_number_unit +  "。"
216
+          }
217
+        }
218
+        return str 
219
+      },
220
+    
221
+    }
222
+  }
223
+</script>
224
+
225
+<style rel="stylesheet/scss" lang="scss" scoped>
226
+  .print_main_content {
227
+    background-color: white;
228
+    width: 960px;
229
+    margin: 0 auto;
230
+    padding: 0 0 20px 0;
231
+
232
+  .order_title_panl {
233
+    text-align: center;
234
+
235
+  .main_title {
236
+    font-size: 18px;
237
+    line-height: 40px;
238
+    font-weight: 500;
239
+  }
240
+
241
+  }
242
+  .table_panel {
243
+
244
+  .table {
245
+    width: 100%;
246
+    border: 1px solid;
247
+    border-collapse: collapse;
248
+    padding: 2px;
249
+
250
+  thead {
251
+
252
+  tr {
253
+
254
+  td {
255
+    border: 1px solid;
256
+    text-align: center;
257
+    font-size: 20px;
258
+    padding: 15px 5px;
259
+  }
260
+
261
+  }
262
+  }
263
+  tbody {
264
+
265
+  tr {
266
+
267
+  td {
268
+    border: 1px solid;
269
+    text-align: center;
270
+    font-size: 18px;
271
+    padding: 10px 5px;
272
+
273
+  .proj {
274
+    padding: 5px 0;
275
+    text-align: left;
276
+
277
+  .proj_title {
278
+    font-size: 16px;
279
+    font-weight: 500;
280
+    line-height: 25px;
281
+  }
282
+
283
+  .proj_item {
284
+    font-size: 15px;
285
+    line-height: 20px;
286
+
287
+  .zone_name {
288
+    font-weight: 500;
289
+  }
290
+
291
+  }
292
+  }
293
+  }
294
+  }
295
+  }
296
+  }
297
+  }
298
+  }
299
+</style>
300
+

Datei-Diff unterdrückt, da er zu groß ist
+ 1016 - 0
src/xt_pages/dialysis/details/consumable/dialysisGoodCountPrint.vue


+ 689 - 0
src/xt_pages/dialysis/details/consumable/dialysisGoodPrint.vue Datei anzeigen

@@ -0,0 +1,689 @@
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
+
13
+      <div id="print_content">
14
+        <div class="print_main_content">
15
+          <div class="order_title_panl">
16
+            <span class="main_title"> &nbsp;
17
+              透析耗材
18
+            </span>
19
+            <span  style="float:right;">打印日期: &nbsp;
20
+               {{$route.query.schedule_date}}
21
+            </span>
22
+          </div>
23
+          <div class="table_panel">
24
+
25
+            <table class="table" v-if="his_config.is_open != 1">
26
+              <thead>
27
+              <tr>
28
+                <td width="50">序号</td>
29
+                <td width="100">透析机号</td>
30
+                <td width="100">姓名</td>
31
+                <td width="100">透析机号</td>
32
+                <td width="200" v-for="(item,index) in rowList" :key="index">
33
+                  {{item.filed_name_cn}} 
34
+                </td>
35
+              </tr>
36
+              </thead>
37
+              <tbody>
38
+               <tr v-for="(item,i) in tableData" :key="i">
39
+                <td>{{i+1}}</td>
40
+                <td> {{item.device_number.zone.name}} {{item.device_number.number}}</td>
41
+                 <td>{{item.patient.name}}</td>
42
+                <td>{{item.patient.dialysis_no}}</td>
43
+                <td v-for="(it,index) in rowList" :key="index">
44
+                  {{getName(item.rowList[index].filed_name_cn,item.dialysis_solution)}}
45
+                </td>
46
+               </tr>
47
+              </tbody>
48
+            </table>
49
+            
50
+             <table class="table" v-if="his_config.is_open == 1">
51
+              <thead>
52
+              <tr>
53
+                <td width="50">序号</td>
54
+                <td width="100">透析机号</td>
55
+                <td width="100">姓名</td>
56
+                <td width="100">透析机号</td>
57
+                <td width="200" v-for="(item,index) in typeList" :key="index">
58
+                  {{item.type_name}} 
59
+                </td>
60
+              </tr>
61
+              </thead>
62
+              <tbody>
63
+               <tr v-for="(item,i) in tableData" :key="i">
64
+                <td>{{i+1}}</td>
65
+                <td> {{item.device_number.zone.name}} {{item.device_number.number}}</td>
66
+                 <td>{{item.patient.name}}</td>
67
+                <td>{{item.patient.dialysis_no}}</td>
68
+                <td v-for="(it,index) in typeList" :key="index">
69
+                  {{getStr(item.typeList[index].id,item.projectList,item.patient_id)}}
70
+                </td>
71
+               </tr>
72
+              </tbody>
73
+            </table>
74
+
75
+          </div>
76
+        </div>
77
+      </div>
78
+    </div>
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+  import { GetAllZone,getPatientDialysisSolutionGroupList,getDialysisGoodTotalCount,saveHisDialysis,getHisDialysisGoodCount } from '@/api/dialysis'
84
+  import { parseTime } from '@/utils'
85
+  import { uParseTime } from '@/utils/tools'
86
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
87
+  import print from 'print-js'
88
+  import { getDataConfig } from '@/utils/data'
89
+  export default {
90
+    name: 'SchedulePrint',
91
+    data() {
92
+      return {
93
+        crumbs: [
94
+          { path: false, name: '排班管理' },
95
+          { path: false, name: '排班打印' }
96
+        ],
97
+        td_1_width: '8%',
98
+        td_2_width: '8%',
99
+        td_3_width: '64%',
100
+        td_4_width: '20%',
101
+        month: 1,
102
+        begin_day: 1,
103
+        total:[],
104
+        list:[],
105
+        schedule_date:"",
106
+        schedule_type:0,
107
+        partition_type:0,
108
+        keywords:"",
109
+        loading:false,
110
+        tableData:[],
111
+        numberList:[],
112
+        partitionArr:[],
113
+        his_config:{},
114
+        typeList:[],
115
+        rowList:[],
116
+        dialysate_formulation:[],
117
+        body_fluid_option:[],
118
+        displace_liqui_part_option:[],
119
+        blood_access_option:[],
120
+        hemodialysisPipelinesOptions:[],
121
+      }
122
+    },
123
+    components: {
124
+      BreadCrumb
125
+    },
126
+    created() {
127
+       this.dialysate_formulation =  getDataConfig(  
128
+            'hemodialysis',
129
+            'dialysate_formulation'
130
+      )
131
+      this.body_fluid_option = this.$store.getters.body_fluid
132
+      this.displace_liqui_part_option = this.$store.getters.displace_liqui
133
+      this.blood_access_option = this.$store.getters.blood_access
134
+      this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
135
+      this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
136
+      var filedList = this.$store.getters.xt_user.fileds
137
+      for (let i = 0; i < filedList.length; i++) {
138
+        if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器'  || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖'  || filedList[i].filed_name_cn == '穿刺针')) {
139
+          this.rowList.push(filedList[i])
140
+        }
141
+      }
142
+      this.getlist()
143
+    },
144
+    methods: {
145
+     getlist(){
146
+      var params = {
147
+        keywords:this.$route.query.keywords,
148
+        limit:this.$route.query.limit,
149
+        page:this.$route.query.page,
150
+        partition_id:this.$route.query.partition_id,
151
+        schedule_date:this.$route.query.schedule_date,
152
+        schedule_type:this.$route.query.schedule_type,
153
+        ids:this.$route.query.ids,
154
+      }
155
+      getPatientDialysisSolutionGroupList(params).then(response=>{
156
+        if(response.data.state == 1){
157
+            var list = response.data.data.list
158
+            
159
+            var total = response.data.data.total
160
+            this.total = total
161
+            var goodType = response.data.data.goodType
162
+            var config = response.data.data.config
163
+            this.his_config = config
164
+
165
+            if(config.is_open !=1){
166
+            if(list!=null){
167
+            for(let i=0;i<list.length;i++){
168
+                list[i].rowList = []
169
+                list[i].rowList = this.rowList
170
+            }
171
+            }
172
+            this.tableData= []
173
+            this.tableData = list
174
+            }
175
+            if(config.is_open == 1){
176
+            if(list!=null){
177
+                this.typeList= []
178
+                for(let i=0;i<goodType.length;i++){
179
+                if(goodType[i].is_open == 1){
180
+                    this.typeList.push(goodType[i])
181
+                }
182
+                }
183
+            for(let i=0;i<list.length;i++){
184
+                list[i].projectList = []
185
+                list[i].typeList = []
186
+                list[i].typeList = this.typeList
187
+            }
188
+            
189
+                for(let i=0;i<list.length;i++){
190
+                if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
191
+                for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
192
+                    for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
193
+                    list[i].projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
194
+                    }
195
+                }
196
+                }
197
+                
198
+                }
199
+                console.log("list列表",list)
200
+                this.tableData = []
201
+                this.tableData = list 
202
+            }
203
+            }
204
+        }
205
+      }) 
206
+     },
207
+     getTimeOne(val) {
208
+        if(val == ""){
209
+        return ""
210
+        }else {
211
+        return uParseTime(val, '{y}-{m}-{d}')
212
+        }
213
+     },
214
+      printAction: function() {
215
+        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; } }'
216
+
217
+        printJS({
218
+          printable: 'print_content',
219
+          type: 'html',
220
+          documentTitle: '  ',
221
+          style: style,
222
+          scanStyles: false
223
+        })
224
+      },
225
+      getStr(good_type_id,arrNew,patient_id){
226
+        var arr= []
227
+        var str = ""
228
+        if(arrNew!=null && arrNew.length > 0){
229
+            for(let i=0;i<arrNew.length;i++){
230
+            arrNew[i].good_type_id = 0
231
+            arrNew[i].good_type_id = arrNew[i].good_info.good_type_id
232
+            arrNew[i].good_id = 0
233
+            arrNew[i].good_id = arrNew[i].good_info.id
234
+            if(arrNew[i].patient_id == patient_id && arrNew[i].good_info.good_type_id == good_type_id){
235
+                arr.push(arrNew[i])
236
+            }
237
+            }
238
+        }
239
+      
240
+       let dataInfo = {}
241
+       if(arr!=null && arr.length > 0){
242
+        arr.forEach((item, index) => {
243
+          let { good_id } = item
244
+          if (!dataInfo[good_id]) {
245
+            dataInfo[good_id] = {
246
+              good_id:item.good_id,
247
+              child: [],
248
+              count:0,
249
+              specification_name:item.good_info.specification_name
250
+            }
251
+          }
252
+        })
253
+         let newArr = Object.values(dataInfo)
254
+         console.log("newArr",newArr)
255
+          for(let i=0;i<arr.length;i++){
256
+            for(let j=0;j<newArr.length;j++){
257
+              if( arr[i].good_info.id == newArr[j].good_id){
258
+                newArr[j].child.push(arr[i])
259
+              }
260
+            }
261
+          }
262
+            
263
+          if(newArr!=null && newArr.length > 0){
264
+            for(let j=0;j<newArr.length;j++){
265
+              for(let z=0;z<newArr[j].child.length;z++){
266
+                  newArr[j].count += parseInt(newArr[j].child[z].count)
267
+              }
268
+             }
269
+            for(let j=0;j<newArr.length;j++){
270
+              str += newArr[j].specification_name + "*" + newArr[j].count + " "
271
+            }
272
+          }
273
+       }
274
+    
275
+      return str
276
+    },
277
+
278
+    getName(filed_name_cn,val){
279
+        if(filed_name_cn == "透析模式"){
280
+          return this.getModeName(val.mode_id)
281
+        }
282
+        if(filed_name_cn == "血流量"){
283
+          if(val.blood_flow_volume > 0){
284
+           return val.blood_flow_volume
285
+          }else{
286
+           return ""
287
+          }
288
+          
289
+        }
290
+        if(filed_name_cn == "目标超滤量"){
291
+          return val.target_ultrafiltration?val.target_ultrafiltration:""
292
+        }
293
+        if(filed_name_cn == "透析液配方"){
294
+          return this.getDialysateFormulation(val.dialysate_formulation)
295
+        }
296
+        if(filed_name_cn == "抗凝剂"){
297
+          return this.getAnticoagulant(val.anticoagulant)
298
+        }
299
+        if(filed_name_cn == "首剂"){
300
+          return val.anticoagulant_shouji?val.anticoagulant_shouji:""
301
+        }
302
+        if(filed_name_cn == "维持"){
303
+          return val.anticoagulant_weichi?val.anticoagulant_weichi:""
304
+        }
305
+        if(filed_name_cn == "总量"){
306
+          return val.anticoagulant_zongliang?val.anticoagulant_zongliang:""
307
+        }
308
+        if(filed_name_cn == "置换量"){
309
+           return val.replacement_total?val.replacement_total:""
310
+        }
311
+        if(filed_name_cn == "钾"){
312
+          return val.kalium?val.kalium:""
313
+        }
314
+        if(filed_name_cn == "钠"){
315
+           return val.sodium?val.sodium:""
316
+        }
317
+        if(filed_name_cn == "钙"){
318
+           return val.calcium?val.calcium:""
319
+        }
320
+        if(filed_name_cn == "碳酸氢盐"){
321
+           return val.bicarbonate?val.bicarbonate:""
322
+        }
323
+        if(filed_name_cn == "透析液流量"){
324
+            return val.dialysate_flow?val.dialysate_flow:""
325
+        }
326
+        if(filed_name_cn == "透析液温度"){
327
+           return val.dialysate_temperature?val.dialysate_temperature:""
328
+        }
329
+        if(filed_name_cn == "电导度"){
330
+           return val.conductivity?val.conductivity:""
331
+        }
332
+        if(filed_name_cn == "透析器/灌流器"){
333
+           return val.dialyzer_perfusion_apparatus?val.dialyzer_perfusion_apparatus:""
334
+        }
335
+        if(filed_name_cn == "钙名称"){
336
+          return val.anticoagulant_gaimingcheng?val.anticoagulant_gaimingcheng:""
337
+        }
338
+       if(filed_name_cn == "钙剂量"){
339
+           return val.anticoagulant_gaijiliang?val.anticoagulant_gaijiliang:""
340
+        }
341
+       if(filed_name_cn == "体液过多症状"){
342
+          return this.getBodyFluid(val.body_fluid)
343
+        }
344
+        if(filed_name_cn == "透析前使用特殊药物"){
345
+          return val.special_medicine?val.special_medicine:""
346
+        }
347
+       if(filed_name_cn == "透析前使用其他特殊药物"){
348
+         return val.special_medicine_other?val.special_medicine_other:""
349
+        }
350
+        if(filed_name_cn == "置换液"){
351
+          return this.getDisplace(val.displace_liqui_part) 
352
+        }
353
+        if(filed_name_cn == "血管通路"){
354
+          return this.getBloodAccess(val.blood_access)
355
+        }
356
+        if(filed_name_cn == "体液过多其他症状"){
357
+          return val.body_fluid_other?val.body_fluid_other:""
358
+        }  
359
+        if(filed_name_cn == "透析时长"){
360
+          return   val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
361
+        }
362
+        if(filed_name_cn == "置换液总量"){
363
+         return val.displace_liqui_value?val.displace_liqui_value:""
364
+        }
365
+        if(filed_name_cn == "透析器"){
366
+          return val.dialysis_dialyszers
367
+        }
368
+        if(filed_name_cn == "注射器"){
369
+           return ""
370
+        }
371
+        if(filed_name_cn == "抗凝提前停止"){
372
+          return ""
373
+        }
374
+        if(filed_name_cn == "肝素钠"){
375
+           return ""
376
+        }
377
+        if(filed_name_cn == "鱼精蛋白"){
378
+           return ""
379
+        }
380
+        if(filed_name_cn == "下机前推住鱼精蛋白"){
381
+            return ""
382
+        }
383
+        if(filed_name_cn == "无肝素钠备注"){
384
+           return ""
385
+        }
386
+        if(filed_name_cn == "灌流器"){
387
+          return val.dialysis_irrigation
388
+        }
389
+        if(filed_name_cn == "抗凝剂商品名称"){
390
+          return ""
391
+        }
392
+        if(filed_name_cn == "置换速度"){
393
+          return  ""
394
+        }
395
+        if(filed_name_cn == "病情"){
396
+          return ""
397
+        }
398
+        if(filed_name_cn == "葡萄糖"){
399
+           return val.amylaceum?val.amylaceum:""
400
+        }
401
+        if(filed_name_cn == "单超时长"){
402
+           return  ""
403
+        }
404
+        if(filed_name_cn == "单超脱水"){
405
+           return ""
406
+        }
407
+        if(filed_name_cn == "置换流量"){
408
+          return  ""
409
+        }
410
+        if(filed_name_cn == "血浆分离器"){
411
+           return val.plasma_separator?val.plasma_separator:""
412
+        }
413
+       if(filed_name_cn == "透析管路"){
414
+          return this.getHemodialysisPipelines(val.hemodialysis_pipelines)
415
+        }
416
+       if(filed_name_cn == "透析管路支数"){
417
+          return ""
418
+        }
419
+       if(filed_name_cn == "穿刺针"){
420
+          return val.puncture_needle?val.puncture_needle:""
421
+        }
422
+      
423
+       if(filed_name_cn == "促红素"){
424
+          return val.epo_count?val.epo_count:""
425
+        }
426
+        if(filed_name_cn == "促红素支数"){
427
+          return val.epo_count?val.epo_count:""
428
+        }
429
+        if(filed_name_cn == "最大超滤率"){
430
+          return val.max_ultrafiltration_rate?val.max_ultrafiltration_rate:""
431
+        }
432
+      },
433
+
434
+       getModeName(id){
435
+        var name = ""
436
+        if(id == 1){
437
+          name = "HD"
438
+        }
439
+        if(id == 2){
440
+          name = "HDF"
441
+        }
442
+        if(id == 3){
443
+          name = "HD+HP"
444
+        }
445
+        if(id == 4){
446
+          name = "HP"
447
+        }
448
+        if(id == 5){
449
+          name = "HF"
450
+        }
451
+        if(id == 6){
452
+          name = "SCUF"
453
+        }
454
+        if(id == 7){
455
+          name = "IUF"
456
+        }
457
+        if(id == 8){
458
+          name = "HFHD"
459
+        }
460
+        if(id == 9){
461
+          name = "HFHD+HP"
462
+        }
463
+        if(id == 10){
464
+          name = "PHF"
465
+        }
466
+        if(id == 11){
467
+          name = "HFR"
468
+        }
469
+        if(id == 12){
470
+          name = "HDF+HP"
471
+        }
472
+        if(id == 13){
473
+          name = "CRRT"
474
+        }
475
+        if(id == 14){
476
+          name = "腹水回输"
477
+        }
478
+        if(id == 19){
479
+          name = "IUF+HD"
480
+        }
481
+        if(id == 20){
482
+          name = "UF"
483
+        }
484
+        if(id == 21){
485
+          name = "HD+"
486
+        }
487
+        if(id == 22){
488
+          name = "血浆胆红素吸附+HDF"
489
+        }
490
+        if(id == 23){
491
+          name = "血浆胆红素吸附"
492
+        }
493
+        if(id == 24){
494
+          name = "I-HDF"
495
+        }
496
+        if(id == 25){
497
+          name = "HD高通"
498
+        }
499
+        if(id == 26){
500
+          name = "CVVH"
501
+        }
502
+         if(id == 27){
503
+          name = "CVVHD"
504
+        }
505
+         if(id == 28){
506
+          name = "CVVHDF"
507
+        }
508
+         if(id == 29){
509
+          name = "PE"
510
+        }
511
+         if(id == 30){
512
+          name = "血浆胆红素吸附+HP"
513
+        }
514
+         if(id == 31){
515
+          name = "HPD"
516
+        }
517
+         if(id == 32){
518
+          name = "HDP"
519
+        }
520
+        return name
521
+      },
522
+    getDialysateFormulation(id){
523
+      var name = ""
524
+      for(let i=0;i<this.dialysate_formulation.length;i++){
525
+        if(id == this.dialysate_formulation[i].id){
526
+          name = this.dialysate_formulation[i].name
527
+        }
528
+      }
529
+      return name
530
+    },
531
+    getAnticoagulant(id){
532
+      var name = ""
533
+      if(id == 1){
534
+         name = "无肝素"
535
+      }
536
+      if(id == 2){
537
+        name = "普通肝素"
538
+      }
539
+      if(id == 3){
540
+        name = "低分子肝素"
541
+      }
542
+      if(id == 4){
543
+        name = "阿加曲班"
544
+      }
545
+      if(id == 5){
546
+         name ="枸橼酸钠"
547
+      }
548
+      if(id == 6){
549
+        name = "低分子肝素钙"
550
+      }
551
+      if(id == 7){
552
+        name = "低分子肝素钠"
553
+      }
554
+      if(id ==8){
555
+        name = "依诺肝素"
556
+      }
557
+      if(id ==9){
558
+        name = "达肝素"
559
+      }
560
+      if(id ==10){
561
+        name = "体外抗凝"
562
+      }
563
+      if(id ==11){
564
+        name = "那曲肝素"
565
+      }
566
+      if(id ==12){
567
+        name = "无抗凝剂"
568
+      }
569
+     if(id ==13){
570
+        name = "那曲肝素钙"
571
+      }
572
+      return name
573
+    },
574
+    getBodyFluid(id){
575
+     var name = ""
576
+     for(let i=0;i<this.body_fluid_option.length;i++){
577
+       if(id == this.body_fluid_option[i].id){
578
+          name = this.body_fluid_option[i].name
579
+       }
580
+     }
581
+     return name
582
+    },
583
+    getDisplace(id){
584
+      var name = ""
585
+      for(let i=0;i<this.displace_liqui_part_option.length;i++){
586
+        if(id == this.displace_liqui_part_option[i].id){
587
+           name = this.displace_liqui_part_option[i].name
588
+        } 
589
+      }
590
+      return name
591
+    },
592
+    getBloodAccess(id){
593
+      var name = ""
594
+      for(let i=0;i<this.blood_access_option.length;i++){
595
+        if(id == this.blood_access_option[i].id){
596
+           name = this.blood_access_option[i].name
597
+        }
598
+      }
599
+      return name
600
+    },
601
+     getHemodialysisPipelines(id){
602
+      var name = ""
603
+      for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
604
+        if(id == this.hemodialysisPipelinesOptions[i].id){
605
+            name = this.hemodialysisPipelinesOptions[i].name
606
+        }
607
+      }
608
+      return name
609
+    },
610
+    }
611
+  }
612
+</script>
613
+
614
+<style rel="stylesheet/scss" lang="scss" scoped>
615
+  .print_main_content {
616
+    background-color: white;
617
+    width: 960px;
618
+    margin: 0 auto;
619
+    padding: 0 0 20px 0;
620
+
621
+  .order_title_panl {
622
+    text-align: center;
623
+
624
+  .main_title {
625
+    font-size: 18px;
626
+    line-height: 40px;
627
+    font-weight: 500;
628
+  }
629
+
630
+  }
631
+  .table_panel {
632
+
633
+  .table {
634
+    width: 100%;
635
+    border: 1px solid;
636
+    border-collapse: collapse;
637
+    padding: 2px;
638
+
639
+  thead {
640
+
641
+  tr {
642
+
643
+  td {
644
+    border: 1px solid;
645
+    text-align: center;
646
+    font-size: 20px;
647
+    padding: 15px 5px;
648
+  }
649
+
650
+  }
651
+  }
652
+  tbody {
653
+
654
+  tr {
655
+
656
+  td {
657
+    border: 1px solid;
658
+    text-align: center;
659
+    font-size: 18px;
660
+    padding: 10px 5px;
661
+
662
+  .proj {
663
+    padding: 5px 0;
664
+    text-align: left;
665
+
666
+  .proj_title {
667
+    font-size: 16px;
668
+    font-weight: 500;
669
+    line-height: 25px;
670
+  }
671
+
672
+  .proj_item {
673
+    font-size: 15px;
674
+    line-height: 20px;
675
+
676
+  .zone_name {
677
+    font-weight: 500;
678
+  }
679
+
680
+  }
681
+  }
682
+  }
683
+  }
684
+  }
685
+  }
686
+  }
687
+  }
688
+</style>
689
+

+ 433 - 0
src/xt_pages/dialysis/details/consumable/dialysisParameterCountPrint.vue Datei anzeigen

@@ -0,0 +1,433 @@
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
+
13
+      <div id="print_content">
14
+        <div class="print_main_content">
15
+          <div class="order_title_panl">
16
+            <span class="main_title"> &nbsp;
17
+              透析药品
18
+            </span>
19
+            <span  style="float:right;">打印日期: &nbsp;
20
+               {{$route.query.schedule_date}}
21
+            </span>
22
+          </div>
23
+          <div class="table_panel">
24
+
25
+            <table class="table">
26
+              <thead>
27
+              <tr>
28
+                <td width="50">序号</td>
29
+                <td width="100">名称</td>
30
+                <td width="100">规格</td>
31
+                <td width="100">数量</td>
32
+              </tr>
33
+              </thead>
34
+              <tbody>
35
+               <tr v-for="(item,i) in tableList" :key="i">
36
+                <td>{{i+1}}</td>
37
+                <td>{{item.name}}</td>
38
+                <td>{{item.specification_name}}</td>
39
+                <td>{{item.count}}</td>
40
+               </tr>
41
+              </tbody>
42
+            </table>
43
+            
44
+         
45
+
46
+          </div>
47
+        </div>
48
+      </div>
49
+    </div>
50
+  </div>
51
+</template>
52
+
53
+<script>
54
+ import { getDialysisParameterGoodList } from '@/api/dialysis'
55
+  import { parseTime } from '@/utils'
56
+  import { uParseTime } from '@/utils/tools'
57
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
+  import print from 'print-js'
59
+  import { getDataConfig } from '@/utils/data'
60
+  export default {
61
+    name: 'SchedulePrint',
62
+    data() {
63
+      return {
64
+        crumbs: [
65
+          { path: false, name: '排班管理' },
66
+          { path: false, name: '排班打印' }
67
+        ],
68
+        td_1_width: '8%',
69
+        td_2_width: '8%',
70
+        td_3_width: '64%',
71
+        td_4_width: '20%',
72
+        month: 1,
73
+        begin_day: 1,
74
+        total:[],
75
+        list:[],
76
+        schedule_date:"",
77
+        schedule_type:0,
78
+        partition_type:0,
79
+        keywords:"",
80
+        loading:false,
81
+        tableData:[],
82
+        numberList:[],
83
+        partitionArr:[],
84
+        his_config:{},
85
+        typeList:[],
86
+        rowList:[],
87
+        dialysate_formulation:[],
88
+        body_fluid_option:[],
89
+        displace_liqui_part_option:[],
90
+        blood_access_option:[],
91
+        hemodialysisPipelinesOptions:[],
92
+        adviceList:[],
93
+        templateList:[],
94
+        config:{},
95
+        list:[],
96
+        tableList:[]
97
+      }
98
+    },
99
+    components: {
100
+      BreadCrumb
101
+    },
102
+    created() {
103
+     this.getDialysisParameterGoodList()
104
+    },
105
+    methods: {
106
+    
107
+     getTimeOne(val) {
108
+        if(val == ""){
109
+        return ""
110
+        }else {
111
+        return uParseTime(val, '{y}-{m}-{d}')
112
+        }
113
+     },
114
+      printAction: function() {
115
+        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; } }'
116
+
117
+        printJS({
118
+          printable: 'print_content',
119
+          type: 'html',
120
+          documentTitle: '  ',
121
+          style: style,
122
+          scanStyles: false
123
+        })
124
+      },
125
+
126
+     getDialysisParameterGoodList() {
127
+         var params = {
128
+          schedule_type:this.$route.query.schedule_type,
129
+          partion_type:this.$route.query.partion_type,
130
+          selected_date:this.$route.query.schedule_date,
131
+        }
132
+        getDialysisParameterGoodList(params).then(response=>{
133
+           if(response.data.state == 1){
134
+            this.startdialogVisible = true
135
+            var list = response.data.data.list
136
+            console.log("list232323223222wid",list)
137
+            
138
+            var anticoagulantList = []
139
+            if(list!=null && list.length>0){
140
+              for(let i=0;i<list.length;i++){
141
+                 list[i].dialysis_dialyszers_arr = []
142
+                 list[i].dialyzer_perfusion_apparatus_arr = []
143
+                 list[i].dialysis_irrigation_arr = []
144
+                 if(list[i].dialysis_solution.dialysis_dialyszers!=""){
145
+                   list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
146
+                 }
147
+                 if(list[i].dialysis_solution.dialyzer_perfusion_apparatus!=""){
148
+                   list[i].dialyzer_perfusion_apparatus_arr = list[i].dialysis_solution.dialyzer_perfusion_apparatus.split(",")
149
+                 }
150
+                 if(list[i].dialysis_solution.dialysis_irrigation!=""){
151
+                   list[i].dialysis_irrigation_arr = list[i].dialysis_solution.dialysis_irrigation.split(",")
152
+                 }
153
+
154
+                 if(list[i].dialysis_solution.anticoagulant == 1){
155
+                    anticoagulantList.push(list[i].dialysis_solution)
156
+                 }
157
+                 if(list[i].dialysis_solution.anticoagulant == 2){
158
+                    anticoagulantList.push(list[i].dialysis_solution)
159
+                 }
160
+                if(list[i].dialysis_solution.anticoagulant == 3){
161
+                    anticoagulantList.push(list[i].dialysis_solution)
162
+                 }
163
+                 if(list[i].dialysis_solution.anticoagulant == 4){
164
+                    anticoagulantList.push(list[i].dialysis_solution)
165
+                 }
166
+                if(list[i].dialysis_solution.anticoagulant == 5){
167
+                   anticoagulantList.push(list[i].dialysis_solution)
168
+                 }
169
+                  if(list[i].dialysis_solution.anticoagulant == 6){
170
+                    anticoagulantList.push(list[i].dialysis_solution)
171
+                 }
172
+                  if(list[i].dialysis_solution.anticoagulant == 7){
173
+                   anticoagulantList.push(list[i].dialysis_solution)
174
+                 }
175
+                  if(list[i].dialysis_solution.anticoagulant == 8){
176
+                   anticoagulantList.push(list[i].dialysis_solution)
177
+                 }
178
+                 if(list[i].dialysis_solution.anticoagulant == 9){
179
+                   anticoagulantList.push(list[i].dialysis_solution)
180
+                 }
181
+                  if(list[i].dialysis_solution.anticoagulant == 10){
182
+                    anticoagulantList.push(list[i].dialysis_solution)
183
+                 }
184
+                  if(list[i].dialysis_solution.anticoagulant == 11){
185
+                    anticoagulantList.push(list[i].dialysis_solution)
186
+                 }
187
+                  if(list[i].dialysis_solution.anticoagulant == 12){
188
+                    anticoagulantList.push(list[i].dialysis_solution)
189
+                 }
190
+                 if(list[i].dialysis_solution.anticoagulant == 13){
191
+                   anticoagulantList.push(list[i].dialysis_solution)
192
+                 }
193
+              }
194
+            }
195
+            console.log("anticoagulantList",anticoagulantList)
196
+            this.tableList = []
197
+            if(anticoagulantList!=null && anticoagulantList.length > 0){
198
+                  let dataInfoOne = {}
199
+                  anticoagulantList.forEach((item, index) => {
200
+                  let { anticoagulant } = item
201
+                  if (!dataInfoOne[anticoagulant]) {
202
+                    dataInfoOne[anticoagulant] = {
203
+                      anticoagulant:item.anticoagulant,
204
+                      name: "抗凝剂",
205
+                      specification_name:this.getAnticoagualnt(item.anticoagulant),
206
+                      count:0,
207
+                      child:[]
208
+                    }
209
+                  }
210
+                })
211
+              let hisarr = Object.values(dataInfoOne)
212
+              if(hisarr!=null && hisarr.length > 0){
213
+                for(let i=0;i<anticoagulantList.length;i++){
214
+                  for(let j=0;j<hisarr.length;j++){
215
+                    if(anticoagulantList[i].anticoagulant == hisarr[j].anticoagulant){
216
+                      hisarr[j].child.push(anticoagulantList[i])
217
+                    }
218
+                  }
219
+                }
220
+              }
221
+              for(let i=0;i<hisarr.length;i++){
222
+                hisarr[i].count = hisarr[i].child.length
223
+                this.tableList.push(hisarr[i])
224
+              }
225
+             
226
+            }
227
+            var dialysisDialyszersArr = []
228
+            var dialyzerPerfusionApparaArr = []
229
+            var dialysisIrrigationArr = []
230
+            for(let i=0;i<list.length;i++){
231
+             for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
232
+              
233
+               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
234
+             }
235
+             for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
236
+              dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
237
+             }
238
+             for(let y=0;y<list[i].dialysis_irrigation_arr.length;y++){
239
+              dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
240
+             }
241
+            }
242
+            console.log("透析器",dialysisDialyszersArr)
243
+            console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
244
+            console.log("灌流器",dialysisIrrigationArr)
245
+             
246
+           let obj = {}
247
+           let objOne = {}
248
+           let objTwo = {}
249
+           for(let i = 0 ; i < dialysisDialyszersArr.length; i++){
250
+            if(obj[dialysisDialyszersArr[i]]){
251
+               obj[dialysisDialyszersArr[i]] +=1
252
+            }else{
253
+              obj[dialysisDialyszersArr[i]] = 1
254
+            }
255
+           }
256
+           let Arr = [];
257
+            for (let i in obj) {
258
+              let a = {};
259
+              a[i] = obj[i];
260
+              a.name = "透析器"
261
+              a.count = obj[i]
262
+              a.specification_name = i
263
+              Arr.push(a);
264
+            }
265
+          
266
+           for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
267
+            if(objOne[dialyzerPerfusionApparaArr[i]]){
268
+                objOne[dialyzerPerfusionApparaArr[i]] +=1
269
+             }else{
270
+              objOne[dialyzerPerfusionApparaArr[i]] = 1
271
+             }   
272
+           }
273
+           
274
+           for (let i in objOne) {
275
+              let a = {};
276
+              a[i] = objOne[i];
277
+              a.name = "透析器/灌流器"
278
+              a.count = objOne[i]
279
+              a.specification_name = i
280
+              Arr.push(a);
281
+            }
282
+
283
+           for(let i=0;i<dialysisIrrigationArr.length;i++){
284
+            if(objTwo[dialysisIrrigationArr[i]]){
285
+              objTwo[dialysisIrrigationArr[i]] +=1
286
+             }else{
287
+              objTwo[dialysisIrrigationArr[i]] = 1
288
+             }   
289
+           }
290
+
291
+           for (let i in objTwo) {
292
+              let a = {};
293
+              a[i] = objTwo[i];
294
+              a.name = "灌流器"
295
+              a.count = objTwo[i]
296
+              a.specification_name = i
297
+              Arr.push(a);
298
+            }
299
+            console.log("newa",Arr)
300
+           
301
+         
302
+            if(Arr.length >0){
303
+              for(let i=0;i<Arr.length;i++){
304
+                 this.tableList.push(Arr[i])
305
+              }
306
+            }
307
+           }
308
+        })
309
+      },
310
+
311
+      getAnticoagualnt(id){
312
+       var name = ""
313
+       if(id == 1){
314
+         name = "无肝素"
315
+       }
316
+       if(id == 2){
317
+        name = "普通肝素"
318
+       }
319
+       if(id == 3){
320
+         name ="低分子肝素"
321
+       }
322
+       if(id == 4){
323
+         name ="阿加曲班"
324
+       }
325
+       if(id == 5){
326
+         name ="枸橼酸钠"
327
+       }
328
+       if(id == 6){
329
+         name ="低分子肝素钙"
330
+       }
331
+       if(id == 7){
332
+         name ="低分子肝素钠"
333
+       }
334
+       if(id == 8){
335
+         name ="依诺肝素"
336
+       }
337
+       if(id == 9){
338
+         name ="达肝素"
339
+       }
340
+       if(id == 10){
341
+         name ="体外抗凝"
342
+       }
343
+       if(id == 11){
344
+         name ="那屈肝素"
345
+       }
346
+       if(id == 12){
347
+         name ="无抗凝剂"
348
+       }
349
+       if(id == 13){
350
+         name ="那屈肝素钙"
351
+       }
352
+       return name
353
+     },
354
+    }
355
+  }
356
+</script>
357
+
358
+<style rel="stylesheet/scss" lang="scss" scoped>
359
+  .print_main_content {
360
+    background-color: white;
361
+    width: 960px;
362
+    margin: 0 auto;
363
+    padding: 0 0 20px 0;
364
+
365
+  .order_title_panl {
366
+    text-align: center;
367
+
368
+  .main_title {
369
+    font-size: 18px;
370
+    line-height: 40px;
371
+    font-weight: 500;
372
+  }
373
+
374
+  }
375
+  .table_panel {
376
+
377
+  .table {
378
+    width: 100%;
379
+    border: 1px solid;
380
+    border-collapse: collapse;
381
+    padding: 2px;
382
+
383
+  thead {
384
+
385
+  tr {
386
+
387
+  td {
388
+    border: 1px solid;
389
+    text-align: center;
390
+    font-size: 20px;
391
+    padding: 15px 5px;
392
+  }
393
+
394
+  }
395
+  }
396
+  tbody {
397
+
398
+  tr {
399
+
400
+  td {
401
+    border: 1px solid;
402
+    text-align: center;
403
+    font-size: 18px;
404
+    padding: 10px 5px;
405
+
406
+  .proj {
407
+    padding: 5px 0;
408
+    text-align: left;
409
+
410
+  .proj_title {
411
+    font-size: 16px;
412
+    font-weight: 500;
413
+    line-height: 25px;
414
+  }
415
+
416
+  .proj_item {
417
+    font-size: 15px;
418
+    line-height: 20px;
419
+
420
+  .zone_name {
421
+    font-weight: 500;
422
+  }
423
+
424
+  }
425
+  }
426
+  }
427
+  }
428
+  }
429
+  }
430
+  }
431
+  }
432
+</style>
433
+

+ 376 - 0
src/xt_pages/dialysis/details/consumable/dialysisParameterPrint.vue Datei anzeigen

@@ -0,0 +1,376 @@
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
+
13
+      <div id="print_content">
14
+        <div class="print_main_content">
15
+          <div class="order_title_panl">
16
+            <span class="main_title"> &nbsp;
17
+              透析参数
18
+            </span>
19
+            <span  style="float:right;">打印日期: &nbsp;
20
+               {{$route.query.schedule_date}}
21
+            </span>
22
+          </div>
23
+          <div class="table_panel">
24
+
25
+            <table class="table">
26
+              <thead>
27
+              <tr>
28
+                <td width="50">序号</td>
29
+                <td width="100"  v-if="dialysisSett.device_number==1">透析机号</td>
30
+                <td width="100"  v-if="dialysisSett.name==1">姓名</td>
31
+                <td width="100" v-if="dialysisSett.dialysis_no==1">透析号</td>
32
+                <td width="100" v-if="dialysisSett.admission_number==1">住院(门诊)号</td>
33
+                <td width="100"  v-if="dialysisSett.weight_befor==1">透前体重</td>
34
+                <td width="100"  v-if="dialysisSett.dry_weight==1">干体重</td>
35
+                <td width="100"  v-if="dialysisSett.blood_pressure==1">透前血压</td>
36
+                <td width="100" v-if="dialysisSett.ultrafiltration_volume==1">目标脱水量</td>
37
+                <td width="200" v-if="dialysisSett.anticoagulant==1">抗凝剂(首剂)(维持)(总量)</td>
38
+                <td width="100" v-if="dialysisSett.dialysis_time ==1">透析时长</td>
39
+                <td width="100"  v-if="dialysisSett.device_type==1">设备型号</td>
40
+                <td width="100" v-if="dialysisSett.dialyzer_perfusion_apparatus == 1">透析器/灌流器</td>
41
+                <td width="100"  v-if="dialysisSett.dialysis_dialyszers == 1">透析器</td>
42
+                <td width="100" v-if="dialysisSett.dialysis_irrigation ==1">灌流器</td>
43
+                 <td width="100" v-if="dialysisSett.displace_liqui_part==1">置换液</td>
44
+                <td width="100"  v-if="dialysisSett.displace_liqui_value==1">置换液总量</td>
45
+                <td width="100" v-if="dialysisSett.kalium==1">钾</td>
46
+                <td width="100"  v-if="dialysisSett.sodium==1">钠</td>
47
+                <td width="100" v-if="dialysisSett.calcium==1">钙</td>
48
+                <td width="100" v-if="dialysisSett.bicarbonate == 1">碳酸氢盐</td>
49
+                <td width="100" v-if="dialysisSett.blood_access==1">血管通路</td>
50
+                <td width="100" v-if="dialysisSett.sealing_fluid_dispose == 1">封管液</td>
51
+                <td width="100"  v-if="dialysisSett.glucose==1">葡萄糖</td>
52
+                <td width="100"  v-if="dialysisSett.blood_flow_volume==1">血流量</td>
53
+              </tr>
54
+              </thead>
55
+              <tbody>
56
+               <tr v-for="(item,i) in list" :key="i">
57
+                <td width="50">{{i+1}}</td>
58
+                <td width="100"  v-if="dialysisSett.device_number==1">
59
+                   {{item.device_number.zone.name}}{{item.device_number.number}}
60
+                </td>
61
+                <td width="100"  v-if="dialysisSett.name==1">
62
+                   {{item.patient.name}}
63
+                </td>
64
+                <td width="100" v-if="dialysisSett.dialysis_no==1">
65
+                   {{item.patient.dialysis_no}}
66
+                </td>
67
+                <td width="100" v-if="dialysisSett.admission_number==1">
68
+                   {{item.xt_receive_treatment_asses.admission_number}}
69
+                </td>
70
+                <td width="100"  v-if="dialysisSett.weight_befor==1">
71
+                  <span v-if="item.assessment_befor_dislysis.weight_before > 0">{{item.assessment_befor_dislysis.weight_before}} </span>  
72
+                </td>
73
+                <td width="100"  v-if="dialysisSett.dry_weight==1">
74
+                   <span v-if="item.assessment_befor_dislysis.dry_weight > 0">{{item.assessment_befor_dislysis.dry_weight}} </span> 
75
+                </td>
76
+                <td width="100"  v-if="dialysisSett.blood_pressure==1">
77
+                    <span v-if="item.assessment_befor_dislysis.systolic_blood_pressure>0">{{item.assessment_befor_dislysis.systolic_blood_pressure}}</span>
78
+                    <span v-if="item.assessment_befor_dislysis.diastolic_blood_pressure>0">/{{item.assessment_befor_dislysis.diastolic_blood_pressure}}</span> 
79
+                </td>
80
+                <td width="100" v-if="dialysisSett.ultrafiltration_volume==1">
81
+                   <span v-if="item.dialysis_solution.target_ultrafiltration>0">{{item.dialysis_solution.target_ultrafiltration}}</span>
82
+                </td>
83
+                <td width="200" v-if="dialysisSett.anticoagulant==1">
84
+                  <span>{{getAnticoagualnt(item.dialysis_solution.anticoagulant)}}</span>
85
+                  <span v-if="item.dialysis_solution.anticoagulant_shouji > 0">({{item.dialysis_solution.anticoagulant_shouji}})</span>
86
+                  <span v-if="item.dialysis_solution.anticoagulant_weichi > 0">({{item.dialysis_solution.anticoagulant_weichi}})</span>
87
+                  <span v-if="item.dialysis_solution.anticoagulant_zongliang > 0">({{item.dialysis_solution.anticoagulant_zongliang}})</span>
88
+                </td>
89
+                <td width="100" v-if="dialysisSett.dialysis_time ==1">
90
+                   <span v-if="item.dialysis_solution.dialysis_duration_hour >0">{{item.dialysis_solution.dialysis_duration_hour}}时</span>
91
+                   <span v-if="item.dialysis_solution.dialysis_duration_minute >0">{{item.dialysis_solution.dialysis_duration_minute}}分</span>
92
+                </td>
93
+                <td width="100"  v-if="dialysisSett.device_type==1">
94
+                   <span>{{item.assessment_befor_dislysis.machine_type}}</span>
95
+                </td>
96
+                <td width="100" v-if="dialysisSett.dialyzer_perfusion_apparatus == 1">
97
+                    <span>{{item.dialysis_solution.dialyzer_perfusion_apparatus}}</span>
98
+                </td>
99
+                <td width="100"  v-if="dialysisSett.dialysis_dialyszers == 1">
100
+                   <span>{{item.dialysis_solution.dialysis_dialyszers}}</span>
101
+                </td>
102
+                <td width="100" v-if="dialysisSett.dialysis_irrigation ==1">
103
+                     <span>{{item.dialysis_solution.dialysis_irrigation}}</span>
104
+                </td>
105
+                <td width="100"  v-if="dialysisSett.displace_liqui_part==1">
106
+                  <span>{{getDisplaceLiquiPart(item.dialysis_solution.displace_liqui_part)}}</span>
107
+                </td>
108
+                <td width="100"  v-if="dialysisSett.displace_liqui_value==1">
109
+                  <span v-if="item.dialysis_solution.displace_liqui_value > 0">{{item.dialysis_solution.displace_liqui_value}}</span>
110
+                </td>
111
+                <td width="100" v-if="dialysisSett.kalium==1">
112
+                   <span v-if="item.dialysis_solution.kalium >0">{{item.dialysis_solution.kalium}}</span>
113
+                </td>
114
+                <td width="100"  v-if="dialysisSett.sodium==1">
115
+                   <span v-if="item.dialysis_solution.sodium > 0">{{item.dialysis_solution.sodium}}</span>
116
+                </td>
117
+                <td width="100" v-if="dialysisSett.calcium==1">
118
+                  <span v-if="item.dialysis_solution.calcium >0">{{item.dialysis_solution.calcium}}</span>
119
+                </td>
120
+                <td width="100" v-if="dialysisSett.bicarbonate == 1">
121
+                   <span v-if="item.dialysis_solution.bicarbonate >0">{{item.dialysis_solution.bicarbonate}}</span>
122
+                </td>
123
+                <td width="100" v-if="dialysisSett.blood_access==1">
124
+                  <span>{{getBloodAccessOption(item.dialysis_solution.blood_access)}}</span>
125
+                </td>
126
+                <td width="100" v-if="dialysisSett.sealing_fluid_dispose == 1">
127
+                   <span> {{item.xt_assesment_after_dislysis.sealing_fluid_dispose}} </span>
128
+                </td>
129
+                <td width="100"  v-if="dialysisSett.glucose==1">
130
+                   <span>{{item.dialysis_solution.amylaceum?item.dialysis_solution.amylaceum:""}}</span> 
131
+                </td>
132
+                <td width="100"  v-if="dialysisSett.blood_flow_volume==1">
133
+                   <span>{{item.dialysis_solution.blood_flow_volume?item.dialysis_solution.blood_flow_volume:""}}</span> 
134
+                </td>
135
+               </tr>
136
+              </tbody>
137
+            </table>
138
+          </div>
139
+        </div>
140
+      </div>
141
+    </div>
142
+  </div>
143
+</template>
144
+
145
+<script>
146
+  import { getDialysisParameter } from '@/api/dialysis'
147
+  import { parseTime } from '@/utils'
148
+  import { uParseTime } from '@/utils/tools'
149
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
150
+  import print from 'print-js'
151
+  import { getDataConfig } from '@/utils/data'
152
+  export default {
153
+    name: 'SchedulePrint',
154
+    data() {
155
+      return {
156
+        crumbs: [
157
+          { path: false, name: '排班管理' },
158
+          { path: false, name: '透析参数打印' }
159
+        ],
160
+        td_1_width: '8%',
161
+        td_2_width: '8%',
162
+        td_3_width: '64%',
163
+        td_4_width: '20%',
164
+        month: 1,
165
+        begin_day: 1,
166
+        total:[],
167
+        list:[],
168
+        schedule_date:"",
169
+        schedule_type:0,
170
+        partition_type:0,
171
+        keywords:"",
172
+        loading:false,
173
+        tableData:[],
174
+        numberList:[],
175
+        partitionArr:[],
176
+        his_config:{},
177
+        typeList:[],
178
+        rowList:[],
179
+        dialysate_formulation:[],
180
+        body_fluid_option:[],
181
+        displace_liqui_part_option:[],
182
+        blood_access_option:[],
183
+        hemodialysisPipelinesOptions:[],
184
+        tableList:[],
185
+        list:[],
186
+        dialysisSett:{},
187
+      }
188
+    },
189
+    components: {
190
+      BreadCrumb
191
+    },
192
+    created() {
193
+      this.displace_liqui_part_option = this.$store.getters.displace_liqui
194
+      this.blood_access_option  = getDataConfig('hemodialysis', 'vascular_access_desc')
195
+      this.getlist()
196
+    },
197
+    methods: {
198
+    getlist(){
199
+       var params = {
200
+         schedule_date:this.$route.query.schedule_date,
201
+         schedule_type:this.$route.query.schedule_type,
202
+         partion_id:this.$route.query.partion_id,
203
+         page:this.$route.query.page,
204
+         limit:this.$route.query.limit,
205
+         ids:this.$route.query.ids,
206
+       }
207
+      console.log("params",params)
208
+      getDialysisParameter(params).then(response=>{
209
+          if(response.data.state == 1){
210
+            var list = response.data.data.list
211
+            this.list = list
212
+            this.dialysisSett = response.data.data.dialysisSett
213
+            console.log("设置",this.dialysisSett)
214
+          }
215
+      }) 
216
+     },
217
+     getTimeOne(val) {
218
+        if(val == ""){
219
+        return ""
220
+        }else {
221
+        return uParseTime(val, '{y}-{m}-{d}')
222
+        }
223
+     },
224
+      printAction: function() {
225
+        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; } }'
226
+
227
+        printJS({
228
+          printable: 'print_content',
229
+          type: 'html',
230
+          documentTitle: '  ',
231
+          style: style,
232
+          scanStyles: false
233
+       })
234
+      },
235
+      getAnticoagualnt(id){
236
+       var name = ""
237
+       if(id == 1){
238
+         name = "无肝素"
239
+       }
240
+       if(id == 2){
241
+        name = "普通肝素"
242
+       }
243
+       if(id == 3){
244
+         name ="低分子肝素"
245
+       }
246
+       if(id == 4){
247
+         name ="阿加曲班"
248
+       }
249
+       if(id == 5){
250
+         name ="枸橼酸钠"
251
+       }
252
+       if(id == 6){
253
+         name ="低分子肝素钙"
254
+       }
255
+       if(id == 7){
256
+         name ="低分子肝素钠"
257
+       }
258
+       if(id == 8){
259
+         name ="依诺肝素"
260
+       }
261
+       if(id == 9){
262
+         name ="达肝素"
263
+       }
264
+       if(id == 10){
265
+         name ="体外抗凝"
266
+       }
267
+       if(id == 11){
268
+         name ="那屈肝素"
269
+       }
270
+       if(id == 12){
271
+         name ="无抗凝剂"
272
+       }
273
+       if(id == 13){
274
+         name ="那屈肝素钙"
275
+       }
276
+       return name
277
+     },
278
+     getBloodAccessOption(id){
279
+       var name = ""
280
+       for(let i=0;i<this.blood_access_option.length;i++){
281
+         if(id == this.blood_access_option[i].id){
282
+            name = this.blood_access_option[i].name
283
+         }
284
+       }
285
+       return name
286
+     },
287
+     getDisplaceLiquiPart(id){
288
+       var name = ""
289
+       for(let i=0;i<this.displace_liqui_part_option.length;i++){
290
+         if(id == this.displace_liqui_part_option[i].id){
291
+            name = this.displace_liqui_part_option[i].name
292
+         }
293
+       }
294
+       return name
295
+     }
296
+    
297
+    }
298
+  }
299
+</script>
300
+
301
+<style rel="stylesheet/scss" lang="scss" scoped>
302
+  .print_main_content {
303
+    background-color: white;
304
+    width: 960px;
305
+    margin: 0 auto;
306
+    padding: 0 0 20px 0;
307
+
308
+  .order_title_panl {
309
+    text-align: center;
310
+
311
+  .main_title {
312
+    font-size: 18px;
313
+    line-height: 40px;
314
+    font-weight: 500;
315
+  }
316
+
317
+  }
318
+  .table_panel {
319
+
320
+  .table {
321
+    width: 100%;
322
+    border: 1px solid;
323
+    border-collapse: collapse;
324
+    padding: 2px;
325
+
326
+  thead {
327
+
328
+  tr {
329
+
330
+  td {
331
+    border: 1px solid;
332
+    text-align: center;
333
+    font-size: 20px;
334
+    padding: 15px 5px;
335
+  }
336
+
337
+  }
338
+  }
339
+  tbody {
340
+
341
+  tr {
342
+
343
+  td {
344
+    border: 1px solid;
345
+    text-align: center;
346
+    font-size: 18px;
347
+    padding: 10px 5px;
348
+
349
+  .proj {
350
+    padding: 5px 0;
351
+    text-align: left;
352
+
353
+  .proj_title {
354
+    font-size: 16px;
355
+    font-weight: 500;
356
+    line-height: 25px;
357
+  }
358
+
359
+  .proj_item {
360
+    font-size: 15px;
361
+    line-height: 20px;
362
+
363
+  .zone_name {
364
+    font-weight: 500;
365
+  }
366
+
367
+  }
368
+  }
369
+  }
370
+  }
371
+  }
372
+  }
373
+  }
374
+  }
375
+</style>
376
+

+ 592 - 0
src/xt_pages/dialysis/details/consumable/signPrint.vue Datei anzeigen

@@ -0,0 +1,592 @@
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
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="table_panel">
21
+            <div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
22
+              <div class="signPrint" v-if="org_id != 10188 && org_id!=10217  && org_id!=10340 && org_id!=9671 && org_id!=9675">
23
+                <div>
24
+                 <span v-if="printObj.zone == 1">分区/</span>
25
+                 <span v-if="printObj.number == 1">床位号:</span>
26
+                 <span v-if="printObj.zone == 1">{{main_collection.zone.name}}/</span> 
27
+                 <span v-if="printObj.number == 1">{{main_collection.device_number.number}}</span>
28
+                </div>
29
+                <div>姓名:
30
+                  <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
31
+                  <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
32
+                </div>
33
+                <div v-if="printObj.anticoagulant == 1">抗凝剂:
34
+                  <span v-if="org_id == 10138 ">{{ main_collection.dialysis_solution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name + ' 5000iu/瓶' : ''}}</span>
35
+                  <span v-else >
36
+                   <span>{{getAnticoagulant(main_collection.dialysis_solution.mode_id)}}</span>
37
+                  </span>
38
+                </div>
39
+               <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340 || org_id == 9671 || org_id == 9675">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
40
+                <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340 || org_id == 9671 || org_id == 9675">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
41
+                <div v-if="printObj.anticoagulant_zongliang == 1">
42
+                  用量:
43
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 1">
44
+                   {{main_collection.dialysis_solution.anticoagulant_zongliang}}mg
45
+                  </span>
46
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 2">
47
+                    {{main_collection.dialysis_solution.anticoagulant_zongliang}}mg
48
+                  </span>
49
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 3">
50
+                    {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
51
+                  </span>
52
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 4">
53
+                    {{main_collection.dialysis_solution.anticoagulant_zongliang}}mg
54
+                  </span>
55
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 5">
56
+                     {{main_collection.dialysis_solution.anticoagulant_zongliang}}mg
57
+                   </span>
58
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 6">
59
+                   {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
60
+                  </span>
61
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 7">
62
+                    {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
63
+                   </span>
64
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 8">
65
+                     {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
66
+                  </span>
67
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 9">
68
+                     {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
69
+                  </span>
70
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 10">
71
+                     {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
72
+                    </span>
73
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 11">
74
+                    {{main_collection.dialysis_solution.anticoagulant_zongliang}}iu
75
+                   </span>
76
+                </div>
77
+                <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340 || org_id == 9671 || org_id == 9675">干体重:{{main_collection.assessment_befor_dislysis.dry_weight}}</div>
78
+                <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340 || org_id == 9671 || org_id == 9675">透前体重:{{main_collection.assessment_befor_dislysis.weight_before}}</div>
79
+                <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340 || org_id == 9671 || org_id == 9675">体重增加:{{(main_collection.assessment_befor_dislysis.weight_before - main_collection.assessment_befor_dislysis.dry_weight).toFixed(2)}}</div>
80
+                <div>用法:静脉注射</div>
81
+                <div>打印时间:{{currentDate}}</div>
82
+              </div>
83
+              <div class="signPrint" style="font-size:16px;" v-else>
84
+                <div style="margin-left:50px;">姓名:
85
+                  <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
86
+                  <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
87
+                  ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
88
+                </div>
89
+                <div class="printCell">
90
+                  <span>
91
+                    床号:{{ main_collection.device_number.number }}
92
+                    <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
93
+                    <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
94
+                    <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
95
+                  </span>
96
+                  <span>{{ printDate }}</span>
97
+                </div>
98
+                <div class="printCell">
99
+                  <span>干体重:{{main_collection.assessment_befor_dislysis.dry_weight}}Kg</span>
100
+                  <span>抗凝剂:{{ main_collection.dialysis_solution.anticoagulant ? anticoagulants_confit[main_collection.dialysis_solution.anticoagulant].name : ''}}</span>
101
+                </div>
102
+                <div class="printCell">
103
+                  <span>净重值:{{ main_collection.assessment_befor_dislysis.weight_before - main_collection.assessment_befor_dislysis.additional_weight }}Kg</span>
104
+                 首剂:<span v-if="main_collection.dialysis_solution.anticoagulant == 1">{{main_collection.dialysis_solution.anticoagulant_shouji}} mg</span>
105
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 2">
106
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}mg
107
+                  </span>
108
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 3">
109
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
110
+                  </span>
111
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 4">
112
+                   {{main_collection.dialysis_solution.anticoagulant_shouji}}mg
113
+                  </span>
114
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 5">
115
+                   {{main_collection.dialysis_solution.anticoagulant_shouji}} mg
116
+                   </span>
117
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 6">
118
+                   {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
119
+                  </span>
120
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 7">
121
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
122
+                   </span>
123
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 8">
124
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
125
+                  </span>
126
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 9">
127
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
128
+                  </span>
129
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 10">
130
+                     {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
131
+                    </span>
132
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 11">
133
+                    {{main_collection.dialysis_solution.anticoagulant_shouji}}iu
134
+                   </span>
135
+                 
136
+                </div>
137
+                <div class="printCell">
138
+                  <span>体重增加:{{ (main_collection.assessment_befor_dislysis.weight_before - main_collection.lastafterweight.weight_after).toFixed(2) }}Kg</span>
139
+                  维持:{{main_collection.dialysis_solution.anticoagulant_weichi}}
140
+                   <span v-if="main_collection.dialysis_solution.anticoagulant == 1">
141
+                    mg/h
142
+                  </span>
143
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 2">
144
+                    mg/h
145
+                  </span>
146
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 3">
147
+                   iu/h
148
+                  </span>
149
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 4">
150
+                    mg/h
151
+                  </span>
152
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 5">
153
+                    mg/h
154
+                   </span>
155
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 6">
156
+                   iu/h
157
+                  </span>
158
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 7">
159
+                   iu/h
160
+                   </span>
161
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 8">
162
+                    iu/h
163
+                  </span>
164
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 9">
165
+                    iu/h
166
+                  </span>
167
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 10">
168
+                    iu/h
169
+                    </span>
170
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 11">
171
+                    iu/h
172
+                   </span>
173
+              
174
+                </div>
175
+                <div class="printCell">
176
+                  <span>处方脱水量:{{ main_collection.dialysis_solution.target_ultrafiltration }}L</span>
177
+                  总量:{{main_collection.dialysis_solution.anticoagulant_zongliang}}
178
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 1">
179
+                    mg
180
+                  </span>
181
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 2">
182
+                    mg
183
+                  </span>
184
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 3">
185
+                    iu
186
+                  </span>
187
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 4">
188
+                   mg
189
+                  </span>
190
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 5">
191
+                    mg
192
+                   </span>
193
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 6">
194
+                   iu
195
+                  </span>
196
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 7">
197
+                    iu
198
+                   </span>
199
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 8">
200
+                     iu
201
+                  </span>
202
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 9">
203
+                   iu
204
+                  </span>
205
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 10">
206
+                    iu
207
+                    </span>
208
+                  <span v-if="main_collection.dialysis_solution.anticoagulant == 11">
209
+                   iu
210
+                   </span>
211
+          
212
+                </div>
213
+              </div>
214
+           </div>
215
+          </div>
216
+        </div>
217
+      </div>
218
+    </div>
219
+  </div>
220
+</template>
221
+
222
+<script>
223
+  import { getScheduleList,getPrintList,getNextScheduleWeekDay } from '@/api/schedule'
224
+  import { getDialysisParameter } from '@/api/dialysis'
225
+  import { parseTime } from '@/utils'
226
+  import { uParseTime } from '@/utils/tools'
227
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
228
+  import print from 'print-js'
229
+  const moment = require('moment')
230
+  export default {
231
+    name: 'SchedulePrint',
232
+    data() {
233
+      return {
234
+        crumbs: [
235
+          { path: false, name: '透析参数' },
236
+          { path: false, name: '标签打印' }
237
+        ],
238
+        scheduleData:[],
239
+        week_type: 0,
240
+        day:'',
241
+        td_1_width: '10%',
242
+        td_2_width: '10%',
243
+        td_3_width: '25%',
244
+        td_4_width: '45%',
245
+        modeOptions: null,
246
+        anticoagulants_confit:null,
247
+        currentDate:'',
248
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
249
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
250
+        org_id:0,
251
+        now_time:0,
252
+        zone:"",
253
+        pre_status:0,
254
+        printObj:{},
255
+        type:1,
256
+        printDate:'',
257
+        schedule_type:0,
258
+        schedule_date:0,
259
+        keyword:"",
260
+        page:0,
261
+        limit:0,
262
+      }
263
+    },
264
+    components: {
265
+      BreadCrumb
266
+    },
267
+    created() {
268
+     this.schedule_type = this.$route.query.schedule_type
269
+     this.partion_id = this.$route.query.partion_id
270
+     this.schedule_date = this.$route.query.schedule_date
271
+     this.keyword = this.$route.query.keyword
272
+     this.page = this.$route.query.page
273
+     this.limit = this.$route.query.limit
274
+     this.org_id = this.$store.getters.xt_user.org.id
275
+    
276
+     console.log("机构ID",this.org_id)
277
+     this.currentDate = this.getCurrentDate()
278
+
279
+    this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
280
+    this.modeOptions = this.$store.getters.treatment_mode
281
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
282
+    this.getPrintList()
283
+    
284
+
285
+    },
286
+    methods: {
287
+     getPrintList(){
288
+      getPrintList().then(response=>{
289
+         if(response.data.state == 1){
290
+           var list = response.data.data.list
291
+           console.log("打印设置",list)
292
+           this.printObj = list
293
+           this.getlist()
294
+         }
295
+      })
296
+     },
297
+      getlist(){
298
+         var params = {
299
+          schedule_type:this.schedule_type,
300
+          partion_id:this.partion_id,
301
+          schedule_date:this.schedule_date,
302
+          keywords:this.keyword,
303
+          page:this.page,
304
+          limit:this.limit,
305
+         }
306
+        getDialysisParameter(params).then(response=>{
307
+            if(response.data.state == 1){
308
+              var list = response.data.data.list
309
+              this.scheduleData = list
310
+             
311
+            }
312
+        }) 
313
+      },
314
+      getAdvice:function(doctor_advice) {
315
+        if (doctor_advice != null) {
316
+
317
+        let name = ""
318
+        for (let i = 0; i< doctor_advice.length; i++) {
319
+
320
+          let prescribing_number = ''
321
+          let single_dose = ''
322
+          let drug_spec = ''
323
+
324
+          if (doctor_advice[i].prescribing_number > 0) {
325
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
326
+          }
327
+          if (doctor_advice[i].single_dose > 0) {
328
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
329
+          }
330
+
331
+          if (doctor_advice[i].drug_spec > 0) {
332
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
333
+          }
334
+
335
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
336
+
337
+          if (doctor_advice[i].child.length > 0) {
338
+
339
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
340
+
341
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
342
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
343
+              } else {
344
+                doctor_advice[i].child[a]['presc'] = ''
345
+              }
346
+
347
+              if (doctor_advice[i].child[a].single_dose > 0) {
348
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
349
+              } else {
350
+                doctor_advice[i].child[a]['single'] = ''
351
+              }
352
+
353
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
354
+                + doctor_advice[i].child[a].advice_desc
355
+                + doctor_advice[i].child[a].drug_spec_unit
356
+                + doctor_advice[i].child[a].presc
357
+                + doctor_advice[i].child[a].single + "\n"
358
+            }
359
+
360
+          }
361
+        }
362
+          return name
363
+
364
+
365
+        }
366
+
367
+      },
368
+      printAction: function() {
369
+        const style = '@media print {.signPrint{margin-left:30px;} .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; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
370
+        const style1 = '@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; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
371
+        if(this.org_id == 10188 || this.org_id == 10217 || this.org_id == 10340){
372
+          printJS({
373
+            printable: 'print_content',
374
+            type: 'html',
375
+            documentTitle: '  ',
376
+            style: style1,
377
+            scanStyles: false
378
+          })
379
+        }else{
380
+          printJS({
381
+            printable: 'print_content',
382
+            type: 'html',
383
+            documentTitle: '  ',
384
+            style: style,
385
+            scanStyles: false
386
+          })
387
+        }
388
+        
389
+      }, getSchedulesType: function(type) {
390
+        let type_name = ''
391
+        switch (type) {
392
+          case 1:
393
+            type_name = '上午'
394
+            break
395
+          case 2:
396
+            type_name = '下午'
397
+            break
398
+          case 3:
399
+            type_name = '晚上'
400
+            break
401
+        }
402
+        return type_name
403
+      },
404
+      getCurrentDate: function () {
405
+        console.log(this.$route.query.week_type)
406
+        var myDate = new Date();
407
+        var year = myDate.getFullYear(); //年
408
+        var month = myDate.getMonth() + 1; //月
409
+        var day = myDate.getDate() + 7; //日
410
+        var newday = myDate.getDay();
411
+        var days = parseInt(this.$route.query.week_type);
412
+        var dayNum = parseInt(this.$route.query.week_type);
413
+        switch(days) {
414
+          case 1:
415
+            days = '星期一';
416
+            break;
417
+          case 2:
418
+            days = '星期二';
419
+            break;
420
+          case 3:
421
+            days = '星期三';
422
+            break;
423
+          case 4:
424
+            days = '星期四';
425
+            break;
426
+          case 5:
427
+            days = '星期五';
428
+            break;
429
+          case 6:
430
+            days = '星期六';
431
+            break;
432
+          case 7:
433
+            days = '星期日';
434
+            break;
435
+        }
436
+        if(newday > dayNum){
437
+          let lastDay = day - (newday - dayNum)
438
+          console.log("lastDay1",lastDay)
439
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
440
+          return str;
441
+        }else if(newday < dayNum){
442
+          let lastDay = day + (dayNum - newday)
443
+          console.log("lastDay2",lastDay)
444
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
445
+          return str;
446
+        }else{
447
+          var str = year + "年" + month + "月" + day + "日  " + days;
448
+          return str;
449
+        }
450
+
451
+
452
+      },
453
+
454
+       compare(property) {
455
+       return function (a, b) {
456
+          var value1 = a[property];
457
+          var value2 = b[property];
458
+          return value1 - value2;
459
+      }
460
+     },
461
+     getTime(val) {
462
+         if(val == ""){
463
+          return ""
464
+         }else {
465
+          return uParseTime(val, '{y}-{m}-{d}')
466
+         }
467
+      },
468
+    getAnticoagulant(name){
469
+     
470
+      if(name == 0){
471
+         name = ""
472
+       }
473
+       if(name == 1){
474
+         name = "无肝素"
475
+       }
476
+       if(name == 2){
477
+         name = "普通肝素"
478
+       }
479
+       if(name == 3){
480
+         name ="低分子肝素"
481
+       }
482
+
483
+       if(name == 4){
484
+         name = "阿加曲班"
485
+       }
486
+        if(name == 5){
487
+         name = "枸橼酸钠"
488
+       }
489
+        if(name == 6){
490
+         name = "低分子肝素钙"
491
+       }
492
+        if(name == 7){
493
+         name = "低分子肝素钠"
494
+       }
495
+
496
+       return name
497
+     },
498
+     getAnticoagulantZonliang(arr,mode_id){
499
+       var name = 0
500
+       if(arr.length > 0){
501
+         for(let i=0;i<arr.length;i++){
502
+          if(mode_id == arr[i].mode_id){
503
+            name = arr[i].anticoagulant_zongliang
504
+          }
505
+        } 
506
+       }
507
+       return name
508
+     }
509
+    }
510
+  }
511
+</script>
512
+
513
+<style rel="stylesheet/scss" lang="scss" scoped>
514
+.print_main_content {
515
+  background-color: white;
516
+  max-width: 1500px;
517
+  margin: 0 auto;
518
+  padding: 0 0 20px 0;
519
+
520
+  .order_title_panl {
521
+    text-align: center;
522
+
523
+    .main_title {
524
+      font-size: 18px;
525
+      line-height: 40px;
526
+      font-weight: 500;
527
+    }
528
+  }
529
+  .table_panel {
530
+    .table {
531
+      width: 100%;
532
+      border: 1px solid;
533
+      border-collapse: collapse;
534
+      padding: 2px;
535
+
536
+      thead {
537
+        tr {
538
+          td {
539
+            border: 1px solid;
540
+            text-align: center;
541
+            font-size: 20px;
542
+            padding: 15px 5px;
543
+          }
544
+        }
545
+      }
546
+      tbody {
547
+        tr {
548
+          td {
549
+            border: 1px solid;
550
+            text-align: center;
551
+            font-size: 18px;
552
+            padding: 10px 5px;
553
+
554
+            .proj {
555
+              padding: 5px 0;
556
+              text-align: left;
557
+
558
+              .proj_title {
559
+                font-size: 16px;
560
+                font-weight: 500;
561
+                line-height: 25px;
562
+              }
563
+
564
+              .proj_item {
565
+                font-size: 15px;
566
+                line-height: 20px;
567
+
568
+                .zone_name {
569
+                  font-weight: 500;
570
+                }
571
+              }
572
+            }
573
+          }
574
+        }
575
+      }
576
+    }
577
+  }
578
+}
579
+.signPrint{
580
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
581
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
582
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
583
+  margin-bottom: 20px;
584
+  padding: 20px 10px;
585
+}
586
+.printCell{
587
+  span{
588
+    display: inline-block;
589
+    width: 180px;
590
+  }
591
+}
592
+</style>

+ 384 - 0
src/xt_pages/outpatientCharges/statementTemplate/printSeven.vue Datei anzeigen

@@ -0,0 +1,384 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle" >湖南省社会医疗保险医疗费用结算单</div>
4
+
5
+    <table class="statementTable" border="1">
6
+      <tr>
7
+        <td width="80">机构名称</td>
8
+        <td colspan="4">{{info.fixmedins_name}}</td>
9
+        <td width="80">机构编码</td>
10
+        <td colspan="4">{{info.fixmedins_code}}</td>
11
+        <td width="100">医保结算级别</td>
12
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
13
+        <td width="100" v-else-if="info.hosp_lv == '2'">三级甲等</td>
14
+        <td width="100" v-else-if="info.hosp_lv == '3'">三级乙等</td>
15
+        <td width="100" v-else-if="info.hosp_lv == '4'">三级丙等</td>
16
+        <td width="100" v-else-if="info.hosp_lv == '5'">二级甲等</td>
17
+        <td width="100" v-else-if="info.hosp_lv == '6'">二级乙等</td>
18
+        <td width="100" v-else-if="info.hosp_lv == '7'">二级丙等</td>
19
+        <td width="100" v-else-if="info.hosp_lv == '8'">一级甲等</td>
20
+        <td width="100" v-else-if="info.hosp_lv == '9'">一级乙等</td>
21
+        <td width="100" v-else-if="info.hosp_lv == '10'">一级丙等</td>
22
+        <td width="100" v-else-if="info.hosp_lv == '11'">无等级</td>
23
+        <td width="100" v-else></td>
24
+
25
+      </tr>
26
+      <tr>
27
+        <td width="70">就医登记号</td>
28
+        <td colspan="7">{{info.psn_no}}</td>
29
+        <td width="50">门诊号</td>
30
+        <td colspan="3">{{info.number}}</td>
31
+      </tr>
32
+      <tr>
33
+        <td width="80">姓名</td>
34
+        <td width="80">{{info.psn_name}}</td>
35
+        <td width="80">性别</td>
36
+        <td width="50" v-if="info.gend == '1'">男</td>
37
+        <td width="50" v-if="info.gend == '2'">女</td>
38
+
39
+        <td width="80">出生日期</td>
40
+        <td width="100">{{info.brdy}}</td>
41
+        <td width="90">个人电脑号</td>
42
+        <td width="110"></td>
43
+        <td width="80">人员类别</td>
44
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
45
+        <td colspan="3" v-else-if="info.psn_type == '1101'">职工在职</td>
46
+        <td colspan="3" v-else-if="info.psn_type == '1102'">公务员在职</td>
47
+        <td colspan="3" v-else-if="info.psn_type == '1103'">灵活就业人员在职</td>
48
+        <td colspan="3" v-else-if="info.psn_type == '1160'">地方其他扩展人员</td>
49
+
50
+
51
+        <td colspan="3" v-else-if="info.psn_type == '12'">退休人员</td>
52
+        <td colspan="3" v-else-if="info.psn_type == '1201'">职工退休</td>
53
+        <td colspan="3" v-else-if="info.psn_type == '1202'">公务员退休</td>
54
+        <td colspan="3" v-else-if="info.psn_type == '1203'">灵活就业人员退休</td>
55
+        <td colspan="3" v-else-if="info.psn_type == '1260'">地方其他扩展人员</td>
56
+
57
+
58
+        <td colspan="3" v-else-if="info.psn_type == '13'">离休</td>
59
+        <td colspan="3" v-else-if="info.psn_type == '1300'">离休人员</td>
60
+        <td colspan="3" v-else-if="info.psn_type == '1360'">地方其他扩展人员</td>
61
+
62
+        <td colspan="3" v-else-if="info.psn_type == '14'">居民(未成年)</td>
63
+        <td colspan="3" v-else-if="info.psn_type == '1401'">新生儿</td>
64
+        <td colspan="3" v-else-if="info.psn_type == '1402'">学龄前儿童</td>
65
+        <td colspan="3" v-else-if="info.psn_type == '1403'">中小学生</td>
66
+        <td colspan="3" v-else-if="info.psn_type == '1404'">大学生</td>
67
+        <td colspan="3" v-else-if="info.psn_type == '1405'">未成年(未入学)</td>
68
+
69
+
70
+        <td colspan="3" v-else-if="info.psn_type == '15'">居民(成年)</td>
71
+        <td colspan="3" v-else-if="info.psn_type == '1501'">普通居民(成年)</td>
72
+        <td colspan="3" v-else-if="info.psn_type == '1560'">地方其他扩展身份</td>
73
+
74
+        <td colspan="3" v-else-if="info.psn_type == '16'">居民(老年)</td>
75
+        <td colspan="4" v-else></td>
76
+
77
+
78
+      </tr>
79
+      <tr>
80
+        <td>单位名称</td>
81
+        <td colspan="5">{{info.emp_name}}</td>
82
+        <td width="80">联系电话</td>
83
+        <td width="110">{{info.patient.phone}}</td>
84
+        <td width="80">身份证号</td>
85
+        <td colspan="3">{{info.certno}}</td>
86
+      </tr>
87
+
88
+      <tr>
89
+        <td>险种</td>
90
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
91
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
92
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
93
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
94
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
95
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
96
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
97
+
98
+
99
+        <td>入院第一诊断</td>
100
+        <td colspan="3">{{info.dise_name}}</td>
101
+        <td>出院第一诊断</td>
102
+        <td colspan="6">{{info.dise_name}}</td>
103
+      </tr>
104
+      <tr>
105
+        <td>业务类别</td>
106
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
107
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
108
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
109
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
110
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
111
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
112
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
113
+
114
+        <td>结算时间</td>
115
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
116
+      </tr>
117
+      <tr>
118
+        <td colspan="12" style="text-align:left;padding-left:10px;">
119
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
120
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.psn_pay - info.preselfpay_amt).toFixed(2)}} )
121
+
122
+        </td>
123
+      </tr>
124
+      <tr>
125
+        <td>费用名称</td>
126
+        <td colspan="2">总费用</td>
127
+        <td>自费</td>
128
+        <td colspan="2">部分项目自付</td>
129
+        <td>费用名称</td>
130
+        <td colspan="2">总费用</td>
131
+        <td>自费</td>
132
+        <td colspan="2">部分项目自付</td>
133
+      </tr>
134
+      <tr>
135
+        <td>床位费</td>
136
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
137
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
138
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
139
+        <td>西成药</td>
140
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
141
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
142
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
143
+      </tr>
144
+      <tr>
145
+        <td>中药费</td>
146
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
147
+        <td style="text-align:right;padding-right:10px;">0</td>
148
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
149
+        <td>中成药</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
151
+        </td>
152
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
153
+        <td colspan="2" style="text-align:right;padding-right:10px;">
154
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
155
+        </td>
156
+      </tr>
157
+      <tr>
158
+        <td>中草药</td>
159
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
160
+        <td style="text-align:right;padding-right:10px;">0</td>
161
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
162
+        <td>检查费</td>
163
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
164
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
165
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
166
+      </tr>
167
+      <tr>
168
+        <td>治疗费</td>
169
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
170
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
172
+        <td>放射费</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
+        <td style="text-align:right;padding-right:10px;">0</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
176
+      </tr>
177
+      <tr>
178
+        <td>手术费</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
180
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
182
+        <td>化验费</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
184
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
186
+      </tr>
187
+      <tr>
188
+        <td>输血费</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
190
+        <td style="text-align:right;padding-right:10px;">0</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
192
+        <td>输氧费</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
194
+        <td style="text-align:right;padding-right:10px;">0</td>
195
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
196
+      </tr>
197
+      <tr>
198
+        <td>其他</td>
199
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
200
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
202
+        <td>麻醉费</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+        <td style="text-align:right;padding-right:10px;">0</td>
205
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
+      </tr>
207
+      <tr>
208
+        <td>材料费</td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
210
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
212
+        <td>特殊检查费</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
214
+        <td style="text-align:right;padding-right:10px;">0</td>
215
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
216
+      </tr>
217
+      <tr>
218
+        <td>特殊治疗费</td>
219
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
220
+        <td style="text-align:right;padding-right:10px;">0</td>
221
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
222
+        <td style="text-align:right;padding-right:10px;"></td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
224
+        <td style="text-align:right;padding-right:10px;"></td>
225
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
226
+      </tr>
227
+      <tr>
228
+        <td>合计</td>
229
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
230
+            parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
231
+            parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
232
+            parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
233
+            parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
234
+        </td>
235
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
236
+            parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
237
+            parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
238
+            parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
239
+            parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
240
+        </td>
241
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
242
+            parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
243
+            parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
244
+            parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
245
+            parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
246
+            parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
247
+        </td>
248
+        <td style="text-align:right;padding-right:10px;"></td>
249
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
250
+        <td style="text-align:right;padding-right:10px;"></td>
251
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
252
+      </tr>
253
+      <tr>
254
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
255
+        <td colspan="3">{{info.hifp_pay}}</td>
256
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
257
+        <td colspan="3">{{info.hifob_pay}}</td>
258
+      </tr>
259
+      <tr>
260
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
261
+        <td colspan="3">{{info.hifmi_pay}}</td>
262
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
263
+        <td colspan="3">{{info.hifes_pay}}</td>
264
+      </tr>
265
+      <tr>
266
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
267
+        <td colspan="3">{{info.maf_pay}}</td>
268
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
269
+        <td colspan="3">{{info.cvlserv_pay}}</td>
270
+      </tr>
271
+      <tr>
272
+        <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
273
+        <td colspan="3">{{info.oth_pay}}</td>
274
+        <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
275
+        <td colspan="3">{{info.acct_pay}}</td>
276
+      </tr>
277
+      <tr>
278
+        <td>收款人:</td>
279
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
280
+        <td>审核人:</td>
281
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id == 10106">{{'梅晓辉'}}</td>
282
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id != 10106">{{info.p_admin.user_name}}</td>
283
+
284
+        <td>制单人:</td>
285
+        <td colspan="2">{{info.p_admin.user_name}}</td>
286
+        <td>打印日期</td>
287
+        <td colspan="2">{{getNowTime()}}</td>
288
+      </tr>
289
+      <tr>
290
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
291
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
292
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
293
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
294
+        </td>
295
+      </tr>
296
+      <tr>
297
+        <td colspan="12" style="text-align:left;padding-left:10px;">
298
+          病人家属签字:
299
+        </td>
300
+      </tr>
301
+    </table>
302
+  </div>
303
+</template>
304
+<script>
305
+export default {
306
+  props: {
307
+    info: {
308
+      type: Object,
309
+      default: function() {
310
+        return {}
311
+      }
312
+    }, p_admin: {
313
+      type: Object,
314
+      default: function() {
315
+        return {}
316
+      }
317
+    }, charge_admin: {
318
+      type: Object,
319
+      default: function() {
320
+        return {}
321
+      }
322
+    }
323
+  },methods:{
324
+    getDay(dateString1,dateString2){
325
+      var  startDate = Date.parse(dateString1);
326
+      var  endDate = Date.parse(dateString2);
327
+      if (startDate>endDate){
328
+        return 0;
329
+      }
330
+      if (startDate==endDate){
331
+        return 1;
332
+      }
333
+      var days=(endDate - startDate)/(1*24*60*60*1000);
334
+      return  days;
335
+
336
+    },
337
+    getNowTime: function () {
338
+      let dateTime;
339
+      let yy = new Date().getFullYear();
340
+      let mm = new Date().getMonth() + 1;
341
+      let dd = new Date().getDate();
342
+      let hh = new Date().getHours();
343
+      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
344
+          :
345
+          new Date().getMinutes();
346
+      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
347
+          :
348
+          new Date().getSeconds();
349
+      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
350
+      return dateTime
351
+    },
352
+
353
+  }
354
+}
355
+
356
+
357
+</script>
358
+
359
+
360
+<style lang="scss" scoped>
361
+.statement-print {
362
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
363
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
364
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
365
+  margin-bottom: 20px;
366
+  padding: 20px 10px;
367
+}
368
+
369
+.statementTitle {
370
+  font-size: 28px;
371
+  text-align: center;
372
+  font-weight: bold;
373
+  margin-bottom: 10px;
374
+}
375
+
376
+.statementTable {
377
+  width: 100%;
378
+  text-align: center;
379
+  border-collapse: collapse;
380
+  line-height: 40px;
381
+  font-size: 14px;
382
+  border-color: #000;
383
+}
384
+</style>

+ 848 - 0
src/xt_pages/stock/drugs/newDrugInventory.vue Datei anzeigen

@@ -0,0 +1,848 @@
1
+<template>
2
+  <div>
3
+    <div v-show="showSearch">
4
+    <label class="title"><span class="name">仓库</span> :</label>
5
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStorehouse">
6
+          <el-option
7
+            v-for="(option, index) in houseList"
8
+            :key="index"
9
+            :label="option.storehouse_name"
10
+            :value="option.id">
11
+          </el-option>
12
+      </el-select>   
13
+
14
+  </div>
15
+   <div>
16
+    <div style="margin-top:20px">日期:{{nowTime}}   盘点人:{{user_name}}</div>
17
+    <div style="float:right;margin-bottom:10px"><el-button type="primary" @click="saveInentoryList">保存</el-button></div>
18
+    <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" style="width:100%">
19
+            <el-table-column prop="date" label="药品名称" width="150" align="center">
20
+            <template slot-scope="scope">
21
+                {{scope.row.drug_name}}
22
+            </template>
23
+            </el-table-column>
24
+            <el-table-column  prop="name" label="规格" width="100"  align="center">
25
+            <template slot-scope="scope">
26
+                {{scope.row.specification_name}}
27
+            </template>
28
+            </el-table-column>
29
+            <el-table-column  prop="name" label="入库单号" width="100"  align="center">
30
+            <template slot-scope="scope">
31
+                {{scope.row.warehousing_order}}
32
+            </template>
33
+            </el-table-column>
34
+            <el-table-column  prop="name" label="有效期" width="100"  align="center">
35
+            <template slot-scope="scope">
36
+                {{getTime(scope.row.expiry_date)}}
37
+            </template>
38
+            </el-table-column>
39
+            <el-table-column prop="name" label="批号" width="100"  align="center">
40
+                <template slot-scope="scope">
41
+                {{scope.row.batch_number}}
42
+            </template>
43
+            </el-table-column>
44
+            <el-table-column prop="name" label="进货价" width="100"  align="center">
45
+                <template slot-scope="scope">
46
+                {{scope.row.price}}
47
+                </template> 
48
+            </el-table-column>
49
+        
50
+            <el-table-column prop="name" label="生产厂商" width="100"  align="center">
51
+                <template slot-scope="scope">
52
+                {{scope.row.manufacturer_name}}
53
+                </template> 
54
+            </el-table-column>
55
+            <el-table-column prop="name" label="仓库名称" width="100"  align="center">
56
+                <template slot-scope="scope">
57
+                {{getHouseName(scope.row.storehouse_id)}}
58
+                </template> 
59
+            </el-table-column>
60
+            <el-table-column prop="name" label="盘点前数量" width="180"  align="center">
61
+            <template slot-scope="scope">
62
+                <span><el-input style="width:100px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
63
+                <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.stock_min_number" :disabled="true"></el-input>{{scope.row.min_unit}}</span> 
64
+                </template> 
65
+            </el-table-column>
66
+
67
+            <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
68
+            <template slot-scope="scope">
69
+                <el-input style="width:100px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
70
+                <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span> 
71
+                </template> 
72
+            </el-table-column>
73
+
74
+            <el-table-column prop="name" label="盘点原因" width="180"  align="center">
75
+            <template slot-scope="scope">
76
+                <el-select v-model="scope.row.type" placeholder="请选择">
77
+                    <el-option
78
+                    v-for="item in reasonList"
79
+                    :key="item.id"
80
+                    :label="item.name"
81
+                    :value="item.id">
82
+                    </el-option>
83
+                </el-select>
84
+                </template> 
85
+            </el-table-column>
86
+            
87
+            <el-table-column prop="name"  width="200"  align="center">
88
+            <template slot-scope="scope">
89
+                <span><el-button type="danger" @click="toDelete(scope.$index,scope.row.drug_id)">不盘点此批次</el-button></span>
90
+                </template> 
91
+            </el-table-column>
92
+        </el-table>
93
+   </div>
94
+  </div>
95
+</template>
96
+
97
+<script>
98
+import { uParseTime } from '@/utils/tools'
99
+import { postSearchDrugWarehouseList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory,getDrugWarehouseInfoTotal,deleteDrugInventory,saveInentoryList,getDrugInventoryWarehouseInfoList} from "@/api/drug/drug"
100
+import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
101
+import { getDataConfig } from '@/utils/data'
102
+const moment = require("moment");
103
+export default {
104
+    name: "drugInventory",
105
+    data() {
106
+        return{
107
+            nowTime: moment(new Date()).format("YYYY-MM-DD HH:MM:SS"),
108
+            user_name:this.$store.getters.xt_user.user.user_name,
109
+            searchKey:'',
110
+            value1:'',
111
+            value2:'',
112
+            tableData: [],
113
+            dialogVisible:false,
114
+            form: {
115
+                id:"",
116
+                drug_name: '',
117
+                retail_price :'',
118
+                new_price:"",
119
+                count:"",
120
+                remark:"",
121
+                warehousing_order:"",
122
+                manufacturer:"",
123
+                dealer:"",
124
+                number:"",
125
+                warehousing_unit:"",
126
+                specification_name:"",
127
+                buy_price:"",
128
+                drug_id:"",
129
+                packing_unit:"",
130
+                drug_origin_place:"",
131
+                report_count:"",
132
+                total:"",
133
+                dose:"",
134
+                dose_unit:"",
135
+                min_number:"",
136
+                min_unit:"",
137
+                max_unit:"",
138
+                last_price:"",
139
+                batch_number:"",
140
+                product_date:"",
141
+                expiry_date:"",
142
+                warehouse_info_id:"",
143
+                proof_count:"",
144
+                min_count:"",
145
+                min_unit:"",
146
+                storehouse_id:"",
147
+            },
148
+            total: 0,
149
+            editdialogVisible:false,
150
+            limit:10,
151
+            page:1,
152
+            start_time:"",
153
+            end_time:"",
154
+            tableList:[],
155
+            doctorList:[],
156
+            checkDialogVisible:false,
157
+            ids:"",
158
+            checker:this.$store.getters.xt_user.user.id,
159
+            check_time:new Date(),
160
+            id:"",
161
+            modifydialogVisible:false,
162
+            numberList:[],
163
+            profdialogVisible:false,
164
+            index:"",
165
+            unitList:[],
166
+            reasonList:[
167
+              {id:6,name:"默认"},
168
+              {id:1,name:"到期退货"},
169
+              {id:2,name:"异常退货"},
170
+              {id:3,name:"退货"},
171
+              {id:4,name:"损坏"},
172
+              {id:5,name:"不计入报损分析"},
173
+              {id:7,name:"有效期到期"},
174
+            ],
175
+            activeNames: [0,1,2,3,4,5,6,7,8,9,10],
176
+            showTable:false,
177
+            showSearch:true,
178
+            inventory_total:0,
179
+            WarehouseList:[],
180
+            showTableOne:false,
181
+            panShow:true,
182
+            panOneShow:true,
183
+            houseList:[],
184
+            storehouse_id:"",
185
+        }
186
+    },
187
+    methods:{
188
+        changeNumber(val){
189
+          this.form.warehouse_info_id = val
190
+          this.getDrugWarehouseInfoTotal(val)
191
+        },
192
+        search(){
193
+          this.getlist()
194
+        },
195
+        print(){
196
+          if(this.ids == ""){
197
+           this.$message.error("请勾选打印数据")
198
+           return false
199
+          }
200
+          this.$router.push({path:'/stock/drugs/inventoryPrint?ids='+this.ids})
201
+            
202
+        },
203
+        handleSizeChange(val){
204
+          this.limit = val
205
+          this.getlist()
206
+        },
207
+        handleCurrentChange(val){
208
+          this.page = val
209
+          this.getlist()
210
+        },
211
+        querySearchAsync(keyword, cb) {
212
+            let key = '';
213
+            if (keyword != undefined) {
214
+                key = keyword
215
+            }
216
+             var params = {
217
+                keyword:key,
218
+                storehouse_id:this.storehouse_id,
219
+             }
220
+            
221
+            postSearchDrugWarehouseList(params).then(response => {
222
+            if (response.data.state == 1) {
223
+            
224
+                var list = response.data.data.list
225
+                // console.log("列表数据",list)
226
+                this.drugList = list
227
+                var manufacturerList = response.data.data.manufacturerList
228
+                this.manufacturerList = manufacturerList
229
+                var dealer =  response.data.data.dealerList
230
+                this.dealerList = dealer
231
+                for(let i=0;i<this.drugList.length;i++){
232
+                    for(let j=0;j<this.manufacturerList.length;j++){
233
+                    if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
234
+                        this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
235
+                    }
236
+                    }
237
+                }
238
+
239
+                for(let i=0;i<this.drugList.length;i++){
240
+                    for(let j=0;j<this.dealerList.length;j++){
241
+                        if(this.drugList[i].dealer == this.dealerList[j].id){
242
+                        this.drugList[i].dealer = this.dealerList[j].dealer_name
243
+                        }
244
+                    }
245
+                }
246
+            
247
+                cb(this.drugList)
248
+            } else {
249
+                cb([])
250
+             }
251
+          })
252
+         },
253
+      
254
+        getTime(val) {
255
+         if(val < 0){
256
+            return ""
257
+          }
258
+         if(val == ""){
259
+            return ""
260
+          }else {
261
+            return uParseTime(val, '{y}-{m}-{d}')
262
+         }
263
+        },
264
+        getTotal(total,max_unit,min_unit,min_number){
265
+            var str = ""
266
+            var min_str = ""
267
+            if(total<min_number){
268
+            str = ""
269
+            min_str = total + min_unit
270
+            }
271
+            if(total >= min_number){
272
+            if(parseInt(total/min_number)!=0){
273
+                str = parseInt(total/min_number)+ max_unit
274
+            }
275
+            if((total%min_number)!=0){
276
+                min_str =  total%min_number + min_unit
277
+            }
278
+            }
279
+        
280
+            return str + min_str
281
+        },
282
+        addInventory(){
283
+      
284
+          if(this.form.drug_name == ""){
285
+            this.$message.error("请输入药品名称")
286
+            return
287
+          }
288
+          if(this.form.batch_number == undefined){
289
+            this.$message.error("请选择批次")
290
+            return
291
+          }
292
+          if(this.form.count == ""){
293
+            this.$message.error("请输入盘点数量")
294
+            return
295
+          }
296
+          if(this.form.min_count == ""){
297
+            this.form.min_count = 0
298
+          }
299
+          var obj = {
300
+            drug_id:this.form.drug_id,
301
+            drug_name:this.form.drug_name,
302
+            warehousing_unit:this.form.warehousing_unit,
303
+            count:this.form.count,
304
+            min_count:this.form.min_count,
305
+            min_unit:this.form.min_unit,
306
+            retail_price:this.form.retail_price.toString(),
307
+            manufacturer:this.form.manufacturer,
308
+            drug_origin_place:this.form.drug_origin_place,
309
+            remark:this.form.remark,
310
+            new_price:this.form.new_price.toString(),
311
+            warehousing_order:this.form.warehousing_order,
312
+            dealer:this.form.dealer,
313
+            last_price:this.form.last_price,
314
+            start_time:this.getTime(new Date()),
315
+            number:this.form.number,  
316
+            total:this.form.total,
317
+            specification_name:this.form.specification_name,
318
+            batch_number:this.form.batch_number,
319
+            expiry_date:this.form.expiry_date,
320
+            product_date:this.form.product_date,
321
+            warehouse_info_id:this.form.warehouse_info_id,
322
+         } 
323
+      
324
+         this.tableData.push(obj) 
325
+         this.form.drug_name = ""  
326
+         this.form.warehousing_unit = ""
327
+         this.form.count = ""
328
+         this.form.retail_price = ""
329
+         this.form.manufacturer = ""
330
+         this.form.drug_origin_place = ""
331
+         this.form.number = ""
332
+         this.form.remark = ""
333
+         this.form.new_price = ""
334
+         this.form.warehousing_order = ""
335
+         this.form.dealer = ""
336
+         this.form.last_price = ""
337
+         this.form.number = ""
338
+         this.form.total = ""
339
+         this.form.specification_name = ""
340
+         this.form.batch_number = ""
341
+         this.form.expiry_date = ""
342
+         this.form.product_date = ""
343
+        },
344
+        toEdit(val,index){
345
+           this.form.id= val.id
346
+           this.form.drug_id = val.drug_id,
347
+           this.form.drug_name = val.drug_name
348
+           this.form.retail_price = val.retail_price
349
+           this.form.warehousing_order = val.warehousing_order
350
+           this.form.number = val.number
351
+           this.form.dealer = val.dealer
352
+           this.form.manufacturer = val.manufacturer
353
+           this.form.remark = val.remark
354
+           this.form.warehousing_unit = val.warehousing_unit  
355
+           this.form.total = val.total
356
+           this.form.batch_number = val.batch_number
357
+           this.form.last_price = val.last_price
358
+           this.form.specification_name =  val.specification_name
359
+           this.form.expiry_date = val.expiry_date
360
+           this.form.product_date =val.product_date  
361
+           this.form.count = val.count
362
+           this.form.min_count = val.min_count
363
+           this.form.min_unit = val.min_unit
364
+           this.index = index
365
+           this.editdialogVisible = true
366
+        },
367
+        saveInventory(){
368
+          for(let i=0;i<this.tableData.length;i++){
369
+             if(this.form.id == this.tableData[i].id){
370
+               this.tableData[i].drug_id = this.form.drug_id
371
+               this.tableData[i].drug_name = this.form.drug_name
372
+               this.tableData[i].retail_price = this.form.retail_price
373
+               this.tableData[i].warehousing_order = this.form.warehousing_order
374
+               this.tableData[i].number = this.form.number
375
+               this.tableData[i].dealer = this.form.dealer
376
+               this.tableData[i].manufacturer = this.form.manufacturer
377
+               this.tableData[i].remark = this.form.remark
378
+               this.tableData[i].warehouseing_unit = this.form.warehousing_unit
379
+               this.tableData[i].total = this.form.total
380
+               this.tableData[i].batch_number = this.form.batch_number
381
+               this.tableData[i].last_price = this.form.last_price
382
+               this.tableData[i].specification_name = this.form.specification_name
383
+               this.tableData[i].expiry_date = this.form.expiry_date
384
+               this.tableData[i].product_date = this.form.product_date
385
+               this.tableData[i].count =this.form.count
386
+               this.tableData[i].min_unit = this.form.min_unit
387
+               this.tableData[i].min_count = this.form.min_count
388
+             }
389
+            if(this.index == i){
390
+               this.tableData[i].drug_id = this.form.drug_id
391
+               this.tableData[i].drug_name = this.form.drug_name
392
+               this.tableData[i].retail_price = this.form.retail_price
393
+               this.tableData[i].warehousing_order = this.form.warehousing_order
394
+               this.tableData[i].number = this.form.number
395
+               this.tableData[i].dealer = this.form.dealer
396
+               this.tableData[i].manufacturer = this.form.manufacturer
397
+               this.tableData[i].remark = this.form.remark
398
+               this.tableData[i].warehouseing_unit = this.form.warehousing_unit
399
+               this.tableData[i].total = this.form.total
400
+               this.tableData[i].batch_number = this.form.batch_number
401
+               this.tableData[i].last_price = this.form.last_price
402
+               this.tableData[i].specification_name = this.form.specification_name
403
+               this.tableData[i].expiry_date = this.form.expiry_date
404
+               this.tableData[i].product_date = this.form.product_date
405
+               this.tableData[i].count =this.form.count
406
+               this.tableData[i].min_unit = this.form.min_unit
407
+               this.tableData[i].min_count = this.form.min_count
408
+             }
409
+          }   
410
+          this.editdialogVisible = false
411
+        },
412
+        saveDrugInventory(){
413
+           for(let i=0;i<this.tableData.length;i++){
414
+              this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
415
+              this.tableData[i].last_price = this.tableData[i].last_price.toString()
416
+              this.tableData[i].count = parseInt(this.tableData[i].count)
417
+              this.tableData[i].min_count = parseInt(this.tableData[i].min_count)
418
+              if(this.tableData[i].expiry_date == undefined){
419
+                this.tableData[i].expiry_date  = 0
420
+              }else{
421
+               this.tableData[i].expiry_date = this.tableData[i].expiry_date
422
+              }
423
+              if( this.tableData[i].product_date  == undefined){
424
+                this.tableData[i].product_date = 0
425
+              }else{
426
+               this.tableData[i].product_date = this.tableData[i].product_date
427
+              }
428
+              
429
+             
430
+              if(this.tableData[i].dealer == 0){
431
+                this.tableData[i].dealer = ""
432
+              }
433
+               if(this.tableData[i].manufacturer == 0){
434
+                this.tableData[i].manufacturer = ""
435
+              }
436
+              if(this.tableData[i].batch_number == undefined){
437
+                 this.tableData[i].batch_number = ""
438
+              }
439
+           }
440
+           var params = {
441
+              tableData:this.tableData
442
+           }
443
+          saveDrugInventory(params).then(response=>{
444
+            if(response.data.state == 1){
445
+              var msg = response.data.data.msg
446
+              this.$message.success("保存成功")
447
+              this.getlist()
448
+              this.editdialogVisible = false
449
+              this.dialogVisible = false
450
+            }
451
+          })
452
+        },
453
+        getlist(){
454
+          var params = {
455
+            limit:this.limit,
456
+            page:this.page,
457
+            keyword:this.searchKey, 
458
+            start_time:this.start_time,
459
+            end_time:this.end_time,
460
+          }
461
+          getDrugInventoryList(params).then(response=>{
462
+
463
+            if(response.data.state == 1){
464
+              this.total =  response.data.data.total
465
+              this.tableList = []
466
+              this.tableList = response.data.data.list
467
+              this.doctorList =[]
468
+              this.doctorList =  response.data.data.doctorList
469
+              this.houseList = []
470
+              this.houseList = response.data.data.houseList
471
+
472
+              this.storehouse_id = response.data.data.houseConfig.drug_storehouse_out
473
+              this.getDrugInventoryWarehouseInfoList()
474
+            }
475
+          })
476
+        },
477
+        getDoctorName(id){
478
+          var name = ""
479
+          for(let i=0;i<this.doctorList.length;i++){
480
+            if(id == this.doctorList[i].admin_user_id){
481
+                name = this.doctorList[i].user_name
482
+            }
483
+          }
484
+          return name
485
+        },
486
+     changePrice(val){  
487
+        var arr = []
488
+        for(let i=0;i<val.length;i++){
489
+            arr.push(val[i].id)
490
+        }
491
+        var str = arr.join(",") 
492
+        this.ids = str
493
+        },
494
+      toCheck(){
495
+        if(this.ids.length <=0){
496
+            this.$message.error("请勾选核对数据")
497
+            return
498
+        }else{
499
+            this.checkDialogVisible = true
500
+        }
501
+     },
502
+      SaveDrugCheckedInventory(){
503
+         var params = {
504
+            ids:this.ids,
505
+            check_time:this.getTime(this.check_time),
506
+            checker:this.checker,
507
+         }
508
+       SaveDrugCheckedInventory(params).then(response=>{
509
+         if(response.data.state == 1){
510
+           this.$message.success("保存成功")
511
+           var msg = response.data.data.msg
512
+           this.checkDialogVisible = false
513
+           this.tableData = []
514
+           this.getlist()
515
+         }
516
+       })
517
+     },
518
+     editInventory(id,check_status){
519
+      if(check_status == 1){
520
+        this.$message.error("已核对不能编辑")
521
+        return false
522
+      }
523
+       getDrugInventoryDetail(id).then(response=>{
524
+         if(response.data.state == 1){
525
+            var detail = response.data.data.detail
526
+            
527
+            this.id = detail.id
528
+            this.form.drug_id = detail.drug_id
529
+            this.form.drug_name = detail.drug_name
530
+            this.form.specification_name = detail.specification_name
531
+            this.form.retail_price = detail.retail_price
532
+            this.form.warehousing_order =detail.warehousing_order
533
+            this.form.number = detail.number
534
+        
535
+            this.form.manufacturer = detail.manufacturer
536
+            this.form.remark = detail.remark
537
+            this.form.warehousing_unit = detail.warehousing_unit
538
+            this.form.total = detail.total
539
+        
540
+            this.form.last_price = detail.last_price
541
+           
542
+            this.form.count =  parseInt(detail.count)
543
+            this.form.drug_origin_place = detail.drug_origin_place
544
+            this.form.stock_max_number = detail.stock_max_number
545
+            this.form.stock_min_number = detail.stock_min_number
546
+            this.form.warehouse_info_id = detail.warehouse_info_id
547
+            this.form.min_unit = detail.min_unit
548
+            this.form.min_count = detail.min_count
549
+            this.modifydialogVisible = true
550
+         }
551
+       })
552
+     },
553
+     modifyInventory(){
554
+       var params = {
555
+          id:this.id,
556
+          drug_id:this.form.drug_id,
557
+          drug_name:this.form.drug_name,
558
+          specification_name:this.form.specification_name,
559
+          warehousing_unit:this.form.warehousing_unit,
560
+          last_price:this.form.last_price,
561
+          retail_price:this.form.retail_price,
562
+          count:parseInt(this.form.count),
563
+          total:this.form.total,
564
+          drug_origin_place:this.form.drug_origin_place,
565
+          batch_number:this.form.batch_number,
566
+          manufacturer:this.form.manufacturer,
567
+          remark:this.form.remark,
568
+          stock_max_number:this.form.stock_max_number,
569
+          stock_min_number:this.form.stock_min_number,
570
+          warehouse_info_id:this.form.warehouse_info_id,
571
+          min_count:parseInt(this.form.min_count),
572
+          min_unit:this.form.min_unit,
573
+       }
574
+    
575
+      
576
+      modifyInventory(params).then(response=>{
577
+         if(response.data.state == 1){
578
+           var inventory =  response.data.data.inventory
579
+           this.modifydialogVisible = false
580
+           this.getlist()
581
+         }
582
+      })
583
+     },
584
+     deleteDrugInventory(id,check_status,index){
585
+       if(check_status == 1){
586
+          this.$message.error("已核对的不能编辑")
587
+          return
588
+        }
589
+        this.$confirm('是否删除所选内容?', '提示', {
590
+          confirmButtonText: '确定',
591
+          cancelButtonText: '取消',
592
+          type: 'warning'
593
+        }).then(() => {
594
+        
595
+       deleteDrugInventory(id).then(response => {
596
+            if (response.data.state == 1) {
597
+              var msg = response.data.data.msg
598
+              this.$message.success("保存成功")
599
+              this.tableList.splice(index,1)
600
+            } 
601
+          })
602
+        }).catch(() => {
603
+          this.loading = false
604
+        });   
605
+     },
606
+    toMove(item,index){
607
+      
608
+       this.$confirm('此操作将移除药品整个批次, 是否继续?', '提示', {
609
+          confirmButtonText: '确定',
610
+          cancelButtonText: '取消',
611
+          type: 'warning'
612
+        }).then(() => {
613
+          this.tableData.splice(index,1)
614
+          this.WarehouseList = []
615
+          this.activeNames = [0,1,2,3,4,5,6,7,8,9,10]
616
+         
617
+        }).catch(() => {
618
+          this.loading = false
619
+        });   
620
+    },
621
+    toDelete(index,drug_id){
622
+      
623
+      for(let i=0;i<this.tableData.length;i++){
624
+         if(drug_id == this.tableData[i].drug_id){
625
+           this.tableData.splice(index,1)
626
+         }
627
+      }
628
+    },
629
+      getDrugBatchNumber(id){
630
+            var params = {
631
+              id:id
632
+            }
633
+          getDrugBatchNumber(params).then(response=>{
634
+            if(response.data.state == 1){
635
+              var list = response.data.data.list
636
+              this.numberList = list
637
+            }
638
+          })
639
+       },
640
+       toProof(id){
641
+         getDrugInventoryDetail(id).then(response=>{
642
+          if(response.data.state == 1){
643
+            var detail = response.data.data.detail
644
+            this.id = detail.id
645
+            this.form.drug_id = detail.drug_id
646
+            this.form.drug_name = detail.drug_name
647
+            this.form.specification_name = detail.specification_name
648
+            this.form.retail_price = detail.retail_price
649
+            this.form.warehousing_order =detail.warehousing_order
650
+            this.form.number = detail.number
651
+            this.form.manufacturer = detail.manufacturer
652
+            this.form.remark = detail.remark
653
+            this.form.warehousing_unit = detail.warehousing_unit
654
+            this.form.total = detail.total
655
+            this.form.last_price = detail.last_price
656
+            this.form.count =  parseInt(detail.count)
657
+            this.form.drug_origin_place = detail.drug_origin_place
658
+            this.form.warehouse_info_id = detail.warehouse_info_id
659
+            this.profdialogVisible = true
660
+         }
661
+        })
662
+       },
663
+       proofInventory(){
664
+           var params = {
665
+             id:this.id,
666
+             warehouseing_unit:this.form.warehousing_unit,
667
+             warehouse_info_id:this.form.warehouse_info_id,
668
+             total:this.total.toString(),
669
+             remark:this.remark,
670
+             proof_count:parseInt(this.form.proof_count),
671
+           }
672
+         
673
+         SaveDrugProofInventory(params).then(response=>{
674
+            if(response.data.state == 1){
675
+              var inventory = response.data.data.inventory
676
+             
677
+              this.profdialogVisible = false
678
+              this.getlist()
679
+            }
680
+         })
681
+       },
682
+       changeStartTime(val){
683
+          this.start_time = this.getTime(val)
684
+          this.getlist()
685
+       },
686
+       changeEndTime(val){
687
+         this.end_time = this.getTime(val)
688
+         this.getlist()
689
+       },
690
+      getDrugWarehouseInfoTotal(val){
691
+        var params = {
692
+          id:val,
693
+        }
694
+      getDrugWarehouseInfoTotal(params).then(response=>{
695
+         if(response.data.state == 1){
696
+           var list = response.data.data.list
697
+          
698
+          var max_total = 0
699
+          var min_total = 0
700
+          for(let i=0;i<list.length;i++){
701
+            max_total += list[i].stock_max_number
702
+            min_total +=list[i].stock_min_number
703
+          }
704
+          
705
+          if(max_total >0 ){
706
+            this.form.total = max_total + list[0].XtBaseDrug.max_unit
707
+          }
708
+          if(min_total > 0){
709
+            this.form.total =  this.form.total + min_total + list[0].XtBaseDrug.min_unit 
710
+          }
711
+         }
712
+      })
713
+     },
714
+     getDataConfig(module, filed_name) {
715
+       return getDataConfig(module, filed_name)
716
+      },  
717
+    changeMaxUnit(val){
718
+      this.form.warehousing_unit = val
719
+    },
720
+    saveInentoryList(){
721
+     
722
+       for(let i=0;i<this.tableData.length;i++){
723
+         if(this.tableData[i].last_stock_max_number == ""){
724
+           this.tableData[i].last_stock_max_number = 0
725
+         }
726
+         if(this.tableData[i].last_stock_min_number == ""){
727
+           this.tableData[i].last_stock_min_number = 0
728
+         }
729
+         this.tableData[i].last_stock_max_number = parseInt(this.tableData[i].last_stock_max_number)
730
+         this.tableData[i].last_stock_min_number = parseInt(this.tableData[i].last_stock_min_number)
731
+
732
+         this.tableData[i].storehouse_id = this.storehouse_id
733
+       }
734
+       var arr = []
735
+       for(let i=0;i<this.tableData.length;i++){
736
+         if((this.tableData[i].stock_max_number!=this.tableData[i].last_stock_max_number) || (this.tableData[i].stock_min_number!=this.tableData[i].last_stock_min_number)){
737
+            arr.push(this.tableData[i])
738
+         }
739
+       }
740
+     if(arr.length == 0){
741
+       this.$message.error("请修改数据后保存!")
742
+       loading.close()
743
+       return false
744
+      }
745
+       var params = {
746
+         tableData:arr
747
+       }
748
+      console.log("arr23233232w",arr)
749
+     const loading = this.$loading({
750
+        lock: true,
751
+        text: 'Loading',
752
+        spinner: 'el-icon-loading',
753
+        background: 'rgba(0, 0, 0, 0.7)'
754
+      })  
755
+      saveInentoryList(params).then(response=>{
756
+        if(response.data.state == 1){
757
+           var inventory = response.data.data.inventory
758
+           loading.close()
759
+           this.$message.success("保存成功")
760
+           
761
+           this.WarehouseList = []
762
+           this.tableData = []
763
+           this.getDrugInventoryWarehouseInfoList()
764
+          
765
+        }
766
+      })
767
+    },
768
+    getHouseName(id){
769
+      var storehouse_name = ""
770
+      for(let i=0;i<this.houseList.length;i++){
771
+        if(id == this.houseList[i].id){
772
+          storehouse_name = this.houseList[i].storehouse_name
773
+        }
774
+      }
775
+      return storehouse_name
776
+    },
777
+   changeStorehouse(){
778
+    this.getDrugInventoryWarehouseInfoList()
779
+   },
780
+    getDrugInventoryWarehouseInfoList(){
781
+      var params = {
782
+        storehouse_id:this.storehouse_id,
783
+      } 
784
+      console.log("params222222wo",params)
785
+      const loading = this.$loading({
786
+        lock: true,
787
+        text: 'Loading',
788
+        spinner: 'el-icon-loading',
789
+        background: 'rgba(0, 0, 0, 0.7)'
790
+      })  
791
+     
792
+     getDrugInventoryWarehouseInfoList(params).then(response=>{
793
+        if(response.data.state == 1){
794
+            loading.close()
795
+            var list =  response.data.data.list
796
+            this.manufacturerList = []
797
+            this.manufacturerList = response.data.data.manufacturerList
798
+            for(let i=0;i<list.length;i++){
799
+                if(list[i].XtBaseDrug.max_unit == list[i].XtBaseDrug.min_unit){
800
+                    list[i].stock_max_number += list[i].stock_min_number
801
+                    list[i].stock_min_number = 0
802
+                }
803
+                list[i].drug_name = list[i].XtBaseDrug.drug_name
804
+                list[i].specification_name = list[i].XtBaseDrug.dose +list[i].XtBaseDrug.dose_unit + "*"+list[i].XtBaseDrug.min_number +list[i].XtBaseDrug.min_unit+"/"+list[i].XtBaseDrug.max_unit
805
+                list[i].warehouseing_unit = list[i].max_unit
806
+                list[i].max_unit = list[i].XtBaseDrug.max_unit
807
+                list[i].min_unit = list[i].XtBaseDrug.min_unit
808
+                list[i].last_stock_max_number = ""
809
+                list[i].last_stock_min_number = ""
810
+                list[i].min_number = list[i].XtBaseDrug.min_number
811
+                list[i].manufacturer_name  = ""
812
+                list[i].type = 6
813
+                list[i].last_stock_max_number = list[i].stock_max_number
814
+                list[i].last_stock_min_number = list[i].stock_min_number
815
+                for(let j=0;j<this.manufacturerList.length;j++){
816
+                  if(list[i].manufacturer == this.manufacturerList[j].id){
817
+                    list[i].manufacturer_name = this.manufacturerList[j].manufacturer_name
818
+                  }
819
+                }
820
+            }
821
+            this.tableData = []
822
+            this.tableData = list
823
+        }
824
+      }) 
825
+    }
826
+    },
827
+    created(){
828
+      this.unitList =  this.getDataConfig('hemodialysis','units')
829
+      this.getlist()
830
+    },
831
+    mounted() {
832
+    },
833
+};
834
+</script>
835
+<style lang="scss">
836
+    .addDrugsDialog {
837
+
838
+      .el-dialog__body {
839
+          padding-top: 0px;
840
+      }
841
+      .noMargin{
842
+        .el-form-item__content{
843
+          margin-left: 0 !important;
844
+        }
845
+      }
846
+
847
+    }
848
+</style>

+ 475 - 0
src/xt_pages/stock/newInventory.vue Datei anzeigen

@@ -0,0 +1,475 @@
1
+<template>
2
+  <div>
3
+    <div>
4
+      <label class="title"><span class="name">仓库</span> :</label>
5
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
6
+            <el-option
7
+              v-for="(option, index) in houseList"
8
+              :key="index"
9
+              :label="option.storehouse_name"
10
+              :value="option.id">
11
+            </el-option>
12
+       </el-select>  
13
+  </div>
14
+   <div>
15
+    <div style="margin-top:20px">日期:{{nowTime}}   盘点人:{{user_name}}</div>
16
+    <div style="float:right;margin-bottom:10px"><el-button type="primary" @click="saveInentoryList">保存</el-button></div>
17
+     
18
+        <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" style="width:100%">
19
+              <el-table-column prop="date" label="耗材名称" width="150" align="center">
20
+                <template slot-scope="scope">
21
+                  {{scope.row.good_name}}
22
+                </template>
23
+              </el-table-column>
24
+              <el-table-column  prop="name" label="规格" width="100"  align="center">
25
+                <template slot-scope="scope">
26
+                  {{scope.row.specification_name}}
27
+                </template>
28
+              </el-table-column>
29
+             <el-table-column  prop="name" label="入库单号" width="100"  align="center">
30
+                <template slot-scope="scope">
31
+                  {{scope.row.warehousing_order}}
32
+                </template>
33
+              </el-table-column>
34
+              <el-table-column  prop="name" label="有效期" width="100"  align="center">
35
+                <template slot-scope="scope">
36
+                  {{getTime(scope.row.expiry_date)}}
37
+                </template>
38
+              </el-table-column>
39
+              <el-table-column prop="name" label="批号" width="100"  align="center">
40
+                  <template slot-scope="scope">
41
+                    {{scope.row.number}}
42
+                </template>
43
+              </el-table-column>
44
+              <el-table-column prop="name" label="进货价" width="100"  align="center">
45
+                  <template slot-scope="scope">
46
+                    {{scope.row.price}}
47
+                  </template> 
48
+              </el-table-column>
49
+            
50
+              <el-table-column prop="name" label="生产厂商" width="100"  align="center">
51
+                  <template slot-scope="scope">
52
+                    {{scope.row.manufacturer_name}}
53
+                  </template> 
54
+              </el-table-column>
55
+
56
+             <el-table-column prop="name" label="仓库名称" width="100"  align="center">
57
+                  <template slot-scope="scope">
58
+                    {{getStorehouseName(scope.row.storehouse_id)}}
59
+                  </template> 
60
+              </el-table-column>
61
+              <el-table-column prop="name" label="盘点前数量" width="120"  align="center">
62
+                <template slot-scope="scope">
63
+                    <span><el-input style="width:80px" v-model="scope.row.stock_count" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
64
+                  </template> 
65
+              </el-table-column>
66
+
67
+             <el-table-column prop="name" label="盘点后数量" width="120"  align="center">
68
+                <template slot-scope="scope">
69
+                  <el-input style="width:80px" v-model="scope.row.last_stock_count"></el-input>
70
+                 </template> 
71
+              </el-table-column>
72
+
73
+              <el-table-column prop="name" label="盘点原因" width="180"  align="center">
74
+                <template slot-scope="scope">
75
+                   <el-select v-model="scope.row.type" placeholder="请选择">
76
+                      <el-option
77
+                        v-for="item in reasonList"
78
+                        :key="item.id"
79
+                        :label="item.name"
80
+                        :value="item.id">
81
+                      </el-option>
82
+                    </el-select>
83
+                 </template> 
84
+              </el-table-column>
85
+             
86
+             <el-table-column prop="name"  width="200"  align="center">
87
+                <template slot-scope="scope">
88
+                    <span><el-button type="danger" @click="toDelete(scope.$index,scope.row.good_id)">不盘点此批次</el-button></span>
89
+                  </template> 
90
+              </el-table-column>
91
+          </el-table>
92
+
93
+   </div>
94
+  </div>
95
+</template>
96
+<script> 
97
+const moment = require("moment");
98
+import { uParseTime } from '@/utils/tools'
99
+import {getInventoryList,SaveCheckedInventory,getInventoryDetail,deleteInventory,getWarehouseTotal,saveStockInentoryList,getwarehouseinfolist } from "@/api/stock"
100
+export default {
101
+    name: "inventory",
102
+    data() {
103
+        return{
104
+            user_name:this.$store.getters.xt_user.user.user_name,
105
+            nowTime: moment(new Date()).format("YYYY-MM-DD HH:MM:SS"),
106
+            searchKey:'',
107
+            value1:'',
108
+            value2:'',
109
+            tableData: [],
110
+            dialogVisible:false,
111
+            total: 0,
112
+            inventoryList:[
113
+              {id:0,name:"全部"},
114
+              {id:1,name:"盘点完成"},
115
+              {id:2,name:"正在盘点"},
116
+            ],
117
+            start_time:"",
118
+            end_time:"",
119
+           form: {
120
+                id:"",
121
+                good_name: '',
122
+                packing_price:'',
123
+                new_price:"",
124
+                count:"",
125
+                remark:"",
126
+                warehousing_order:"",
127
+                manufacturer:"",
128
+                dealer:"",
129
+                license_number:"",
130
+                warehousing_unit:"",
131
+                specification_name:"",
132
+                buy_price:"",
133
+                good_id:"",
134
+                packing_unit:"",
135
+                good_origin_place:"",
136
+                report_count:"",
137
+                total:"",
138
+                expiry_date:"",
139
+                product_date:"",
140
+                number:"",
141
+                proof_count:"",
142
+                storehouse_id:"",
143
+            },
144
+         manufacturerList:[],
145
+         dealerList:[],
146
+         goodList:[],
147
+         currentIndex: 0,
148
+         inventory_status:0,
149
+         limit:10,
150
+         page:1,
151
+         doctorList:[],
152
+         total:0,
153
+         tableList:[],
154
+         ids:"",
155
+         checker:this.$store.getters.xt_user.user.id,
156
+         check_time:new Date(),
157
+         checkDialogVisible:false,
158
+         editPriceDialogVisible:false,
159
+         modefiyePriceDialogVisible:false,
160
+         proofPriceDialogVisible:false,
161
+         id:0,
162
+         numberList:[],
163
+         reasonList:[
164
+          {id:6,name:"默认"},
165
+          {id:1,name:"到期退货"},
166
+          {id:2,name:"异常退货"},
167
+          {id:3,name:"退货"},
168
+          {id:4,name:"损坏"},
169
+          {id:5,name:"不计入报损分析"},
170
+          {id:7,name:"有效期到期"},
171
+         ],
172
+         activeNames: [0,1,2,3,4,5,6,7,8,9,10],
173
+         showTable:false,
174
+         showSearch:true,
175
+         inventory_total:0,
176
+         WarehouseList:[],
177
+         showTableOne:false,
178
+         houseList:[],
179
+         storehouse_id:"",
180
+        }
181
+    },
182
+    methods:{
183
+       
184
+        changeGoodName(val){
185
+          this.currentIndex = val
186
+        },
187
+        search(){
188
+          this.getlist()
189
+        },
190
+        print(){
191
+          if(this.ids == ""){
192
+            this.$message.error("请勾选打印数据")
193
+            return
194
+          }else{
195
+           this.$router.push({path:'/stock/inventoryPrint?ids='+this.ids})   
196
+          } 
197
+        },
198
+       getTime(val) {
199
+         if(val < 0){
200
+            return ""
201
+          }
202
+         if(val == ""){
203
+            return ""
204
+          }else {
205
+            return uParseTime(val, '{y}-{m}-{d}')
206
+         }
207
+        },
208
+        handleSizeChange(val){
209
+          this.limit = val
210
+          this.getlist()
211
+        },
212
+        handleCurrentChange(val){
213
+          this.page = val
214
+          this.getlist()
215
+        },
216
+      changeHouseList(){
217
+       this.getwarehouseinfolist()
218
+      },
219
+      getlist(){
220
+        var params = {
221
+              keyword:this.searchKey,
222
+              start_time:this.start_time,
223
+              end_time:this.end_time,
224
+              inventory_status:this.inventory_status, 
225
+              page:this.page,
226
+              limit:this.limit,
227
+            }
228
+          getInventoryList(params).then(response=>{
229
+              if(response.data.state ==1 ){
230
+              var list =  response.data.data.list
231
+              this.tableList = list
232
+              var total = response.data.data.total
233
+              this.total = total
234
+              this.doctorList = []
235
+              this.doctorList =  response.data.data.doctorlist
236
+              this.houseList = []
237
+              this.houseList = response.data.data.houseList
238
+              var houseConfig = response.data.data.houseConfig
239
+              
240
+              this.storehouse_id = houseConfig.storehouse_out_info
241
+              this.getwarehouseinfolist()
242
+              }
243
+          })
244
+        },
245
+      getChecker(id){
246
+        var name = ""
247
+        for(let i=0;i<this.doctorList.length;i++){
248
+            if(id == this.doctorList[i].admin_user_id){
249
+              name = this.doctorList[i].user_name
250
+            }
251
+        }
252
+        return name
253
+      },
254
+      toCheck(){
255
+        if(this.ids.length <=0){
256
+          this.$message.error("请勾选核对数据")
257
+          return
258
+        }else{
259
+          this.checkDialogVisible = true
260
+        }
261
+      },
262
+      changePrice(val){  
263
+        var arr = []
264
+        
265
+        for(let i=0;i<val.length;i++){
266
+          arr.push(val[i].id)
267
+        }
268
+        var str = arr.join(",")
269
+      
270
+     
271
+        this.ids = str
272
+      
273
+      },
274
+      SaveCheckedInventory(){
275
+          var params = {
276
+              ids:this.ids,
277
+              check_time:this.getTime(this.check_time),
278
+              checker:this.checker,
279
+
280
+          }
281
+        SaveCheckedInventory(params).then(response=>{
282
+          if(response.data.state == 1){
283
+            this.$message.success("保存成功")
284
+            var inventory = response.data.data.inventory
285
+            this.checkDialogVisible = false
286
+            this.getlist()
287
+          }
288
+        })
289
+      },
290
+     getInventory(id){
291
+       getInventoryDetail(id).then(response=>{
292
+          if(response.data.state == 1){
293
+            var detail =  response.data.data.detail
294
+         
295
+            this.form.good_name = detail.good_name
296
+            this.form.specification_name = detail.specification_name
297
+            this.form.count = detail.count
298
+            this.form.remark = detail.remark
299
+            this.form.total = detail.total
300
+            this.form.warehousing_info_id = detail.warehousing_info_id
301
+            this.form.good_id  = detail.good_id
302
+            this.id = detail.id
303
+            this.proofPriceDialogVisible = true
304
+
305
+          }
306
+       })
307
+     },
308
+     deleteInventory(id,check_status,index){
309
+        if(check_status == 1){
310
+          this.$message.error("已核对的不能编辑")
311
+          return
312
+        }
313
+        this.$confirm('是否删除所选内容?', '提示', {
314
+          confirmButtonText: '确定',
315
+          cancelButtonText: '取消',
316
+          type: 'warning'
317
+        }).then(() => {
318
+          
319
+       deleteInventory(id).then(response => {
320
+            if (response.data.state == 1) {
321
+              var msg = response.data.data.msg
322
+              this.$message.success("保存成功")
323
+              this.tableList.splice(index,1)
324
+            } 
325
+          })
326
+        }).catch(() => {
327
+          this.loading = false
328
+        });
329
+     },
330
+     changeInventory(){
331
+       this.getlist()
332
+     },
333
+     changeStartTime(val){
334
+       this.start_time = this.getTime(val)
335
+       this.getlist()
336
+     },
337
+     changeEndTime(val){
338
+       this.end_time = this.getTime(val)
339
+       this.getlist()
340
+     },
341
+    changeNumber(val){
342
+     this.getWarehouseTotal(val)
343
+     this.form.warehousing_info_id = val
344
+     },
345
+    getWarehouseTotal(id){
346
+        var params = {
347
+          id:id,
348
+        }
349
+      getWarehouseTotal(params).then(response=>{
350
+         if(response.data.state == 1){
351
+           var list =  response.data.data.list
352
+           this.form.total = list.stock_count
353
+         }
354
+      })
355
+    },
356
+    toMove(item,index){
357
+       this.$confirm('此操作将移除耗材整个批次, 是否继续?', '提示', {
358
+          confirmButtonText: '确定',
359
+          cancelButtonText: '取消',
360
+          type: 'warning'
361
+        }).then(() => {
362
+          this.tableData.splice(index,1)
363
+          this.WarehouseList = []
364
+          this.activeNames = [0,1,2,3,4,5,6,7,8,9,10]
365
+        }).catch(() => {
366
+          this.loading = false
367
+        });   
368
+    },
369
+    toDelete(index,good_id){
370
+      console.log("data232323223",this.tableData,good_id,index)
371
+      for(let i=0;i<this.tableData.length;i++){
372
+         if(good_id == this.tableData[i].good_id){
373
+           this.tableData.splice(index,1)
374
+         }
375
+      }
376
+    },
377
+    saveInentoryList(){
378
+       const loading = this.$loading({
379
+        lock: true,
380
+        text: 'Loading',
381
+        spinner: 'el-icon-loading',
382
+        background: 'rgba(0, 0, 0, 0.7)'
383
+      })
384
+      for(let i=0;i<this.tableData.length;i++){
385
+
386
+        if(this.tableData[i].last_stock_count == undefined){
387
+        
388
+           this.tableData[i].last_stock_count = 0
389
+        }else{
390
+          this.tableData[i].last_stock_count = parseInt(this.tableData[i].last_stock_count)
391
+        }
392
+        this.tableData[i].storehouse_id = this.storehouse_id
393
+      }
394
+      var arr = []
395
+      for(let i=0;i<this.tableData.length;i++){
396
+        if(this.tableData[i].stock_count!=this.tableData[i].last_stock_count){
397
+          arr.push(this.tableData[i])
398
+        }
399
+      }
400
+      if(arr.length == 0){
401
+       this.$message.error("请修改数据后保存!")
402
+       loading.close()
403
+       return false
404
+      }
405
+      var params = {
406
+         tableData:arr,
407
+         storehouse_id:this.storehouse_id,
408
+      }
409
+      
410
+      console.log("param23323232323232323",params)
411
+      saveStockInentoryList(params).then(response=>{
412
+        if(response.data.state == 1){
413
+           loading.close()
414
+           var inventory = response.data.data.inventory
415
+           this.$message.success("保存成功")
416
+           this.WarehouseList = []
417
+           this.tableData = []
418
+           this.getlist()
419
+        }
420
+      })
421
+    },
422
+    getStorehouseName(id){
423
+      var storehouse_name = ""
424
+      for(let i=0;i<this.houseList.length;i++){
425
+        if(id == this.houseList[i].id){
426
+          storehouse_name = this.houseList[i].storehouse_name
427
+        }
428
+      }
429
+      return storehouse_name
430
+    },
431
+    getwarehouseinfolist(){
432
+     const loading = this.$loading({
433
+      lock: true,
434
+      text: 'Loading',
435
+      spinner: 'el-icon-loading',
436
+      background: 'rgba(0, 0, 0, 0.7)'
437
+     })
438
+        var params = {
439
+          storehouse_id:this.storehouse_id,
440
+        }
441
+     getwarehouseinfolist(params).then(response=>{
442
+       if(response.data.state == 1){
443
+          var list = response.data.data.list
444
+          this.manufacturerList = response.data.data.manufacturerList
445
+          loading.close()
446
+          for(let i=0;i<list.length;i++){
447
+              list[i].type = 6
448
+              list[i].good_name = list[i].GoodInfo.good_name
449
+              list[i].specification_name = list[i].GoodInfo.specification_name
450
+              list[i].manufacturer_name = ""
451
+              for(let j=0;j<this.manufacturerList.length;j++){
452
+                if(list[i].manufacturer == this.manufacturerList[j].id){
453
+                  list[i].manufacturer_name = this.manufacturerList[j].manufacturer_name
454
+                }
455
+              }
456
+             
457
+             list[i].last_stock_count = list[i].stock_count
458
+           }
459
+          this.tableData = []
460
+          console.log("list2332322323232332322323wo",list)
461
+          this.tableData = list
462
+       }  
463
+     })    
464
+    }
465
+   },
466
+    created(){
467
+      
468
+      this.getlist()
469
+     
470
+      
471
+    },
472
+    mounted() {
473
+    },
474
+};
475
+</script>