|
@@ -1,148 +1,200 @@
|
1
|
1
|
<template>
|
2
|
|
- <div>
|
3
|
|
- <div id='prescription-print3' class="prescription-print">
|
4
|
|
- <div v-for="(i,index) in printData">
|
5
|
|
-<!-- <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
|
6
|
|
-<!--/* <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
|
7
|
|
- <div class="printTitle">检验申请单</div>
|
8
|
|
-
|
9
|
|
- <div style="border:1px solid #000;">
|
10
|
|
- <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
|
11
|
|
- <div>是否急诊:否</div>
|
12
|
|
- <div>结算方式:{{ i.his_patient.id != 0 ? i.his_patient.balance_accounts_type == 1 ? '医保' : '自费' : '' }}</div>
|
13
|
|
- <div>金额:{{ total }}</div>
|
14
|
|
- </div>
|
15
|
|
- <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
|
16
|
|
- <div>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</div>
|
17
|
|
- <div>性别:
|
18
|
|
- <span v-if="i.his_patient.id != 0">
|
19
|
|
- <span v-if="i.his_patient.gend == 1">男</span>
|
20
|
|
- <span v-if="i.his_patient.gend == 2">女</span>
|
21
|
|
- </span>
|
22
|
|
- <span v-else>
|
23
|
|
- <span v-if="i.gender == 1">男</span>
|
24
|
|
- <span v-if="i.gender == 2">女</span>
|
25
|
|
- </span>
|
26
|
|
- </div>
|
27
|
|
- <div>年龄:{{i.age?i.age:""}}岁</div>
|
28
|
|
- </div>
|
29
|
|
- <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
|
30
|
|
- <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
|
|
2
|
+ <div id="prescriptionPrint" class="prescription-print">
|
|
3
|
+ <div v-for="(i, index) in printData" :key="index" style="box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;">
|
|
4
|
+ <!-- <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
|
|
5
|
+ <!--/* <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
|
|
6
|
+ <div
|
|
7
|
+ id="prescription-print"
|
|
8
|
+ class="prescription-print"
|
|
9
|
+ style="page-break-after: always"
|
|
10
|
+ v-for="(item, index) in i.prescriptions"
|
|
11
|
+ :key="index"
|
|
12
|
+ >
|
|
13
|
+ <div class="printTitle">检验申请单</div>
|
|
14
|
+
|
|
15
|
+ <div style="border: 1px solid #000">
|
|
16
|
+ <div
|
|
17
|
+ style="
|
|
18
|
+ display: flex;
|
|
19
|
+ justify-content: space-between;
|
|
20
|
+ border-bottom: 1px solid #000;
|
|
21
|
+ line-height: 40px;
|
|
22
|
+ padding: 0 10px;
|
|
23
|
+ "
|
|
24
|
+ >
|
|
25
|
+ <div>是否急诊:否</div>
|
|
26
|
+ <div>
|
|
27
|
+ 结算方式:{{
|
|
28
|
+ i.his_patient.id != 0
|
|
29
|
+ ? i.his_patient.balance_accounts_type == 1
|
|
30
|
+ ? "医保"
|
|
31
|
+ : "自费"
|
|
32
|
+ : ""
|
|
33
|
+ }}
|
|
34
|
+ </div>
|
|
35
|
+ <div>金额:{{ total }}</div>
|
|
36
|
+ </div>
|
|
37
|
+ <div
|
|
38
|
+ style="
|
|
39
|
+ display: flex;
|
|
40
|
+ justify-content: space-between;
|
|
41
|
+ border-bottom: 1px solid #000;
|
|
42
|
+ line-height: 40px;
|
|
43
|
+ padding: 0 10px;
|
|
44
|
+ "
|
|
45
|
+ >
|
|
46
|
+ <div>
|
|
47
|
+ 姓名:{{ i.his_patient.id != 0 ? i.his_patient.name : i.name }}
|
|
48
|
+ </div>
|
|
49
|
+ <div>
|
|
50
|
+ 性别:
|
|
51
|
+ <span v-if="i.his_patient.id != 0">
|
|
52
|
+ <span v-if="i.his_patient.gend == 1">男</span>
|
|
53
|
+ <span v-if="i.his_patient.gend == 2">女</span>
|
|
54
|
+ </span>
|
|
55
|
+ <span v-else>
|
|
56
|
+ <span v-if="i.gender == 1">男</span>
|
|
57
|
+ <span v-if="i.gender == 2">女</span>
|
|
58
|
+ </span>
|
|
59
|
+ </div>
|
|
60
|
+ <div>年龄:{{ i.age ? i.age : "" }}岁</div>
|
|
61
|
+ </div>
|
|
62
|
+ <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
|
|
63
|
+ <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
|
31
|
64
|
<span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
|
32
|
65
|
<span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
|
33
|
66
|
<span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
|
34
|
67
|
<span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
|
35
|
68
|
</div> -->
|
36
|
|
- <div style="margin:20px 0;padding:0 10px;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
|
37
|
|
- <div style="display:flex;margin-bottom:20px;padding:0 10px;">
|
38
|
|
- <div>检验项目:</div>
|
39
|
|
- <div>
|
40
|
|
- <div v-for="item in getTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
|
41
|
|
- <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
|
42
|
|
- </div>
|
43
|
|
- </div>
|
44
|
|
- <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
|
45
|
|
- <div>开单医生:{{ i.info.doctor ? i.info.doctor : '' }}</div>
|
46
|
|
- <div>开单日期:
|
47
|
|
- {{getTime(i.info.ctime) ? getTime(i.info.ctime).split(' ')[0] : ''}}
|
48
|
|
- </div>
|
49
|
|
- <div>医生签字:{{ i.info.doctor ? i.info.doctor : '' }}</div>
|
50
|
|
- </div>
|
|
69
|
+ <div style="margin: 20px 0; padding: 0 10px">
|
|
70
|
+ 临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
|
|
71
|
+ </div>
|
|
72
|
+ <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
|
|
73
|
+ <div>检验项目:</div>
|
|
74
|
+ <div>
|
|
75
|
+ <div
|
|
76
|
+ v-for="item in getTeam(i.prescriptions)"
|
|
77
|
+ style="margin-bottom: 10px"
|
|
78
|
+ >
|
|
79
|
+ {{ item.team.project_team }}
|
|
80
|
+ </div>
|
|
81
|
+ <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
|
51
|
82
|
</div>
|
52
|
|
-<!-- <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
|
53
|
|
-<!-- <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
|
|
83
|
+ </div>
|
|
84
|
+ <div
|
|
85
|
+ style="
|
|
86
|
+ display: flex;
|
|
87
|
+ justify-content: space-between;
|
|
88
|
+ border-top: 1px solid #000;
|
|
89
|
+ line-height: 40px;
|
|
90
|
+ padding: 0 10px;
|
|
91
|
+ "
|
|
92
|
+ >
|
|
93
|
+ <div>开单医生:{{ i.info.doctor ? i.info.doctor : "" }}</div>
|
|
94
|
+ <div>
|
|
95
|
+ 开单日期:
|
|
96
|
+ {{
|
|
97
|
+ getTime(i.info.ctime) ? getTime(i.info.ctime).split(" ")[0] : ""
|
|
98
|
+ }}
|
|
99
|
+ </div>
|
|
100
|
+ <div>医生签字:{{ i.info.doctor ? i.info.doctor : "" }}</div>
|
|
101
|
+ </div>
|
54
|
102
|
</div>
|
|
103
|
+ <!-- <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
|
|
104
|
+ <!-- <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
|
55
|
105
|
</div>
|
56
|
106
|
</div>
|
57
|
|
-
|
|
107
|
+ </div>
|
58
|
108
|
</template>
|
59
|
109
|
<script>
|
60
|
|
-import { jsGetAge, uParseTime } from '@/utils/tools'
|
61
|
|
-import {getAllDoctorList} from "@/api/project/project"
|
62
|
|
-import {getInitData} from "@/api/his/his"
|
|
110
|
+import { jsGetAge, uParseTime } from "@/utils/tools";
|
|
111
|
+import { getAllDoctorList } from "@/api/project/project";
|
|
112
|
+import { getInitData } from "@/api/his/his";
|
63
|
113
|
export default {
|
64
|
|
- props:{
|
65
|
|
- printData:Array
|
|
114
|
+ props: {
|
|
115
|
+ printData: Array,
|
|
116
|
+ },
|
|
117
|
+ data() {
|
|
118
|
+ return {
|
|
119
|
+ doctorList: [],
|
|
120
|
+ advicePrint: {},
|
|
121
|
+ patient: {},
|
|
122
|
+ tableData: [],
|
|
123
|
+ prescriptionInfo: [],
|
|
124
|
+ hisPatient: {},
|
|
125
|
+ department: [],
|
|
126
|
+ prescriptions: [],
|
|
127
|
+ projectList: [],
|
|
128
|
+ orgname: "",
|
|
129
|
+ diagnoses: [],
|
|
130
|
+ pageArr: [],
|
|
131
|
+ faber: {},
|
|
132
|
+ total: 0,
|
|
133
|
+ projectPrint: [],
|
|
134
|
+ time: "",
|
|
135
|
+ doctor: "",
|
|
136
|
+ org_id: "",
|
|
137
|
+ singleProjectPrint: [],
|
|
138
|
+ };
|
|
139
|
+ },
|
|
140
|
+
|
|
141
|
+ methods: {
|
|
142
|
+ getAllDoctorList() {
|
|
143
|
+ getAllDoctorList().then((response) => {
|
|
144
|
+ if (response.data.state == 1) {
|
|
145
|
+ var doctor = response.data.data.doctor;
|
|
146
|
+
|
|
147
|
+ this.doctorList = doctor;
|
|
148
|
+ }
|
|
149
|
+ });
|
66
|
150
|
},
|
67
|
|
- data(){
|
68
|
|
- return {
|
69
|
|
- doctorList:[],
|
70
|
|
- advicePrint:{},
|
71
|
|
- patient:{},
|
72
|
|
- tableData:[],
|
73
|
|
- prescriptionInfo:[],
|
74
|
|
- hisPatient:{},
|
75
|
|
- department:[],
|
76
|
|
- prescriptions:[],
|
77
|
|
- projectList:[],
|
78
|
|
- orgname:"",
|
79
|
|
- diagnoses:[],
|
80
|
|
- pageArr:[],
|
81
|
|
- faber:{},
|
82
|
|
- total:0,
|
83
|
|
- projectPrint:[],
|
84
|
|
- time:'',
|
85
|
|
- doctor:'',
|
86
|
|
- org_id:'',
|
87
|
|
- singleProjectPrint:[]
|
|
151
|
+ getDoctor(id) {
|
|
152
|
+ var name = "";
|
|
153
|
+ for (let i = 0; i < this.doctorList.length; i++) {
|
|
154
|
+ if (id == this.doctorList[i].admin_user_id) {
|
|
155
|
+ name = this.doctorList[i].user_name;
|
|
156
|
+ }
|
88
|
157
|
}
|
|
158
|
+ return name;
|
|
159
|
+ },
|
|
160
|
+ getTime(value, temp) {
|
|
161
|
+ if (value != undefined) {
|
|
162
|
+ return uParseTime(value, temp);
|
|
163
|
+ }
|
|
164
|
+ return "";
|
89
|
165
|
},
|
90
|
|
- methods:{
|
91
|
|
- getAllDoctorList(){
|
92
|
|
- getAllDoctorList().then(response=>{
|
93
|
|
- if(response.data.state == 1){
|
94
|
|
- var doctor = response.data.data.doctor
|
95
|
|
-
|
96
|
|
- this.doctorList = doctor
|
97
|
|
- }
|
98
|
|
- })
|
99
|
|
- },
|
100
|
|
- getDoctor(id){
|
101
|
|
- var name = ""
|
102
|
|
- for(let i=0;i<this.doctorList.length;i++){
|
103
|
|
- if(id == this.doctorList[i].admin_user_id){
|
104
|
|
- name = this.doctorList[i].user_name
|
105
|
|
- }
|
106
|
|
- }
|
107
|
|
- return name
|
108
|
|
- },
|
109
|
|
- getTime(value, temp) {
|
110
|
|
- if (value != undefined) {
|
111
|
|
- return uParseTime(value, temp)
|
112
|
|
- }
|
113
|
|
- return ''
|
114
|
|
- },
|
115
|
|
- getTeam(prescriptions){
|
116
|
|
- let projectPrint = []
|
117
|
|
- let total = 0
|
118
|
|
- prescriptions.map(item => {
|
119
|
|
- if(item.project.length > 0){
|
120
|
|
- item.project.map(it => {
|
121
|
|
- if(it.type == 2){
|
122
|
|
- if(it.project.cost_classify == 3){
|
123
|
|
- projectPrint.push(it)
|
124
|
|
- total += (it.project.price*parseInt(it.count))
|
125
|
|
- }
|
126
|
|
- }
|
127
|
|
- })
|
128
|
166
|
|
129
|
|
- }
|
130
|
|
- })
|
131
|
|
- let data = []
|
132
|
|
- projectPrint.map(item => {
|
133
|
|
- if(item.team.id != 0){
|
134
|
|
- let status = data.some(it => (it.team.id == item.team.id))
|
135
|
|
- if(!status){
|
136
|
|
- data.push(item)
|
|
167
|
+ getTeam(prescriptions) {
|
|
168
|
+ // console.log(prescriptions, "prescriptions");
|
|
169
|
+ let projectPrint = [];
|
|
170
|
+ let total = 0;
|
|
171
|
+ prescriptions.map((item) => {
|
|
172
|
+ if (item.project.length > 0) {
|
|
173
|
+ item.project.map((it) => {
|
|
174
|
+ if (it.type == 2) {
|
|
175
|
+ if (it.project.cost_classify == 3) {
|
|
176
|
+ projectPrint.push(it);
|
|
177
|
+ total += it.project.price * parseInt(it.count);
|
|
178
|
+ }
|
137
|
179
|
}
|
|
180
|
+ });
|
|
181
|
+ }
|
|
182
|
+ });
|
|
183
|
+ let data = [];
|
|
184
|
+ projectPrint.map((item) => {
|
|
185
|
+ if (item.team.id != 0) {
|
|
186
|
+ let status = data.some((it) => it.team.id == item.team.id);
|
|
187
|
+ if (!status) {
|
|
188
|
+ data.push(item);
|
|
189
|
+ console.log(data, "oodata");
|
138
|
190
|
}
|
|
191
|
+ }
|
|
192
|
+ });
|
|
193
|
+ this.total = total.toFixed(2);
|
|
194
|
+ this.projectPrint = data;
|
|
195
|
+ return data;
|
|
196
|
+ },
|
139
|
197
|
|
140
|
|
- })
|
141
|
|
-
|
142
|
|
- this.total = total.toFixed(2)
|
143
|
|
- this.projectPrint = data
|
144
|
|
- return data
|
145
|
|
- },
|
146
|
198
|
getSingleTeam(prescriptions){
|
147
|
199
|
let projectPrint = []
|
148
|
200
|
let total = 0
|
|
@@ -156,7 +208,6 @@ export default {
|
156
|
208
|
}
|
157
|
209
|
}
|
158
|
210
|
})
|
159
|
|
-
|
160
|
211
|
}
|
161
|
212
|
})
|
162
|
213
|
let data = []
|
|
@@ -164,301 +215,312 @@ export default {
|
164
|
215
|
if(item.team.id == 0){
|
165
|
216
|
data.push(item)
|
166
|
217
|
}
|
167
|
|
-
|
168
|
218
|
})
|
169
|
|
-
|
170
|
219
|
this.total = total.toFixed(2)
|
171
|
220
|
return data
|
172
|
221
|
},
|
173
|
222
|
|
174
|
|
- getInitData(){
|
175
|
|
- getInitData().then(response=>{
|
176
|
|
- if(response.data.state == 1){
|
177
|
|
- this.department = response.data.data.department
|
178
|
|
- this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
|
179
|
|
- }
|
180
|
|
- })
|
181
|
|
- },
|
182
|
|
- getDepart(id){
|
183
|
|
- var name = ""
|
184
|
|
- for(let i=0;i<this.department.length;i++){
|
185
|
|
- if(id == this.department[i].id){
|
186
|
|
- name = this.department[i].name
|
187
|
|
- }
|
188
|
|
- }
|
189
|
|
- return name
|
190
|
|
- },
|
|
223
|
+ getInitData() {
|
|
224
|
+ getInitData().then((response) => {
|
|
225
|
+ if (response.data.state == 1) {
|
|
226
|
+ this.department = response.data.data.department;
|
|
227
|
+ this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
|
|
228
|
+ }
|
|
229
|
+ });
|
|
230
|
+ },
|
|
231
|
+ getDepart(id) {
|
|
232
|
+ var name = "";
|
|
233
|
+ for (let i = 0; i < this.department.length; i++) {
|
|
234
|
+ if (id == this.department[i].id) {
|
|
235
|
+ name = this.department[i].name;
|
|
236
|
+ }
|
|
237
|
+ }
|
|
238
|
+ return name;
|
|
239
|
+ },
|
191
|
240
|
getTotalOne(id) {
|
192
|
|
-
|
193
|
|
- var total = 0
|
194
|
|
- var addtotal = 0
|
195
|
|
- for (let i = 0; i < this.prescriptions.length; i++) {
|
196
|
|
- if(id == this.prescriptions[i].id){
|
197
|
|
- if (this.prescriptions[i].project != null) {
|
198
|
|
- for (let a = 0; a < this.prescriptions[i].project.length; a++) {
|
199
|
|
- total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
|
200
|
|
- }
|
|
241
|
+ var total = 0;
|
|
242
|
+ var addtotal = 0;
|
|
243
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
244
|
+ if (id == this.prescriptions[i].id) {
|
|
245
|
+ if (this.prescriptions[i].project != null) {
|
|
246
|
+ for (let a = 0; a < this.prescriptions[i].project.length; a++) {
|
|
247
|
+ total =
|
|
248
|
+ total +
|
|
249
|
+ this.prescriptions[i].project[a].price *
|
|
250
|
+ this.prescriptions[i].project[a].count;
|
201
|
251
|
}
|
|
252
|
+ }
|
202
|
253
|
|
203
|
|
- if (this.prescriptions[i].additionalcharge != null) {
|
204
|
|
- for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
|
205
|
|
- addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
|
206
|
|
- }
|
|
254
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
255
|
+ for (
|
|
256
|
+ let a = 0;
|
|
257
|
+ a < this.prescriptions[i].additionalcharge.length;
|
|
258
|
+ a++
|
|
259
|
+ ) {
|
|
260
|
+ addtotal =
|
|
261
|
+ addtotal +
|
|
262
|
+ this.prescriptions[i].additionalcharge[a].price *
|
|
263
|
+ this.prescriptions[i].additionalcharge[a].count;
|
207
|
264
|
}
|
208
|
|
- addtotal = Math.floor(addtotal * 100) / 100
|
|
265
|
+ }
|
|
266
|
+ addtotal = Math.floor(addtotal * 100) / 100;
|
209
|
267
|
}
|
210
|
|
-
|
211
|
|
- }
|
|
268
|
+ }
|
212
|
269
|
|
213
|
270
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
214
|
|
- if(id == this.prescriptions[i].id){
|
215
|
|
- if (this.prescriptions[i].advices != null) {
|
216
|
|
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
217
|
|
- total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
|
218
|
|
- }
|
|
271
|
+ if (id == this.prescriptions[i].id) {
|
|
272
|
+ if (this.prescriptions[i].advices != null) {
|
|
273
|
+ for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
|
274
|
+ total =
|
|
275
|
+ total +
|
|
276
|
+ this.prescriptions[i].advices[a].price *
|
|
277
|
+ this.prescriptions[i].advices[a].prescribing_number;
|
219
|
278
|
}
|
|
279
|
+ }
|
220
|
280
|
|
221
|
|
- if (this.prescriptions[i].additionalcharge != null) {
|
222
|
|
- for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
|
223
|
|
- addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
|
224
|
|
- }
|
|
281
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
282
|
+ for (
|
|
283
|
+ let a = 0;
|
|
284
|
+ a < this.prescriptions[i].additionalcharge.length;
|
|
285
|
+ a++
|
|
286
|
+ ) {
|
|
287
|
+ addtotal =
|
|
288
|
+ addtotal +
|
|
289
|
+ this.prescriptions[i].additionalcharge[a].price *
|
|
290
|
+ this.prescriptions[i].additionalcharge[a].count;
|
225
|
291
|
}
|
226
|
|
- addtotal = Math.floor(addtotal * 100) / 100
|
|
292
|
+ }
|
|
293
|
+ addtotal = Math.floor(addtotal * 100) / 100;
|
227
|
294
|
}
|
228
|
|
- }
|
|
295
|
+ }
|
229
|
296
|
|
230
|
|
- return total + addtotal
|
231
|
|
- },
|
|
297
|
+ return total + addtotal;
|
|
298
|
+ },
|
232
|
299
|
|
233
|
|
- getProjectName(id){
|
234
|
|
- var project_name = ""
|
235
|
|
- for(let i=0;i<this.projectList.length;i++){
|
236
|
|
- if(id == this.projectList[i].id){
|
237
|
|
- project_name = this.projectList[i].project_name
|
238
|
|
- }
|
|
300
|
+ getProjectName(id) {
|
|
301
|
+ var project_name = "";
|
|
302
|
+ for (let i = 0; i < this.projectList.length; i++) {
|
|
303
|
+ if (id == this.projectList[i].id) {
|
|
304
|
+ project_name = this.projectList[i].project_name;
|
239
|
305
|
}
|
240
|
|
- return project_name
|
241
|
|
- },
|
|
306
|
+ }
|
|
307
|
+ return project_name;
|
|
308
|
+ },
|
242
|
309
|
|
243
|
|
- getDiagnosis(ids){
|
244
|
|
- let newIds = ids.split(',').sort(function(a,b){
|
245
|
|
- return a-b;
|
246
|
|
- })
|
|
310
|
+ getDiagnosis(ids) {
|
|
311
|
+ let newIds = ids.split(",").sort(function (a, b) {
|
|
312
|
+ return a - b;
|
|
313
|
+ });
|
247
|
314
|
|
248
|
|
- let nameArr = []
|
249
|
|
- for(let i=0;i<this.diagnoses.length;i++){
|
250
|
|
- if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
|
251
|
|
- // name += diagnoses[i].class_name + ' '
|
252
|
|
- nameArr.push(this.diagnoses[i].class_name)
|
253
|
|
- }
|
|
315
|
+ let nameArr = [];
|
|
316
|
+ for (let i = 0; i < this.diagnoses.length; i++) {
|
|
317
|
+ if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
|
|
318
|
+ // name += diagnoses[i].class_name + ' '
|
|
319
|
+ nameArr.push(this.diagnoses[i].class_name);
|
254
|
320
|
}
|
255
|
|
- let newNameArr = []
|
256
|
|
- nameArr.map((item,index) => {
|
257
|
|
- if(item == '尿毒症'){
|
258
|
|
- newNameArr.push(item)
|
259
|
|
- nameArr.splice(index,1,'')
|
260
|
|
- }
|
261
|
|
- })
|
262
|
|
- newNameArr.push(...nameArr)
|
263
|
|
- return newNameArr.join(' ')
|
264
|
|
- },
|
265
|
|
- compare(property) {
|
266
|
|
- return function(a,b){
|
267
|
|
- var value1 = a[property];
|
268
|
|
- var value2 = b[property];
|
269
|
|
- return value1 - value2;//升序排序
|
|
321
|
+ }
|
|
322
|
+ let newNameArr = [];
|
|
323
|
+ nameArr.map((item, index) => {
|
|
324
|
+ if (item == "尿毒症") {
|
|
325
|
+ newNameArr.push(item);
|
|
326
|
+ nameArr.splice(index, 1, "");
|
270
|
327
|
}
|
271
|
|
- },
|
272
|
|
- getPage(){
|
273
|
|
- this.page = 1
|
274
|
|
- this.pageArr = []
|
275
|
|
-
|
276
|
|
- this.advicePrint.map(item => {
|
277
|
|
- let arr = []
|
278
|
|
- item.pageArr = []
|
279
|
|
- if(item.advices.length <= 5){
|
280
|
|
- this.page = 1
|
281
|
|
- arr.push(item.advices.length)
|
282
|
|
- item.pageArr.push(arr)
|
283
|
|
-
|
284
|
|
- }else if(item.advices.length > 5){
|
285
|
|
- this.page = parseInt(item.advices.length / 5)
|
286
|
|
- let num = item.advices.length % 5
|
287
|
|
- for (var i=0;i<this.page;i++){
|
288
|
|
- item.pageArr.push([5])
|
289
|
|
- }
|
290
|
|
- if(num != 0){
|
291
|
|
- item.pageArr.push([num])
|
292
|
|
- }
|
|
328
|
+ });
|
|
329
|
+ newNameArr.push(...nameArr);
|
|
330
|
+ return newNameArr.join(" ");
|
|
331
|
+ },
|
|
332
|
+ compare(property) {
|
|
333
|
+ return function (a, b) {
|
|
334
|
+ var value1 = a[property];
|
|
335
|
+ var value2 = b[property];
|
|
336
|
+ return value1 - value2; //升序排序
|
|
337
|
+ };
|
|
338
|
+ },
|
|
339
|
+ getPage() {
|
|
340
|
+ this.page = 1;
|
|
341
|
+ this.pageArr = [];
|
|
342
|
+
|
|
343
|
+ this.advicePrint.map((item) => {
|
|
344
|
+ let arr = [];
|
|
345
|
+ item.pageArr = [];
|
|
346
|
+ if (item.advices.length <= 5) {
|
|
347
|
+ this.page = 1;
|
|
348
|
+ arr.push(item.advices.length);
|
|
349
|
+ item.pageArr.push(arr);
|
|
350
|
+ } else if (item.advices.length > 5) {
|
|
351
|
+ this.page = parseInt(item.advices.length / 5);
|
|
352
|
+ let num = item.advices.length % 5;
|
|
353
|
+ for (var i = 0; i < this.page; i++) {
|
|
354
|
+ item.pageArr.push([5]);
|
293
|
355
|
}
|
294
|
|
- })
|
295
|
|
- // console.log('this.pageArr',this.pageArr)
|
296
|
|
- },
|
297
|
|
- getName(list) {
|
298
|
|
- console.log('list',list)
|
299
|
|
- let new_list = []
|
300
|
|
- for (let i = 0; i < list.length; i++) {
|
301
|
|
- if (list[i].aac031 == '1') {
|
302
|
|
- new_list.push(list[i])
|
|
356
|
+ if (num != 0) {
|
|
357
|
+ item.pageArr.push([num]);
|
303
|
358
|
}
|
304
|
359
|
}
|
305
|
|
-
|
306
|
|
- switch (new_list[0].bcc334) {
|
307
|
|
- case "A31001":
|
308
|
|
- return "深圳医保1档"
|
309
|
|
- break
|
310
|
|
- case "A31002":
|
311
|
|
- return "深圳医保2档"
|
312
|
|
-
|
313
|
|
- break
|
314
|
|
- case "A31003":
|
315
|
|
- return "深圳医保3档"
|
316
|
|
-
|
317
|
|
- break
|
318
|
|
- case "A31004":
|
319
|
|
- return "二档(少儿)"
|
320
|
|
-
|
321
|
|
- break
|
322
|
|
- case "A31005":
|
323
|
|
- return "学生二档"
|
324
|
|
-
|
325
|
|
- break
|
326
|
|
- case "A31006":
|
327
|
|
- return "大学生二档"
|
328
|
|
-
|
329
|
|
- break
|
330
|
|
- case "A32001":
|
331
|
|
- return "在职公务员"
|
332
|
|
- break
|
333
|
|
- case "A32002":
|
334
|
|
- return "在职驻深公务员"
|
335
|
|
-
|
336
|
|
- break
|
337
|
|
- case "A39301":
|
338
|
|
- return "家属统筹医疗"
|
339
|
|
-
|
340
|
|
- break
|
341
|
|
- case "A41001":
|
342
|
|
- return "工伤在职"
|
343
|
|
-
|
344
|
|
- break
|
345
|
|
- case "A51001":
|
346
|
|
- return "生育在职"
|
347
|
|
-
|
348
|
|
- break
|
349
|
|
- case "A52001":
|
350
|
|
- return "生育医疗一档"
|
351
|
|
-
|
352
|
|
- break
|
353
|
|
- case "A52002":
|
354
|
|
- return "生育医疗一档"
|
355
|
|
-
|
356
|
|
- break
|
357
|
|
- case "C31001":
|
358
|
|
- return "一档医疗退休"
|
359
|
|
-
|
360
|
|
- break
|
361
|
|
- case "C31002":
|
362
|
|
- return "二档医疗退休"
|
363
|
|
- break
|
364
|
|
-
|
|
360
|
+ });
|
|
361
|
+ // console.log('this.pageArr',this.pageArr)
|
|
362
|
+ },
|
|
363
|
+ getName(list) {
|
|
364
|
+ console.log("list", list);
|
|
365
|
+ let new_list = [];
|
|
366
|
+ for (let i = 0; i < list.length; i++) {
|
|
367
|
+ if (list[i].aac031 == "1") {
|
|
368
|
+ new_list.push(list[i]);
|
365
|
369
|
}
|
|
370
|
+ }
|
366
|
371
|
|
367
|
|
-
|
368
|
|
-
|
369
|
|
- },
|
370
|
|
-
|
371
|
|
- },
|
372
|
|
- created(){
|
373
|
|
- // this.getAllDoctorList()
|
374
|
|
- this.getInitData()
|
375
|
|
- // this.getPrescriptionPrint()
|
376
|
|
- // this.getHisPatientDetail()
|
377
|
|
- // this.getPatientCaseHistory()
|
378
|
|
- var xtuser = this.$store.getters.xt_user;
|
379
|
|
- this.orgname = xtuser.org.org_name;
|
380
|
|
- this.org_id = this.$store.getters.xt_user.org_id
|
381
|
|
-
|
382
|
|
- },
|
383
|
|
- watch:{
|
384
|
|
- ids:function(val){
|
385
|
|
- this.ids = val
|
386
|
|
- this.getPrescriptionPrint()
|
387
|
|
- }
|
388
|
|
- }
|
389
|
|
-}
|
|
372
|
+ switch (new_list[0].bcc334) {
|
|
373
|
+ case "A31001":
|
|
374
|
+ return "深圳医保1档";
|
|
375
|
+ break;
|
|
376
|
+ case "A31002":
|
|
377
|
+ return "深圳医保2档";
|
|
378
|
+
|
|
379
|
+ break;
|
|
380
|
+ case "A31003":
|
|
381
|
+ return "深圳医保3档";
|
|
382
|
+
|
|
383
|
+ break;
|
|
384
|
+ case "A31004":
|
|
385
|
+ return "二档(少儿)";
|
|
386
|
+
|
|
387
|
+ break;
|
|
388
|
+ case "A31005":
|
|
389
|
+ return "学生二档";
|
|
390
|
+
|
|
391
|
+ break;
|
|
392
|
+ case "A31006":
|
|
393
|
+ return "大学生二档";
|
|
394
|
+
|
|
395
|
+ break;
|
|
396
|
+ case "A32001":
|
|
397
|
+ return "在职公务员";
|
|
398
|
+ break;
|
|
399
|
+ case "A32002":
|
|
400
|
+ return "在职驻深公务员";
|
|
401
|
+
|
|
402
|
+ break;
|
|
403
|
+ case "A39301":
|
|
404
|
+ return "家属统筹医疗";
|
|
405
|
+
|
|
406
|
+ break;
|
|
407
|
+ case "A41001":
|
|
408
|
+ return "工伤在职";
|
|
409
|
+
|
|
410
|
+ break;
|
|
411
|
+ case "A51001":
|
|
412
|
+ return "生育在职";
|
|
413
|
+
|
|
414
|
+ break;
|
|
415
|
+ case "A52001":
|
|
416
|
+ return "生育医疗一档";
|
|
417
|
+
|
|
418
|
+ break;
|
|
419
|
+ case "A52002":
|
|
420
|
+ return "生育医疗一档";
|
|
421
|
+
|
|
422
|
+ break;
|
|
423
|
+ case "C31001":
|
|
424
|
+ return "一档医疗退休";
|
|
425
|
+
|
|
426
|
+ break;
|
|
427
|
+ case "C31002":
|
|
428
|
+ return "二档医疗退休";
|
|
429
|
+ break;
|
|
430
|
+ }
|
|
431
|
+ },
|
|
432
|
+ },
|
|
433
|
+ created() {
|
|
434
|
+ // this.getAllDoctorList()
|
|
435
|
+ this.getInitData();
|
|
436
|
+ // this.getPrescriptionPrint()
|
|
437
|
+ // this.getHisPatientDetail()
|
|
438
|
+ // this.getPatientCaseHistory()
|
|
439
|
+ var xtuser = this.$store.getters.xt_user;
|
|
440
|
+ this.orgname = xtuser.org.org_name;
|
|
441
|
+ this.org_id = this.$store.getters.xt_user.org_id;
|
|
442
|
+ },
|
|
443
|
+ watch: {
|
|
444
|
+ ids: function (val) {
|
|
445
|
+ this.ids = val;
|
|
446
|
+ this.getPrescriptionPrint();
|
|
447
|
+ },
|
|
448
|
+ },
|
|
449
|
+};
|
390
|
450
|
</script>
|
391
|
451
|
|
392
|
452
|
|
393
|
453
|
<style lang="scss" scoped>
|
394
|
|
-.prescription-print{
|
395
|
|
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
396
|
|
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
397
|
|
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
398
|
|
- margin-bottom: 20px;
|
399
|
|
- padding:20px 10px;
|
|
454
|
+.prescription-print {
|
|
455
|
+ // -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
|
|
456
|
+ // 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
457
|
+ // -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
|
|
458
|
+ // 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
459
|
+ // box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
460
|
+ margin-bottom: 20px;
|
|
461
|
+ padding: 20px 10px;
|
400
|
462
|
}
|
401
|
|
-.printTitle{
|
402
|
|
- font-size: 22px;
|
403
|
|
- text-align: center;
|
404
|
|
- font-weight: bold;
|
405
|
|
- margin-bottom: 10px;
|
|
463
|
+.printTitle {
|
|
464
|
+ font-size: 22px;
|
|
465
|
+ text-align: center;
|
|
466
|
+ font-weight: bold;
|
|
467
|
+ margin-bottom: 10px;
|
406
|
468
|
}
|
407
|
|
-.infoTitle{
|
408
|
|
- display: flex;
|
409
|
|
- margin-top:10px;
|
410
|
|
- line-height: 24px;
|
|
469
|
+.infoTitle {
|
|
470
|
+ display: flex;
|
|
471
|
+ margin-top: 10px;
|
|
472
|
+ line-height: 24px;
|
411
|
473
|
}
|
412
|
|
-.infoTitle div{
|
413
|
|
- width: 200px;
|
|
474
|
+.infoTitle div {
|
|
475
|
+ width: 200px;
|
414
|
476
|
}
|
415
|
|
-.infoMain{
|
416
|
|
- display: flex;
|
417
|
|
- flex-wrap: wrap;
|
418
|
|
- margin-top:10px;
|
|
477
|
+.infoMain {
|
|
478
|
+ display: flex;
|
|
479
|
+ flex-wrap: wrap;
|
|
480
|
+ margin-top: 10px;
|
419
|
481
|
}
|
420
|
|
-.infoMain div{
|
421
|
|
- width: 50%;
|
422
|
|
- line-height: 24px;
|
|
482
|
+.infoMain div {
|
|
483
|
+ width: 50%;
|
|
484
|
+ line-height: 24px;
|
423
|
485
|
}
|
424
|
|
-.prescriptionBox{
|
425
|
|
- padding:0 10px;
|
426
|
|
- min-height:400px;
|
|
486
|
+.prescriptionBox {
|
|
487
|
+ padding: 0 10px;
|
|
488
|
+ min-height: 400px;
|
427
|
489
|
}
|
428
|
|
-.Rp{
|
429
|
|
- font-size: 22px;
|
430
|
|
- font-weight: bold;
|
|
490
|
+.Rp {
|
|
491
|
+ font-size: 22px;
|
|
492
|
+ font-weight: bold;
|
431
|
493
|
}
|
432
|
|
-.drugsBox{
|
433
|
|
- padding-left: 40px;
|
434
|
|
- margin-bottom: 10px;
|
|
494
|
+.drugsBox {
|
|
495
|
+ padding-left: 40px;
|
|
496
|
+ margin-bottom: 10px;
|
435
|
497
|
}
|
436
|
|
-.drugsBox div{
|
437
|
|
- line-height: 20px;
|
|
498
|
+.drugsBox div {
|
|
499
|
+ line-height: 20px;
|
438
|
500
|
}
|
439
|
|
-.drugsOne{
|
440
|
|
- line-height: 24px;
|
|
501
|
+.drugsOne {
|
|
502
|
+ line-height: 24px;
|
441
|
503
|
}
|
442
|
|
-.drugsOne span{
|
443
|
|
- margin-right: 20px;
|
|
504
|
+.drugsOne span {
|
|
505
|
+ margin-right: 20px;
|
444
|
506
|
}
|
445
|
|
-.doctorBox{
|
446
|
|
- display: flex;
|
447
|
|
- justify-content: space-between;
|
448
|
|
- padding:0 10px;
|
449
|
|
- line-height: 24px;
|
450
|
|
- border-bottom: 2px solid #000;
|
|
507
|
+.doctorBox {
|
|
508
|
+ display: flex;
|
|
509
|
+ justify-content: space-between;
|
|
510
|
+ padding: 0 10px;
|
|
511
|
+ line-height: 24px;
|
|
512
|
+ border-bottom: 2px solid #000;
|
451
|
513
|
}
|
452
|
|
-.actionBar{
|
453
|
|
- display: flex;
|
454
|
|
- justify-content: space-between;
|
455
|
|
- line-height: 24px;
|
456
|
|
- padding:0 10px;
|
|
514
|
+.actionBar {
|
|
515
|
+ display: flex;
|
|
516
|
+ justify-content: space-between;
|
|
517
|
+ line-height: 24px;
|
|
518
|
+ padding: 0 10px;
|
457
|
519
|
}
|
458
|
|
-.actionBar p{
|
459
|
|
- width:150px;
|
|
520
|
+.actionBar p {
|
|
521
|
+ width: 150px;
|
460
|
522
|
}
|
461
|
|
-.under_line{
|
|
523
|
+.under_line {
|
462
|
524
|
display: inline-block;
|
463
|
525
|
border-bottom: 1px solid #000;
|
464
|
526
|
flex: 1;
|