|
@@ -0,0 +1,796 @@
|
|
1
|
+<template>
|
|
2
|
+ <div id="prescriptionPrint2">
|
|
3
|
+ <div v-for="(i,index) in printData">
|
|
4
|
+
|
|
5
|
+ <div
|
|
6
|
+ id="prescription-print"
|
|
7
|
+ class="prescription-print"
|
|
8
|
+ v-for="(item,index) in i.prescriptions"
|
|
9
|
+ :key="index"
|
|
10
|
+ >
|
|
11
|
+ <span v-if="org_id == 10138">
|
|
12
|
+ <img
|
|
13
|
+ src="https://kuyi.shengws.com/bailin/bltotle.jpg"
|
|
14
|
+ style="width: 100%"
|
|
15
|
+ alt=""
|
|
16
|
+ /></span>
|
|
17
|
+ <span v-if="org_id == 10278">
|
|
18
|
+ <img
|
|
19
|
+ src="https://kuyi.shengws.com/beierlog.png"
|
|
20
|
+ style="width: 100%"
|
|
21
|
+ alt=""
|
|
22
|
+ /></span>
|
|
23
|
+ <div class="printTitle">
|
|
24
|
+ 治疗单
|
|
25
|
+ <span
|
|
26
|
+ v-if="item.med_type == '1111'"
|
|
27
|
+ style="margin-left: 50px; border: 1px solid #000"
|
|
28
|
+ >精一</span
|
|
29
|
+ >
|
|
30
|
+ <span
|
|
31
|
+ v-if="item.med_type == '1112'"
|
|
32
|
+ style="margin-left: 50px; border: 1px solid #000"
|
|
33
|
+ >精二</span>
|
|
34
|
+ </div>
|
|
35
|
+ <div style="display: flex">
|
|
36
|
+ <div style="width: 33%; display: flex">
|
|
37
|
+ 费别:
|
|
38
|
+ <span class="under_line">
|
|
39
|
+ <span v-if="i.his_patient.id > 0">{{
|
|
40
|
+ i.his_patient.balance_accounts_type == 1 ? '医保':'自费'
|
|
41
|
+ }}</span>
|
|
42
|
+ <span v-else>{{
|
|
43
|
+ }}</span>
|
|
44
|
+ </span>
|
|
45
|
+ </div>
|
|
46
|
+ <div style="width: 33%; display: flex">
|
|
47
|
+ 电脑号: <span class="under_line">
|
|
48
|
+ <span>{{
|
|
49
|
+ i.his_patient.id_card_no
|
|
50
|
+ }}</span>
|
|
51
|
+ </span>
|
|
52
|
+ </div>
|
|
53
|
+ <div style="width: 33%; display: flex">
|
|
54
|
+ 处方编号:<span class="under_line">{{
|
|
55
|
+ item.prescription_number.substring(
|
|
56
|
+ item.prescription_number.length - 6
|
|
57
|
+ )
|
|
58
|
+ }}</span>
|
|
59
|
+ </div>
|
|
60
|
+ </div>
|
|
61
|
+
|
|
62
|
+ <div class="infoTitle">
|
|
63
|
+ <div>
|
|
64
|
+ 姓名:{{
|
|
65
|
+ i.name
|
|
66
|
+ ? i.name.indexOf("(") > -1
|
|
67
|
+ ?i.name.substring(
|
|
68
|
+ 0,
|
|
69
|
+ i.name.indexOf("(")
|
|
70
|
+ )
|
|
71
|
+ : i.name
|
|
72
|
+ : ""
|
|
73
|
+ }}
|
|
74
|
+ </div>
|
|
75
|
+ <div>
|
|
76
|
+ 性别:
|
|
77
|
+ <span v-if="i.gender == 1">男</span>
|
|
78
|
+ <span v-if="i.gender == 2">女</span>
|
|
79
|
+ </div>
|
|
80
|
+ <div>
|
|
81
|
+ 年龄:{{
|
|
82
|
+ getNewAge(i.birthday)
|
|
83
|
+ ? getNewAge(i.birthday)
|
|
84
|
+ : ""
|
|
85
|
+ }}岁
|
|
86
|
+ </div>
|
|
87
|
+ </div>
|
|
88
|
+ <div class="infoMain">
|
|
89
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
90
|
+ 门诊号码:<span class="under_line">{{ i.his_patient.id != 0 ? i.his_patient.number : "" }}</span>
|
|
91
|
+ </div>
|
|
92
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
93
|
+ 科别:<span class="under_line">{{
|
|
94
|
+ i.info.id != 0
|
|
95
|
+ ? getDepart(i.info.departments)
|
|
96
|
+ : ""
|
|
97
|
+ }}</span>
|
|
98
|
+ </div>
|
|
99
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
100
|
+ 临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
|
|
101
|
+ </div>
|
|
102
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
103
|
+ 自费药品签名:<span class="under_line"></span>
|
|
104
|
+ </div>
|
|
105
|
+ <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
|
|
106
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
107
|
+ 联系方式:<span class="under_line">{{ i.phone }}</span>
|
|
108
|
+ </div>
|
|
109
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
110
|
+ 开具日期:<span class="under_line">{{
|
|
111
|
+ getTime(item.pre_time) ? getTime(item.pre_time).split(" ")[0] : ""
|
|
112
|
+ }}</span>
|
|
113
|
+ </div>
|
|
114
|
+ <!-- <div>地址:{{item.patient.home_address}}</div> -->
|
|
115
|
+ <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
|
|
116
|
+ </div>
|
|
117
|
+
|
|
118
|
+ <!-- <div class="prescriptionBox">
|
|
119
|
+ <table style="width:100%;text-align:center;line-height:25px;">
|
|
120
|
+ <tr>
|
|
121
|
+ <td>序号</td>
|
|
122
|
+ <td>项目名称</td>
|
|
123
|
+ <td>数量</td>
|
|
124
|
+ <td>单位</td>
|
|
125
|
+ <td>单价</td>
|
|
126
|
+ <td>部位</td>
|
|
127
|
+ <td>备注</td>
|
|
128
|
+ <td>天数</td>
|
|
129
|
+ </tr>
|
|
130
|
+ <tr v-for="(it,index) in item.project" :key="index">
|
|
131
|
+ <td>{{index+1}}</td>
|
|
132
|
+ <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
|
|
133
|
+ <td>{{it.single_dose}}</td>
|
|
134
|
+ <td>{{getUnit(it.unit)}}</td>
|
|
135
|
+ <td>{{it.price}}</td>
|
|
136
|
+ <td></td>
|
|
137
|
+ <td>{{it.remark}}</td>
|
|
138
|
+ <td>{{it.day}}</td>
|
|
139
|
+
|
|
140
|
+ </tr>
|
|
141
|
+
|
|
142
|
+ <tr v-for="(it,index) in item.advices" :key="index">
|
|
143
|
+ <td>{{index+1}}</td>
|
|
144
|
+ <td>{{it.advice_name?it.advice_name:''}}</td>
|
|
145
|
+ <td>{{it.single_dose?it.single_dose:''}}</td>
|
|
146
|
+ <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
|
|
147
|
+ <td>{{it.price}}</td>
|
|
148
|
+ <td></td>
|
|
149
|
+ <td>{{it.remark}}</td>
|
|
150
|
+ <td>{{it.day}}</td>
|
|
151
|
+
|
|
152
|
+ </tr>
|
|
153
|
+ </table>
|
|
154
|
+ </div> -->
|
|
155
|
+ <div class="prescriptionBox">
|
|
156
|
+ <div class="Rp">Rp:</div>
|
|
157
|
+ <!-- <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
|
|
158
|
+ <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}} <span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}} * </span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}} × {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
|
|
159
|
+ </div> -->
|
|
160
|
+ <div class="drugsBox" v-for="(it, index) in item.project" :key="index">
|
|
161
|
+ <div class="drugsOne">
|
|
162
|
+ <span style="font-weight: bold">{{ index + 1 + "." }}</span
|
|
163
|
+ >{{
|
|
164
|
+ it.type == 2 ? it.project.project_name : it.good_info.good_name
|
|
165
|
+ }} × {{ it.count }}{{ unit }}
|
|
166
|
+ </div>
|
|
167
|
+ </div>
|
|
168
|
+ <div style="text-align: center">(以下空白)</div>
|
|
169
|
+ </div>
|
|
170
|
+ <div style="display: flex">
|
|
171
|
+ <div>
|
|
172
|
+ 医 师:
|
|
173
|
+ <span
|
|
174
|
+ style="width: 100px; display: inline-block"
|
|
175
|
+ v-if="i.info.creator == 0"
|
|
176
|
+ >
|
|
177
|
+ {{ i.info.doctor ? i.info.doctor : "" }}
|
|
178
|
+
|
|
179
|
+ </span>
|
|
180
|
+
|
|
181
|
+ <img
|
|
182
|
+ style="height: 30px"
|
|
183
|
+ :src="setAdminUserES(item.creator)"
|
|
184
|
+ alt=""
|
|
185
|
+ srcset=""
|
|
186
|
+ v-else
|
|
187
|
+ />
|
|
188
|
+ </div>
|
|
189
|
+ <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div> -->
|
|
190
|
+ </div>
|
|
191
|
+ <div style="display: flex">
|
|
192
|
+ <div style="display: flex">核对护士:</div>
|
|
193
|
+ </div>
|
|
194
|
+ <div style="display: flex">
|
|
195
|
+ 打印时间:<span style="border-bottom: 1px solid #000">{{
|
|
196
|
+ getTime(new Date()) ? getTime(new Date()) : ""
|
|
197
|
+ }}</span>
|
|
198
|
+ </div>
|
|
199
|
+ <span v-if="org_id == 10138"
|
|
200
|
+ ><img
|
|
201
|
+ src="https://kuyi.shengws.com/bailin/blend.jpg"
|
|
202
|
+ style="width: 100%"
|
|
203
|
+ alt=""
|
|
204
|
+ /></span>
|
|
205
|
+ <span v-if="org_id == 10278"
|
|
206
|
+ ><img
|
|
207
|
+ src="https://kuyi.shengws.com/bailinbeier.png"
|
|
208
|
+ style="width: 100%"
|
|
209
|
+ alt=""
|
|
210
|
+ /></span>
|
|
211
|
+ <div style="page-break-after: always"></div>
|
|
212
|
+ </div>
|
|
213
|
+
|
|
214
|
+ <!-- <div id='prescriptionPrint'>
|
|
215
|
+
|
|
216
|
+ <div v-for="(item,index) in advicePrint" :key="index">
|
|
217
|
+ <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
|
|
218
|
+ <div style="display:flex;justify-content: space-between;font-weight:bold;">
|
|
219
|
+ <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
|
|
220
|
+ <span>费别</span>
|
|
221
|
+ <span>自费</span>
|
|
222
|
+ <span>公费</span>
|
|
223
|
+ <span>保险</span>
|
|
224
|
+ <span>其他</span>
|
|
225
|
+ </div>
|
|
226
|
+ <div>就诊日期:{{getTime(item.ctime)}}</div>
|
|
227
|
+ </div>
|
|
228
|
+
|
|
229
|
+ <div class="printTitle">血液透析中心</div>
|
|
230
|
+
|
|
231
|
+ <div class="printTitle">处方、治疗单</div>
|
|
232
|
+
|
|
233
|
+ <div class="infoTitle">
|
|
234
|
+ <div>门诊编号:</div>
|
|
235
|
+ <div>电脑号:</div>
|
|
236
|
+ </div>
|
|
237
|
+
|
|
238
|
+ <div class="infoMain">
|
|
239
|
+ <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
|
|
240
|
+ <div style="margin-bottom: 10px;width:25%">性别:
|
|
241
|
+ <span v-if="item.patient.gender == 1">男</span>
|
|
242
|
+ <span v-if="item.patient.gender == 2">女</span>
|
|
243
|
+ </div>
|
|
244
|
+ <div style="margin-bottom: 10px;width:25%">年龄:
|
|
245
|
+ <span>{{item.patient.age}}</span>
|
|
246
|
+ </div>
|
|
247
|
+ <div style="margin-bottom: 10px;width:25%">参保类型:</div>
|
|
248
|
+ <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
|
|
249
|
+ <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
|
|
250
|
+ <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
|
|
251
|
+ </div>
|
|
252
|
+
|
|
253
|
+ <div class="prescriptionBox">
|
|
254
|
+ <table style="width:100%;text-align:center;line-height:25px;">
|
|
255
|
+ <tr>
|
|
256
|
+ <td>序号</td>
|
|
257
|
+ <td>项目名称</td>
|
|
258
|
+ <td>数量</td>
|
|
259
|
+ <td>单位</td>
|
|
260
|
+ <td>单价</td>
|
|
261
|
+ <td>部位</td>
|
|
262
|
+ <td>备注</td>
|
|
263
|
+ <td>天数</td>
|
|
264
|
+ </tr>
|
|
265
|
+ <tr v-for="(it,index) in item.project" :key="index">
|
|
266
|
+ <td>{{index+1}}</td>
|
|
267
|
+ <td>{{getProjectName(it.project_id)}}</td>
|
|
268
|
+ <td>{{it.single_dose}}</td>
|
|
269
|
+ <td>{{getUnit(it.unit)}}</td>
|
|
270
|
+ <td>{{it.price}}</td>
|
|
271
|
+ <td></td>
|
|
272
|
+ <td>{{it.remark}}</td>
|
|
273
|
+ <td>{{it.day}}</td>
|
|
274
|
+
|
|
275
|
+ </tr>
|
|
276
|
+ </table>
|
|
277
|
+ </div>
|
|
278
|
+ <div class="infoTitle">
|
|
279
|
+ <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
|
|
280
|
+ <div>签章:</div>
|
|
281
|
+ </div>
|
|
282
|
+ <div class="actionBar">
|
|
283
|
+ <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
|
|
284
|
+ <div>费用:</div>
|
|
285
|
+ </div>
|
|
286
|
+ <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
|
|
287
|
+ <tr>
|
|
288
|
+ <td style="width:16%;">治疗时间</td>
|
|
289
|
+ <td style="width:16%;"></td>
|
|
290
|
+ <td style="width:16%;"></td>
|
|
291
|
+ <td style="width:16%;"></td>
|
|
292
|
+ <td style="width:16%;"></td>
|
|
293
|
+ <td style="width:16%;"></td>
|
|
294
|
+ </tr>
|
|
295
|
+ <tr>
|
|
296
|
+ <td style="width:16%;">医生签字</td>
|
|
297
|
+ <td style="width:16%;"></td>
|
|
298
|
+ <td style="width:16%;"></td>
|
|
299
|
+ <td style="width:16%;"></td>
|
|
300
|
+ <td style="width:16%;"></td>
|
|
301
|
+ <td style="width:16%;"></td>
|
|
302
|
+ </tr>
|
|
303
|
+ <tr>
|
|
304
|
+ <td style="width:16px;">患者签字</td>
|
|
305
|
+ <td style="width:16px;"></td>
|
|
306
|
+ <td style="width:16px;"></td>
|
|
307
|
+ <td style="width:16px;"></td>
|
|
308
|
+ <td style="width:16px;"></td>
|
|
309
|
+ <td style="width:16px;"></td>
|
|
310
|
+ </tr>
|
|
311
|
+ </table>
|
|
312
|
+ </div>
|
|
313
|
+
|
|
314
|
+ </div>
|
|
315
|
+
|
|
316
|
+ </div> -->
|
|
317
|
+ </div>
|
|
318
|
+ </div>
|
|
319
|
+</template>
|
|
320
|
+<script>
|
|
321
|
+import { jsGetAge, uParseTime } from "@/utils/tools";
|
|
322
|
+import { getAllDoctorList, getPrescriptionPrint } from "@/api/project/project";
|
|
323
|
+import { getInitData } from "@/api/his/his";
|
|
324
|
+export default {
|
|
325
|
+ props: {
|
|
326
|
+ patient_id: Number,
|
|
327
|
+ record_date: String,
|
|
328
|
+ prescription_id: Number,
|
|
329
|
+ ids: String,
|
|
330
|
+ newHisPatient:Object,
|
|
331
|
+ printData: Array
|
|
332
|
+
|
|
333
|
+ },
|
|
334
|
+ data() {
|
|
335
|
+ return {
|
|
336
|
+ doctorList_1: [],
|
|
337
|
+ operatorMaps: {},
|
|
338
|
+ doctorList: [],
|
|
339
|
+ advicePrint: {},
|
|
340
|
+ doc_name:"",
|
|
341
|
+ patient: {},
|
|
342
|
+ tableData: [],
|
|
343
|
+ prescriptionInfo: [],
|
|
344
|
+ projectList: [],
|
|
345
|
+ prescriptions: [],
|
|
346
|
+ settlement: [
|
|
347
|
+ { value: 1, label: "医保" },
|
|
348
|
+ { value: 2, label: "自费" },
|
|
349
|
+ { value: 3, label: "公费" },
|
|
350
|
+ { value: 4, label: "农保" },
|
|
351
|
+ { value: 5, label: "会员" },
|
|
352
|
+ { value: 6, label: "职工" },
|
|
353
|
+ { value: 7, label: "合同" },
|
|
354
|
+ ],
|
|
355
|
+ hisPatient: {},
|
|
356
|
+ diagnoses: [],
|
|
357
|
+ department: [],
|
|
358
|
+ faber: {},
|
|
359
|
+ org_id: 0,
|
|
360
|
+ };
|
|
361
|
+ },
|
|
362
|
+ methods: {
|
|
363
|
+ // 电子签名
|
|
364
|
+ setAdminUserES(id,name) {
|
|
365
|
+ if (id == 0) {
|
|
366
|
+ return "";
|
|
367
|
+ }
|
|
368
|
+ if (id in this.operatorMaps) {
|
|
369
|
+ return this.operatorMaps[id].url;
|
|
370
|
+ } else {
|
|
371
|
+ this.doc_name = name
|
|
372
|
+ return "";
|
|
373
|
+ }
|
|
374
|
+ },
|
|
375
|
+
|
|
376
|
+ getNewAge(birthday) {
|
|
377
|
+ // var myDate = new Date(birthday * 1000)
|
|
378
|
+ // var month = myDate.getMonth() + 1
|
|
379
|
+ // var day = myDate.getDate()
|
|
380
|
+ // var age = new Date().getFullYear() - myDate.getFullYear()
|
|
381
|
+ // if (month < new Date().getMonth() + 1 || new Date().getMonth() + 1 == month && day <= new Date().getDate()) {
|
|
382
|
+ // age++
|
|
383
|
+ // }
|
|
384
|
+ // return age
|
|
385
|
+ var nowTime = new Date().getTime();
|
|
386
|
+ //一年毫秒数(365 * 86400000 = 31536000000)
|
|
387
|
+ return Math.ceil((nowTime - birthday * 1000) / 31536000000);
|
|
388
|
+ },
|
|
389
|
+ getAge(patient) {
|
|
390
|
+ var thisLen = patient.id_card_no.length;
|
|
391
|
+ var birth = "";
|
|
392
|
+ if (thisLen == 15) {
|
|
393
|
+ birth = "19" + patient.id_card_no.substr(6, 6);
|
|
394
|
+ } else {
|
|
395
|
+ birth = patient.id_card_no.substr(6, 8);
|
|
396
|
+ }
|
|
397
|
+ var births =
|
|
398
|
+ birth.substr(0, 4) +
|
|
399
|
+ "-" +
|
|
400
|
+ birth.substr(4, 2) +
|
|
401
|
+ "-" +
|
|
402
|
+ birth.substr(6, 2);
|
|
403
|
+ return jsGetAge(births, "-");
|
|
404
|
+ },
|
|
405
|
+ printThisPage() {
|
|
406
|
+ var ptime = Math.round(new Date().getTime() / 1000);
|
|
407
|
+ this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
|
|
408
|
+
|
|
409
|
+ const style =
|
|
410
|
+ "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}";
|
|
411
|
+ printJS({
|
|
412
|
+ printable: "prescription-print",
|
|
413
|
+ type: "html",
|
|
414
|
+ style: style,
|
|
415
|
+ scanStyles: false,
|
|
416
|
+ });
|
|
417
|
+ },
|
|
418
|
+ getDepart(id) {
|
|
419
|
+ var name = "";
|
|
420
|
+ for (let i = 0; i < this.department.length; i++) {
|
|
421
|
+ if (id == this.department[i].id) {
|
|
422
|
+ name = this.department[i].name;
|
|
423
|
+ }
|
|
424
|
+ }
|
|
425
|
+ return name;
|
|
426
|
+ },
|
|
427
|
+ getAllDoctorList() {
|
|
428
|
+ getAllDoctorList().then((response) => {
|
|
429
|
+ if (response.data.state == 1) {
|
|
430
|
+ var doctor = response.data.data.doctor;
|
|
431
|
+
|
|
432
|
+ this.doctorList = doctor;
|
|
433
|
+ }
|
|
434
|
+ });
|
|
435
|
+ },
|
|
436
|
+
|
|
437
|
+ getDoctor(id) {
|
|
438
|
+ var name = "";
|
|
439
|
+ for (let i = 0; i < this.doctorList.length; i++) {
|
|
440
|
+ if (id == this.doctorList[i].admin_user_id) {
|
|
441
|
+ name = this.doctorList[i].user_name;
|
|
442
|
+ }
|
|
443
|
+ }
|
|
444
|
+ return name;
|
|
445
|
+ },
|
|
446
|
+ getTime(value, temp) {
|
|
447
|
+ if (value != undefined) {
|
|
448
|
+ return uParseTime(value, temp);
|
|
449
|
+ }
|
|
450
|
+ return "";
|
|
451
|
+ },
|
|
452
|
+ getPrescriptionPrint() {
|
|
453
|
+ var params = {
|
|
454
|
+ patient_id: this.patient_id,
|
|
455
|
+ record_date: this.record_date,
|
|
456
|
+ prescription_id: this.prescription_id,
|
|
457
|
+ ids: this.ids,
|
|
458
|
+ p_type: 2,
|
|
459
|
+ };
|
|
460
|
+ console.log("999999", params);
|
|
461
|
+ getPrescriptionPrint(params).then((response) => {
|
|
462
|
+ if (response.data.state == 1) {
|
|
463
|
+ var advicePrint = response.data.data.advicePrint;
|
|
464
|
+ console.log("adviceprint", advicePrint);
|
|
465
|
+ this.advicePrint = advicePrint;
|
|
466
|
+ this.prescriptions = advicePrint;
|
|
467
|
+ var projectlist = response.data.data.projectlist;
|
|
468
|
+ console.log("所有项目列表", projectlist);
|
|
469
|
+ this.projectList = projectlist;
|
|
470
|
+ this.hisPatient = response.data.data.hisPatient;
|
|
471
|
+ this.doctorList_1 = response.data.data.eles;
|
|
472
|
+ console.log(this.doctorList_1, "医生列表");
|
|
473
|
+ if (this.doctorList_1.length > 0) {
|
|
474
|
+ var operatorsLen = this.doctorList_1.length;
|
|
475
|
+ for (var index = 0; index < operatorsLen; index++) {
|
|
476
|
+ this.$set(
|
|
477
|
+ this.operatorMaps,
|
|
478
|
+ this.doctorList_1[index].creator,
|
|
479
|
+ this.doctorList_1[index]
|
|
480
|
+ );
|
|
481
|
+ }
|
|
482
|
+ }
|
|
483
|
+ let projectPrint = [];
|
|
484
|
+ let total = 0;
|
|
485
|
+ this.advicePrint.map((item) => {
|
|
486
|
+ console.log(item.project.length);
|
|
487
|
+ if (item.project.length > 0) {
|
|
488
|
+ for (var i = item.project.length - 1; i >= 0; i--) {
|
|
489
|
+ if (item.project[i].type == 2) {
|
|
490
|
+ if (item.project[i].project.cost_classify == 3) {
|
|
491
|
+ item.project.splice(i, 1);
|
|
492
|
+ }
|
|
493
|
+ }
|
|
494
|
+ }
|
|
495
|
+ }
|
|
496
|
+ });
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+ }
|
|
500
|
+ });
|
|
501
|
+ },
|
|
502
|
+ getProjectName(id) {
|
|
503
|
+ var project_name = "";
|
|
504
|
+ for (let i = 0; i < this.projectList.length; i++) {
|
|
505
|
+ if (id == this.projectList[i].id) {
|
|
506
|
+ project_name = this.projectList[i].project_name;
|
|
507
|
+ }
|
|
508
|
+ }
|
|
509
|
+ return project_name;
|
|
510
|
+ },
|
|
511
|
+ getUnit(id) {
|
|
512
|
+ var unit = "";
|
|
513
|
+ for (let i = 0; i < this.projectList.length; i++) {
|
|
514
|
+ if (id == this.projectList[i].id) {
|
|
515
|
+ unit = this.projectList[i].unit;
|
|
516
|
+ }
|
|
517
|
+ }
|
|
518
|
+ return unit;
|
|
519
|
+ },
|
|
520
|
+
|
|
521
|
+ getTotalOne(id) {
|
|
522
|
+ var total = 0;
|
|
523
|
+ var addtotal = 0;
|
|
524
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
525
|
+ if (id == this.prescriptions[i].id) {
|
|
526
|
+ if (this.prescriptions[i].project != null) {
|
|
527
|
+ for (let a = 0; a < this.prescriptions[i].project.length; a++) {
|
|
528
|
+ total =
|
|
529
|
+ total +
|
|
530
|
+ this.prescriptions[i].project[a].price *
|
|
531
|
+ this.prescriptions[i].project[a].count;
|
|
532
|
+ }
|
|
533
|
+ }
|
|
534
|
+
|
|
535
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
536
|
+ for (
|
|
537
|
+ let a = 0;
|
|
538
|
+ a < this.prescriptions[i].additionalcharge.length;
|
|
539
|
+ a++
|
|
540
|
+ ) {
|
|
541
|
+ addtotal =
|
|
542
|
+ addtotal +
|
|
543
|
+ this.prescriptions[i].additionalcharge[a].price *
|
|
544
|
+ this.prescriptions[i].additionalcharge[a].count;
|
|
545
|
+ }
|
|
546
|
+ }
|
|
547
|
+ addtotal = Math.floor(addtotal * 100) / 100;
|
|
548
|
+ }
|
|
549
|
+ }
|
|
550
|
+
|
|
551
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
552
|
+ if (id == this.prescriptions[i].id) {
|
|
553
|
+ if (this.prescriptions[i].advices != null) {
|
|
554
|
+ for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
|
555
|
+ total =
|
|
556
|
+ total +
|
|
557
|
+ this.prescriptions[i].advices[a].price *
|
|
558
|
+ this.prescriptions[i].advices[a].prescribing_number;
|
|
559
|
+ }
|
|
560
|
+ }
|
|
561
|
+
|
|
562
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
563
|
+ for (
|
|
564
|
+ let a = 0;
|
|
565
|
+ a < this.prescriptions[i].additionalcharge.length;
|
|
566
|
+ a++
|
|
567
|
+ ) {
|
|
568
|
+ addtotal =
|
|
569
|
+ addtotal +
|
|
570
|
+ this.prescriptions[i].additionalcharge[a].price *
|
|
571
|
+ this.prescriptions[i].additionalcharge[a].count;
|
|
572
|
+ }
|
|
573
|
+ }
|
|
574
|
+ addtotal = Math.floor(addtotal * 100) / 100;
|
|
575
|
+ }
|
|
576
|
+ }
|
|
577
|
+
|
|
578
|
+ return total + addtotal;
|
|
579
|
+ },
|
|
580
|
+ getInitData() {
|
|
581
|
+ getInitData().then((response) => {
|
|
582
|
+ if (response.data.state == 1) {
|
|
583
|
+ this.department = response.data.data.department;
|
|
584
|
+ this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
|
|
585
|
+ console.log("争端", this.diagnoses);
|
|
586
|
+ }
|
|
587
|
+ });
|
|
588
|
+ },
|
|
589
|
+ getDiagnosis(ids) {
|
|
590
|
+ let newIds = ids.split(",").sort(function (a, b) {
|
|
591
|
+ return a - b;
|
|
592
|
+ });
|
|
593
|
+
|
|
594
|
+ var name = "";
|
|
595
|
+ let nameArr = [];
|
|
596
|
+ for (let i = 0; i < this.diagnoses.length; i++) {
|
|
597
|
+ // if(id == this.diagnoses[i].id){
|
|
598
|
+ // name = this.diagnoses[i].class_name
|
|
599
|
+ // }
|
|
600
|
+
|
|
601
|
+ if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
|
|
602
|
+ // name += diagnoses[i].class_name + ' '
|
|
603
|
+ nameArr.push(this.diagnoses[i].class_name);
|
|
604
|
+ }
|
|
605
|
+ }
|
|
606
|
+ let newNameArr = [];
|
|
607
|
+ nameArr.map((item, index) => {
|
|
608
|
+ if (item == "尿毒症") {
|
|
609
|
+ newNameArr.push(item);
|
|
610
|
+ nameArr.splice(index, 1, "");
|
|
611
|
+ }
|
|
612
|
+ });
|
|
613
|
+ newNameArr.push(...nameArr);
|
|
614
|
+ return newNameArr.join(" ");
|
|
615
|
+ },
|
|
616
|
+ compare(property) {
|
|
617
|
+ return function (a, b) {
|
|
618
|
+ var value1 = a[property];
|
|
619
|
+ var value2 = b[property];
|
|
620
|
+ return value1 - value2; //升序排序
|
|
621
|
+ };
|
|
622
|
+ },
|
|
623
|
+ getName(list) {
|
|
624
|
+ console.log("list22", list);
|
|
625
|
+ let new_list = [];
|
|
626
|
+ for (let i = 0; i < list.length; i++) {
|
|
627
|
+ if (list[i].aac031 == "1") {
|
|
628
|
+ new_list.push(list[i]);
|
|
629
|
+ }
|
|
630
|
+ }
|
|
631
|
+
|
|
632
|
+ switch (new_list[0].bcc334) {
|
|
633
|
+ case "A31001":
|
|
634
|
+ return "深圳医保1档";
|
|
635
|
+ break;
|
|
636
|
+ case "A31002":
|
|
637
|
+ return "深圳医保2档";
|
|
638
|
+
|
|
639
|
+ break;
|
|
640
|
+ case "A31003":
|
|
641
|
+ return "深圳医保3档";
|
|
642
|
+
|
|
643
|
+ break;
|
|
644
|
+ case "A31004":
|
|
645
|
+ return "二档(少儿)";
|
|
646
|
+
|
|
647
|
+ break;
|
|
648
|
+ case "A31005":
|
|
649
|
+ return "学生二档";
|
|
650
|
+
|
|
651
|
+ break;
|
|
652
|
+ case "A31006":
|
|
653
|
+ return "大学生二档";
|
|
654
|
+
|
|
655
|
+ break;
|
|
656
|
+ case "A32001":
|
|
657
|
+ return "在职公务员";
|
|
658
|
+ break;
|
|
659
|
+ case "A32002":
|
|
660
|
+ return "在职驻深公务员";
|
|
661
|
+
|
|
662
|
+ break;
|
|
663
|
+ case "A39301":
|
|
664
|
+ return "家属统筹医疗";
|
|
665
|
+
|
|
666
|
+ break;
|
|
667
|
+ case "A41001":
|
|
668
|
+ return "工伤在职";
|
|
669
|
+
|
|
670
|
+ break;
|
|
671
|
+ case "A51001":
|
|
672
|
+ return "生育在职";
|
|
673
|
+
|
|
674
|
+ break;
|
|
675
|
+ case "A52001":
|
|
676
|
+ return "生育医疗一档";
|
|
677
|
+
|
|
678
|
+ break;
|
|
679
|
+ case "A52002":
|
|
680
|
+ return "生育医疗一档";
|
|
681
|
+
|
|
682
|
+ break;
|
|
683
|
+ case "C31001":
|
|
684
|
+ return "一档医疗退休";
|
|
685
|
+
|
|
686
|
+ break;
|
|
687
|
+ case "C31002":
|
|
688
|
+ return "二档医疗退休";
|
|
689
|
+ break;
|
|
690
|
+ }
|
|
691
|
+ },
|
|
692
|
+ },
|
|
693
|
+ created() {
|
|
694
|
+ this.getInitData();
|
|
695
|
+ this.getAllDoctorList();
|
|
696
|
+ this.getPrescriptionPrint();
|
|
697
|
+ var xtuser = this.$store.getters.xt_user;
|
|
698
|
+ this.orgname = xtuser.org.org_name;
|
|
699
|
+ this.org_id = this.$store.getters.xt_user.org.id;
|
|
700
|
+ },
|
|
701
|
+ watch: {
|
|
702
|
+ patient_id: function (val) {
|
|
703
|
+ console.log(
|
|
704
|
+ "101000010101010",
|
|
705
|
+ this.patient_id,
|
|
706
|
+ this.record_date,
|
|
707
|
+ this.prescription_id
|
|
708
|
+ );
|
|
709
|
+ // this.getPrescriptionPrint()
|
|
710
|
+ },
|
|
711
|
+ ids: function (val) {
|
|
712
|
+ this.ids = val;
|
|
713
|
+ console.log("this.idsids", this.ids);
|
|
714
|
+ this.getPrescriptionPrint();
|
|
715
|
+ },
|
|
716
|
+ },
|
|
717
|
+};
|
|
718
|
+</script>
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+<style lang="scss" scoped>
|
|
722
|
+.prescription-print {
|
|
723
|
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
|
|
724
|
+ 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
725
|
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
|
|
726
|
+ 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
727
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
728
|
+ margin-bottom: 20px;
|
|
729
|
+ padding: 20px 10px;
|
|
730
|
+}
|
|
731
|
+.printTitle {
|
|
732
|
+ font-size: 22px;
|
|
733
|
+ text-align: center;
|
|
734
|
+ font-weight: bold;
|
|
735
|
+ margin-bottom: 10px;
|
|
736
|
+}
|
|
737
|
+.infoTitle {
|
|
738
|
+ display: flex;
|
|
739
|
+ margin-top: 10px;
|
|
740
|
+ line-height: 24px;
|
|
741
|
+}
|
|
742
|
+.infoTitle div {
|
|
743
|
+ width: 200px;
|
|
744
|
+}
|
|
745
|
+.infoMain {
|
|
746
|
+ display: flex;
|
|
747
|
+ flex-wrap: wrap;
|
|
748
|
+ margin-top: 10px;
|
|
749
|
+}
|
|
750
|
+.infoMain div {
|
|
751
|
+ width: 50%;
|
|
752
|
+ line-height: 24px;
|
|
753
|
+}
|
|
754
|
+.prescriptionBox {
|
|
755
|
+ padding: 0 10px;
|
|
756
|
+ min-height: 400px;
|
|
757
|
+}
|
|
758
|
+.Rp {
|
|
759
|
+ font-size: 22px;
|
|
760
|
+ font-weight: bold;
|
|
761
|
+}
|
|
762
|
+.drugsBox {
|
|
763
|
+ padding-left: 40px;
|
|
764
|
+ margin-bottom: 10px;
|
|
765
|
+}
|
|
766
|
+.drugsBox div {
|
|
767
|
+ line-height: 20px;
|
|
768
|
+}
|
|
769
|
+.drugsOne {
|
|
770
|
+ line-height: 24px;
|
|
771
|
+}
|
|
772
|
+.drugsOne span {
|
|
773
|
+ margin-right: 20px;
|
|
774
|
+}
|
|
775
|
+.doctorBox {
|
|
776
|
+ display: flex;
|
|
777
|
+ justify-content: space-between;
|
|
778
|
+ padding: 0 10px;
|
|
779
|
+ line-height: 24px;
|
|
780
|
+ border-bottom: 2px solid #000;
|
|
781
|
+}
|
|
782
|
+.actionBar {
|
|
783
|
+ display: flex;
|
|
784
|
+ justify-content: space-between;
|
|
785
|
+ line-height: 24px;
|
|
786
|
+ padding: 0 10px;
|
|
787
|
+}
|
|
788
|
+.actionBar p {
|
|
789
|
+ width: 150px;
|
|
790
|
+}
|
|
791
|
+.under_line {
|
|
792
|
+ display: inline-block;
|
|
793
|
+ border-bottom: 1px solid #000;
|
|
794
|
+ flex: 1;
|
|
795
|
+}
|
|
796
|
+</style>
|