|
@@ -1,45 +1,116 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="main-contain">
|
3
|
3
|
<div class="position">
|
4
|
|
- <bread-crumb :crumbs='crumbs'></bread-crumb>
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
5
|
5
|
</div>
|
6
|
6
|
<div class="app-container">
|
7
|
7
|
<div class="cell clearfix">
|
8
|
|
- <el-input size="small" style="width:150px;" v-model="keywords"
|
9
|
|
- class="filter-item"/>
|
10
|
|
- <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
|
|
8
|
+ <el-input
|
|
9
|
+ size="small"
|
|
10
|
+ style="width: 150px"
|
|
11
|
+ v-model="keywords"
|
|
12
|
+ class="filter-item"
|
|
13
|
+ />
|
|
14
|
+ <el-button
|
|
15
|
+ size="small"
|
|
16
|
+ style="margin: 0 10px"
|
|
17
|
+ class="filter-item"
|
|
18
|
+ type="primary"
|
|
19
|
+ @click="searchAction"
|
|
20
|
+ >搜索
|
11
|
21
|
</el-button>
|
12
|
|
- <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
|
13
|
|
- :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
|
14
|
|
- format="yyyy-MM-dd"
|
15
|
|
- value-format="yyyy-MM-dd"
|
16
|
|
- placeholder="选择日期时间" align="right"></el-date-picker>
|
17
|
|
- <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(1)">处方筏批量打印</el-button>
|
18
|
|
- <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(2)">治疗单批量打印</el-button>
|
19
|
|
- <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(3)">检验单批量打印</el-button>
|
|
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"
|
|
34
|
+ ></el-date-picker>
|
|
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
|
|
42
|
+ >
|
|
43
|
+ <el-button
|
|
44
|
+ size="small"
|
|
45
|
+ style="margin: 0 10px"
|
|
46
|
+ class="filter-item"
|
|
47
|
+ type="primary"
|
|
48
|
+ @click="batchPrint(2)"
|
|
49
|
+ >治疗单批量打印</el-button
|
|
50
|
+ >
|
|
51
|
+ <el-button
|
|
52
|
+ size="small"
|
|
53
|
+ style="margin: 0 10px"
|
|
54
|
+ class="filter-item"
|
|
55
|
+ type="primary"
|
|
56
|
+ @click="batchPrint(3)"
|
|
57
|
+ >检验单批量打印</el-button
|
|
58
|
+ >
|
20
|
59
|
</div>
|
21
|
|
- <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }" @selection-change="handleSelectionChange"
|
22
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
|
23
|
|
- <el-table-column align="center" type="selection" width="55"></el-table-column>
|
24
|
|
- <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
|
|
60
|
+ <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="{
|
|
68
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
69
|
+ color: '#606266',
|
|
70
|
+ }"
|
|
71
|
+ highlight-current-row
|
|
72
|
+ >
|
|
73
|
+ <el-table-column
|
|
74
|
+ align="center"
|
|
75
|
+ type="selection"
|
|
76
|
+ width="55"
|
|
77
|
+ ></el-table-column>
|
|
78
|
+ <el-table-column
|
|
79
|
+ align="center"
|
|
80
|
+ label="序号"
|
|
81
|
+ width="60"
|
|
82
|
+ type="index"
|
|
83
|
+ ></el-table-column>
|
25
|
84
|
<el-table-column align="center" prop="name" label="姓名" width="100">
|
26
|
|
- <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
|
|
85
|
+ <template slot-scope="scope">{{
|
|
86
|
+ scope.row.patients ? scope.row.patients.name : ""
|
|
87
|
+ }}</template>
|
27
|
88
|
</el-table-column>
|
28
|
|
- <el-table-column align="center" prop="name" label="处方日期" width="200">
|
29
|
|
- <template slot-scope="scope"> {{getTimes(scope.row.ctime)}}</template>
|
30
|
|
-
|
|
89
|
+ <el-table-column
|
|
90
|
+ align="center"
|
|
91
|
+ prop="name"
|
|
92
|
+ label="处方日期"
|
|
93
|
+ width="200"
|
|
94
|
+ >
|
|
95
|
+ <template slot-scope="scope">
|
|
96
|
+ {{ getTimes(scope.row.ctime) }}</template
|
|
97
|
+ >
|
31
|
98
|
</el-table-column>
|
32
|
99
|
<!--<el-table-column align="center" prop="name" label="患者类型">-->
|
33
|
|
- <!--<template slot-scope="scope">{{}}</template>-->
|
|
100
|
+ <!--<template slot-scope="scope">{{}}</template>-->
|
34
|
101
|
<!--</el-table-column>-->
|
35
|
102
|
<el-table-column align="center" prop="name" label="处方号">
|
36
|
|
- <template slot-scope="scope">{{scope.row.prescription_number}}</template>
|
|
103
|
+ <template slot-scope="scope">{{
|
|
104
|
+ scope.row.prescription_number
|
|
105
|
+ }}</template>
|
37
|
106
|
</el-table-column>
|
38
|
107
|
<el-table-column align="center" prop="name" label="开立医生">
|
39
|
|
- <template slot-scope="scope">{{scope.row.doctor}}</template>
|
|
108
|
+ <template slot-scope="scope">{{ scope.row.doctor }}</template>
|
40
|
109
|
</el-table-column>
|
41
|
110
|
<el-table-column align="center" prop="name" label="诊断">
|
42
|
|
- <template slot-scope="scope">{{getDiagnosis(scope.row.diagnosis)}}</template>
|
|
111
|
+ <template slot-scope="scope">{{
|
|
112
|
+ getDiagnosis(scope.row.diagnosis)
|
|
113
|
+ }}</template>
|
43
|
114
|
</el-table-column>
|
44
|
115
|
<el-table-column align="center" prop="name" label="状态" width="100">
|
45
|
116
|
<template slot-scope="scope">
|
|
@@ -49,7 +120,12 @@
|
49
|
120
|
</el-table-column>
|
50
|
121
|
<el-table-column align="center" prop="name" label="操作" width="100">
|
51
|
122
|
<template slot-scope="scope">
|
52
|
|
- <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
|
|
123
|
+ <el-button
|
|
124
|
+ size="mini"
|
|
125
|
+ type="primary"
|
|
126
|
+ @click="handerShowDetail(scope.row)"
|
|
127
|
+ >详情</el-button
|
|
128
|
+ >
|
53
|
129
|
</template>
|
54
|
130
|
</el-table-column>
|
55
|
131
|
</el-table>
|
|
@@ -59,239 +135,242 @@
|
59
|
135
|
:page-sizes="[10, 50, 100]"
|
60
|
136
|
:page-size="10"
|
61
|
137
|
background
|
62
|
|
- style="margin-top:20px;float: right"
|
|
138
|
+ style="margin-top: 20px; float: right"
|
63
|
139
|
layout="total, sizes, prev, pager, next, jumper"
|
64
|
140
|
:total="total"
|
65
|
141
|
>
|
66
|
142
|
</el-pagination>
|
67
|
143
|
<inquiries-detail ref="inquiriesDetail"></inquiries-detail>
|
68
|
144
|
<el-dialog
|
69
|
|
- class="centerDialog"
|
70
|
|
- width="600px"
|
71
|
|
- title="打印"
|
72
|
|
- :visible.sync="innerVisible"
|
73
|
|
- append-to-body>
|
|
145
|
+ class="centerDialog"
|
|
146
|
+ width="600px"
|
|
147
|
+ title="打印"
|
|
148
|
+ :visible.sync="innerVisible"
|
|
149
|
+ append-to-body
|
|
150
|
+ >
|
74
|
151
|
<template>
|
75
|
152
|
<el-button
|
76
|
|
- style="float:right;"
|
77
|
|
- size="small"
|
78
|
|
- icon="el-icon-printer"
|
79
|
|
- @click="printThisPage"
|
80
|
|
- type="primary"
|
81
|
|
- >打印
|
|
153
|
+ style="float: right"
|
|
154
|
+ size="small"
|
|
155
|
+ icon="el-icon-printer"
|
|
156
|
+ @click="printThisPage"
|
|
157
|
+ type="primary"
|
|
158
|
+ >打印
|
82
|
159
|
</el-button>
|
83
|
160
|
</template>
|
84
|
|
- <div id='printMain'>
|
85
|
|
- <print ref="print" v-if="printType == 1" :printData='printData'></print>
|
86
|
|
- <treatPrint ref="treatPrint" v-if="printType == 2" :printData='printData'></treatPrint>
|
87
|
|
- <checkPrint ref="checkPrint" v-if="printType == 3" :printData='printData'></checkPrint>
|
|
161
|
+ <div id="printMain">
|
|
162
|
+ <print
|
|
163
|
+ ref="print"
|
|
164
|
+ v-if="printType == 1"
|
|
165
|
+ :printData="printData"
|
|
166
|
+ ></print>
|
|
167
|
+ <treatPrint
|
|
168
|
+ ref="treatPrint"
|
|
169
|
+ v-if="printType == 2"
|
|
170
|
+ :printData="printData"
|
|
171
|
+ ></treatPrint>
|
|
172
|
+ <checkPrint
|
|
173
|
+ ref="checkPrint"
|
|
174
|
+ v-show="printType == 3"
|
|
175
|
+ :printData="printData"
|
|
176
|
+ ></checkPrint>
|
88
|
177
|
</div>
|
89
|
|
-
|
90
|
178
|
</el-dialog>
|
91
|
179
|
</div>
|
92
|
180
|
</div>
|
93
|
181
|
</template>
|
94
|
182
|
|
95
|
183
|
<script>
|
96
|
|
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
97
|
|
- import inquiriesDetail from './components/inquiriesDetail'
|
98
|
|
- import { getHisPrescriptionList } from '@/api/his/his'
|
99
|
|
- import { uParseTime } from '@/utils/tools'
|
100
|
|
- import { getInitData, getBatchPrint } from '@/api/his/his'
|
101
|
|
- import print from './batch_print_template/index'
|
102
|
|
- import treatPrint from './batch_print_treatTemplate/index'
|
103
|
|
- import checkPrint from './batch_print_checkTemplate/index'
|
104
|
|
- export default {
|
105
|
|
- components: {
|
106
|
|
- BreadCrumb,
|
107
|
|
- inquiriesDetail,
|
108
|
|
- print,
|
109
|
|
- treatPrint,
|
110
|
|
- checkPrint
|
111
|
|
- },
|
112
|
|
- data() {
|
113
|
|
- return {
|
114
|
|
- keywords:"",
|
115
|
|
- total:0,
|
116
|
|
- record_date:"",
|
117
|
|
- page:1,
|
118
|
|
- limit:10,
|
119
|
|
- crumbs: [
|
120
|
|
- { path: false, name: '门诊医生站' },
|
121
|
|
- { path: false, name: '既往查询' }
|
122
|
|
- ],
|
123
|
|
- tableData: [],
|
124
|
|
- diagnoses:[],
|
125
|
|
- innerVisible: false,
|
126
|
|
- selecting_schs:[],
|
127
|
|
- printData:[],
|
128
|
|
- printType: 0,
|
129
|
|
- org_id:'',
|
|
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
|
+export default {
|
|
193
|
+ components: {
|
|
194
|
+ BreadCrumb,
|
|
195
|
+ inquiriesDetail,
|
|
196
|
+ print,
|
|
197
|
+ treatPrint,
|
|
198
|
+ checkPrint,
|
|
199
|
+ },
|
|
200
|
+ data() {
|
|
201
|
+ return {
|
|
202
|
+ keywords: "",
|
|
203
|
+ total: 0,
|
|
204
|
+ record_date: "",
|
|
205
|
+ page: 1,
|
|
206
|
+ limit: 10,
|
|
207
|
+ crumbs: [
|
|
208
|
+ { path: false, name: "门诊医生站" },
|
|
209
|
+ { path: false, name: "既往查询" },
|
|
210
|
+ ],
|
|
211
|
+ tableData: [],
|
|
212
|
+ diagnoses: [],
|
|
213
|
+ innerVisible: false,
|
|
214
|
+ selecting_schs: [],
|
|
215
|
+ printData: [],
|
|
216
|
+ printType: 0,
|
|
217
|
+ org_id: "",
|
|
218
|
+ };
|
|
219
|
+ },
|
|
220
|
+ methods: {
|
|
221
|
+ printThisPage() {
|
|
222
|
+ if (this.org_id == 10138) {
|
|
223
|
+ const style =
|
|
224
|
+ "@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%;}}}";
|
|
225
|
+ printJS({
|
|
226
|
+ printable: "printMain",
|
|
227
|
+ type: "html",
|
|
228
|
+ style: style,
|
|
229
|
+ scanStyles: false,
|
|
230
|
+ });
|
|
231
|
+ } else {
|
|
232
|
+ const style =
|
|
233
|
+ "@media print {#prescription-print{font-size:14px;border:1px solid white}.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: 82%;}}#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;}}";
|
|
234
|
+ printJS({
|
|
235
|
+ printable: "printMain",
|
|
236
|
+ type: "html",
|
|
237
|
+ style: style,
|
|
238
|
+ scanStyles: false,
|
|
239
|
+ });
|
130
|
240
|
}
|
|
241
|
+ this.innerVisible = false;
|
|
242
|
+ // this.$nextTick(() => {
|
|
243
|
+ // this.$refs.print.printThisPage()
|
|
244
|
+ // this.$refs.treatPrint.printThisPage()
|
|
245
|
+ // this.$refs.checkPrint.printThisPage()
|
|
246
|
+ // })
|
131
|
247
|
},
|
132
|
|
- methods: {
|
133
|
|
- printThisPage() {
|
134
|
|
- if(this.org_id == 10138){
|
135
|
|
- const style =
|
136
|
|
- '@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%;}}}'
|
137
|
|
- printJS({
|
138
|
|
- printable: 'printMain',
|
139
|
|
- type: 'html',
|
140
|
|
- style: style,
|
141
|
|
- scanStyles: false
|
142
|
|
- })
|
143
|
|
- }else{
|
144
|
|
- const style =
|
145
|
|
- '@media print {#prescription-print{font-size:14px;border:1px solid white}.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: 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: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;}}'
|
146
|
|
- printJS({
|
147
|
|
- printable: 'printMain',
|
148
|
|
- type: 'html',
|
149
|
|
- style: style,
|
150
|
|
- scanStyles: false
|
151
|
|
- })
|
152
|
|
- }
|
153
|
|
- this.innerVisible = false
|
154
|
|
- // this.$nextTick(() => {
|
155
|
|
- // this.$refs.print.printThisPage()
|
156
|
|
- // this.$refs.treatPrint.printThisPage()
|
157
|
|
- // this.$refs.checkPrint.printThisPage()
|
158
|
|
- // })
|
159
|
|
- },
|
160
|
|
-
|
161
|
|
- searchAction(){
|
162
|
|
- this.page = 1;
|
163
|
|
- this.limit = 10;
|
164
|
|
- this.getHisPrescriptionList()
|
165
|
|
-
|
166
|
|
- },
|
167
|
|
- handleScheduleDateChange(){
|
168
|
|
- this.page = 1;
|
169
|
|
- this.limit = 10;
|
170
|
|
- this.getHisPrescriptionList()
|
171
|
|
-
|
172
|
|
- },
|
173
|
|
- handleCurrentChange(page) {
|
174
|
|
- this.page = page;
|
175
|
|
- this.getHisPrescriptionList()
|
176
|
|
-
|
177
|
|
- },
|
178
|
|
-
|
179
|
|
- handleSizeChange(limit) {
|
180
|
|
- this.limit = limit;
|
181
|
|
- this.getHisPrescriptionList()
|
182
|
248
|
|
|
249
|
+ searchAction() {
|
|
250
|
+ this.page = 1;
|
|
251
|
+ this.limit = 10;
|
|
252
|
+ this.getHisPrescriptionList();
|
|
253
|
+ },
|
|
254
|
+ handleScheduleDateChange() {
|
|
255
|
+ this.page = 1;
|
|
256
|
+ this.limit = 10;
|
|
257
|
+ this.getHisPrescriptionList();
|
|
258
|
+ },
|
|
259
|
+ handleCurrentChange(page) {
|
|
260
|
+ this.page = page;
|
|
261
|
+ this.getHisPrescriptionList();
|
|
262
|
+ },
|
183
|
263
|
|
184
|
|
- },
|
185
|
|
- getTimes(time) {
|
186
|
|
- return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
187
|
|
- },
|
188
|
|
- handerShowDetail(row) {
|
189
|
|
- if(row.id == 0){
|
190
|
|
- this.$message.error("未就诊")
|
191
|
|
- return
|
|
264
|
+ handleSizeChange(limit) {
|
|
265
|
+ this.limit = limit;
|
|
266
|
+ this.getHisPrescriptionList();
|
|
267
|
+ },
|
|
268
|
+ getTimes(time) {
|
|
269
|
+ return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
270
|
+ },
|
|
271
|
+ handerShowDetail(row) {
|
|
272
|
+ if (row.id == 0) {
|
|
273
|
+ this.$message.error("未就诊");
|
|
274
|
+ return;
|
|
275
|
+ }
|
|
276
|
+ this.$refs.inquiriesDetail.show(row.id);
|
|
277
|
+ },
|
|
278
|
+ getHisPrescriptionList() {
|
|
279
|
+ let params = {
|
|
280
|
+ record_date: this.record_date,
|
|
281
|
+ page: this.page,
|
|
282
|
+ limit: this.limit,
|
|
283
|
+ keywords: this.keywords,
|
|
284
|
+ };
|
|
285
|
+ getHisPrescriptionList(params).then((response) => {
|
|
286
|
+ if (response.data.state == 0) {
|
|
287
|
+ this.$message.error(response.data.msg);
|
|
288
|
+ return false;
|
|
289
|
+ } else {
|
|
290
|
+ this.tableData = response.data.data.order;
|
|
291
|
+ this.total = response.data.data.total;
|
|
292
|
+ this.$nextTick(() => {
|
|
293
|
+ this.$refs.table.doLayout(); //解决表格错位
|
|
294
|
+ });
|
192
|
295
|
}
|
193
|
|
- this.$refs.inquiriesDetail.show(row.id)
|
194
|
|
- }, getHisPrescriptionList() {
|
195
|
|
- let params = {
|
196
|
|
- record_date:this.record_date,
|
197
|
|
- page: this.page,
|
198
|
|
- limit: this.limit,
|
199
|
|
- keywords: this.keywords,
|
|
296
|
+ });
|
|
297
|
+ },
|
|
298
|
+ getInitData() {
|
|
299
|
+ getInitData().then((response) => {
|
|
300
|
+ if (response.data.state == 0) {
|
|
301
|
+ this.$message.error(response.data.msg);
|
|
302
|
+ return false;
|
|
303
|
+ } else {
|
|
304
|
+ this.diagnoses = response.data.data.diagnose;
|
|
305
|
+ console.log("诊断列表", this.diagnoses);
|
200
|
306
|
}
|
201
|
|
- getHisPrescriptionList(params).then(response => {
|
202
|
|
- if (response.data.state == 0) {
|
203
|
|
- this.$message.error(response.data.msg)
|
204
|
|
- return false
|
205
|
|
- } else {
|
206
|
|
- this.tableData = response.data.data.order
|
207
|
|
- this.total = response.data.data.total
|
208
|
|
- this.$nextTick(() => {
|
209
|
|
- this.$refs.table.doLayout(); //解决表格错位
|
210
|
|
- });
|
211
|
|
- }
|
212
|
|
- })
|
213
|
|
-
|
214
|
|
- },
|
215
|
|
- getInitData() {
|
216
|
|
- getInitData().then(response => {
|
217
|
|
- if (response.data.state == 0) {
|
218
|
|
- this.$message.error(response.data.msg)
|
219
|
|
- return false
|
220
|
|
- } else {
|
221
|
|
- this.diagnoses = response.data.data.diagnose
|
222
|
|
- console.log("诊断列表",this.diagnoses)
|
223
|
|
- }
|
224
|
|
- })
|
225
|
|
- },
|
226
|
|
- getDiagnosis(id){
|
227
|
|
- let ids = id.split(",")
|
228
|
|
- var name = ""
|
229
|
|
- for(let i = 0; i < ids.length; i++){
|
230
|
|
-
|
231
|
|
- for(let b=0;b<this.diagnoses.length;b++){
|
232
|
|
- if(parseInt(ids[i]) == this.diagnoses[b].id){
|
233
|
|
- if(name.length == 0){
|
234
|
|
- name = this.diagnoses[b].class_name
|
235
|
|
- }else{
|
236
|
|
- name = name +"," + this.diagnoses[b].class_name
|
237
|
|
-
|
238
|
|
- }
|
|
307
|
+ });
|
|
308
|
+ },
|
|
309
|
+ getDiagnosis(id) {
|
|
310
|
+ let ids = id.split(",");
|
|
311
|
+ var name = "";
|
|
312
|
+ for (let i = 0; i < ids.length; i++) {
|
|
313
|
+ for (let b = 0; b < this.diagnoses.length; b++) {
|
|
314
|
+ if (parseInt(ids[i]) == this.diagnoses[b].id) {
|
|
315
|
+ if (name.length == 0) {
|
|
316
|
+ name = this.diagnoses[b].class_name;
|
|
317
|
+ } else {
|
|
318
|
+ name = name + "," + this.diagnoses[b].class_name;
|
239
|
319
|
}
|
240
|
320
|
}
|
241
|
|
-
|
242
|
321
|
}
|
|
322
|
+ }
|
243
|
323
|
|
244
|
|
-
|
245
|
|
-
|
246
|
|
-
|
247
|
|
- return name
|
248
|
|
- },
|
249
|
|
- handleSelectionChange(val) {
|
250
|
|
-
|
251
|
|
- this.selecting_schs = val;
|
252
|
|
-
|
253
|
|
- },
|
254
|
|
- batchPrint(type){
|
255
|
|
- this.printType = type
|
256
|
|
- if (this.selecting_schs.length === 0) {
|
257
|
|
- this.$message.error("请至少选择一条需要打印的内容");
|
258
|
|
- return false;
|
259
|
|
- }
|
260
|
|
- this.innerVisible = true
|
|
324
|
+ return name;
|
|
325
|
+ },
|
|
326
|
+ handleSelectionChange(val) {
|
|
327
|
+ this.selecting_schs = val;
|
|
328
|
+ },
|
|
329
|
+ batchPrint(type) {
|
|
330
|
+ this.printType = type;
|
|
331
|
+ console.log(type, "oo");
|
|
332
|
+ if (this.selecting_schs.length === 0) {
|
|
333
|
+ this.$message.error("请至少选择一条需要打印的内容");
|
|
334
|
+ return false;
|
|
335
|
+ } else {
|
261
|
336
|
var sch_ids = [];
|
262
|
|
-
|
263
|
337
|
for (let index = 0; index < this.selecting_schs.length; index++) {
|
264
|
338
|
sch_ids.push(this.selecting_schs[index].patient_id);
|
265
|
339
|
}
|
266
|
|
- console.log('sch_ids',sch_ids)
|
|
340
|
+ console.log("sch_ids", sch_ids);
|
267
|
341
|
let params = {
|
268
|
342
|
record_date: this.record_date,
|
269
|
343
|
patient_ids: sch_ids.join(","),
|
270
|
|
- type: type
|
271
|
|
- }
|
272
|
|
- getBatchPrint(params).then(res => {
|
273
|
|
- console.log('res',res)
|
274
|
|
- let printData = res.data.data.patients
|
275
|
|
- this.printData = printData
|
276
|
|
- })
|
277
|
|
- }
|
278
|
|
- }, created() {
|
279
|
|
- var nowDate = new Date()
|
280
|
|
- var nowYear = nowDate.getFullYear()
|
281
|
|
- var nowMonth = nowDate.getMonth() + 1
|
282
|
|
- var nowDay = nowDate.getDate()
|
283
|
|
- this.record_date =
|
284
|
|
- nowYear +
|
285
|
|
- '-' +
|
286
|
|
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
287
|
|
- '-' +
|
288
|
|
- (nowDay < 10 ? '0' + nowDay : nowDay)
|
|
344
|
+ type: type,
|
|
345
|
+ };
|
|
346
|
+ getBatchPrint(params).then((res) => {
|
|
347
|
+ let printData = res.data.data.patients;
|
|
348
|
+ this.printData = printData;
|
289
|
349
|
|
290
|
|
- this.org_id = this.$store.getters.xt_user.template_info.org_id
|
|
350
|
+ console.log("res", printData);
|
|
351
|
+ });
|
|
352
|
+ }
|
|
353
|
+ this.innerVisible = true;
|
|
354
|
+ // this.$refs.checkPrint.getTeam_1();
|
|
355
|
+
|
|
356
|
+ },
|
|
357
|
+ },
|
|
358
|
+ created() {
|
|
359
|
+ var nowDate = new Date();
|
|
360
|
+ var nowYear = nowDate.getFullYear();
|
|
361
|
+ var nowMonth = nowDate.getMonth() + 1;
|
|
362
|
+ var nowDay = nowDate.getDate();
|
|
363
|
+ this.record_date =
|
|
364
|
+ nowYear +
|
|
365
|
+ "-" +
|
|
366
|
+ (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
367
|
+ "-" +
|
|
368
|
+ (nowDay < 10 ? "0" + nowDay : nowDay);
|
291
|
369
|
|
292
|
|
- this.getHisPrescriptionList()
|
293
|
|
- this.getInitData()
|
|
370
|
+ this.org_id = this.$store.getters.xt_user.template_info.org_id;
|
294
|
371
|
|
295
|
|
- }
|
296
|
|
- }
|
|
372
|
+ this.getHisPrescriptionList();
|
|
373
|
+ this.getInitData();
|
|
374
|
+ },
|
|
375
|
+};
|
297
|
376
|
</script>
|