|
@@ -23,6 +23,8 @@
|
23
|
23
|
<el-date-picker
|
24
|
24
|
@change="changeTime"
|
25
|
25
|
v-model="value1"
|
|
26
|
+ format="yyyy-MM-dd"
|
|
27
|
+ value-format="yyyy-MM-dd"
|
26
|
28
|
type="daterange"
|
27
|
29
|
range-separator="至"
|
28
|
30
|
start-placeholder="开始日期"
|
|
@@ -40,23 +42,43 @@
|
40
|
42
|
</el-option>
|
41
|
43
|
</el-select>
|
42
|
44
|
</div>
|
43
|
|
- <div><el-button type="primary">查询</el-button></div>
|
|
45
|
+ <div><el-button type="primary" @click="getQuery">查询</el-button></div>
|
44
|
46
|
</div>
|
45
|
47
|
<div style="margin:10px 0;">
|
46
|
48
|
<el-table border :data="tableData" style="width: 100%" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}">
|
47
|
49
|
<el-table-column prop="index" label="序号" width="">
|
|
50
|
+ <template slot-scope="scope">
|
|
51
|
+ {{ scope.$index+1 }}
|
|
52
|
+ </template>
|
48
|
53
|
</el-table-column>
|
49
|
54
|
<el-table-column prop="name" label="患者姓名" width="">
|
|
55
|
+ <template slot-scope="scope">
|
|
56
|
+ {{getPatientName(scope.row.patient_id)}}
|
|
57
|
+ </template>
|
50
|
58
|
</el-table-column>
|
51
|
59
|
<el-table-column prop="HD" label="费用类别">
|
|
60
|
+ <template slot-scope="scope">
|
|
61
|
+ <span v-if="scope.row.is_type ==1">充值</span>
|
|
62
|
+ <span v-if="scope.row.is_type ==2">扣费</span>
|
|
63
|
+ </template>
|
52
|
64
|
</el-table-column>
|
53
|
65
|
<el-table-column prop="HDF" label="透析模式">
|
|
66
|
+ <template slot-scope="scope">
|
|
67
|
+ <span v-if="scope.row.mode_id ==1">HD</span>
|
|
68
|
+ <span v-if="scope.row.mode_id ==2">HDF</span>
|
|
69
|
+ <span v-if="scope.row.mode_id ==3">HD+HP</span>
|
|
70
|
+ <span v-if="scope.row.mode_id ==4">HDF</span>
|
|
71
|
+ <span v-if="scope.row.mode_id ==5">其他</span>
|
|
72
|
+ </template>
|
54
|
73
|
</el-table-column>
|
55
|
74
|
<el-table-column prop="HD+HP" label="总次数">
|
|
75
|
+ <template slot-scope="scope">
|
|
76
|
+ {{getModeCount(scope.row.patient_id,scope.row.mode_id,scope.row.is_type) }}
|
|
77
|
+ </template>
|
56
|
78
|
</el-table-column>
|
57
|
79
|
<el-table-column prop="address" label="操作" width="300">
|
58
|
80
|
<template slot-scope="scope">
|
59
|
|
- <el-button type="primary" @click="mingx_click(scope.row)" >详情</el-button>
|
|
81
|
+ <el-button type="primary" @click="mingx_click(scope.row.patient_id,scope.row.mode_id,scope.row.is_type)" >详情</el-button>
|
60
|
82
|
</template>
|
61
|
83
|
</el-table-column>
|
62
|
84
|
</el-table>
|
|
@@ -66,10 +88,10 @@
|
66
|
88
|
@size-change="handleSizeChange"
|
67
|
89
|
@current-change="handleCurrentChange"
|
68
|
90
|
:current-page="currentPage"
|
69
|
|
- :page-sizes="[100, 200, 300, 400]"
|
70
|
|
- :page-size="100"
|
|
91
|
+ :page-sizes="[10, 20, 30, 40,100]"
|
|
92
|
+ :page-size="10"
|
71
|
93
|
layout="total, sizes, prev, pager, next, jumper"
|
72
|
|
- :total="400">
|
|
94
|
+ :total="total">
|
73
|
95
|
</el-pagination>
|
74
|
96
|
</div>
|
75
|
97
|
</div>
|
|
@@ -84,15 +106,24 @@
|
84
|
106
|
<div>
|
85
|
107
|
<el-autocomplete
|
86
|
108
|
class="inline-input"
|
87
|
|
- v-model="state1"
|
|
109
|
+ v-model.trim="smart_keyword"
|
88
|
110
|
:fetch-suggestions="querySearch"
|
89
|
111
|
placeholder="请输入内容"
|
90
|
112
|
@select="handleSelect"
|
91
|
|
- ></el-autocomplete>
|
|
113
|
+
|
|
114
|
+ >
|
|
115
|
+ <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
|
116
|
+ <template slot-scope="{ item }">
|
|
117
|
+ <div class="name">{{ item.name }}</div>
|
|
118
|
+ </template>
|
|
119
|
+ </el-autocomplete>
|
92
|
120
|
</div>
|
93
|
121
|
<div>
|
94
|
122
|
日期查询:
|
95
|
123
|
<el-date-picker
|
|
124
|
+ @change="changeTimeOne"
|
|
125
|
+ format="yyyy-MM-dd"
|
|
126
|
+ value-format="yyyy-MM-dd"
|
96
|
127
|
v-model="value1"
|
97
|
128
|
type="daterange"
|
98
|
129
|
range-separator="至"
|
|
@@ -103,7 +134,7 @@
|
103
|
134
|
</div>
|
104
|
135
|
<div>
|
105
|
136
|
费用类型:
|
106
|
|
- <el-select v-model="value" placeholder="请选择" style="width: 100px;">
|
|
137
|
+ <el-select v-model="is_type" placeholder="请选择" style="width: 100px;">
|
107
|
138
|
<el-option
|
108
|
139
|
v-for="item in options"
|
109
|
140
|
:key="item.value"
|
|
@@ -114,34 +145,63 @@
|
114
|
145
|
</div>
|
115
|
146
|
<div>
|
116
|
147
|
透析模式:
|
117
|
|
- <el-select v-model="value" placeholder="请选择" style="width: 100px;">
|
|
148
|
+ <el-select v-model="mode_id" placeholder="请选择" style="width: 100px;">
|
118
|
149
|
<el-option
|
119
|
|
- v-for="item in options"
|
120
|
|
- :key="item.value"
|
121
|
|
- :label="item.label"
|
122
|
|
- :value="item.value">
|
|
150
|
+ v-for="item in mode_options"
|
|
151
|
+ :key="item.mode_id"
|
|
152
|
+ :label="item.mode_name"
|
|
153
|
+ :value="item.mode_id">
|
123
|
154
|
</el-option>
|
124
|
155
|
</el-select>
|
125
|
156
|
</div>
|
126
|
|
- <div><el-button type="primary">查询</el-button></div>
|
|
157
|
+ <div><el-button type="primary" @click="queryCount">查询</el-button></div>
|
127
|
158
|
</div>
|
128
|
159
|
<div style="margin: 10px 0;">
|
129
|
|
- <el-table border :data="tableData" style="width: 100%" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}">
|
|
160
|
+ <el-table border :data="tableList" style="width: 100%" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}">
|
130
|
161
|
<el-table-column prop="index" label="序号" width="">
|
|
162
|
+ <template slot-scope="scope">
|
|
163
|
+ {{ scope.$index+1 }}
|
|
164
|
+ </template>
|
131
|
165
|
</el-table-column>
|
132
|
166
|
<el-table-column prop="name" label="患者姓名" width="">
|
|
167
|
+ <template slot-scope="scope">
|
|
168
|
+ {{getPatientName(scope.row.patient_id)}}
|
|
169
|
+ </template>
|
133
|
170
|
</el-table-column>
|
134
|
171
|
<el-table-column prop="HD" label="费用发生时间">
|
|
172
|
+ <template slot-scope="scope">
|
|
173
|
+ {{ getTime(scope.row.record_date) }}
|
|
174
|
+ </template>
|
135
|
175
|
</el-table-column>
|
136
|
176
|
<el-table-column prop="HD" label="费用类别">
|
|
177
|
+ <template slot-scope="scope">
|
|
178
|
+ <span v-if="scope.row.is_type==1">充值</span>
|
|
179
|
+ <span v-if="scope.row.is_type==2">扣费</span>
|
|
180
|
+ </template>
|
137
|
181
|
</el-table-column>
|
138
|
182
|
<el-table-column prop="HDF" label="透析类型">
|
|
183
|
+ <template slot-scope="scope">
|
|
184
|
+ <span v-if="scope.row.mode_id==1">HD</span>
|
|
185
|
+ <span v-if="scope.row.mode_id==2">HDF</span>
|
|
186
|
+ <span v-if="scope.row.mode_id==3">HD+HP</span>
|
|
187
|
+ <span v-if="scope.row.mode_id==4">HP</span>
|
|
188
|
+ <span v-if="scope.row.mode_id==5">其他</span>
|
|
189
|
+ </template>
|
139
|
190
|
</el-table-column>
|
140
|
191
|
<el-table-column prop="HD+HP" label="费用次数">
|
|
192
|
+ <template slot-scope="scope">
|
|
193
|
+ {{ scope.row.count }}
|
|
194
|
+ </template>
|
141
|
195
|
</el-table-column>
|
142
|
196
|
<el-table-column prop="address" label="创建人">
|
|
197
|
+ <template slot-scope="scope">
|
|
198
|
+ {{ getAdminUser(scope.row.creater) }}
|
|
199
|
+ </template>
|
143
|
200
|
</el-table-column>
|
144
|
201
|
<el-table-column prop="address" label="备注">
|
|
202
|
+ <template slot-scope="scope">
|
|
203
|
+ {{ scope.row.remark }}
|
|
204
|
+ </template>
|
145
|
205
|
</el-table-column>
|
146
|
206
|
</el-table>
|
147
|
207
|
</div>
|
|
@@ -150,7 +210,8 @@
|
150
|
210
|
</div>
|
151
|
211
|
</template>
|
152
|
212
|
<script>
|
153
|
|
-import {getPatientMapList,getPatientCountFlowList} from "@/api/patient"
|
|
213
|
+import {getPatientMapList,getPatientCountFlowList,getPatientCountFlowById} from "@/api/patient"
|
|
214
|
+import {uParseTime } from "@/utils/tools";
|
154
|
215
|
export default{
|
155
|
216
|
data(){
|
156
|
217
|
return{
|
|
@@ -170,9 +231,56 @@ import {getPatientMapList,getPatientCountFlowList} from "@/api/patient"
|
170
|
231
|
page:1,
|
171
|
232
|
is_type:0,
|
172
|
233
|
total:0,
|
|
234
|
+ patientList:[],
|
|
235
|
+ userList:[],
|
|
236
|
+ flowList:[],
|
|
237
|
+ start_time:"",
|
|
238
|
+ end_time:"",
|
|
239
|
+ tableList:[],
|
|
240
|
+ patient:{},
|
|
241
|
+ mode_id:0,
|
|
242
|
+ mode_options:[
|
|
243
|
+ {mode_id:0,mode_name:"全部"},
|
|
244
|
+ {mode_id:1,mode_name:"HD"},
|
|
245
|
+ {mode_id:2,mode_name:"HDF"},
|
|
246
|
+ {mode_id:3,mode_name:"HD+HP"},
|
|
247
|
+ {mode_id:4,mode_name:"HP"},
|
|
248
|
+ {mode_id:5,mode_name:"其他"}
|
|
249
|
+ ],
|
173
|
250
|
}
|
174
|
251
|
},
|
175
|
252
|
methods:{
|
|
253
|
+ getTime(val) {
|
|
254
|
+ if(val < 0){
|
|
255
|
+ return ""
|
|
256
|
+ }
|
|
257
|
+ if(val == ""){
|
|
258
|
+ return ""
|
|
259
|
+ }else {
|
|
260
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
261
|
+ }
|
|
262
|
+ },
|
|
263
|
+ querySearch(queryString, cb){
|
|
264
|
+ let key = ''
|
|
265
|
+ if (queryString != undefined) {
|
|
266
|
+ key = queryString
|
|
267
|
+ }
|
|
268
|
+ let searchArray = []
|
|
269
|
+ var params = {
|
|
270
|
+ keyword:key
|
|
271
|
+ }
|
|
272
|
+ getPatientMapList(params).then(response => {
|
|
273
|
+ if (response.data.state == 1) {
|
|
274
|
+ searchArray = response.data.data.patient
|
|
275
|
+
|
|
276
|
+ cb(searchArray)
|
|
277
|
+ } else {
|
|
278
|
+ this.$message.error(response.data.msg)
|
|
279
|
+ cb([])
|
|
280
|
+ }
|
|
281
|
+ })
|
|
282
|
+ return searchArray
|
|
283
|
+ },
|
176
|
284
|
handleSelect(val){
|
177
|
285
|
this.smart_keyword = val.name;
|
178
|
286
|
this.patient_id = val.id
|
|
@@ -202,20 +310,38 @@ import {getPatientMapList,getPatientCountFlowList} from "@/api/patient"
|
202
|
310
|
this.end_time = val[1]
|
203
|
311
|
this.getlist()
|
204
|
312
|
},
|
205
|
|
- mingx_click(){
|
206
|
|
- this.collect_show = true
|
207
|
|
- },
|
208
|
|
- querySearch(){
|
209
|
|
-
|
210
|
|
- },
|
211
|
|
- handleSelect(){
|
212
|
|
-
|
|
313
|
+ changeTimeOne(){
|
|
314
|
+ this.start_time = val[0]
|
|
315
|
+ this.end_time = val[1]
|
|
316
|
+ },
|
|
317
|
+ mingx_click(patient_id,mode_id,is_type){
|
|
318
|
+ var params = {
|
|
319
|
+ patient_id:patient_id,
|
|
320
|
+ mode_id:mode_id,
|
|
321
|
+ is_type:is_type,
|
|
322
|
+ start_time:this.start_time,
|
|
323
|
+ end_time:this.end_time,
|
|
324
|
+ }
|
|
325
|
+ getPatientCountFlowById(params).then(response=>{
|
|
326
|
+ if(response.data.state == 1){
|
|
327
|
+ this.collect_show = true
|
|
328
|
+ var tableList = response.data.data.list
|
|
329
|
+ this.tableList = []
|
|
330
|
+ this.tableList = tableList
|
|
331
|
+ this.patient = response.data.data.patient
|
|
332
|
+ this.userList = []
|
|
333
|
+ this.userList = response.data.data.userList
|
|
334
|
+ }
|
|
335
|
+ })
|
|
336
|
+
|
213
|
337
|
},
|
214
|
|
- handleSizeChange(){
|
215
|
|
-
|
|
338
|
+ handleSizeChange(limit){
|
|
339
|
+ this.limit = limit;
|
|
340
|
+ this.getlist();
|
216
|
341
|
},
|
217
|
|
- handleCurrentChange(){
|
218
|
|
-
|
|
342
|
+ handleCurrentChange(page){
|
|
343
|
+ this.page = page;
|
|
344
|
+ this.getlist();
|
219
|
345
|
},
|
220
|
346
|
getlist(){
|
221
|
347
|
var params = {
|
|
@@ -229,12 +355,77 @@ import {getPatientMapList,getPatientCountFlowList} from "@/api/patient"
|
229
|
355
|
getPatientCountFlowList(params).then(response=>{
|
230
|
356
|
if(response.data.state == 1){
|
231
|
357
|
var list = response.data.data.list
|
|
358
|
+ console.log("list==============",list)
|
232
|
359
|
this.tableData =[]
|
233
|
360
|
this.tableData = list
|
234
|
361
|
var total = response.data.data.total
|
235
|
|
-
|
236
|
362
|
this.total = total
|
|
363
|
+ var patientList = response.data.data.patient
|
|
364
|
+ console.log("patient=============",patientList)
|
|
365
|
+ this.patientList = []
|
|
366
|
+ this.patientList = patientList
|
|
367
|
+ var userList = response.data.data.userList
|
|
368
|
+ this.userList = userList
|
|
369
|
+ this.flowList = response.data.data.flowList
|
|
370
|
+ }
|
|
371
|
+ })
|
|
372
|
+ },
|
|
373
|
+ getPatientName(id){
|
|
374
|
+ var name = ""
|
|
375
|
+ for(let i=0;i<this.patientList.length;i++){
|
|
376
|
+ if(id == this.patientList[i].id){
|
|
377
|
+ name = this.patientList[i].name
|
|
378
|
+ }
|
|
379
|
+ }
|
|
380
|
+ return name
|
|
381
|
+ },
|
|
382
|
+ getModeCount(patient_id,mode_id,is_type){
|
|
383
|
+ var count = 0
|
|
384
|
+ var newArr= []
|
|
385
|
+ for(let i=0;i<this.flowList.length;i++){
|
|
386
|
+ if(patient_id == this.flowList[i].patient_id && mode_id == this.flowList[i].mode_id && is_type == this.flowList[i].is_type){
|
|
387
|
+ newArr.push(this.flowList[i])
|
|
388
|
+ }
|
|
389
|
+ }
|
|
390
|
+
|
|
391
|
+ for(let i=0;i<newArr.length;i++){
|
|
392
|
+ count+=newArr[i].count
|
|
393
|
+ }
|
|
394
|
+ if(count>0){
|
|
395
|
+ return count
|
|
396
|
+ }else{
|
|
397
|
+ return ""
|
|
398
|
+ }
|
|
399
|
+ },
|
|
400
|
+ queryCount(){
|
|
401
|
+ this.getlist()
|
|
402
|
+ },
|
|
403
|
+ getAdminUser(creater){
|
|
404
|
+ var user_name = ""
|
|
405
|
+ for(let i=0;i<this.userList.length;i++){
|
|
406
|
+ if(creater == this.userList[i].id){
|
|
407
|
+ user_name = this.userList[i].name
|
|
408
|
+ }
|
|
409
|
+ }
|
|
410
|
+ return user_name
|
|
411
|
+ },
|
|
412
|
+ getQuery(){
|
|
413
|
+ var params = {
|
|
414
|
+ patient_id:this.patient_id,
|
|
415
|
+ mode_id:this.mode_id,
|
|
416
|
+ is_type:this.is_type,
|
|
417
|
+ start_time:this.start_time,
|
|
418
|
+ end_time:this.end_time,
|
237
|
419
|
}
|
|
420
|
+ getPatientCountFlowById(params).then(response=>{
|
|
421
|
+ if(response.data.state == 1){
|
|
422
|
+ var tableList = response.data.data.list
|
|
423
|
+ this.tableList = []
|
|
424
|
+ this.tableList = tableList
|
|
425
|
+ this.patient = response.data.data.patient
|
|
426
|
+ this.userList = []
|
|
427
|
+ this.userList = response.data.data.userList
|
|
428
|
+ }
|
238
|
429
|
})
|
239
|
430
|
}
|
240
|
431
|
},
|