Просмотр исходного кода

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

csx 3 лет назад
Родитель
Сommit
55f924864f

+ 9 - 0
src/api/his/his.js Просмотреть файл

@@ -490,6 +490,15 @@ export function getPrivateExpenses(params) {
490 490
   });
491 491
 }
492 492
 
493
+export function refundNumber(params) {
494
+  return request({
495
+    url: "/api/refundnumber/post",
496
+    method: "post",
497
+    params:params,
498
+  });
499
+}
500
+
501
+
493 502
 
494 503
 
495 504
 

+ 164 - 96
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Просмотреть файл

@@ -193,7 +193,7 @@
193 193
 
194 194
                                                 <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
195 195
                                                     <el-button
196
-                                                            v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0) "
196
+                                                            v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0) || (hisPatientInfo.id > 0 &&  items.prescriptions[0].order.order_status == 3)"
197 197
 
198 198
                                                             size="small"
199 199
                                                             @click="sz_open(8,items.med_type,items.prescriptions[0].order)"
@@ -210,7 +210,7 @@
210 210
                                                     </el-button>
211 211
 
212 212
                                                     <el-button
213
-                                                            v-if="(hisPatientInfo.id > 0 && items.prescriptions[0].order.id == 0) || items.prescriptions[0].order.order_status == 1"
213
+                                                            v-if="(hisPatientInfo.id > 0 && items.prescriptions[0].order.id == 0) || items.prescriptions[0].order.order_status == 1||  items.prescriptions[0].order.order_status == 3"
214 214
                                                             size="small"
215 215
                                                             @click="sz_open(3,items.med_type,items.prescriptions[0].order,items.prescriptions)"
216 216
                                                             type="primary">收费
@@ -263,7 +263,9 @@
263 263
                                             <span>医疗费总额:<span style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt ?  items.curPrescriptions.order.medfee_sumamt:getTotalFour(items.prescriptions)?getTotalFour(items.prescriptions):'' }}元</span></span>
264 264
                                             <span>基金支付金额:<span style="color:red;">{{ items.curPrescriptions.order.fund_pay_sumamt?items.curPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
265 265
                                             <span>个人账户支付金额:<span style="color:red;">{{ items.curPrescriptions.order.acct_pay?items.curPrescriptions.order.acct_pay:''}}元</span></span>
266
-                                            <span>个人支付金额:<span style="color:red;">{{ items.curPrescriptions.order.psn_cash_pay?items.curPrescriptions.order.psn_cash_pay:''}}元</span></span>
266
+                                            <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span style="color:red;">{{ items.curPrescriptions.order.psn_cash_pay?items.curPrescriptions.order.psn_cash_pay:''}}元</span></span>
267
+                                            <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt}}元</span></span>
268
+
267 269
                                             <span>个人账户金额:<span style="color:red;">{{ items.curPrescriptions.order.account_price?items.curPrescriptions.order.account_price:''}}元</span></span>
268 270
 
269 271
 
@@ -433,7 +435,7 @@
433 435
                                                     <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
434 436
 
435 437
                                                     <el-button
436
-                                                            v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) "
438
+                                                            v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || (hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.order_status == 3)"
437 439
 
438 440
                                                             size="small"
439 441
                                                             @click="sz_open(8,items.med_type,items.curMonthPrescriptions.order)"
@@ -450,7 +452,7 @@
450 452
                                                         </el-button>
451 453
 
452 454
                                                         <el-button
453
-                                                                v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || items.curMonthPrescriptions.order.order_status == 1"
455
+                                                                v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || items.curMonthPrescriptions.order.order_status == 1 || items.curMonthPrescriptions.order.order_status == 3"
454 456
                                                                 size="small"
455 457
                                                                 @click="sz_open(3,items.med_type,items.curMonthPrescriptions.order, items.month_prescriptions)"
456 458
                                                                 type="primary">收费
@@ -506,8 +508,14 @@
506 508
                                                 <span>医疗费总额:<span style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt ?  items.curMonthPrescriptions.order.medfee_sumamt:getTotalFour(items.month_prescriptions)?getTotalFour(items.month_prescriptions):'' }}元</span></span>
507 509
                                                 <span>基金支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.fund_pay_sumamt?items.curMonthPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
508 510
                                                 <span>个人账户支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.acct_pay?items.curMonthPrescriptions.order.acct_pay:''}}元</span></span>
509
-                                                <span>个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>
510
-                                                <span>个人账户金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.account_price?items.curMonthPrescriptions.order.account_price:''}}元</span></span>
511
+                                                <!--<span>个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>-->
512
+
513
+                                            <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>
514
+                                            <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt}}元</span></span>
515
+
516
+
517
+
518
+                                            <span>个人账户金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.account_price?items.curMonthPrescriptions.order.account_price:''}}元</span></span>
511 519
 
512 520
                                             </div>
513 521
 
@@ -657,7 +665,8 @@
657 665
     preSettle,
658 666
     Refund,
659 667
     register,
660
-    upload
668
+    upload,
669
+    refundNumber
661 670
   } from '@/api/his/his'
662 671
   import RegisterDialog from './components/registerDialog'
663 672
   import treatPrint from './treatPrint'
@@ -2704,49 +2713,73 @@
2704 2713
           // this.$refs.print.getInfo(this.order.id)
2705 2714
 
2706 2715
         } else if (index == 10) {
2707
-          var that = this
2708
-          this.$confirm('是否退号', '退号', {
2709
-            confirmButtonText: '确 定',
2710
-            cancelButtonText: '取 消',
2711
-            type: 'warning'
2712
-          }).then(() => {
2713
-            let params = {
2714
-              'id': this.hisPatientInfo.id,
2715
-              'patient_id': this.patientInfo.id,
2716
-              'record_time': this.record_date,
2717
-              'org_id': this.$store.getters.xt_user.org_id,
2718
-              'admin_user_id': this.$store.getters.xt_user.user.id
2719
-            }
2720
-            axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
2721
-              params: params
2722
-            })
2723
-              .then(function(response) {
2716
+          if(this.hisPatientInfo.balance_accounts_type == 2) {
2717
+            this.$confirm('是否退号', '退号', {
2718
+              confirmButtonText: '确 定',
2719
+              cancelButtonText: '取 消',
2720
+              type: 'warning'
2721
+            }).then(() => {
2722
+              let params = {
2723
+                'id': this.hisPatientInfo.id,
2724
+              };
2725
+              refundNumber(params).then(response => {
2724 2726
                 if (response.data.state == 0) {
2725
-                  that.$message.error(response.data.msg)
2727
+                  this.$message.error(response.data.msg);
2726 2728
                   return false
2727 2729
                 } else {
2728
-                  if (response.data.data.failed_code == -10) {
2729
-                    // that.$message.error(response.data.data.msg)
2730
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
2731
-                      confirmButtonText: '确 定',
2732
-                      type: 'warning'
2733
-                    }).then(() => {
2730
+                  this.radio = 1
2731
+                  this.changeRadioAndPatient(1)
2732
+                  this.$message({ message: '退号成功', type: 'success' });
2733
+                }
2734
+              })
2735
+            }).catch(() => {
2736
+            })
2737
+          }else{
2738
+            var that = this
2739
+            this.$confirm('是否退号', '退号', {
2740
+              confirmButtonText: '确 定',
2741
+              cancelButtonText: '取 消',
2742
+              type: 'warning'
2743
+            }).then(() => {
2744
+              let params = {
2745
+                'id': this.hisPatientInfo.id,
2746
+                'patient_id': this.patientInfo.id,
2747
+                'record_time': this.record_date,
2748
+                'org_id': this.$store.getters.xt_user.org_id,
2749
+                'admin_user_id': this.$store.getters.xt_user.user.id
2750
+              }
2751
+              axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
2752
+                params: params
2753
+              })
2754
+                .then(function(response) {
2755
+                  if (response.data.state == 0) {
2756
+                    that.$message.error(response.data.msg)
2757
+                    return false
2758
+                  } else {
2759
+                    if (response.data.data.failed_code == -10) {
2760
+                      // that.$message.error(response.data.data.msg)
2761
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
2762
+                        confirmButtonText: '确 定',
2763
+                        type: 'warning'
2764
+                      }).then(() => {
2734 2765
 
2735
-                    }).catch(() => {
2736
-                    })
2766
+                      }).catch(() => {
2767
+                      })
2768
+
2769
+                    } else {
2770
+                      that.radio = 1
2771
+                      that.changeRadioAndPatient(1)
2772
+                      that.$message({ message: '退号成功', type: 'success', duration: 5000 })
2773
+                    }
2737 2774
 
2738
-                  } else {
2739
-                    that.radio = 1
2740
-                    that.changeRadioAndPatient(1)
2741
-                    that.$message({ message: '退号成功', type: 'success', duration: 5000 })
2742 2775
                   }
2776
+                })
2777
+                .catch(function(error) {
2778
+                })
2779
+            }).catch(() => {
2780
+            })
2781
+          }
2743 2782
 
2744
-                }
2745
-              })
2746
-              .catch(function(error) {
2747
-              })
2748
-          }).catch(() => {
2749
-          })
2750 2783
         } else if (index == 11) {
2751 2784
           let params = {
2752 2785
             'order_id': this.order.id,
@@ -4295,7 +4328,6 @@
4295 4328
 
4296 4329
             }
4297 4330
 
4298
-
4299 4331
             break
4300 4332
           case 4:
4301 4333
             break
@@ -4306,7 +4338,7 @@
4306 4338
               cancelButtonText: '取 消',
4307 4339
               type: 'warning'
4308 4340
             }).then(() => {
4309
-              if(that.hisPatientInfo.balance_accounts_type == 2){
4341
+              if (that.hisPatientInfo.balance_accounts_type == 2) {
4310 4342
                 let params = {
4311 4343
                   'order_id': that.order.id,
4312 4344
                   'number': that.order.number,
@@ -4316,18 +4348,18 @@
4316 4348
                 }
4317 4349
                 Refund(params).then(response => {
4318 4350
                   if (response.data.state == 0) {
4319
-                    this.$message.error(response.data.msg)
4320
-                    this.loadingtwo = false
4351
+                    that.$message.error(response.data.msg)
4352
+                    that.loadingtwo = false
4321 4353
                     return false
4322 4354
                   } else {
4323
-                    this.radio = 1
4324
-                    this.changeRadioAndPatient(1)
4325
-                    this.$message({ message: '退费成功', type: 'success' })
4326
-                    this.loadingtwo = false
4355
+                    that.radio = 1
4356
+                    that.changeRadioAndPatient(1)
4357
+                    that.$message({ message: '退费成功', type: 'success' })
4358
+                    that.loadingtwo = false
4327 4359
                   }
4328 4360
                 })
4329 4361
 
4330
-              }else{
4362
+              } else {
4331 4363
 
4332 4364
                 axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
4333 4365
                   params: {
@@ -4355,7 +4387,6 @@
4355 4387
                   .catch(function(error) {
4356 4388
                   })
4357 4389
 
4358
-
4359 4390
               }
4360 4391
 
4361 4392
             }).catch(() => {
@@ -4430,13 +4461,31 @@
4430 4461
 
4431 4462
             break
4432 4463
           case 8:
4433
-            if(this.hisPatientInfo.balance_accounts_type == 2){
4464
+            if (this.hisPatientInfo.balance_accounts_type == 2) {
4434 4465
 
4435 4466
               this.$confirm('是否进行预结算', '预结算', {
4436 4467
                 confirmButtonText: '确 定',
4437 4468
                 cancelButtonText: '取 消',
4438 4469
                 type: 'warning'
4439 4470
               }).then(() => {
4471
+                let form = {}
4472
+                form['id'] = this.patientInfo.id
4473
+                form['his_patient_id'] = this.hisPatientInfo.id
4474
+                form['record_time'] = this.record_date
4475
+                form['admin_user_id'] = this.$store.getters.xt_user.user.id
4476
+                form['org_id'] = this.$store.getters.xt_user.org_id
4477
+
4478
+                form['p_type'] = med_type
4479
+                form['diagnosis'] = this.form.diagnosis
4480
+                form['sick_type'] = this.form.sick_type
4481
+
4482
+                if (this.activeName == 'first') {
4483
+                  form['settle_accounts_type'] = 1
4484
+                } else {
4485
+                  form['start_time'] = this.other_start_time
4486
+                  form['end_time'] = this.other_end_time
4487
+                  form['settle_accounts_type'] = 2
4488
+                }
4440 4489
                 preSettle(form).then(response => {
4441 4490
                   if (response.data.state == 0) {
4442 4491
                     this.$message.error(response.data.msg)
@@ -4451,8 +4500,7 @@
4451 4500
 
4452 4501
               })
4453 4502
 
4454
-
4455
-            }else{
4503
+            } else {
4456 4504
               var that = this
4457 4505
               let form = {}
4458 4506
               form['id'] = this.patientInfo.id
@@ -4508,12 +4556,10 @@
4508 4556
               }).catch(() => {
4509 4557
 
4510 4558
               })
4511
-              break
4512
-
4513
-
4514 4559
 
4515 4560
             }
4516 4561
 
4562
+            break
4517 4563
 
4518 4564
           case 10:
4519 4565
             this.newStatementVisible = true
@@ -4523,57 +4569,79 @@
4523 4569
               prescription_id: this.prescription_id,
4524 4570
               order_id: this.order.id,
4525 4571
               admin_user_id: this.$store.getters.xt_user.user.id,
4526
-              balance_accounts_type:this.hisPatientInfo.balance_accounts_type,
4527
-              his_patient_id:this.hisPatientInfo.id,
4572
+              balance_accounts_type: this.hisPatientInfo.balance_accounts_type,
4573
+              his_patient_id: this.hisPatientInfo.id,
4528 4574
 
4529 4575
             }
4530 4576
             this.newOrderObj = obj
4531 4577
             // this.$refs.print.getInfo(this.order.id)
4532 4578
             break
4533 4579
           case 11:
4534
-            var that = this
4535
-            this.$confirm('是否退号', '退号', {
4536
-              confirmButtonText: '确 定',
4537
-              cancelButtonText: '取 消',
4538
-              type: 'warning'
4539
-            }).then(() => {
4540
-              axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
4541
-                params: {
4542
-                  order_id: this.order.id,
4543
-                  record_time: this.record_date,
4544
-                  admin_user_id: this.$store.getters.xt_user.user.id,
4545
-                  patient_id: this.patientInfo.id,
4546
-                  his_patient_id: this.hisPatientInfo.id
4547
-                }
4548
-              })
4549
-                .then(function(response) {
4580
+            if (this.hisPatientInfo.balance_accounts_type == 2) {
4581
+              this.$confirm('是否退号', '退号', {
4582
+                confirmButtonText: '确 定',
4583
+                cancelButtonText: '取 消',
4584
+                type: 'warning'
4585
+              }).then(() => {
4586
+                let params = {
4587
+                  'id': this.hisPatientInfo.id,
4588
+                };
4589
+                refundNumber(params).then(response => {
4550 4590
                   if (response.data.state == 0) {
4551
-                    that.$message.error(response.data.msg)
4591
+                    this.$message.error(response.data.msg);
4552 4592
                     return false
4553 4593
                   } else {
4554
-                    if (response.data.data.failed_code == -10) {
4555
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
4556
-                        confirmButtonText: '确 定',
4557
-                        type: 'warning'
4558
-                      }).then(() => {
4559
-
4560
-                      }).catch(() => {
4561
-                      })
4562
-
4563
-                    } else {
4564
-                      that.changeRadioAndPatient(1)
4565
-                      that.$message({ message: '退号成功', type: 'success' })
4566
-                    }
4594
+                    this.radio = 1
4595
+                    this.changeRadioAndPatient(1)
4596
+                    this.$message({ message: '退号成功', type: 'success' });
4567 4597
                   }
4568 4598
                 })
4569
-                .catch(function(error) {
4599
+              }).catch(() => {
4600
+              })
4601
+            } else {
4602
+              var that = this
4603
+              this.$confirm('是否退号', '退号', {
4604
+                confirmButtonText: '确 定',
4605
+                cancelButtonText: '取 消',
4606
+                type: 'warning'
4607
+              }).then(() => {
4608
+                axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
4609
+                  params: {
4610
+                    order_id: this.order.id,
4611
+                    record_time: this.record_date,
4612
+                    admin_user_id: this.$store.getters.xt_user.user.id,
4613
+                    patient_id: this.patientInfo.id,
4614
+                    his_patient_id: this.hisPatientInfo.id
4615
+                  }
4570 4616
                 })
4571
-            }).catch(() => {
4572
-            })
4573
-            break
4617
+                  .then(function(response) {
4618
+                    if (response.data.state == 0) {
4619
+                      that.$message.error(response.data.msg)
4620
+                      return false
4621
+                    } else {
4622
+                      if (response.data.data.failed_code == -10) {
4623
+                        that.$confirm(response.data.data.msg, '医保错误信息', {
4624
+                          confirmButtonText: '确 定',
4625
+                          type: 'warning'
4626
+                        }).then(() => {
4574 4627
 
4628
+                        }).catch(() => {
4629
+                        })
4630
+                      } else {
4631
+                        that.changeRadioAndPatient(1)
4632
+                        that.$message({ message: '退号成功', type: 'success' })
4633
+                      }
4634
+                    }
4635
+                  })
4636
+                  .catch(function(error) {
4637
+                  })
4638
+              }).catch(() => {
4639
+              })
4640
+            }
4641
+            break
4575 4642
         }
4576 4643
 
4644
+
4577 4645
       }
4578 4646
     },
4579 4647
     mounted() {

+ 307 - 266
src/xt_pages/outpatientCharges/summary.vue Просмотреть файл

@@ -1,201 +1,201 @@
1 1
 <template>
2
-  <div class="main-contain outpatientChargesManagement">
3
-    <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
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"
10
-                    class="filter-item"/>
11
-          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
-                     @click="searchAction">
13
-            搜索
14
-          </el-button>
15
-          <el-select size="small" v-model="admin_user_id" placeholder="请选择"
16
-                     style="width:150px;margin-left:10px;" @change="changeDoctor">
17
-            <el-option
18
-              label="全部"
19
-              value="0">
20
-            </el-option>
21
-            <el-option
22
-              v-for="item,index in doctors"
23
-              :key="index"
24
-              :label="item.user_name"
25
-              :value="item.admin_user_id">
26
-            </el-option>
27
-          </el-select>
28
-          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
29
-                          @change="handleStartTimeChange" :editable="false" :clearable="false"
30
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
31
-                          format="yyyy-MM-dd"
32
-                          value-format="yyyy-MM-dd"
33
-                          align="right"></el-date-picker>
34
-
35
-          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
36
-                          @change="handleEndTimeChange" :editable="false" :clearable="false"
37
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
38
-                          format="yyyy-MM-dd"
39
-                          value-format="yyyy-MM-dd"
40
-                          align="right"></el-date-picker>
41
-          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
42
-          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
2
+    <div class="main-contain outpatientChargesManagement">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
43 5
         </div>
44
-        <div>
45
-          <!-- <el-popover
46
-            placement="bottom"
47
-            width="210"
48
-            trigger="click">
49
-            <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
50
-            <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
51
-            <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
52
-
53
-          </el-popover> -->
54
-          <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
6
+        <div class="app-container">
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"
10
+                              class="filter-item"/>
11
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
+                               @click="searchAction">
13
+                        搜索
14
+                    </el-button>
15
+                    <el-select size="small" v-model="admin_user_id" placeholder="请选择"
16
+                               style="width:150px;margin-left:10px;" @change="changeDoctor">
17
+                        <el-option
18
+                                label="全部"
19
+                                value="0">
20
+                        </el-option>
21
+                        <el-option
22
+                                v-for="item,index in doctors"
23
+                                :key="index"
24
+                                :label="item.user_name"
25
+                                :value="item.admin_user_id">
26
+                        </el-option>
27
+                    </el-select>
28
+                    <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
29
+                                    @change="handleStartTimeChange" :editable="false" :clearable="false"
30
+                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
31
+                                    format="yyyy-MM-dd"
32
+                                    value-format="yyyy-MM-dd"
33
+                                    align="right"></el-date-picker>
34
+
35
+                    <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
36
+                                    @change="handleEndTimeChange" :editable="false" :clearable="false"
37
+                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
38
+                                    format="yyyy-MM-dd"
39
+                                    value-format="yyyy-MM-dd"
40
+                                    align="right"></el-date-picker>
41
+                    <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
42
+                    <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
43
+                </div>
44
+                <div>
45
+                    <!-- <el-popover
46
+                      placement="bottom"
47
+                      width="210"
48
+                      trigger="click">
49
+                      <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
50
+                      <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
51
+                      <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
52
+
53
+                    </el-popover> -->
54
+                    <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
55
+                </div>
56
+            </div>
57
+            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
58
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
59
+                      highlight-current-row>
60
+                <el-table-column
61
+                        prop="date"
62
+                        label="序号"
63
+                        width="60"
64
+                        align="center"
65
+                        type="index"
66
+                >
67
+                </el-table-column>
68
+                <el-table-column align="center" width="100" prop="name" label="就诊号">
69
+                    <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
70
+                </el-table-column>
71
+                <el-table-column align="center" width="90" prop="name" label="患者名字">
72
+                    <template slot-scope="scope">{{ scope.row.patient.name }}</template>
73
+                </el-table-column>
74
+                <!--<el-table-column align="center" prop="name" label="患者类型">-->
75
+                <!--<template slot-scope="scope"></template>-->
76
+                <!--</el-table-column>-->
77
+
78
+                <el-table-column align="center" width="90" prop="name" label="应收金额">
79
+                    <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
80
+                </el-table-column>
81
+                <el-table-column align="center" width="90" prop="name" label="实收金额">
82
+                    <template slot-scope="scope">{{scope.row.reality_price}}</template>
83
+                </el-table-column>
84
+                <el-table-column align="center" width="90" prop="name" label="科室">
85
+                    <template slot-scope="scope">{{scope.row.department_name}}</template>
86
+                </el-table-column>
87
+                <el-table-column align="center" width="100" prop="name" label="收费日期">
88
+                    <template slot-scope="scope">
89
+                        {{scope.row.setl_time?scope.row.setl_time:getTimes(scope.row.settle_accounts_date)}}
90
+                    </template>
91
+                </el-table-column>
92
+                <el-table-column align="center" width="90" prop="name" label="收费员">
93
+                    <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
94
+                </el-table-column>
95
+                <el-table-column align="center" width="80" prop="name" label="状态">
96
+                    <template slot-scope="scope">
97
+                        <div v-if="scope.row.order_status == 1">待结算</div>
98
+                        <div v-if="scope.row.order_status == 2">已结算</div>
99
+                        <div v-if="scope.row.order_status == 3">已退费</div>
100
+                    </template>
101
+                </el-table-column>
102
+                <el-table-column align="center" prop="name" label="操作">
103
+                    <template slot-scope="scope">
104
+                        <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
105
+                        <el-button size="mini" type="primary" @click="toPrint(scope.row)"
106
+                                   v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138)  || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9990)">
107
+                            结算单
108
+                        </el-button>
109
+                        <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
110
+                                   v-if="scope.row.order_status == 2&& scope.row.result.id == 0">
111
+                            上传结算清单
112
+                        </el-button>
113
+                        <el-button size="mini" type="primary"
114
+                                   v-if="scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106"
115
+                                   @click="settlementPrint(scope.row)">结算单
116
+                        </el-button>
117
+                        <el-button size="mini" type="primary" @click="toRefund(scope.row)">
118
+                            退费
119
+                        </el-button>
120
+                        <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
121
+                    </template>
122
+                </el-table-column>
123
+            </el-table>
124
+            <el-pagination
125
+                    @size-change="handleSizeChange"
126
+                    @current-change="handleCurrentChange"
127
+                    :page-sizes="[10, 50, 100]"
128
+                    :page-size="10"
129
+                    background
130
+                    style="margin-top:20px;float: right"
131
+                    layout="total, sizes, prev, pager, next, jumper"
132
+                    :total="total"
133
+
134
+            >
135
+            </el-pagination>
55 136
         </div>
56
-      </div>
57
-      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
58
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
59
-                highlight-current-row>
60
-        <el-table-column
61
-          prop="date"
62
-          label="序号"
63
-          width="60"
64
-          align="center"
65
-          type="index"
66
-        >
67
-        </el-table-column>
68
-        <el-table-column align="center" width="100" prop="name" label="就诊号">
69
-          <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
70
-        </el-table-column>
71
-        <el-table-column align="center" width="90" prop="name" label="患者名字">
72
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
73
-        </el-table-column>
74
-        <!--<el-table-column align="center" prop="name" label="患者类型">-->
75
-        <!--<template slot-scope="scope"></template>-->
76
-        <!--</el-table-column>-->
77
-
78
-        <el-table-column align="center" width="90" prop="name" label="应收金额">
79
-          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
80
-        </el-table-column>
81
-        <el-table-column align="center" width="90" prop="name" label="实收金额">
82
-          <template slot-scope="scope">{{scope.row.reality_price}}</template>
83
-        </el-table-column>
84
-        <el-table-column align="center" width="90" prop="name" label="科室">
85
-          <template slot-scope="scope">{{scope.row.department_name}}</template>
86
-        </el-table-column>
87
-        <el-table-column align="center" width="100" prop="name" label="收费日期">
88
-          <template slot-scope="scope">
89
-            {{scope.row.setl_time?scope.row.setl_time:getTimes(scope.row.settle_accounts_date)}}
90
-          </template>
91
-        </el-table-column>
92
-        <el-table-column align="center" width="90" prop="name" label="收费员">
93
-          <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
94
-        </el-table-column>
95
-        <el-table-column align="center" width="80" prop="name" label="状态">
96
-          <template slot-scope="scope">
97
-            <div v-if="scope.row.order_status == 1">待结算</div>
98
-            <div v-if="scope.row.order_status == 2">已结算</div>
99
-            <div v-if="scope.row.order_status == 3">已退费</div>
100
-          </template>
101
-        </el-table-column>
102
-        <el-table-column align="center" prop="name" label="操作">
103
-          <template slot-scope="scope">
104
-            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
105
-            <el-button size="mini" type="primary" @click="toPrint(scope.row)"
106
-                       v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138)  || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9990)">
107
-              结算单
108
-            </el-button>
109
-            <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
110
-                       v-if="scope.row.order_status == 2&& scope.row.result.id == 0">
111
-              上传结算清单
112
-            </el-button>
113
-            <el-button size="mini" type="primary"
114
-                       v-if="scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106"
115
-                       @click="settlementPrint(scope.row)">结算单
116
-            </el-button>
117
-            <el-button size="mini" type="primary" @click="toRefund(scope.row)">
118
-              退费
119
-            </el-button>
120
-            <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
121
-          </template>
122
-        </el-table-column>
123
-      </el-table>
124
-      <el-pagination
125
-        @size-change="handleSizeChange"
126
-        @current-change="handleCurrentChange"
127
-        :page-sizes="[10, 50, 100]"
128
-        :page-size="10"
129
-        background
130
-        style="margin-top:20px;float: right"
131
-        layout="total, sizes, prev, pager, next, jumper"
132
-        :total="total"
133
-
134
-      >
135
-      </el-pagination>
136
-    </div>
137 137
 
138
-    <el-dialog
139
-      class="centerDialog"
140
-      width="1200px"
141
-      title="打印"
142
-      :visible.sync="statementVisible">
143
-      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
144
-      <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
145
-    </el-dialog>
146
-    <el-dialog
147
-      class="centerDialog"
148
-      width="900px"
149
-      title="打印"
150
-      :visible.sync="listVisible">
151
-      <listPrint></listPrint>
152
-    </el-dialog>
153
-    <el-dialog
154
-      class="centerDialog"
155
-      width="900px"
156
-      title="打印"
157
-      :visible.sync="allListVisible">
158
-      <allListPrint :paramsObj='paramsObj'></allListPrint>
159
-    </el-dialog>
160
-
161
-    <el-dialog
162
-      class="centerDialog"
163
-      width="1200px"
164
-      title="打印"
165
-      :visible.sync="statementVisible9504">
166
-      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
167
-      <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
168
-      <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
169
-    </el-dialog>
170
-
171
-    <el-dialog
172
-      class="centerDialog"
173
-      width="1200px"
174
-      title="打印"
175
-      :visible.sync="invoiceVisible">
176
-      <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
177
-    </el-dialog>
178
-    <el-dialog
179
-      class="centerDialog"
180
-      width="1200px"
181
-      title="打印"
182
-      :visible.sync="settlementVisible">
183
-      <settlement-print ref="print" :paramsObj='settlementObj'></settlement-print>
184
-    </el-dialog>
185
-
186
-  </div>
138
+        <el-dialog
139
+                class="centerDialog"
140
+                width="1200px"
141
+                title="打印"
142
+                :visible.sync="statementVisible">
143
+            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
144
+            <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
145
+        </el-dialog>
146
+        <el-dialog
147
+                class="centerDialog"
148
+                width="900px"
149
+                title="打印"
150
+                :visible.sync="listVisible">
151
+            <listPrint></listPrint>
152
+        </el-dialog>
153
+        <el-dialog
154
+                class="centerDialog"
155
+                width="900px"
156
+                title="打印"
157
+                :visible.sync="allListVisible">
158
+            <allListPrint :paramsObj='paramsObj'></allListPrint>
159
+        </el-dialog>
160
+
161
+        <el-dialog
162
+                class="centerDialog"
163
+                width="1200px"
164
+                title="打印"
165
+                :visible.sync="statementVisible9504">
166
+            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
167
+            <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
168
+            <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
169
+        </el-dialog>
170
+
171
+        <el-dialog
172
+                class="centerDialog"
173
+                width="1200px"
174
+                title="打印"
175
+                :visible.sync="invoiceVisible">
176
+            <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
177
+        </el-dialog>
178
+        <el-dialog
179
+                class="centerDialog"
180
+                width="1200px"
181
+                title="打印"
182
+                :visible.sync="settlementVisible">
183
+            <settlement-print ref="print" :paramsObj='settlementObj'></settlement-print>
184
+        </el-dialog>
185
+
186
+    </div>
187 187
 </template>
188 188
 
189 189
 
190 190
 <script>
191 191
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
192
-  import {getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from '@/api/his/his'
193
-  import {uParseTime} from '@/utils/tools'
192
+  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
193
+  import { uParseTime } from '@/utils/tools'
194 194
   import NewStatementPrint from './newStatementPrint'
195 195
   import listPrint from './listPrint'
196 196
   import allListPrint from './allListPrint'
197 197
   import NewStatementPrintTwo from './newStatementPrintTwo'
198
-  import {fetchAllAdminUsers} from '@/api/doctor'
198
+  import { fetchAllAdminUsers } from '@/api/doctor'
199 199
   import axios from 'axios'
200 200
   import invoicePrint from './invoicePrint'
201 201
   import settlementPrint from './settlementPrint'
@@ -217,8 +217,8 @@
217 217
         statementVisible9504: false,
218 218
         orderObj9504: {},
219 219
         crumbs: [
220
-          {path: false, name: '门诊收费'},
221
-          {path: false, name: '项目消费明细汇总'}
220
+          { path: false, name: '门诊收费' },
221
+          { path: false, name: '项目消费明细汇总' }
222 222
         ],
223 223
         tableData: [],
224 224
         limit: 10,
@@ -242,15 +242,15 @@
242 242
     },
243 243
     methods: {
244 244
       uploadInfo(row) {
245
-        var that = this;
245
+        var that = this
246 246
         axios.get('http://127.0.0.1:9532/api/settlelist/get', {
247 247
           params: {
248 248
             order_id: row.id,
249 249
             admin_user_id: this.$store.getters.xt_user.user.id
250 250
           }
251
-        }).then(function (response) {
251
+        }).then(function(response) {
252 252
           if (response.data.state == 0) {
253
-            that.$message.error(response.data.msg);
253
+            that.$message.error(response.data.msg)
254 254
             return false
255 255
           } else {
256 256
 
@@ -265,13 +265,12 @@
265 265
               })
266 266
 
267 267
             } else {
268
-              that.$message.success("上传成功");
268
+              that.$message.success('上传成功')
269 269
               row.result.id = response.data.data.result.id
270 270
             }
271 271
 
272
-
273 272
           }
274
-        }).catch(function (error) {
273
+        }).catch(function(error) {
275 274
         })
276 275
       },
277 276
 
@@ -291,8 +290,11 @@
291 290
         }
292 291
 
293 292
       }, toRefund(row) {
293
+
294
+
295
+
294 296
         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) {
295
-          var that = this;
297
+          var that = this
296 298
           this.$confirm('是否退费', '退费', {
297 299
             confirmButtonText: '确 定',
298 300
             cancelButtonText: '取 消',
@@ -302,14 +304,14 @@
302 304
               'order_id': row.id,
303 305
               'patient_id': row.patient_id,
304 306
               'record_time': that.getTimes(row.settle_accounts_date),
305
-              'admin_user_id': that.$store.getters.xt_user.user.id,
306
-            };
307
+              'admin_user_id': that.$store.getters.xt_user.user.id
308
+            }
307 309
             axios.get('http://127.0.0.1:9532/api/refund/post', {
308 310
               params: params
309 311
             })
310
-              .then(function (response) {
312
+              .then(function(response) {
311 313
                 if (response.data.state == 0) {
312
-                  that.$message.error(response.data.msg);
314
+                  that.$message.error(response.data.msg)
313 315
                   return false
314 316
                 } else {
315 317
                   if (response.data.data.failed_code == -10) {
@@ -322,17 +324,59 @@
322 324
                     }).catch(() => {
323 325
                     })
324 326
                   } else {
325
-                    that.$message({message: '退费成功', type: 'success', duration: 5000});
327
+                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
326 328
                     that.getHisOrderList()
327 329
 
328 330
                   }
329 331
                 }
330 332
               })
331
-              .catch(function (error) {
333
+              .catch(function(error) {
332 334
               })
333 335
           }).catch(() => {
334 336
           })
335 337
 
338
+        } else if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
339
+
340
+          this.$confirm('是否退费', '退费', {
341
+            confirmButtonText: '确 定',
342
+            cancelButtonText: '取 消',
343
+            type: 'warning'
344
+          }).then(() => {
345
+            let params = {
346
+              'order_id': row.id,
347
+              'patient_id': row.patient_id,
348
+              'record_time': that.getTimes(row.settle_accounts_date),
349
+              'admin_user_id': that.$store.getters.xt_user.user.id
350
+            }
351
+            axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
352
+              params: params
353
+            })
354
+              .then(function(response) {
355
+                if (response.data.state == 0) {
356
+                  that.$message.error(response.data.msg)
357
+                  return false
358
+                } else {
359
+                  if (response.data.data.failed_code == -10) {
360
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
361
+                      confirmButtonText: '确 定',
362
+                      type: 'warning'
363
+                    }).then(() => {
364
+
365
+                    }).catch(() => {
366
+                    })
367
+
368
+                  } else {
369
+                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
370
+                    that.getHisOrderList()
371
+                  }
372
+                }
373
+              })
374
+              .catch(function(error) {
375
+              })
376
+
377
+          }).catch(() => {
378
+          })
379
+
336 380
         } else {
337 381
           this.$confirm('是否退费', '退费', {
338 382
             confirmButtonText: '确 定',
@@ -344,13 +388,13 @@
344 388
               'patient_id': this.patientInfo.id,
345 389
               'record_time': this.record_date
346 390
 
347
-            };
391
+            }
348 392
             Refund(params).then(response => {
349 393
               if (response.data.state == 0) {
350
-                this.$message.error(response.data.msg);
394
+                this.$message.error(response.data.msg)
351 395
                 return false
352 396
               } else {
353
-                this.$message({message: '退费成功', type: 'success'});
397
+                this.$message({ message: '退费成功', type: 'success' })
354 398
                 this.getHisOrderList()
355 399
               }
356 400
             })
@@ -360,65 +404,64 @@
360 404
       },
361 405
       toPrint(row) {
362 406
         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) {
363
-          this.statementVisible9504 = true;
407
+          this.statementVisible9504 = true
364 408
           let obj = {
365 409
             order_id: row.id,
366 410
             patient_id: row.patient_id,
367 411
             record_time: this.getTimes(row.settle_accounts_date),
368 412
             admin_user_id: this.$store.getters.xt_user.user.id
369
-          };
413
+          }
370 414
           this.orderObj9504 = obj
371 415
         } else {
372
-          this.statementVisible = true;
416
+          this.statementVisible = true
373 417
           let obj = {
374 418
             order_id: row.id,
375
-            settle_type:row.settle_type,
376
-            start_time:row.settle_start_time,
377
-            end_time:row.settle_end_time,
378
-          };
419
+            settle_type: row.settle_type,
420
+            start_time: row.settle_start_time,
421
+            end_time: row.settle_end_time
422
+          }
379 423
           this.orderObj = obj
380 424
         }
381 425
 
382 426
       },
383 427
       settlementPrint(row) {
384
-        this.settlementVisible = true;
428
+        this.settlementVisible = true
385 429
         let obj = {
386 430
           order_id: row.id
387
-        };
431
+        }
388 432
         this.settlementObj = obj
389 433
       },
390 434
       export_detail() {
391 435
         let params = {
392 436
           start_time: this.start_time,
393 437
           end_time: this.end_time,
394
-          p_type: 2,
395
-        };
438
+          p_type: 2
439
+        }
396 440
         getExportConsumeDetailList(params).then(response => {
397 441
           if (response.data.state == 0) {
398
-            this.$message.error(response.data.msg);
442
+            this.$message.error(response.data.msg)
399 443
             return false
400 444
           } else {
401 445
 
402
-            let list = [];
446
+            let list = []
403 447
             for (let i = 0; i < response.data.data.order.length; i++) {
404
-              let order = response.data.data.order[i];
405
-              let number = '';
406
-              let name = '';
407
-              let department = '';
408
-              let doctor_name = '';
409
-              let balance_accounts = '';
410
-              let order_status = '';
411
-              let charge_name = '';
412
-
413
-              let insutypeName = "";
414
-
415
-              let time = "";
448
+              let order = response.data.data.order[i]
449
+              let number = ''
450
+              let name = ''
451
+              let department = ''
452
+              let doctor_name = ''
453
+              let balance_accounts = ''
454
+              let order_status = ''
455
+              let charge_name = ''
456
+
457
+              let insutypeName = ''
458
+
459
+              let time = ''
416 460
               if (order.his_patient != null && order.his_patient.number.length > 0) {
417 461
                 number = order.his_patient.number
418 462
 
419 463
               }
420 464
 
421
-
422 465
               if (order.his_patient != null) {
423 466
                 if (order.his_patient.balance_accounts_type == 1) {
424 467
                   balance_accounts = '自费'
@@ -448,14 +491,12 @@
448 491
               }
449 492
               if (order.insutype == '390') {
450 493
 
451
-                insutypeName = "城乡居民基本医疗保险"
494
+                insutypeName = '城乡居民基本医疗保险'
452 495
               } else if (order.insutype == '310') {
453
-                insutypeName = "职工基本医疗保险"
454
-
496
+                insutypeName = '职工基本医疗保险'
455 497
 
456 498
               }
457 499
 
458
-
459 500
               if (order.order_status == 1) {
460 501
                 order_status = '待结算'
461 502
               }
@@ -474,36 +515,38 @@
474 515
                 time = this.getTimes(order.settle_accounts_date)
475 516
               }
476 517
 
477
-              var hifmi_pay = 0.00;
518
+              var hifmi_pay = 0.00
478 519
 
479
-              if(order.setl_detail.length > 0){
480
-                var jsonObj = JSON.parse(order.setl_detail);
520
+              if (order.setl_detail.length > 0) {
521
+                var jsonObj = JSON.parse(order.setl_detail)
481 522
                 for (let i = 0; i < jsonObj.length; i++) {
482 523
                   if (order.insutype == '310') {
483 524
                     if (jsonObj[i].fund_pay_type == '310300') {
484 525
                       hifmi_pay = jsonObj[i].fund_payamt
485 526
                     }
486 527
 
487
-                  } else if (order.insutype == '390')
528
+                  } else if (order.insutype == '390') {
488 529
                     if (order.fund_pay_type == '390200') {
489 530
                       hifmi_pay = jsonObj[i].fund_payamt
490 531
                     }
532
+                  }
491 533
                 }
492 534
               }
493
-              var hifmi_pay = 0.00;
535
+              var hifmi_pay = 0.00
494 536
 
495
-              if(order.setl_detail.length > 0){
496
-                var jsonObj = JSON.parse(order.setl_detail);
537
+              if (order.setl_detail.length > 0) {
538
+                var jsonObj = JSON.parse(order.setl_detail)
497 539
                 for (let i = 0; i < jsonObj.length; i++) {
498 540
                   if (order.insutype == '310') {
499 541
                     if (jsonObj[i].fund_pay_type == '310300') {
500 542
                       hifmi_pay = jsonObj[i].fund_payamt
501 543
                     }
502 544
                   }
503
-                  if (order.insutype == '390')
545
+                  if (order.insutype == '390') {
504 546
                     if (jsonObj[i].fund_pay_type == '390200') {
505 547
                       hifmi_pay = jsonObj[i].fund_payamt
506 548
                     }
549
+                  }
507 550
                 }
508 551
               }
509 552
 
@@ -535,14 +578,14 @@
535 578
                 '收费时间': order.setl_time,
536 579
                 '收费状态': order_status,
537 580
                 '退费日期': ''
538
-              };
581
+              }
539 582
 
540 583
               list.push(obj)
541 584
             }
542 585
             import('@/vendor/Export2Excel').then(excel => {
543
-              const tHeader = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
544
-              const filterVal = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
545
-              const data = this.formatJson(filterVal, list);
586
+              const tHeader = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
587
+              const filterVal = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
588
+              const data = this.formatJson(filterVal, list)
546 589
               excel.export_json_to_excel({
547 590
                 header: tHeader,
548 591
                 data,
@@ -557,30 +600,30 @@
557 600
         return jsonData.map(v => filterVal.map(j => v[j]))
558 601
       },
559 602
       changeDoctor() {
560
-        this.page = 1;
561
-        this.keywords = '';
603
+        this.page = 1
604
+        this.keywords = ''
562 605
         this.getHisOrderList()
563 606
       },
564 607
       handleSizeChange(limit) {
565
-        this.limit = limit;
608
+        this.limit = limit
566 609
         this.getHisOrderList()
567 610
 
568 611
       }, handleCurrentChange(page) {
569
-        this.page = page;
612
+        this.page = page
570 613
         this.getHisOrderList()
571 614
 
572 615
       },
573 616
       handleStartTimeChange() {
574
-        this.page = 1;
575
-        this.keywords = '';
617
+        this.page = 1
618
+        this.keywords = ''
576 619
         this.getHisOrderList()
577 620
       }, handleEndTimeChange() {
578
-        this.page = 1;
579
-        this.keywords = '';
621
+        this.page = 1
622
+        this.keywords = ''
580 623
         this.getHisOrderList()
581 624
       },
582 625
       searchAction() {
583
-        this.page = 1;
626
+        this.page = 1
584 627
         this.getHisOrderList()
585 628
 
586 629
       },
@@ -602,14 +645,14 @@
602 645
           start_time: this.start_time,
603 646
           end_time: this.end_time,
604 647
           type: this.admin_user_id,
605
-          p_type: 2,
606
-        };
648
+          p_type: 2
649
+        }
607 650
         getHisOrderList(params).then(response => {
608 651
           if (response.data.state == 0) {
609
-            this.$message.error(response.data.msg);
652
+            this.$message.error(response.data.msg)
610 653
             return false
611 654
           } else {
612
-            this.tableData = response.data.data.order;
655
+            this.tableData = response.data.data.order
613 656
             this.total = response.data.data.total
614 657
           }
615 658
         })
@@ -617,7 +660,7 @@
617 660
       }, getDoctorList() {
618 661
         getDoctorList().then(response => {
619 662
           if (response.data.state == 0) {
620
-            this.$message.error(response.data.msg);
663
+            this.$message.error(response.data.msg)
621 664
             return false
622 665
           } else {
623 666
             this.doctors = response.data.data.doctors
@@ -632,7 +675,7 @@
632 675
         }
633 676
       },
634 677
       invoicePrint(obj) {
635
-        console.log(obj);
678
+        console.log(obj)
636 679
         let paramsObj = {
637 680
           order_id: obj.id,
638 681
           patient_id: obj.patient_id,
@@ -640,18 +683,16 @@
640 683
           age: obj.age,
641 684
           gend: obj.gend,
642 685
           setl_time: obj.setl_time
643
-        };
644
-        this.invoiceParams = paramsObj;
686
+        }
687
+        this.invoiceParams = paramsObj
645 688
         this.invoiceVisible = true
646 689
       }
647 690
     }, created() {
648 691
 
649
-
650
-      this.fetchAllAdminUsers();
651
-      this.getDoctorList();
692
+      this.fetchAllAdminUsers()
693
+      this.getDoctorList()
652 694
       this.getHisOrderList()
653 695
 
654
-
655 696
     }
656 697
   }
657 698
 </script>

+ 7 - 10
src/xt_pages/outpatientDoctorStation/print.vue Просмотреть файл

@@ -11,7 +11,7 @@
11 11
           >打印</el-button
12 12
         >
13 13
       </template>
14
-            
14
+
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16 16
       <div v-if="org_id != 10138">
17 17
         <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
@@ -74,9 +74,8 @@ export default {
74 74
     printThisPage() {
75 75
       var ptime = Math.round(new Date().getTime() / 1000);
76 76
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
77
-      
77
+
78 78
       if(this.org_id == 10138){
79
-        
80 79
         const style =
81 80
         '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}}';
82 81
         printJS({
@@ -95,7 +94,6 @@ export default {
95 94
           scanStyles: false
96 95
         });
97 96
       }
98
-      
99 97
 
100 98
       // if (this.org_template_info.template_id == 1) {
101 99
       //   printJS({
@@ -110,10 +108,10 @@ export default {
110 108
       getAllDoctorList().then(response=>{
111 109
         if(response.data.state == 1){
112 110
                var doctor =  response.data.data.doctor
113
-               
111
+
114 112
                this.doctorList = doctor
115 113
              }
116
-         })   
114
+         })
117 115
      },
118 116
     getAllHisPatientList(){
119 117
          const params = {
@@ -124,7 +122,6 @@ export default {
124 122
             this.patientTableData = response.data.data.list
125 123
             this.patientTableDataTwo = response.data.data.list
126 124
 
127
-            console.log('222', this.patientTableData)
128 125
             let cal_one = 0
129 126
             let cal_two = 0
130 127
             for (let i = 0; i < response.data.data.list.length; i++) {
@@ -139,7 +136,7 @@ export default {
139 136
             // console.log(this.patientTableData[0])
140 137
             // this.choosePatient(this.patientTableData[0])
141 138
             this.cal_one = cal_one
142
-            this.cal_two = cal_two   
139
+            this.cal_two = cal_two
143 140
          }
144 141
       })
145 142
     },
@@ -174,7 +171,7 @@ export default {
174 171
     searchAction(){
175 172
 
176 173
     }
177
-    
174
+
178 175
   },
179 176
 
180 177
   created() {
@@ -377,7 +374,7 @@ export default {
377 374
   .dialysisPage::-webkit-scrollbar {
378 375
     height: 15px;
379 376
   }
380
-  
377
+
381 378
   .el-date-editor{
382 379
     .el-input__inner{
383 380
       padding-right:0px;

+ 3 - 3
src/xt_pages/outpatientRegistration/index.vue Просмотреть файл

@@ -1035,12 +1035,9 @@
1035 1035
                   var patient = response.data.data.patient
1036 1036
                   this.getTodaySchedulePatient()
1037 1037
                   this.$message({ message: '挂号成功', type: 'success' })
1038
-                  this.form.settlementValue = ''
1039 1038
                   this.form.medicalInsuranceCard = ''
1040 1039
                   this.form.name = ''
1041 1040
                   this.form.sex = ''
1042
-                  this.form.certificates = ''
1043
-                  this.form.medicalCare = ''
1044 1041
                   this.form.birthday = ''
1045 1042
                   this.form.age = ''
1046 1043
                   this.form.idCard = ''
@@ -1058,6 +1055,9 @@
1058 1055
                   this.form.p_type = 14
1059 1056
                   this.form.sick_type = this.sick[0].id
1060 1057
                   this.form.diagnosis = this.diagnoses[0].id
1058
+                  this.form.certificates = 2
1059
+                  this.form.id_card_type = 1
1060
+                  this.form.settlementValue = 1
1061 1061
 
1062 1062
                 } else {
1063 1063
                   this.$message.error('今日患者已挂号!')

+ 63 - 32
src/xt_pages/outpatientRegistration/registrationHistory.vue Просмотреть файл

@@ -457,6 +457,10 @@
457 457
   const moment = require('moment')
458 458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
459 459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
460
+
461
+  import { refundNumber} from '@/api/his/his'
462
+
463
+
460 464
   import { uParseTime } from '@/utils/tools'
461 465
   import { getDictionaryDataConfig } from '@/utils/data'
462 466
   import axios from 'axios'
@@ -715,45 +719,72 @@
715 719
         }
716 720
         return ''
717 721
       }, toReturnSZPatient(val) {
718
-        var that = this
719
-        this.$confirm('是否退号', '退号', {
720
-          confirmButtonText: '确 定',
721
-          cancelButtonText: '取 消',
722
-          type: 'warning'
723
-        }).then(() => {
724
-          axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
725
-            params: {
726
-              order_id: 0,
727
-              record_time: this.getTime(val.record_date, '{y}-{m}-{d}'),
728
-              admin_user_id: this.$store.getters.xt_user.user.id,
729
-              patient_id: val.patient_id
730
-            }
731
-          })
732
-            .then(function(response) {
722
+        if(val.balance_accounts_type == 2){
723
+          this.$confirm('是否退费', '退费', {
724
+            confirmButtonText: '确 定',
725
+            cancelButtonText: '取 消',
726
+            type: 'warning'
727
+          }).then(() => {
728
+            let params = {
729
+              'id': val.id,
730
+            };
731
+            refundNumber(params).then(response => {
733 732
               if (response.data.state == 0) {
734
-                that.$message.error(response.data.msg)
733
+                this.$message.error(response.data.msg);
734
+                this.loadingtwo = false;
735 735
                 return false
736 736
               } else {
737
-                if (response.data.data.failed_code == -10) {
738
-                  that.$confirm(response.data.data.msg, '医保错误信息', {
739
-                    confirmButtonText: '确 定',
740
-                    type: 'warning'
741
-                  }).then(() => {
742
-
743
-                  }).catch(() => {
744
-                  })
745
-                  // that.$message.error(response.data.data.msg)
737
+                this.getlist()
738
+                this.$message({ message: '退号成功', type: 'success' });
746 739
 
747
-                } else {
748
-                  that.getlist()
749
-                  that.$message({ message: '退号成功', type: 'success' })
750
-                }
751 740
               }
752 741
             })
753
-            .catch(function(error) {
742
+
743
+          }).catch(() => {
744
+
745
+          })
746
+
747
+        }else{
748
+          var that = this
749
+          this.$confirm('是否退号', '退号', {
750
+            confirmButtonText: '确 定',
751
+            cancelButtonText: '取 消',
752
+            type: 'warning'
753
+          }).then(() => {
754
+            axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
755
+              params: {
756
+                order_id: 0,
757
+                record_time: this.getTime(val.record_date, '{y}-{m}-{d}'),
758
+                admin_user_id: this.$store.getters.xt_user.user.id,
759
+                patient_id: val.patient_id
760
+              }
754 761
             })
755
-        }).catch(() => {
756
-        })
762
+              .then(function(response) {
763
+                if (response.data.state == 0) {
764
+                  that.$message.error(response.data.msg)
765
+                  return false
766
+                } else {
767
+                  if (response.data.data.failed_code == -10) {
768
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
769
+                      confirmButtonText: '确 定',
770
+                      type: 'warning'
771
+                    }).then(() => {
772
+
773
+                    }).catch(() => {
774
+                    })
775
+                    // that.$message.error(response.data.data.msg)
776
+
777
+                  } else {
778
+                    that.getlist()
779
+                    that.$message({ message: '退号成功', type: 'success' })
780
+                  }
781
+                }
782
+              })
783
+              .catch(function(error) {
784
+              })
785
+          }).catch(() => {
786
+          })
787
+        }
757 788
       },
758 789
       toReturnPatient(row) {
759 790
         var that = this