Browse Source

库存显示展示

XMLWAN 2 years ago
parent
commit
a3e5aafd48
1 changed files with 474 additions and 0 deletions
  1. 474 0
      src/xt_pages/user/firstDiseasePrint.vue

+ 474 - 0
src/xt_pages/user/firstDiseasePrint.vue View File

@@ -0,0 +1,474 @@
1
+<template>
2
+<div>
3
+  <div style="float:right;margin-right:10px">
4
+    <el-button type="primary" size="small" @click="printThisPage">打印</el-button> 
5
+  </div>
6
+  <div id="dialysis-print-box">
7
+    <div class="dialysis-print-order">
8
+      <div class="order-yy-name"></div>
9
+      <div class="order-title">{{ orgname }}首次病程记录</div>
10
+      <div>
11
+        <table class="print-table" border="1" style="margin-top: 10px;">
12
+          <tr>
13
+            <td style="text-align:center;width:200px" colspan="1">
14
+              姓名:
15
+            </td>
16
+             <td style="text-align:center;width:200px" colspan="1">
17
+              <span style="display:inline-block;margin-left:10px;">
18
+               {{patient.name}}
19
+              </span>
20
+            </td>
21
+            <td style="text-align:center;width:200px" colspan="1">
22
+              性别:
23
+            </td>
24
+             <td style="text-align:center;width:200px" colspan="1">
25
+              <span style="display:inline-block;margin-left:10px;">
26
+                <span v-if="patient.gender == 1">男</span>
27
+                <span v-if="patient.gender == 2">女</span>
28
+              </span>
29
+            </td>
30
+            <td style="text-align:center;width:100px" colspan="1">
31
+              年龄:
32
+            </td>
33
+            <td style="text-align:center;width:50px" colspan="1">
34
+              <span style="display:inline-block;margin-left:10px;">
35
+                 {{getNewAge(patient.id_card_no)}}
36
+              </span>
37
+            </td>
38
+            <td style="text-align:center;width:100px" colspan="1">
39
+              婚姻:
40
+            </td>
41
+             <td style="text-align:center;width:100px" colspan="1">
42
+              <span style="display:inline-block;margin-left:10px;">
43
+                 <span v-if="patient.marital_status == 0"></span>
44
+                 <span v-if="patient.marital_status == 1">未婚</span>
45
+                 <span v-if="patient.marital_status == 2">已婚</span>
46
+                 <span v-if="patient.marital_status == 3">离异</span>
47
+                 <span v-if="patient.marital_status == 4">丧偶</span>
48
+              </span>
49
+            </td>
50
+             <td style="text-align:center;width:200px" colspan="1">
51
+              职业: 
52
+            </td>
53
+             <td style="text-align:center;width:100px" colspan="1">
54
+              <span style="display:inline-block;margin-left:10px;">
55
+               {{getProfession(patient.profession)?getProfession(patient.profession):''}}
56
+              </span>
57
+            </td>
58
+             <td style="text-align:center;width:300px" colspan="1">
59
+              电话:
60
+            </td>
61
+             <td style="text-align:center;width:100px" colspan="1">
62
+              <span style="display:inline-block;margin-left:10px;">
63
+                {{patient.phone}}
64
+              </span>
65
+            </td>
66
+          </tr>
67
+
68
+          <tr>
69
+            <td style="text-align:center;width:100px" colspan="1">
70
+              住址:
71
+            </td>   
72
+            <td style="text-align:center;width:500px" colspan="12">
73
+            
74
+              <span style="display:inline-block;margin-left:10px;">
75
+                {{patient.home_address}}
76
+              </span>
77
+            </td>   
78
+          </tr>
79
+     
80
+       
81
+          <tr>
82
+            <td style="text-align:center;width:300px" colspan="1">
83
+              主诉内容:
84
+              <span style="display:inline-block;margin-left:10px;">
85
+               
86
+              </span>
87
+            </td>   
88
+            <td style="text-align:center;" colspan="11">
89
+              <span style="display:block;margin-left:10px;text-align:left;">
90
+                <span v-html="hosDetail.main_content"></span>
91
+              </span>
92
+            </td>   
93
+          </tr>
94
+     
95
+          <tr>
96
+            <td style="text-align:center;width:300px" colspan="1">
97
+              病例特点:
98
+              <span style="display:inline-block;margin-left:10px;">
99
+               
100
+              </span>
101
+            </td>   
102
+            <td style="text-align:center;" colspan="11">
103
+              <span style="display:block;margin-left:10px;text-align:left;">
104
+                <span v-html="hosDetail.patient_case"></span>
105
+              </span>
106
+            </td>   
107
+          </tr>
108
+
109
+          <tr>
110
+            <td style="text-align:center;width:300px" colspan="1">
111
+              初步诊断:
112
+              <span style="display:inline-block;margin-left:10px;">
113
+               
114
+              </span>
115
+            </td>   
116
+            <td style="text-align:center;" colspan="11">
117
+              <span style="display:block;margin-left:10px;text-align:left;">
118
+                <span v-html="hosDetail.tentative_diagnosis"></span>
119
+              </span>
120
+            </td>   
121
+          </tr>
122
+      
123
+        
124
+           <tr>
125
+            <td style="text-align:center;width:300px" colspan="1">
126
+              诊断依据:
127
+              <span style="display:inline-block;margin-left:10px;">
128
+               
129
+              </span>
130
+            </td>   
131
+            <td style="text-align:center;" colspan="11">
132
+              <span style="display:block;margin-left:10px;text-align:left;">
133
+                <span v-html="hosDetail.diagnostic_basis"></span>
134
+              </span>
135
+            </td>   
136
+          </tr>
137
+
138
+          <tr>
139
+            <td style="text-align:center;width:300px" colspan="1">
140
+              鉴别诊断:
141
+              <span style="display:inline-block;margin-left:10px;">
142
+               
143
+              </span>
144
+            </td>   
145
+            <td style="text-align:center;" colspan="11">
146
+              <span style="display:block;margin-left:10px;text-align:left;">
147
+                <span v-html="hosDetail.differential_diagnosis"></span>
148
+              </span>
149
+            </td>   
150
+          </tr>
151
+
152
+          <tr>
153
+            <td style="text-align:center;width:300px" colspan="1">
154
+              诊疗计划:
155
+              <span style="display:inline-block;margin-left:10px;">
156
+               
157
+              </span>
158
+            </td>   
159
+            <td style="text-align:center;" colspan="11">
160
+              <span style="display:block;margin-left:10px;text-align:left;">
161
+                <span v-html="hosDetail.treatment_plan"></span>
162
+              </span>
163
+            </td>   
164
+          </tr>
165
+      
166
+     
167
+          
168
+      
169
+         
170
+        </table>
171
+     </div>
172
+     
173
+    
174
+  
175
+   
176
+    </div>
177
+    </div>
178
+</div>
179
+</template>
180
+
181
+<script>
182
+import { jsGetAge, uParseTime } from '@/utils/tools'
183
+import LabelBox from '../dialysis/printItem/LabelBox'
184
+import CheckBox from '../dialysis/batch_print/option_check_box'
185
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
186
+import {getFirstDetail,getPatientInfo} from "@/api/patient"
187
+import { getAllDoctorList } from "@/api/device"
188
+import { getDataConfig } from "@/utils/data";
189
+export default {
190
+  name: 'dialysisPrintOrderOne',
191
+  components: {
192
+    LabelBox,
193
+    BreadCrumb,
194
+    CheckBox
195
+  },
196
+  data() {
197
+    return {
198
+      crumbs: [
199
+        { path: false, name: '透析管理' },
200
+        { path: false, name: '打印单' }
201
+      ],
202
+     hosDetail:{},
203
+     patient:{},
204
+     doctorList:[],
205
+    educationOptions:[],
206
+    }
207
+  },
208
+  methods: {
209
+    getDatge(value) {
210
+      var times = Date.parse(value) / 1000
211
+      var timestr = uParseTime(times, '{y}年{m}月{d}日')
212
+      return timestr
213
+    },
214
+    getTime(val) {
215
+       if(val == "" || val == undefined){
216
+          return ""
217
+         }else {
218
+          return uParseTime(val, '{y}-{m}-{d}')
219
+         }
220
+    },
221
+    printThisPage() {
222
+        var ptime = Math.round(new Date().getTime() / 1000)
223
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
224
+        const style ='@media print {.dialysis-print-order{width:960px;margin:0 auto;letter-spacing:5px} .dialysis-print-order p{margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;font-weight: bold;margin: 10px 0;}'
225
+        printJS({
226
+            printable: 'dialysis-print-box',
227
+            type: 'html',
228
+            style: style,
229
+            scanStyles: false
230
+        })
231
+      
232
+    },
233
+  
234
+    getAge: function(val) {
235
+      if (val.birthday != 0) {
236
+        return jsGetAge(val.birth, '-')
237
+      } else {
238
+        return ''
239
+      }
240
+    },
241
+  
242
+    getNewAge(UUserCard) {
243
+      if (UUserCard != null && UUserCard != '') {
244
+        // 获取年龄
245
+        var myDate = new Date()
246
+        var month = myDate.getMonth() + 1
247
+        var day = myDate.getDate()
248
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
249
+        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
250
+          age++
251
+        }
252
+        return age
253
+      }
254
+    },
255
+    getFirstDetail(id){
256
+       getFirstDetail(id).then(response=>{
257
+        if(response.data.state == 1){
258
+            var detail = response.data.data.detail
259
+        
260
+            this.hosDetail = detail
261
+        }
262
+     })
263
+    },
264
+    getlist(){
265
+       var params = {
266
+         patient_id:parseInt(this.$route.query.patient_id),
267
+       }
268
+       console.log("param223322322323",params)
269
+      getPatientInfo(params).then(response=>{
270
+         if(response.data.state == 1){
271
+           var patient = response.data.data.patient
272
+           this.patient = patient
273
+         }
274
+      })
275
+    },
276
+    getAllDoctorList(){
277
+      getAllDoctorList().then(response=>{
278
+        if(response.data.state == 1){
279
+        var list = response.data.data.list
280
+        this.doctorList = list
281
+        }
282
+       })
283
+     },
284
+     getDoctor(id){
285
+        var name = ""
286
+        for(let i=0;i<this.doctorList.length;i++){
287
+          if(id == this.doctorList[i].admin_user_id){
288
+             name = this.doctorList[i].user_name
289
+          }
290
+        }
291
+        return name
292
+    },
293
+    getProfession(id){
294
+      var name = ""
295
+      for(let i=0;i<this.educationOptions.length;i++){
296
+          if(id == this.educationOptions[i].id){
297
+           name = this.educationOptions[i].name
298
+          }
299
+      }
300
+      return name
301
+    },
302
+    getTimeDay(start,end){
303
+      var count = ""
304
+      count = (end-start)/86400
305
+      return count + 1
306
+    }
307
+  },
308
+ 
309
+  created() {
310
+    this.educationOptions = getDataConfig("patient", "profession_options");
311
+    var xtuser = this.$store.getters.xt_user
312
+    this.orgname = xtuser.org.org_name
313
+    var id = this.$route.query.id
314
+    this.getlist()
315
+    this.getFirstDetail(id)
316
+    this.getAllDoctorList()
317
+    
318
+  }
319
+}
320
+</script>
321
+
322
+<style>
323
+.borderBox  p{
324
+  font-weight: bold;
325
+  margin: 10px 0;
326
+}
327
+.dialysis-print-order {
328
+  width: 960px;
329
+  margin: 0 auto;
330
+}
331
+
332
+.dialysis-print-order .order-yy-name {
333
+  margin: auto;
334
+  text-align: center;
335
+  font-size: 20px;
336
+  letter-spacing: 5px;
337
+}
338
+
339
+.dialysis-print-order .order-title {
340
+  margin: auto;
341
+  font-weight: 600;
342
+  text-align: center;
343
+  font-size: 22px;
344
+  padding: 10px 20px 20px 20px;
345
+}
346
+
347
+.dialysis-print-order .table-box {
348
+  width: 100%;
349
+  line-height: 23px;
350
+  font-size: 14px;
351
+}
352
+
353
+.dialysis-print-order .print-table {
354
+  width: 100%;
355
+  text-align: center;
356
+  border-collapse: collapse;
357
+  line-height: 40px;
358
+  font-size: 14px;
359
+}
360
+
361
+.dialysis-print-order .print-table-no {
362
+  width: 100%;
363
+  text-align: center;
364
+  border-collapse: collapse;
365
+  font-size: 14px;
366
+}
367
+
368
+.dialysis-print-order .under-line {
369
+  border-bottom: 1px solid #999;
370
+  width: 95%;
371
+  text-align: center;
372
+  margin-left: 2px;
373
+}
374
+
375
+.dialysis-print-order .title-box {
376
+  text-align: center;
377
+  font-size: 16px;
378
+}
379
+
380
+.dialysis-print-order .radio-lebel-box {
381
+  font-weight: 400;
382
+  cursor: pointer;
383
+}
384
+
385
+.dialysis-print-order .radio-no {
386
+  opacity: 0;
387
+  outline: none;
388
+  position: absolute;
389
+  margin: 0;
390
+  width: 0;
391
+  height: 0;
392
+  z-index: -1;
393
+}
394
+
395
+.dialysis-print-order .radio-inner {
396
+  white-space: nowrap;
397
+  cursor: pointer;
398
+  outline: none;
399
+  display: inline-block;
400
+  line-height: 1;
401
+  position: relative;
402
+  vertical-align: middle;
403
+}
404
+
405
+.dialysis-print-order .radio-fang {
406
+  display: inline-block;
407
+  position: relative;
408
+  border: 1px solid #000;
409
+  box-sizing: border-box;
410
+  width: 14px;
411
+  height: 14px;
412
+  background-color: #fff;
413
+  z-index: 1;
414
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
415
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
416
+}
417
+
418
+.dialysis-print-order .is-checked-radio::after {
419
+  content: "√";
420
+  font-size: 15px;
421
+}
422
+
423
+.dialysis-print-order .print-table-no tr td {
424
+  padding: 8px 5px;
425
+  line-height: 25px;
426
+}
427
+
428
+.dialysis-print-order .print-table tr td {
429
+  padding: 1px 1px;
430
+  /*line-height: 25px;*/
431
+}
432
+
433
+.es-img {
434
+  height: 25px;
435
+}
436
+
437
+.advice-name {
438
+  text-align: left;
439
+}
440
+
441
+.advice-children {
442
+  display: flex;
443
+}
444
+
445
+.title-box-pro {
446
+  border: 0 #fff;
447
+  line-height: 25px;
448
+  height: 25px;
449
+  text-align: left;
450
+  padding-left: 10px !important;
451
+}
452
+.title-box-pro-tr {
453
+  border: 0 #fff;
454
+}
455
+.text-align-left {
456
+  text-align: left !important;
457
+  padding-left: 10px !important;
458
+  font-size: 14px !important;
459
+  line-height: 25px;
460
+}
461
+.print-table-tr-new td {
462
+  line-height: 20px !important;
463
+}
464
+.border-top-solid {
465
+  border: solid 1px #000;
466
+}
467
+.print-template-two tr {
468
+  line-height: 30px;
469
+}
470
+.parent {
471
+  text-align: left;
472
+  padding-left: 20px !important;
473
+}
474
+</style>