Explorar el Código

8月1,79号打印单

yq1 hace 8 meses
padre
commit
14d545c506
Se han modificado 1 ficheros con 114 adiciones y 107 borrados
  1. 114 107
      src/xt_pages/dialysis/template/DialysisPrintOrderSeventynine.vue

+ 114 - 107
src/xt_pages/dialysis/template/DialysisPrintOrderSeventynine.vue Ver fichero

@@ -25,7 +25,7 @@
25 25
                   </div>
26 26
                   <div style="flex: 1;">
27 27
                     透析机号:
28
-                    {{ dialysisOrder && dialysisOrder.DeviceNumber && dialysisOrder.DeviceNumber.number.length > 0 ? dialysisOrder.DeviceNumber.number : patientInfo.DialysisSchedule.device_number.number }}
28
+                    <!-- {{ dialysisOrder && dialysisOrder.DeviceNumber && dialysisOrder.DeviceNumber.number.length > 0 ? dialysisOrder.DeviceNumber.number : patientInfo.DialysisSchedule.device_number.number }} -->
29 29
                   </div>
30 30
                 </div>
31 31
               </td>
@@ -739,112 +739,8 @@ export default {
739 739
           );
740 740
           this.assessmentafter = response.data.data.assessmentAfterDislysis;
741 741
           console.log("上次透后体重", this.assessmentafter);
742
-          var doctorAdevieInfo = response.data.data.doctorAdevieInfo;
743
-          var tableAdvice = doctorAdevieInfo;
744
-          // console.log('医生', tableAdvice.length)
745
-          if (tableAdvice.length === 0) {
746
-            var obj = { advice_name: "", start_time: "" };
747
-            var obj1 = { advice_name: "", start_time: "" };
748
-            var obj2 = { advice_name: "", start_time: "" };
749
-            var obj3 = { advice_name: "", start_time: "" };
750
-            var obj4 = { advice_name: "", start_time: "" };
751
-            var obj5 = { advice_name: "", start_time: "" };
752
-            var obj6 = { advice_name: "", start_time: "" };
753
-
754
-            tableAdvice.push(obj);
755
-            tableAdvice.push(obj1);
756
-            tableAdvice.push(obj2);
757
-            tableAdvice.push(obj3);
758
-            tableAdvice.push(obj4);
759
-            tableAdvice.push(obj5);
760
-            tableAdvice.push(obj6);
761
-
762
-            this.tableAdvice = tableAdvice;
763
-          }
764
-          if (tableAdvice.length === 1) {
765
-            var obj = { advice_name: "", start_time: "" };
766
-            var obj1 = { advice_name: "", start_time: "" };
767
-            var obj2 = { advice_name: "", start_time: "" };
768
-            var obj3 = { advice_name: "", start_time: "" };
769
-            var obj4 = { advice_name: "", start_time: "" };
770
-            var obj5 = { advice_name: "", start_time: "" };
771
-
772
-            tableAdvice.push(obj);
773
-            tableAdvice.push(obj1);
774
-            tableAdvice.push(obj2);
775
-            tableAdvice.push(obj3);
776
-            tableAdvice.push(obj4);
777
-            tableAdvice.push(obj5);
778
-
779
-            this.tableAdvice = tableAdvice;
780
-          }
781
-          if (tableAdvice.length === 2) {
782
-            var obj = { advice_name: "", start_time: "" };
783
-            var obj1 = { advice_name: "", start_time: "" };
784
-            var obj2 = { advice_name: "", start_time: "" };
785
-            var obj3 = { advice_name: "", start_time: "" };
786
-            var obj4 = { advice_name: "", start_time: "" };
787
-
788
-            tableAdvice.push(obj);
789
-            tableAdvice.push(obj1);
790
-            tableAdvice.push(obj2);
791
-            tableAdvice.push(obj3);
792
-            tableAdvice.push(obj4);
793
-
794
-            this.tableAdvice = tableAdvice;
795
-          }
796
-          if (tableAdvice.length === 3) {
797
-            // eslint-disable-next-line no-redeclare
798
-            var obj = { advice_name: "", start_time: "" };
799
-            // eslint-disable-next-line no-redeclare
800
-            var obj1 = { advice_name: "", start_time: "" };
801
-            // eslint-disable-next-line no-redeclare
802
-            var obj2 = { advice_name: "", start_time: "" };
803
-            var obj3 = { advice_name: "", start_time: "" };
804
-
805
-            tableAdvice.push(obj);
806
-            tableAdvice.push(obj1);
807
-            tableAdvice.push(obj2);
808
-            tableAdvice.push(obj3);
809
-
810
-            this.tableAdvice = tableAdvice;
811
-          }
812
-          if (tableAdvice.length === 4) {
813
-            // eslint-disable-next-line no-redeclare
814
-            var obj = { advice_name: "", start_time: "" };
815
-            // eslint-disable-next-line no-redeclare
816
-            var obj1 = { advice_name: "", start_time: "" };
817
-            // eslint-disable-next-line no-redeclare
818
-            var obj2 = { advice_name: "", start_time: "" };
819
-
820
-            tableAdvice.push(obj);
821
-            tableAdvice.push(obj1);
822
-            tableAdvice.push(obj2);
823
-
824
-            this.tableAdvice = tableAdvice;
825
-          }
826
-          if (tableAdvice.length === 5) {
827
-            // eslint-disable-next-line no-redeclare
828
-            var obj = { advice_name: "", start_time: "" };
829
-            // eslint-disable-next-line no-redeclare
830
-            var obj1 = { advice_name: "", start_time: "" };
831
-            var obj2 = { advice_name: "", start_time: "" };
832
-
833
-            tableAdvice.push(obj);
834
-            tableAdvice.push(obj1);
835
-            tableAdvice.push(obj2);
836
-
837
-            this.tableAdvice = tableAdvice;
838
-          }
839
-
840
-          if (tableAdvice.length >= 6) {
841
-            var obj = { advice_name: "", start_time: "" };
842
-
843
-            tableAdvice.push(obj);
844
-
845
-            this.tableAdvice = tableAdvice;
846
-          }
847
-          console.log('医嘱',this.tableAdvice);
742
+          // var doctorAdevieInfo = response.data.data.doctorAdevieInfo;
743
+          
848 744
           this.afterdialysis = response.data.data.AssessmentAfterDislysis;
849 745
           console.log("透后评估", this.afterdialysis);
850 746
           this.operators = response.data.data.operators;
@@ -1220,6 +1116,117 @@ export default {
1220 1116
             }
1221 1117
           }
1222 1118
           console.log(this.advice_groups);
1119
+          var doctorAdevieInfo = response.data.data.advices;
1120
+          var tableAdvice = doctorAdevieInfo;
1121
+          console.log('response.data.data', response.data.data)
1122
+          if (tableAdvice.length === 0) {
1123
+            console.log('1111111');
1124
+            var obj = { advice_name: "", start_time: "" };
1125
+            var obj1 = { advice_name: "", start_time: "" };
1126
+            var obj2 = { advice_name: "", start_time: "" };
1127
+            var obj3 = { advice_name: "", start_time: "" };
1128
+            var obj4 = { advice_name: "", start_time: "" };
1129
+            var obj5 = { advice_name: "", start_time: "" };
1130
+            var obj6 = { advice_name: "", start_time: "" };
1131
+
1132
+            tableAdvice.push(obj);
1133
+            tableAdvice.push(obj1);
1134
+            tableAdvice.push(obj2);
1135
+            tableAdvice.push(obj3);
1136
+            tableAdvice.push(obj4);
1137
+            tableAdvice.push(obj5);
1138
+            tableAdvice.push(obj6);
1139
+
1140
+            this.tableAdvice = tableAdvice;
1141
+            return this.tableAdvice
1142
+          }
1143
+          if (tableAdvice.length === 1) {
1144
+            console.log('2222222');
1145
+            var obj = { advice_name: "", start_time: "" };
1146
+            var obj1 = { advice_name: "", start_time: "" };
1147
+            var obj2 = { advice_name: "", start_time: "" };
1148
+            var obj3 = { advice_name: "", start_time: "" };
1149
+            var obj4 = { advice_name: "", start_time: "" };
1150
+            var obj5 = { advice_name: "", start_time: "" };
1151
+
1152
+            tableAdvice.push(obj);
1153
+            tableAdvice.push(obj1);
1154
+            tableAdvice.push(obj2);
1155
+            tableAdvice.push(obj3);
1156
+            tableAdvice.push(obj4);
1157
+            tableAdvice.push(obj5);
1158
+
1159
+            this.tableAdvice = tableAdvice;
1160
+            // return this.tableAdvice
1161
+          }
1162
+          if (tableAdvice.length === 2) {
1163
+            console.log('333333',tableAdvice.length);
1164
+            var obj = { advice_name: "", start_time: "" };
1165
+            var obj1 = { advice_name: "", start_time: "" };
1166
+            var obj2 = { advice_name: "", start_time: "" };
1167
+            var obj3 = { advice_name: "", start_time: "" };
1168
+            var obj4 = { advice_name: "", start_time: "" };
1169
+
1170
+            tableAdvice.push(obj);
1171
+            tableAdvice.push(obj1);
1172
+            tableAdvice.push(obj2);
1173
+            tableAdvice.push(obj3);
1174
+            tableAdvice.push(obj4);
1175
+
1176
+            this.tableAdvice = tableAdvice;
1177
+            // return this.tableAdvice
1178
+          }
1179
+          if (tableAdvice.length === 3) {
1180
+            console.log('444444');
1181
+            var obj = { advice_name: "", start_time: "" };
1182
+            var obj1 = { advice_name: "", start_time: "" };
1183
+            var obj2 = { advice_name: "", start_time: "" };
1184
+            var obj3 = { advice_name: "", start_time: "" };
1185
+
1186
+            tableAdvice.push(obj);
1187
+            tableAdvice.push(obj1);
1188
+            tableAdvice.push(obj2);
1189
+            tableAdvice.push(obj3);
1190
+
1191
+            this.tableAdvice = tableAdvice;
1192
+            // return this.tableAdvice
1193
+          }
1194
+          if (tableAdvice.length === 4) {
1195
+            console.log('5555555');
1196
+            var obj = { advice_name: "", start_time: "" };
1197
+            var obj1 = { advice_name: "", start_time: "" };
1198
+            var obj2 = { advice_name: "", start_time: "" };
1199
+
1200
+            tableAdvice.push(obj);
1201
+            tableAdvice.push(obj1);
1202
+            tableAdvice.push(obj2);
1203
+
1204
+            this.tableAdvice = tableAdvice;
1205
+            // return this.tableAdvice
1206
+          }
1207
+          if (tableAdvice.length === 5) {
1208
+            console.log('6666666');
1209
+            var obj = { advice_name: "", start_time: "" };
1210
+            var obj1 = { advice_name: "", start_time: "" };
1211
+            var obj2 = { advice_name: "", start_time: "" };
1212
+
1213
+            tableAdvice.push(obj);
1214
+            tableAdvice.push(obj1);
1215
+            tableAdvice.push(obj2);
1216
+
1217
+            this.tableAdvice = tableAdvice;
1218
+            // return this.tableAdvice
1219
+          }
1220
+
1221
+          if (tableAdvice.length >7) {
1222
+            console.log('777777',tableAdvice);
1223
+            // var obj = { advice_name: "", start_time: "" };
1224
+
1225
+            // tableAdvice.push(obj);
1226
+            this.tableAdvice = tableAdvice;
1227
+
1228
+          }
1229
+          console.log('医嘱',this.tableAdvice.length);
1223 1230
         } else {
1224 1231
           this.loading = false;
1225 1232
           this.$message.error("请求数据失败");