Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 years ago
parent
commit
9b4e5cc0c3

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderFortyOne.vue View File

1227
         this.check = response.data.data.check
1227
         this.check = response.data.data.check
1228
         this.xtdate = response.data.data.xtdate
1228
         this.xtdate = response.data.data.xtdate
1229
         this.predialysis = response.data.data.PredialysisEvaluation
1229
         this.predialysis = response.data.data.PredialysisEvaluation
1230
-         console.log("透前评估",this.predialysis)
1230
+         // console.log("透前评估",this.predialysis)
1231
         this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
1231
         this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
1232
           this.predialysis.blood_access_part_opera_id
1232
           this.predialysis.blood_access_part_opera_id
1233
         )
1233
         )

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

584
                         </td>
584
                         </td>
585
                         <td v-if="org_id != 9836">{{ monitor.dialysate_temperature ? monitor.dialysate_temperature : "" }}</td>
585
                         <td v-if="org_id != 9836">{{ monitor.dialysate_temperature ? monitor.dialysate_temperature : "" }}</td>
586
                         <td v-if="org_id == 9836">{{ monitor.temperature ? monitor.temperature : "" }}</td>
586
                         <td v-if="org_id == 9836">{{ monitor.temperature ? monitor.temperature : "" }}</td>
587
-                        <td>{{ monitor.sodium_concentration ? monitor.sodium_concentration : "" }}
587
+                        <td>{{ monitor.conductivity ? monitor.conductivity : "" }}
588
                         </td>
588
                         </td>
589
                         <td v-if="(dialysisOrder && monitor.operate_time > dialysisOrder.end_time) || (dialysisOrder && monitor.operate_time < dialysisOrder.start_time)">
589
                         <td v-if="(dialysisOrder && monitor.operate_time > dialysisOrder.end_time) || (dialysisOrder && monitor.operate_time < dialysisOrder.start_time)">
590
                           {{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}
590
                           {{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}
1266
         gaimingcheng_unit: '',
1266
         gaimingcheng_unit: '',
1267
         gaijiliang_unit: ''
1267
         gaijiliang_unit: ''
1268
       },
1268
       },
1269
-      org_id:0,
1269
+      org_id: 0
1270
     }
1270
     }
1271
   },
1271
   },
1272
   methods: {
1272
   methods: {
1273
-    checkData(){
1274
-      if(this.receiverTreatmentAccess.way == 0){
1273
+    checkData() {
1274
+      if (this.receiverTreatmentAccess.way == 0) {
1275
         this.$message.error('入科方式未填')
1275
         this.$message.error('入科方式未填')
1276
-      }else if(this.predialysis.symptom_before_dialysis == ""){
1276
+      } else if (this.predialysis.symptom_before_dialysis == '') {
1277
         this.$message.error('透前症状未填')
1277
         this.$message.error('透前症状未填')
1278
-      }else if(this.predialysis.temperature == ""){
1278
+      } else if (this.predialysis.temperature == '') {
1279
         this.$message.error('透前体温未填')
1279
         this.$message.error('透前体温未填')
1280
-      }else if(this.predialysis.pulse_frequency == ""){
1280
+      } else if (this.predialysis.pulse_frequency == '') {
1281
         this.$message.error('透前脉搏未填')
1281
         this.$message.error('透前脉搏未填')
1282
-      }else if(this.predialysis.breathing_rate == ""){
1282
+      } else if (this.predialysis.breathing_rate == '') {
1283
         this.$message.error('透前呼吸频率未填')
1283
         this.$message.error('透前呼吸频率未填')
1284
-      }else if(this.predialysis.systolic_blood_pressure == 0 || this.predialysis.diastolic_blood_pressure == 0){
1284
+      } else if (this.predialysis.systolic_blood_pressure == 0 || this.predialysis.diastolic_blood_pressure == 0) {
1285
         this.$message.error('透前血压未填完整')
1285
         this.$message.error('透前血压未填完整')
1286
-      }else if(this.predialysis.puncture_way == ''){
1286
+      } else if (this.predialysis.puncture_way == '') {
1287
         this.$message.error('穿刺方式未填')
1287
         this.$message.error('穿刺方式未填')
1288
-      }else if(this.predialysis.puncture_needle == ''){
1288
+      } else if (this.predialysis.puncture_needle == '') {
1289
         this.$message.error('穿刺针未填')
1289
         this.$message.error('穿刺针未填')
1290
-      }else if(this.predialysis.blood_access_part_id == '' && this.predialysis.blood_access_part_opera_name == ''){
1290
+      } else if (this.predialysis.blood_access_part_id == '' && this.predialysis.blood_access_part_opera_name == '') {
1291
         this.$message.error('血管通路未填')
1291
         this.$message.error('血管通路未填')
1292
-      }else if(this.predialysis.internal_fistula == ''){
1292
+      } else if (this.predialysis.internal_fistula == '') {
1293
         this.$message.error('透前内瘘未填')
1293
         this.$message.error('透前内瘘未填')
1294
-      }else if(this.predialysis.catheter == ''){
1294
+      } else if (this.predialysis.catheter == '') {
1295
         this.$message.error('透前导管未填')
1295
         this.$message.error('透前导管未填')
1296
-      }else if(this.prescription.mode_id == ""){
1296
+      } else if (this.prescription.mode_id == '') {
1297
         this.$message.error('透析方式未填')
1297
         this.$message.error('透析方式未填')
1298
-      }else if(this.prescription.displace_liqui_part == 0){
1298
+      } else if (this.prescription.displace_liqui_part == 0) {
1299
         this.$message.error('置换方式未填')
1299
         this.$message.error('置换方式未填')
1300
-      }else if(this.prescription.displace_liqui_value == 0){
1300
+      } else if (this.prescription.displace_liqui_value == 0) {
1301
         this.$message.error('置换量未填')
1301
         this.$message.error('置换量未填')
1302
-      }else if(this.prescription.blood_flow_volume == 0){
1302
+      } else if (this.prescription.blood_flow_volume == 0) {
1303
         this.$message.error('血流量未填')
1303
         this.$message.error('血流量未填')
1304
-      }else if(this.prescription.dialysis_duration_hour == 0 && this.prescription.dialysis_duration_minute == 0){
1304
+      } else if (this.prescription.dialysis_duration_hour == 0 && this.prescription.dialysis_duration_minute == 0) {
1305
         this.$message.error('透析时间未填')
1305
         this.$message.error('透析时间未填')
1306
-      }else if(this.prescription.dialyzer_perfusion_apparatus == "" && this.prescription.dialysis_dialyszers == ""){
1306
+      } else if (this.prescription.dialyzer_perfusion_apparatus == '' && this.prescription.dialysis_dialyszers == '') {
1307
         this.$message.error('透析器未填')
1307
         this.$message.error('透析器未填')
1308
-      }else if(this.prescription.dialysis_irrigation == ""){
1308
+      } else if (this.prescription.dialysis_irrigation == '') {
1309
         this.$message.error('灌流器未填')
1309
         this.$message.error('灌流器未填')
1310
-      }else if(this.prescription.plasma_separator == ""){
1310
+      } else if (this.prescription.plasma_separator == '') {
1311
         this.$message.error('血浆分离器未填')
1311
         this.$message.error('血浆分离器未填')
1312
-      }else if(this.prescription.bilirubin_adsorption_column == ""){
1312
+      } else if (this.prescription.bilirubin_adsorption_column == '') {
1313
         this.$message.error('胆红素吸附柱未填')
1313
         this.$message.error('胆红素吸附柱未填')
1314
-      }else if(this.predialysis.weight_before == 0){
1314
+      } else if (this.predialysis.weight_before == 0) {
1315
         this.$message.error('透前体重未填')
1315
         this.$message.error('透前体重未填')
1316
-      }else if(this.predialysis.dry_weight == 0){
1316
+      } else if (this.predialysis.dry_weight == 0) {
1317
         this.$message.error('干体重未填')
1317
         this.$message.error('干体重未填')
1318
-      }else if(this.prescription.target_ultrafiltration == 0){
1318
+      } else if (this.prescription.target_ultrafiltration == 0) {
1319
         this.$message.error('计划超滤量未填')
1319
         this.$message.error('计划超滤量未填')
1320
-      }else if(this.prescription.calcium == 0){
1320
+      } else if (this.prescription.calcium == 0) {
1321
         this.$message.error('钙未填')
1321
         this.$message.error('钙未填')
1322
-      }else if(this.prescription.sodium == 0){
1322
+      } else if (this.prescription.sodium == 0) {
1323
         this.$message.error('钠未填')
1323
         this.$message.error('钠未填')
1324
-      }else if(this.prescription.kalium == 0){
1324
+      } else if (this.prescription.kalium == 0) {
1325
         this.$message.error('钾未填')
1325
         this.$message.error('钾未填')
1326
-      }else if(this.prescription.bicarbonate == 0){
1326
+      } else if (this.prescription.bicarbonate == 0) {
1327
         this.$message.error('碳酸氢根未填')
1327
         this.$message.error('碳酸氢根未填')
1328
-      }else if(this.prescription.dialysate_flow == 0){
1328
+      } else if (this.prescription.dialysate_flow == 0) {
1329
         this.$message.error('透析液流量未填')
1329
         this.$message.error('透析液流量未填')
1330
-      }else if(this.prescription.anticoagulant == 0){
1330
+      } else if (this.prescription.anticoagulant == 0) {
1331
         this.$message.error('抗凝剂未填')
1331
         this.$message.error('抗凝剂未填')
1332
-      }else if(this.prescription.anticoagulant_gaimingcheng == "" && this.prescription.anticoagulant == 5){
1332
+      } else if (this.prescription.anticoagulant_gaimingcheng == '' && this.prescription.anticoagulant == 5) {
1333
         this.$message.error('钙名称未填')
1333
         this.$message.error('钙名称未填')
1334
-      }else if(this.prescription.anticoagulant_gaijiliang == "" && this.prescription.anticoagulant == 5){
1334
+      } else if (this.prescription.anticoagulant_gaijiliang == '' && this.prescription.anticoagulant == 5) {
1335
         this.$message.error('钙剂量未填')
1335
         this.$message.error('钙剂量未填')
1336
-      }else if(this.afterdialysis.temperature == 0){
1336
+      } else if (this.afterdialysis.temperature == 0) {
1337
         this.$message.error('透后体温未填')
1337
         this.$message.error('透后体温未填')
1338
-      }else if(this.afterdialysis.pulse_frequency == 0){
1338
+      } else if (this.afterdialysis.pulse_frequency == 0) {
1339
         this.$message.error('透后脉搏未填')
1339
         this.$message.error('透后脉搏未填')
1340
-      }else if(this.afterdialysis.breathing_rate == 0){
1340
+      } else if (this.afterdialysis.breathing_rate == 0) {
1341
         this.$message.error('透后呼吸频率未填')
1341
         this.$message.error('透后呼吸频率未填')
1342
-      }else if(this.afterdialysis.systolic_blood_pressure == 0 || this.afterdialysis.diastolic_blood_pressure == 0){
1342
+      } else if (this.afterdialysis.systolic_blood_pressure == 0 || this.afterdialysis.diastolic_blood_pressure == 0) {
1343
         this.$message.error('透后血压未填完整')
1343
         this.$message.error('透后血压未填完整')
1344
-      }else if(this.afterdialysis.actual_treatment_hour == 0 && this.afterdialysis.actual_treatment_minute == 0){
1344
+      } else if (this.afterdialysis.actual_treatment_hour == 0 && this.afterdialysis.actual_treatment_minute == 0) {
1345
         this.$message.error('实际治疗时间未填')
1345
         this.$message.error('实际治疗时间未填')
1346
-      }else if(this.afterdialysis.cruor == ""){
1346
+      } else if (this.afterdialysis.cruor == '') {
1347
         this.$message.error('透析器凝血未填')
1347
         this.$message.error('透析器凝血未填')
1348
-      }else if(this.afterdialysis.internal_fistula == ''){
1348
+      } else if (this.afterdialysis.internal_fistula == '') {
1349
         this.$message.error('透后内瘘未填')
1349
         this.$message.error('透后内瘘未填')
1350
-      }else if(this.afterdialysis.catheter == ''){
1350
+      } else if (this.afterdialysis.catheter == '') {
1351
         this.$message.error('透后导管未填')
1351
         this.$message.error('透后导管未填')
1352
-      }else if(this.afterdialysis.weight_after == 0){
1352
+      } else if (this.afterdialysis.weight_after == 0) {
1353
         this.$message.error('透后体重未填')
1353
         this.$message.error('透后体重未填')
1354
-      }else if(this.afterdialysis.weight_loss == 0){
1354
+      } else if (this.afterdialysis.weight_loss == 0) {
1355
         this.$message.error('透后体重减少未填')
1355
         this.$message.error('透后体重减少未填')
1356
-      }else if(this.afterdialysis.dialysis_intakes == 0){
1356
+      } else if (this.afterdialysis.dialysis_intakes == 0) {
1357
         this.$message.error('透析中入量未填')
1357
         this.$message.error('透析中入量未填')
1358
-      }else if(this.afterdialysis.actual_ultrafiltration == 0){
1358
+      } else if (this.afterdialysis.actual_ultrafiltration == 0) {
1359
         this.$message.error('实际超滤量未填')
1359
         this.$message.error('实际超滤量未填')
1360
-      }else if(this.summary.dialysis_summary == ""){
1360
+      } else if (this.summary.dialysis_summary == '') {
1361
         this.$message.error('透析小结未填')
1361
         this.$message.error('透析小结未填')
1362
-      }else if(this.dialysisOrder.puncture_nurse == 0){
1362
+      } else if (this.dialysisOrder.puncture_nurse == 0) {
1363
         this.$message.error('穿刺护士未填')
1363
         this.$message.error('穿刺护士未填')
1364
-      }else if(this.dialysisOrder.start_nurse == 0){
1364
+      } else if (this.dialysisOrder.start_nurse == 0) {
1365
         this.$message.error('治疗护士未填')
1365
         this.$message.error('治疗护士未填')
1366
-      }else if(this.dialysisOrder == null && this.check.creater == 0){
1366
+      } else if (this.dialysisOrder == null && this.check.creater == 0) {
1367
         this.$message.error('核对人员未填')
1367
         this.$message.error('核对人员未填')
1368
-      }else if(this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.modifier && this.check.creater == 0){
1368
+      } else if (this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.modifier && this.check.creater == 0) {
1369
         this.$message.error('核对人员未填')
1369
         this.$message.error('核对人员未填')
1370
-      }else if(this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.creater && this.check.modifier == 0){
1370
+      } else if (this.dialysisOrder != null && this.dialysisOrder.start_nurse == this.check.creater && this.check.modifier == 0) {
1371
         this.$message.error('核对人员未填')
1371
         this.$message.error('核对人员未填')
1372
-      }else if(this.dialysisOrder != null && this.dialysisOrder.start_nurse != this.check.creater && this.dialysisOrder.start_nurse != this.check.modifier && this.check.creater == 0){
1372
+      } else if (this.dialysisOrder != null && this.dialysisOrder.start_nurse != this.check.creater && this.dialysisOrder.start_nurse != this.check.modifier && this.check.creater == 0) {
1373
         this.$message.error('核对人员未填')
1373
         this.$message.error('核对人员未填')
1374
-      }else if(this.dialysisOrder.finish_nurse == 0){
1374
+      } else if (this.dialysisOrder.finish_nurse == 0) {
1375
         this.$message.error('下机护士未填')
1375
         this.$message.error('下机护士未填')
1376
-      }else if(this.prescription.creater == 0){
1376
+      } else if (this.prescription.creater == 0) {
1377
         this.$message.error('医生签名未填')
1377
         this.$message.error('医生签名未填')
1378
       }
1378
       }
1379
     },
1379
     },
1544
         this.check = response.data.data.check
1544
         this.check = response.data.data.check
1545
         this.xtdate = response.data.data.xtdate
1545
         this.xtdate = response.data.data.xtdate
1546
         this.predialysis = response.data.data.PredialysisEvaluation
1546
         this.predialysis = response.data.data.PredialysisEvaluation
1547
-        console.log("透前评估",this.predialysis)
1547
+        console.log('透前评估', this.predialysis)
1548
         this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
1548
         this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
1549
           this.predialysis.blood_access_part_opera_id
1549
           this.predialysis.blood_access_part_opera_id
1550
         )
1550
         )
1664
         }
1664
         }
1665
 
1665
 
1666
         this.advices = response.data.data.advices
1666
         this.advices = response.data.data.advices
1667
-        console.log("医嘱数据2222222222",this.advices)
1667
+        console.log('医嘱数据2222222222', this.advices)
1668
         this.monitors = response.data.data.monitors
1668
         this.monitors = response.data.data.monitors
1669
         this.summary = response.data.data.summary
1669
         this.summary = response.data.data.summary
1670
         this.org_template_info = response.data.data.org_template_info
1670
         this.org_template_info = response.data.data.org_template_info
1993
       'hemodialysis',
1993
       'hemodialysis',
1994
       'vascular_access_desc'
1994
       'vascular_access_desc'
1995
     )
1995
     )
1996
-     this.org_id = this.$store.getters.xt_user.org.id
1997
-     console.log("=====",this.org_id)
1996
+    this.org_id = this.$store.getters.xt_user.org.id
1997
+    console.log('=====', this.org_id)
1998
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1998
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1999
 
1999
 
2000
     var bloodAccessParOpera = getDataConfig(
2000
     var bloodAccessParOpera = getDataConfig(

+ 47 - 43
src/xt_pages/outpatientCharges/summary.vue View File

7
             <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
7
             <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
                 <div>
8
                 <div>
9
                     <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
9
                     <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
10
-                               <!--@click="Action">-->
11
-                        <!--导出-->
10
+                    <!--@click="Action">-->
11
+                    <!--导出-->
12
                     <!--</el-button>-->
12
                     <!--</el-button>-->
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
13
                     <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
                               @keyup.enter.native='searchAction'
14
                               @keyup.enter.native='searchAction'
434
           settle_type: row.settle_type,
434
           settle_type: row.settle_type,
435
           start_time: row.settle_start_time,
435
           start_time: row.settle_start_time,
436
           end_time: row.settle_end_time,
436
           end_time: row.settle_end_time,
437
-          balance_accounts_type:row.his_patient.balance_accounts_type
437
+          balance_accounts_type: row.his_patient.balance_accounts_type
438
         }
438
         }
439
         this.orderObj = obj
439
         this.orderObj = obj
440
 
440
 
478
               }
478
               }
479
 
479
 
480
               if (order.his_patient != null) {
480
               if (order.his_patient != null) {
481
-                if (order.his_patient.balance_accounts_type == 1) {
481
+                if (order.his_patient.balance_accounts_type == 2) {
482
                   balance_accounts = '自费'
482
                   balance_accounts = '自费'
483
                 }
483
                 }
484
 
484
 
485
-                if (order.his_patient.balance_accounts_type == 2) {
485
+                if (order.his_patient.balance_accounts_type == 1) {
486
                   balance_accounts = '医保'
486
                   balance_accounts = '医保'
487
                 }
487
                 }
488
               }
488
               }
532
 
532
 
533
               var hifmi_pay = 0.00
533
               var hifmi_pay = 0.00
534
 
534
 
535
-              if (order.setl_detail.length > 0) {
535
+              console.log(order.setl_detail)
536
+              if (order.setl_detail && order.setl_detail.length > 0) {
536
                 var jsonObj = JSON.parse(order.setl_detail)
537
                 var jsonObj = JSON.parse(order.setl_detail)
537
-                for (let i = 0; i < jsonObj.length; i++) {
538
-                  if (order.insutype == '310') {
539
-                    if (jsonObj[i].fund_pay_type == '310300') {
540
-                      hifmi_pay = jsonObj[i].fund_payamt
541
-                    }
542
-
543
-                  } else if (order.insutype == '390') {
544
-                    if (order.fund_pay_type == '390200') {
545
-                      hifmi_pay = jsonObj[i].fund_payamt
538
+                console.log(jsonObj)
539
+                if (jsonObj != null) {
540
+
541
+                  for (let i = 0; i < jsonObj.length; i++) {
542
+                    if (order.insutype == '310') {
543
+                      if (jsonObj[i].fund_pay_type == '310300') {
544
+                        hifmi_pay = jsonObj[i].fund_payamt
545
+                      }
546
+                    } else if (order.insutype == '390') {
547
+                      if (order.fund_pay_type == '390200') {
548
+                        hifmi_pay = jsonObj[i].fund_payamt
549
+                      }
546
                     }
550
                     }
547
                   }
551
                   }
548
                 }
552
                 }
549
               }
553
               }
550
               var hifmi_pay = 0.00
554
               var hifmi_pay = 0.00
551
 
555
 
552
-              if (order.setl_detail.length > 0) {
556
+              console.log(order.setl_detail)
557
+              if (order.setl_detail && order.setl_detail.length > 0) {
553
                 var jsonObj = JSON.parse(order.setl_detail)
558
                 var jsonObj = JSON.parse(order.setl_detail)
554
-                for (let i = 0; i < jsonObj.length; i++) {
555
-                  if (order.insutype == '310') {
556
-                    if (jsonObj[i].fund_pay_type == '310300') {
557
-                      hifmi_pay = jsonObj[i].fund_payamt
559
+                if (jsonObj != null) {
560
+                  for (let i = 0; i < jsonObj.length; i++) {
561
+                    if (order.insutype == '310') {
562
+                      if (jsonObj[i].fund_pay_type == '310300') {
563
+                        hifmi_pay = jsonObj[i].fund_payamt
564
+                      }
558
                     }
565
                     }
559
-                  }
560
-                  if (order.insutype == '390') {
561
-                    if (jsonObj[i].fund_pay_type == '390200') {
562
-                      hifmi_pay = jsonObj[i].fund_payamt
566
+                    if (order.insutype == '390') {
567
+                      if (jsonObj[i].fund_pay_type == '390200') {
568
+                        hifmi_pay = jsonObj[i].fund_payamt
569
+                      }
563
                     }
570
                     }
564
                   }
571
                   }
565
                 }
572
                 }
636
         this.page = 1
643
         this.page = 1
637
         this.keywords = ''
644
         this.keywords = ''
638
         this.getHisOrderList()
645
         this.getHisOrderList()
639
-      },Action(){
646
+      }, Action() {
640
         getAllOrders().then(response => {
647
         getAllOrders().then(response => {
641
           if (response.data.state == 0) {
648
           if (response.data.state == 0) {
642
             this.$message.error(response.data.msg)
649
             this.$message.error(response.data.msg)
646
             let list = []
653
             let list = []
647
             for (let i = 0; i < response.data.data.order.length; i++) {
654
             for (let i = 0; i < response.data.data.order.length; i++) {
648
 
655
 
649
-
650
               var hifmi_pay = 0.00
656
               var hifmi_pay = 0.00
651
               for (let b = 0; b < order.order_info.length; b++) {
657
               for (let b = 0; b < order.order_info.length; b++) {
652
-                let item_name = ""
653
-                let item_code = ""
654
-                let price = ""
655
-                let unit = ""
656
-                let spec = ""
657
-                let time = ""
658
-                let name = ""
659
-                let selfpay_prop = ""
660
-                if(order.order_info[b].advice.id == 0 && order.order_info[b].project.id > 0){
658
+                let item_name = ''
659
+                let item_code = ''
660
+                let price = ''
661
+                let unit = ''
662
+                let spec = ''
663
+                let time = ''
664
+                let name = ''
665
+                let selfpay_prop = ''
666
+                if (order.order_info[b].advice.id == 0 && order.order_info[b].project.id > 0) {
661
                   item_name = order.order_info[b].project.project.project_name
667
                   item_name = order.order_info[b].project.project.project_name
662
-                  item_code =  order.order_info[b].project.project.medical_code
668
+                  item_code = order.order_info[b].project.project.medical_code
663
                   price = order.order_info[b].pric
669
                   price = order.order_info[b].pric
664
                   unit = order.order_info[b].project.project.unit
670
                   unit = order.order_info[b].project.project.unit
665
-                }else if(order.order_info[b].advice.id > 0 && order.order_info[b].project.id == 0){
671
+                } else if (order.order_info[b].advice.id > 0 && order.order_info[b].project.id == 0) {
666
                   item_name = order.order_info[b].advice.advice_name
672
                   item_name = order.order_info[b].advice.advice_name
667
-                  item_code =  order.order_info[b].advice.drug.medical_insurance_number
673
+                  item_code = order.order_info[b].advice.drug.medical_insurance_number
668
                   price = order.order_info[b].pric
674
                   price = order.order_info[b].pric
669
                   unit = order.order_info[b].advice.prescribing_number_unit
675
                   unit = order.order_info[b].advice.prescribing_number_unit
670
 
676
 
671
-
672
                 }
677
                 }
673
                 selfpay_prop = order.order_info[b].selfpay_prop
678
                 selfpay_prop = order.order_info[b].selfpay_prop
674
 
679
 
675
                 let obj = {
680
                 let obj = {
676
                   '项目名称': item_name,
681
                   '项目名称': item_name,
677
-                  '项目编码': "",
682
+                  '项目编码': '',
678
                   '医保编码': item_code,
683
                   '医保编码': item_code,
679
                   '零售价': price,
684
                   '零售价': price,
680
                   '单位': unit,
685
                   '单位': unit,
681
-                  '规格': "",
686
+                  '规格': '',
682
                   '收费时间': time,
687
                   '收费时间': time,
683
                   '报销比例': selfpay_prop,
688
                   '报销比例': selfpay_prop,
684
-                  '患者名称': name,
689
+                  '患者名称': name
685
                 }
690
                 }
686
 
691
 
687
                 list.push(obj)
692
                 list.push(obj)
701
           }
706
           }
702
         })
707
         })
703
 
708
 
704
-
705
       },
709
       },
706
       searchAction() {
710
       searchAction() {
707
         this.page = 1
711
         this.page = 1

+ 132 - 132
src/xt_pages/outpatientTool/components/detail.vue View File

3
         <div class="position">
3
         <div class="position">
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
         </div> -->
5
         </div> -->
6
-        <div>
7
-            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
-                <div>
9
-                    <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
10
-                    <!--@click="Action">-->
11
-                    <!--导出-->
12
-                    <!--</el-button>-->
13
-                    <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
-                              @keyup.enter.native='searchAction'
15
-                              placeholder="请输入患者姓名"
16
-                              class="filter-item"/>
17
-                    <el-select size="small" v-model="item_type" placeholder="请选择"
18
-                               style="width:150px;margin-left:10px;" @change="changeItem">
19
-                        <el-option
20
-                                label="全部"
21
-                                value="0">
22
-                        </el-option>
23
-                        <el-option
24
-                                v-for="item,index in items"
25
-                                :key="index"
26
-                                :label="item.name"
27
-                                :value="item.id">
28
-                        </el-option>
29
-                    </el-select>
30
-                    <el-date-picker
31
-                            v-model="chargeDate"
32
-                            type="daterange"
33
-                            value-format="yyyy-MM-dd"
34
-                            range-separator="至"
35
-                            start-placeholder="开始日期"
36
-                            @change="changeDate"
37
-                            end-placeholder="结束日期">
38
-                    </el-date-picker>
39
-                    <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
-                    <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
41
-                </div>
42
-                <div>
43
-                    <!-- <el-popover
44
-                      placement="bottom"
45
-                      width="210"
46
-                      trigger="click">
47
-                      <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
48
-                      <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
49
-                      <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
50
-
51
-                    </el-popover> -->
52
-                    <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
53
-                </div>
6
+    <div>
7
+        <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+            <div>
9
+                <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
10
+                <!--@click="Action">-->
11
+                <!--导出-->
12
+                <!--</el-button>-->
13
+                <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
+                          @keyup.enter.native='searchAction'
15
+                          placeholder="请输入患者姓名"
16
+                          class="filter-item"/>
17
+                <el-select size="small" v-model="item_type" placeholder="请选择"
18
+                           style="width:150px;margin-left:10px;" @change="changeItem">
19
+                    <el-option
20
+                            label="全部"
21
+                            value="0">
22
+                    </el-option>
23
+                    <el-option
24
+                            v-for="item,index in items"
25
+                            :key="index"
26
+                            :label="item.name"
27
+                            :value="item.id">
28
+                    </el-option>
29
+                </el-select>
30
+                <el-date-picker
31
+                        v-model="chargeDate"
32
+                        type="daterange"
33
+                        value-format="yyyy-MM-dd"
34
+                        range-separator="至"
35
+                        start-placeholder="开始日期"
36
+                        @change="changeDate"
37
+                        end-placeholder="结束日期">
38
+                </el-date-picker>
39
+                <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
+                <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
41
+            </div>
42
+            <div>
43
+                <!-- <el-popover
44
+                  placement="bottom"
45
+                  width="210"
46
+                  trigger="click">
47
+                  <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
48
+                  <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
49
+                  <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
50
+
51
+                </el-popover> -->
52
+                <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
54
             </div>
53
             </div>
55
-            <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
56
-                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
57
-                      :span-method="merge"
58
-                      show-summary
59
-                      :summary-method="getTotal"
60
-                      max-height="600"
61
-
62
-                      v-loading="detail_loading"
63
-                      highlight-current-row>
64
-
65
-                <el-table-column align="center" prop="name" label="患者名字">
66
-                    <template slot-scope="scope">{{ scope.row.name }}</template>
67
-                </el-table-column>
68
-                <!--<el-table-column align="center" prop="name" label="患者类型">-->
69
-                <!--<template slot-scope="scope"></template>-->
70
-                <!--</el-table-column>-->
71
-
72
-                <el-table-column align="center" prop="name" label="项目名称">
73
-                    <template slot-scope="scope">{{scope.row.item_name}}</template>
74
-                </el-table-column>
75
-                <el-table-column align="center" prop="name" label="数量">
76
-                    <template slot-scope="scope">{{scope.row.count}}</template>
77
-                </el-table-column>
78
-                <el-table-column align="center" prop="name" label="单价">
79
-                    <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
80
-                </el-table-column>
81
-                <el-table-column align="center" prop="name" label="费用">
82
-                    <template slot-scope="scope">
83
-                        <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
84
-                    </template>
85
-                </el-table-column>
86
-
87
-                <el-table-column align="center" prop="total" label="费用总额">
88
-                    <template slot-scope="scope">
89
-                        <div>{{scope.row.total.toFixed(2)}}</div>
90
-                    </template>
91
-                </el-table-column>
92
-
93
-            </el-table>
94
         </div>
54
         </div>
55
+        <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
56
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
57
+                  :span-method="merge"
58
+                  show-summary
59
+                  :summary-method="getTotal"
60
+                  max-height="600"
61
+
62
+                  v-loading="detail_loading"
63
+                  highlight-current-row>
64
+
65
+            <el-table-column align="center" prop="name" label="患者名字">
66
+                <template slot-scope="scope">{{ scope.row.name }}</template>
67
+            </el-table-column>
68
+            <!--<el-table-column align="center" prop="name" label="患者类型">-->
69
+            <!--<template slot-scope="scope"></template>-->
70
+            <!--</el-table-column>-->
71
+
72
+            <el-table-column align="center" prop="name" label="项目名称">
73
+                <template slot-scope="scope">{{scope.row.item_name}}</template>
74
+            </el-table-column>
75
+            <el-table-column align="center" prop="name" label="数量">
76
+                <template slot-scope="scope">{{scope.row.count}}</template>
77
+            </el-table-column>
78
+            <el-table-column align="center" prop="name" label="单价">
79
+                <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
80
+            </el-table-column>
81
+            <el-table-column align="center" prop="name" label="费用">
82
+                <template slot-scope="scope">
83
+                    <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
84
+                </template>
85
+            </el-table-column>
86
+
87
+            <el-table-column align="center" prop="total" label="费用总额">
88
+                <template slot-scope="scope">
89
+                    <div>{{scope.row.total.toFixed(2)}}</div>
90
+                </template>
91
+            </el-table-column>
92
+
93
+        </el-table>
94
+    </div>
95
 
95
 
96
     <!-- </div> -->
96
     <!-- </div> -->
97
 </template>
97
 </template>
110
     },
110
     },
111
     data() {
111
     data() {
112
       return {
112
       return {
113
-        detail_loading:false,
113
+        detail_loading: false,
114
         tempArr: [],
114
         tempArr: [],
115
-        pos:0,
115
+        pos: 0,
116
 
116
 
117
         sameRowArr: [],
117
         sameRowArr: [],
118
         keywords: '',
118
         keywords: '',
122
         items: [
122
         items: [
123
           { id: 1, name: '药品' },
123
           { id: 1, name: '药品' },
124
           { id: 2, name: '项目' },
124
           { id: 2, name: '项目' },
125
-          { id: 3, name: '耗材' },
125
+          { id: 3, name: '耗材' }
126
 
126
 
127
         ]
127
         ]
128
 
128
 
217
                     // newObj['item_name'] = orders[b].order_info[c].advice.advice_name
217
                     // newObj['item_name'] = orders[b].order_info[c].advice.advice_name
218
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
218
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
219
 
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{
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
 
223
 
224
-                      newObj['item_name'] = ""
224
+                      newObj['item_name'] = ''
225
                     }
225
                     }
226
 
226
 
227
-
228
                   }
227
                   }
229
                   if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
228
                   if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
230
                     newObj['type'] = 2
229
                     newObj['type'] = 2
233
                     if (orders[b].order_info[c].project.type == 2) {
232
                     if (orders[b].order_info[c].project.type == 2) {
234
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
233
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
235
 
234
 
236
-
237
                     } else if (orders[b].order_info[c].project.type == 3) {
235
                     } else if (orders[b].order_info[c].project.type == 3) {
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
-
236
+                      newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + '( ' + orders[b].order_info[c].project.good_info.specification_name + ' )'
240
 
237
 
241
                     }
238
                     }
242
                   }
239
                   }
246
               tempPatientsTwo.push(obj)
243
               tempPatientsTwo.push(obj)
247
             }
244
             }
248
 
245
 
249
-
250
             for (let d = 0; d < tempPatientsTwo.length; d++) {
246
             for (let d = 0; d < tempPatientsTwo.length; d++) {
251
               tempPatientsTwo[d]['new_order_info'] = []
247
               tempPatientsTwo[d]['new_order_info'] = []
252
               let project = []
248
               let project = []
269
                     count = count + tempPatientsTwo[d].order_info[a].count
265
                     count = count + tempPatientsTwo[d].order_info[a].count
270
                   }
266
                   }
271
                 }
267
                 }
268
+
269
+
270
+
272
                 obj['price'] = project[i].price
271
                 obj['price'] = project[i].price
273
                 obj['type'] = project[i].type
272
                 obj['type'] = project[i].type
274
                 obj['item_name'] = project[i].item_name
273
                 obj['item_name'] = project[i].item_name
287
                     count = count + tempPatientsTwo[d].order_info[a].count
286
                     count = count + tempPatientsTwo[d].order_info[a].count
288
                   }
287
                   }
289
                 }
288
                 }
289
+
290
                 obj['price'] = advice[i].price
290
                 obj['price'] = advice[i].price
291
                 obj['type'] = advice[i].type
291
                 obj['type'] = advice[i].type
292
                 obj['item_name'] = advice[i].item_name
292
                 obj['item_name'] = advice[i].item_name
303
               let total = 0
303
               let total = 0
304
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
304
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
305
                 let new_name = tempPatientsTwo[i].new_order_info[b].item_name
305
                 let new_name = tempPatientsTwo[i].new_order_info[b].item_name
306
-                new_name=new_name.replace("( ","");
307
-                new_name=new_name.replace(" )","");
306
+                new_name = new_name.replace('( ', '')
307
+                new_name = new_name.replace(' )', '')
308
                 if (new_name.length != 0) {
308
                 if (new_name.length != 0) {
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))
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))
310
                 }
310
                 }
311
               }
311
               }
312
               tempPatientsTwo[i]['total'] = total
312
               tempPatientsTwo[i]['total'] = total
313
             }
313
             }
314
-            console.log('tempPatientsTwo',tempPatientsTwo)
314
+            console.log('tempPatientsTwo', tempPatientsTwo)
315
             for (let i = 0; i < tempPatientsTwo.length; i++) {
315
             for (let i = 0; i < tempPatientsTwo.length; i++) {
316
               // console.log(111,tempPatientsTwo[i].total)
316
               // console.log(111,tempPatientsTwo[i].total)
317
-              if(tempPatientsTwo[i].new_order_info.length > 0){
317
+              if (tempPatientsTwo[i].new_order_info.length > 0) {
318
 
318
 
319
+                for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
320
+                  let new_name = tempPatientsTwo[i].new_order_info[b].item_name
321
+                  console.log('2 ' + new_name)
319
 
322
 
320
-              for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
321
-                let new_name = tempPatientsTwo[i].new_order_info[b].item_name
322
-                new_name=new_name.replace("( ","");
323
-                new_name=new_name.replace(" )","");
323
+                  new_name = new_name.replace('( ', '')
324
+                  new_name = new_name.replace(' )', '')
324
 
325
 
325
-                if (new_name.length != 0) {
326
-                  let obj = {
327
-                    name: tempPatientsTwo[i].name,
328
-                    patient_id: tempPatientsTwo[i].patient_id,
329
-                    price: tempPatientsTwo[i].new_order_info[b].price,
330
-                    type: tempPatientsTwo[i].new_order_info[b].type,
331
-                    item_name: tempPatientsTwo[i].new_order_info[b].item_name,
332
-                    item_id: tempPatientsTwo[i].new_order_info[b].item_id,
333
-                    count: tempPatientsTwo[i].new_order_info[b].count,
326
+                  if (new_name.length != 0) {
327
+                    let obj = {
328
+                      name: tempPatientsTwo[i].name,
329
+                      patient_id: tempPatientsTwo[i].patient_id,
330
+                      price: tempPatientsTwo[i].new_order_info[b].price,
331
+                      type: tempPatientsTwo[i].new_order_info[b].type,
332
+                      item_name: tempPatientsTwo[i].new_order_info[b].item_name,
333
+                      item_id: tempPatientsTwo[i].new_order_info[b].item_id,
334
+                      count: tempPatientsTwo[i].new_order_info[b].count
334
 
335
 
336
+                    }
337
+
338
+                    // if(b == 0){
339
+                    obj['total'] = tempPatientsTwo[i].total
340
+                    // }else{
341
+                    //   obj['total'] = 0
342
+                    // }
343
+                    this.tableData.push(obj)
335
                   }
344
                   }
336
 
345
 
337
-                  // if(b == 0){
338
-                    obj['total'] =  tempPatientsTwo[i].total
339
-                  // }else{
340
-                  //   obj['total'] = 0
341
-                  // }
342
-                  this.tableData.push(obj)
343
                 }
346
                 }
344
-
345
-              }
346
               }
347
               }
347
             }
348
             }
348
             this.handleSpanTempArr()
349
             this.handleSpanTempArr()
487
           let item_name = order.item_name
488
           let item_name = order.item_name
488
           let count = order.count
489
           let count = order.count
489
           let price = order.price.toFixed(2)
490
           let price = order.price.toFixed(2)
490
-          let pay_sumamt = (order.price.toFixed(2)*order.count).toFixed(2)
491
+          let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
491
           let total = order.total.toFixed(2)
492
           let total = order.total.toFixed(2)
492
 
493
 
493
-
494
           let obj = {
494
           let obj = {
495
             '患者姓名': name,
495
             '患者姓名': name,
496
             '项目名称': item_name,
496
             '项目名称': item_name,
497
             '数量': count,
497
             '数量': count,
498
             '单价': price,
498
             '单价': price,
499
             '费用': pay_sumamt,
499
             '费用': pay_sumamt,
500
-            '费用总额':total,
500
+            '费用总额': total
501
           }
501
           }
502
           list.push(obj)
502
           list.push(obj)
503
         }
503
         }
504
         import('@/vendor/Export2Excel').then(excel => {
504
         import('@/vendor/Export2Excel').then(excel => {
505
-          const tHeader = [ '患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
506
-          const filterVal = [ '患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
505
+          const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
506
+          const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
507
           const data = this.formatJson(filterVal, list)
507
           const data = this.formatJson(filterVal, list)
508
           excel.export_json_to_excel1({
508
           excel.export_json_to_excel1({
509
             header: tHeader,
509
             header: tHeader,
510
             data,
510
             data,
511
             filename: '明细',
511
             filename: '明细',
512
-            ref:this.$refs['table'].$el
512
+            ref: this.$refs['table'].$el
513
           })
513
           })
514
         })
514
         })
515
 
515
 
537
             // sums[index] = sums[index].toFixed(2)
537
             // sums[index] = sums[index].toFixed(2)
538
             let num = 0
538
             let num = 0
539
             data.map(item => {
539
             data.map(item => {
540
-              num += item.price.toFixed(2)*item.count
540
+              num += item.price.toFixed(2) * item.count
541
             })
541
             })
542
             sums[index] = num.toFixed(2)
542
             sums[index] = num.toFixed(2)
543
           } else {
543
           } else {
546
         })
546
         })
547
 
547
 
548
         return sums
548
         return sums
549
-      },
549
+      }
550
     },
550
     },
551
     created() {
551
     created() {
552
       this.getSummaryDetailList()
552
       this.getSummaryDetailList()