|
@@ -33,7 +33,7 @@
|
33
|
33
|
value-format="yyyy-MM-dd"
|
34
|
34
|
range-separator="至"
|
35
|
35
|
start-placeholder="开始日期"
|
36
|
|
- @change="changeDate"
|
|
36
|
+ @change="handleDateChangetwo"
|
37
|
37
|
end-placeholder="结束日期">
|
38
|
38
|
</el-date-picker>
|
39
|
39
|
<!--<el-radio v-model="radio" label="1">明细</el-radio>-->
|
|
@@ -115,6 +115,19 @@ export default {
|
115
|
115
|
},
|
116
|
116
|
data() {
|
117
|
117
|
return {
|
|
118
|
+ pickerOptions: {
|
|
119
|
+ disabledDate(time) {
|
|
120
|
+ // 获取当前日期
|
|
121
|
+ const now = new Date();
|
|
122
|
+
|
|
123
|
+ // 设置一个月后的日期
|
|
124
|
+ const oneMonthLater = new Date();
|
|
125
|
+ oneMonthLater.setMonth(oneMonthLater.getMonth() + 1);
|
|
126
|
+
|
|
127
|
+ // 如果当前日期在一个月后之后,则禁用
|
|
128
|
+ return time.getTime() > oneMonthLater.getTime() || time.getTime() < now.getTime();
|
|
129
|
+ },
|
|
130
|
+ },
|
118
|
131
|
detail_loading: false,
|
119
|
132
|
tempArr: [],
|
120
|
133
|
pos: 0,
|
|
@@ -134,6 +147,51 @@ export default {
|
134
|
147
|
}
|
135
|
148
|
},
|
136
|
149
|
methods: {
|
|
150
|
+ handleDateChangetwo(value) {
|
|
151
|
+ this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
|
|
152
|
+ confirmButtonText: '确 定',
|
|
153
|
+ cancelButtonText: '取 消',
|
|
154
|
+ type: 'warning'
|
|
155
|
+ }).then(() => {
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+ }).catch(() => {
|
|
159
|
+ })
|
|
160
|
+
|
|
161
|
+ // let start_time = this.chargeDate[0]
|
|
162
|
+ // let end_time = this.chargeDate[1]
|
|
163
|
+ // const dateObj1 = new Date(start_time);
|
|
164
|
+ // const dateObj2 = new Date(end_time);
|
|
165
|
+ //
|
|
166
|
+ // // 计算两个日期之间的月份差
|
|
167
|
+ // const monthDifference = (dateObj2.getFullYear() - dateObj1.getFullYear()) * 12 +
|
|
168
|
+ // (dateObj2.getMonth() - dateObj1.getMonth());
|
|
169
|
+ // if (monthDifference >= 1){
|
|
170
|
+ // this.$message.error("时间间隔不能超出一个月")
|
|
171
|
+ // return
|
|
172
|
+ // }else{
|
|
173
|
+ // this.getSummaryDetailList()
|
|
174
|
+ // }
|
|
175
|
+
|
|
176
|
+ },
|
|
177
|
+
|
|
178
|
+ handleDateChange(value) {
|
|
179
|
+ let start_time = this.chargeDate[0]
|
|
180
|
+ let end_time = this.chargeDate[1]
|
|
181
|
+ const dateObj1 = new Date(start_time);
|
|
182
|
+ const dateObj2 = new Date(end_time);
|
|
183
|
+
|
|
184
|
+ // 计算两个日期之间的月份差
|
|
185
|
+ const monthDifference = (dateObj2.getFullYear() - dateObj1.getFullYear()) * 12 +
|
|
186
|
+ (dateObj2.getMonth() - dateObj1.getMonth());
|
|
187
|
+ if (monthDifference >= 1){
|
|
188
|
+ this.$message.error("时间间隔不能超出一个月")
|
|
189
|
+ return
|
|
190
|
+ }else{
|
|
191
|
+ this.getSummaryDetailListtwo()
|
|
192
|
+ }
|
|
193
|
+
|
|
194
|
+ },
|
137
|
195
|
Action(){
|
138
|
196
|
var that = this
|
139
|
197
|
axios.get('http://127.0.0.1:9531/handelExcel', {
|
|
@@ -219,15 +277,106 @@ export default {
|
219
|
277
|
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
|
220
|
278
|
},
|
221
|
279
|
changeDate() {
|
222
|
|
- this.getSummaryDetailList()
|
|
280
|
+ this.getSummaryDetailListtwo()
|
223
|
281
|
},
|
224
|
282
|
changeItem() {
|
225
|
|
- this.getSummaryDetailList()
|
|
283
|
+ this.getSummaryDetailListtwo()
|
226
|
284
|
},
|
227
|
285
|
searchAction() {
|
228
|
286
|
this.item_type = '0'
|
229
|
|
- this.getSummaryDetailList()
|
|
287
|
+ this.getSummaryDetailListtwo()
|
|
288
|
+
|
|
289
|
+ }, getSummaryDetailListtwo() {
|
|
290
|
+ this.detail_loading = true
|
|
291
|
+ let start_time = this.chargeDate[0]
|
|
292
|
+ let end_time = this.chargeDate[1]
|
|
293
|
+ let params = {
|
|
294
|
+ start_time: start_time,
|
|
295
|
+ end_time: end_time,
|
|
296
|
+ type: this.item_type,
|
|
297
|
+ keyword: this.keywords
|
|
298
|
+ }
|
|
299
|
+ GetSummaryDetail(params).then(response => {
|
|
300
|
+ if (response.data.state == 0) {
|
|
301
|
+ this.detail_loading = false
|
|
302
|
+
|
|
303
|
+ this.$message.error(response.data.msg)
|
|
304
|
+ return false
|
|
305
|
+ } else {
|
|
306
|
+ this.detail_loading = false
|
|
307
|
+
|
|
308
|
+ this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
|
|
309
|
+ confirmButtonText: '确 定',
|
|
310
|
+ cancelButtonText: '取 消',
|
|
311
|
+ type: 'warning'
|
|
312
|
+ }).then(() => {
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+ }).catch(() => {
|
|
316
|
+ })
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+ }
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+ //
|
|
325
|
+ // console.log('去重前')
|
|
326
|
+ // console.log(advice)
|
|
327
|
+ // console.log(project)
|
|
328
|
+ // //
|
|
329
|
+ // //
|
|
330
|
+
|
|
331
|
+ // //
|
|
332
|
+ // console.log('去重后')
|
|
333
|
+ //
|
|
334
|
+ // console.log(advice.length)
|
|
335
|
+ // console.log(project.length)
|
|
336
|
+ //
|
|
337
|
+ // for (let i = 0; i < project.length; i++) {
|
|
338
|
+ // let obj = {}
|
|
339
|
+ // let count = 0
|
|
340
|
+ // for (let a = 0; a < tempPatientsTwo.length; a++) {
|
|
341
|
+ // if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
|
|
342
|
+ // count = count + tempPatientsTwo[a].count
|
|
343
|
+ // obj['count'] = count
|
|
344
|
+ //
|
|
345
|
+ // }
|
|
346
|
+ // obj['price'] = project[i].price
|
|
347
|
+ // obj['type'] = project[i].type
|
|
348
|
+ // obj['item_name'] = project[i].item_name
|
|
349
|
+ // obj['item_id'] = project[i].item_id
|
|
350
|
+ // obj['name'] = project[i].name
|
|
351
|
+ // obj['patient_id'] = project[i].patient_id
|
|
352
|
+ // obj['count'] = count
|
|
353
|
+ // this.tableData.push(obj)
|
|
354
|
+ // }
|
|
355
|
+ // }
|
|
356
|
+ //
|
|
357
|
+ //
|
|
358
|
+ // for (let i = 0; i < advice.length; i++) {
|
|
359
|
+ // let obj = {}
|
|
360
|
+ // let count = 0
|
|
361
|
+ // for (let a = 0; a < tempPatientsTwo.length; a++) {
|
|
362
|
+ // if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
|
|
363
|
+ // count = count + tempPatientsTwo[a].count
|
|
364
|
+ // obj['count'] = count
|
|
365
|
+ //
|
|
366
|
+ // }
|
|
367
|
+ // obj['price'] = advice[i].price
|
|
368
|
+ // obj['type'] = advice[i].type
|
|
369
|
+ // obj['item_name'] = advice[i].item_name
|
|
370
|
+ // obj['item_id'] = advice[i].item_id
|
|
371
|
+ // obj['name'] = advice[i].name
|
|
372
|
+ // obj['patient_id'] = advice[i].patient_id
|
|
373
|
+ // this.tableData.push(obj)
|
|
374
|
+ // }
|
|
375
|
+ // }
|
|
376
|
+ // console.log(this.tableData.length)
|
|
377
|
+ // this.tableData = this.sort(this.tableData)
|
230
|
378
|
|
|
379
|
+ })
|
231
|
380
|
},
|
232
|
381
|
getSummaryDetailList() {
|
233
|
382
|
this.detail_loading = true
|
|
@@ -402,7 +551,6 @@ export default {
|
402
|
551
|
}
|
403
|
552
|
tempPatientsTwo[i]['total'] = total
|
404
|
553
|
}
|
405
|
|
- console.log('tempPatientsTwo', tempPatientsTwo)
|
406
|
554
|
for (let i = 0; i < tempPatientsTwo.length; i++) {
|
407
|
555
|
// console.log(111,tempPatientsTwo[i].total)
|
408
|
556
|
if (tempPatientsTwo[i].new_order_info.length > 0) {
|
|
@@ -442,12 +590,10 @@ export default {
|
442
|
590
|
|
443
|
591
|
// console.log(tempPatientsTwo.length)
|
444
|
592
|
//
|
445
|
|
- console.log(order_infos)
|
446
|
593
|
let advices = []
|
447
|
594
|
let projects = []
|
448
|
595
|
let goods = []
|
449
|
596
|
for(let i = 0; i < order_infos.length; i++){
|
450
|
|
- console.log(order_infos[i])
|
451
|
597
|
if(order_infos[i].advice_id > 0 && order_infos[i].project_id == 0){
|
452
|
598
|
advices.push(order_infos[i].advice)
|
453
|
599
|
}
|
|
@@ -463,9 +609,6 @@ export default {
|
463
|
609
|
}
|
464
|
610
|
}
|
465
|
611
|
|
466
|
|
- console.log(advices)
|
467
|
|
- console.log(projects)
|
468
|
|
- console.log(goods)
|
469
|
612
|
|
470
|
613
|
}
|
471
|
614
|
|
|
@@ -642,7 +785,6 @@ export default {
|
642
|
785
|
sums[index] = '合计'
|
643
|
786
|
return
|
644
|
787
|
}
|
645
|
|
- console.log(data)
|
646
|
788
|
const values = data.map(item => Number(item[column.property]))
|
647
|
789
|
if (column.property === 'total') {
|
648
|
790
|
// sums[index] = values.reduce((prev, curr) => {
|
|
@@ -668,7 +810,7 @@ export default {
|
668
|
810
|
}
|
669
|
811
|
},
|
670
|
812
|
created() {
|
671
|
|
- this.getSummaryDetailList()
|
|
813
|
+ this.getSummaryDetailListtwo()
|
672
|
814
|
|
673
|
815
|
}
|
674
|
816
|
}
|