see999 3 anos atrás
pai
commit
ef9e69ba46

+ 6 - 6
src/xt_pages/dialysis/batch_print/batch_print_order_fortyThree.vue Ver arquivo

462
                         </td>
462
                         </td>
463
                         <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
463
                         <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
464
                             <span style="padding-left:5px;display:inline-block;">
464
                             <span style="padding-left:5px;display:inline-block;">
465
-                              <span>{{ advice.project.project_name }}</span>
465
+                              <span>{{ advice && advice.project ? advice.project.project_name : '' }}</span>
466
                             </span>
466
                             </span>
467
                         </td>
467
                         </td>
468
 
468
 
757
               this.records[recordIndex].his_advices &&
757
               this.records[recordIndex].his_advices &&
758
               this.records[recordIndex].his_advices.length + this.records[recordIndex].his_project.length < 6
758
               this.records[recordIndex].his_advices.length + this.records[recordIndex].his_project.length < 6
759
             ) {
759
             ) {
760
-              delghThree = 6 - this.records[recordIndex].his_advices.length
760
+              delghThree = 6 - (this.records[recordIndex].his_advices.length + this.records[recordIndex].his_project.length)
761
             } else {
761
             } else {
762
               delghThree = 0
762
               delghThree = 0
763
             }
763
             }
764
 
764
 
765
             if (delghThree > 0) {
765
             if (delghThree > 0) {
766
               if (
766
               if (
767
-                typeof this.records[recordIndex].his_advices === 'undefined' ||
768
-                this.records[recordIndex].his_advices == null
767
+                typeof this.records[recordIndex].his_project === 'undefined' ||
768
+                this.records[recordIndex].his_project == null
769
               ) {
769
               ) {
770
-                this.records[recordIndex].his_advices = []
770
+                this.records[recordIndex].his_project = []
771
               }
771
               }
772
               for (let index = 0; index < delghThree; index++) {
772
               for (let index = 0; index < delghThree; index++) {
773
-                this.records[recordIndex].his_advices.push([])
773
+                this.records[recordIndex].his_project.push([])
774
               }
774
               }
775
             }
775
             }
776
             this.records[recordIndex].his_advices = this.records[recordIndex].his_advices.sort((a,b)=>{ return a.id-b.id})
776
             this.records[recordIndex].his_advices = this.records[recordIndex].his_advices.sort((a,b)=>{ return a.id-b.id})

+ 6 - 6
src/xt_pages/dialysis/template/DialysisPrintOrderFortyThree.vue Ver arquivo

431
                   </span>
431
                   </span>
432
                   </td>
432
                   </td>
433
                   <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
433
                   <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
434
-                    <span>{{ advice.project.project_name }}</span>
434
+                    <span>{{ advice && advice.project ? advice.project.project_name : '' }}</span>
435
                   </td>
435
                   </td>
436
                   <td height="32px">
436
                   <td height="32px">
437
                       <span v-if="setAdminUserES(advice.doctor) == ''">{{ getAdminUser(advice.doctor) }}</span>
437
                       <span v-if="setAdminUserES(advice.doctor) == ''">{{ getAdminUser(advice.doctor) }}</span>
1260
           }
1260
           }
1261
         })
1261
         })
1262
         this.projects = projects
1262
         this.projects = projects
1263
-        if (this.doctor_advices.length + this.projects.length <= 6) {
1264
-          var nl = 6
1263
+        if ((this.doctor_advices.length + this.projects.length) <= 6) {
1264
+          var nl = 6 - (this.doctor_advices.length + this.projects.length)
1265
           this.print_length = 6
1265
           this.print_length = 6
1266
 
1266
 
1267
           for (let index = 0; index < nl; index++) {
1267
           for (let index = 0; index < nl; index++) {
1268
             if (
1268
             if (
1269
-              this.doctor_advices[index] == undefined ||
1270
-              this.doctor_advices[index].length <= 0
1269
+              this.projects[index] == undefined ||
1270
+              this.projects[index].length <= 0
1271
             ) {
1271
             ) {
1272
-              this.doctor_advices.push([])
1272
+              this.projects.push([])
1273
             } else {
1273
             } else {
1274
               continue
1274
               continue
1275
             }
1275
             }