|
@@ -6,94 +6,99 @@
|
6
|
6
|
<div class="app-container">
|
7
|
7
|
<div class="cell clearfix">
|
8
|
8
|
<el-input
|
9
|
|
- size="small"
|
10
|
|
- style="width: 150px"
|
11
|
|
- v-model="keywords"
|
12
|
|
- class="filter-item"
|
|
9
|
+ size="small"
|
|
10
|
+ style="width: 150px"
|
|
11
|
+ v-model="keywords"
|
|
12
|
+ class="filter-item"
|
13
|
13
|
/>
|
14
|
14
|
<el-button
|
15
|
|
- size="small"
|
16
|
|
- style="margin: 0 10px"
|
17
|
|
- class="filter-item"
|
18
|
|
- type="primary"
|
19
|
|
- @click="searchAction"
|
20
|
|
- >搜索
|
|
15
|
+ size="small"
|
|
16
|
+ style="margin: 0 10px"
|
|
17
|
+ class="filter-item"
|
|
18
|
+ type="primary"
|
|
19
|
+ @click="searchAction"
|
|
20
|
+ >搜索
|
21
|
21
|
</el-button>
|
22
|
22
|
<el-date-picker
|
23
|
|
- v-model="record_date"
|
24
|
|
- prefix-icon="el-icon-date"
|
25
|
|
- @change="handleScheduleDateChange"
|
26
|
|
- :editable="false"
|
27
|
|
- :clearable="false"
|
28
|
|
- style="width: 196px; margin-right: 10px"
|
29
|
|
- type="date"
|
30
|
|
- format="yyyy-MM-dd"
|
31
|
|
- value-format="yyyy-MM-dd"
|
32
|
|
- placeholder="选择日期时间"
|
33
|
|
- align="right"
|
|
23
|
+ v-model="record_date"
|
|
24
|
+ prefix-icon="el-icon-date"
|
|
25
|
+ @change="handleScheduleDateChange"
|
|
26
|
+ :editable="false"
|
|
27
|
+ :clearable="false"
|
|
28
|
+ style="width: 196px; margin-right: 10px"
|
|
29
|
+ type="date"
|
|
30
|
+ format="yyyy-MM-dd"
|
|
31
|
+ value-format="yyyy-MM-dd"
|
|
32
|
+ placeholder="选择日期时间"
|
|
33
|
+ align="right"
|
34
|
34
|
></el-date-picker>
|
35
|
35
|
<el-button
|
36
|
|
- size="small"
|
37
|
|
- style="margin: 0 10px"
|
38
|
|
- class="filter-item"
|
39
|
|
- type="primary"
|
40
|
|
- @click="batchPrint(1)"
|
41
|
|
- >处方筏批量打印</el-button
|
|
36
|
+ size="small"
|
|
37
|
+ style="margin: 0 10px"
|
|
38
|
+ class="filter-item"
|
|
39
|
+ type="primary"
|
|
40
|
+ @click="batchPrint(1)"
|
|
41
|
+ >处方筏批量打印
|
|
42
|
+ </el-button
|
42
|
43
|
>
|
43
|
44
|
<el-button
|
44
|
|
- size="small"
|
45
|
|
- style="margin: 0 10px"
|
46
|
|
- class="filter-item"
|
47
|
|
- type="primary"
|
48
|
|
- @click="batchPrint(2)"
|
49
|
|
- >治疗单批量打印</el-button
|
|
45
|
+ size="small"
|
|
46
|
+ style="margin: 0 10px"
|
|
47
|
+ class="filter-item"
|
|
48
|
+ type="primary"
|
|
49
|
+ @click="batchPrint(2)"
|
|
50
|
+ >治疗单批量打印
|
|
51
|
+ </el-button
|
50
|
52
|
>
|
51
|
53
|
<el-button
|
52
|
|
- size="small"
|
53
|
|
- style="margin: 0 10px"
|
54
|
|
- class="filter-item"
|
55
|
|
- type="primary"
|
56
|
|
- @click="batchPrint(3)"
|
57
|
|
- >检验单批量打印</el-button
|
|
54
|
+ size="small"
|
|
55
|
+ style="margin: 0 10px"
|
|
56
|
+ class="filter-item"
|
|
57
|
+ type="primary"
|
|
58
|
+ @click="batchPrint(3)"
|
|
59
|
+ >检验单批量打印
|
|
60
|
+ </el-button
|
58
|
61
|
>
|
59
|
62
|
</div>
|
60
|
63
|
<el-table
|
61
|
|
- :data="tableData"
|
62
|
|
- border
|
63
|
|
- ref="table"
|
64
|
|
- style="width: 100%"
|
65
|
|
- :row-style="{ color: '#303133' }"
|
66
|
|
- @selection-change="handleSelectionChange"
|
67
|
|
- :header-cell-style="{
|
|
64
|
+ :data="tableData"
|
|
65
|
+ border
|
|
66
|
+ ref="table"
|
|
67
|
+ style="width: 100%"
|
|
68
|
+ :row-style="{ color: '#303133' }"
|
|
69
|
+ @selection-change="handleSelectionChange"
|
|
70
|
+ :header-cell-style="{
|
68
|
71
|
backgroundColor: 'rgb(245, 247, 250)',
|
69
|
72
|
color: '#606266',
|
70
|
73
|
}"
|
71
|
|
- highlight-current-row
|
|
74
|
+ highlight-current-row
|
72
|
75
|
>
|
73
|
76
|
<el-table-column
|
74
|
|
- align="center"
|
75
|
|
- type="selection"
|
76
|
|
- width="55"
|
|
77
|
+ align="center"
|
|
78
|
+ type="selection"
|
|
79
|
+ width="55"
|
77
|
80
|
></el-table-column>
|
78
|
81
|
<el-table-column
|
79
|
|
- align="center"
|
80
|
|
- label="序号"
|
81
|
|
- width="60"
|
82
|
|
- type="index"
|
|
82
|
+ align="center"
|
|
83
|
+ label="序号"
|
|
84
|
+ width="60"
|
|
85
|
+ type="index"
|
83
|
86
|
></el-table-column>
|
84
|
87
|
<el-table-column align="center" prop="name" label="姓名" width="100">
|
85
|
88
|
<template slot-scope="scope">{{
|
86
|
|
- scope.row.patients ? scope.row.patients.name : ""
|
87
|
|
- }}</template>
|
|
89
|
+ scope.row.patients ? scope.row.patients.name : ''
|
|
90
|
+ }}
|
|
91
|
+ </template>
|
88
|
92
|
</el-table-column>
|
89
|
93
|
<el-table-column
|
90
|
|
- align="center"
|
91
|
|
- prop="name"
|
92
|
|
- label="处方日期"
|
93
|
|
- width="200"
|
|
94
|
+ align="center"
|
|
95
|
+ prop="name"
|
|
96
|
+ label="处方日期"
|
|
97
|
+ width="200"
|
94
|
98
|
>
|
95
|
99
|
<template slot-scope="scope">
|
96
|
|
- {{ getTimes(scope.row.ctime) }}</template
|
|
100
|
+ {{ getTimes(scope.row.ctime) }}
|
|
101
|
+ </template
|
97
|
102
|
>
|
98
|
103
|
</el-table-column>
|
99
|
104
|
<!--<el-table-column align="center" prop="name" label="患者类型">-->
|
|
@@ -101,16 +106,18 @@
|
101
|
106
|
<!--</el-table-column>-->
|
102
|
107
|
<el-table-column align="center" prop="name" label="处方号">
|
103
|
108
|
<template slot-scope="scope">{{
|
104
|
|
- scope.row.prescription_number
|
105
|
|
- }}</template>
|
|
109
|
+ scope.row.prescription_number
|
|
110
|
+ }}
|
|
111
|
+ </template>
|
106
|
112
|
</el-table-column>
|
107
|
113
|
<el-table-column align="center" prop="name" label="开立医生">
|
108
|
114
|
<template slot-scope="scope">{{ scope.row.doctor }}</template>
|
109
|
115
|
</el-table-column>
|
110
|
116
|
<el-table-column align="center" prop="name" label="诊断">
|
111
|
117
|
<template slot-scope="scope">{{
|
112
|
|
- getDiagnosis(scope.row.diagnosis)
|
113
|
|
- }}</template>
|
|
118
|
+ getDiagnosis(scope.row.diagnosis)
|
|
119
|
+ }}
|
|
120
|
+ </template>
|
114
|
121
|
</el-table-column>
|
115
|
122
|
<el-table-column align="center" prop="name" label="状态" width="100">
|
116
|
123
|
<template slot-scope="scope">
|
|
@@ -121,58 +128,59 @@
|
121
|
128
|
<el-table-column align="center" prop="name" label="操作" width="100">
|
122
|
129
|
<template slot-scope="scope">
|
123
|
130
|
<el-button
|
124
|
|
- size="mini"
|
125
|
|
- type="primary"
|
126
|
|
- @click="handerShowDetail(scope.row)"
|
127
|
|
- >详情</el-button
|
|
131
|
+ size="mini"
|
|
132
|
+ type="primary"
|
|
133
|
+ @click="handerShowDetail(scope.row)"
|
|
134
|
+ >详情
|
|
135
|
+ </el-button
|
128
|
136
|
>
|
129
|
137
|
</template>
|
130
|
138
|
</el-table-column>
|
131
|
139
|
</el-table>
|
132
|
140
|
<el-pagination
|
133
|
|
- @size-change="handleSizeChange"
|
134
|
|
- @current-change="handleCurrentChange"
|
135
|
|
- :page-sizes="[10, 50, 100]"
|
136
|
|
- :page-size="10"
|
137
|
|
- background
|
138
|
|
- style="margin-top: 20px; float: right"
|
139
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
140
|
|
- :total="total"
|
|
141
|
+ @size-change="handleSizeChange"
|
|
142
|
+ @current-change="handleCurrentChange"
|
|
143
|
+ :page-sizes="[10, 50, 100]"
|
|
144
|
+ :page-size="10"
|
|
145
|
+ background
|
|
146
|
+ style="margin-top: 20px; float: right"
|
|
147
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
148
|
+ :total="total"
|
141
|
149
|
>
|
142
|
150
|
</el-pagination>
|
143
|
151
|
<inquiries-detail ref="inquiriesDetail"></inquiries-detail>
|
144
|
152
|
<el-dialog
|
145
|
|
- class="centerDialog"
|
146
|
|
- width="600px"
|
147
|
|
- title="打印"
|
148
|
|
- :visible.sync="innerVisible"
|
149
|
|
- append-to-body
|
|
153
|
+ class="centerDialog"
|
|
154
|
+ width="600px"
|
|
155
|
+ title="打印"
|
|
156
|
+ :visible.sync="innerVisible"
|
|
157
|
+ append-to-body
|
150
|
158
|
>
|
151
|
159
|
<template>
|
152
|
160
|
<el-button
|
153
|
|
- style="float: right"
|
154
|
|
- size="small"
|
155
|
|
- icon="el-icon-printer"
|
156
|
|
- @click="printThisPage(printData)"
|
157
|
|
- type="primary"
|
158
|
|
- >打印
|
|
161
|
+ style="float: right"
|
|
162
|
+ size="small"
|
|
163
|
+ icon="el-icon-printer"
|
|
164
|
+ @click="printThisPage(printData)"
|
|
165
|
+ type="primary"
|
|
166
|
+ >打印
|
159
|
167
|
</el-button>
|
160
|
168
|
</template>
|
161
|
169
|
<div id="printMain">
|
162
|
170
|
<print
|
163
|
|
- ref="print"
|
164
|
|
- v-if="printType == 1"
|
165
|
|
- :printData="printData"
|
|
171
|
+ ref="print"
|
|
172
|
+ v-if="printType == 1"
|
|
173
|
+ :printData="printData"
|
166
|
174
|
></print>
|
167
|
175
|
<treatPrint
|
168
|
|
- ref="treatPrint"
|
169
|
|
- v-if="printType == 2"
|
170
|
|
- :printData="printData"
|
|
176
|
+ ref="treatPrint"
|
|
177
|
+ v-if="printType == 2"
|
|
178
|
+ :printData="printData"
|
171
|
179
|
></treatPrint>
|
172
|
180
|
<checkPrint
|
173
|
|
- ref="checkPrint"
|
174
|
|
- v-if="printType == 3"
|
175
|
|
- :printData="printData"
|
|
181
|
+ ref="checkPrint"
|
|
182
|
+ v-if="printType == 3"
|
|
183
|
+ :printData="printData"
|
176
|
184
|
></checkPrint>
|
177
|
185
|
</div>
|
178
|
186
|
</el-dialog>
|
|
@@ -181,32 +189,32 @@
|
181
|
189
|
</template>
|
182
|
190
|
|
183
|
191
|
<script>
|
184
|
|
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
185
|
|
-import inquiriesDetail from "./components/inquiriesDetail";
|
186
|
|
-import { getHisPrescriptionList } from "@/api/his/his";
|
187
|
|
-import { uParseTime } from "@/utils/tools";
|
188
|
|
-import { getInitData, getBatchPrint } from "@/api/his/his";
|
189
|
|
-import print from "./batch_print_template/index";
|
190
|
|
-import treatPrint from "./batch_print_treatTemplate/index";
|
191
|
|
-import checkPrint from "./batch_print_checkTemplate/index";
|
|
192
|
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
193
|
+import inquiriesDetail from './components/inquiriesDetail'
|
|
194
|
+import { getBatchPrint, getHisPrescriptionList, getInitData } from '@/api/his/his'
|
|
195
|
+import { uParseTime } from '@/utils/tools'
|
|
196
|
+import print from './batch_print_template/index'
|
|
197
|
+import treatPrint from './batch_print_treatTemplate/index'
|
|
198
|
+import checkPrint from './batch_print_checkTemplate/index'
|
|
199
|
+
|
192
|
200
|
export default {
|
193
|
201
|
components: {
|
194
|
202
|
BreadCrumb,
|
195
|
203
|
inquiriesDetail,
|
196
|
204
|
print,
|
197
|
205
|
treatPrint,
|
198
|
|
- checkPrint,
|
|
206
|
+ checkPrint
|
199
|
207
|
},
|
200
|
208
|
data() {
|
201
|
209
|
return {
|
202
|
|
- keywords: "",
|
|
210
|
+ keywords: '',
|
203
|
211
|
total: 0,
|
204
|
|
- record_date: "",
|
|
212
|
+ record_date: '',
|
205
|
213
|
page: 1,
|
206
|
214
|
limit: 10,
|
207
|
215
|
crumbs: [
|
208
|
|
- { path: false, name: "门诊医生站" },
|
209
|
|
- { path: false, name: "既往查询" },
|
|
216
|
+ { path: false, name: '门诊医生站' },
|
|
217
|
+ { path: false, name: '既往查询' }
|
210
|
218
|
],
|
211
|
219
|
tableData: [],
|
212
|
220
|
diagnoses: [],
|
|
@@ -214,55 +222,56 @@ export default {
|
214
|
222
|
selecting_schs: [],
|
215
|
223
|
printData: [],
|
216
|
224
|
printType: 0,
|
217
|
|
- org_id: "",
|
218
|
|
- };
|
|
225
|
+ org_id: ''
|
|
226
|
+ }
|
219
|
227
|
},
|
220
|
228
|
methods: {
|
221
|
229
|
printThisPage(printData) {
|
222
|
230
|
printData.forEach((item) => {
|
223
|
231
|
const print = new Promise((resolve, reject) => {
|
224
|
232
|
if (item.prescriptions.length != 0) {
|
225
|
|
- resolve(item.prescriptions);
|
|
233
|
+ resolve(item.prescriptions)
|
226
|
234
|
} else {
|
227
|
|
- reject(false);
|
|
235
|
+ reject(false)
|
228
|
236
|
}
|
229
|
|
- });
|
|
237
|
+ })
|
230
|
238
|
print
|
231
|
|
- .then((printData) => {
|
232
|
|
- if (this.org_id == 10138) {
|
233
|
|
- const style =
|
234
|
|
- "@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}";
|
235
|
|
- printJS({
|
236
|
|
- printable: "printMain",
|
237
|
|
- type: "html",
|
238
|
|
- style: style,
|
239
|
|
- scanStyles: false,
|
240
|
|
- });
|
241
|
|
- }
|
242
|
|
- if (this.printType == 3) {
|
243
|
|
- const style =
|
244
|
|
- "@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
|
245
|
|
- printJS({
|
246
|
|
- printable: "printMain",
|
247
|
|
- type: "html",
|
248
|
|
- style: style,
|
249
|
|
- scanStyles: false,
|
250
|
|
- });
|
251
|
|
- } else {
|
252
|
|
- const style =
|
253
|
|
- "@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white;margin-bottom:40px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
|
254
|
|
- printJS({
|
255
|
|
- printable: "printMain",
|
256
|
|
- type: "html",
|
257
|
|
- style: style,
|
258
|
|
- scanStyles: false,
|
259
|
|
- });
|
260
|
|
- }
|
261
|
|
- })
|
262
|
|
- .catch((reject) => {});
|
263
|
|
- });
|
|
239
|
+ .then((printData) => {
|
|
240
|
+ if (this.org_id == 10138) {
|
|
241
|
+ const style =
|
|
242
|
+ '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}'
|
|
243
|
+ printJS({
|
|
244
|
+ printable: 'printMain',
|
|
245
|
+ type: 'html',
|
|
246
|
+ style: style,
|
|
247
|
+ scanStyles: false
|
|
248
|
+ })
|
|
249
|
+ }
|
|
250
|
+ if (this.printType == 3) {
|
|
251
|
+ const style =
|
|
252
|
+ '@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
|
|
253
|
+ printJS({
|
|
254
|
+ printable: 'printMain',
|
|
255
|
+ type: 'html',
|
|
256
|
+ style: style,
|
|
257
|
+ scanStyles: false
|
|
258
|
+ })
|
|
259
|
+ } else {
|
|
260
|
+ const style =
|
|
261
|
+ '@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white;margin-bottom:40px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
|
|
262
|
+ printJS({
|
|
263
|
+ printable: 'printMain',
|
|
264
|
+ type: 'html',
|
|
265
|
+ style: style,
|
|
266
|
+ scanStyles: false
|
|
267
|
+ })
|
|
268
|
+ }
|
|
269
|
+ })
|
|
270
|
+ .catch((reject) => {
|
|
271
|
+ })
|
|
272
|
+ })
|
264
|
273
|
|
265
|
|
- this.innerVisible = false;
|
|
274
|
+ this.innerVisible = false
|
266
|
275
|
// this.$nextTick(() => {
|
267
|
276
|
// this.$refs.print.printThisPage()
|
268
|
277
|
// this.$refs.treatPrint.printThisPage()
|
|
@@ -271,202 +280,204 @@ export default {
|
271
|
280
|
},
|
272
|
281
|
|
273
|
282
|
searchAction() {
|
274
|
|
- this.page = 1;
|
275
|
|
- this.limit = 10;
|
276
|
|
- this.getHisPrescriptionList();
|
|
283
|
+ this.page = 1
|
|
284
|
+ this.limit = 10
|
|
285
|
+ this.getHisPrescriptionList()
|
277
|
286
|
},
|
278
|
287
|
handleScheduleDateChange() {
|
279
|
|
- this.page = 1;
|
280
|
|
- this.limit = 10;
|
281
|
|
- this.getHisPrescriptionList();
|
|
288
|
+ this.page = 1
|
|
289
|
+ this.limit = 10
|
|
290
|
+ this.getHisPrescriptionList()
|
282
|
291
|
},
|
283
|
292
|
handleCurrentChange(page) {
|
284
|
|
- this.page = page;
|
285
|
|
- this.getHisPrescriptionList();
|
|
293
|
+ this.page = page
|
|
294
|
+ this.getHisPrescriptionList()
|
286
|
295
|
},
|
287
|
296
|
|
288
|
297
|
handleSizeChange(limit) {
|
289
|
|
- this.limit = limit;
|
290
|
|
- this.getHisPrescriptionList();
|
|
298
|
+ this.limit = limit
|
|
299
|
+ this.getHisPrescriptionList()
|
291
|
300
|
},
|
292
|
301
|
getTimes(time) {
|
293
|
|
- return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
302
|
+ return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
|
294
|
303
|
},
|
295
|
304
|
handerShowDetail(row) {
|
296
|
305
|
if (row.id == 0) {
|
297
|
|
- this.$message.error("未就诊");
|
298
|
|
- return;
|
|
306
|
+ this.$message.error('未就诊')
|
|
307
|
+ return
|
299
|
308
|
}
|
300
|
|
- this.$refs.inquiriesDetail.show(row.id);
|
|
309
|
+ this.$refs.inquiriesDetail.show(row.id)
|
301
|
310
|
},
|
302
|
311
|
getHisPrescriptionList() {
|
303
|
312
|
let params = {
|
304
|
313
|
record_date: this.record_date,
|
305
|
314
|
page: this.page,
|
306
|
315
|
limit: this.limit,
|
307
|
|
- keywords: this.keywords,
|
308
|
|
- };
|
|
316
|
+ keywords: this.keywords
|
|
317
|
+ }
|
309
|
318
|
getHisPrescriptionList(params).then((response) => {
|
310
|
319
|
if (response.data.state == 0) {
|
311
|
|
- this.$message.error(response.data.msg);
|
312
|
|
- return false;
|
|
320
|
+ this.$message.error(response.data.msg)
|
|
321
|
+ return false
|
313
|
322
|
} else {
|
314
|
|
- this.tableData = response.data.data.order;
|
315
|
|
- this.total = response.data.data.total;
|
|
323
|
+ this.tableData = response.data.data.order
|
|
324
|
+ this.total = response.data.data.total
|
316
|
325
|
this.$nextTick(() => {
|
317
|
|
- this.$refs.table.doLayout(); //解决表格错位
|
318
|
|
- });
|
|
326
|
+ this.$refs.table.doLayout() //解决表格错位
|
|
327
|
+ })
|
319
|
328
|
}
|
320
|
|
- });
|
|
329
|
+ })
|
321
|
330
|
},
|
322
|
331
|
getInitData() {
|
323
|
332
|
getInitData().then((response) => {
|
324
|
333
|
if (response.data.state == 0) {
|
325
|
|
- this.$message.error(response.data.msg);
|
326
|
|
- return false;
|
|
334
|
+ this.$message.error(response.data.msg)
|
|
335
|
+ return false
|
327
|
336
|
} else {
|
328
|
|
- this.diagnoses = response.data.data.diagnose;
|
329
|
|
- console.log("诊断列表", this.diagnoses);
|
|
337
|
+ this.diagnoses = response.data.data.diagnose
|
|
338
|
+ console.log('诊断列表', this.diagnoses)
|
330
|
339
|
}
|
331
|
|
- });
|
|
340
|
+ })
|
332
|
341
|
},
|
333
|
342
|
getDiagnosis(id) {
|
334
|
|
- let ids = id.split(",");
|
335
|
|
- var name = "";
|
|
343
|
+ let ids = id.split(',')
|
|
344
|
+ var name = ''
|
336
|
345
|
for (let i = 0; i < ids.length; i++) {
|
337
|
346
|
for (let b = 0; b < this.diagnoses.length; b++) {
|
338
|
347
|
if (parseInt(ids[i]) == this.diagnoses[b].id) {
|
339
|
348
|
if (name.length == 0) {
|
340
|
|
- name = this.diagnoses[b].class_name;
|
|
349
|
+ name = this.diagnoses[b].class_name
|
341
|
350
|
} else {
|
342
|
|
- name = name + "," + this.diagnoses[b].class_name;
|
|
351
|
+ name = name + ',' + this.diagnoses[b].class_name
|
343
|
352
|
}
|
344
|
353
|
}
|
345
|
354
|
}
|
346
|
355
|
}
|
347
|
|
- return name;
|
|
356
|
+ return name
|
348
|
357
|
},
|
349
|
358
|
handleSelectionChange(val) {
|
350
|
|
- this.selecting_schs = val;
|
|
359
|
+ this.selecting_schs = val
|
351
|
360
|
},
|
352
|
361
|
batchPrint(type) {
|
353
|
|
- this.printType = type;
|
|
362
|
+ this.printType = type
|
354
|
363
|
if (this.selecting_schs.length === 0) {
|
355
|
|
- this.$message.error("请至少选择一条需要打印的内容");
|
356
|
|
- return false;
|
|
364
|
+ this.$message.error('请至少选择一条需要打印的内容')
|
|
365
|
+ return false
|
357
|
366
|
} else {
|
358
|
|
- var sch_ids = [];
|
|
367
|
+ var sch_ids = []
|
359
|
368
|
for (let index = 0; index < this.selecting_schs.length; index++) {
|
360
|
|
- sch_ids.push(this.selecting_schs[index].patient_id);
|
|
369
|
+ sch_ids.push(this.selecting_schs[index].patient_id)
|
361
|
370
|
}
|
362
|
371
|
let params = {
|
363
|
372
|
record_date: this.record_date,
|
364
|
|
- patient_ids: sch_ids.join(","),
|
365
|
|
- type: type,
|
366
|
|
- };
|
|
373
|
+ patient_ids: sch_ids.join(','),
|
|
374
|
+ type: type
|
|
375
|
+ }
|
367
|
376
|
getBatchPrint(params).then((res) => {
|
368
|
|
- let Arr = res.data.data.patients;
|
369
|
|
- let new_patients = [];
|
|
377
|
+ let Arr = res.data.data.patients
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+ let new_patients = []
|
370
|
381
|
if (type != 3) {
|
371
|
382
|
Arr.forEach((i) => {
|
372
|
383
|
if (i.prescriptions.length != 0) {
|
373
|
|
- new_patients.push(i);
|
|
384
|
+ new_patients.push(i)
|
374
|
385
|
}
|
375
|
|
- });
|
|
386
|
+ })
|
376
|
387
|
} else {
|
377
|
388
|
// 过滤检查单数据出来,筛选出有检查项目的单子,不显示没有检查项目的单子
|
378
|
389
|
Arr.forEach((el) => {
|
379
|
390
|
el.prescriptions.forEach((o) => {
|
380
|
391
|
o.project.forEach((i) => {
|
381
|
|
- if (i.team.project_team != "") {
|
382
|
|
- new_patients.push(el);
|
|
392
|
+ if (i.team.project_team != '') {
|
|
393
|
+ new_patients.push(el)
|
383
|
394
|
}
|
384
|
|
- });
|
385
|
|
- });
|
386
|
|
- });
|
387
|
|
- let projectPrint = [];
|
|
395
|
+ })
|
|
396
|
+ })
|
|
397
|
+ })
|
|
398
|
+ let projectPrint = []
|
388
|
399
|
new_patients.forEach((el) => {
|
389
|
400
|
el.prescriptions.map((item) => {
|
390
|
401
|
if (item.project.length > 0) {
|
391
|
402
|
item.project.map((it) => {
|
392
|
|
- projectPrint.push(it);
|
393
|
|
- });
|
|
403
|
+ projectPrint.push(it)
|
|
404
|
+ })
|
394
|
405
|
}
|
395
|
|
- });
|
396
|
|
- });
|
|
406
|
+ })
|
|
407
|
+ })
|
397
|
408
|
// 数组去重
|
398
|
|
- projectPrint = this.split_project(projectPrint);
|
|
409
|
+ projectPrint = this.split_project(projectPrint)
|
399
|
410
|
// 配对
|
400
|
|
- let data = [];
|
|
411
|
+ let data = []
|
401
|
412
|
projectPrint.map((item) => {
|
402
|
413
|
if (item.team.id == 0) {
|
403
|
|
- data.push(item);
|
|
414
|
+ data.push(item)
|
404
|
415
|
} else {
|
405
|
|
- if (item.team.project_team != "") {
|
406
|
|
- new_patients.push(item);
|
|
416
|
+ if (item.team.project_team != '') {
|
|
417
|
+ new_patients.push(item)
|
407
|
418
|
}
|
408
|
419
|
}
|
409
|
|
- });
|
|
420
|
+ })
|
410
|
421
|
new_patients = this.split_project_1(new_patients)
|
411
|
422
|
}
|
412
|
|
- this.printData = new_patients;
|
413
|
|
- console.log(this.printData,'this.printData')
|
414
|
|
- });
|
|
423
|
+ this.printData = new_patients
|
|
424
|
+ console.log(this.printData, 'this.printData')
|
|
425
|
+ })
|
415
|
426
|
}
|
416
|
|
- this.innerVisible = true;
|
|
427
|
+ this.innerVisible = true
|
417
|
428
|
},
|
418
|
429
|
// 外层去重方
|
419
|
430
|
split_project(Arr) {
|
420
|
|
- let hash = {};
|
421
|
|
- let new_Arr = [];
|
|
431
|
+ let hash = {}
|
|
432
|
+ let new_Arr = []
|
422
|
433
|
new_Arr = Arr.reduce((preVal, curVal) => {
|
423
|
|
- hash[curVal.id] ? "" : (hash[curVal.id] = true && preVal.push(curVal));
|
424
|
|
- return preVal;
|
425
|
|
- }, []);
|
|
434
|
+ hash[curVal.id] ? '' : (hash[curVal.id] = true && preVal.push(curVal))
|
|
435
|
+ return preVal
|
|
436
|
+ }, [])
|
426
|
437
|
Arr = new_Arr.reduce((preVal, curVal) => {
|
427
|
438
|
hash[curVal.team.project_team]
|
428
|
|
- ? ""
|
429
|
|
- : (hash[curVal.team.project_team] = true && preVal.push(curVal));
|
430
|
|
- return preVal;
|
431
|
|
- }, []);
|
432
|
|
- return Arr;
|
|
439
|
+ ? ''
|
|
440
|
+ : (hash[curVal.team.project_team] = true && preVal.push(curVal))
|
|
441
|
+ return preVal
|
|
442
|
+ }, [])
|
|
443
|
+ return Arr
|
433
|
444
|
},
|
434
|
445
|
|
435
|
446
|
// 内层去重
|
436
|
447
|
split_project_1(Arr) {
|
437
|
|
- let hash = {};
|
438
|
|
- let new_Arr = [];
|
|
448
|
+ let hash = {}
|
|
449
|
+ let new_Arr = []
|
439
|
450
|
Arr = Arr.reduce((preVal, curVal) => {
|
440
|
|
- hash[curVal.id] ? "" : (hash[curVal.id] = true && preVal.push(curVal));
|
441
|
|
- return preVal;
|
442
|
|
- }, []);
|
|
451
|
+ hash[curVal.id] ? '' : (hash[curVal.id] = true && preVal.push(curVal))
|
|
452
|
+ return preVal
|
|
453
|
+ }, [])
|
443
|
454
|
|
444
|
455
|
Arr.forEach(el => {
|
445
|
|
- if(el.name){
|
|
456
|
+ if (el.name) {
|
446
|
457
|
new_Arr.push(el)
|
447
|
458
|
}
|
448
|
459
|
})
|
449
|
460
|
|
450
|
|
- console.log(new_Arr, "Arr");
|
451
|
|
- return new_Arr;
|
452
|
|
- },
|
|
461
|
+ console.log(new_Arr, 'Arr')
|
|
462
|
+ return new_Arr
|
|
463
|
+ }
|
453
|
464
|
},
|
454
|
465
|
created() {
|
455
|
|
- var nowDate = new Date();
|
456
|
|
- var nowYear = nowDate.getFullYear();
|
457
|
|
- var nowMonth = nowDate.getMonth() + 1;
|
458
|
|
- var nowDay = nowDate.getDate();
|
|
466
|
+ var nowDate = new Date()
|
|
467
|
+ var nowYear = nowDate.getFullYear()
|
|
468
|
+ var nowMonth = nowDate.getMonth() + 1
|
|
469
|
+ var nowDay = nowDate.getDate()
|
459
|
470
|
this.record_date =
|
460
|
|
- nowYear +
|
461
|
|
- "-" +
|
462
|
|
- (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
463
|
|
- "-" +
|
464
|
|
- (nowDay < 10 ? "0" + nowDay : nowDay);
|
|
471
|
+ nowYear +
|
|
472
|
+ '-' +
|
|
473
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
474
|
+ '-' +
|
|
475
|
+ (nowDay < 10 ? '0' + nowDay : nowDay)
|
465
|
476
|
|
466
|
|
- this.org_id = this.$store.getters.xt_user.template_info.org_id;
|
|
477
|
+ this.org_id = this.$store.getters.xt_user.template_info.org_id
|
467
|
478
|
|
468
|
|
- this.getHisPrescriptionList();
|
469
|
|
- this.getInitData();
|
470
|
|
- },
|
471
|
|
-};
|
|
479
|
+ this.getHisPrescriptionList()
|
|
480
|
+ this.getInitData()
|
|
481
|
+ }
|
|
482
|
+}
|
472
|
483
|
</script>
|