Просмотр исходного кода

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

XMLWAN 3 лет назад
Родитель
Сommit
6161c8a484

+ 1 - 0
src/xt_pages/dialysis/details/NavIgation.vue Просмотреть файл

@@ -137,6 +137,7 @@
137 137
       :admin_users="admin_users"
138 138
       :dialysis_order="dialysis_order"
139 139
       :his_is_open="his_is_open"
140
+      :predialysis="predialysis_evaluation"
140 141
     ></doctor-advice-dialog>
141 142
 
142 143
     <computer-dialog

+ 8 - 1
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Просмотреть файл

@@ -641,6 +641,7 @@
641 641
     </el-dialog>
642 642
 
643 643
     <add-group-advice
644
+      :predialysis="predialysis"
644 645
       :adviceTemplates="adviceTemplates"
645 646
       :executionFrequencyOptions="executionFrequencyOptions"
646 647
       :unitsOption="unitsOption"
@@ -714,7 +715,13 @@
714 715
         default: () => {
715 716
           return []
716 717
         }
717
-      }
718
+      },
719
+      predialysis: {
720
+        type: Object,
721
+        default: () => {
722
+          return { id: 0 }
723
+        }
724
+      },
718 725
     },
719 726
     data() {
720 727
       return {

+ 54 - 0
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Просмотреть файл

@@ -680,6 +680,12 @@ export default {
680 680
         return [];
681 681
       }
682 682
     },
683
+    predialysis: {
684
+      type: Object,
685
+      default: () => {
686
+        return { id: 0 }
687
+      }
688
+    },
683 689
    
684 690
   },
685 691
   methods: {
@@ -1483,6 +1489,54 @@ export default {
1483 1489
       var xtuser = this.$store.getters.xt_user;
1484 1490
       // this.orgname = xtuser.org.org_name;
1485 1491
       this.adminusername = xtuser.user.user_name;
1492
+      if(this.$store.getters.xt_user.org.id == 10101){
1493
+        if (this.predialysis.id > 0 && this.predialysis.created_time > 0) {
1494
+          var date = new Date(this.predialysis.created_time * 1000)
1495
+          var year = date.getFullYear()
1496
+          var month = date.getMonth() + 1
1497
+          var day = date.getDate()
1498
+
1499
+          var hours = date.getHours()
1500
+          var minites = date.getMinutes()
1501
+
1502
+          if (month < 10) {
1503
+            month = '0' + month
1504
+          }
1505
+          if (day < 10) {
1506
+            day = '0' + day
1507
+          }
1508
+          if (hours < 10) {
1509
+            hours = '0' + hours
1510
+          }
1511
+          if (minites < 10) {
1512
+            minites = '0' + minites
1513
+          }
1514
+          
1515
+          this.groupForm.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
1516
+        } else {
1517
+          var date = new Date()
1518
+          var year = date.getFullYear()
1519
+          var month = date.getMonth() + 1
1520
+          var day = date.getDate()
1521
+
1522
+          var hours = date.getHours()
1523
+          var minites = date.getMinutes()
1524
+
1525
+          if (month < 10) {
1526
+            month = '0' + month
1527
+          }
1528
+          if (day < 10) {
1529
+            day = '0' + day
1530
+          }
1531
+          if (hours < 10) {
1532
+            hours = '0' + hours
1533
+          }
1534
+          if (minites < 10) {
1535
+            minites = '0' + minites
1536
+          }
1537
+          this.groupForm.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
1538
+        }
1539
+      }
1486 1540
     },
1487 1541
     selectAllTemplateAdvice(selection) {
1488 1542
       console.log("params",selection)

+ 78 - 28
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Просмотреть файл

@@ -1954,7 +1954,7 @@
1954 1954
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1955 1955
       },
1956 1956
       show(pre, schedual, last, his_is_open) {
1957
-        console.log('pre222222', pre)
1957
+        console.log('pre222222', this.predialysis)
1958 1958
         if (pre != undefined) {
1959 1959
           if (pre.oxygen_uptake == 1) {
1960 1960
             this.oxygenShow = true
@@ -1968,37 +1968,87 @@
1968 1968
         if (his_is_open == 1) {
1969 1969
           this.is_open = 0
1970 1970
         }
1971
-        var date = new Date()
1972
-        var year = date.getFullYear()
1973
-        var month = date.getMonth() + 1
1974
-        var day = date.getDate()
1971
+        
1972
+        if(this.$store.getters.xt_user.org.id == 10101){
1973
+          if (this.predialysis.id > 0 && this.predialysis.created_time > 0) {
1974
+            var date = new Date(this.predialysis.created_time * 1000)
1975
+            var year = date.getFullYear()
1976
+            var month = date.getMonth() + 1
1977
+            var day = date.getDate()
1975 1978
 
1976
-        var hours = date.getHours()
1977
-        var minites = date.getMinutes()
1979
+            var hours = date.getHours()
1980
+            var minites = date.getMinutes()
1978 1981
 
1979
-        if (month < 10) {
1980
-          month = '0' + month
1981
-        }
1982
-        if (day < 10) {
1983
-          day = '0' + day
1984
-        }
1985
-        if (hours < 10) {
1986
-          hours = '0' + hours
1987
-        }
1988
-        if (minites < 10) {
1989
-          minites = '0' + minites
1990
-        }
1991
-        if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10101) {
1992
-          this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
1993
-        } else {
1994
-          if (schedual.schedule_type == 1) {
1995
-            this.start_time = year + '-' + month + '-' + day + ' ' + '07:00'
1996
-          } else if (schedual.schedule_type == 2) {
1997
-            this.start_time = year + '-' + month + '-' + day + ' ' + '12:00'
1998
-          } else if (schedual.schedule_type == 3) {
1999
-            this.start_time = year + '-' + month + '-' + day + ' ' + '18:00'
1982
+            if (month < 10) {
1983
+              month = '0' + month
1984
+            }
1985
+            if (day < 10) {
1986
+              day = '0' + day
1987
+            }
1988
+            if (hours < 10) {
1989
+              hours = '0' + hours
1990
+            }
1991
+            if (minites < 10) {
1992
+              minites = '0' + minites
1993
+            }
1994
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
1995
+          } else {
1996
+            var date = new Date()
1997
+            var year = date.getFullYear()
1998
+            var month = date.getMonth() + 1
1999
+            var day = date.getDate()
2000
+
2001
+            var hours = date.getHours()
2002
+            var minites = date.getMinutes()
2003
+
2004
+            if (month < 10) {
2005
+              month = '0' + month
2006
+            }
2007
+            if (day < 10) {
2008
+              day = '0' + day
2009
+            }
2010
+            if (hours < 10) {
2011
+              hours = '0' + hours
2012
+            }
2013
+            if (minites < 10) {
2014
+              minites = '0' + minites
2015
+            }
2016
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2017
+          }
2018
+        }else{
2019
+          var date = new Date()
2020
+          var year = date.getFullYear()
2021
+          var month = date.getMonth() + 1
2022
+          var day = date.getDate()
2023
+
2024
+          var hours = date.getHours()
2025
+          var minites = date.getMinutes()
2026
+
2027
+          if (month < 10) {
2028
+            month = '0' + month
2029
+          }
2030
+          if (day < 10) {
2031
+            day = '0' + day
2032
+          }
2033
+          if (hours < 10) {
2034
+            hours = '0' + hours
2035
+          }
2036
+          if (minites < 10) {
2037
+            minites = '0' + minites
2038
+          }
2039
+          if (this.$store.getters.xt_user.org.id == 10016) {
2040
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2041
+          } else {
2042
+            if (schedual.schedule_type == 1) {
2043
+              this.start_time = year + '-' + month + '-' + day + ' ' + '07:00'
2044
+            } else if (schedual.schedule_type == 2) {
2045
+              this.start_time = year + '-' + month + '-' + day + ' ' + '12:00'
2046
+            } else if (schedual.schedule_type == 3) {
2047
+              this.start_time = year + '-' + month + '-' + day + ' ' + '18:00'
2048
+            }
2000 2049
           }
2001 2050
         }
2051
+        
2002 2052
 
2003 2053
         if (pre.anticoagulant == 3) {
2004 2054
           this.dialysisPrescription.anticoagulant = '低分子肝素'

+ 4 - 4
src/xt_pages/outpatientCharges/statementTemplate/printFour.vue Просмотреть файл

@@ -88,8 +88,8 @@
88 88
                                 <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
89 89
                                     <p class="chargeP">
90 90
                                         <span v-if='item.type == 1'>{{item.advice.advice_name}}</span>
91
-                                        <span v-if='item.type == 2'>{{item.project.project.project_name}}</span>
92
-                                        <span v-if='item.type == 3'>{{item.project.good_info.specification_name}}</span>
91
+                                        <span v-if='item.project.type == 2'>{{item.project.project.project_name}}</span>
92
+                                        <span v-if='item.project.type == 3'>{{item.project.good_info.specification_name}}</span>
93 93
                                     </p>
94 94
                                 </div>
95 95
                                 <div style="border-right:1px solid #000;width:15%;text-align:center;">
@@ -111,7 +111,7 @@
111 111
                                 </div>
112 112
                                 <div style="width:15%;text-align:center;">
113 113
                                     <p class="chargeP">
114
-                                        <span>{{item.cnt * item.pric}}元</span>
114
+                                        <span>{{(item.cnt * item.pric).toFixed(2)}}元</span>
115 115
                                     </p>
116 116
                                 </div>
117 117
                             </div>
@@ -216,7 +216,7 @@
216 216
                               </div>
217 217
                               <div style="width:15%;text-align:center;">
218 218
                                   <p class="chargeP">
219
-                                      <span>{{item.cnt * item.pric}}元</span>
219
+                                      <span>{{(item.cnt * item.pric).toFixed(2)}}元</span>
220 220
                                   </p>
221 221
                               </div>
222 222
                           </div>

+ 14 - 3
src/xt_pages/outpatientDoctorStation/checkTemplate/printOne.vue Просмотреть файл

@@ -29,7 +29,7 @@
29 29
                 <div style="display:flex;margin-bottom:20px;padding:0 10px;">
30 30
                     <div>检验项目:</div>
31 31
                     <div>
32
-                        <div v-for="item in projectPrint" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
32
+                        <div v-for="item in projectPrint" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
33 33
                     </div>
34 34
                 </div>
35 35
                 <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
@@ -152,11 +152,22 @@ export default {
152 152
                 
153 153
               }
154 154
             })
155
+            let data = []
156
+            projectPrint.map(item => {
157
+              if(item.team.id != 0){
158
+                let status = data.some(it => (it.team.id == item.team.id))
159
+                if(!status){
160
+                  data.push(item)
161
+                }
162
+              }
163
+              
164
+            })
165
+          
155 166
             this.total = total
156 167
             this.pre_time = this.advicePrint[0].pre_time
157 168
             this.doctor = this.advicePrint[0].doctor
158
-            this.projectPrint = projectPrint
159
-            console.log('this.projectPrint',projectPrint)
169
+            this.projectPrint = data
170
+            console.log('99999999999999999',projectPrint)
160 171
             var projectlist =  response.data.data.projectlist
161 172
 
162 173
             var projectlist =  response.data.data.projectlist

+ 106 - 89
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Просмотреть файл

@@ -2676,7 +2676,7 @@
2676 2676
 
2677 2677
             }
2678 2678
           }
2679
-          
2679
+
2680 2680
           if(this.$store.getters.xt_user.org_id == 10138){
2681 2681
             let arr = this.teamList
2682 2682
             let newArr = []
@@ -2691,8 +2691,8 @@
2691 2691
             this.teamList = newArr
2692 2692
           }
2693 2693
         }
2694
-        
2695
-        
2694
+
2695
+
2696 2696
 
2697 2697
         if (this.curDrugs.length == 0) {
2698 2698
           if (this.$store.getters.xt_user.org_id == 10138) {
@@ -2872,7 +2872,12 @@
2872 2872
                   remark: '',
2873 2873
                   medical_code: temp2[b].medical_code,
2874 2874
                   unit: temp2[b].unit,
2875
-                  type: temp2[b].type
2875
+                  type: temp2[b].type,
2876
+                }
2877
+                if(temp2[b].team_id == undefined){
2878
+                  obj["team_id"] = 0
2879
+                }else{
2880
+                  obj["team_id"] = temp2[b].team_id
2876 2881
                 }
2877 2882
                 if (obj.total == 0 || obj.total == undefined) {
2878 2883
                   obj.total = 1
@@ -3006,99 +3011,111 @@
3006 3011
       },
3007 3012
       selectTeam(row) {
3008 3013
         console.log(row)
3009
-        var arr = []
3010
-        for (let i = 0; i < row.length; i++) {
3011
-          arr.push(row[i].item_id)
3012
-        }
3013
-        console.log(arr)
3014
-        var ids = arr.join(',')
3015
-        console.log(ids)
3016
-        var strArr = ids.split(',')
3017
-        console.log(strArr)
3018
-        var res = []//接收不重复的数据
3019
-
3020
-        for (var i = 0; i < strArr.length; i++) {
3021
-          var flag = true
3014
+        // var arr = []
3015
+        // for (let i = 0; i < row.length; i++) {
3016
+        //   arr.push(row[i].item_id)
3017
+        // }
3018
+        // console.log(arr)
3019
+        // var ids = arr.join(',')
3020
+        // console.log(ids)
3021
+        // var strArr = ids.split(',')
3022
+        // console.log(strArr)
3023
+        // var res = []//接收不重复的数据
3024
+        //
3025
+        // for (var i = 0; i < strArr.length; i++) {
3026
+        //   var flag = true
3027
+        //
3028
+        //   for (var j = 0; j < i; j++) {
3029
+        //     if (strArr[i] === strArr[j]) {
3030
+        //       flag = false
3031
+        //       break
3032
+        //     }
3033
+        //   }
3034
+        //   if (flag) {
3035
+        //     res.push(strArr[i])
3036
+        //   }
3037
+        // }
3038
+        // console.log(res)
3039
+        // var idstr = res.join(',')
3022 3040
 
3023
-          for (var j = 0; j < i; j++) {
3024
-            if (strArr[i] === strArr[j]) {
3025
-              flag = false
3026
-              break
3027
-            }
3041
+        let teamList = []
3042
+        for(let i = 0;i < row.length; i++){
3043
+          let team_id = row[i].id
3044
+          console.log(team_id)
3045
+          const params = {
3046
+            project_id:  row[i].item_id
3028 3047
           }
3029
-          if (flag) {
3030
-            res.push(strArr[i])
3031
-          }
3032
-        }
3033
-        console.log(res)
3034
-        var idstr = res.join(',')
3035
-        const params = {
3036
-          project_id: idstr
3037
-        }
3038
-        getPojectListById(params).then(response => {
3039
-          if (response.data.state == 1) {
3040
-            this.teamList = []
3041
-            var project = response.data.data.project
3042
-            let num = 0
3043
-            for (let i = 0; i < project.length; i++) {
3044
-              if (project[i].type == 2 && project[i].status == 1) {
3048
+          getPojectListById(params).then(response => {
3049
+            if (response.data.state == 1) {
3050
+              var project = response.data.data.project
3051
+              let num = 0
3052
+              for (let i = 0; i < project.length; i++) {
3053
+                if (project[i].type == 2 && project[i].status == 1) {
3054
+                  let obj = {
3055
+                    id: project[i].project_id,
3056
+                    project_name: project[i].project.project_name,
3057
+                    statistical_classification: project[i].project.statistical_classification,
3058
+                    single_dose: project[i].project.single_dose,
3059
+                    delivery_way: project[i].project.delivery_way,
3060
+                    execution_frequency: project[i].project.execution_frequency,
3061
+                    number_days: project[i].project.number_days,
3062
+                    cus_total: project[i].number,
3063
+                    price: project[i].project.price,
3064
+                    remark: '',
3065
+                    medical_code: project[i].project.medical_code,
3066
+                    unit: project[i].project.unit,
3067
+                    type: project[i].type,
3068
+                    is_special_diseases: project[i].project.disease_directory,
3069
+                    team_id:team_id
3070
+                  }
3071
+                  if (obj.cus_total == 0 || obj.cus_total == undefined) {
3072
+                    obj.cus_total = 1
3073
+                  }
3045 3074
 
3046
-                let obj = {
3047
-                  id: project[i].project_id,
3048
-                  project_name: project[i].project.project_name,
3049
-                  statistical_classification: project[i].project.statistical_classification,
3050
-                  single_dose: project[i].project.single_dose,
3051
-                  delivery_way: project[i].project.delivery_way,
3052
-                  execution_frequency: project[i].project.execution_frequency,
3053
-                  number_days: project[i].project.number_days,
3054
-                  cus_total: project[i].number,
3055
-                  price: project[i].project.price,
3056
-                  remark: '',
3057
-                  medical_code: project[i].project.medical_code,
3058
-                  unit: project[i].project.unit,
3059
-                  type: project[i].type,
3060
-                  is_special_diseases: project[i].project.disease_directory
3061
-                }
3062
-                if (obj.cus_total == 0 || obj.cus_total == undefined) {
3063
-                  obj.cus_total = 1
3064
-                }
3075
+                  teamList.push(obj)
3076
+                } else if (project[i].type == 3 && project[i].status == 1) {
3077
+                  if(project[i].good_info.total <= 0){
3078
+                    num++
3079
+                    this.$refs.tabProjectTeam.toggleRowSelection(row);
3080
+                    this.$message.error(project[i].good_info.good_name + '库存不足')
3081
+                  }
3082
+                  if(num > 0){
3083
+                    this.$refs.tabProjectTeam.clearSelection();
3084
+                  }
3085
+                  let obj = {
3086
+                    id: project[i].project_id,
3087
+                    project_name: project[i].good_info.good_name,
3088
+                    statistical_classification: '',
3089
+                    single_dose: '',
3090
+                    delivery_way: '',
3091
+                    execution_frequency: '',
3092
+                    number_days: '',
3093
+                    cus_total: project[i].number,
3094
+                    price: project[i].good_info.retail_price,
3095
+                    remark: '',
3096
+                    medical_code: project[i].good_info.medical_insurance_number,
3097
+                    unit: project[i].good_info.unit,
3098
+                    type: project[i].type,
3099
+                    is_special_diseases: project[i].good_info.is_special_diseases,
3100
+                    team_id:team_id
3065 3101
 
3066
-                this.teamList.push(obj)
3067
-              } else if (project[i].type == 3 && project[i].status == 1) {
3068
-                if(project[i].good_info.total <= 0){
3069
-                  num++
3070
-                  this.$refs.tabProjectTeam.toggleRowSelection(row);
3071
-                  this.$message.error(project[i].good_info.good_name + '库存不足')
3072
-                }
3073
-                if(num > 0){
3074
-                  this.$refs.tabProjectTeam.clearSelection();
3075
-                }
3076
-                let obj = {
3077
-                  id: project[i].project_id,
3078
-                  project_name: project[i].good_info.good_name,
3079
-                  statistical_classification: '',
3080
-                  single_dose: '',
3081
-                  delivery_way: '',
3082
-                  execution_frequency: '',
3083
-                  number_days: '',
3084
-                  cus_total: project[i].number,
3085
-                  price: project[i].good_info.retail_price,
3086
-                  remark: '',
3087
-                  medical_code: project[i].good_info.medical_insurance_number,
3088
-                  unit: project[i].good_info.unit,
3089
-                  type: project[i].type,
3090
-                  is_special_diseases: project[i].good_info.is_special_diseases
3091
-                }
3092
-                if (obj.cus_total == 0 || obj.cus_total == undefined) {
3093
-                  obj.cus_total = 1
3102
+                  }
3103
+                  if (obj.cus_total == 0 || obj.cus_total == undefined) {
3104
+                    obj.cus_total = 1
3105
+                  }
3106
+                  teamList.push(obj)
3094 3107
                 }
3095
-                this.teamList.push(obj)
3096
-
3097 3108
               }
3109
+
3110
+              this.teamList = this.teamList.concat(teamList)
3111
+              console.log(this.teamList)
3098 3112
             }
3113
+          })
3114
+        }
3115
+
3116
+
3117
+
3099 3118
 
3100
-          }
3101
-        })
3102 3119
 
3103 3120
       }, changeDoctor(val) {
3104 3121
         for (let i = 0; i < this.doctors.length; i++) {