Parcourir la source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx il y a 3 ans
Parent
révision
6e06436260

+ 48 - 30
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Voir le fichier

@@ -1898,7 +1898,7 @@
1898 1898
             for (let i = 0; i < this.all_table_data.length; i++) {
1899 1899
               let isHasUnCharge = false
1900 1900
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
1901
-                if (this.all_table_data[i].order_status != 2) {
1901
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
1902 1902
                   isHasUnCharge = true
1903 1903
                 } else {
1904 1904
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -1909,7 +1909,7 @@
1909 1909
 
1910 1910
                 }
1911 1911
               }
1912
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
1912
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
1913 1913
                 isHasUnCharge = true
1914 1914
 
1915 1915
               }
@@ -1945,7 +1945,7 @@
1945 1945
                 for (let i = 0; i < this.all_table_data.length; i++) {
1946 1946
                   let isHasUnCharge = false
1947 1947
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
1948
-                    if (this.all_table_data[i].order_status != 2) {
1948
+                    if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
1949 1949
                       isHasUnCharge = true
1950 1950
                     } else {
1951 1951
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -1957,7 +1957,7 @@
1957 1957
                     }
1958 1958
 
1959 1959
                   }
1960
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
1960
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
1961 1961
                     isHasUnCharge = true
1962 1962
 
1963 1963
                   }
@@ -2118,7 +2118,7 @@
2118 2118
             for (let i = 0; i < this.all_table_data.length; i++) {
2119 2119
               let isHasUnCharge = false
2120 2120
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
2121
-                if (this.all_table_data[i].order_status != 2) {
2121
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
2122 2122
                   isHasUnCharge = true
2123 2123
                 } else {
2124 2124
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -2129,7 +2129,7 @@
2129 2129
 
2130 2130
                 }
2131 2131
               }
2132
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
2132
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
2133 2133
                 isHasUnCharge = true
2134 2134
 
2135 2135
               }
@@ -3292,7 +3292,7 @@
3292 3292
             for (let i = 0; i < this.all_table_data.length; i++) {
3293 3293
               let isHasUnCharge = false
3294 3294
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3295
-                if (this.all_table_data[i].order_status != 2) {
3295
+                if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3296 3296
                   isHasUnCharge = true
3297 3297
                 } else {
3298 3298
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3303,7 +3303,7 @@
3303 3303
 
3304 3304
                 }
3305 3305
               }
3306
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3306
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3307 3307
                 isHasUnCharge = true
3308 3308
 
3309 3309
               }
@@ -3339,7 +3339,7 @@
3339 3339
                 for (let i = 0; i < this.all_table_data.length; i++) {
3340 3340
                   let isHasUnCharge = false
3341 3341
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3342
-                    if (this.all_table_data[i].order_status != 2) {
3342
+                    if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3343 3343
                       isHasUnCharge = true
3344 3344
                     } else {
3345 3345
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3351,7 +3351,7 @@
3351 3351
                     }
3352 3352
 
3353 3353
                   }
3354
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3354
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3355 3355
                     isHasUnCharge = true
3356 3356
 
3357 3357
                   }
@@ -3389,23 +3389,41 @@
3389 3389
             this.current_index = 0
3390 3390
             let ids = []
3391 3391
             let temp_order_id = 0
3392
-            for (let i = 0; i < this.patientTableData.length; i++) {
3393
-              // console.log(this.patientTableData[i])
3392
+            if (this.radio == 2) {
3393
+
3394
+              for (let i = 0; i < this.patientTableData.length; i++) {
3395
+                // console.log(this.patientTableData[i])
3396
+
3397
+                if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3398
+                  ids.push(this.patientTableData[i].order_id)
3399
+                  // this.$refs.tab.setCurrentRow(this.patientTableData[i])
3400
+                  // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3401
+                }
3394 3402
 
3395
-              if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3396
-                ids.push(this.patientTableData[i].order_id)
3397
-                // this.$refs.tab.setCurrentRow(this.patientTableData[i])
3398
-                // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3399 3403
               }
3400 3404
 
3401
-            }
3405
+              temp_order_id = ids[ids.length - 1]
3406
+              for (let i = 0; i < this.patientTableData.length; i++) {
3407
+                if (temp_order_id == this.patientTableData[i].order_id) {
3408
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i])
3409
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3410
+                }
3411
+              }
3412
+            }else{
3413
+
3414
+              for (let i = 0; i < this.patientTableData.length; i++) {
3415
+                // console.log(this.patientTableData[i])
3416
+
3417
+                if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3418
+                  // ids.push(this.patientTableData[i].order_id)
3419
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i])
3420
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3421
+                }
3402 3422
 
3403
-            temp_order_id = ids[ids.length - 1]
3404
-            for (let i = 0; i < this.patientTableData.length; i++) {
3405
-              if (temp_order_id == this.patientTableData[i].order_id) {
3406
-                this.$refs.tab.setCurrentRow(this.patientTableData[i])
3407
-                this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3408 3423
               }
3424
+
3425
+
3426
+
3409 3427
             }
3410 3428
           }
3411 3429
         })
@@ -3526,7 +3544,7 @@
3526 3544
             for (let i = 0; i < this.all_table_data.length; i++) {
3527 3545
               let isHasUnCharge = false
3528 3546
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3529
-                if (this.all_table_data[i].order_status != 2) {
3547
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
3530 3548
                   isHasUnCharge = true
3531 3549
                 } else {
3532 3550
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3537,7 +3555,7 @@
3537 3555
 
3538 3556
                 }
3539 3557
               }
3540
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3558
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3541 3559
                 isHasUnCharge = true
3542 3560
 
3543 3561
               }
@@ -3573,7 +3591,7 @@
3573 3591
                 for (let i = 0; i < this.all_table_data.length; i++) {
3574 3592
                   let isHasUnCharge = false
3575 3593
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3576
-                    if (this.all_table_data[i].order_status != 2) {
3594
+                    if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
3577 3595
                       isHasUnCharge = true
3578 3596
                     } else {
3579 3597
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3585,7 +3603,7 @@
3585 3603
                     }
3586 3604
 
3587 3605
                   }
3588
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3606
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3589 3607
                     isHasUnCharge = true
3590 3608
 
3591 3609
                   }
@@ -3750,7 +3768,7 @@
3750 3768
             for (let i = 0; i < this.all_table_data.length; i++) {
3751 3769
               let isHasUnCharge = false
3752 3770
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3753
-                if (this.all_table_data[i].order_status != 2) {
3771
+                if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3754 3772
                   isHasUnCharge = true
3755 3773
                 } else {
3756 3774
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3761,7 +3779,7 @@
3761 3779
 
3762 3780
                 }
3763 3781
               }
3764
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3782
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3765 3783
                 isHasUnCharge = true
3766 3784
 
3767 3785
               }
@@ -3797,7 +3815,7 @@
3797 3815
                 for (let i = 0; i < this.all_table_data.length; i++) {
3798 3816
                   let isHasUnCharge = false
3799 3817
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3800
-                    if (this.all_table_data[i].order_status != 2) {
3818
+                    if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3801 3819
                       isHasUnCharge = true
3802 3820
                     } else {
3803 3821
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3809,7 +3827,7 @@
3809 3827
                     }
3810 3828
 
3811 3829
                   }
3812
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3830
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3813 3831
                     isHasUnCharge = true
3814 3832
 
3815 3833
                   }

+ 122 - 103
src/xt_pages/outpatientCharges/summary.vue Voir le fichier

@@ -85,7 +85,9 @@
85 85
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
86 86
                 </el-table-column>
87 87
                 <el-table-column align="center" width="90" prop="name" label="医疗类型">
88
-                    <template slot-scope="scope"><div>{{getMedType(scope.row.med_type)}}</div></template>
88
+                    <template slot-scope="scope">
89
+                        <div>{{getMedType(scope.row.med_type)}}</div>
90
+                    </template>
89 91
                 </el-table-column>
90 92
                 <el-table-column align="center" width="100" prop="name" label="收费日期">
91 93
                     <template slot-scope="scope">
@@ -382,15 +384,7 @@
382 384
         }
383 385
 
384 386
       }, toRefund(row) {
385
-
386
-        console.log("~~~~~")
387
-        console.log(row)
388
-        console.log(this.$store.getters.xt_user.org_id )
389
-
390
-
391
-
392
-        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
393
-          var that = this
387
+        if (row.his_patient.balance_accounts_type == 2) {
394 388
           this.$confirm('是否退费', '退费', {
395 389
             confirmButtonText: '确 定',
396 390
             cancelButtonText: '取 消',
@@ -398,110 +392,136 @@
398 392
           }).then(() => {
399 393
             let params = {
400 394
               'order_id': row.id,
401
-              'patient_id': row.patient_id,
402
-              'record_time': that.getTimes(row.settle_accounts_date),
403
-              'admin_user_id': that.$store.getters.xt_user.user.id
395
+              'patient_id':  row.patient_id,
396
+              'record_time':this.getTimes(row.settle_accounts_date),
404 397
             }
405
-            axios.get('http://127.0.0.1:9532/api/refund/post', {
406
-              params: params
398
+            Refund(params).then(response => {
399
+              if (response.data.state == 0) {
400
+                this.$message.error(response.data.msg)
401
+                return false
402
+              } else {
403
+                this.$message({ message: '退费成功', type: 'success' })
404
+                this.getHisOrderList()
405
+              }
407 406
             })
408
-              .then(function(response) {
409
-                if (response.data.state == 0) {
410
-                  that.$message.error(response.data.msg)
411
-                  return false
412
-                } else {
413
-                  if (response.data.data.failed_code == -10) {
414
-                    // that.$message.error(response.data.data.msg)
415
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
416
-                      confirmButtonText: '确 定',
417
-                      type: 'warning'
418
-                    }).then(() => {
419
-
420
-                    }).catch(() => {
421
-                    })
422
-                  } else {
423
-                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
424
-                    that.getHisOrderList()
425
-
426
-                  }
427
-                }
428
-              })
429
-              .catch(function(error) {
430
-              })
431 407
           }).catch(() => {
432 408
           })
433 409
 
434
-        } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
410
+        } else {
411
+
412
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
435 413
             var that = this
436
-          this.$confirm('是否退费', '退费', {
437
-            confirmButtonText: '确 定',
438
-            cancelButtonText: '取 消',
439
-            type: 'warning'
440
-          }).then(() => {
441
-            let params = {
442
-              'order_id': row.id,
443
-              'patient_id': row.patient_id,
444
-              'record_time': this.getTimes(row.settle_accounts_date),
445
-              'admin_user_id': this.$store.getters.xt_user.user.id
446
-            }
447
-            axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
448
-              params: params
449
-            })
450
-              .then(function(response) {
451
-                if (response.data.state == 0) {
452
-                  that.$message.error(response.data.msg)
453
-                  return false
454
-                } else {
455
-                  if (response.data.data.failed_code == -10) {
456
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
457
-                      confirmButtonText: '确 定',
458
-                      type: 'warning'
459
-                    }).then(() => {
414
+            this.$confirm('是否退费', '退费', {
415
+              confirmButtonText: '确 定',
416
+              cancelButtonText: '取 消',
417
+              type: 'warning'
418
+            }).then(() => {
419
+              let params = {
420
+                'order_id': row.id,
421
+                'patient_id': row.patient_id,
422
+                'record_time': that.getTimes(row.settle_accounts_date),
423
+                'admin_user_id': that.$store.getters.xt_user.user.id
424
+              }
425
+              axios.get('http://127.0.0.1:9532/api/refund/post', {
426
+                params: params
427
+              })
428
+                .then(function(response) {
429
+                  if (response.data.state == 0) {
430
+                    that.$message.error(response.data.msg)
431
+                    return false
432
+                  } else {
433
+                    if (response.data.data.failed_code == -10) {
434
+                      // that.$message.error(response.data.data.msg)
435
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
436
+                        confirmButtonText: '确 定',
437
+                        type: 'warning'
438
+                      }).then(() => {
439
+
440
+                      }).catch(() => {
441
+                      })
442
+                    } else {
443
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
444
+                      that.getHisOrderList()
460 445
 
461
-                    }).catch(() => {
462
-                    })
446
+                    }
447
+                  }
448
+                })
449
+                .catch(function(error) {
450
+                })
451
+            }).catch(() => {
452
+            })
463 453
 
454
+          } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
455
+            var that = this
456
+            this.$confirm('是否退费', '退费', {
457
+              confirmButtonText: '确 定',
458
+              cancelButtonText: '取 消',
459
+              type: 'warning'
460
+            }).then(() => {
461
+              let params = {
462
+                'order_id': row.id,
463
+                'patient_id': row.patient_id,
464
+                'record_time': this.getTimes(row.settle_accounts_date),
465
+                'admin_user_id': this.$store.getters.xt_user.user.id
466
+              }
467
+              axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
468
+                params: params
469
+              })
470
+                .then(function(response) {
471
+                  if (response.data.state == 0) {
472
+                    that.$message.error(response.data.msg)
473
+                    return false
464 474
                   } else {
465
-                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
466
-                    that.getHisOrderList()
475
+                    if (response.data.data.failed_code == -10) {
476
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
477
+                        confirmButtonText: '确 定',
478
+                        type: 'warning'
479
+                      }).then(() => {
480
+
481
+                      }).catch(() => {
482
+                      })
483
+
484
+                    } else {
485
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
486
+                      that.getHisOrderList()
487
+                    }
467 488
                   }
468
-                }
469
-              })
470
-              .catch(function(error) {
471
-              })
489
+                })
490
+                .catch(function(error) {
491
+                })
472 492
 
473
-          }).catch(() => {
474
-          })
493
+            }).catch(() => {
494
+            })
475 495
 
476
-        } else {
477
-          this.$confirm('是否退费', '退费', {
478
-            confirmButtonText: '确 定',
479
-            cancelButtonText: '取 消',
480
-            type: 'warning'
481
-          }).then(() => {
482
-            let params = {
483
-              'order_id': this.order.id,
484
-              'patient_id': this.patientInfo.id,
485
-              'record_time': this.record_date
496
+          } else {
497
+            this.$confirm('是否退费', '退费', {
498
+              confirmButtonText: '确 定',
499
+              cancelButtonText: '取 消',
500
+              type: 'warning'
501
+            }).then(() => {
502
+              let params = {
503
+                'order_id': row.id,
504
+                'patient_id':  row.patient_id,
505
+                'record_time':this.getTimes(row.settle_accounts_date),
486 506
 
487
-            }
488
-            Refund(params).then(response => {
489
-              if (response.data.state == 0) {
490
-                this.$message.error(response.data.msg)
491
-                return false
492
-              } else {
493
-                this.$message({ message: '退费成功', type: 'success' })
494
-                this.getHisOrderList()
495 507
               }
508
+              Refund(params).then(response => {
509
+                if (response.data.state == 0) {
510
+                  this.$message.error(response.data.msg)
511
+                  return false
512
+                } else {
513
+                  this.$message({ message: '退费成功', type: 'success' })
514
+                  this.getHisOrderList()
515
+                }
516
+              })
517
+            }).catch(() => {
496 518
             })
497
-          }).catch(() => {
498
-          })
519
+          }
499 520
         }
500
-      },
501
-      toPrint(row) {
521
+      }, toPrint(row) {
502 522
         if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
503
-         if(row.mdtrt_id.indexOf("H") > -1){
504
-          this.statementVisible9504 = true
523
+          if (row.mdtrt_id.indexOf('H') > -1) {
524
+            this.statementVisible9504 = true
505 525
             let obj = {
506 526
               order_id: row.id,
507 527
               patient_id: row.patient_id,
@@ -509,20 +529,19 @@
509 529
               admin_user_id: this.$store.getters.xt_user.user.id
510 530
             }
511 531
             this.orderObj9504 = obj
512
-         }else{
513
-           
514
-           this.statementVisible9504 = true
532
+          } else {
533
+
534
+            this.statementVisible9504 = true
515 535
             let obj = {
516 536
               order_id: row.id,
517 537
               patient_id: row.patient_id,
518 538
               record_time: this.getTimes(row.settle_accounts_date),
519 539
               admin_user_id: this.$store.getters.xt_user.user.id,
520
-              balance_accounts_type:2
540
+              balance_accounts_type: 2
521 541
             }
522 542
             this.orderObj9504 = obj
523
-         }
543
+          }
524 544
 
525
-         
526 545
         } else {
527 546
           this.statementVisible = true
528 547
           let obj = {