Browse Source

11月20 打印单

yq1 4 days ago
parent
commit
bf191cf923

+ 78 - 41
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyeight.vue View File

193
                 v-for="(item, i) in way_arr"
193
                 v-for="(item, i) in way_arr"
194
                 class="under_line"
194
                 class="under_line"
195
                 v-if="record.receive_assessment.way == item.id"
195
                 v-if="record.receive_assessment.way == item.id"
196
-                style="width: 180px; text-align: left"
196
+                style="width: 130px; text-align: left"
197
               >
197
               >
198
                 {{ item.name }}
198
                 {{ item.name }}
199
               </div>
199
               </div>
1821
                               </span>
1821
                               </span>
1822
                             </td>
1822
                             </td>
1823
 
1823
 
1824
-                            <td
1825
-                              height="26px"
1824
+                            <td height="26px"
1826
                               colspan="2"
1825
                               colspan="2"
1827
                               class="advice-name"
1826
                               class="advice-name"
1828
                               style="padding-left: 7px"
1827
                               style="padding-left: 7px"
1829
-                            >
1830
-                              <span v-if="advice[0].parent_id > 0">---></span>
1831
-                              <span>{{ advice[0].advice_name }}</span>
1832
-
1833
-                              <span
1834
-                                v-if="
1835
-                                  advice[0] &&
1836
-                                  advice[0].advice_desc != undefined
1837
-                                "
1838
-                              >
1839
-                                <!-- ({{ advice[0].advice_desc
1840
-                                }}{{ advice[0].drug_spec_unit }} ) -->
1841
-                              </span>
1842
-
1843
-                              <span v-if="advice[0].prescribing_number"
1844
-                                >&nbsp;&nbsp; {{ advice[0].prescribing_number
1845
-                                }}{{ advice[0].prescribing_number_unit }}</span
1846
-                              >
1847
-                              <span v-if="advice[0].single_dose != 0">
1828
+                            > 
1829
+                              <div v-if="org_id==10551 || org_id ==0">
1830
+                                <div :rowspan="advice[0].prescriptionChild.length"  v-for="(it,key)  in advice[0].prescriptionChild" style="border: none;">
1831
+                                  <div style="border: none;">
1832
+                                    <span>{{ it.advice_name }}</span>
1833
+                                          <span v-if="it && it.advice_desc"
1834
+                                            >({{ it.advice_desc
1835
+                                            }}{{ it.drug_spec_unit }})</span
1836
+                                          >
1837
+                                          <span v-if="it.prescribing_number"
1838
+                                            >&nbsp;&nbsp; {{ it.prescribing_number
1839
+                                            }}{{ it.prescribing_number_unit }}</span
1840
+                                          >
1841
+                                          <span v-if="it.single_dose != 0"
1842
+                                            >{{ it.single_dose
1843
+                                            }}{{ it.single_dose_unit }}</span
1844
+                                          >
1845
+                                          <span>{{ it.delivery_way}}</span>
1846
+                                          <span>{{
1847
+                                            it.execution_frequency
1848
+                                          }}</span>
1849
+                                          <span v-if="it.remark !=''"
1850
+                                            >({{ it.remark }})</span
1851
+                                          >
1852
+                                  </div>
1853
+                                </div>
1854
+                              </div>
1855
+                              <div v-else>
1856
+                                <span v-if="advice[0].parent_id > 0"></span>
1857
+                                <span>{{ advice[0].advice_name }}</span>
1858
+
1859
+                                <span v-if="advice[0].prescribing_number"
1860
+                                  >&nbsp;&nbsp; {{ advice[0].prescribing_number
1861
+                                  }}{{ advice[0].prescribing_number_unit }}</span
1862
+                                >
1863
+                                <span v-if="advice[0].single_dose != 0">
1848
 
1864
 
1849
-                                <span v-if="advice[0].advice_name!='血液透析滤过'&& advice[0].advice_name!='血液透析' && advice[0].advice_name!='电脑血糖监测'"> {{ advice[0].single_dose}}{{ advice[0].single_dose_unit }}</span>
1850
-                                </span
1851
-                              >
1865
+                                  <span v-if="advice[0].advice_name!='血液透析滤过'&& advice[0].advice_name!='血液透析' && advice[0].advice_name!='电脑血糖监测'"> {{ advice[0].single_dose}}{{ advice[0].single_dose_unit }}</span>
1866
+                                  </span
1867
+                                >
1852
 
1868
 
1853
-                              <span v-if="advice[0].parent_id == 0">{{
1854
-                                advice[0].delivery_way
1855
-                              }}</span>
1856
-                              <span v-if="advice[0].parent_id == 0">{{
1857
-                                advice[0].execution_frequency
1858
-                              }}</span>
1859
-                              <span
1860
-                                v-if="
1861
-                                  advice[0].parent_id == 0 &&
1862
-                                  advice[0].remark.length > 0
1863
-                                "
1864
-                                >({{ advice[0].remark }})</span
1865
-                              >
1869
+                                <span v-if="advice[0].parent_id == 0">{{
1870
+                                  advice[0].delivery_way
1871
+                                }}</span>
1872
+                                <span v-if="advice[0].parent_id == 0">{{
1873
+                                  advice[0].execution_frequency
1874
+                                }}</span>
1875
+                                <span
1876
+                                  v-if="
1877
+                                    advice[0].parent_id == 0 &&
1878
+                                    advice[0].remark.length > 0
1879
+                                  "
1880
+                                  >({{ advice[0].remark }})</span
1881
+                                >
1882
+                              </div>
1866
                             </td>
1883
                             </td>
1867
 
1884
 
1868
                             <td height="35px">
1885
                             <td height="35px">
3264
             } else {
3281
             } else {
3265
               dlegh = 0;
3282
               dlegh = 0;
3266
             }
3283
             }
3284
+            
3285
+            
3267
             if (dlegh > 0) {
3286
             if (dlegh > 0) {
3268
               if (
3287
               if (
3269
                 typeof this.records[recordIndex].monitor_records ===
3288
                 typeof this.records[recordIndex].monitor_records ===
3276
                 this.records[recordIndex].monitor_records.push([]);
3295
                 this.records[recordIndex].monitor_records.push([]);
3277
               }
3296
               }
3278
             }
3297
             }
3279
-
3280
             this.records[recordIndex].isShowZero = false;
3298
             this.records[recordIndex].isShowZero = false;
3281
             if (this.records[recordIndex].patient.user_org_id == 9535) {
3299
             if (this.records[recordIndex].patient.user_org_id == 9535) {
3282
               this.records[recordIndex].isShowZero = true;
3300
               this.records[recordIndex].isShowZero = true;
3300
                 this.records[recordIndex].advices.push([]);
3318
                 this.records[recordIndex].advices.push([]);
3301
               }
3319
               }
3302
             }
3320
             }
3303
-
3321
+            console.log('22222222',this.records[recordIndex].advices);
3322
+            
3304
             var childMap = {};
3323
             var childMap = {};
3305
             for (const index in this.records[recordIndex].advices) {
3324
             for (const index in this.records[recordIndex].advices) {
3325
+              
3326
+              this.records[recordIndex].advices[index].prescriptionChild = []
3306
               if (this.records[recordIndex].advices[index].parent_id == 0) {
3327
               if (this.records[recordIndex].advices[index].parent_id == 0) {
3307
                 continue;
3328
                 continue;
3308
               }
3329
               }
3320
             }
3341
             }
3321
 
3342
 
3322
             var advices = [];
3343
             var advices = [];
3344
+            // var advices2 = []
3323
             for (const index in this.records[recordIndex].advices) {
3345
             for (const index in this.records[recordIndex].advices) {
3324
               if (this.records[recordIndex].advices[index].parent_id > 0) {
3346
               if (this.records[recordIndex].advices[index].parent_id > 0) {
3325
                 continue;
3347
                 continue;
3329
                 item.children = childMap[item.id];
3351
                 item.children = childMap[item.id];
3330
               } else {
3352
               } else {
3331
                 item.children = [];
3353
                 item.children = [];
3354
+                this.records[recordIndex].advices[index].prescriptionChild.push(item) 
3332
               }
3355
               }
3333
               advices.push(item);
3356
               advices.push(item);
3357
+              
3334
             }
3358
             }
3335
-
3359
+            var arr = []
3360
+            for(let i=0;i<advices.length;i++){
3361
+              for(let j=i+1;j<advices.length;j++){
3362
+                if(advices[i].id !=undefined){
3363
+                  if(advices[i].groupno == advices[j].groupno){
3364
+                    arr.push(advices[j])
3365
+                    advices[i].prescriptionChild.push(advices[j])
3366
+                    advices.splice(j,1)
3367
+                  }
3368
+                }
3369
+              }
3370
+            }
3371
+            console.log('3333333333',advices,arr);
3372
+            
3336
             var leftAdvice = [];
3373
             var leftAdvice = [];
3337
             var rightAdvice = [];
3374
             var rightAdvice = [];
3338
             var adlen = advices.length;
3375
             var adlen = advices.length;

+ 11 - 6
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue View File

1564
                           colspan="2" class="advice-name"
1564
                           colspan="2" class="advice-name"
1565
                           style="padding-left: 7px"
1565
                           style="padding-left: 7px"
1566
                         >
1566
                         >
1567
-                          <div v-if="org_id==10551 || org_id==0">
1567
+                          <div v-if="org_id==10551 || org_id ==0">
1568
                             <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
1568
                             <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
1569
                               <div style="border: none;">
1569
                               <div style="border: none;">
1570
                                 <span>{{ it.advice_name }}</span>
1570
                                 <span>{{ it.advice_name }}</span>
1584
                                       <span>{{
1584
                                       <span>{{
1585
                                         it.execution_frequency
1585
                                         it.execution_frequency
1586
                                       }}</span>
1586
                                       }}</span>
1587
-                                      <span v-if="it.remark.length > 0"
1587
+                                      <span v-if="it.remark !=''"
1588
                                         >({{ it.remark }})</span
1588
                                         >({{ it.remark }})</span
1589
                                       >
1589
                                       >
1590
                               </div>
1590
                               </div>
3830
             let newArr = Object.values(dataInfo)
3830
             let newArr = Object.values(dataInfo)
3831
 
3831
 
3832
             if(newArr!=null && newArr.length >0){
3832
             if(newArr!=null && newArr.length >0){
3833
-            for(let i=0;i<newArr.length;i++){
3834
-              for(let j=0;j<this.doctor_advices.length;j++){
3835
-                if(newArr[i].groupPrescriptionId == this.doctor_advices[j].groupPrescriptionId){
3836
-                    newArr[i].prescriptionChild.push(this.doctor_advices[j])
3833
+              for(let i=0;i<newArr.length;i++){
3834
+                for(let j=0;j<this.doctor_advices.length;j++){
3835
+                  if(newArr[i].groupPrescriptionId == this.doctor_advices[j].groupPrescriptionId){
3836
+                      newArr[i].prescriptionChild.push(this.doctor_advices[j])
3837
+                  }
3837
                 }
3838
                 }
3838
               }
3839
               }
3839
             }
3840
             }
3841
+            for(let i in newArr){
3842
+              if(newArr[i].parent_id == undefined){
3843
+                newArr.splice(i,1)
3844
+              }
3840
             }
3845
             }
3841
             console.log("newArr",newArr)
3846
             console.log("newArr",newArr)
3842
             this.doctor_advices = []
3847
             this.doctor_advices = []

+ 25 - 18
src/xt_pages/dialysis/template/DialysisPrintOrdersixtySeven.vue View File

328
                 </tr>
328
                 </tr>
329
             </table>
329
             </table>
330
           </div>
330
           </div>
331
-          <div style="margin-bottom: 10px;" v-if="org_id!=0&& org_id!=10375">
331
+          <div style="margin-bottom: 10px;" v-if="org_id!=10375">
332
             <table class="table" border="1"
332
             <table class="table" border="1"
333
               style="border-collapse: collapse;text-align: center;width: 100%;"
333
               style="border-collapse: collapse;text-align: center;width: 100%;"
334
             >
334
             >
352
                   height="32px"
352
                   height="32px"
353
                   class="advice-name"
353
                   class="advice-name"
354
                   style="padding-left: 7px"
354
                   style="padding-left: 7px"
355
-                 
355
+
356
                 >
356
                 >
357
                  <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
357
                  <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
358
                    <div style="border: none;">
358
                    <div style="border: none;">
373
                           <span>{{
373
                           <span>{{
374
                             it.execution_frequency
374
                             it.execution_frequency
375
                           }}</span>
375
                           }}</span>
376
-                          <span v-if="it.remark.length > 0"
376
+                          
377
+                          <span v-if="it.remark !=''"
377
                             >({{ it.remark }})</span
378
                             >({{ it.remark }})</span
378
                           >
379
                           >
379
                    </div>
380
                    </div>
466
                 </td>
467
                 </td>
467
                 <td>
468
                 <td>
468
                   <span>透析器凝血:
469
                   <span>透析器凝血:
469
-                   
470
+
470
                     {{
471
                     {{
471
                      afterdialysis &&
472
                      afterdialysis &&
472
                      afterdialysis
473
                      afterdialysis
474
                         : "/"
475
                         : "/"
475
                      }}
476
                      }}
476
 
477
 
477
-                 
478
+
478
                   </span>
479
                   </span>
479
                 </td>
480
                 </td>
480
                 <td>
481
                 <td>
481
                   <span>实际置换量:
482
                   <span>实际置换量:
482
-                   
483
+
483
                     {{
484
                     {{
484
                       afterdialysis.actual_displacement
485
                       afterdialysis.actual_displacement
485
                         ? afterdialysis.actual_displacement
486
                         ? afterdialysis.actual_displacement
486
                         : ""
487
                         : ""
487
                      }}L
488
                      }}L
488
 
489
 
489
-                 
490
+
490
                   </span>
491
                   </span>
491
                 </td>
492
                 </td>
492
               </tr>
493
               </tr>
526
                 <td width="5%">医生:</td>
527
                 <td width="5%">医生:</td>
527
                 <td width="10%">
528
                 <td width="10%">
528
                   <!-- <span>{{getAdminUser(prescription.creater)}}</span> -->
529
                   <!-- <span>{{getAdminUser(prescription.creater)}}</span> -->
529
-                  <span v-if="doctor_advices[0]!=null&&doctor_advices[0].advice_doctor>0">{{ getAdminUser(doctor_advices[0].advice_doctor) }}</span> 
530
+                  <span v-if="doctor_advices[0]!=null&&doctor_advices[0].advice_doctor>0">{{ getAdminUser(doctor_advices[0].advice_doctor) }}</span>
530
                   <span v-if="doctor_advices[0]!=null&&doctor_advices[0].advice_doctor==0">{{getAdminUser(prescription.creater)}}</span>
531
                   <span v-if="doctor_advices[0]!=null&&doctor_advices[0].advice_doctor==0">{{getAdminUser(prescription.creater)}}</span>
531
                   <!-- <img style="height:65px;width: 90%;" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else> -->
532
                   <!-- <img style="height:65px;width: 90%;" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else> -->
532
                 </td>
533
                 </td>
1302
           this.advices.push(item);
1303
           this.advices.push(item);
1303
         }
1304
         }
1304
         this.loading = false;
1305
         this.loading = false;
1306
+
1307
+
1305
         this.doctor_advices =
1308
         this.doctor_advices =
1306
           response.data.data.advices == null ? [] : response.data.data.advices;
1309
           response.data.data.advices == null ? [] : response.data.data.advices;
1307
         for (let index = 0; index < this.doctor_advices.length; index++) {
1310
         for (let index = 0; index < this.doctor_advices.length; index++) {
1351
              }
1354
              }
1352
            }
1355
            }
1353
         }
1356
         }
1354
-        this.doctor_advices = [] 
1357
+        this.doctor_advices = []
1355
         this.doctor_advices = docArr
1358
         this.doctor_advices = docArr
1356
-      
1357
 
1359
 
1358
 
1360
 
1359
-       
1360
-          
1361
+
1362
+
1363
+
1361
         if(this.doctor_advices!=null && this.doctor_advices.length>0){
1364
         if(this.doctor_advices!=null && this.doctor_advices.length>0){
1362
 
1365
 
1363
             for(let i=0;i<this.doctor_advices.length;i++){
1366
             for(let i=0;i<this.doctor_advices.length;i++){
1364
-              this.doctor_advices[i].groupPrescriptionId = this.doctor_advices[i].prescription_id + "_"  + this.doctor_advices[i].groupno 
1367
+              this.doctor_advices[i].groupPrescriptionId = this.doctor_advices[i].prescription_id + "_"  + this.doctor_advices[i].groupno
1365
             }
1368
             }
1366
             console.log("医嘱内容我我哦我我哦doctor_advices",this.doctor_advices)
1369
             console.log("医嘱内容我我哦我我哦doctor_advices",this.doctor_advices)
1367
 
1370
 
1368
             let dataInfo = {}
1371
             let dataInfo = {}
1369
             this.doctor_advices.forEach((item, index) => {
1372
             this.doctor_advices.forEach((item, index) => {
1370
-        
1373
+
1371
             let { groupPrescriptionId } = item
1374
             let { groupPrescriptionId } = item
1372
             if (!dataInfo[groupPrescriptionId]) {
1375
             if (!dataInfo[groupPrescriptionId]) {
1373
               dataInfo[groupPrescriptionId] = {
1376
               dataInfo[groupPrescriptionId] = {
1392
             }
1395
             }
1393
           })
1396
           })
1394
           let newArr = Object.values(dataInfo)
1397
           let newArr = Object.values(dataInfo)
1395
-          
1398
+
1396
           if(newArr!=null && newArr.length >0){
1399
           if(newArr!=null && newArr.length >0){
1397
              for(let i=0;i<newArr.length;i++){
1400
              for(let i=0;i<newArr.length;i++){
1398
                for(let j=0;j<this.doctor_advices.length;j++){
1401
                for(let j=0;j<this.doctor_advices.length;j++){
1403
              }
1406
              }
1404
           }
1407
           }
1405
           console.log("newArr",newArr)
1408
           console.log("newArr",newArr)
1406
-            
1409
+          for(let i in newArr){
1410
+            if(newArr[i].parent_id == undefined){
1411
+              newArr.splice(i,1)
1412
+            }
1413
+          }
1407
           this.doctor_advices = []
1414
           this.doctor_advices = []
1408
           this.doctor_advices = newArr
1415
           this.doctor_advices = newArr
1409
-         
1416
+
1410
         }
1417
         }
1411
-        
1418
+
1412
 
1419
 
1413
       } else {
1420
       } else {
1414
         this.loading = false;
1421
         this.loading = false;