Browse Source

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

csx 4 years ago
parent
commit
a115d2c17e

+ 19 - 3
src/xt_pages/outpatientCharges/components/registerDialog.vue View File

@@ -182,7 +182,7 @@
182 182
 </template>
183 183
 
184 184
 <script>
185
-  import {uParseTime} from "@/utils/tools";
185
+  import {uParseTime,jsGetAge} from "@/utils/tools";
186 186
   import axios from 'axios'
187 187
   import {PostSearch} from '@/api/patient'
188 188
 
@@ -394,10 +394,23 @@
394 394
         this.form.id = val.id
395 395
         this.form.name = val.name
396 396
         this.form.gender = val.gender
397
-        this.form.age = val.age
398 397
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
399 398
         this.form.phone = val.phone
400 399
         this.form.id_card = val.id_card_no
400
+        var thisLen =  this.form.id_card.length;
401
+        var birth = "";
402
+        if (thisLen == 15) {
403
+          birth = "19" + this.form.id_card.substr(6, 6);
404
+        } else {
405
+          birth = this.form.id_card.substr(6, 8);
406
+        }
407
+        var births =
408
+                birth.substr(0, 4) +
409
+                "-" +
410
+                birth.substr(4, 2) +
411
+                "-" +
412
+                birth.substr(6, 2);
413
+        this.form.age = jsGetAge(births, "-");
401 414
       },
402 415
       querySearchAsync(keyword, cb) {
403 416
         let key = ''
@@ -468,6 +481,10 @@
468 481
       },
469 482
       show: function () {
470 483
         this.form = Object.assign({}, this.resetForm)
484
+        this.form.p_type = 14
485
+        this.form.sick_type = this.sick[0].id
486
+        this.form.diagnosis = this.diagnoses[0].id
487
+
471 488
         // this.form.name = patientInfo.name
472 489
         // this.form.gender = patientInfo.gender
473 490
         // this.form.age = patientInfo.age
@@ -479,7 +496,6 @@
479 496
         // this.form.id_card_type = 1
480 497
         // if( this.form.social_type == 0){
481 498
         //   this.form.social_type = ""
482
-        //
483 499
         // }
484 500
         this.visibility = true
485 501
 

+ 106 - 88
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -65,10 +65,10 @@
65 65
                         </el-button>
66 66
 
67 67
                         <el-button
68
-                                   v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
69
-                                   size="small"
70
-                                   @click="sz_open(3)"
71
-                                   type="primary">收费
68
+                                v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
69
+                                size="small"
70
+                                @click="sz_open(3)"
71
+                                type="primary">收费
72 72
                         </el-button>
73 73
 
74 74
                         <el-button size="small" @click="sz_open(11)" type="primary"
@@ -86,7 +86,7 @@
86 86
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
87 87
 
88 88
                         <!--<el-button-->
89
-                                <!--size="small" @click="sz_open(7)" type="primary"-->
89
+                        <!--size="small" @click="sz_open(7)" type="primary"-->
90 90
                         <!--&gt;撤销明细-->
91 91
                         <!--</el-button>-->
92 92
                     </div>
@@ -103,13 +103,10 @@
103 103
                     <!--</el-button>-->
104 104
 
105 105
 
106
-
107
-
108 106
                     <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
109 107
                     <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
110 108
 
111 109
 
112
-
113 110
                     <div v-if="this.$store.getters.xt_user.org_id != 9504 && this.$store.getters.xt_user.org_id != 10028">
114 111
                         <el-button size="small" @click="open(3)" type="primary">打印</el-button>
115 112
                         <el-button v-loading="loadingone" size="small"
@@ -142,8 +139,8 @@
142 139
                         </el-button>
143 140
 
144 141
                         <!--<el-button-->
145
-                                <!--v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"-->
146
-                                <!--size="small" @click="open(11)" type="primary"-->
142
+                        <!--v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"-->
143
+                        <!--size="small" @click="open(11)" type="primary"-->
147 144
                         <!--&gt;撤销明细-->
148 145
                         <!--</el-button>-->
149 146
 
@@ -340,7 +337,8 @@
340 337
         <register-dialog ref='register' :doctors="doctors" :department="department" :sick="sick" :diagnoses="diagnoses"
341 338
                          v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
342 339
 
343
-        <register-dialog9504 ref='register9504' :doctors="doctors" :departments="department" :sick="sick" :diagnoses="diagnoses"
340
+        <register-dialog9504 ref='register9504' :doctors="doctors" :departments="department" :sick="sick"
341
+                             :diagnoses="diagnoses"
344 342
                              v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
345 343
 
346 344
         <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
@@ -496,7 +494,7 @@
496 494
         treatVisible: false,
497 495
         orderObj: {},
498 496
         paramsObj: {},
499
-        newOrderObj:{},
497
+        newOrderObj: {},
500 498
         statementVisible: false,
501 499
         newStatementVisible: false,
502 500
 
@@ -527,7 +525,7 @@
527 525
     },
528 526
     methods: {
529 527
       query() {
530
-        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 == 10106 ) {
528
+        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 == 10106) {
531 529
           var that = this
532 530
           axios.get('http://127.0.0.1:9532/api/org/info', {
533 531
             params: {}
@@ -633,7 +631,7 @@
633 631
                   that.radio = 2
634 632
                   that.$refs.charge.hide()
635 633
                   that.state = '已收费'
636
-                  that.$message({ message: '收费成功', type: 'success'})
634
+                  that.$message({ message: '收费成功', type: 'success' })
637 635
                   that.loadingtwo = false
638 636
                   that.cal_one = this.cal_one - 1
639 637
                   that.cal_two = this.cal_two + 1
@@ -645,7 +643,7 @@
645 643
 
646 644
             })
647 645
 
648
-        } else 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) {
646
+        } else 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) {
649 647
           var that = this
650 648
           axios.get('http://127.0.0.1:9532/api/upload/get', {
651 649
             params: form,
@@ -660,17 +658,23 @@
660 658
                 that.$refs.charge.hide()
661 659
                 return false
662 660
               } else {
663
-                that.changeRadio(2)
664
-                that.radio = 2
661
+                if (response.data.data.failed_code == -10) {
665 662
 
666
-                that.$refs.charge.hide()
667
-                that.loadingtwo = false
668
-                that.state = '已收费'
669
-                that.$message({ message: '收费成功', type: 'success',duration:5000 })
670
-                that.loadingtwo = false
671
-                that.cal_one = this.cal_one - 1
672
-                that.cal_two = this.cal_two + 1
673
-                that.patientTableData.splice(this.current_index, 1)
663
+                  that.$message.error(response.data.data.msg)
664
+
665
+                } else {
666
+                  that.changeRadio(2)
667
+                  that.radio = 2
668
+
669
+                  that.$refs.charge.hide()
670
+                  that.loadingtwo = false
671
+                  that.state = '已收费'
672
+                  that.$message({ message: '收费成功', type: 'success', duration: 5000 })
673
+                  that.loadingtwo = false
674
+                  that.cal_one = this.cal_one - 1
675
+                  that.cal_two = this.cal_two + 1
676
+                  that.patientTableData.splice(this.current_index, 1)
677
+                }
674 678
               }
675 679
             })
676 680
             .catch(function(error) {
@@ -698,11 +702,10 @@
698 702
         }
699 703
       }, chargeCancel() {
700 704
         this.$refs.charge.hide()
701
-      },registerCancel(){
705
+      }, registerCancel() {
702 706
         this.$refs.register9504.hide()
703 707
 
704
-
705
-      },registerConfirm(forms){
708
+      }, registerConfirm(forms) {
706 709
         forms['record_time'] = this.record_date
707 710
         forms['admin_user_id'] = this.$store.getters.xt_user.user.id
708 711
         forms['org_id'] = this.$store.getters.xt_user.org_id
@@ -710,7 +713,7 @@
710 713
         this.loadingone = true
711 714
 
712 715
         var that = this
713
-        if ( this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
716
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
714 717
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
715 718
             params: forms,
716 719
             headers: {
@@ -794,7 +797,7 @@
794 797
 
795 798
         var that = this
796 799
 
797
-        if ( this.$store.getters.xt_user.org_id == 10028 ||  this.$store.getters.xt_user.org_id == 9504 ) {
800
+        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504) {
798 801
 
799 802
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
800 803
             params: forms,
@@ -867,7 +870,7 @@
867 870
 
868 871
             })
869 872
 
870
-        } else 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) {
873
+        } else 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) {
871 874
 
872 875
           axios.get('http://127.0.0.1:9532/api/register/get', {
873 876
             params: forms,
@@ -882,50 +885,58 @@
882 885
                 that.$refs.register.hide()
883 886
                 return false
884 887
               } else {
885
-                that.$refs.register.hide()
886
-                let params = {
887
-                  'record_date': that.record_date
888
-                }
889
-                getChargeHisPatientList(params).then(response => {
890
-                  if (response.data.state == 0) {
891
-                    that.$message.error(response.data.msg)
892
-                    return false
893
-                  } else {
894
-                    that.loadingone = false
895
-                    that.$message({ message: '挂号成功', type: 'success' })
896
-
897
-                    that.patientTableData = []
898
-                    that.all_table_data = []
899
-                    that.hisPatientDatas = []
900
-                    let one_count = 0
901
-                    let two_count = 0
902
-                    let three_count = 0
903
-                    for (let i = 0; i < response.data.data.list.length; i++) {
904
-                      that.all_table_data.push(response.data.data.list[i])
905
-                      if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
906
-                        one_count = one_count + 1
907
-                        that.patientTableData.push(response.data.data.list[i])
908
-                      }
909
-                      if (response.data.data.list[i].order.order_status == 2) {
910
-                        two_count = two_count + 1
911
-                        that.patientTableData.push(response.data.data.list[i])
888
+                if (response.data.data.failed_code == -10) {
889
+                  that.$message.error(response.data.data.msg)
890
+                  return
891
+                } else {
892
+                  that.$refs.register.hide()
893
+                  let params = {
894
+                    'record_date': that.record_date
895
+                  }
896
+                  getChargeHisPatientList(params).then(response => {
897
+                    if (response.data.state == 0) {
898
+                      that.$message.error(response.data.msg)
899
+                      return false
900
+                    } else {
901
+
902
+                      that.loadingone = false
903
+                      that.$message({ message: '挂号成功', type: 'success' })
904
+
905
+                      that.patientTableData = []
906
+                      that.all_table_data = []
907
+                      that.hisPatientDatas = []
908
+                      let one_count = 0
909
+                      let two_count = 0
910
+                      let three_count = 0
911
+                      for (let i = 0; i < response.data.data.list.length; i++) {
912
+                        that.all_table_data.push(response.data.data.list[i])
913
+                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
914
+                          one_count = one_count + 1
915
+                          that.patientTableData.push(response.data.data.list[i])
916
+                        }
917
+                        if (response.data.data.list[i].order.order_status == 2) {
918
+                          two_count = two_count + 1
919
+                          that.patientTableData.push(response.data.data.list[i])
920
+                        }
912 921
                       }
913
-                    }
914
-                    that.hisPatientDatas = response.data.data.list_two
915
-                    that.cal_one = one_count
916
-                    that.cal_two = two_count
917
-                    that.cal_three = three_count
918
-                    that.current_index = 0
919
-                    for (let i = 0; i < that.patientTableData.length; i++) {
920
-                      if (this.patientTableData[i].id == this.patientInfo.id) {
921
-                        that.$refs.tab.setCurrentRow(that.patientTableData[i])
922
-                        that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
922
+                      that.hisPatientDatas = response.data.data.list_two
923
+                      that.cal_one = one_count
924
+                      that.cal_two = two_count
925
+                      that.cal_three = three_count
926
+                      that.current_index = 0
927
+                      for (let i = 0; i < that.patientTableData.length; i++) {
928
+                        if (this.patientTableData[i].id == this.patientInfo.id) {
929
+                          that.$refs.tab.setCurrentRow(that.patientTableData[i])
930
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
931
+                        }
923 932
                       }
933
+                      var his_info = response.data.data.his_info
934
+                      that.hisPatientInfo = his_info
935
+
924 936
                     }
925
-                    var his_info = response.data.data.his_info
926
-                    that.hisPatientInfo = his_info
927
-                  }
928
-                })
937
+
938
+                  })
939
+                }
929 940
               }
930 941
             })
931 942
             .catch(function(error) {
@@ -940,7 +951,7 @@
940 951
               return false
941 952
             } else {
942 953
               this.getPatientList()
943
-              this.$message({ message: '挂号成功', type: 'success',duration:5000 })
954
+              this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
944 955
               this.$refs.register.hide()
945 956
               this.loadingone = false
946 957
               var his_info = response.data.data.his_info
@@ -1484,7 +1495,7 @@
1484 1495
           }
1485 1496
 
1486 1497
         } else if (index == 5) {
1487
-          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) {
1498
+          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) {
1488 1499
 
1489 1500
             var that = this
1490 1501
             this.$confirm('是否退费', '退费', {
@@ -1510,9 +1521,13 @@
1510 1521
                     that.loadingtwo = false
1511 1522
                     return false
1512 1523
                   } else {
1513
-                    that.changeRadio(1)
1514
-                    that.$message({ message: '退费成功', type: 'success',duration:5000 })
1515
-                    that.loadingtwo = false
1524
+                    if (response.data.data.failed_code == -10) {
1525
+                      that.$message.error(response.data.data.msg)
1526
+                    } else {
1527
+                      that.changeRadio(1)
1528
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
1529
+                      that.loadingtwo = false
1530
+                    }
1516 1531
 
1517 1532
                   }
1518 1533
                 })
@@ -1639,7 +1654,7 @@
1639 1654
               'patient_id': this.patientInfo.id,
1640 1655
               'record_time': this.record_date,
1641 1656
               'org_id': this.$store.getters.xt_user.org_id,
1642
-              'admin_user_id': this.$store.getters.xt_user.user.id,
1657
+              'admin_user_id': this.$store.getters.xt_user.user.id
1643 1658
             }
1644 1659
             axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1645 1660
               params: params
@@ -1649,9 +1664,13 @@
1649 1664
                   that.$message.error(response.data.msg)
1650 1665
                   return false
1651 1666
                 } else {
1652
-                  that.radio = 1
1653
-                  that.changeRadio(1)
1654
-                  that.$message({ message: '退号成功', type: 'success',duration:5000 })
1667
+                  if (response.data.data.failed_code == -10) {
1668
+                    that.$message.error(response.data.data.msg)
1669
+                  } else {
1670
+                    that.radio = 1
1671
+                    that.changeRadio(1)
1672
+                    that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1673
+                  }
1655 1674
 
1656 1675
                 }
1657 1676
               })
@@ -1677,7 +1696,7 @@
1677 1696
                 return false
1678 1697
               } else {
1679 1698
                 // that.$message({ message: '退号成功', type: 'success' })
1680
-                that.$message({ message: '退明细成功', type: 'success',duration:5000 })
1699
+                that.$message({ message: '退明细成功', type: 'success', duration: 5000 })
1681 1700
                 that.loadingtwo = false
1682 1701
               }
1683 1702
             })
@@ -1726,7 +1745,7 @@
1726 1745
             })
1727 1746
         } else if (index == 15) {
1728 1747
           var that = this
1729
-          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 == 10106) {
1748
+          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 == 10106) {
1730 1749
 
1731 1750
             if (this.diagnosis.length || this.diagnosis == 0) {
1732 1751
               that.$message.error('诊断不能为空,请选择诊断内容')
@@ -1835,7 +1854,7 @@
1835 1854
 
1836 1855
           }
1837 1856
           this.loadingtwo = true
1838
-          if (this.$store.getters.xt_user.org_id == 9919||this.$store.getters.xt_user.org_id == 10106) {
1857
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1839 1858
             var that = this
1840 1859
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1841 1860
               params: form
@@ -2535,7 +2554,7 @@
2535 2554
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2536 2555
               params: params,
2537 2556
               headers: {
2538
-                'Permission': 5,
2557
+                'Permission': 5
2539 2558
               }
2540 2559
             })
2541 2560
               .then(function(response) {
@@ -2647,8 +2666,7 @@
2647 2666
 
2648 2667
                   } else {
2649 2668
 
2650
-                      that.$message({ message: '明细撤销成功', type: 'success' })
2651
-
2669
+                    that.$message({ message: '明细撤销成功', type: 'success' })
2652 2670
 
2653 2671
                   }
2654 2672
                 }
@@ -2664,7 +2682,7 @@
2664 2682
               patient_id: this.patient_id,
2665 2683
               prescription_id: this.prescription_id,
2666 2684
               order_id: this.order.id,
2667
-              admin_user_id: this.$store.getters.xt_user.user.id,
2685
+              admin_user_id: this.$store.getters.xt_user.user.id
2668 2686
 
2669 2687
             }
2670 2688
             this.newOrderObj = obj

+ 1 - 1
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -150,7 +150,7 @@ export default {
150 150
 
151 151
     },
152 152
     getInfo(order_id) {
153
-      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 10106) {
153
+      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4) {
154 154
 
155 155
         var that = this
156 156
 

+ 1 - 1
src/xt_pages/outpatientCharges/summary.vue View File

@@ -96,7 +96,7 @@
96 96
         <el-table-column align="center" prop="name" label="操作">
97 97
           <template slot-scope="scope">
98 98
             <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
99
-            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106)">结算单</el-button>
99
+            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">结算单</el-button>
100 100
           </template>
101 101
         </el-table-column>
102 102
       </el-table>

+ 10 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -1584,6 +1584,11 @@
1584 1584
             this.allDrugs = response.data.data.drugs
1585 1585
             this.advices_template = response.data.data.advices_template
1586 1586
             this.doctors = response.data.data.doctors
1587
+            for (let i = 0; i < this.doctors.length; i++){
1588
+              if(this.doctors[i].user_type == 1){
1589
+                this.doctors.splice(i,1)
1590
+              }
1591
+            }
1587 1592
             this.department = response.data.data.department
1588 1593
             this.sick = response.data.data.sick
1589 1594
             this.diagnoses = response.data.data.diagnose
@@ -1699,6 +1704,11 @@
1699 1704
 
1700 1705
       },
1701 1706
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
1707
+        for (let i = 0; i < doctors.length; i++){
1708
+          if(doctors[i].user_type == 1){
1709
+            doctors.splice(i,1)
1710
+          }
1711
+        }
1702 1712
 
1703 1713
         this.curMonthPrescriptions = {}
1704 1714
         this.curPrescriptions = {}

+ 6 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -748,6 +748,11 @@
748 748
             this.doctors = response.data.data.doctors
749 749
             this.department = response.data.data.department
750 750
 
751
+            for (let i = 0; i < this.doctors.length; i++){
752
+              if(this.doctors[i].user_type == 1){
753
+                this.doctors.splice(i,1)
754
+              }
755
+            }
751 756
 
752 757
             var month_prescriptions = response.data.data.month_prescriptions
753 758
             this.setMonthPrescription(month_prescriptions)
@@ -898,7 +903,7 @@
898 903
       },
899 904
 
900 905
       choosePatient(val) {
901
-        
906
+
902 907
         var nowDate = new Date()
903 908
         var nowYear = nowDate.getFullYear()
904 909
         var nowMonth = nowDate.getMonth() + 1

+ 29 - 11
src/xt_pages/outpatientRegistration/index.vue View File

@@ -427,7 +427,7 @@
427 427
     saveHisPatient
428 428
   } from '@/api/project/project'
429 429
   import { getDictionaryDataConfig } from '@/utils/data'
430
-  import { uParseTime } from '@/utils/tools'
430
+  import { uParseTime,jsGetAge } from '@/utils/tools'
431 431
   import { getInitData } from '@/api/his/his'
432 432
   import axios from 'axios'
433 433
 
@@ -655,6 +655,21 @@
655 655
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
656 656
         this.form.phone = val.phone
657 657
         this.form.idCard = val.id_card_no
658
+
659
+        var thisLen =  this.form.idCard.length;
660
+        var birth = "";
661
+        if (thisLen == 15) {
662
+          birth = "19" + this.form.idCard.substr(6, 6);
663
+        } else {
664
+          birth = this.form.idCard.substr(6, 8);
665
+        }
666
+        var births =
667
+          birth.substr(0, 4) +
668
+          "-" +
669
+          birth.substr(4, 2) +
670
+          "-" +
671
+          birth.substr(6, 2);
672
+        this.form.age = jsGetAge(births, "-");
658 673
       },
659 674
       querySearchAsync(keyword, cb) {
660 675
         let key = ''
@@ -900,11 +915,6 @@
900 915
           return
901 916
         }
902 917
 
903
-        // if (this.form.p_type == '') {
904
-        //   this.$message.error('处方类型不能为空')
905
-        //   this.is_Name = true
906
-        //   return
907
-        // }
908 918
 
909 919
         this.$refs[formName].validate((valid) => {
910 920
           if (valid) {
@@ -981,11 +991,15 @@
981 991
                     that.$refs.register.hide()
982 992
                     return false
983 993
                   } else {
984
-                    that.$refs.register.hide()
985
-                    that.getPatientList()
986
-                    that.$message({ message: '挂号成功', type: 'success' })
987
-                    that.loadingone = false
988
-
994
+                    if (response.data.data.failed_code == -10) {
995
+                      that.$message.error(response.data.data.msg)
996
+                      return
997
+                    } else {
998
+                      that.$refs.register.hide()
999
+                      that.getPatientList()
1000
+                      that.$message({ message: '挂号成功', type: 'success' })
1001
+                      that.loadingone = false
1002
+                    }
989 1003
                     // var his_info = response.data.data.his_info
990 1004
                     // that.hisPatientInfo = his_info
991 1005
                   }
@@ -1302,6 +1316,10 @@
1302 1316
             this.sick = response.data.data.sick
1303 1317
             this.diagnoses = response.data.data.diagnose
1304 1318
 
1319
+            this.form.p_type = 14
1320
+            this.form.sick_type = this.sick[0].id
1321
+            this.form.diagnosis = this.diagnoses[0].id
1322
+
1305 1323
           }
1306 1324
         })
1307 1325
 

+ 0 - 15
src/xt_pages/user/patients.vue View File

@@ -453,21 +453,6 @@
453 453
               ></el-button>
454 454
             </el-tooltip>
455 455
 
456
-            <el-tooltip
457
-                    class="item"
458
-                    effect="dark"
459
-                    content="备案"
460
-                    placement="top"
461
-            >
462
-              <el-button
463
-                      type="danger"
464
-                      icon="el-icon-tickets"
465
-                      size="small"
466
-                      @click="
467
-                  putOnRecord(1,scope.row)
468
-                "
469
-              ></el-button>
470
-            </el-tooltip>
471 456
           </template>
472 457
         </el-table-column>
473 458
       </el-table>