Procházet zdrojové kódy

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

陈少旭 před 1 rokem
rodič
revize
d180dd6cd8

+ 27 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyfour.vue Zobrazit soubor

@@ -541,7 +541,7 @@
541 541
                           ({{ advice.advice_desc}}{{ advice.drug_spec_unit }})
542 542
                         </span>
543 543
                         <span v-if="advice.prescribing_number">&nbsp;&nbsp;
544
-                          {{ advice.prescribing_number}}{{ advice.prescribing_number_unit }}
544
+                          {{ advice.prescribing_number}} {{ advice.prescribing_number_unit }}
545 545
                         </span>
546 546
                         <span v-if="advice.single_dose != 0">
547 547
                           {{ advice.single_dose}}{{ advice.single_dose_unit }}
@@ -1043,7 +1043,7 @@ export default {
1043 1043
                 this.projects[i].project_team = this.projects[i].team.project_team
1044 1044
                 this.projects[i].project_team_id = this.projects[i].team.id
1045 1045
                 this.projects[i].start_time = this.projects[i].start_time
1046
-                this.projects[i].single_dose = this.projects[i].single_dose
1046
+                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id) 
1047 1047
                 this.projects[i].single_dose_unit = this.projects[i].unit
1048 1048
                 this.projects[i].execution_time = this.projects[i].execution_time
1049 1049
                 this.projects[i].execution_staff= this.projects[i].execution_staff 
@@ -1055,7 +1055,7 @@ export default {
1055 1055
                 this.projects[i].project_team = this.projects[i].project.project_name
1056 1056
                 this.projects[i].advice_name = this.projects[i].project.project_name
1057 1057
                 this.projects[i].start_time = this.projects[i].start_time
1058
-                this.projects[i].single_dose = this.projects[i].single_dose
1058
+                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id) 
1059 1059
                 this.projects[i].single_dose_unit = this.projects[i].unit
1060 1060
                 this.projects[i].execution_time = this.projects[i].execution_time
1061 1061
                 this.projects[i].execution_staff= this.projects[i].execution_staff 
@@ -1221,7 +1221,30 @@ export default {
1221 1221
         }
1222 1222
       });
1223 1223
     },
1224
-
1224
+    getCount(id){
1225
+      console.log("id2222",id)
1226
+      console.log("this.projects",this.projects)
1227
+      var arr = []
1228
+      var count =0
1229
+      for(let i=0;i<this.projects.length;i++){
1230
+       
1231
+        if(id == this.projects[i].project_id){
1232
+          arr.push(this.projects[i])
1233
+        }
1234
+      }
1235
+      console.log("arroowowow",arr)
1236
+      if(arr!=null && arr.length>0){
1237
+        // for(let i=0;i<arr.length;i++){
1238
+        //   if(parseInt(arr[i].single_dose)>0){
1239
+        //     count += parseInt(arr[i].single_dose)
1240
+        //   }
1241
+        
1242
+        // }
1243
+        count = arr[arr.length -1].count
1244
+      }
1245
+      console.log("coutnwowoowowwo",count)
1246
+      return count
1247
+    },
1225 1248
     getNumber() {
1226 1249
       if (this.dialysisOrder != null) {
1227 1250
         return (