Browse Source

打印单47

huangyw 2 years ago
parent
commit
a6158b37e9
1 changed files with 40 additions and 22 deletions
  1. 40 22
      src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue

+ 40 - 22
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue View File

754
                             ? prescription.dialyzer_perfusion_apparatus
754
                             ? prescription.dialyzer_perfusion_apparatus
755
                             : ""
755
                             : ""
756
                         }}
756
                         }}
757
-                        <span v-if="!prescription.dialysis_dialyszers&&!prescription.dialyzer_perfusion_apparatus">/</span>
757
+                        <span
758
+                          v-if="
759
+                            !prescription.dialysis_dialyszers &&
760
+                            !prescription.dialyzer_perfusion_apparatus
761
+                          "
762
+                          >/</span
763
+                        >
758
                         <span v-if="prescription.dialysis_dialyszers">/</span>
764
                         <span v-if="prescription.dialysis_dialyszers">/</span>
759
                         {{
765
                         {{
760
                           prescription.dialysis_dialyszers
766
                           prescription.dialysis_dialyszers
1289
                                 : ""
1295
                                 : ""
1290
                             }}
1296
                             }}
1291
                           </span>
1297
                           </span>
1292
-
1293
                         </td>
1298
                         </td>
1294
                         <!-- <td
1299
                         <!-- <td
1295
                           v-if="
1300
                           v-if="
1445
                           style="padding-left: 7px"
1450
                           style="padding-left: 7px"
1446
                         >
1451
                         >
1447
                           <span v-if="advice.parent_id > 0">---></span>
1452
                           <span v-if="advice.parent_id > 0">---></span>
1448
-                          <span>{{ advice.advice_name }}</span>
1453
+                          <span v-if="advice.advice_name">{{ advice.advice_name }}</span>
1454
+                          <span v-else>{{ advice.project.project_name }}</span>
1455
+
1449
                           <span v-if="advice && advice.advice_desc"
1456
                           <span v-if="advice && advice.advice_desc"
1450
                             >({{ advice.advice_desc
1457
                             >({{ advice.advice_desc
1451
                             }}{{ advice.drug_spec_unit }})</span
1458
                             }}{{ advice.drug_spec_unit }})</span
1452
                           >
1459
                           >
1460
+                          <span v-if="advice && advice.project">{{advice.count}}{{advice.project.unit}}</span>
1453
                           <span v-if="advice.prescribing_number"
1461
                           <span v-if="advice.prescribing_number"
1454
                             >&nbsp;&nbsp; {{ advice.prescribing_number
1462
                             >&nbsp;&nbsp; {{ advice.prescribing_number
1455
                             }}{{ advice.prescribing_number_unit }}</span
1463
                             }}{{ advice.prescribing_number_unit }}</span
2601
       summary: {},
2609
       summary: {},
2602
       receiverTreatmentAccess: {},
2610
       receiverTreatmentAccess: {},
2603
       org_template_info: {},
2611
       org_template_info: {},
2604
-
2612
+      project:[],
2605
       doctor_advices: [],
2613
       doctor_advices: [],
2606
       doctor_advices_2: [],
2614
       doctor_advices_2: [],
2607
       advice_groups: [],
2615
       advice_groups: [],
3083
 
3091
 
3084
         this.prescription = response.data.data.dialysisPrescription;
3092
         this.prescription = response.data.data.dialysisPrescription;
3085
         console.log("透析处方", this.prescription);
3093
         console.log("透析处方", this.prescription);
3094
+        let project_arr = response.data.data.projects
3095
+        project_arr.forEach(o => {
3096
+          if(o.project.project_name && o.project.project_name!=""){
3097
+            this.project.push(o)
3098
+          }
3099
+        });
3100
+        // this.project = response.data.data.projects;
3101
+        console.log(this.project, "项目和耗材");
3086
         this.receiverTreatmentAccess =
3102
         this.receiverTreatmentAccess =
3087
           response.data.data.receiverTreatmentAccess;
3103
           response.data.data.receiverTreatmentAccess;
3088
         this.prescription.mode = this.modeName(this.prescription.mode_id);
3104
         this.prescription.mode = this.modeName(this.prescription.mode_id);
3229
         }
3245
         }
3230
         this.loading = false;
3246
         this.loading = false;
3231
         this.doctor_advices =
3247
         this.doctor_advices =
3232
-          response.data.data.advices == null ? [] : response.data.data.advices;
3248
+          response.data.data.advices == null ? [] : response.data.data.advices.concat(this.project);
3249
+          // .concat(this.project)
3250
+          console.log( this.doctor_advices,' this.doctor_advices this.doctor_advices')
3233
         for (let index = 0; index < this.doctor_advices.length; index++) {
3251
         for (let index = 0; index < this.doctor_advices.length; index++) {
3234
           this.doctor_advices[index]["isShow"] = 2;
3252
           this.doctor_advices[index]["isShow"] = 2;
3235
         }
3253
         }
3328
           }
3346
           }
3329
         }
3347
         }
3330
 
3348
 
3331
-        this.totollength = this.doctor_advices.length + this.monitors.length;
3332
-        if (this.totollength > 18) {
3333
-          var temp_advice_length = 17 - this.monitors.length;
3334
-          var doctor_advices_1 = [];
3335
-          var doctor_advices_2 = [];
3336
-          for (let index = 0; index < this.doctor_advices.length; index++) {
3337
-            const element = this.doctor_advices[index];
3338
-            if (temp_advice_length > index) {
3339
-              doctor_advices_1.push(element);
3340
-            } else {
3341
-              doctor_advices_2.push(element);
3342
-            }
3343
-          }
3344
-          this.doctor_advices = doctor_advices_1;
3345
-          this.doctor_advices_2 = doctor_advices_2;
3346
-        }
3347
-        console.log(this.advice_groups);
3349
+        // this.totollength = this.doctor_advices.length + this.monitors.length;
3350
+        // if (this.totollength > 18) {
3351
+        //   var temp_advice_length = 17 - this.monitors.length;
3352
+        //   var doctor_advices_1 = [];
3353
+        //   var doctor_advices_2 = [];
3354
+        //   for (let index = 0; index < this.doctor_advices.length; index++) {
3355
+        //     const element = this.doctor_advices[index];
3356
+        //     if (temp_advice_length > index) {
3357
+        //       doctor_advices_1.push(element);
3358
+        //     } else {
3359
+        //       doctor_advices_2.push(element);
3360
+        //     }
3361
+        //   }
3362
+        //   this.doctor_advices = doctor_advices_1;
3363
+        //   this.doctor_advices_2 = doctor_advices_2;
3364
+        // }
3365
+        // console.log(this.doctor_advices,'doctor_advices');
3348
       } else {
3366
       } else {
3349
         this.loading = false;
3367
         this.loading = false;
3350
         this.$message.error("请求数据失败");
3368
         this.$message.error("请求数据失败");