Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
6785f9d119

+ 1 - 1
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

@@ -31,7 +31,7 @@
31 31
         <template slot-scope="scope">
32 32
           <div style="display:flex;align-items:center;">
33 33
             <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
34
-            <div>{{scope.row.min_unit}}</div>
34
+            <div>{{scope.row.prescribing_number_unit}}</div>
35 35
           </div>
36 36
         </template>
37 37
       </el-table-column>

+ 23 - 8
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -237,6 +237,7 @@
237 237
           { path: false, name: '门诊收费' },
238 238
           { path: false, name: '门诊收费管理' }
239 239
         ],
240
+        current_index:0,
240 241
         cal_one:'',
241 242
         cal_two:'',
242 243
         cal_three:'',
@@ -464,6 +465,11 @@
464 465
           this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
465 466
         } else if (index == 4) {
466 467
 
468
+          if(this.hisPatientInfo.id == 0){
469
+            this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
470
+            return
471
+          }
472
+
467 473
           let params = {
468 474
             'id': this.patientInfo.id,
469 475
             'record_time': this.record_date
@@ -473,17 +479,17 @@
473 479
             if (response.data.state == 0) {
474 480
               this.$message.error(response.data.msg)
475 481
               this.loadingtwo = false
476
-
477 482
               return false
478
-
479 483
             } else {
484
+              this.state = '已收费'
485
+              this.$message({ message: '收费成功', type: 'success' })
480 486
               this.loadingtwo = false
481
-
487
+              this.cal_one  =  this.cal_one-1
488
+              this.cal_two = this.cal_two + 1
489
+              this.patientTableData.splice(this.current_index,1)
482 490
             }
483 491
           })
484 492
 
485
-          this.state = '已收费'
486
-          this.$message({ message: '收费成功', type: 'success' })
487 493
         } else if (index == 5) {
488 494
           let params = {
489 495
             'order_id': this.order.id,
@@ -493,16 +499,14 @@
493 499
             if (response.data.state == 0) {
494 500
               this.$message.error(response.data.msg)
495 501
               this.loadingtwo = false
496
-
497 502
               return false
498
-
499 503
             } else {
504
+              this.$message({ message: '退费成功', type: 'success' })
500 505
               this.loadingtwo = false
501 506
 
502 507
             }
503 508
           })
504 509
 
505
-          this.$message({ message: '退费成功', type: 'success' })
506 510
         } else if (index == 6) {
507 511
 
508 512
           if (this.patientInfo.id == 0) {
@@ -522,6 +526,8 @@
522 526
               return false
523 527
 
524 528
             } else {
529
+              this.$message({ message: '挂号成功', type: 'success' })
530
+
525 531
               this.loadingone = false
526 532
               var his_info = response.data.data.his_info
527 533
               this.hisPatientInfo = his_info
@@ -631,6 +637,7 @@
631 637
             this.cal_two = two_count
632 638
             this.cal_three = three_count
633 639
 
640
+            this.current_index = 0
634 641
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
635 642
             this.getPatientInformation(this.patientTableData[0].patients.id,"")
636 643
 
@@ -646,6 +653,14 @@
646 653
         console.log('val', val)
647 654
         this.getPatientInformation(val.patients.id, val.info.batch_number)
648 655
         this.patient_id = val.patients.id
656
+
657
+        for (let i =0; i < this.patientTableData.length; i++){
658
+          if(this.patientTableData[i].patients.id == val.patients.id){
659
+            this.current_index = i
660
+          }
661
+
662
+        }
663
+
649 664
       },
650 665
 
651 666
       //获取患者的基本信息

+ 35 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -104,7 +104,7 @@
104 104
             </el-option>
105 105
           </el-select>
106 106
           <span>当前处方总价:</span>
107
-          <span style="color:red;"></span>元
107
+          <span style="color:red;">{{curTotal}}</span>元
108 108
           <span style="margin-left:10px;">总价:</span>
109 109
           <span style="color:red;">{{ getTotal() }}</span>元
110 110
           <span>{{order_status}}</span>
@@ -343,7 +343,8 @@
343 343
 
344 344
         ],
345 345
         department:[],
346
-        sick:[]
346
+        sick:[],
347
+        curTotal:0,
347 348
       }
348 349
     },
349 350
     methods: {
@@ -362,6 +363,32 @@
362 363
         }
363 364
 
364 365
 
366
+      },getTotalOne() {
367
+        var total = 0
368
+        if (this.curPrescriptions.type == 1) {
369
+          if (this.curPrescriptions.advices != null) {
370
+            for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
371
+              console.log(this.curPrescriptions.advices[a].retail_price)
372
+              console.log(this.curPrescriptions.advices[a].prescribing_number)
373
+
374
+              total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
375
+            }
376
+          }
377
+          return total
378
+
379
+        } else {
380
+          var total = 0
381
+          if (this.curPrescriptions.project != null) {
382
+            for (let b = 0; b < this.curPrescriptions.project.length; b++) {
383
+              console.log(this.curPrescriptions.project[b].price)
384
+              console.log(this.curPrescriptions.project[b].total)
385
+              total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
386
+            }
387
+          }
388
+          return total
389
+
390
+        }
391
+
365 392
       },
366 393
       getTotal() {
367 394
         var total = 0
@@ -477,6 +504,9 @@
477 504
           }
478 505
 
479 506
         }
507
+
508
+        this.total = 0
509
+        this.total = this.getTotalOne()
480 510
       },
481 511
       clearData() {
482 512
         this.curPrescriptions = []
@@ -526,6 +556,8 @@
526 556
           this.order_status = '已退费'
527 557
         }
528 558
 
559
+        this.total = 0
560
+        this.total = this.getTotalOne()
529 561
         // console.log(this.$refs)
530 562
         // this.$nextTick(() => {
531 563
         //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
@@ -855,7 +887,7 @@
855 887
                   remark: '',
856 888
                   prescribing_number: temp[b].prescribing_number,
857 889
                   single_dose_unit: temp[b].min_unit,
858
-                  prescribing_number_unit: temp[b].min_unit,
890
+                  prescribing_number_unit: temp[b].max_unit,
859 891
                   min_unit: temp[b].min_unit,
860 892
                   medical_insurance_number: temp[b].medical_insurance_number
861 893
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

@@ -43,7 +43,7 @@
43 43
         <template slot-scope="scope">
44 44
           <div style="display:flex;align-items:center;">
45 45
             <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
46
-            <div> {{scope.row.min_unit}}</div>
46
+            <div> {{scope.row.prescribing_number_unit}}</div>
47 47
           </div>
48 48
         </template>
49 49
       </el-table-column>