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
 </template>
182
 </template>
183
 
183
 
184
 <script>
184
 <script>
185
-  import {uParseTime} from "@/utils/tools";
185
+  import {uParseTime,jsGetAge} from "@/utils/tools";
186
   import axios from 'axios'
186
   import axios from 'axios'
187
   import {PostSearch} from '@/api/patient'
187
   import {PostSearch} from '@/api/patient'
188
 
188
 
394
         this.form.id = val.id
394
         this.form.id = val.id
395
         this.form.name = val.name
395
         this.form.name = val.name
396
         this.form.gender = val.gender
396
         this.form.gender = val.gender
397
-        this.form.age = val.age
398
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
397
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
399
         this.form.phone = val.phone
398
         this.form.phone = val.phone
400
         this.form.id_card = val.id_card_no
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
       querySearchAsync(keyword, cb) {
415
       querySearchAsync(keyword, cb) {
403
         let key = ''
416
         let key = ''
468
       },
481
       },
469
       show: function () {
482
       show: function () {
470
         this.form = Object.assign({}, this.resetForm)
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
         // this.form.name = patientInfo.name
488
         // this.form.name = patientInfo.name
472
         // this.form.gender = patientInfo.gender
489
         // this.form.gender = patientInfo.gender
473
         // this.form.age = patientInfo.age
490
         // this.form.age = patientInfo.age
479
         // this.form.id_card_type = 1
496
         // this.form.id_card_type = 1
480
         // if( this.form.social_type == 0){
497
         // if( this.form.social_type == 0){
481
         //   this.form.social_type = ""
498
         //   this.form.social_type = ""
482
-        //
483
         // }
499
         // }
484
         this.visibility = true
500
         this.visibility = true
485
 
501
 

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

65
                         </el-button>
65
                         </el-button>
66
 
66
 
67
                         <el-button
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
                         </el-button>
72
                         </el-button>
73
 
73
 
74
                         <el-button size="small" @click="sz_open(11)" type="primary"
74
                         <el-button size="small" @click="sz_open(11)" type="primary"
86
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
86
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
87
 
87
 
88
                         <!--<el-button-->
88
                         <!--<el-button-->
89
-                                <!--size="small" @click="sz_open(7)" type="primary"-->
89
+                        <!--size="small" @click="sz_open(7)" type="primary"-->
90
                         <!--&gt;撤销明细-->
90
                         <!--&gt;撤销明细-->
91
                         <!--</el-button>-->
91
                         <!--</el-button>-->
92
                     </div>
92
                     </div>
103
                     <!--</el-button>-->
103
                     <!--</el-button>-->
104
 
104
 
105
 
105
 
106
-
107
-
108
                     <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
106
                     <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
109
                     <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
107
                     <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
110
 
108
 
111
 
109
 
112
-
113
                     <div v-if="this.$store.getters.xt_user.org_id != 9504 && this.$store.getters.xt_user.org_id != 10028">
110
                     <div v-if="this.$store.getters.xt_user.org_id != 9504 && this.$store.getters.xt_user.org_id != 10028">
114
                         <el-button size="small" @click="open(3)" type="primary">打印</el-button>
111
                         <el-button size="small" @click="open(3)" type="primary">打印</el-button>
115
                         <el-button v-loading="loadingone" size="small"
112
                         <el-button v-loading="loadingone" size="small"
142
                         </el-button>
139
                         </el-button>
143
 
140
 
144
                         <!--<el-button-->
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
                         <!--&gt;撤销明细-->
144
                         <!--&gt;撤销明细-->
148
                         <!--</el-button>-->
145
                         <!--</el-button>-->
149
 
146
 
340
         <register-dialog ref='register' :doctors="doctors" :department="department" :sick="sick" :diagnoses="diagnoses"
337
         <register-dialog ref='register' :doctors="doctors" :department="department" :sick="sick" :diagnoses="diagnoses"
341
                          v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
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
                              v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
342
                              v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
345
 
343
 
346
         <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
344
         <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
496
         treatVisible: false,
494
         treatVisible: false,
497
         orderObj: {},
495
         orderObj: {},
498
         paramsObj: {},
496
         paramsObj: {},
499
-        newOrderObj:{},
497
+        newOrderObj: {},
500
         statementVisible: false,
498
         statementVisible: false,
501
         newStatementVisible: false,
499
         newStatementVisible: false,
502
 
500
 
527
     },
525
     },
528
     methods: {
526
     methods: {
529
       query() {
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
           var that = this
529
           var that = this
532
           axios.get('http://127.0.0.1:9532/api/org/info', {
530
           axios.get('http://127.0.0.1:9532/api/org/info', {
533
             params: {}
531
             params: {}
633
                   that.radio = 2
631
                   that.radio = 2
634
                   that.$refs.charge.hide()
632
                   that.$refs.charge.hide()
635
                   that.state = '已收费'
633
                   that.state = '已收费'
636
-                  that.$message({ message: '收费成功', type: 'success'})
634
+                  that.$message({ message: '收费成功', type: 'success' })
637
                   that.loadingtwo = false
635
                   that.loadingtwo = false
638
                   that.cal_one = this.cal_one - 1
636
                   that.cal_one = this.cal_one - 1
639
                   that.cal_two = this.cal_two + 1
637
                   that.cal_two = this.cal_two + 1
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
           var that = this
647
           var that = this
650
           axios.get('http://127.0.0.1:9532/api/upload/get', {
648
           axios.get('http://127.0.0.1:9532/api/upload/get', {
651
             params: form,
649
             params: form,
660
                 that.$refs.charge.hide()
658
                 that.$refs.charge.hide()
661
                 return false
659
                 return false
662
               } else {
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
             .catch(function(error) {
680
             .catch(function(error) {
698
         }
702
         }
699
       }, chargeCancel() {
703
       }, chargeCancel() {
700
         this.$refs.charge.hide()
704
         this.$refs.charge.hide()
701
-      },registerCancel(){
705
+      }, registerCancel() {
702
         this.$refs.register9504.hide()
706
         this.$refs.register9504.hide()
703
 
707
 
704
-
705
-      },registerConfirm(forms){
708
+      }, registerConfirm(forms) {
706
         forms['record_time'] = this.record_date
709
         forms['record_time'] = this.record_date
707
         forms['admin_user_id'] = this.$store.getters.xt_user.user.id
710
         forms['admin_user_id'] = this.$store.getters.xt_user.user.id
708
         forms['org_id'] = this.$store.getters.xt_user.org_id
711
         forms['org_id'] = this.$store.getters.xt_user.org_id
710
         this.loadingone = true
713
         this.loadingone = true
711
 
714
 
712
         var that = this
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
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
717
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
715
             params: forms,
718
             params: forms,
716
             headers: {
719
             headers: {
794
 
797
 
795
         var that = this
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
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
802
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
800
             params: forms,
803
             params: forms,
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
           axios.get('http://127.0.0.1:9532/api/register/get', {
875
           axios.get('http://127.0.0.1:9532/api/register/get', {
873
             params: forms,
876
             params: forms,
882
                 that.$refs.register.hide()
885
                 that.$refs.register.hide()
883
                 return false
886
                 return false
884
               } else {
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
             .catch(function(error) {
942
             .catch(function(error) {
940
               return false
951
               return false
941
             } else {
952
             } else {
942
               this.getPatientList()
953
               this.getPatientList()
943
-              this.$message({ message: '挂号成功', type: 'success',duration:5000 })
954
+              this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
944
               this.$refs.register.hide()
955
               this.$refs.register.hide()
945
               this.loadingone = false
956
               this.loadingone = false
946
               var his_info = response.data.data.his_info
957
               var his_info = response.data.data.his_info
1484
           }
1495
           }
1485
 
1496
 
1486
         } else if (index == 5) {
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
             var that = this
1500
             var that = this
1490
             this.$confirm('是否退费', '退费', {
1501
             this.$confirm('是否退费', '退费', {
1510
                     that.loadingtwo = false
1521
                     that.loadingtwo = false
1511
                     return false
1522
                     return false
1512
                   } else {
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
               'patient_id': this.patientInfo.id,
1654
               'patient_id': this.patientInfo.id,
1640
               'record_time': this.record_date,
1655
               'record_time': this.record_date,
1641
               'org_id': this.$store.getters.xt_user.org_id,
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
             axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1659
             axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1645
               params: params
1660
               params: params
1649
                   that.$message.error(response.data.msg)
1664
                   that.$message.error(response.data.msg)
1650
                   return false
1665
                   return false
1651
                 } else {
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
                 return false
1696
                 return false
1678
               } else {
1697
               } else {
1679
                 // that.$message({ message: '退号成功', type: 'success' })
1698
                 // that.$message({ message: '退号成功', type: 'success' })
1680
-                that.$message({ message: '退明细成功', type: 'success',duration:5000 })
1699
+                that.$message({ message: '退明细成功', type: 'success', duration: 5000 })
1681
                 that.loadingtwo = false
1700
                 that.loadingtwo = false
1682
               }
1701
               }
1683
             })
1702
             })
1726
             })
1745
             })
1727
         } else if (index == 15) {
1746
         } else if (index == 15) {
1728
           var that = this
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
             if (this.diagnosis.length || this.diagnosis == 0) {
1750
             if (this.diagnosis.length || this.diagnosis == 0) {
1732
               that.$message.error('诊断不能为空,请选择诊断内容')
1751
               that.$message.error('诊断不能为空,请选择诊断内容')
1835
 
1854
 
1836
           }
1855
           }
1837
           this.loadingtwo = true
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
             var that = this
1858
             var that = this
1840
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1859
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1841
               params: form
1860
               params: form
2535
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2554
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2536
               params: params,
2555
               params: params,
2537
               headers: {
2556
               headers: {
2538
-                'Permission': 5,
2557
+                'Permission': 5
2539
               }
2558
               }
2540
             })
2559
             })
2541
               .then(function(response) {
2560
               .then(function(response) {
2647
 
2666
 
2648
                   } else {
2667
                   } else {
2649
 
2668
 
2650
-                      that.$message({ message: '明细撤销成功', type: 'success' })
2651
-
2669
+                    that.$message({ message: '明细撤销成功', type: 'success' })
2652
 
2670
 
2653
                   }
2671
                   }
2654
                 }
2672
                 }
2664
               patient_id: this.patient_id,
2682
               patient_id: this.patient_id,
2665
               prescription_id: this.prescription_id,
2683
               prescription_id: this.prescription_id,
2666
               order_id: this.order.id,
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
             this.newOrderObj = obj
2688
             this.newOrderObj = obj

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

150
 
150
 
151
     },
151
     },
152
     getInfo(order_id) {
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
         var that = this
155
         var that = this
156
 
156
 

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

96
         <el-table-column align="center" prop="name" label="操作">
96
         <el-table-column align="center" prop="name" label="操作">
97
           <template slot-scope="scope">
97
           <template slot-scope="scope">
98
             <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
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
           </template>
100
           </template>
101
         </el-table-column>
101
         </el-table-column>
102
       </el-table>
102
       </el-table>

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

1584
             this.allDrugs = response.data.data.drugs
1584
             this.allDrugs = response.data.data.drugs
1585
             this.advices_template = response.data.data.advices_template
1585
             this.advices_template = response.data.data.advices_template
1586
             this.doctors = response.data.data.doctors
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
             this.department = response.data.data.department
1592
             this.department = response.data.data.department
1588
             this.sick = response.data.data.sick
1593
             this.sick = response.data.data.sick
1589
             this.diagnoses = response.data.data.diagnose
1594
             this.diagnoses = response.data.data.diagnose
1699
 
1704
 
1700
       },
1705
       },
1701
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
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
         this.curMonthPrescriptions = {}
1713
         this.curMonthPrescriptions = {}
1704
         this.curPrescriptions = {}
1714
         this.curPrescriptions = {}

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

748
             this.doctors = response.data.data.doctors
748
             this.doctors = response.data.data.doctors
749
             this.department = response.data.data.department
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
             var month_prescriptions = response.data.data.month_prescriptions
757
             var month_prescriptions = response.data.data.month_prescriptions
753
             this.setMonthPrescription(month_prescriptions)
758
             this.setMonthPrescription(month_prescriptions)
898
       },
903
       },
899
 
904
 
900
       choosePatient(val) {
905
       choosePatient(val) {
901
-        
906
+
902
         var nowDate = new Date()
907
         var nowDate = new Date()
903
         var nowYear = nowDate.getFullYear()
908
         var nowYear = nowDate.getFullYear()
904
         var nowMonth = nowDate.getMonth() + 1
909
         var nowMonth = nowDate.getMonth() + 1

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

427
     saveHisPatient
427
     saveHisPatient
428
   } from '@/api/project/project'
428
   } from '@/api/project/project'
429
   import { getDictionaryDataConfig } from '@/utils/data'
429
   import { getDictionaryDataConfig } from '@/utils/data'
430
-  import { uParseTime } from '@/utils/tools'
430
+  import { uParseTime,jsGetAge } from '@/utils/tools'
431
   import { getInitData } from '@/api/his/his'
431
   import { getInitData } from '@/api/his/his'
432
   import axios from 'axios'
432
   import axios from 'axios'
433
 
433
 
655
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
655
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
656
         this.form.phone = val.phone
656
         this.form.phone = val.phone
657
         this.form.idCard = val.id_card_no
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
       querySearchAsync(keyword, cb) {
674
       querySearchAsync(keyword, cb) {
660
         let key = ''
675
         let key = ''
900
           return
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
         this.$refs[formName].validate((valid) => {
919
         this.$refs[formName].validate((valid) => {
910
           if (valid) {
920
           if (valid) {
981
                     that.$refs.register.hide()
991
                     that.$refs.register.hide()
982
                     return false
992
                     return false
983
                   } else {
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
                     // var his_info = response.data.data.his_info
1003
                     // var his_info = response.data.data.his_info
990
                     // that.hisPatientInfo = his_info
1004
                     // that.hisPatientInfo = his_info
991
                   }
1005
                   }
1302
             this.sick = response.data.data.sick
1316
             this.sick = response.data.data.sick
1303
             this.diagnoses = response.data.data.diagnose
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
               ></el-button>
453
               ></el-button>
454
             </el-tooltip>
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
           </template>
456
           </template>
472
         </el-table-column>
457
         </el-table-column>
473
       </el-table>
458
       </el-table>