|
@@ -0,0 +1,321 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
|
5
|
+ <template>
|
|
6
|
+ <el-button
|
|
7
|
+ :loading="loading"
|
|
8
|
+ size="small"
|
|
9
|
+ icon="el-icon-printer"
|
|
10
|
+ @click="printThisPage"
|
|
11
|
+ type="primary"
|
|
12
|
+ >打印</el-button
|
|
13
|
+ >
|
|
14
|
+ </template>
|
|
15
|
+ </div>
|
|
16
|
+ <div class="app-container" style="min-height:0;">
|
|
17
|
+ <el-container class="newContainer">
|
|
18
|
+ <div style="width:270px;margin-right:20px;">
|
|
19
|
+ <div class="cell clearfix" style="margin-bottom:10px;">
|
|
20
|
+ <el-input size="small" v-model.trim="search_input" class="filter-item"/>
|
|
21
|
+ <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
|
|
22
|
+ </div>
|
|
23
|
+ <el-table ref="tab" @current-change="changePatient" highlight-current-row :data="patientTableData"
|
|
24
|
+ height="480" border style="width: 100%">
|
|
25
|
+ <el-table-column prop="date" label="患者">
|
|
26
|
+ <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
|
|
27
|
+ </el-table-column>
|
|
28
|
+ <el-table-column prop="name" label="就诊号">
|
|
29
|
+ <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
|
|
30
|
+ </el-table-column>
|
|
31
|
+ </el-table>
|
|
32
|
+ </div>
|
|
33
|
+
|
|
34
|
+ <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
|
|
35
|
+ <printTwo v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient"></printTwo>
|
|
36
|
+ </div>
|
|
37
|
+ </el-container>
|
|
38
|
+ </div>
|
|
39
|
+ </div>
|
|
40
|
+</template>
|
|
41
|
+
|
|
42
|
+<script>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+import { parseTime } from "@/utils";
|
|
46
|
+import { getDialysisRecord } from "@/api/dialysis";
|
|
47
|
+import { getDataConfig } from "@/utils/data";
|
|
48
|
+import { jsGetAge, uParseTime } from "@/utils/tools";
|
|
49
|
+
|
|
50
|
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
51
|
+import print from "print-js";
|
|
52
|
+import printTwo from "./template/printTwo"
|
|
53
|
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
|
|
54
|
+export default {
|
|
55
|
+ name: "dialysisPrintOrder",
|
|
56
|
+ components: {
|
|
57
|
+ BreadCrumb,
|
|
58
|
+ printTwo
|
|
59
|
+ },
|
|
60
|
+ data() {
|
|
61
|
+ return {
|
|
62
|
+ record_date:"",
|
|
63
|
+ patientTableData:[],
|
|
64
|
+ advicePrint:[],
|
|
65
|
+ hisPatient:{},
|
|
66
|
+ patient:{}
|
|
67
|
+ };
|
|
68
|
+ },
|
|
69
|
+ methods:{
|
|
70
|
+ getAllDoctorList(){
|
|
71
|
+ getAllDoctorList().then(response=>{
|
|
72
|
+ if(response.data.state == 1){
|
|
73
|
+ var doctor = response.data.data.doctor
|
|
74
|
+
|
|
75
|
+ this.doctorList = doctor
|
|
76
|
+ }
|
|
77
|
+ })
|
|
78
|
+ },
|
|
79
|
+ getAllHisPatientList(){
|
|
80
|
+ const params = {
|
|
81
|
+ record_date:this.record_date
|
|
82
|
+ }
|
|
83
|
+ getAllHisPatientList(params).then(response=>{
|
|
84
|
+ if(response.data.state == 1){
|
|
85
|
+ this.patientTableData = response.data.data.list
|
|
86
|
+ this.patientTableDataTwo = response.data.data.list
|
|
87
|
+
|
|
88
|
+ console.log('222', this.patientTableData)
|
|
89
|
+ let cal_one = 0
|
|
90
|
+ let cal_two = 0
|
|
91
|
+ for (let i = 0; i < response.data.data.list.length; i++) {
|
|
92
|
+ if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
|
|
93
|
+ cal_one = cal_one + 1
|
|
94
|
+ }
|
|
95
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
96
|
+ cal_two = cal_two + 1
|
|
97
|
+ }
|
|
98
|
+ }
|
|
99
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
100
|
+ console.log(this.patientTableData[0])
|
|
101
|
+ this.choosePatient(this.patientTableData[0])
|
|
102
|
+ this.cal_one = cal_one
|
|
103
|
+ this.cal_two = cal_two
|
|
104
|
+ }
|
|
105
|
+ })
|
|
106
|
+ },
|
|
107
|
+
|
|
108
|
+ changePatient(row){
|
|
109
|
+ console.log("row",row)
|
|
110
|
+ var params = {
|
|
111
|
+ patient_id:row.patient_id,
|
|
112
|
+ record_date:this.record_date,
|
|
113
|
+ }
|
|
114
|
+ getPrescriptionPrint(params).then(response=>{
|
|
115
|
+ if(response.data.state == 1){
|
|
116
|
+ var advicePrint = response.data.data.advicePrint
|
|
117
|
+ console.log("adviceprint",advicePrint)
|
|
118
|
+ this.advicePrint = advicePrint
|
|
119
|
+ // var hisPatient = response.data.data.hisPatient
|
|
120
|
+ // console.log("hispatient",hisPatient)
|
|
121
|
+ // this.hisPatient = hisPatient
|
|
122
|
+ var patient = response.data.data.patient
|
|
123
|
+ console.log("patient",patient)
|
|
124
|
+ this.patient = patient
|
|
125
|
+ var doctorPorject = response.data.data.doctorPorject
|
|
126
|
+ console.log("doctorporject",doctorPorject)
|
|
127
|
+ }
|
|
128
|
+ })
|
|
129
|
+ }
|
|
130
|
+
|
|
131
|
+ },
|
|
132
|
+
|
|
133
|
+ created() {
|
|
134
|
+ this.getAllDoctorList()
|
|
135
|
+ var record_date = this.$route.query.record
|
|
136
|
+ this.record_date = record_date
|
|
137
|
+ console.log("record_date",record_date)
|
|
138
|
+ this.getAllHisPatientList(record_date)
|
|
139
|
+ },
|
|
140
|
+
|
|
141
|
+};
|
|
142
|
+</script>
|
|
143
|
+
|
|
144
|
+<style>
|
|
145
|
+.dialysis-print-order {
|
|
146
|
+ width: 960px;
|
|
147
|
+ margin: 0 auto;
|
|
148
|
+}
|
|
149
|
+
|
|
150
|
+.dialysis-print-order .order-yy-name {
|
|
151
|
+ margin: auto;
|
|
152
|
+ text-align: center;
|
|
153
|
+ font-size: 20px;
|
|
154
|
+ letter-spacing: 5px;
|
|
155
|
+}
|
|
156
|
+
|
|
157
|
+.dialysis-print-order .order-title {
|
|
158
|
+ margin: auto;
|
|
159
|
+ font-weight: 600;
|
|
160
|
+ text-align: center;
|
|
161
|
+ font-size: 22px;
|
|
162
|
+ padding: 10px;
|
|
163
|
+}
|
|
164
|
+
|
|
165
|
+.dialysis-print-order .table-box {
|
|
166
|
+ width: 100%;
|
|
167
|
+ line-height: 23px;
|
|
168
|
+ font-size: 14px;
|
|
169
|
+}
|
|
170
|
+
|
|
171
|
+.dialysis-print-order .print-table {
|
|
172
|
+ width: 100%;
|
|
173
|
+ text-align: center;
|
|
174
|
+ border-collapse: collapse;
|
|
175
|
+ line-height: 40px;
|
|
176
|
+ font-size: 14px;
|
|
177
|
+ border-color: #000;
|
|
178
|
+}
|
|
179
|
+
|
|
180
|
+.dialysis-print-order .print-table-no {
|
|
181
|
+ width: 100%;
|
|
182
|
+ text-align: center;
|
|
183
|
+ border-collapse: collapse;
|
|
184
|
+ font-size: 14px;
|
|
185
|
+}
|
|
186
|
+
|
|
187
|
+.dialysis-print-order .under-line {
|
|
188
|
+ border-bottom: 1px solid #999;
|
|
189
|
+ width: 95%;
|
|
190
|
+ text-align: center;
|
|
191
|
+ margin-left: 2px;
|
|
192
|
+}
|
|
193
|
+
|
|
194
|
+.dialysis-print-order .title-box {
|
|
195
|
+ text-align: center;
|
|
196
|
+ font-size: 16px;
|
|
197
|
+}
|
|
198
|
+
|
|
199
|
+.dialysis-print-order .radio-lebel-box {
|
|
200
|
+ font-weight: 400;
|
|
201
|
+ cursor: pointer;
|
|
202
|
+}
|
|
203
|
+
|
|
204
|
+.dialysis-print-order .radio-no {
|
|
205
|
+ opacity: 0;
|
|
206
|
+ outline: none;
|
|
207
|
+ position: absolute;
|
|
208
|
+ margin: 0;
|
|
209
|
+ width: 0;
|
|
210
|
+ height: 0;
|
|
211
|
+ z-index: -1;
|
|
212
|
+}
|
|
213
|
+
|
|
214
|
+.dialysis-print-order .radio-inner {
|
|
215
|
+ white-space: nowrap;
|
|
216
|
+ cursor: pointer;
|
|
217
|
+ outline: none;
|
|
218
|
+ display: inline-block;
|
|
219
|
+ line-height: 1;
|
|
220
|
+ position: relative;
|
|
221
|
+ vertical-align: middle;
|
|
222
|
+}
|
|
223
|
+
|
|
224
|
+.dialysis-print-order .radio-fang {
|
|
225
|
+ display: inline-block;
|
|
226
|
+ position: relative;
|
|
227
|
+ border: 1px solid #000;
|
|
228
|
+ box-sizing: border-box;
|
|
229
|
+ width: 14px;
|
|
230
|
+ height: 14px;
|
|
231
|
+ background-color: #fff;
|
|
232
|
+ z-index: 1;
|
|
233
|
+ transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
234
|
+ background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
|
235
|
+}
|
|
236
|
+
|
|
237
|
+.dialysis-print-order .is-checked-radio::after {
|
|
238
|
+ content: "√";
|
|
239
|
+ font-size: 15px;
|
|
240
|
+}
|
|
241
|
+
|
|
242
|
+.dialysis-print-order .print-table-no tr td {
|
|
243
|
+ padding: 8px 5px;
|
|
244
|
+ line-height: 25px;
|
|
245
|
+}
|
|
246
|
+
|
|
247
|
+.dialysis-print-order .print-table tr td {
|
|
248
|
+ padding: 1px 1px;
|
|
249
|
+ /*line-height: 25px;*/
|
|
250
|
+}
|
|
251
|
+
|
|
252
|
+.es-img {
|
|
253
|
+ height: 30px;
|
|
254
|
+}
|
|
255
|
+
|
|
256
|
+.advice-name {
|
|
257
|
+ text-align: left;
|
|
258
|
+}
|
|
259
|
+
|
|
260
|
+.advice-children {
|
|
261
|
+ display: flex;
|
|
262
|
+}
|
|
263
|
+
|
|
264
|
+.title-box-pro {
|
|
265
|
+ border: 0 #fff;
|
|
266
|
+ line-height: 25px;
|
|
267
|
+ height: 25px;
|
|
268
|
+ text-align: left;
|
|
269
|
+ padding-left: 10px !important;
|
|
270
|
+}
|
|
271
|
+.title-box-pro-tr {
|
|
272
|
+ border: 0 #fff;
|
|
273
|
+}
|
|
274
|
+.text-align-left {
|
|
275
|
+ text-align: left !important;
|
|
276
|
+ padding-left: 10px !important;
|
|
277
|
+ font-size: 14px !important;
|
|
278
|
+ line-height: 25px;
|
|
279
|
+}
|
|
280
|
+.print-table-tr-new td {
|
|
281
|
+ line-height: 20px !important;
|
|
282
|
+}
|
|
283
|
+.border-top-solid {
|
|
284
|
+ border: solid 1px #000;
|
|
285
|
+}
|
|
286
|
+.print-template-two tr {
|
|
287
|
+ line-height: 30px;
|
|
288
|
+}
|
|
289
|
+
|
|
290
|
+.table-box1 {
|
|
291
|
+ border: 1px solid #000;
|
|
292
|
+ width: 100%;
|
|
293
|
+ line-height: 30px;
|
|
294
|
+ font-size: 14px;
|
|
295
|
+ border-collapse: collapse;
|
|
296
|
+}
|
|
297
|
+.table-box1 tr {
|
|
298
|
+ border-bottom: 1px solid #000;
|
|
299
|
+}
|
|
300
|
+</style>
|
|
301
|
+
|
|
302
|
+<style lang="scss">
|
|
303
|
+
|
|
304
|
+.newContainer{
|
|
305
|
+ .dialysisPage::-webkit-scrollbar {
|
|
306
|
+ height: 15px;
|
|
307
|
+ }
|
|
308
|
+
|
|
309
|
+ .el-date-editor{
|
|
310
|
+ .el-input__inner{
|
|
311
|
+ padding-right:0px;
|
|
312
|
+ }
|
|
313
|
+ }
|
|
314
|
+ .el-table td, .el-table th{
|
|
315
|
+ text-align: center;
|
|
316
|
+ }
|
|
317
|
+}
|
|
318
|
+.newContainer::-webkit-scrollbar{
|
|
319
|
+ height: 15px !important;
|
|
320
|
+}
|
|
321
|
+</style>
|