瀏覽代碼

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

see999 3 年之前
父節點
當前提交
3d9c9831bd

+ 9 - 0
src/api/his/his.js 查看文件

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
 
193
 
194
                                                 <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
194
                                                 <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
195
                                                     <el-button
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
                                                             size="small"
198
                                                             size="small"
199
                                                             @click="sz_open(8,items.med_type,items.prescriptions[0].order)"
199
                                                             @click="sz_open(8,items.med_type,items.prescriptions[0].order)"
210
                                                     </el-button>
210
                                                     </el-button>
211
 
211
 
212
                                                     <el-button
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
                                                             size="small"
214
                                                             size="small"
215
                                                             @click="sz_open(3,items.med_type,items.prescriptions[0].order,items.prescriptions)"
215
                                                             @click="sz_open(3,items.med_type,items.prescriptions[0].order,items.prescriptions)"
216
                                                             type="primary">收费
216
                                                             type="primary">收费
263
                                             <span>医疗费总额:<span style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt ?  items.curPrescriptions.order.medfee_sumamt:getTotalFour(items.prescriptions)?getTotalFour(items.prescriptions):'' }}元</span></span>
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
                                             <span>基金支付金额:<span style="color:red;">{{ items.curPrescriptions.order.fund_pay_sumamt?items.curPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
264
                                             <span>基金支付金额:<span style="color:red;">{{ items.curPrescriptions.order.fund_pay_sumamt?items.curPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
265
                                             <span>个人账户支付金额:<span style="color:red;">{{ items.curPrescriptions.order.acct_pay?items.curPrescriptions.order.acct_pay:''}}元</span></span>
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
                                             <span>个人账户金额:<span style="color:red;">{{ items.curPrescriptions.order.account_price?items.curPrescriptions.order.account_price:''}}元</span></span>
269
                                             <span>个人账户金额:<span style="color:red;">{{ items.curPrescriptions.order.account_price?items.curPrescriptions.order.account_price:''}}元</span></span>
268
 
270
 
269
 
271
 
433
                                                     <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
435
                                                     <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
434
 
436
 
435
                                                     <el-button
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
                                                             size="small"
440
                                                             size="small"
439
                                                             @click="sz_open(8,items.med_type,items.curMonthPrescriptions.order)"
441
                                                             @click="sz_open(8,items.med_type,items.curMonthPrescriptions.order)"
450
                                                         </el-button>
452
                                                         </el-button>
451
 
453
 
452
                                                         <el-button
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
                                                                 size="small"
456
                                                                 size="small"
455
                                                                 @click="sz_open(3,items.med_type,items.curMonthPrescriptions.order, items.month_prescriptions)"
457
                                                                 @click="sz_open(3,items.med_type,items.curMonthPrescriptions.order, items.month_prescriptions)"
456
                                                                 type="primary">收费
458
                                                                 type="primary">收费
506
                                                 <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>
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
                                                 <span>基金支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.fund_pay_sumamt?items.curMonthPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
509
                                                 <span>基金支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.fund_pay_sumamt?items.curMonthPrescriptions.order.fund_pay_sumamt:''}}元</span></span>
508
                                                 <span>个人账户支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.acct_pay?items.curMonthPrescriptions.order.acct_pay:''}}元</span></span>
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
                                             </div>
520
                                             </div>
513
 
521
 
657
     preSettle,
665
     preSettle,
658
     Refund,
666
     Refund,
659
     register,
667
     register,
660
-    upload
668
+    upload,
669
+    refundNumber
661
   } from '@/api/his/his'
670
   } from '@/api/his/his'
662
   import RegisterDialog from './components/registerDialog'
671
   import RegisterDialog from './components/registerDialog'
663
   import treatPrint from './treatPrint'
672
   import treatPrint from './treatPrint'
2704
           // this.$refs.print.getInfo(this.order.id)
2713
           // this.$refs.print.getInfo(this.order.id)
2705
 
2714
 
2706
         } else if (index == 10) {
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
                 if (response.data.state == 0) {
2726
                 if (response.data.state == 0) {
2725
-                  that.$message.error(response.data.msg)
2727
+                  this.$message.error(response.data.msg);
2726
                   return false
2728
                   return false
2727
                 } else {
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
         } else if (index == 11) {
2783
         } else if (index == 11) {
2751
           let params = {
2784
           let params = {
2752
             'order_id': this.order.id,
2785
             'order_id': this.order.id,
4295
 
4328
 
4296
             }
4329
             }
4297
 
4330
 
4298
-
4299
             break
4331
             break
4300
           case 4:
4332
           case 4:
4301
             break
4333
             break
4306
               cancelButtonText: '取 消',
4338
               cancelButtonText: '取 消',
4307
               type: 'warning'
4339
               type: 'warning'
4308
             }).then(() => {
4340
             }).then(() => {
4309
-              if(that.hisPatientInfo.balance_accounts_type == 2){
4341
+              if (that.hisPatientInfo.balance_accounts_type == 2) {
4310
                 let params = {
4342
                 let params = {
4311
                   'order_id': that.order.id,
4343
                   'order_id': that.order.id,
4312
                   'number': that.order.number,
4344
                   'number': that.order.number,
4316
                 }
4348
                 }
4317
                 Refund(params).then(response => {
4349
                 Refund(params).then(response => {
4318
                   if (response.data.state == 0) {
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
                     return false
4353
                     return false
4322
                   } else {
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
                 axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
4364
                 axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
4333
                   params: {
4365
                   params: {
4355
                   .catch(function(error) {
4387
                   .catch(function(error) {
4356
                   })
4388
                   })
4357
 
4389
 
4358
-
4359
               }
4390
               }
4360
 
4391
 
4361
             }).catch(() => {
4392
             }).catch(() => {
4430
 
4461
 
4431
             break
4462
             break
4432
           case 8:
4463
           case 8:
4433
-            if(this.hisPatientInfo.balance_accounts_type == 2){
4464
+            if (this.hisPatientInfo.balance_accounts_type == 2) {
4434
 
4465
 
4435
               this.$confirm('是否进行预结算', '预结算', {
4466
               this.$confirm('是否进行预结算', '预结算', {
4436
                 confirmButtonText: '确 定',
4467
                 confirmButtonText: '确 定',
4437
                 cancelButtonText: '取 消',
4468
                 cancelButtonText: '取 消',
4438
                 type: 'warning'
4469
                 type: 'warning'
4439
               }).then(() => {
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
                 preSettle(form).then(response => {
4489
                 preSettle(form).then(response => {
4441
                   if (response.data.state == 0) {
4490
                   if (response.data.state == 0) {
4442
                     this.$message.error(response.data.msg)
4491
                     this.$message.error(response.data.msg)
4451
 
4500
 
4452
               })
4501
               })
4453
 
4502
 
4454
-
4455
-            }else{
4503
+            } else {
4456
               var that = this
4504
               var that = this
4457
               let form = {}
4505
               let form = {}
4458
               form['id'] = this.patientInfo.id
4506
               form['id'] = this.patientInfo.id
4508
               }).catch(() => {
4556
               }).catch(() => {
4509
 
4557
 
4510
               })
4558
               })
4511
-              break
4512
-
4513
-
4514
 
4559
 
4515
             }
4560
             }
4516
 
4561
 
4562
+            break
4517
 
4563
 
4518
           case 10:
4564
           case 10:
4519
             this.newStatementVisible = true
4565
             this.newStatementVisible = true
4523
               prescription_id: this.prescription_id,
4569
               prescription_id: this.prescription_id,
4524
               order_id: this.order.id,
4570
               order_id: this.order.id,
4525
               admin_user_id: this.$store.getters.xt_user.user.id,
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
             this.newOrderObj = obj
4576
             this.newOrderObj = obj
4531
             // this.$refs.print.getInfo(this.order.id)
4577
             // this.$refs.print.getInfo(this.order.id)
4532
             break
4578
             break
4533
           case 11:
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
                   if (response.data.state == 0) {
4590
                   if (response.data.state == 0) {
4551
-                    that.$message.error(response.data.msg)
4591
+                    this.$message.error(response.data.msg);
4552
                     return false
4592
                     return false
4553
                   } else {
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
     mounted() {
4647
     mounted() {

+ 307 - 266
src/xt_pages/outpatientCharges/summary.vue 查看文件

1
 <template>
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
         </div>
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
         </div>
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
 </template>
187
 </template>
188
 
188
 
189
 
189
 
190
 <script>
190
 <script>
191
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   import NewStatementPrint from './newStatementPrint'
194
   import NewStatementPrint from './newStatementPrint'
195
   import listPrint from './listPrint'
195
   import listPrint from './listPrint'
196
   import allListPrint from './allListPrint'
196
   import allListPrint from './allListPrint'
197
   import NewStatementPrintTwo from './newStatementPrintTwo'
197
   import NewStatementPrintTwo from './newStatementPrintTwo'
198
-  import {fetchAllAdminUsers} from '@/api/doctor'
198
+  import { fetchAllAdminUsers } from '@/api/doctor'
199
   import axios from 'axios'
199
   import axios from 'axios'
200
   import invoicePrint from './invoicePrint'
200
   import invoicePrint from './invoicePrint'
201
   import settlementPrint from './settlementPrint'
201
   import settlementPrint from './settlementPrint'
217
         statementVisible9504: false,
217
         statementVisible9504: false,
218
         orderObj9504: {},
218
         orderObj9504: {},
219
         crumbs: [
219
         crumbs: [
220
-          {path: false, name: '门诊收费'},
221
-          {path: false, name: '项目消费明细汇总'}
220
+          { path: false, name: '门诊收费' },
221
+          { path: false, name: '项目消费明细汇总' }
222
         ],
222
         ],
223
         tableData: [],
223
         tableData: [],
224
         limit: 10,
224
         limit: 10,
242
     },
242
     },
243
     methods: {
243
     methods: {
244
       uploadInfo(row) {
244
       uploadInfo(row) {
245
-        var that = this;
245
+        var that = this
246
         axios.get('http://127.0.0.1:9532/api/settlelist/get', {
246
         axios.get('http://127.0.0.1:9532/api/settlelist/get', {
247
           params: {
247
           params: {
248
             order_id: row.id,
248
             order_id: row.id,
249
             admin_user_id: this.$store.getters.xt_user.user.id
249
             admin_user_id: this.$store.getters.xt_user.user.id
250
           }
250
           }
251
-        }).then(function (response) {
251
+        }).then(function(response) {
252
           if (response.data.state == 0) {
252
           if (response.data.state == 0) {
253
-            that.$message.error(response.data.msg);
253
+            that.$message.error(response.data.msg)
254
             return false
254
             return false
255
           } else {
255
           } else {
256
 
256
 
265
               })
265
               })
266
 
266
 
267
             } else {
267
             } else {
268
-              that.$message.success("上传成功");
268
+              that.$message.success('上传成功')
269
               row.result.id = response.data.data.result.id
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
         }
290
         }
292
 
291
 
293
       }, toRefund(row) {
292
       }, toRefund(row) {
293
+
294
+
295
+
294
         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) {
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
           this.$confirm('是否退费', '退费', {
298
           this.$confirm('是否退费', '退费', {
297
             confirmButtonText: '确 定',
299
             confirmButtonText: '确 定',
298
             cancelButtonText: '取 消',
300
             cancelButtonText: '取 消',
302
               'order_id': row.id,
304
               'order_id': row.id,
303
               'patient_id': row.patient_id,
305
               'patient_id': row.patient_id,
304
               'record_time': that.getTimes(row.settle_accounts_date),
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
             axios.get('http://127.0.0.1:9532/api/refund/post', {
309
             axios.get('http://127.0.0.1:9532/api/refund/post', {
308
               params: params
310
               params: params
309
             })
311
             })
310
-              .then(function (response) {
312
+              .then(function(response) {
311
                 if (response.data.state == 0) {
313
                 if (response.data.state == 0) {
312
-                  that.$message.error(response.data.msg);
314
+                  that.$message.error(response.data.msg)
313
                   return false
315
                   return false
314
                 } else {
316
                 } else {
315
                   if (response.data.data.failed_code == -10) {
317
                   if (response.data.data.failed_code == -10) {
322
                     }).catch(() => {
324
                     }).catch(() => {
323
                     })
325
                     })
324
                   } else {
326
                   } else {
325
-                    that.$message({message: '退费成功', type: 'success', duration: 5000});
327
+                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
326
                     that.getHisOrderList()
328
                     that.getHisOrderList()
327
 
329
 
328
                   }
330
                   }
329
                 }
331
                 }
330
               })
332
               })
331
-              .catch(function (error) {
333
+              .catch(function(error) {
332
               })
334
               })
333
           }).catch(() => {
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
         } else {
380
         } else {
337
           this.$confirm('是否退费', '退费', {
381
           this.$confirm('是否退费', '退费', {
338
             confirmButtonText: '确 定',
382
             confirmButtonText: '确 定',
344
               'patient_id': this.patientInfo.id,
388
               'patient_id': this.patientInfo.id,
345
               'record_time': this.record_date
389
               'record_time': this.record_date
346
 
390
 
347
-            };
391
+            }
348
             Refund(params).then(response => {
392
             Refund(params).then(response => {
349
               if (response.data.state == 0) {
393
               if (response.data.state == 0) {
350
-                this.$message.error(response.data.msg);
394
+                this.$message.error(response.data.msg)
351
                 return false
395
                 return false
352
               } else {
396
               } else {
353
-                this.$message({message: '退费成功', type: 'success'});
397
+                this.$message({ message: '退费成功', type: 'success' })
354
                 this.getHisOrderList()
398
                 this.getHisOrderList()
355
               }
399
               }
356
             })
400
             })
360
       },
404
       },
361
       toPrint(row) {
405
       toPrint(row) {
362
         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) {
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
           let obj = {
408
           let obj = {
365
             order_id: row.id,
409
             order_id: row.id,
366
             patient_id: row.patient_id,
410
             patient_id: row.patient_id,
367
             record_time: this.getTimes(row.settle_accounts_date),
411
             record_time: this.getTimes(row.settle_accounts_date),
368
             admin_user_id: this.$store.getters.xt_user.user.id
412
             admin_user_id: this.$store.getters.xt_user.user.id
369
-          };
413
+          }
370
           this.orderObj9504 = obj
414
           this.orderObj9504 = obj
371
         } else {
415
         } else {
372
-          this.statementVisible = true;
416
+          this.statementVisible = true
373
           let obj = {
417
           let obj = {
374
             order_id: row.id,
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
           this.orderObj = obj
423
           this.orderObj = obj
380
         }
424
         }
381
 
425
 
382
       },
426
       },
383
       settlementPrint(row) {
427
       settlementPrint(row) {
384
-        this.settlementVisible = true;
428
+        this.settlementVisible = true
385
         let obj = {
429
         let obj = {
386
           order_id: row.id
430
           order_id: row.id
387
-        };
431
+        }
388
         this.settlementObj = obj
432
         this.settlementObj = obj
389
       },
433
       },
390
       export_detail() {
434
       export_detail() {
391
         let params = {
435
         let params = {
392
           start_time: this.start_time,
436
           start_time: this.start_time,
393
           end_time: this.end_time,
437
           end_time: this.end_time,
394
-          p_type: 2,
395
-        };
438
+          p_type: 2
439
+        }
396
         getExportConsumeDetailList(params).then(response => {
440
         getExportConsumeDetailList(params).then(response => {
397
           if (response.data.state == 0) {
441
           if (response.data.state == 0) {
398
-            this.$message.error(response.data.msg);
442
+            this.$message.error(response.data.msg)
399
             return false
443
             return false
400
           } else {
444
           } else {
401
 
445
 
402
-            let list = [];
446
+            let list = []
403
             for (let i = 0; i < response.data.data.order.length; i++) {
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
               if (order.his_patient != null && order.his_patient.number.length > 0) {
460
               if (order.his_patient != null && order.his_patient.number.length > 0) {
417
                 number = order.his_patient.number
461
                 number = order.his_patient.number
418
 
462
 
419
               }
463
               }
420
 
464
 
421
-
422
               if (order.his_patient != null) {
465
               if (order.his_patient != null) {
423
                 if (order.his_patient.balance_accounts_type == 1) {
466
                 if (order.his_patient.balance_accounts_type == 1) {
424
                   balance_accounts = '自费'
467
                   balance_accounts = '自费'
448
               }
491
               }
449
               if (order.insutype == '390') {
492
               if (order.insutype == '390') {
450
 
493
 
451
-                insutypeName = "城乡居民基本医疗保险"
494
+                insutypeName = '城乡居民基本医疗保险'
452
               } else if (order.insutype == '310') {
495
               } else if (order.insutype == '310') {
453
-                insutypeName = "职工基本医疗保险"
454
-
496
+                insutypeName = '职工基本医疗保险'
455
 
497
 
456
               }
498
               }
457
 
499
 
458
-
459
               if (order.order_status == 1) {
500
               if (order.order_status == 1) {
460
                 order_status = '待结算'
501
                 order_status = '待结算'
461
               }
502
               }
474
                 time = this.getTimes(order.settle_accounts_date)
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
                 for (let i = 0; i < jsonObj.length; i++) {
522
                 for (let i = 0; i < jsonObj.length; i++) {
482
                   if (order.insutype == '310') {
523
                   if (order.insutype == '310') {
483
                     if (jsonObj[i].fund_pay_type == '310300') {
524
                     if (jsonObj[i].fund_pay_type == '310300') {
484
                       hifmi_pay = jsonObj[i].fund_payamt
525
                       hifmi_pay = jsonObj[i].fund_payamt
485
                     }
526
                     }
486
 
527
 
487
-                  } else if (order.insutype == '390')
528
+                  } else if (order.insutype == '390') {
488
                     if (order.fund_pay_type == '390200') {
529
                     if (order.fund_pay_type == '390200') {
489
                       hifmi_pay = jsonObj[i].fund_payamt
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
                 for (let i = 0; i < jsonObj.length; i++) {
539
                 for (let i = 0; i < jsonObj.length; i++) {
498
                   if (order.insutype == '310') {
540
                   if (order.insutype == '310') {
499
                     if (jsonObj[i].fund_pay_type == '310300') {
541
                     if (jsonObj[i].fund_pay_type == '310300') {
500
                       hifmi_pay = jsonObj[i].fund_payamt
542
                       hifmi_pay = jsonObj[i].fund_payamt
501
                     }
543
                     }
502
                   }
544
                   }
503
-                  if (order.insutype == '390')
545
+                  if (order.insutype == '390') {
504
                     if (jsonObj[i].fund_pay_type == '390200') {
546
                     if (jsonObj[i].fund_pay_type == '390200') {
505
                       hifmi_pay = jsonObj[i].fund_payamt
547
                       hifmi_pay = jsonObj[i].fund_payamt
506
                     }
548
                     }
549
+                  }
507
                 }
550
                 }
508
               }
551
               }
509
 
552
 
535
                 '收费时间': order.setl_time,
578
                 '收费时间': order.setl_time,
536
                 '收费状态': order_status,
579
                 '收费状态': order_status,
537
                 '退费日期': ''
580
                 '退费日期': ''
538
-              };
581
+              }
539
 
582
 
540
               list.push(obj)
583
               list.push(obj)
541
             }
584
             }
542
             import('@/vendor/Export2Excel').then(excel => {
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
               excel.export_json_to_excel({
589
               excel.export_json_to_excel({
547
                 header: tHeader,
590
                 header: tHeader,
548
                 data,
591
                 data,
557
         return jsonData.map(v => filterVal.map(j => v[j]))
600
         return jsonData.map(v => filterVal.map(j => v[j]))
558
       },
601
       },
559
       changeDoctor() {
602
       changeDoctor() {
560
-        this.page = 1;
561
-        this.keywords = '';
603
+        this.page = 1
604
+        this.keywords = ''
562
         this.getHisOrderList()
605
         this.getHisOrderList()
563
       },
606
       },
564
       handleSizeChange(limit) {
607
       handleSizeChange(limit) {
565
-        this.limit = limit;
608
+        this.limit = limit
566
         this.getHisOrderList()
609
         this.getHisOrderList()
567
 
610
 
568
       }, handleCurrentChange(page) {
611
       }, handleCurrentChange(page) {
569
-        this.page = page;
612
+        this.page = page
570
         this.getHisOrderList()
613
         this.getHisOrderList()
571
 
614
 
572
       },
615
       },
573
       handleStartTimeChange() {
616
       handleStartTimeChange() {
574
-        this.page = 1;
575
-        this.keywords = '';
617
+        this.page = 1
618
+        this.keywords = ''
576
         this.getHisOrderList()
619
         this.getHisOrderList()
577
       }, handleEndTimeChange() {
620
       }, handleEndTimeChange() {
578
-        this.page = 1;
579
-        this.keywords = '';
621
+        this.page = 1
622
+        this.keywords = ''
580
         this.getHisOrderList()
623
         this.getHisOrderList()
581
       },
624
       },
582
       searchAction() {
625
       searchAction() {
583
-        this.page = 1;
626
+        this.page = 1
584
         this.getHisOrderList()
627
         this.getHisOrderList()
585
 
628
 
586
       },
629
       },
602
           start_time: this.start_time,
645
           start_time: this.start_time,
603
           end_time: this.end_time,
646
           end_time: this.end_time,
604
           type: this.admin_user_id,
647
           type: this.admin_user_id,
605
-          p_type: 2,
606
-        };
648
+          p_type: 2
649
+        }
607
         getHisOrderList(params).then(response => {
650
         getHisOrderList(params).then(response => {
608
           if (response.data.state == 0) {
651
           if (response.data.state == 0) {
609
-            this.$message.error(response.data.msg);
652
+            this.$message.error(response.data.msg)
610
             return false
653
             return false
611
           } else {
654
           } else {
612
-            this.tableData = response.data.data.order;
655
+            this.tableData = response.data.data.order
613
             this.total = response.data.data.total
656
             this.total = response.data.data.total
614
           }
657
           }
615
         })
658
         })
617
       }, getDoctorList() {
660
       }, getDoctorList() {
618
         getDoctorList().then(response => {
661
         getDoctorList().then(response => {
619
           if (response.data.state == 0) {
662
           if (response.data.state == 0) {
620
-            this.$message.error(response.data.msg);
663
+            this.$message.error(response.data.msg)
621
             return false
664
             return false
622
           } else {
665
           } else {
623
             this.doctors = response.data.data.doctors
666
             this.doctors = response.data.data.doctors
632
         }
675
         }
633
       },
676
       },
634
       invoicePrint(obj) {
677
       invoicePrint(obj) {
635
-        console.log(obj);
678
+        console.log(obj)
636
         let paramsObj = {
679
         let paramsObj = {
637
           order_id: obj.id,
680
           order_id: obj.id,
638
           patient_id: obj.patient_id,
681
           patient_id: obj.patient_id,
640
           age: obj.age,
683
           age: obj.age,
641
           gend: obj.gend,
684
           gend: obj.gend,
642
           setl_time: obj.setl_time
685
           setl_time: obj.setl_time
643
-        };
644
-        this.invoiceParams = paramsObj;
686
+        }
687
+        this.invoiceParams = paramsObj
645
         this.invoiceVisible = true
688
         this.invoiceVisible = true
646
       }
689
       }
647
     }, created() {
690
     }, created() {
648
 
691
 
649
-
650
-      this.fetchAllAdminUsers();
651
-      this.getDoctorList();
692
+      this.fetchAllAdminUsers()
693
+      this.getDoctorList()
652
       this.getHisOrderList()
694
       this.getHisOrderList()
653
 
695
 
654
-
655
     }
696
     }
656
   }
697
   }
657
 </script>
698
 </script>

+ 99 - 23
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

1383
                     addition: tempAddition,
1383
                     addition: tempAddition,
1384
                     order_status: 1,
1384
                     order_status: 1,
1385
                     pre_time: preTime,
1385
                     pre_time: preTime,
1386
-                    med_type: "",
1386
+                    med_type:"",
1387
+
1387
                   };
1388
                   };
1388
-                  if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1389
-                    obj.med_type = 13
1389
+                  if(prescription.med_type == 0 || prescription.med_type == ""){
1390
+
1391
+                    obj.med_type = ""
1390
 
1392
 
1391
                   }else{
1393
                   }else{
1392
-                    obj.med_type = 14
1393
 
1394
 
1395
+                    obj.med_type = parseInt(prescription.med_type)
1396
+                  }
1397
+                  if(obj.med_type== 0 || obj.med_type == "") {
1398
+                    if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
1399
+                      obj.med_type = 13
1400
+
1401
+                    } else {
1402
+                      obj.med_type = 14
1403
+
1404
+                    }
1394
                   }
1405
                   }
1395
                   this.prescriptions.push(obj)
1406
                   this.prescriptions.push(obj)
1396
                 }
1407
                 }
1795
                         var preTime = nowTime
1806
                         var preTime = nowTime
1796
 
1807
 
1797
 
1808
 
1809
+
1810
+
1811
+
1798
                         let index = i + 1;
1812
                         let index = i + 1;
1799
                         let obj = {
1813
                         let obj = {
1800
                           id: 0,
1814
                           id: 0,
1804
                           addition: tempAddition,
1818
                           addition: tempAddition,
1805
                           order_status: 1,
1819
                           order_status: 1,
1806
                           pre_time: preTime,
1820
                           pre_time: preTime,
1807
-                          med_type: "",
1821
+                          med_type:"",
1822
+
1808
                         };
1823
                         };
1809
-                        if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1810
-                          obj.med_type = 13
1824
+                        if(prescription.med_type == 0 || prescription.med_type == ""){
1825
+
1826
+                          obj.med_type = ""
1827
+
1811
                         }else{
1828
                         }else{
1812
-                          obj.med_type = 14
1813
 
1829
 
1830
+                          obj.med_type =  parseInt(prescription.med_type)
1831
+                        }
1832
+
1833
+
1834
+                        if(obj.med_type== 0 || obj.med_type == "") {
1835
+                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
1836
+                            obj.med_type = 13
1837
+
1838
+                          } else {
1839
+                            obj.med_type = 14
1840
+
1841
+                          }
1814
                         }
1842
                         }
1815
                         this.prescriptions.push(obj)
1843
                         this.prescriptions.push(obj)
1816
                       }
1844
                       }
2203
 
2231
 
2204
                         var preTime = nowTime
2232
                         var preTime = nowTime
2205
 
2233
 
2206
-
2207
                         let index = i + 1;
2234
                         let index = i + 1;
2208
                         let obj = {
2235
                         let obj = {
2209
                           id: 0,
2236
                           id: 0,
2213
                           addition: tempAddition,
2240
                           addition: tempAddition,
2214
                           order_status: 1,
2241
                           order_status: 1,
2215
                           pre_time: preTime,
2242
                           pre_time: preTime,
2216
-                          med_type: "",
2243
+                          med_type:"",
2244
+
2217
                         };
2245
                         };
2218
-                        if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
2219
-                          obj.med_type = 13
2246
+                        if(prescription.med_type == 0 || prescription.med_type == ""){
2247
+
2248
+                          obj.med_type = ""
2249
+
2220
                         }else{
2250
                         }else{
2221
-                          obj.med_type = 14
2222
 
2251
 
2252
+                          obj.med_type =  parseInt(prescription.med_type)
2253
+                        }
2254
+
2255
+
2256
+                        if(obj.med_type== 0 || obj.med_type == "") {
2257
+                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
2258
+                            obj.med_type = 13
2259
+
2260
+                          } else {
2261
+                            obj.med_type = 14
2262
+
2263
+                          }
2223
                         }
2264
                         }
2224
                         this.prescriptions.push(obj)
2265
                         this.prescriptions.push(obj)
2225
                       }
2266
                       }
2621
                           order_status: 1,
2662
                           order_status: 1,
2622
                           pre_time: preTime,
2663
                           pre_time: preTime,
2623
                           med_type:"",
2664
                           med_type:"",
2665
+
2624
                         };
2666
                         };
2625
-                        if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
2626
-                          obj.med_type = 13
2667
+                        if(prescription.med_type == 0 || prescription.med_type == ""){
2668
+
2669
+                          obj.med_type = ""
2670
+
2627
                         }else{
2671
                         }else{
2628
-                          obj.med_type = 14
2629
 
2672
 
2673
+                          obj.med_type = parseInt(prescription.med_type)
2674
+                        }
2675
+                        if(obj.med_type== 0 || obj.med_type == "") {
2676
+                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
2677
+                            obj.med_type = 13
2678
+
2679
+                          } else {
2680
+                            obj.med_type = 14
2681
+
2682
+                          }
2630
                         }
2683
                         }
2631
                         this.prescriptions.push(obj)
2684
                         this.prescriptions.push(obj)
2632
                       }
2685
                       }
3073
 
3126
 
3074
                       var preTime = nowTime
3127
                       var preTime = nowTime
3075
 
3128
 
3076
-
3077
                       let index = i + 1;
3129
                       let index = i + 1;
3078
                       let obj = {
3130
                       let obj = {
3079
                         id: 0,
3131
                         id: 0,
3084
                         order_status: 1,
3136
                         order_status: 1,
3085
                         pre_time: preTime,
3137
                         pre_time: preTime,
3086
                         med_type:"",
3138
                         med_type:"",
3139
+
3087
                       };
3140
                       };
3088
-                      if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
3089
-                        obj.med_type = 13
3141
+                      if(prescription.med_type == 0 || prescription.med_type == ""){
3142
+
3143
+                        obj.med_type = ""
3144
+
3090
                       }else{
3145
                       }else{
3091
-                        obj.med_type = 14
3092
 
3146
 
3147
+                        obj.med_type = parseInt(prescription.med_type)
3148
+                      }
3149
+                      if(obj.med_type== 0 || obj.med_type == "") {
3150
+                        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
3151
+                          obj.med_type = 13
3152
+
3153
+                        } else {
3154
+                          obj.med_type = 14
3155
+
3156
+                        }
3093
                       }
3157
                       }
3094
                       this.prescriptions.push(obj)
3158
                       this.prescriptions.push(obj)
3095
                     }
3159
                     }
3492
                       order_status: 1,
3556
                       order_status: 1,
3493
                       pre_time: preTime,
3557
                       pre_time: preTime,
3494
                       med_type:"",
3558
                       med_type:"",
3559
+
3495
                     };
3560
                     };
3496
-                    if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
3497
-                      obj.med_type = 13
3561
+                    if(prescription.med_type == 0 || prescription.med_type == ""){
3562
+
3563
+                      obj.med_type = ""
3564
+
3498
                     }else{
3565
                     }else{
3499
-                      obj.med_type = 14
3500
 
3566
 
3567
+                      obj.med_type =  parseInt(prescription.med_type)
3568
+                    }
3569
+                    if(obj.med_type== 0 || obj.med_type == "") {
3570
+                      if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
3571
+                        obj.med_type = 13
3572
+
3573
+                      } else {
3574
+                        obj.med_type = 14
3575
+
3576
+                      }
3501
                     }
3577
                     }
3502
                     this.prescriptions.push(obj)
3578
                     this.prescriptions.push(obj)
3503
                   }
3579
                   }

+ 66 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue 查看文件

37
                                     :label="item.name"
37
                                     :label="item.name"
38
                                     :name="item.name"
38
                                     :name="item.name"
39
                             >
39
                             >
40
+
41
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >
42
+                                    <el-option
43
+                                            v-for="(item,index) in medical_care"
44
+                                            :key="index"
45
+                                            :label="item.label"
46
+                                            :value="item.value">
47
+                                    </el-option>
48
+                                </el-select>
49
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-else @change="changevalue" >
50
+                                    <el-option
51
+                                            v-for="(item,index) in register"
52
+                                            :key="index"
53
+                                            :label="item.label"
54
+                                            :value="item.value">
55
+                                    </el-option>
56
+                                </el-select>
40
                             </el-tab-pane>
57
                             </el-tab-pane>
41
 
58
 
42
                             <el-tab-pane name="more" closable><span slot="label"><i
59
                             <el-tab-pane name="more" closable><span slot="label"><i
247
     },
264
     },
248
     data() {
265
     data() {
249
       return {
266
       return {
267
+        medical_care: [
268
+          { value: 11, label: '普通门诊' },
269
+          { value: 12, label: '家庭通道' },
270
+          { value: 13, label: '门诊大病' },
271
+          { value: 14, label: '重疾特药' },
272
+          { value: 15, label: '门诊慢病' },
273
+          { value: 16, label: '门诊特检' },
274
+          { value: 17, label: '健康体检' },
275
+          { value: 18, label: '预防接种' },
276
+          { value: 19, label: '门诊输血' },
277
+          { value: 91, label: '新冠肺炎门诊' }
278
+        ],
279
+
280
+        register: [
281
+          { value: 11, label: '普通门诊' },
282
+          { value: 12, label: '门诊挂号' },
283
+          { value: 13, label: '急诊' },
284
+          { value: 14, label: '门诊特殊病' },
285
+          { value: 15, label: '门诊统筹' },
286
+          { value: 16, label: '门诊慢性病' },
287
+          { value: 21, label: '普通住院' }
288
+
289
+        ],
250
         crumbs: [
290
         crumbs: [
251
           { path: false, name: '门诊医生站' },
291
           { path: false, name: '门诊医生站' },
252
           { path: false, name: '处方模版' },
292
           { path: false, name: '处方模版' },
353
           return
393
           return
354
         }
394
         }
355
 
395
 
396
+        for (let i = 0; i < this.prescriptions.length; i++) {
397
+          if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
398
+            this.$message.error('处方医疗类型不能为空')
399
+            return
400
+          }
401
+        }
402
+
356
         let params = {
403
         let params = {
357
           name: this.tempForm.name,
404
           name: this.tempForm.name,
358
           mode_id: this.tempForm.mode_id,
405
           mode_id: this.tempForm.mode_id,
1509
                   advices: tempAdvice,
1556
                   advices: tempAdvice,
1510
                   project: tempProject,
1557
                   project: tempProject,
1511
                   addition: tempAddition,
1558
                   addition: tempAddition,
1512
-                  order_status: 1
1559
+                  order_status: 1,
1513
                   // pre_time: preTime
1560
                   // pre_time: preTime
1514
                 }
1561
                 }
1562
+
1563
+                if(prescription.med_type == "" || prescription.med_type == 0){
1564
+
1565
+                  obj['med_type'] = ""
1566
+                }else{
1567
+
1568
+                  obj['med_type'] = parseInt(prescription.med_type)
1569
+
1570
+                }
1571
+
1572
+
1515
                 this.prescriptions.push(obj)
1573
                 this.prescriptions.push(obj)
1516
               }
1574
               }
1517
               if (this.prescriptions.length > 0) {
1575
               if (this.prescriptions.length > 0) {
1526
                 advices: [],
1584
                 advices: [],
1527
                 project: [],
1585
                 project: [],
1528
                 addition: [],
1586
                 addition: [],
1529
-                order_status: 0
1587
+                order_status: 0,
1588
+                med_type:'',
1530
               }
1589
               }
1531
               this.prescriptions.push(obj)
1590
               this.prescriptions.push(obj)
1532
               this.curPrescriptions = this.prescriptions[0]
1591
               this.curPrescriptions = this.prescriptions[0]
1533
             }
1592
             }
1534
 
1593
 
1535
-            console.log(this.prescriptions)
1536
-            console.log(this.curPrescriptions)
1537
-
1538
           }
1594
           }
1539
 
1595
 
1540
         })
1596
         })
1617
           }
1673
           }
1618
         })
1674
         })
1619
       },
1675
       },
1676
+      changevalue(val){
1677
+
1678
+        this.$forceUpdate()
1679
+
1680
+      },
1620
       selectTeam(row) {
1681
       selectTeam(row) {
1621
         console.log('row', row)
1682
         console.log('row', row)
1622
         var arr = []
1683
         var arr = []

+ 7 - 10
src/xt_pages/outpatientDoctorStation/print.vue 查看文件

11
           >打印</el-button
11
           >打印</el-button
12
         >
12
         >
13
       </template>
13
       </template>
14
-            
14
+
15
     <div class='dialysisPage' style="padding-top:40px;">
15
     <div class='dialysisPage' style="padding-top:40px;">
16
       <div v-if="org_id != 10138">
16
       <div v-if="org_id != 10138">
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>
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
     printThisPage() {
74
     printThisPage() {
75
       var ptime = Math.round(new Date().getTime() / 1000);
75
       var ptime = Math.round(new Date().getTime() / 1000);
76
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
76
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
77
-      
77
+
78
       if(this.org_id == 10138){
78
       if(this.org_id == 10138){
79
-        
80
         const style =
79
         const style =
81
         '@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;}}';
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
         printJS({
81
         printJS({
95
           scanStyles: false
94
           scanStyles: false
96
         });
95
         });
97
       }
96
       }
98
-      
99
 
97
 
100
       // if (this.org_template_info.template_id == 1) {
98
       // if (this.org_template_info.template_id == 1) {
101
       //   printJS({
99
       //   printJS({
110
       getAllDoctorList().then(response=>{
108
       getAllDoctorList().then(response=>{
111
         if(response.data.state == 1){
109
         if(response.data.state == 1){
112
                var doctor =  response.data.data.doctor
110
                var doctor =  response.data.data.doctor
113
-               
111
+
114
                this.doctorList = doctor
112
                this.doctorList = doctor
115
              }
113
              }
116
-         })   
114
+         })
117
      },
115
      },
118
     getAllHisPatientList(){
116
     getAllHisPatientList(){
119
          const params = {
117
          const params = {
124
             this.patientTableData = response.data.data.list
122
             this.patientTableData = response.data.data.list
125
             this.patientTableDataTwo = response.data.data.list
123
             this.patientTableDataTwo = response.data.data.list
126
 
124
 
127
-            console.log('222', this.patientTableData)
128
             let cal_one = 0
125
             let cal_one = 0
129
             let cal_two = 0
126
             let cal_two = 0
130
             for (let i = 0; i < response.data.data.list.length; i++) {
127
             for (let i = 0; i < response.data.data.list.length; i++) {
139
             // console.log(this.patientTableData[0])
136
             // console.log(this.patientTableData[0])
140
             // this.choosePatient(this.patientTableData[0])
137
             // this.choosePatient(this.patientTableData[0])
141
             this.cal_one = cal_one
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
     searchAction(){
171
     searchAction(){
175
 
172
 
176
     }
173
     }
177
-    
174
+
178
   },
175
   },
179
 
176
 
180
   created() {
177
   created() {
377
   .dialysisPage::-webkit-scrollbar {
374
   .dialysisPage::-webkit-scrollbar {
378
     height: 15px;
375
     height: 15px;
379
   }
376
   }
380
-  
377
+
381
   .el-date-editor{
378
   .el-date-editor{
382
     .el-input__inner{
379
     .el-input__inner{
383
       padding-right:0px;
380
       padding-right:0px;

+ 3 - 3
src/xt_pages/outpatientRegistration/index.vue 查看文件

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

+ 63 - 32
src/xt_pages/outpatientRegistration/registrationHistory.vue 查看文件

457
   const moment = require('moment')
457
   const moment = require('moment')
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
460
+
461
+  import { refundNumber} from '@/api/his/his'
462
+
463
+
460
   import { uParseTime } from '@/utils/tools'
464
   import { uParseTime } from '@/utils/tools'
461
   import { getDictionaryDataConfig } from '@/utils/data'
465
   import { getDictionaryDataConfig } from '@/utils/data'
462
   import axios from 'axios'
466
   import axios from 'axios'
715
         }
719
         }
716
         return ''
720
         return ''
717
       }, toReturnSZPatient(val) {
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
               if (response.data.state == 0) {
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
                 return false
735
                 return false
736
               } else {
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
       toReturnPatient(row) {
789
       toReturnPatient(row) {
759
         var that = this
790
         var that = this