Explorar el Código

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

XMLWAN hace 4 años
padre
commit
e53a7299ba

+ 222 - 66
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Ver fichero

@@ -5,20 +5,25 @@
5 5
     </div>
6 6
     <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
7 7
       <div class="mainLeft">
8
-         <!-- <div class="mainCell" style="justify-content: space-between;font-size:14px;">
9
-          <p >未收费:<span style="color: red">{{cal_one}}</span>人</p>
10
-          <p>已收费:<span  style="color: red">{{cal_two}}</span>人</p>
11
-          <p>已退费:<span  style="color: red">{{cal_three}}</span>人</p>
12
-        </div> -->
8
+
9
+        <!-- <div class="mainCell" style="justify-content: space-between;font-size:14px;">
10
+         <p >未收费:<span style="color: red">{{cal_one}}</span>人</p>
11
+         <p>已收费:<span  style="color: red">{{cal_two}}</span>人</p>
12
+         <p>已退费:<span  style="color: red">{{cal_three}}</span>人</p>
13
+       </div> -->
13 14
         <div class="mainCell">
14 15
           <el-radio-group v-model="radio" @change="changeRadio">
15 16
             <!-- <el-radio :label=1>未收费</el-radio>
16 17
             <el-radio :label=2>已收费</el-radio>
17 18
             <el-radio :label=3>已退费</el-radio>
18 19
             <el-radio :label=4>全部</el-radio> -->
19
-            <el-radio :label=1>未收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_one}}</span>人</el-radio>
20
-            <el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人</el-radio>
21
-            <el-radio :label=3>已退费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人</el-radio>
20
+            <el-radio :label=1>未收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_one}}</span>人
21
+            </el-radio>
22
+            <el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人
23
+            </el-radio>
24
+            <el-radio :label=3>已退费<span
25
+              style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人
26
+            </el-radio>
22 27
             <el-radio :label=4>全部</el-radio>
23 28
 
24 29
           </el-radio-group>
@@ -62,6 +67,16 @@
62 67
           <el-button size="small" @click="open(5)" type="primary"
63 68
                      v-if="this.info && this.info.prescription_status == 3">退费
64 69
           </el-button>
70
+
71
+
72
+          <el-button size="small" @click="open(7)" type="primary"
73
+          >对账
74
+          </el-button>
75
+
76
+
77
+          <el-button size="small" @click="open(8)" type="primary"
78
+          >明细对账
79
+          </el-button>
65 80
         </div>
66 81
 
67 82
         <div class="mainCenter">
@@ -227,6 +242,8 @@
227 242
 
228 243
 
229 244
 <script>
245
+  import axios from 'axios'
246
+
230 247
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
231 248
   import noCharge from './components/noCharge'
232 249
   import charged from './components/charged'
@@ -319,56 +336,101 @@
319 336
       this.getPatientList()
320 337
     },
321 338
     methods: {
322
-      chargeConfirm(form){
339
+      chargeConfirm(form) {
323 340
         form['id'] = this.patientInfo.id
324
-        form['record_time'] =  this.record_date
341
+        form['record_time'] = this.record_date
325 342
         this.loadingtwo = true
326
-        upload(form).then(response => {
327
-          if (response.data.state == 0) {
328
-            this.$message.error(response.data.msg)
329
-            this.loadingtwo = false
330
-            this.$refs.charge.hide()
331
-            return false
332
-          } else {
333
-            this.state = '已收费'
334
-            this.$message({message: '收费成功', type: 'success'})
335
-            this.$refs.charge.hide()
336
-            this.loadingtwo = false
337
-            this.cal_one = this.cal_one - 1
338
-            this.cal_two = this.cal_two + 1
339
-            this.patientTableData.splice(this.current_index, 1)
340
-          }
341
-        })
343
+        if (this.$store.getters.xt_user.org_id == 4) {
344
+          axios.get('http://127.0.0.1:9532/api/upload/get', {
345
+            params: form
346
+          })
347
+            .then(function (response) {
348
+              if (response.data.state == 0) {
349
+                this.$message.error(response.data.msg)
350
+                this.loadingtwo = false
351
+                this.$refs.charge.hide()
352
+                return false
353
+              } else {
354
+                this.state = '已收费'
355
+                this.$message({message: '收费成功', type: 'success'})
356
+                this.$refs.charge.hide()
357
+                this.loadingtwo = false
358
+                this.cal_one = this.cal_one - 1
359
+                this.cal_two = this.cal_two + 1
360
+                this.patientTableData.splice(this.current_index, 1)
361
+              }
362
+            })
363
+            .catch(function (error) {
342 364
 
343
-      },chargeCancel(){
365
+            });
366
+        } else {
367
+          upload(form).then(response => {
368
+            if (response.data.state == 0) {
369
+              this.$message.error(response.data.msg)
370
+              this.loadingtwo = false
371
+              this.$refs.charge.hide()
372
+              return false
373
+            } else {
374
+              this.state = '已收费'
375
+              this.$message({message: '收费成功', type: 'success'})
376
+              this.$refs.charge.hide()
377
+              this.loadingtwo = false
378
+              this.cal_one = this.cal_one - 1
379
+              this.cal_two = this.cal_two + 1
380
+              this.patientTableData.splice(this.current_index, 1)
381
+            }
382
+          })
383
+        }
384
+      }, chargeCancel() {
344 385
         this.$refs.charge.hide()
345 386
       },
346 387
       confirm(forms) {
347 388
         forms['id'] = this.patientInfo.id,
348 389
           forms['record_time'] = this.record_date,
349 390
           this.loadingone = true
350
-        register(forms).then(response => {
351
-          if (response.data.state == 0) {
352
-            this.$message.error(response.data.msg)
353
-            this.loadingone = false
354
-            this.$refs.register.hide()
355
-            return false
356
-          } else {
357
-            this.getPatientList()
358
-            this.$message({message: '挂号成功', type: 'success'})
359
-            this.$refs.register.hide()
360
-            this.loadingone = false
361
-            var his_info = response.data.data.his_info
362
-            this.hisPatientInfo = his_info
363
-          }
364
-        })
365 391
 
392
+        if (this.$store.getters.xt_user.org_id == 4) {
393
+          axios.get('http://127.0.0.1:9532/api/register/get', {
394
+            params: forms
395
+          })
396
+            .then(function (response) {
397
+              if (response.data.state == 0) {
398
+                this.$message.error(response.data.msg)
399
+                this.loadingone = false
400
+                this.$refs.register.hide()
401
+                return false
402
+              } else {
403
+                this.getPatientList()
404
+                this.$message({message: '挂号成功', type: 'success'})
405
+                this.$refs.register.hide()
406
+                this.loadingone = false
407
+                var his_info = response.data.data.his_info
408
+                this.hisPatientInfo = his_info
409
+              }
410
+            })
411
+            .catch(function (error) {
412
+
413
+            });
414
+        } else {
415
+          register(forms).then(response => {
416
+            if (response.data.state == 0) {
417
+              this.$message.error(response.data.msg)
418
+              this.loadingone = false
419
+              this.$refs.register.hide()
420
+              return false
421
+            } else {
422
+              this.getPatientList()
423
+              this.$message({message: '挂号成功', type: 'success'})
424
+              this.$refs.register.hide()
425
+              this.loadingone = false
426
+              var his_info = response.data.data.his_info
427
+              this.hisPatientInfo = his_info
428
+            }
429
+          })
430
+        }
366 431
 
367 432
       }, cancel() {
368
-
369 433
         this.$refs.register.hide()
370
-
371
-
372 434
       },
373 435
       addCharges() {
374 436
         this.$refs.additionalCharges.show()
@@ -571,33 +633,74 @@
571 633
           this.$refs.charge.show(this.getTotal())
572 634
 
573 635
 
574
-
575 636
         } else if (index == 5) {
637
+          if (this.$store.getters.xt_user.org_id == 4) {
638
+            this.$confirm('是否退费', '退费', {
639
+              confirmButtonText: '确 定',
640
+              cancelButtonText: '取 消',
641
+              type: 'warning'
642
+            }).then(() => {
643
+              let params = {
644
+                'order_id': this.order.id,
645
+                'number': this.order.number,
646
+                'patient_id': this.patientInfo.id,
647
+                'record_time': this.record_date,
576 648
 
577
-          this.$confirm('是否退费', '退费', {
578
-            confirmButtonText: '确 定',
579
-            cancelButtonText: '取 消',
580
-            type: 'warning'
581
-          }).then(() => {
582
-            let params = {
583
-              'order_id': this.order.id,
584
-              'number': this.order.number,
585
-            }
586
-            Refund(params).then(response => {
587
-              if (response.data.state == 0) {
588
-                this.$message.error(response.data.msg)
589
-                this.loadingtwo = false
590
-                return false
591
-              } else {
592
-                this.$message({message: '退费成功', type: 'success'})
593
-                this.loadingtwo = false
649
+              }
650
+              axios.post('http://127.0.0.1:9532/api/refund/post', {
651
+                params: params
652
+              })
653
+                .then(function (response) {
654
+                  if (response.data.state == 0) {
655
+                    this.$message.error(response.data.msg)
656
+                    this.loadingtwo = false
657
+                    return false
658
+                  } else {
659
+                    this.$message({message: '退费成功', type: 'success'})
660
+                    this.loadingtwo = false
661
+
662
+                  }
663
+                })
664
+                .catch(function (error) {
665
+
666
+                });
667
+
668
+            }).catch(() => {
669
+
670
+            })
671
+
672
+          } else {
673
+
674
+            this.$confirm('是否退费', '退费', {
675
+              confirmButtonText: '确 定',
676
+              cancelButtonText: '取 消',
677
+              type: 'warning'
678
+            }).then(() => {
679
+              let params = {
680
+                'order_id': this.order.id,
681
+                'number': this.order.number,
682
+                'patient_id': this.patientInfo.id,
683
+                'record_time': this.record_date,
594 684
 
595 685
               }
686
+              Refund(params).then(response => {
687
+                if (response.data.state == 0) {
688
+                  this.$message.error(response.data.msg)
689
+                  this.loadingtwo = false
690
+                  return false
691
+                } else {
692
+                  this.$message({message: '退费成功', type: 'success'})
693
+                  this.loadingtwo = false
694
+
695
+                }
696
+              })
697
+
698
+            }).catch(() => {
699
+
596 700
             })
597 701
 
598
-          }).catch(() => {
599 702
 
600
-          })
703
+          }
601 704
 
602 705
 
603 706
         } else if (index == 6) {
@@ -610,6 +713,58 @@
610 713
           this.$refs.register.show(this.patientInfo)
611 714
 
612 715
 
716
+        } else if (index == 7) {
717
+          let params={
718
+            start_time:"2020-12-01",
719
+            end_time:"2020-12-30",
720
+            insutype:"390",
721
+            clr_type:"11",
722
+          }
723
+
724
+          if (this.$store.getters.xt_user.org_id == 4) {
725
+            axios.post('http://127.0.0.1:9532/api/checkaccount/get', {
726
+              params: params
727
+            })
728
+              .then(function (response) {
729
+                if (response.data.state == 0) {
730
+                  this.$message.error(response.data.msg)
731
+                  this.loadingtwo = false
732
+                  return false
733
+                } else {
734
+
735
+
736
+                }
737
+              })
738
+              .catch(function (error) {
739
+
740
+              });
741
+
742
+
743
+          }
744
+
745
+        } else if (index == 8) {
746
+          let params={
747
+            start_time:"2020-12-01",
748
+            end_time:"2020-12-30",
749
+          }
750
+          axios.post('http://127.0.0.1:9532/api/checkdetailaccount/get', {
751
+            params: params
752
+          })
753
+            .then(function (response) {
754
+              if (response.data.state == 0) {
755
+                this.$message.error(response.data.msg)
756
+                this.loadingtwo = false
757
+                return false
758
+              } else {
759
+
760
+              }
761
+            })
762
+            .catch(function (error) {
763
+
764
+            });
765
+
766
+
767
+
613 768
         }
614 769
       },
615 770
 
@@ -894,6 +1049,7 @@
894 1049
       }
895 1050
     },
896 1051
     mounted() {
1052
+      console.log(this.$store.getters.xt_user.org_id)
897 1053
       const that = this
898 1054
       window.onresize = () => {
899 1055
         return (() => {
@@ -992,7 +1148,7 @@
992 1148
   .mainCenter {
993 1149
     display: flex;
994 1150
     flex: 1;
995
-    height:100%;
1151
+    height: 100%;
996 1152
   }
997 1153
 
998 1154
   .costBox {

+ 14 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Ver fichero

@@ -518,6 +518,12 @@
518 518
           this.$message.error('处方已经结算,无法添加')
519 519
           return
520 520
         }
521
+        if (this.patientInfo.id == 0) {
522
+          this.$message.error('请选择患者')
523
+          return
524
+        }
525
+
526
+
521 527
         if (val == 1) {
522 528
           this.isVisibility = false
523 529
           this.request_record_date = this.record_date
@@ -545,6 +551,10 @@
545 551
           this.$message.error('处方已经结算,无法添加')
546 552
           return
547 553
         }
554
+        if (this.patientInfo.id == 0) {
555
+          this.$message.error('请选择患者')
556
+          return
557
+        }
548 558
         if (val == 2) {
549 559
           this.isVisibility = false
550 560
           this.request_record_date = this.record_date
@@ -933,6 +943,10 @@
933 943
           this.$message.error('处方已经结算,无法添加')
934 944
           return
935 945
         }
946
+        if (this.patientInfo == null || this.patientInfo.id == 0) {
947
+          this.$message.error('请选择患者')
948
+          return
949
+        }
936 950
         let params = {
937 951
           end_time: this.record_date,
938 952
           start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),