|
@@ -0,0 +1,622 @@
|
|
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">
|
|
17
|
+ 药品统计
|
|
18
|
+ </span>
|
|
19
|
+ <span style="float:right;">打印日期:
|
|
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 v-for="(item,index) in tabHead" :key="index" :label="item.advice_name" width="150">
|
|
33
|
+ {{item.advice_name}}
|
|
34
|
+ </td>
|
|
35
|
+ </tr>
|
|
36
|
+ </thead>
|
|
37
|
+ <tbody>
|
|
38
|
+ <tr v-for="(item,index) in tableDataList" :key="i">
|
|
39
|
+ <td>
|
|
40
|
+ <span v-if="item.is_total ==1"> {{index+1}}</span>
|
|
41
|
+ <span v-if="item.is_total ==0">总计</span>
|
|
42
|
+ </td>
|
|
43
|
+ <td>
|
|
44
|
+ <span v-if="item.is_total == 1">{{getZoneName(item.child)}}</span>
|
|
45
|
+ </td>
|
|
46
|
+ <td>
|
|
47
|
+ <span v-if="item.is_total == 1"> {{getAdminUserName(item.execution_staff)}}</span>
|
|
48
|
+ </td>
|
|
49
|
+ <td>
|
|
50
|
+ <span v-if="item.is_total == 1"> {{getModeId(item.child)}}</span>
|
|
51
|
+ </td>
|
|
52
|
+ <td v-for="(it,i) in tabHead" :key="i">
|
|
53
|
+ <span v-if="item.is_total == 1">
|
|
54
|
+ <span v-if="item.child[i]!=null">{{getDrugCount(item.child,it.advice_name)}}</span>
|
|
55
|
+ </span>
|
|
56
|
+ <span v-if="item.is_total == 0">
|
|
57
|
+ {{getAllSumCount(it.advice_name)}}
|
|
58
|
+ </span>
|
|
59
|
+ </td>
|
|
60
|
+
|
|
61
|
+ </tr>
|
|
62
|
+ </tbody>
|
|
63
|
+ </table>
|
|
64
|
+ </div>
|
|
65
|
+ </div>
|
|
66
|
+ </div>
|
|
67
|
+ </div>
|
|
68
|
+ </div>
|
|
69
|
+ </template>
|
|
70
|
+
|
|
71
|
+ <script>
|
|
72
|
+ import { getDialysisAdviceToday } from '@/api/dialysis'
|
|
73
|
+ import { parseTime } from '@/utils'
|
|
74
|
+ import { uParseTime } from '@/utils/tools'
|
|
75
|
+ import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
76
|
+ import print from 'print-js'
|
|
77
|
+ import { getDataConfig } from '@/utils/data'
|
|
78
|
+ export default {
|
|
79
|
+ name: 'SchedulePrint',
|
|
80
|
+ data() {
|
|
81
|
+ return {
|
|
82
|
+ crumbs: [
|
|
83
|
+ { path: false, name: '排班管理' },
|
|
84
|
+ { path: false, name: '排班打印' }
|
|
85
|
+ ],
|
|
86
|
+ td_1_width: '8%',
|
|
87
|
+ td_2_width: '8%',
|
|
88
|
+ td_3_width: '64%',
|
|
89
|
+ td_4_width: '20%',
|
|
90
|
+ month: 1,
|
|
91
|
+ begin_day: 1,
|
|
92
|
+ total:[],
|
|
93
|
+ list:[],
|
|
94
|
+ schedule_date:"",
|
|
95
|
+ schedule_type:0,
|
|
96
|
+ partition_type:0,
|
|
97
|
+ keywords:"",
|
|
98
|
+ loading:false,
|
|
99
|
+ tableData:[],
|
|
100
|
+ numberList:[],
|
|
101
|
+ partitionArr:[],
|
|
102
|
+ his_config:{},
|
|
103
|
+ typeList:[],
|
|
104
|
+ rowList:[],
|
|
105
|
+ dialysate_formulation:[],
|
|
106
|
+ body_fluid_option:[],
|
|
107
|
+ displace_liqui_part_option:[],
|
|
108
|
+ blood_access_option:[],
|
|
109
|
+ hemodialysisPipelinesOptions:[],
|
|
110
|
+ tableList:[],
|
|
111
|
+ druglist:[],
|
|
112
|
+ config:{},
|
|
113
|
+ tabHead:[],
|
|
114
|
+ tableDataList:[],
|
|
115
|
+ adminUserList:[],
|
|
116
|
+ }
|
|
117
|
+ },
|
|
118
|
+ components: {
|
|
119
|
+ BreadCrumb
|
|
120
|
+ },
|
|
121
|
+ created() {
|
|
122
|
+ this.getDialysisAdviceSchedudeList()
|
|
123
|
+ },
|
|
124
|
+ methods: {
|
|
125
|
+ getDialysisAdviceSchedudeList() {
|
|
126
|
+ var params = {
|
|
127
|
+ schedule_type:this.$route.query.schedule_type,
|
|
128
|
+ partion_type:this.$route.query.partion_type,
|
|
129
|
+ selected_date:this.$route.query.schedule_date,
|
|
130
|
+ }
|
|
131
|
+ console.log("params2332232wo",params)
|
|
132
|
+ getDialysisAdviceToday(params).then(response=>{
|
|
133
|
+ if(response.data.state == 1){
|
|
134
|
+ var doctorList = []
|
|
135
|
+ var druglist = response.data.data.drug
|
|
136
|
+ this.druglist = druglist
|
|
137
|
+ this.startdialogVisibleOne = true
|
|
138
|
+ var list = response.data.data.list
|
|
139
|
+
|
|
140
|
+ var config = response.data.data.config
|
|
141
|
+ this.adminUserList = response.data.data.doctorList
|
|
142
|
+
|
|
143
|
+ if(list!=null && list.length > 0){
|
|
144
|
+ for(let i=0;i<list.length;i++){
|
|
145
|
+ for(let j=0;j<list[i].xt_doctor_advice.length;j++){
|
|
146
|
+ list[i].xt_doctor_advice[j].mode_id = list[i].mode_id
|
|
147
|
+ list[i].xt_doctor_advice[j].zone_name = list[i].device_number.zone.name
|
|
148
|
+ list[i].xt_doctor_advice[j].sort = list[i].device_number.zone.sort
|
|
149
|
+ doctorList.push(list[i].xt_doctor_advice[j])
|
|
150
|
+ }
|
|
151
|
+ }
|
|
152
|
+ }
|
|
153
|
+
|
|
154
|
+ if(config.is_open!=1){
|
|
155
|
+
|
|
156
|
+ if(doctorList!=null && doctorList.length > 0){
|
|
157
|
+
|
|
158
|
+ let dataInfo = {}
|
|
159
|
+ doctorList.forEach((item, index) => {
|
|
160
|
+ item.advice_name = item.advice_name.replace(/\s/g,"")
|
|
161
|
+ let { advice_name } = item
|
|
162
|
+ if (!dataInfo[advice_name]) {
|
|
163
|
+ dataInfo[advice_name] = {
|
|
164
|
+ advice_name:item.advice_name,
|
|
165
|
+ child: [],
|
|
166
|
+ count:0,
|
|
167
|
+ execution_staff:item.execution_staff,
|
|
168
|
+ specification_name:item.advice_desc +item.drug_spec_unit,
|
|
169
|
+ patient_id:item.patient_id,
|
|
170
|
+ }
|
|
171
|
+ }
|
|
172
|
+ })
|
|
173
|
+ let arr = Object.values(dataInfo)
|
|
174
|
+ for(let i=0;i<arr.length;i++){
|
|
175
|
+ for(let j=0;j<doctorList.length;j++){
|
|
176
|
+ if(arr[i].advice_name == doctorList[j].advice_name){
|
|
177
|
+ arr[i].child.push(doctorList[j])
|
|
178
|
+ }
|
|
179
|
+ }
|
|
180
|
+ }
|
|
181
|
+ this.tabHead = arr
|
|
182
|
+ console.log("arr---------------------",this.tabHead)
|
|
183
|
+ }
|
|
184
|
+
|
|
185
|
+ if(doctorList!=null && doctorList.length > 0){
|
|
186
|
+
|
|
187
|
+ let dataInfo = {}
|
|
188
|
+ doctorList.forEach((item, index) => {
|
|
189
|
+ let { execution_staff } = item
|
|
190
|
+ if (!dataInfo[execution_staff]) {
|
|
191
|
+ dataInfo[execution_staff] = {
|
|
192
|
+ execution_staff:item.execution_staff,
|
|
193
|
+ child: [],
|
|
194
|
+ count:0,
|
|
195
|
+ sort:item.sort,
|
|
196
|
+ }
|
|
197
|
+ }
|
|
198
|
+ })
|
|
199
|
+ let newArr = Object.values(dataInfo)
|
|
200
|
+ if(newArr!=null && newArr.length >0){
|
|
201
|
+ for(let i=0;i<newArr.length;i++){
|
|
202
|
+ for(let j=0;j<doctorList.length;j++){
|
|
203
|
+ if(newArr[i].execution_staff == doctorList[j].execution_staff){
|
|
204
|
+ newArr[i].child.push(doctorList[j])
|
|
205
|
+ }
|
|
206
|
+ }
|
|
207
|
+ }
|
|
208
|
+
|
|
209
|
+ }
|
|
210
|
+ var newList = newArr.sort(this.compareList('sort'))
|
|
211
|
+ if(newList!=null && newList.length >0){
|
|
212
|
+ for(let i=0;i<newList.length;i++){
|
|
213
|
+ newList[i].is_total = 1
|
|
214
|
+ }
|
|
215
|
+ }
|
|
216
|
+
|
|
217
|
+ var obj = {is_total:0,count:0,execution_staff:0,child:[]}
|
|
218
|
+ newList.push(obj)
|
|
219
|
+ this.tableDataList = newList
|
|
220
|
+ console.log("999999999999999999-------",this.tableDataList)
|
|
221
|
+ }
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+ }
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+ }
|
|
229
|
+ })
|
|
230
|
+ },
|
|
231
|
+ getTimeOne(val) {
|
|
232
|
+ if(val == ""){
|
|
233
|
+ return ""
|
|
234
|
+ }else {
|
|
235
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
236
|
+ }
|
|
237
|
+ },
|
|
238
|
+ getCount(val){
|
|
239
|
+ var count = 0
|
|
240
|
+ if(val!=null && val.length > 0){
|
|
241
|
+ for(let i=0;i<val.length;i++){
|
|
242
|
+ count += parseInt(val[i].prescribing_number)
|
|
243
|
+ }
|
|
244
|
+ }
|
|
245
|
+ if(count > 0){
|
|
246
|
+ return count
|
|
247
|
+ }else{
|
|
248
|
+ return 0
|
|
249
|
+ }
|
|
250
|
+ },
|
|
251
|
+ printAction: function() {
|
|
252
|
+ 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; } }'
|
|
253
|
+
|
|
254
|
+ printJS({
|
|
255
|
+ printable: 'print_content',
|
|
256
|
+ type: 'html',
|
|
257
|
+ documentTitle: ' ',
|
|
258
|
+ style: style,
|
|
259
|
+ scanStyles: false
|
|
260
|
+ })
|
|
261
|
+ },
|
|
262
|
+ getSpecification(id){
|
|
263
|
+ var specification_name = ""
|
|
264
|
+ for(let i=0;i<this.druglist.length;i++){
|
|
265
|
+ if(id == this.druglist[i].id){
|
|
266
|
+ 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
|
|
267
|
+ }
|
|
268
|
+ }
|
|
269
|
+ return specification_name
|
|
270
|
+ },
|
|
271
|
+ getHisCount(val,max_unit,min_unit,min_number){
|
|
272
|
+ var total = 0
|
|
273
|
+ var max_str = "";
|
|
274
|
+ var min_str = "";
|
|
275
|
+ for(let i=0;i<val.length;i++){
|
|
276
|
+ total+=parseInt(val[i].prescribing_number)
|
|
277
|
+ }
|
|
278
|
+ if (total < min_number) {
|
|
279
|
+ min_str = total + min_unit;
|
|
280
|
+ }
|
|
281
|
+ if (total == 0) {
|
|
282
|
+ min_str = "";
|
|
283
|
+ max_str = "";
|
|
284
|
+ }
|
|
285
|
+ if (total >= min_number) {
|
|
286
|
+ if (parseInt(total / min_number) != 0) {
|
|
287
|
+ max_str = parseInt(total / min_number) + max_unit;
|
|
288
|
+ }
|
|
289
|
+ if (total % min_number != 0) {
|
|
290
|
+ min_str = (total % min_number) + min_unit;
|
|
291
|
+ }
|
|
292
|
+ }
|
|
293
|
+ return max_str + min_str;
|
|
294
|
+
|
|
295
|
+ },
|
|
296
|
+
|
|
297
|
+ getModeId(val){
|
|
298
|
+ if(val!=null && val.length > 0){
|
|
299
|
+ let dataInfo = {}
|
|
300
|
+ val.forEach((item, index) => {
|
|
301
|
+ let { patient_id } = item
|
|
302
|
+ if (!dataInfo[patient_id]) {
|
|
303
|
+ dataInfo[patient_id] = {
|
|
304
|
+ patient_id:item.patient_id,
|
|
305
|
+ child: [],
|
|
306
|
+ count:0,
|
|
307
|
+ mode_id:item.mode_id,
|
|
308
|
+ }
|
|
309
|
+ }
|
|
310
|
+ })
|
|
311
|
+ let newArr = Object.values(dataInfo)
|
|
312
|
+
|
|
313
|
+ if(newArr!=null && newArr.length >0){
|
|
314
|
+ let dataInfo = {}
|
|
315
|
+ newArr.forEach((item, index) => {
|
|
316
|
+ let { mode_id } = item
|
|
317
|
+ if (!dataInfo[mode_id]) {
|
|
318
|
+ dataInfo[mode_id] = {
|
|
319
|
+ mode_id:item.mode_id,
|
|
320
|
+ child: [],
|
|
321
|
+ count:0,
|
|
322
|
+ }
|
|
323
|
+ }
|
|
324
|
+ })
|
|
325
|
+ let hisNewArr = Object.values(dataInfo)
|
|
326
|
+
|
|
327
|
+ if(hisNewArr!=null && hisNewArr.length >0){
|
|
328
|
+ for(let i=0;i<hisNewArr.length;i++){
|
|
329
|
+ for(let j=0;j<newArr.length;j++){
|
|
330
|
+ if(hisNewArr[i].mode_id == newArr[j].mode_id){
|
|
331
|
+ hisNewArr[i].child.push(newArr[j])
|
|
332
|
+ }
|
|
333
|
+ }
|
|
334
|
+ }
|
|
335
|
+ }
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+ var str = ""
|
|
339
|
+ for(let i=0;i<hisNewArr.length;i++){
|
|
340
|
+ if(hisNewArr[i].mode_id == 1){
|
|
341
|
+ hisNewArr[i].mode_id = "HD"
|
|
342
|
+ }
|
|
343
|
+ if(hisNewArr[i].mode_id == 2){
|
|
344
|
+ hisNewArr[i].mode_id = "HDF"
|
|
345
|
+ }
|
|
346
|
+ if(hisNewArr[i].mode_id == 3){
|
|
347
|
+ hisNewArr[i].mode_id = "HD+HP"
|
|
348
|
+ }
|
|
349
|
+ if(hisNewArr[i].mode_id == 4){
|
|
350
|
+ hisNewArr[i].mode_id = "HP"
|
|
351
|
+ }
|
|
352
|
+ if(hisNewArr[i].mode_id == 5){
|
|
353
|
+ hisNewArr[i].mode_id = "HF"
|
|
354
|
+ }
|
|
355
|
+ if(hisNewArr[i].mode_id == 6){
|
|
356
|
+ hisNewArr[i].mode_id = "SCUF"
|
|
357
|
+ }
|
|
358
|
+ if(hisNewArr[i].mode_id == 7){
|
|
359
|
+ hisNewArr[i].mode_id = "IUF"
|
|
360
|
+ }
|
|
361
|
+ if(hisNewArr[i].mode_id == 8){
|
|
362
|
+ hisNewArr[i].mode_id = "HFHD"
|
|
363
|
+ }
|
|
364
|
+ if(hisNewArr[i].mode_id == 9){
|
|
365
|
+ hisNewArr[i].mode_id = "HFHD+HP"
|
|
366
|
+ }
|
|
367
|
+ if(hisNewArr[i].mode_id == 10){
|
|
368
|
+ hisNewArr[i].mode_id = "PHF"
|
|
369
|
+ }
|
|
370
|
+ if(hisNewArr[i].mode_id == 11){
|
|
371
|
+ hisNewArr[i].mode_id = "HFR"
|
|
372
|
+ }
|
|
373
|
+ if(hisNewArr[i].mode_id == 12){
|
|
374
|
+ hisNewArr[i].mode_id = "HDF+HP"
|
|
375
|
+ }
|
|
376
|
+ if(hisNewArr[i].mode_id == 13){
|
|
377
|
+ hisNewArr[i].mode_id = "CRRT"
|
|
378
|
+ }
|
|
379
|
+ if(hisNewArr[i].mode_id == 14){
|
|
380
|
+ hisNewArr[i].mode_id = "腹水回输"
|
|
381
|
+ }
|
|
382
|
+ if(hisNewArr[i].mode_id == 15){
|
|
383
|
+ hisNewArr[i].mode_id = "IUF+HD"
|
|
384
|
+ }
|
|
385
|
+ if(hisNewArr[i].mode_id == 20){
|
|
386
|
+ hisNewArr[i].mode_id = "UF"
|
|
387
|
+ }
|
|
388
|
+ if(hisNewArr[i].mode_id == 21){
|
|
389
|
+ hisNewArr[i].mode_id = "HD+"
|
|
390
|
+ }
|
|
391
|
+ if(hisNewArr[i].mode_id == 22){
|
|
392
|
+ hisNewArr[i].mode_id = "血浆胆红素吸附+HDF"
|
|
393
|
+ }
|
|
394
|
+ if(hisNewArr[i].mode_id == 23){
|
|
395
|
+ hisNewArr[i].mode_id = "血浆胆红素吸附"
|
|
396
|
+ }
|
|
397
|
+ if(hisNewArr[i].mode_id == 24){
|
|
398
|
+ hisNewArr[i].mode_id = "I-HDF"
|
|
399
|
+ }
|
|
400
|
+ if(hisNewArr[i].mode_id == 25){
|
|
401
|
+ hisNewArr[i].mode_id = "HD高通"
|
|
402
|
+ }
|
|
403
|
+ if(hisNewArr[i].mode_id == 26){
|
|
404
|
+ hisNewArr[i].mode_id = "CVVH"
|
|
405
|
+ }
|
|
406
|
+ if(hisNewArr[i].mode_id == 27){
|
|
407
|
+ hisNewArr[i].mode_id = "CVVHD"
|
|
408
|
+ }
|
|
409
|
+ if(hisNewArr[i].mode_id == 28){
|
|
410
|
+ hisNewArr[i].mode_id = "CVVHDF"
|
|
411
|
+ }
|
|
412
|
+ if(hisNewArr[i].mode_id == 29){
|
|
413
|
+ hisNewArr[i].mode_id = "PE"
|
|
414
|
+ }
|
|
415
|
+ if(hisNewArr[i].mode_id == 30){
|
|
416
|
+ hisNewArr[i].mode_id = "血浆胆红素吸附+HP"
|
|
417
|
+ }
|
|
418
|
+ if(hisNewArr[i].mode_id == 31){
|
|
419
|
+ hisNewArr[i].mode_id = "HPD"
|
|
420
|
+ }
|
|
421
|
+ if(hisNewArr[i].mode_id == 32){
|
|
422
|
+ hisNewArr[i].mode_id = "HDP"
|
|
423
|
+ }
|
|
424
|
+ str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n"
|
|
425
|
+ }
|
|
426
|
+
|
|
427
|
+ return str
|
|
428
|
+ }
|
|
429
|
+
|
|
430
|
+ // return newArr.length
|
|
431
|
+ }
|
|
432
|
+ },
|
|
433
|
+ getDrugCount(val,advice_name){
|
|
434
|
+
|
|
435
|
+ if(val!=null){
|
|
436
|
+ for(let i=0;i<val.length;i++){
|
|
437
|
+ val[i].advice_name = val[i].advice_name.replace(/\s/g,"")
|
|
438
|
+ }
|
|
439
|
+ }
|
|
440
|
+
|
|
441
|
+ if(val!=null && val.length >0){
|
|
442
|
+ let dataInfo = {}
|
|
443
|
+ val.forEach((item, index) => {
|
|
444
|
+
|
|
445
|
+ let { advice_name } = item
|
|
446
|
+ if (!dataInfo[advice_name]) {
|
|
447
|
+ dataInfo[advice_name] = {
|
|
448
|
+ advice_name:item.advice_name,
|
|
449
|
+ child: [],
|
|
450
|
+ count:0,
|
|
451
|
+ }
|
|
452
|
+ }
|
|
453
|
+ })
|
|
454
|
+
|
|
455
|
+ let newArr = Object.values(dataInfo)
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+ if(newArr!=null && newArr.length >0){
|
|
459
|
+ for(let i=0;i<newArr.length;i++){
|
|
460
|
+ for(let j=0;j<val.length;j++){
|
|
461
|
+ if(newArr[i].advice_name == val[j].advice_name){
|
|
462
|
+ newArr[i].child.push(val[j])
|
|
463
|
+ }
|
|
464
|
+ }
|
|
465
|
+ }
|
|
466
|
+ }
|
|
467
|
+
|
|
468
|
+ var total = 0
|
|
469
|
+ var newHisArr =[]
|
|
470
|
+ if(newArr!=null && newArr.length >0){
|
|
471
|
+ for(let i=0;i<newArr.length;i++){
|
|
472
|
+ if(newArr[i].advice_name == advice_name){
|
|
473
|
+ newHisArr.push(newArr[i])
|
|
474
|
+ }
|
|
475
|
+ }
|
|
476
|
+ }
|
|
477
|
+
|
|
478
|
+ if(newHisArr!=null && newHisArr.length>0){
|
|
479
|
+
|
|
480
|
+ for(let i=0;i<newHisArr.length;i++){
|
|
481
|
+ for(let j=0;j<newHisArr[i].child.length;j++){
|
|
482
|
+ total += parseInt(newHisArr[i].child[j].prescribing_number)
|
|
483
|
+ }
|
|
484
|
+ }
|
|
485
|
+ }
|
|
486
|
+
|
|
487
|
+ return total
|
|
488
|
+ }
|
|
489
|
+
|
|
490
|
+ },
|
|
491
|
+ getAdminUserName(id){
|
|
492
|
+ var name = ""
|
|
493
|
+ for(let i=0;i<this.adminUserList.length;i++){
|
|
494
|
+ if(id == this.adminUserList[i].id){
|
|
495
|
+ name = this.adminUserList[i].name
|
|
496
|
+ }
|
|
497
|
+ }
|
|
498
|
+ return name
|
|
499
|
+ },
|
|
500
|
+ getZoneName(val){
|
|
501
|
+ var zone_name = ""
|
|
502
|
+ if(val!=null && val.length >0){
|
|
503
|
+ zone_name = val[0].zone_name
|
|
504
|
+ }
|
|
505
|
+ return zone_name
|
|
506
|
+ },
|
|
507
|
+ compareList: function (k) {
|
|
508
|
+ return function (a, b) {
|
|
509
|
+ var M = a[k]
|
|
510
|
+ var N = b[k]
|
|
511
|
+ return M - N // 从低向高排
|
|
512
|
+ // return N - M; // 从高向低排
|
|
513
|
+ }
|
|
514
|
+ },
|
|
515
|
+
|
|
516
|
+ getAllSumCount(advice_name){
|
|
517
|
+
|
|
518
|
+ var hisNewArr =[]
|
|
519
|
+ if(this.tabHead.length!=null && this.tabHead.length >0){
|
|
520
|
+ for(let i=0;i<this.tabHead.length;i++){
|
|
521
|
+ if(this.tabHead[i].advice_name == advice_name){
|
|
522
|
+ hisNewArr.push(this.tabHead[i])
|
|
523
|
+ }
|
|
524
|
+ }
|
|
525
|
+ }
|
|
526
|
+
|
|
527
|
+ var total = 0
|
|
528
|
+ if(hisNewArr!=null && hisNewArr.length > 0){
|
|
529
|
+ for(let i=0;i<hisNewArr.length;i++){
|
|
530
|
+ for(let j=0;j<hisNewArr[i].child.length;j++){
|
|
531
|
+ total += parseInt(hisNewArr[i].child[j].prescribing_number)
|
|
532
|
+ }
|
|
533
|
+ }
|
|
534
|
+ }
|
|
535
|
+ if (total > 0) {
|
|
536
|
+ return total
|
|
537
|
+ }else{
|
|
538
|
+ return 0
|
|
539
|
+ }
|
|
540
|
+
|
|
541
|
+ }
|
|
542
|
+ }
|
|
543
|
+ }
|
|
544
|
+ </script>
|
|
545
|
+
|
|
546
|
+ <style rel="stylesheet/scss" lang="scss" scoped>
|
|
547
|
+ .print_main_content {
|
|
548
|
+ background-color: white;
|
|
549
|
+ width: 960px;
|
|
550
|
+ margin: 0 auto;
|
|
551
|
+ padding: 0 0 20px 0;
|
|
552
|
+
|
|
553
|
+ .order_title_panl {
|
|
554
|
+ text-align: center;
|
|
555
|
+
|
|
556
|
+ .main_title {
|
|
557
|
+ font-size: 18px;
|
|
558
|
+ line-height: 40px;
|
|
559
|
+ font-weight: 500;
|
|
560
|
+ }
|
|
561
|
+
|
|
562
|
+ }
|
|
563
|
+ .table_panel {
|
|
564
|
+
|
|
565
|
+ .table {
|
|
566
|
+ width: 100%;
|
|
567
|
+ border: 1px solid;
|
|
568
|
+ border-collapse: collapse;
|
|
569
|
+ padding: 2px;
|
|
570
|
+
|
|
571
|
+ thead {
|
|
572
|
+
|
|
573
|
+ tr {
|
|
574
|
+
|
|
575
|
+ td {
|
|
576
|
+ border: 1px solid;
|
|
577
|
+ text-align: center;
|
|
578
|
+ font-size: 20px;
|
|
579
|
+ padding: 15px 5px;
|
|
580
|
+ }
|
|
581
|
+
|
|
582
|
+ }
|
|
583
|
+ }
|
|
584
|
+ tbody {
|
|
585
|
+
|
|
586
|
+ tr {
|
|
587
|
+
|
|
588
|
+ td {
|
|
589
|
+ border: 1px solid;
|
|
590
|
+ text-align: center;
|
|
591
|
+ font-size: 18px;
|
|
592
|
+ padding: 10px 5px;
|
|
593
|
+
|
|
594
|
+ .proj {
|
|
595
|
+ padding: 5px 0;
|
|
596
|
+ text-align: left;
|
|
597
|
+
|
|
598
|
+ .proj_title {
|
|
599
|
+ font-size: 16px;
|
|
600
|
+ font-weight: 500;
|
|
601
|
+ line-height: 25px;
|
|
602
|
+ }
|
|
603
|
+
|
|
604
|
+ .proj_item {
|
|
605
|
+ font-size: 15px;
|
|
606
|
+ line-height: 20px;
|
|
607
|
+
|
|
608
|
+ .zone_name {
|
|
609
|
+ font-weight: 500;
|
|
610
|
+ }
|
|
611
|
+
|
|
612
|
+ }
|
|
613
|
+ }
|
|
614
|
+ }
|
|
615
|
+ }
|
|
616
|
+ }
|
|
617
|
+ }
|
|
618
|
+ }
|
|
619
|
+ }
|
|
620
|
+ </style>
|
|
621
|
+
|
|
622
|
+
|