陈少旭 8 月之前
父節點
當前提交
64ba4d6a5d
共有 2 個文件被更改,包括 378 次插入95 次删除
  1. 119 9
      src/xt_pages/fapiao/newSettleDetail.vue
  2. 259 86
      src/xt_pages/fapiao/settleDetail.vue

+ 119 - 9
src/xt_pages/fapiao/newSettleDetail.vue 查看文件

200
 
200
 
201
 import { getDialysisRecordInitData } from '@/api/dialysis_record'
201
 import { getDialysisRecordInitData } from '@/api/dialysis_record'
202
 import { number } from 'echarts/lib/export'
202
 import { number } from 'echarts/lib/export'
203
+import QRCode from 'qrcodejs2'
203
 
204
 
204
 const moment = require('moment')
205
 const moment = require('moment')
205
 export default {
206
 export default {
284
         "id":id,
285
         "id":id,
285
         "admin_user_id":this.$store.getters.xt_user.user.id,
286
         "admin_user_id":this.$store.getters.xt_user.user.id,
286
       }
287
       }
287
-      OpenRedFapiao(params).then((response) => {
288
+      var that = this;
289
+      axios.get('http://127.0.0.1:9532/api/fapiao/red',{params:params}).then(function(response) {
288
         if (response.data.state == 0) {
290
         if (response.data.state == 0) {
289
-          this.$message.error(response.data.msg)
291
+          that.$message.error(response.data.data.msg);
290
           return false
292
           return false
291
         } else {
293
         } else {
292
-          this.$message.success(response.data.msg)
293
-          this.getHisOrderList()
294
+          if(response.data.data.failed_code == -10){
295
+            that.$confirm(response.data.data.msg, '错误信息', {
296
+              confirmButtonText: '确 定',
297
+              type: 'warning'
298
+            }).then(() => {
299
+
300
+            }).catch(() => {
301
+            })
302
+          }else{
303
+            that.$message.success(response.data.msg)
304
+            that.getHisOrderList()
305
+          }
306
+
294
         }
307
         }
308
+      }).catch(function(error) {
295
       })
309
       })
296
     },
310
     },
297
     blue(){
311
     blue(){
298
-      console.log(this.selecting_schs)
299
       var order_ids = ""
312
       var order_ids = ""
300
       for(let i = 0; i < this.selecting_schs.length;i++){
313
       for(let i = 0; i < this.selecting_schs.length;i++){
301
         if(order_ids.length == 0){
314
         if(order_ids.length == 0){
308
         "order_ids":order_ids,
321
         "order_ids":order_ids,
309
         "admin_user_id":this.$store.getters.xt_user.user.id,
322
         "admin_user_id":this.$store.getters.xt_user.user.id,
310
       }
323
       }
311
-      OpenBlueFapiao(params).then((response) => {
324
+      var that = this;
325
+      axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
312
         if (response.data.state == 0) {
326
         if (response.data.state == 0) {
313
-          this.$message.error(response.data.msg)
327
+          that.$message.error(response.data.data.msg);
314
           return false
328
           return false
315
         } else {
329
         } else {
316
-          this.$message.success(response.data.msg)
317
-          this.getHisOrderList()
330
+          if(response.data.data.failed_code == -10){
331
+            that.$confirm(response.data.data.msg, '错误信息', {
332
+              confirmButtonText: '确 定',
333
+              type: 'warning'
334
+            }).then(() => {
335
+
336
+            }).catch(() => {
337
+            })
338
+          }else{
339
+            that.$message.success(response.data.data.msg)
340
+            that.getHisOrderList()
341
+          }
342
+
318
         }
343
         }
344
+      }).catch(function(error) {
319
       })
345
       })
320
     },
346
     },
321
     getData(patient_id){
347
     getData(patient_id){
325
     },
351
     },
326
     auth(){
352
     auth(){
327
 
353
 
354
+      var that = this;
355
+      let params = {
356
+        "admin_user_id":this.$store.getters.xt_user.user.id,
357
+      }
358
+      axios.get('http://127.0.0.1:9532/api/fapiao/qrcode/get',{params:params}).then(function(response) {
359
+        if (response.data.state == 0) {
360
+          that.$message.error(response.data.data.msg);
361
+          return false
362
+        } else {
363
+          if(response.data.data.failed_code == -10){
364
+            that.$confirm(response.data.data.msg, '错误信息', {
365
+              confirmButtonText: '确 定',
366
+              type: 'warning'
367
+            }).then(() => {
368
+
369
+            }).catch(() => {
370
+            })
371
+          }else{
372
+            if(response.data.data.cus_status == 1){
373
+              this.$nextTick(() =>{
374
+                var qrcode = new QRCode(that.$refs.qrCodeUrl, {
375
+                  text: response.data.data.qr_code, // 需要转换为二维码的内容
376
+                  width: 120,
377
+                  height: 120,
378
+                  colorDark: '#000000',
379
+                  colorLight: '#ffffff',
380
+                  correctLevel: QRCode.CorrectLevel.H
381
+                })
382
+              })
383
+              this.qr_dialogVisible =true
384
+            }else if(response.data.data.cus_status == -1){
385
+              // this.$message.error(response.data.msg)/*  */
386
+              that
387
+                .$confirm(response.data.data.msg, '信息', {
388
+                  confirmButtonText: '确 定',
389
+                  type: 'warning'
390
+                })
391
+                .then(() => {
392
+                })
393
+                .catch(() => {
394
+                })
395
+            }else if(response.data.data.cus_status == 2){
396
+              // this.$message.error(response.data.data.msg)
397
+              that
398
+                .$confirm(response.data.data.msg, '信息', {
399
+                  confirmButtonText: '确 定',
400
+                  type: 'warning'
401
+                })
402
+                .then(() => {
403
+                })
404
+                .catch(() => {
405
+                })
406
+
407
+            }else if(response.data.data.cus_status == -3){
408
+              // this.$message.error(response.data.data.msg)
409
+              that
410
+                .$confirm(response.data.data.msg, '信息', {
411
+                  confirmButtonText: '确 定',
412
+                  type: 'warning'
413
+                })
414
+                .then(() => {
415
+                })
416
+                .catch(() => {
417
+                })
418
+
419
+            }else if(response.data.data.cus_status == -4){
420
+              // this.$message.error(response.data.data.msg)
421
+              that
422
+                .$confirm(response.data.data.msg, '信息', {
423
+                  confirmButtonText: '确 定',
424
+                  type: 'warning'
425
+                })
426
+                .then(() => {
427
+                })
428
+                .catch(() => {
429
+                })
430
+            }
431
+
432
+          }
433
+
434
+        }
435
+      }).catch(function(error) {
436
+      })
437
+
328
     },
438
     },
329
     query(){
439
     query(){
330
 
440
 

+ 259 - 86
src/xt_pages/fapiao/settleDetail.vue 查看文件

343
 
343
 
344
   methods: {
344
   methods: {
345
     loginSJ(){
345
     loginSJ(){
346
+      // let params = {
347
+      //   "code":this.formLabelAlign.verify,
348
+      // }
349
+      // SMSLogin(params).then((response) => {
350
+      //   if (response.data.state == 0) {
351
+      //     this.login_dialogVisible = false
352
+      //     this.$message.error(response.data.msg)
353
+      //     return false
354
+      //   } else {
355
+      //     this.login_dialogVisible = false
356
+      //     // this.$message.success(response.data.msg)
357
+      //     // this.$message.success(response.data.data.msg)
358
+      //     this
359
+      //       .$confirm(response.data.data.msg, '信息', {
360
+      //         confirmButtonText: '确 定',
361
+      //         type: 'warning'
362
+      //       })
363
+      //       .then(() => {
364
+      //       })
365
+      //       .catch(() => {
366
+      //       })
367
+      //
368
+      //   }
369
+      // })
370
+
371
+      var that = this;
346
       let params = {
372
       let params = {
347
         "code":this.formLabelAlign.verify,
373
         "code":this.formLabelAlign.verify,
348
       }
374
       }
349
-      SMSLogin(params).then((response) => {
375
+      axios.get('http://127.0.0.1:9532/api/fapiao/sms/login',{params:params}).then(function(response) {
350
         if (response.data.state == 0) {
376
         if (response.data.state == 0) {
351
-          this.login_dialogVisible = false
352
-          this.$message.error(response.data.msg)
377
+          that.$message.error(response.data.data.msg);
353
           return false
378
           return false
354
         } else {
379
         } else {
355
-          this.login_dialogVisible = false
356
-          // this.$message.success(response.data.msg)
357
-          // this.$message.success(response.data.data.msg)
358
-          this
359
-            .$confirm(response.data.data.msg, '信息', {
380
+          if(response.data.data.failed_code == -10){
381
+            that.$confirm(response.data.data.msg, '错误信息', {
360
               confirmButtonText: '确 定',
382
               confirmButtonText: '确 定',
361
               type: 'warning'
383
               type: 'warning'
384
+            }).then(() => {
385
+
386
+            }).catch(() => {
362
             })
387
             })
363
-            .then(() => {
364
-            })
365
-            .catch(() => {
366
-            })
388
+          }else{
389
+            that.login_dialogVisible = false
390
+            // this.$message.success(response.data.msg)
391
+            // this.$message.success(response.data.data.msg)
392
+            that
393
+              .$confirm(response.data.data.msg, '信息', {
394
+                confirmButtonText: '确 定',
395
+                type: 'warning'
396
+              })
397
+              .then(() => {
398
+              })
399
+              .catch(() => {
400
+              })
401
+          }
367
 
402
 
368
         }
403
         }
404
+      }).catch(function(error) {
369
       })
405
       })
406
+
370
     },
407
     },
371
     login(){
408
     login(){
372
       this.login_dialogVisible = true
409
       this.login_dialogVisible = true
373
     },
410
     },
374
     verify_click(){
411
     verify_click(){
412
+      var that = this;
375
       let params = {
413
       let params = {
376
         "admin_user_id":this.$store.getters.xt_user.user.id,
414
         "admin_user_id":this.$store.getters.xt_user.user.id,
377
       }
415
       }
378
-      GetSMSCode(params).then((response) => {
416
+      axios.get('http://127.0.0.1:9532/api/fapiao/sms/code',{params:params}).then(function(response) {
379
         if (response.data.state == 0) {
417
         if (response.data.state == 0) {
380
-          this.$message.error(response.data.msg)
418
+          that.$message.error(response.data.data.msg);
381
           return false
419
           return false
382
         } else {
420
         } else {
383
-          this.$message.success(response.data.data.msg)
421
+          if(response.data.data.failed_code == -10){
422
+            that.$confirm(response.data.data.msg, '错误信息', {
423
+              confirmButtonText: '确 定',
424
+              type: 'warning'
425
+            }).then(() => {
426
+
427
+            }).catch(() => {
428
+            })
429
+          }else{
430
+            that.$message.success(response.data.data.msg)
431
+          }
432
+
384
         }
433
         }
434
+      }).catch(function(error) {
385
       })
435
       })
386
       this.countdown = 60
436
       this.countdown = 60
387
       this.time = setInterval(() => {
437
       this.time = setInterval(() => {
393
       }, 1000)
443
       }, 1000)
394
     },
444
     },
395
     auth(){
445
     auth(){
446
+
447
+      // let params = {
448
+      // }
449
+      // GetQRCode(params).then((response) => {
450
+      //   if (response.data.state == 0) {
451
+      //     this.$message.error(response.data.msg)
452
+      //     return false
453
+      //   } else {
454
+      //     if(response.data.data.cus_status == 1){
455
+      //       this.$nextTick(() =>{
456
+      //         var qrcode = new QRCode(this.$refs.qrCodeUrl, {
457
+      //           text: response.data.data.qr_code, // 需要转换为二维码的内容
458
+      //           width: 120,
459
+      //           height: 120,
460
+      //           colorDark: '#000000',
461
+      //           colorLight: '#ffffff',
462
+      //           correctLevel: QRCode.CorrectLevel.H
463
+      //         })
464
+      //       })
465
+      //       this.qr_dialogVisible =true
466
+      //     }else if(response.data.data.cus_status == -1){
467
+      //       // this.$message.error(response.data.msg)/*  */
468
+      //       this
469
+      //         .$confirm(response.data.data.msg, '信息', {
470
+      //           confirmButtonText: '确 定',
471
+      //           type: 'warning'
472
+      //         })
473
+      //         .then(() => {
474
+      //         })
475
+      //         .catch(() => {
476
+      //         })
477
+      //     }else if(response.data.data.cus_status == 2){
478
+      //       // this.$message.error(response.data.data.msg)
479
+      //       this
480
+      //         .$confirm(response.data.data.msg, '信息', {
481
+      //           confirmButtonText: '确 定',
482
+      //           type: 'warning'
483
+      //         })
484
+      //         .then(() => {
485
+      //         })
486
+      //         .catch(() => {
487
+      //         })
488
+      //
489
+      //     }else if(response.data.data.cus_status == -3){
490
+      //       // this.$message.error(response.data.data.msg)
491
+      //       this
492
+      //         .$confirm(response.data.data.msg, '信息', {
493
+      //           confirmButtonText: '确 定',
494
+      //           type: 'warning'
495
+      //         })
496
+      //         .then(() => {
497
+      //         })
498
+      //         .catch(() => {
499
+      //         })
500
+      //
501
+      //     }else if(response.data.data.cus_status == -4){
502
+      //       // this.$message.error(response.data.data.msg)
503
+      //       this
504
+      //         .$confirm(response.data.data.msg, '信息', {
505
+      //           confirmButtonText: '确 定',
506
+      //           type: 'warning'
507
+      //         })
508
+      //         .then(() => {
509
+      //         })
510
+      //         .catch(() => {
511
+      //         })
512
+      //
513
+      //     }
514
+      //     // this.$message.success(response.data.msg)
515
+      //   }
516
+      // })
517
+
518
+
519
+      var that = this;
396
       let params = {
520
       let params = {
521
+        "admin_user_id":this.$store.getters.xt_user.user.id,
397
       }
522
       }
398
-      GetQRCode(params).then((response) => {
523
+      axios.get('http://127.0.0.1:9532/api/fapiao/qrcode/get',{params:params}).then(function(response) {
399
         if (response.data.state == 0) {
524
         if (response.data.state == 0) {
400
-          this.$message.error(response.data.msg)
525
+          that.$message.error(response.data.data.msg);
401
           return false
526
           return false
402
         } else {
527
         } else {
403
-          if(response.data.data.cus_status == 1){
404
-            this.$nextTick(() =>{
405
-              var qrcode = new QRCode(this.$refs.qrCodeUrl, {
406
-                text: response.data.data.qr_code, // 需要转换为二维码的内容
407
-                width: 120,
408
-                height: 120,
409
-                colorDark: '#000000',
410
-                colorLight: '#ffffff',
411
-                correctLevel: QRCode.CorrectLevel.H
412
-              })
413
-            })
414
-            this.qr_dialogVisible =true
415
-          }else if(response.data.data.cus_status == -1){
416
-            // this.$message.error(response.data.msg)/*  */
417
-            this
418
-              .$confirm(response.data.data.msg, '信息', {
419
-                confirmButtonText: '确 定',
420
-                type: 'warning'
421
-              })
422
-              .then(() => {
423
-              })
424
-              .catch(() => {
425
-              })
426
-          }else if(response.data.data.cus_status == 2){
427
-            // this.$message.error(response.data.data.msg)
428
-            this
429
-              .$confirm(response.data.data.msg, '信息', {
430
-                confirmButtonText: '确 定',
431
-                type: 'warning'
432
-              })
433
-              .then(() => {
434
-              })
435
-              .catch(() => {
436
-              })
437
-
438
-          }else if(response.data.data.cus_status == -3){
439
-            // this.$message.error(response.data.data.msg)
440
-            this
441
-              .$confirm(response.data.data.msg, '信息', {
442
-                confirmButtonText: '确 定',
443
-                type: 'warning'
444
-              })
445
-              .then(() => {
446
-              })
447
-              .catch(() => {
448
-              })
528
+          if(response.data.data.failed_code == -10){
529
+            that.$confirm(response.data.data.msg, '错误信息', {
530
+              confirmButtonText: '确 定',
531
+              type: 'warning'
532
+            }).then(() => {
449
 
533
 
450
-          }else if(response.data.data.cus_status == -4){
451
-            // this.$message.error(response.data.data.msg)
452
-            this
453
-              .$confirm(response.data.data.msg, '信息', {
454
-                confirmButtonText: '确 定',
455
-                type: 'warning'
456
-              })
457
-              .then(() => {
458
-              })
459
-              .catch(() => {
534
+            }).catch(() => {
535
+            })
536
+          }else{
537
+            if(response.data.data.cus_status == 1){
538
+              this.$nextTick(() =>{
539
+                var qrcode = new QRCode(that.$refs.qrCodeUrl, {
540
+                  text: response.data.data.qr_code, // 需要转换为二维码的内容
541
+                  width: 120,
542
+                  height: 120,
543
+                  colorDark: '#000000',
544
+                  colorLight: '#ffffff',
545
+                  correctLevel: QRCode.CorrectLevel.H
546
+                })
460
               })
547
               })
548
+              this.qr_dialogVisible =true
549
+            }else if(response.data.data.cus_status == -1){
550
+              // this.$message.error(response.data.msg)/*  */
551
+              that
552
+                .$confirm(response.data.data.msg, '信息', {
553
+                  confirmButtonText: '确 定',
554
+                  type: 'warning'
555
+                })
556
+                .then(() => {
557
+                })
558
+                .catch(() => {
559
+                })
560
+            }else if(response.data.data.cus_status == 2){
561
+              // this.$message.error(response.data.data.msg)
562
+              that
563
+                .$confirm(response.data.data.msg, '信息', {
564
+                  confirmButtonText: '确 定',
565
+                  type: 'warning'
566
+                })
567
+                .then(() => {
568
+                })
569
+                .catch(() => {
570
+                })
571
+
572
+            }else if(response.data.data.cus_status == -3){
573
+              // this.$message.error(response.data.data.msg)
574
+              that
575
+                .$confirm(response.data.data.msg, '信息', {
576
+                  confirmButtonText: '确 定',
577
+                  type: 'warning'
578
+                })
579
+                .then(() => {
580
+                })
581
+                .catch(() => {
582
+                })
583
+
584
+            }else if(response.data.data.cus_status == -4){
585
+              // this.$message.error(response.data.data.msg)
586
+              that
587
+                .$confirm(response.data.data.msg, '信息', {
588
+                  confirmButtonText: '确 定',
589
+                  type: 'warning'
590
+                })
591
+                .then(() => {
592
+                })
593
+                .catch(() => {
594
+                })
595
+            }
461
 
596
 
462
           }
597
           }
463
-          // this.$message.success(response.data.msg)
598
+
464
         }
599
         }
600
+      }).catch(function(error) {
465
       })
601
       })
466
 
602
 
467
-
468
-
469
-
470
-
471
     },
603
     },
472
     query(){
604
     query(){
473
       this.getHisOrderList()
605
       this.getHisOrderList()
481
         "order_ids":ids,
613
         "order_ids":ids,
482
         "admin_user_id":this.$store.getters.xt_user.user.id,
614
         "admin_user_id":this.$store.getters.xt_user.user.id,
483
       }
615
       }
484
-      OpenBlueFapiao(params).then((response) => {
616
+
617
+      var that = this;
618
+      axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
485
         if (response.data.state == 0) {
619
         if (response.data.state == 0) {
486
-          this.$message.error(response.data.msg)
620
+          that.$message.error(response.data.data.msg);
487
           return false
621
           return false
488
         } else {
622
         } else {
489
-          this.$message.success(response.data.msg)
490
-          this.getHisOrderList()
623
+          if(response.data.data.failed_code == -10){
624
+            that.$confirm(response.data.data.msg, '错误信息', {
625
+              confirmButtonText: '确 定',
626
+              type: 'warning'
627
+            }).then(() => {
628
+
629
+            }).catch(() => {
630
+            })
631
+          }else{
632
+            that.$message.success(response.data.data.msg)
633
+            that.getHisOrderList()
634
+          }
635
+
491
         }
636
         }
637
+      }).catch(function(error) {
492
       })
638
       })
639
+      // OpenBlueFapiao(params).then((response) => {
640
+      //   if (response.data.state == 0) {
641
+      //     this.$message.error(response.data.msg)
642
+      //     return false
643
+      //   } else {
644
+      //     this.$message.success(response.data.msg)
645
+      //     this.getHisOrderList()
646
+      //   }
647
+      // })
648
+
649
+
493
     }, yulan(row){
650
     }, yulan(row){
494
 
651
 
495
 
652
 
496
 
653
 
497
     },hongchong(row){
654
     },hongchong(row){
498
       var  id = row.result.id
655
       var  id = row.result.id
656
+
499
       let params = {
657
       let params = {
500
         "id":id,
658
         "id":id,
501
         "admin_user_id":this.$store.getters.xt_user.user.id,
659
         "admin_user_id":this.$store.getters.xt_user.user.id,
502
       }
660
       }
503
-      OpenRedFapiao(params).then((response) => {
661
+
662
+      var that = this;
663
+      axios.get('http://127.0.0.1:9532/api/fapiao/red',{params:params}).then(function(response) {
504
         if (response.data.state == 0) {
664
         if (response.data.state == 0) {
505
-          this.$message.error(response.data.msg)
665
+          that.$message.error(response.data.data.msg);
506
           return false
666
           return false
507
         } else {
667
         } else {
508
-          this.$message.success(response.data.msg)
509
-          this.getHisOrderList()
668
+          if(response.data.data.failed_code == -10){
669
+            that.$confirm(response.data.data.msg, '错误信息', {
670
+              confirmButtonText: '确 定',
671
+              type: 'warning'
672
+            }).then(() => {
673
+
674
+            }).catch(() => {
675
+            })
676
+          }else{
677
+            that.$message.success(response.data.msg)
678
+            that.getHisOrderList()
679
+          }
680
+
510
         }
681
         }
682
+      }).catch(function(error) {
511
       })
683
       })
684
+
512
     },
685
     },
513
     getAllstaff(){
686
     getAllstaff(){
514
       adminMainView()
687
       adminMainView()