see999 3 年 前
コミット
0cb0e2c66d

File diff suppressed because it is too large
+ 567 - 469
src/xt_pages/dialysis/template/DialysisPrintOrderThirty.vue


File diff suppressed because it is too large
+ 714 - 606
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyOne.vue


File diff suppressed because it is too large
+ 1468 - 1373
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyEight.vue


+ 118 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFive.vue ファイルの表示

@@ -1126,7 +1126,123 @@ export default {
1126 1126
   },
1127 1127
     methods: {
1128 1128
       checkData(){
1129
-
1129
+        if(this.predialysis.dialysis_count == 0){
1130
+          this.$message.error('透析频率未填')
1131
+        }else if(this.receiverTreatmentAccess.way == 0){
1132
+          this.$message.error('入科方式未填')
1133
+        }else if(this.receiverTreatmentAccess.consciousness == 0){
1134
+          this.$message.error('意识未填')
1135
+        }else if(this.predialysis.is_infect == 0){
1136
+          this.$message.error('感染未填')
1137
+        }else if(this.predialysis.temperature == ""){
1138
+          this.$message.error('透前体温未填')
1139
+        }else if(this.predialysis.pulse_frequency == ""){
1140
+          this.$message.error('透前脉搏未填')
1141
+        }else if(this.predialysis.systolic_blood_pressure == 0 || this.predialysis.diastolic_blood_pressure == 0){
1142
+          this.$message.error('透前血压未填完整')
1143
+        }else if(this.predialysis.catheter == ''){
1144
+          this.$message.error('导管口未填')
1145
+        }else if(this.predialysis.catheter_bend == 0){
1146
+          this.$message.error('打折未填')
1147
+        }else if(this.predialysis.urine_volume == 0){
1148
+          this.$message.error('尿量未填')
1149
+        }else if(this.predialysis.internal_fistula == ''){
1150
+          this.$message.error('内瘘评估震颤未填')
1151
+        }else if(this.predialysis.exposed == 0){
1152
+          this.$message.error('外露未填')
1153
+        }else if(this.predialysis.internal_fistula_skin == ''){
1154
+          this.$message.error('内瘘皮肤情况未填')
1155
+        }else if(this.predialysis.is_hemorrhage == 0){
1156
+          this.$message.error('活动性出血未填')
1157
+        }else if(this.predialysis.is_hemorrhage == 1 && this.predialysis.hemorrhage == ""){
1158
+          this.$message.error('活动性出血选项未填')
1159
+        }else if(this.predialysis.blood_access_part_opera_name == ''){
1160
+          this.$message.error('血管通路未填')
1161
+        }else if(this.predialysis.weight_before == 0){
1162
+          this.$message.error('透前体重未填')
1163
+        }else if(this.predialysis.dry_weight == 0){
1164
+          this.$message.error('干体重未填')
1165
+        }else if(this.predialysis.additional_weight == 0){
1166
+          this.$message.error('衣物重未填')
1167
+        }else if(this.prescription.dialysis_duration_hour == 0 && this.prescription.dialysis_duration_minute == 0){
1168
+          this.$message.error('计划治疗时间未填')
1169
+        }else if(this.prescription.blood_flow_volume == 0){
1170
+          this.$message.error('血流量未填')
1171
+        }else if(this.prescription.target_ultrafiltration == 0){
1172
+          this.$message.error('计划超滤总量未填')
1173
+        }else if(this.prescription.displace_liqui_part == 0 && (prescription.mode_id == 2 || prescription.mode_id == 5 || prescription.mode_id == 12)){
1174
+          this.$message.error('置换方式未填')
1175
+        }else if(this.prescription.replacement_total == 0 && (prescription.mode_id == 2 || prescription.mode_id == 5 || prescription.mode_id == 12)){
1176
+          this.$message.error('置换量未填')
1177
+        }else if(this.prescription.mode_id == ""){
1178
+          this.$message.error('透析方式未填')
1179
+        }else if(this.prescription.anticoagulant == 0){
1180
+          this.$message.error('治疗抗凝未填')
1181
+        }else if(this.prescription.dialysate_formulation_name == ""){
1182
+          this.$message.error('透析液配方未填')
1183
+        }else if(this.prescription.dialyzer_perfusion_apparatus == ""){
1184
+          this.$message.error('透析器型号未填')
1185
+        }else if(this.afterdialysis.internal_fistula == ''){
1186
+          this.$message.error('透后内瘘震颤未填')
1187
+        }else if(this.afterdialysis.catheter == ''){
1188
+          this.$message.error('透后导管未填')
1189
+        }else if(this.afterdialysis.puncture_point_oozing_blood == 0){
1190
+          this.$message.error('拔针后穿刺点渗血未填')
1191
+        }else if(this.afterdialysis.puncture_point_haematoma == 0){
1192
+          this.$message.error('穿刺处血肿未填')
1193
+        }else if(this.afterdialysis.cvc_a == 0){
1194
+          this.$message.error('A端未填')
1195
+        }else if(this.afterdialysis.cvc_v == 0){
1196
+          this.$message.error('V端未填')
1197
+        }else if(this.afterdialysis.complication == ""){
1198
+          this.$message.error('透后并发症未填')
1199
+        }else if(this.afterdialysis.cruor == ""){
1200
+          this.$message.error('透析器凝血未填')
1201
+        }else if(this.afterdialysis.arterial_tube == 0){
1202
+          this.$message.error('动脉管道未填')
1203
+        }else if(this.afterdialysis.intravenous_tube == 0){
1204
+          this.$message.error('静脉管道未填')
1205
+        }else if(this.afterdialysis.weight_after == 0){
1206
+          this.$message.error('透后体重未填')
1207
+        }else if(this.afterdialysis.actual_ultrafiltration == 0){
1208
+          this.$message.error('实际超滤量未填')
1209
+        }else if(this.afterdialysis.actual_treatment_hour == 0 && this.afterdialysis.actual_treatment_minute == 0){
1210
+          this.$message.error('实际治疗时间未填')
1211
+        }else if(this.summary.dialysis_summary == ""){
1212
+          this.$message.error('透析小结未填')
1213
+        }else if(this.prescription.creater == 0){
1214
+          this.$message.error('医生签名未填')
1215
+        }else if(this.dialysisOrder.puncture_nurse == 0){
1216
+          this.$message.error('穿刺护士未填')
1217
+        }else if(this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.modifier && this.check.creater == 0){
1218
+          this.$message.error('核对护士未填')
1219
+        }else if(this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.creater && this.check.modifier == 0){
1220
+          this.$message.error('核对护士未填')
1221
+        }else if(this.dialysisOrder.start_nurse == 0){
1222
+          this.$message.error('看机护士未填')
1223
+        }else if(this.dialysisOrder.finish_nurse == 0){
1224
+          this.$message.error('下机护士未填')
1225
+        }else if(this.tableAdvice.length > 0){
1226
+          this.tableAdvice.map(item => {
1227
+            if(item.id > 0 && item.created_time){
1228
+              this.users.map(it => {
1229
+                if(it.id == item.advice_doctor){
1230
+                  if(it.type != 2){
1231
+                    this.$message.error('存在不是医生保存的医嘱')
1232
+                  }
1233
+                }else if(it.id == item.execution_staff && item.execution_staff > 0){
1234
+                  if(it.type != 3){
1235
+                    this.$message.error('存在不是护士执行的医嘱')
1236
+                  }
1237
+                }else if(it.id == item.checker && item.checker > 0){
1238
+                  if(it.type != 3){
1239
+                    this.$message.error('存在不是护士核对的医嘱')
1240
+                  }
1241
+                }
1242
+              })
1243
+            }
1244
+          })
1245
+        }
1130 1246
       },
1131 1247
       getComplication(complication){
1132 1248
         if(complication.indexOf(',') == -1){
@@ -1393,6 +1509,7 @@ export default {
1393 1509
             }
1394 1510
 
1395 1511
             this.advices = response.data.data.advices
1512
+            this.tableAdvice = response.data.data.advices;
1396 1513
             console.log('hhhhhhhhhhhh', this.advices)
1397 1514
             this.monitors = response.data.data.monitors
1398 1515
             console.log('哈哈哈哈哈哈哈', this.monitors)

File diff suppressed because it is too large
+ 623 - 537
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyNine.vue


File diff suppressed because it is too large
+ 1238 - 1098
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue


File diff suppressed because it is too large
+ 1134 - 1044
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySix.vue


+ 24 - 24
src/xt_pages/hospitalStation/outpatientChargesManagement.vue ファイルの表示

@@ -61,7 +61,7 @@
61 61
                             <template slot-scope="scope">{{scope.row.name}}</template>
62 62
                         </el-table-column>
63 63
                         <el-table-column align="center" prop="name" label="就诊号" width="110">
64
-                            <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}
64
+                            <template slot-scope="scope">{{ scope.row ?scope.row.number:''}}
65 65
                             </template>
66 66
                         </el-table-column>
67 67
                     </el-table>
@@ -869,11 +869,11 @@
869 869
             let three_count = 0
870 870
             for (let i = 0; i < response.data.data.list.length; i++) {
871 871
               this.all_table_data.push(response.data.data.list[i])
872
-              if (response.data.data.list[i].his_patient.order.order_status == 0 || response.data.data.list[i].his_patient.order.order_status == 1 || response.data.data.list[i].his_patient.order.order_status == 3) {
872
+              if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
873 873
                 one_count = one_count + 1
874 874
               }
875 875
 
876
-              if (response.data.data.list[i].his_patient.order.order_status == 2) {
876
+              if (response.data.data.list[i].order.order_status == 2) {
877 877
                 two_count = two_count + 1
878 878
               }
879 879
 
@@ -895,16 +895,16 @@
895 895
                 this.patientTableData = []
896 896
 
897 897
                 for (let i = 0; i < this.all_table_data.length; i++) {
898
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
898
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
899 899
                     this.patientTableData.push(this.all_table_data[i])
900 900
                   }
901 901
 
902 902
                 }
903 903
                 if (this.patientTableData.length > 0) {
904 904
                   for (let i = 0; i < this.patientTableData.length; i++) {
905
-                    if (this.patientTableData[i].id == this.patientInfo.id) {
905
+                    if (this.patientTableData[i].patient_id == this.patientInfo.id) {
906 906
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
907
-                      this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
907
+                      this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
908 908
                     }
909 909
                   }
910 910
                 }
@@ -986,11 +986,11 @@
986 986
 
987 987
             for (let i = 0; i < response.data.data.list_two.length; i++) {
988 988
               this.hisPatientDatas.push(response.data.data.list_two[i])
989
-              if (response.data.data.list_two[i].his_patient.order.order_status == 0 || response.data.data.list_two[i].his_patient.order.order_status == 1 || response.data.data.list_two[i].his_patient.order.order_status == 3) {
989
+              if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1 || response.data.data.list_two[i].order.order_status == 3) {
990 990
                 one_count = one_count + 1
991 991
               }
992 992
 
993
-              if (response.data.data.list_two[i].his_patient.order.order_status == 2) {
993
+              if (response.data.data.list_two[i].order.order_status == 2) {
994 994
                 two_count = two_count + 1
995 995
               }
996 996
 
@@ -1010,16 +1010,16 @@
1010 1010
                 this.patientTableData = []
1011 1011
 
1012 1012
                 for (let i = 0; i < this.hisPatientDatas.length; i++) {
1013
-                  if (this.hisPatientDatas[i].his_patient.order.order_status == 0 || this.hisPatientDatas[i].his_patient.order.order_status == 1 || this.hisPatientDatas[i].his_patient.order.order_status == 3) {
1013
+                  if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1 || this.hisPatientDatas[i].order.order_status == 3) {
1014 1014
                     this.patientTableData.push(this.hisPatientDatas[i])
1015 1015
                   }
1016 1016
 
1017 1017
                 }
1018 1018
                 if (this.patientTableData.length > 0) {
1019 1019
                   for (let i = 0; i < this.patientTableData.length; i++) {
1020
-                    if (this.patientTableData[i].id == this.patientInfo.id) {
1020
+                    if (this.patientTableData[i].patient_id == this.patientInfo.id) {
1021 1021
                       this.$refs.tab.setCurrentRow(this.patientTableData[i])
1022
-                      this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id)
1022
+                      this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
1023 1023
                     }
1024 1024
                   }
1025 1025
                 }
@@ -2069,7 +2069,7 @@
2069 2069
 
2070 2070
             for (let i = 0; i < response.data.data.list.length; i++) {
2071 2071
               this.all_table_data.push(response.data.data.list[i])
2072
-              if (response.data.data.list[i].his_patient.order.order_status == 0 || response.data.data.list[i].his_patient.order.order_status == 1 || response.data.data.list[i].his_patient.order.order_status == 3) {
2072
+              if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2073 2073
                 one_count = one_count + 1
2074 2074
               }
2075 2075
 
@@ -2085,16 +2085,16 @@
2085 2085
               case 1:
2086 2086
                 this.patientTableData = []
2087 2087
                 for (let i = 0; i < this.all_table_data.length; i++) {
2088
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
2088
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2089 2089
                     this.patientTableData.push(this.all_table_data[i])
2090 2090
                   }
2091 2091
 
2092 2092
                 }
2093 2093
                 for (let i = 0; i < this.patientTableData.length; i++) {
2094
-                  if (this.patientInfo.id == this.patientTableData[i].id) {
2094
+                  if (this.patientInfo.id == this.patientTableData[i].patient_id) {
2095 2095
                     this.current_index = i
2096 2096
                     this.$refs.tab.setCurrentRow(this.patientTableData[i])
2097
-                    this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].his_patient.order.number, this.patientTableData[i].his_patient.id)
2097
+                    this.getPatientInformation(this.patientTableData[i].patient_id, this.patientTableData[i].order.number, this.patientTableData[i].id)
2098 2098
 
2099 2099
                   }
2100 2100
                 }
@@ -2199,7 +2199,7 @@
2199 2199
 
2200 2200
               for (let i = 0; i < response.data.data.list.length; i++) {
2201 2201
                 this.all_table_data.push(response.data.data.list[i])
2202
-                if (response.data.data.list[i].his_patient.order.order_status == 0 || response.data.data.list[i].his_patient.order.order_status == 1 || response.data.data.list[i].his_patient.order.order_status == 3) {
2202
+                if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2203 2203
                   one_count = one_count + 1
2204 2204
                 }
2205 2205
 
@@ -2216,7 +2216,7 @@
2216 2216
 
2217 2217
               for (let i = 0; i < response.data.data.list_two.length; i++) {
2218 2218
                 this.hisPatientDatas.push(response.data.data.list_two[i])
2219
-                if (response.data.data.list_two[i].his_patient.order.order_status == 0 || response.data.data.list_two[i].his_patient.order.order_status == 1) {
2219
+                if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1) {
2220 2220
                   one_count = one_count + 1
2221 2221
                 }
2222 2222
 
@@ -2243,7 +2243,7 @@
2243 2243
                 if (this.activeName == 'first') {
2244 2244
 
2245 2245
                   for (let i = 0; i < this.all_table_data.length; i++) {
2246
-                    if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1) {
2246
+                    if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2247 2247
                       this.patientTableData.push(this.all_table_data[i])
2248 2248
                     }
2249 2249
 
@@ -2251,7 +2251,7 @@
2251 2251
 
2252 2252
                 } else {
2253 2253
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2254
-                    if (this.hisPatientDatas[i].his_patient.order.order_status == 0 || this.hisPatientDatas[i].his_patient.order.order_status == 1) {
2254
+                    if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1) {
2255 2255
                       this.patientTableData.push(this.hisPatientDatas[i])
2256 2256
                     }
2257 2257
 
@@ -2261,7 +2261,7 @@
2261 2261
 
2262 2262
                 this.current_index = 0
2263 2263
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2264
-                this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].his_patient.order.number, this.patientTableData[0].his_patient.id)
2264
+                this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].order.number, this.patientTableData[0].id)
2265 2265
 
2266 2266
                 break
2267 2267
               case 2:
@@ -2363,7 +2363,7 @@
2363 2363
             let three_count = 0
2364 2364
             for (let i = 0; i < response.data.data.list.length; i++) {
2365 2365
               this.all_table_data.push(response.data.data.list[i])
2366
-              if (response.data.data.list[i].his_patient.order.order_status == 0 || response.data.data.list[i].his_patient.order.order_status == 1 || response.data.data.list[i].his_patient.order.order_status == 3) {
2366
+              if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2367 2367
                 one_count = one_count + 1
2368 2368
               }
2369 2369
 
@@ -2379,13 +2379,13 @@
2379 2379
               case 1:
2380 2380
                 this.patientTableData = []
2381 2381
                 for (let i = 0; i < this.all_table_data.length; i++) {
2382
-                  if (this.all_table_data[i].his_patient.order.order_status == 0 || this.all_table_data[i].his_patient.order.order_status == 1 || this.all_table_data[i].his_patient.order.order_status == 3) {
2382
+                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1 || this.all_table_data[i].order.order_status == 3) {
2383 2383
                     this.patientTableData.push(this.all_table_data[i])
2384 2384
                   }
2385 2385
                 }
2386 2386
 
2387 2387
                 this.$refs.tab.setCurrentRow(this.patientTableData[0])
2388
-                this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].his_patient.order.number, this.patientTableData[0].his_patient.id)
2388
+                this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].order.number, this.patientTableData[0].id)
2389 2389
 
2390 2390
                 break
2391 2391
               case 2:
@@ -2620,7 +2620,7 @@
2620 2620
         this.prescriptions = []
2621 2621
         this.month_prescriptions = []
2622 2622
         if(this.radio == 1){
2623
-          this.getPatientInformation(val.id, val.his_patient.order.number, val.his_patient.id)
2623
+          this.getPatientInformation(val.patient_id, val.order.number, val.id)
2624 2624
         }else{
2625 2625
           this.getPatientInformation(val.id, val.number, val.his_patient_id)
2626 2626
 

+ 66 - 6
src/xt_pages/outpatientTool/components/detail.vue ファイルの表示

@@ -12,6 +12,7 @@
12 12
                     <!--</el-button>-->
13 13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14 14
                               @keyup.enter.native='searchAction'
15
+                              placeholder="请输入患者姓名"
15 16
                               class="filter-item"/>
16 17
                     <el-select size="small" v-model="item_type" placeholder="请选择"
17 18
                                style="width:150px;margin-left:10px;" @change="changeItem">
@@ -54,6 +55,10 @@
54 55
             <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
55 56
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
56 57
                       :span-method="merge"
58
+                      show-summary
59
+                      :summary-method="getTotal"
60
+                      max-height="600"
61
+
57 62
                       v-loading="detail_loading"
58 63
                       highlight-current-row>
59 64
 
@@ -79,7 +84,7 @@
79 84
                     </template>
80 85
                 </el-table-column>
81 86
 
82
-                <el-table-column align="center" prop="name" label="费用总额">
87
+                <el-table-column align="center" prop="total" label="费用总额">
83 88
                     <template slot-scope="scope">
84 89
                         <div>{{scope.row.total.toFixed(2)}}</div>
85 90
                     </template>
@@ -107,6 +112,8 @@
107 112
       return {
108 113
         detail_loading:false,
109 114
         tempArr: [],
115
+        pos:0,
116
+
110 117
         sameRowArr: [],
111 118
         keywords: '',
112 119
         tableData: [],
@@ -207,9 +214,17 @@
207 214
                   newObj['price'] = orders[b].order_info[c].pric
208 215
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
209 216
                     newObj['type'] = 1
210
-                    newObj['item_name'] = orders[b].order_info[c].advice.advice_name
217
+                    // newObj['item_name'] = orders[b].order_info[c].advice.advice_name
211 218
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
212 219
 
220
+                    if(orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
221
+                      newObj['item_name'] = orders[b].order_info[c].advice.advice_name + "( " + orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + "*" + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + "/" + orders[b].order_info[c].advice.drug.max_unit + " )"
222
+                    }else{
223
+
224
+                      newObj['item_name'] = ""
225
+                    }
226
+
227
+
213 228
                   }
214 229
                   if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
215 230
                     newObj['type'] = 2
@@ -217,8 +232,12 @@
217 232
 
218 233
                     if (orders[b].order_info[c].project.type == 2) {
219 234
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
235
+
236
+
220 237
                     } else if (orders[b].order_info[c].project.type == 3) {
221 238
                       newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + "( "+ orders[b].order_info[c].project.good_info.specification_name+" )"
239
+
240
+
222 241
                     }
223 242
                   }
224 243
                   obj.order_info.push(newObj)
@@ -226,7 +245,7 @@
226 245
               }
227 246
               tempPatientsTwo.push(obj)
228 247
             }
229
-            console.log(tempPatientsTwo)
248
+
230 249
 
231 250
             for (let d = 0; d < tempPatientsTwo.length; d++) {
232 251
               tempPatientsTwo[d]['new_order_info'] = []
@@ -283,7 +302,10 @@
283 302
             for (let i = 0; i < tempPatientsTwo.length; i++) {
284 303
               let total = 0
285 304
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
286
-                if (tempPatientsTwo[i].new_order_info[b].item_name.length != 0) {
305
+                let new_name = tempPatientsTwo[i].new_order_info[b].item_name
306
+                new_name=new_name.replace("( ","");
307
+                new_name=new_name.replace(" )","");
308
+                if (new_name.length != 0) {
287 309
                   total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
288 310
                 }
289 311
               }
@@ -293,7 +315,11 @@
293 315
             for (let i = 0; i < tempPatientsTwo.length; i++) {
294 316
               console.log(tempPatientsTwo[i].total)
295 317
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
296
-                if (tempPatientsTwo[i].new_order_info[b].item_name.length != 0) {
318
+                let new_name = tempPatientsTwo[i].new_order_info[b].item_name
319
+                new_name=new_name.replace("( ","");
320
+                new_name=new_name.replace(" )","");
321
+
322
+                if (new_name.length != 0) {
297 323
                   let obj = {
298 324
                     name: tempPatientsTwo[i].name,
299 325
                     patient_id: tempPatientsTwo[i].patient_id,
@@ -302,7 +328,12 @@
302 328
                     item_name: tempPatientsTwo[i].new_order_info[b].item_name,
303 329
                     item_id: tempPatientsTwo[i].new_order_info[b].item_id,
304 330
                     count: tempPatientsTwo[i].new_order_info[b].count,
305
-                    total: tempPatientsTwo[i].total
331
+
332
+                  }
333
+                  if(b == 0){
334
+                    obj['total'] =  tempPatientsTwo[i].total
335
+                  }else{
336
+                    obj['total'] = 0
306 337
                   }
307 338
                   this.tableData.push(obj)
308 339
                 }
@@ -442,6 +473,7 @@
442 473
             colspan: _col
443 474
           }
444 475
         }
476
+<<<<<<< HEAD
445 477
       }, export_detail() {
446 478
 
447 479
         let list = []
@@ -479,6 +511,34 @@
479 511
 
480 512
       }, formatJson(filterVal, jsonData) {
481 513
         return jsonData.map(v => filterVal.map(j => v[j]))
514
+=======
515
+      }, getTotal(param) {
516
+        const { columns, data } = param
517
+        const sums = []
518
+        columns.forEach((column, index) => {
519
+          if (index === 0) {
520
+            sums[index] = '合计'
521
+            return
522
+          }
523
+          console.log(data)
524
+          const values = data.map(item => Number(item[column.property]))
525
+          if (column.property === 'total') {
526
+            sums[index] = values.reduce((prev, curr) => {
527
+              const value = Number(curr)
528
+              if (!isNaN(value)) {
529
+                return prev + curr
530
+              } else {
531
+                return prev
532
+              }
533
+            }, 0)
534
+            sums[index] = sums[index].toFixed(2)
535
+          } else {
536
+            sums[index] = ''
537
+          }
538
+        })
539
+
540
+        return sums
541
+>>>>>>> 217aeb893378e63b858282bbb055562ea21ad31b
482 542
       }
483 543
     },
484 544
     created() {

+ 5 - 3
src/xt_pages/outpatientTool/components/gather.vue ファイルの表示

@@ -98,6 +98,7 @@
98 98
         tempArr: [],
99 99
         sameRowArr: [],
100 100
         keywords: '',
101
+        pos:0,
101 102
 
102 103
         tableData: [],
103 104
         chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
@@ -265,14 +266,14 @@
265 266
                   obj['patient_id'] = tempPatientsTwo[d].patient_id
266 267
                   this.tableData.push(obj)
267 268
 
268
-                  obj2['sum'] = price + price2 + price3
269
+                  obj2['sum'] = 0
269 270
                   obj2['price'] = price2
270 271
                   obj2['item_name'] = '药品'
271 272
                   obj2['name'] = tempPatientsTwo[d].name
272 273
                   obj2['patient_id'] = tempPatientsTwo[d].patient_id
273 274
                   this.tableData.push(obj2)
274 275
 
275
-                  obj3['sum'] = price + price2 + price3
276
+                  obj3['sum'] = 0
276 277
                   obj3['price'] = price3
277 278
                   obj3['item_name'] = '耗材'
278 279
                   obj3['name'] = tempPatientsTwo[d].name
@@ -452,6 +453,7 @@
452 453
             sums[index] = '合计'
453 454
             return
454 455
           }
456
+          console.log(data)
455 457
           const values = data.map(item => Number(item[column.property]))
456 458
           if (column.property === 'total') {
457 459
             sums[index] = values.reduce((prev, curr) => {
@@ -464,7 +466,7 @@
464 466
             }, 0)
465 467
             sums[index] = sums[index].toFixed(2)
466 468
           } else {
467
-            sums[index] = '--'
469
+            sums[index] = ''
468 470
           }
469 471
         })
470 472
 

+ 13 - 3
src/xt_pages/outpatientTool/components/settle.vue ファイルの表示

@@ -202,7 +202,15 @@
202 202
             for (let i = 0; i < data.length; i++) {
203 203
               for (let b = 0; b < data[i].orders.length; b++) {
204 204
                 let order = data[i].orders[b]
205
-                order['total'] = data[i].total
205
+
206
+                if(b == 0){
207
+                  order['total'] = data[i].total
208
+
209
+                }else{
210
+                  order['total'] = 0
211
+
212
+                }
213
+
206 214
                 this.tableData.push(order)
207 215
 
208 216
               }
@@ -282,7 +290,8 @@
282 290
             colspan: _col
283 291
           }
284 292
         }
285
-      }, getTotal(param) {
293
+      },
294
+      getTotal(param) {
286 295
         const { columns, data } = param
287 296
         const sums = []
288 297
         columns.forEach((column, index) => {
@@ -290,6 +299,7 @@
290 299
             sums[index] = '合计'
291 300
             return
292 301
           }
302
+          console.log(data)
293 303
           const values = data.map(item => Number(item[column.property]))
294 304
           if (column.property === 'total') {
295 305
             sums[index] = values.reduce((prev, curr) => {
@@ -302,7 +312,7 @@
302 312
             }, 0)
303 313
             sums[index] = sums[index].toFixed(2)
304 314
           } else {
305
-            sums[index] = '--'
315
+            sums[index] = ''
306 316
           }
307 317
         })
308 318