|
@@ -0,0 +1,267 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain outpatientChargesManagement">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs='crumbs'></bread-crumb>
|
|
5
|
+ </div>
|
|
6
|
+ <div>
|
|
7
|
+ <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
|
|
8
|
+ <div>
|
|
9
|
+ <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
|
|
10
|
+ @keyup.enter.native='searchAction'
|
|
11
|
+ placeholder="请输入患者姓名"
|
|
12
|
+ class="filter-item"/>
|
|
13
|
+ <el-select size="small" v-model="item_type" placeholder="请选择"
|
|
14
|
+ style="width:150px;margin-left:10px;" @change="changeItem">
|
|
15
|
+ <el-option
|
|
16
|
+ label="全部"
|
|
17
|
+ value="0">
|
|
18
|
+ </el-option>
|
|
19
|
+ <el-option
|
|
20
|
+ v-for="item,index in items"
|
|
21
|
+ :key="index"
|
|
22
|
+ :label="item.name"
|
|
23
|
+ :value="item.id">
|
|
24
|
+ </el-option>
|
|
25
|
+ </el-select>
|
|
26
|
+ <el-date-picker
|
|
27
|
+ v-model="chargeDate"
|
|
28
|
+ type="date"
|
|
29
|
+ format="yyyy-MM-dd"
|
|
30
|
+ value-format="yyyy-MM-dd"
|
|
31
|
+ @change="changeDate"
|
|
32
|
+ >
|
|
33
|
+ </el-date-picker>
|
|
34
|
+ </div>
|
|
35
|
+ </div>
|
|
36
|
+ <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
|
|
37
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
38
|
+ highlight-current-row>
|
|
39
|
+
|
|
40
|
+ <el-table-column align="center" prop="name" label="患者名字">
|
|
41
|
+ <template slot-scope="scope">{{ scope.row.patient_name }}</template>
|
|
42
|
+ </el-table-column>
|
|
43
|
+
|
|
44
|
+ <el-table-column align="center" prop="name" label="处方号">
|
|
45
|
+ <template slot-scope="scope">{{scope.row.number}}</template>
|
|
46
|
+ </el-table-column>
|
|
47
|
+ <el-table-column align="center" prop="name" label="创建时间">
|
|
48
|
+ <template slot-scope="scope">{{getTime(scope.row.record_date, '{y}-{m}-{d}')}}</template>
|
|
49
|
+ </el-table-column>
|
|
50
|
+ <el-table-column align="center" prop="name" label="创建医生">
|
|
51
|
+ <template slot-scope="scope">{{scope.row.doctor_name}}</template>
|
|
52
|
+ </el-table-column>
|
|
53
|
+ <el-table-column align="center" prop="name" label="项目名称">
|
|
54
|
+ <template slot-scope="scope">
|
|
55
|
+ <div>{{scope.row.project_name}}</div>
|
|
56
|
+ </template>
|
|
57
|
+ </el-table-column>
|
|
58
|
+
|
|
59
|
+ <el-table-column
|
|
60
|
+ align="center"
|
|
61
|
+ label="操作"
|
|
62
|
+ width="180"
|
|
63
|
+ class-name="small-padding fixed-width"
|
|
64
|
+ >
|
|
65
|
+ <template slot-scope="scope">
|
|
66
|
+ <el-tooltip class="item" effect="dark" content="打印" placement="top">
|
|
67
|
+ <el-button
|
|
68
|
+ type="primary"
|
|
69
|
+ size="small"
|
|
70
|
+ icon="el-icon-edit-outline"
|
|
71
|
+ @click="Print(scope.row, scope.$index)"
|
|
72
|
+ >
|
|
73
|
+ </el-button>
|
|
74
|
+ </el-tooltip>
|
|
75
|
+ </template>
|
|
76
|
+ </el-table-column>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+ </el-table>
|
|
80
|
+ <el-pagination
|
|
81
|
+ @size-change="handleSizeChange"
|
|
82
|
+ @current-change="handleCurrentChange"
|
|
83
|
+ :page-sizes="[10, 50, 100]"
|
|
84
|
+ :page-size="10"
|
|
85
|
+ background
|
|
86
|
+ style="margin-top:20px;float: right"
|
|
87
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
88
|
+ :total="total"
|
|
89
|
+ >
|
|
90
|
+ </el-pagination>
|
|
91
|
+ </div>
|
|
92
|
+
|
|
93
|
+ <el-dialog title="打印" :visible.sync="labelVisible">
|
|
94
|
+ <div>
|
|
95
|
+ <el-row style="float:right;">
|
|
96
|
+ <el-col :span="24">
|
|
97
|
+ <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印
|
|
98
|
+ </el-button>
|
|
99
|
+ </el-col>
|
|
100
|
+ </el-row>
|
|
101
|
+ <div id="sign" class="signPrint">
|
|
102
|
+ <div style="display:flex;margin-bottom:10px;">
|
|
103
|
+ <div style="margin-left:15px;">
|
|
104
|
+ <div style="font-weight:bold;font-size:24px;">C</div>
|
|
105
|
+ <div>{{getTime(current_ctime,'{m}-{d}')}}</div>
|
|
106
|
+ <div>{{getTime(current_ctime,'{h}:{i}')}}</div>
|
|
107
|
+ </div>
|
|
108
|
+ <img style="width:300px;height:80px;margin-left:10px;" id="barcode">
|
|
109
|
+ </div>
|
|
110
|
+ <div style="margin-bottom:5px;">{{current_number}}</div>
|
|
111
|
+ <div style="display:flex;">
|
|
112
|
+ <div style="padding-left:20px;">{{current_project_name}}</div>
|
|
113
|
+ <div style="font-size:24px;margin-left:20px;">{{current_name}}</div>
|
|
114
|
+ </div>
|
|
115
|
+ </div>
|
|
116
|
+ </div>
|
|
117
|
+ <div slot="footer" class="dialog-footer">
|
|
118
|
+ <el-button @click="labelVisible = false">取 消</el-button>
|
|
119
|
+ <el-button type="primary" @click="labelVisible = false">确 定</el-button>
|
|
120
|
+ </div>
|
|
121
|
+ </el-dialog>
|
|
122
|
+ </div>
|
|
123
|
+
|
|
124
|
+</template>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+<script>
|
|
128
|
+ import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
129
|
+ import { GetLabelList } from '@/api/his/his'
|
|
130
|
+ import { uParseTime } from '@/utils/tools'
|
|
131
|
+ import SignPrint from '../dialysis/signPrint'
|
|
132
|
+ import JsBarcode from 'jsbarcode'
|
|
133
|
+
|
|
134
|
+ // import NewStatementPrint from './newStatementPrint'
|
|
135
|
+ const moment = require('moment')
|
|
136
|
+ export default {
|
|
137
|
+ components: {
|
|
138
|
+ SignPrint,
|
|
139
|
+ BreadCrumb
|
|
140
|
+
|
|
141
|
+ },
|
|
142
|
+ data() {
|
|
143
|
+ return {
|
|
144
|
+ current_ctime: 0,
|
|
145
|
+ current_number: '',
|
|
146
|
+ current_project_name: '',
|
|
147
|
+ current_name: '',
|
|
148
|
+
|
|
149
|
+ labelVisible: false,
|
|
150
|
+ crumbs: [
|
|
151
|
+ { path: false, name: 'HIS工具' },
|
|
152
|
+ { path: false, name: '标签打印' }
|
|
153
|
+ ],
|
|
154
|
+ detail_loading: false,
|
|
155
|
+ tempArr: [],
|
|
156
|
+ pos: 0,
|
|
157
|
+ page: 1,
|
|
158
|
+ limit: 10,
|
|
159
|
+ total: 0,
|
|
160
|
+ current_id: 0,
|
|
161
|
+ sameRowArr: [],
|
|
162
|
+ keywords: '',
|
|
163
|
+ tableData: [],
|
|
164
|
+ chargeDate: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
|
|
165
|
+ item_type: '0',
|
|
166
|
+ items: [
|
|
167
|
+ { id: 1, name: '已打印' },
|
|
168
|
+ { id: 2, name: '未打印' }
|
|
169
|
+ ]
|
|
170
|
+
|
|
171
|
+ }
|
|
172
|
+ },
|
|
173
|
+ methods: {
|
|
174
|
+ printAction: function() {
|
|
175
|
+ const style = '@media print { .sign{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
|
|
176
|
+ printJS({
|
|
177
|
+ printable: 'sign',
|
|
178
|
+ type: 'html',
|
|
179
|
+ documentTitle: ' ',
|
|
180
|
+ style: style,
|
|
181
|
+ scanStyles: false
|
|
182
|
+ })
|
|
183
|
+ },
|
|
184
|
+ getTime(value, temp) {
|
|
185
|
+ if (value != undefined) {
|
|
186
|
+ return uParseTime(value, temp)
|
|
187
|
+ }
|
|
188
|
+ return ''
|
|
189
|
+ },
|
|
190
|
+ Print(row, index) {
|
|
191
|
+ this.labelVisible = true
|
|
192
|
+ this.current_ctime = row.ctime
|
|
193
|
+ this.current_number = row.number
|
|
194
|
+ this.current_project_name = row.project_name
|
|
195
|
+ this.current_name = row.patient_name
|
|
196
|
+
|
|
197
|
+ this.$nextTick(() => {
|
|
198
|
+ JsBarcode('#barcode', 'DY2020080400088', {
|
|
199
|
+ format: 'CODE39',
|
|
200
|
+ lineColor: '#000',
|
|
201
|
+ background: '#EBEEF5',
|
|
202
|
+ width: 2,
|
|
203
|
+ height: 100,
|
|
204
|
+ displayValue: false
|
|
205
|
+ })
|
|
206
|
+
|
|
207
|
+ });
|
|
208
|
+
|
|
209
|
+ },
|
|
210
|
+ handleCurrentChange(page) {
|
|
211
|
+ this.page = page
|
|
212
|
+ this.getList()
|
|
213
|
+
|
|
214
|
+ },
|
|
215
|
+
|
|
216
|
+ handleSizeChange(limit) {
|
|
217
|
+ this.limit = limit
|
|
218
|
+ this.getList()
|
|
219
|
+
|
|
220
|
+ },
|
|
221
|
+
|
|
222
|
+ changeDate() {
|
|
223
|
+ this.page = 1
|
|
224
|
+ this.limit = 10
|
|
225
|
+ this.getList()
|
|
226
|
+ },
|
|
227
|
+ changeItem() {
|
|
228
|
+ this.page = 1
|
|
229
|
+ this.limit = 10
|
|
230
|
+ this.getList()
|
|
231
|
+ },
|
|
232
|
+ searchAction() {
|
|
233
|
+ this.page = 1
|
|
234
|
+ this.limit = 10
|
|
235
|
+ this.getList()
|
|
236
|
+ },
|
|
237
|
+ getList() {
|
|
238
|
+ let params = {
|
|
239
|
+ record_date: this.chargeDate,
|
|
240
|
+ is_print: this.item_type,
|
|
241
|
+ keyword: this.keywords,
|
|
242
|
+ page: this.page,
|
|
243
|
+ limit: this.limit
|
|
244
|
+ }
|
|
245
|
+ GetLabelList(params).then(response => {
|
|
246
|
+ if (response.data.state == 0) {
|
|
247
|
+
|
|
248
|
+ this.$message.error(response.data.msg)
|
|
249
|
+ return false
|
|
250
|
+ } else {
|
|
251
|
+
|
|
252
|
+ this.tableData = response.data.data.labels
|
|
253
|
+ this.total = response.data.data.total
|
|
254
|
+
|
|
255
|
+ }
|
|
256
|
+
|
|
257
|
+ })
|
|
258
|
+ }
|
|
259
|
+ },
|
|
260
|
+ created() {
|
|
261
|
+ this.getList()
|
|
262
|
+
|
|
263
|
+ }, mounted() {
|
|
264
|
+
|
|
265
|
+ }
|
|
266
|
+ }
|
|
267
|
+</script>
|