Browse Source

新分支

28169 1 year ago
parent
commit
3f74ce0c4e

+ 72 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

@@ -2085,6 +2085,40 @@
2085 2085
                               }}</span>
2086 2086
                             </td>
2087 2087
                           </tr>
2088
+
2089
+                        <tr v-for="(advice, advice_index) in record.his_project" :key="advice_index" v-if="org_id == 0 || org_id ==10206">
2090
+                        <td height="32px;padding:1px 1px">
2091
+                            <span v-if="advice.start_time">
2092
+                                {{ getTime(advice.start_time, "{h}:{i}") }}
2093
+                            </span>
2094
+                        </td>
2095
+                        <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
2096
+                            <span style="padding-left:5px;display:inline-block;">
2097
+                              <span v-if="advice.type ==2">{{ advice && advice.project ? advice.project.project_name : '' }} {{ advice.count }} {{ advice.unit }}</span>
2098
+                              <span v-if="advice.type ==3">{{ advice && advice.good_info ? advice.good_info.good_name : '' }}  {{ advice && advice.good_info ? advice.good_info.specification_name : '' }} {{ advice.count }} {{ advice.unit }}</span>
2099
+                            </span>
2100
+                        </td>
2101
+
2102
+                        <td height="32px">
2103
+                            <span v-if="setAdminUserES(advice, 'doctor') == ''">
2104
+                                {{getAdminUser(advice, 'doctor')}}
2105
+                            </span>
2106
+                            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
2107
+                                <img style="height:30px;" :src="setAdminUserES(advice, 'doctor')" alt srcset />
2108
+                            </span>
2109
+                        </td>
2110
+                        <td height="32px">
2111
+                            <span v-if="setAdminUserES(advice, 'execution_staff') == ''">
2112
+                                {{getAdminUser(advice, 'execution_staff')}}
2113
+                            </span>
2114
+                            <span v-else>
2115
+                                <img style="height:30px;" :src="setAdminUserES(advice, 'execution_staff')" alt srcset />
2116
+                            </span>
2117
+                        </td>
2118
+                        <td height="32px">
2119
+                            <span v-if="advice.execution_time">{{ getTime(advice.execution_time, "{h}:{i}") }}</span>
2120
+                        </td>
2121
+                    </tr>
2088 2122
                         </template>
2089 2123
                       </tbody>
2090 2124
                     </table>
@@ -3360,6 +3394,44 @@ export default {
3360 3394
               }
3361 3395
             }
3362 3396
 
3397
+
3398
+          
3399
+            if(this.org_id == 0 || this.org_id == 10206){
3400
+              console.log("this.records[recordIndex].his_project", this.records[recordIndex].his_project)
3401
+              var delghThree = 0 
3402
+             let his_project = []
3403
+              this.records[recordIndex].his_project.map(item => {
3404
+                // if(item.type == 2){
3405
+                //   his_project.push(item)
3406
+                // }
3407
+                his_project.push(item)
3408
+              
3409
+              })
3410
+            this.records[recordIndex].his_project = his_project
3411
+              var delghThree = 0
3412
+              if (
3413
+                this.records[recordIndex].his_advices &&
3414
+                this.records[recordIndex].his_advices.length + this.records[recordIndex].his_project.length < 6
3415
+              ) {
3416
+                delghThree = 6 - (this.records[recordIndex].his_advices.length + this.records[recordIndex].his_project.length)
3417
+              } else {
3418
+                delghThree = 0
3419
+              }
3420
+
3421
+              if (delghThree > 0) {
3422
+                if (
3423
+                  typeof this.records[recordIndex].his_project === 'undefined' ||
3424
+                  this.records[recordIndex].his_project == null
3425
+                ) {
3426
+                  this.records[recordIndex].his_project = []
3427
+                }
3428
+                for (let index = 0; index < delghThree; index++) {
3429
+                  this.records[recordIndex].his_project.push([])
3430
+                }
3431
+              }
3432
+            }
3433
+
3434
+
3363 3435
             var childMap = {};
3364 3436
             for (const index in this.records[recordIndex].advices) {
3365 3437
               if (this.records[recordIndex].advices[index].parent_id == 0) {

+ 126 - 15
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -1874,10 +1874,90 @@
1874 1874
                         </td>
1875 1875
                       </tr>
1876 1876
                       <!-- </template> -->
1877
+
1878
+
1879
+                      <tr  
1880
+                      v-if="org_id == 0 || org_id ==10206"
1881
+                      v-for="(advice, advice_index) in projectsOne"
1882
+                      :key="advice_index"
1883
+                    >
1884
+                      <td height="32px;padding:1px 1px" width="10%">
1885
+                        <span v-if="advice.start_time">
1886
+                          {{ getTime(advice.start_time, "{h}:{i}") }}
1887
+                        </span>
1888
+                      </td>
1889
+                        <td
1890
+                        colspan="2"
1891
+                        class="advice-name"
1892
+                        style="
1893
+                          letter-spacing: 5px;
1894
+                          text-align: center;
1895
+                          font-weight: 520;
1896
+                          font-size: 14px;
1897
+                          padding: 0px 8px;
1898
+                          line-height: 30px;
1899
+                          width: 200px;
1900
+
1901
+                        "
1902
+                        >
1903
+                          <span v-if="advice.type == 2"> {{advice && advice.project? advice.project.project_name: ""}} {{ advice.count }} {{ advice.unit }}</span>
1904
+                          <span v-if="advice.type == 3"> {{advice && advice.good_info? advice.good_info.good_name: ""}} {{ advice.count }} {{ advice.unit }}</span>
1905
+                        </td>
1906
+                      <td height="32px">
1907
+                        <span
1908
+                          v-if="setAdminUserES(advice.doctor) == ''"
1909
+                          >{{ getAdminUser(advice.doctor) }}</span
1910
+                        >
1911
+                        <img
1912
+                          style="height: 30px"
1913
+                          :src="setAdminUserES(advice.doctor)"
1914
+                          alt=""
1915
+                          srcset=""
1916
+                          v-else
1917
+                        />
1918
+                      </td>
1919
+                      <td height="32px">
1920
+                        <span
1921
+                          v-if="
1922
+                            setAdminUserES(advice.execution_staff) == ''
1923
+                          "
1924
+                          >{{
1925
+                            getAdminUser(advice.execution_staff)
1926
+                          }}</span
1927
+                        >
1928
+                        <img
1929
+                          style="height: 30px"
1930
+                          :src="setAdminUserES(advice.execution_staff)"
1931
+                          alt=""
1932
+                          srcset=""
1933
+                          v-else
1934
+                        />
1935
+                      </td>
1936
+                        <td height="32px">
1937
+                          <span v-if="advice.execution_time">{{
1938
+                            getTime(advice.execution_time, "{h}:{i}")
1939
+                          }}</span>
1940
+                        </td>
1941
+
1942
+                        <td height="32px">
1943
+                          <span v-if="setAdminUserES(advice.checker) == ''">{{
1944
+                            getAdminUser(advice.checker)
1945
+                          }}</span>
1946
+                          <img
1947
+                            style="height: 30px"
1948
+                            :src="setAdminUserES(advice.checker)"
1949
+                            alt=""
1950
+                            srcset=""
1951
+                            v-else
1952
+                          />
1953
+                        </td>
1954
+                      </tr>
1877 1955
                     </tbody>
1878 1956
                   </table>
1879 1957
                 </td>
1880 1958
               </tr>
1959
+
1960
+            
1881 1961
             </tbody>
1882 1962
           </table>
1883 1963
         </div>
@@ -3132,6 +3212,8 @@
3132 3212
                   </div>
3133 3213
                 </td>
3134 3214
               </tr>
3215
+
3216
+            
3135 3217
             </tbody>
3136 3218
           </table>
3137 3219
           <!-- <div  class="print-yema">1</div> -->
@@ -3310,7 +3392,9 @@
3310 3392
                           />
3311 3393
                         </td>
3312 3394
                       </tr>
3313
-                     
3395
+                      
3396
+
3397
+                   
3314 3398
                     </tbody>
3315 3399
      </table>
3316 3400
 
@@ -3461,6 +3545,7 @@ export default {
3461 3545
         gaijiliang_unit: "",
3462 3546
       },
3463 3547
       org_id: 0,
3548
+      projectsOne: [],
3464 3549
     };
3465 3550
   },
3466 3551
   methods: {
@@ -4285,11 +4370,21 @@ export default {
4285 4370
         //   }
4286 4371
         // }
4287 4372
 
4373
+        if(this.org_id== 0 || this.org_id ==10206){
4374
+          let projectsOne = [];
4375
+          response.data.data.projects.map((item) => {
4376
+              projectsOne.push(item);
4377
+          });
4378
+          this.projectsOne = projectsOne;
4379
+          
4380
+
4381
+          console.log("this.projectsOne", this.projectsOne);
4288 4382
 
4383
+        }
4289 4384
         
4290 4385
 
4291 4386
         console.log("RESWOOWOWWOOW",response.data.data.doctorAdevieInfo)
4292
-        if(this.org_id ==10515 || this.org_id == 0 || this.org_id == 10510 || this.org_id ==10567 ){
4387
+        if(this.org_id ==10515  || this.org_id == 10510 || this.org_id ==10567 ){
4293 4388
           if(response.data.data.doctorAdevieInfo!=null && response.data.data.doctorAdevieInfo.length>0){
4294 4389
             
4295 4390
             for(let i=0;i<response.data.data.doctorAdevieInfo.length;i++){
@@ -4314,7 +4409,7 @@ export default {
4314 4409
 
4315 4410
         // var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
4316 4411
       
4317
-        if(this.org_id!=10510){
4412
+        if(this.org_id!=10510 && this.org_id!=0&&this.org_id!=10206){
4318 4413
             if(this.projects!=null && this.projects.length >0){
4319 4414
              for(let i=0;i<this.projects.length;i++){
4320 4415
               if(this.projects[i].type== 2){
@@ -4372,21 +4467,37 @@ export default {
4372 4467
           this.doctor_advices = docArr
4373 4468
         }
4374 4469
        
4375
-        if (this.doctor_advices.length <= 6) {
4376
-          var nl = 6;
4377
-          this.print_length = 6;
4378 4470
 
4379
-          for (let index = 0; index < nl; index++) {
4380
-            if (
4381
-              this.doctor_advices[index] == undefined ||
4382
-              this.doctor_advices[index].length <= 0
4383
-            ) {
4384
-              this.doctor_advices.push([]);
4385
-            } else {
4386
-              continue;
4471
+        if (this.doctor_advices.length + this.projectsOne.length <= 6) {
4472
+            var nl = 6 - (this.doctor_advices.length + this.projectsOne.length);
4473
+            this.print_length = 6;
4474
+
4475
+            for (let index = 0; index < nl; index++) {
4476
+              if (
4477
+                this.projectsOne[index] == undefined ||
4478
+                this.projectsOne[index].length <= 0
4479
+              ) {
4480
+                this.projectsOne.push([]);
4481
+              } else {
4482
+                continue;
4483
+              }
4387 4484
             }
4388 4485
           }
4389
-        }
4486
+        // if (this.doctor_advices.length <= 6) {
4487
+        //   var nl = 6;
4488
+        //   this.print_length = 6;
4489
+
4490
+        //   for (let index = 0; index < nl; index++) {
4491
+        //     if (
4492
+        //       this.doctor_advices[index] == undefined ||
4493
+        //       this.doctor_advices[index].length <= 0
4494
+        //     ) {
4495
+        //       this.doctor_advices.push([]);
4496
+        //     } else {
4497
+        //       continue;
4498
+        //     }
4499
+        //   }
4500
+        // }
4390 4501
 
4391 4502
         this.totollength = this.doctor_advices.length + this.monitors.length;
4392 4503
         console.log("this.totollength",this.totollength)