Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 3 weeks ago
parent
commit
cb95272386

+ 7 - 0
src/api/doctor.js View File

13
   })
13
   })
14
 }
14
 }
15
 
15
 
16
+
17
+export function fetchMoibleAllDoctorAndNurse(){
18
+  return request({
19
+    url:"/api/mobilealldoctors",
20
+    method:"Get",
21
+  })
22
+}

+ 2 - 4
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue View File

373
      if(totalthree == ""){
373
      if(totalthree == ""){
374
       totalthree =0
374
       totalthree =0
375
      }
375
      }
376
-    //  console.log("totalone=========",totalone)
377
-    //  console.log("totalone=========",totaltwo)
378
-    //  console.log("totalone=========",totalthree)
376
+   
379
      var total = 0
377
      var total = 0
380
       total = (parseFloat(totalone)  + parseFloat(totaltwo)  - parseFloat(totalthree))
378
       total = (parseFloat(totalone)  + parseFloat(totaltwo)  - parseFloat(totalthree))
381
-      console.log("total-=---------------",total)
379
+     
382
       if(total >0){
380
       if(total >0){
383
         return total.toFixed(2)
381
         return total.toFixed(2)
384
       }else{
382
       }else{

+ 17 - 16
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue View File

1622
     
1622
     
1623
    },
1623
    },
1624
    GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1624
    GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1625
-      if(totalone == ""){
1626
-          totalone =0
1627
-      }
1628
-      if(totaltwo == ""){
1629
-        totaltwo =0
1630
-      }
1631
-      if(totalone == ""){
1632
-          totalone =0
1633
-      }
1634
-      if(totalthree == ""){
1635
-        totalthree =0
1636
-      }
1637
      
1625
      
1638
-      var total = 0
1639
-      total = totalone  + totaltwo  - totalthree
1640
-      if(total >0 || total!="NaN"){
1641
-       
1626
+    if(totalone == ""){
1627
+        totalone =0
1628
+     }
1629
+     if(totaltwo == ""){
1630
+       totaltwo =0
1631
+     }
1632
+     if(totalone == ""){
1633
+        totalone =0
1634
+     }
1635
+     if(totalthree == ""){
1636
+      totalthree =0
1637
+     }
1638
+   
1639
+     var total = 0
1640
+      total = (parseFloat(totalone)  + parseFloat(totaltwo)  - parseFloat(totalthree))
1641
+     
1642
+      if(total >0){
1642
         return total.toFixed(2)
1643
         return total.toFixed(2)
1643
       }else{
1644
       }else{
1644
         return ""
1645
         return ""

+ 3 - 3
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

754
     }
754
     }
755
     if(val2!=null && val2.length > 0){
755
     if(val2!=null && val2.length > 0){
756
      for(let i=0;i<val2.length;i++){
756
      for(let i=0;i<val2.length;i++){
757
-      count_one_price +=val2[i].count * val[i].price
757
+      count_one_price +=val2[i].count * val2[i].price
758
      }
758
      }
759
     }
759
     }
760
     all_count_price = count_price + count_one_price
760
     all_count_price = count_price + count_one_price
957
      }
957
      }
958
      if(val2!=null && val2.length > 0){
958
      if(val2!=null && val2.length > 0){
959
       for(let i=0;i<val2.length;i++){
959
       for(let i=0;i<val2.length;i++){
960
-        count_one_price +=val2[i].count  * val[i].price
960
+        count_one_price +=val2[i].count  * val2[i].price
961
       }
961
       }
962
      }
962
      }
963
      if(val3!=null && val3.length > 0){
963
      if(val3!=null && val3.length > 0){
964
       for(let i=0;i<val3.length;i++){
964
       for(let i=0;i<val3.length;i++){
965
-        count_two_price +=val3[i].count  * val[i].price
965
+        count_two_price +=val3[i].count  * val3[i].price
966
       }
966
       }
967
      }
967
      }
968
      console.log("本期减少",count_price)
968
      console.log("本期减少",count_price)

+ 3 - 3
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue View File

904
       }
904
       }
905
       if(val2!=null && val2.length > 0){
905
       if(val2!=null && val2.length > 0){
906
       for(let i=0;i<val2.length;i++){
906
       for(let i=0;i<val2.length;i++){
907
-        count_one_price +=val2[i].count * val[i].price
907
+        count_one_price +=val2[i].count * val2[i].price
908
       }
908
       }
909
       }
909
       }
910
       all_count_price = count_price + count_one_price
910
       all_count_price = count_price + count_one_price
927
      }
927
      }
928
      if(val2!=null && val2.length > 0){
928
      if(val2!=null && val2.length > 0){
929
       for(let i=0;i<val2.length;i++){
929
       for(let i=0;i<val2.length;i++){
930
-        count_one_price +=val2[i].count  * val[i].price
930
+        count_one_price +=val2[i].count  * val2[i].price
931
       }
931
       }
932
      }
932
      }
933
      if(val3!=null && val3.length > 0){
933
      if(val3!=null && val3.length > 0){
934
       for(let i=0;i<val3.length;i++){
934
       for(let i=0;i<val3.length;i++){
935
-        count_two_price +=val3[i].count  * val[i].price
935
+        count_two_price +=val3[i].count  * val3[i].price
936
       }
936
       }
937
      }
937
      }
938
      console.log("本期减少",count_price)
938
      console.log("本期减少",count_price)

+ 8 - 8
src/xt_pages/user/components/PatientSidebar.vue View File

167
               name: '3-1',
167
               name: '3-1',
168
               label: '病史'
168
               label: '病史'
169
             },
169
             },
170
-            {
171
-              name: '3-4',
172
-              label: '病史新'
173
-            },
170
+            // {
171
+            //   name: '3-4',
172
+            //   label: '病史新'
173
+            // },
174
             {
174
             {
175
               name: '3-2',
175
               name: '3-2',
176
               label: '体格检查'
176
               label: '体格检查'
179
             //   name: '3-3',
179
             //   name: '3-3',
180
             //   label: '体格检查新'
180
             //   label: '体格检查新'
181
             // },
181
             // },
182
-             {
183
-              name: '3-5',
184
-              label: '病程记录新'
185
-             },
182
+            //  {
183
+            //   name: '3-5',
184
+            //   label: '病程记录新'
185
+            //  },
186
             {
186
             {
187
               name: '1-11',
187
               name: '1-11',
188
               label: '首次病程记录'
188
               label: '首次病程记录'

+ 20 - 8
src/xt_pages/user/courseOfDisease_new.vue View File

73
                 <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
73
                 <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
74
                   <el-option
74
                   <el-option
75
                     v-for="item in doctorOptions"
75
                     v-for="item in doctorOptions"
76
-                    :key="item.id"
77
-                    :label="item.name"
78
-                    :value="item.id">
76
+                    :key="item.admin_user_id"
77
+                    :label="item.user_name"
78
+                    :value="item.admin_user_id">
79
                   </el-option>
79
                   </el-option>
80
                 </el-select>
80
                 </el-select>
81
               </div>
81
               </div>
284
     deleteCourseTempalte,
284
     deleteCourseTempalte,
285
     getAutoPatientContent
285
     getAutoPatientContent
286
   } from '@/api/patient'
286
   } from '@/api/patient'
287
-  import { fetchAllDoctorAndNurse } from "@/api/doctor";
287
+  import { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
288
   import { parseTime } from '@/utils'
288
   import { parseTime } from '@/utils'
289
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
289
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
290
   import { uParseTime } from '@/utils/tools'
290
   import { uParseTime } from '@/utils/tools'
335
         end_date:'',
335
         end_date:'',
336
         quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上周'},],
336
         quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上周'},],
337
         tableData:[],
337
         tableData:[],
338
-        admin_user_id:0,
338
+        admin_user_id:"",
339
         record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
339
         record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
340
         template_name:"",
340
         template_name:"",
341
         id:0,
341
         id:0,
381
     },
381
     },
382
     created() {
382
     created() {
383
       this.admin_user_id = this.$store.getters.xt_user.user.id
383
       this.admin_user_id = this.$store.getters.xt_user.user.id
384
+      if(this.admin_user_id == 0){
385
+         this.admin_user_id = ""
386
+      }
384
 
387
 
385
       this.patient_id = parseInt(this.$route.query.id)
388
       this.patient_id = parseInt(this.$route.query.id)
386
       this.org_id = this.$store.getters.xt_user.template_info.org_id;
389
       this.org_id = this.$store.getters.xt_user.template_info.org_id;
426
         this.library_dialog = false
429
         this.library_dialog = false
427
       },
430
       },
428
       getCurrentChangeOne(val){
431
       getCurrentChangeOne(val){
432
+        console.log("val================",val)
429
         this.$refs.editor.contents = val.content
433
         this.$refs.editor.contents = val.content
430
         this.record_date = this.getTime(val.record_time)
434
         this.record_date = this.getTime(val.record_time)
435
+        this.admin_user_id = val.recorder
436
+        if(this.admin_user_id == 0){
437
+           this.admin_user_id = ""
438
+        }
431
         this.id = val.id
439
         this.id = val.id
432
       },
440
       },
433
       getCurrentChangeTwo(val){
441
       getCurrentChangeTwo(val){
487
       getDocName(admin_user_id){
495
       getDocName(admin_user_id){
488
         var user_name = ""
496
         var user_name = ""
489
         for(let i=0;i<this.doctorOptions.length;i++){
497
         for(let i=0;i<this.doctorOptions.length;i++){
490
-          if(admin_user_id == this.doctorOptions[i].id){
491
-              user_name = this.doctorOptions[i].name
498
+          if(admin_user_id == this.doctorOptions[i].admin_user_id){
499
+              user_name = this.doctorOptions[i].user_name
492
           }
500
           }
493
         }
501
         }
494
        return user_name
502
        return user_name
507
         })
515
         })
508
      },
516
      },
509
      fetchAllDoctorAndNurse() {
517
      fetchAllDoctorAndNurse() {
510
-       fetchAllDoctorAndNurse().then(response => {
518
+      fetchMoibleAllDoctorAndNurse().then(response => {
511
         if (response.data.state == 1) {
519
         if (response.data.state == 1) {
512
           this.doctorOptions= []
520
           this.doctorOptions= []
513
           this.doctorOptions = response.data.data.doctors;
521
           this.doctorOptions = response.data.data.doctors;
541
           this.$message.error('请填写病程内容')
549
           this.$message.error('请填写病程内容')
542
           return
550
           return
543
         }
551
         }
552
+
553
+        if(this.admin_user_id == ""){
554
+           this.admin_user_id = 0
555
+        }
544
        
556
        
545
         var params = {
557
         var params = {
546
           id:this.id,
558
           id:this.id,

+ 68 - 50
src/xt_pages/user/sickHistory_new.vue View File

99
                 <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
99
                 <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
100
                   <el-option
100
                   <el-option
101
                     v-for="item in doctorOptions"
101
                     v-for="item in doctorOptions"
102
-                    :key="item.id"
103
-                    :label="item.name"
104
-                    :value="item.id">
102
+                    :key="item.admin_user_id"
103
+                    :label="item.user_name"
104
+                    :value="item.admin_user_id">
105
                   </el-option>
105
                   </el-option>
106
                 </el-select>
106
                 </el-select>
107
               </div>
107
               </div>
203
         <div style="width: 100%;text-align: center;margin-bottom: 10px;">
203
         <div style="width: 100%;text-align: center;margin-bottom: 10px;">
204
           <h2>{{orgname}}</h2>
204
           <h2>{{orgname}}</h2>
205
         </div>
205
         </div>
206
-        <div style="display: flex;padding: 5px 0;border-bottom: 1px solid black;"> 
206
+        <div style="display: flex;padding: 5px 0;border-bottom: 1px solid black;">
207
           <div style="flex: 1;">姓名:</div>
207
           <div style="flex: 1;">姓名:</div>
208
           <div style="flex: 1;">病历号:</div>
208
           <div style="flex: 1;">病历号:</div>
209
           <div style="flex: 1;">病区-床号:</div>
209
           <div style="flex: 1;">病区-床号:</div>
319
 import PatientSidebar_new from './components/PatientSidebar_new'
319
 import PatientSidebar_new from './components/PatientSidebar_new'
320
 import Editor from '@/components/Editor'
320
 import Editor from '@/components/Editor'
321
 import ueditor from '@/components/Uedtior'
321
 import ueditor from '@/components/Uedtior'
322
-import { fetchAllDoctorAndNurse } from "@/api/doctor";
322
+import { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
323
  import print from 'print-js'
323
  import print from 'print-js'
324
 import {
324
 import {
325
   createNewSickHistoryRecord,
325
   createNewSickHistoryRecord,
412
   },
412
   },
413
   created() {
413
   created() {
414
     this.orgname = this.$store.getters.xt_user.org.org_name;
414
     this.orgname = this.$store.getters.xt_user.org.org_name;
415
+
416
+
417
+    this.fetchAllDoctorAndNurse()
415
     this.wayOptions = getDataConfig("patient", "reimbursement_ways");
418
     this.wayOptions = getDataConfig("patient", "reimbursement_ways");
416
     console.log('this.wayOptions',this.wayOptions);
419
     console.log('this.wayOptions',this.wayOptions);
417
-    
420
+
418
     this.admin_user_id = this.$store.getters.xt_user.user.id
421
     this.admin_user_id = this.$store.getters.xt_user.user.id
422
+
423
+    if(this.admin_user_id == 0){
424
+        this.admin_user_id = ""
425
+    }
419
     this.patient_id = parseInt(this.$route.query.id)
426
     this.patient_id = parseInt(this.$route.query.id)
420
-    
427
+
421
     if (isNaN(this.patient_id) || this.patient_id <= 0) {
428
     if (isNaN(this.patient_id) || this.patient_id <= 0) {
422
       this.$notify.error({
429
       this.$notify.error({
423
         title: '错误',
430
         title: '错误',
449
       (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
456
       (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
450
       '-' +
457
       '-' +
451
       (nowDay < 10 ? '0' + nowDay : nowDay)
458
       (nowDay < 10 ? '0' + nowDay : nowDay)
459
+      this.getlist()
460
+      this.fetchPatient(this.patient_id)
452
 
461
 
453
-    this.getlist()
454
-    this.fetchAllDoctorAndNurse()
455
-    this.fetchPatient(this.patient_id)
456
   },
462
   },
457
   methods: {
463
   methods: {
458
     template_dele(){
464
     template_dele(){
498
       this.edit_index = row.index
504
       this.edit_index = row.index
499
     },
505
     },
500
     template_click(){
506
     template_click(){
501
-      
507
+
502
       console.log('this.add_index',this.getwayoption(this.form.reimbursement_way_id));
508
       console.log('this.add_index',this.getwayoption(this.form.reimbursement_way_id));
503
       if(this.add_index ==0){
509
       if(this.add_index ==0){
504
         this.template_dialog = true
510
         this.template_dialog = true
683
             console.log("haaaaaaaaaaaaa",this.templateList)
689
             console.log("haaaaaaaaaaaaa",this.templateList)
684
           }
690
           }
685
         })
691
         })
686
-        
692
+
687
         // this.templateList.push(obj)
693
         // this.templateList.push(obj)
688
-        
694
+
689
         console.log('11111111',obj);
695
         console.log('11111111',obj);
690
 
696
 
691
       }
697
       }
716
     },
722
     },
717
 
723
 
718
     fetchAllDoctorAndNurse() {
724
     fetchAllDoctorAndNurse() {
719
-      fetchAllDoctorAndNurse().then(response => {
725
+      fetchMoibleAllDoctorAndNurse().then(response => {
720
         if (response.data.state == 1) {
726
         if (response.data.state == 1) {
721
           this.doctorOptions= []
727
           this.doctorOptions= []
722
           this.doctorOptions = response.data.data.doctors;
728
           this.doctorOptions = response.data.data.doctors;
741
         this.$message.error('请选择医生')
747
         this.$message.error('请选择医生')
742
         return
748
         return
743
       }
749
       }
744
-      if(this.sick_history_time.length  == 0){
750
+      if(this.start_time==""){
745
         this.$message.error('请选择时间')
751
         this.$message.error('请选择时间')
746
         return
752
         return
747
       }
753
       }
755
       if(this.shen_guomi == ""){
761
       if(this.shen_guomi == ""){
756
         this.shen_guomi = 0
762
         this.shen_guomi = 0
757
       }
763
       }
758
-    
764
+
765
+      if(this.admin_user_id == ""){
766
+         this.admin_user_id = 0
767
+      }
768
+
759
       let params = {
769
       let params = {
760
         id:this.id,
770
         id:this.id,
761
         patient_id: this.patient_id,
771
         patient_id: this.patient_id,
810
         this.$message.error('请选择医生')
820
         this.$message.error('请选择医生')
811
         return
821
         return
812
       }
822
       }
813
-      if(this.sick_history_time.length  == 0){
823
+      if(this.start_time == ""){
814
         this.$message.error('请选择时间')
824
         this.$message.error('请选择时间')
815
         return
825
         return
816
       }
826
       }
823
       if(this.shen_guomi == ""){
833
       if(this.shen_guomi == ""){
824
         this.shen_guomi = 0
834
         this.shen_guomi = 0
825
       }
835
       }
826
-    
836
+      if(this.admin_user_id == ""){
837
+         this.admin_user_id = 0
838
+      }
839
+
827
       let params = {
840
       let params = {
828
         id:this.id,
841
         id:this.id,
829
         patient_id: this.patient_id,
842
         patient_id: this.patient_id,
918
     getDocName(admin_user_id){
931
     getDocName(admin_user_id){
919
       var user_name = ""
932
       var user_name = ""
920
       for(let i=0;i<this.doctorOptions.length;i++){
933
       for(let i=0;i<this.doctorOptions.length;i++){
921
-        if(admin_user_id == this.doctorOptions[i].id){
922
-             user_name = this.doctorOptions[i].name
934
+        if(admin_user_id == this.doctorOptions[i].admin_user_id){
935
+             user_name = this.doctorOptions[i].user_name
923
         }
936
         }
924
       }
937
       }
925
       return user_name
938
       return user_name
930
       }else{
943
       }else{
931
         return uParseTime(time, '{y}-{m}-{d}')
944
         return uParseTime(time, '{y}-{m}-{d}')
932
       }
945
       }
933
-     
946
+
934
     },
947
     },
935
     getCurrentChange(val){
948
     getCurrentChange(val){
936
       console.log("val--------------",val)
949
       console.log("val--------------",val)
955
       }
968
       }
956
 
969
 
957
       this.patient_id = val.patient_id
970
       this.patient_id = val.patient_id
958
-      this.admin_user_id = val.recorder?val.doctor_id:"0"
971
+      this.admin_user_id = val.doctor_id
972
+      if(this.admin_user_id == 0){
973
+         this.admin_user_id = ""
974
+      }
975
+
976
+      this.start_time  = this.getTime(val.record_date)
959
 
977
 
960
     },
978
     },
961
     getCurrentChangeOne(val){
979
     getCurrentChangeOne(val){
971
         title:this.template_name,
989
         title:this.template_name,
972
         content: this.$refs.editor.contents,
990
         content: this.$refs.editor.contents,
973
       }
991
       }
974
-      saveSickHistoryTemplate(params).then(response=>{
975
-        if(response.data.state == 1){
976
-          var sickHistoryTemplate =  response.data.data.sickHistoryTemplate
977
-          this.$message.success("保存成功!")
978
-          this.template_dialog = false
979
-        }
980
-      })
981
-    },
982
-    toContentPint(){
983
-      this.$refs.editor.contents = this.template_content
984
-      this.library_dialog = false
985
-    },
986
-    fetchPatient(id) {
987
-        fetchPatient(id).then((response) => {
988
-            console.log('fetchPatient11111',response.data.data);
989
-            if(response.data.state ==1){
990
-              this.form = response.data.data.patient;
991
-              this.patientVascularAccessOne = response.data.data.patientVascularAccessOne
992
-            }
993
-          })
994
-          .catch((err) => {
995
-            console.log("patient get err", err);
996
-            this.$notify.error({
997
-              title: "错误",
998
-              message: "网络异常",
999
-            });
1000
-            this.$router.push("/patients/patients");
992
+   saveSickHistoryTemplate(params).then(response=>{
993
+      if(response.data.state == 1){
994
+        var sickHistoryTemplate =  response.data.data.sickHistoryTemplate
995
+        this.$message.success("保存成功!")
996
+        this.template_dialog = false
997
+      }
998
+     })
999
+   },
1000
+   toContentPint(){
1001
+    this.$refs.editor.contents = this.template_content
1002
+    this.library_dialog = false
1003
+   },
1004
+   fetchPatient(id) {
1005
+      fetchPatient(id).then((response) => {
1006
+          console.log('fetchPatient11111',response.data.data);
1007
+          if(response.data.state ==1){
1008
+            this.form = response.data.data.patient;
1009
+            this.patientVascularAccessOne = response.data.data.patientVascularAccessOne
1010
+          }
1011
+        })
1012
+        .catch((err) => {
1013
+          console.log("patient get err", err);
1014
+          this.$notify.error({
1015
+            title: "错误",
1016
+            message: "网络异常",
1001
           });
1017
           });
1018
+          this.$router.push("/patients/patients");
1019
+        });
1002
     },
1020
     },
1003
     getwayoption(id){
1021
     getwayoption(id){
1004
       if(id != 0){
1022
       if(id != 0){
1011
       }else{
1029
       }else{
1012
         return ''
1030
         return ''
1013
       }
1031
       }
1014
-      
1032
+
1015
     }
1033
     }
1016
   }
1034
   }
1017
 }
1035
 }

+ 13 - 13
src/xt_permission.js View File

12
 
12
 
13
 router.beforeEach((to, from, next) => {
13
 router.beforeEach((to, from, next) => {
14
   // 线上注释
14
   // 线上注释
15
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-    store.dispatch('VerifyConfigList', []).then(() => {
17
-      next()
18
-    })
19
-  }
20
-  if (store.getters.permission_routers === undefined) {
21
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-      next()
23
-    })
24
-  } else {
25
-    next()
26
-  }
27
-  return
15
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+  //   store.dispatch('VerifyConfigList', []).then(() => {
17
+  //     next()
18
+  //   })
19
+  // }
20
+  // if (store.getters.permission_routers === undefined) {
21
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+  //     next()
23
+  //   })
24
+  // } else {
25
+  //   next()
26
+  // }
27
+  // return
28
  // 线上注释
28
  // 线上注释
29
   NProgress.start()
29
   NProgress.start()
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))