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
         <template slot-scope="scope">
31
         <template slot-scope="scope">
32
           <div style="display:flex;align-items:center;">
32
           <div style="display:flex;align-items:center;">
33
             <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
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
           </div>
35
           </div>
36
         </template>
36
         </template>
37
       </el-table-column>
37
       </el-table-column>

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

237
           { path: false, name: '门诊收费' },
237
           { path: false, name: '门诊收费' },
238
           { path: false, name: '门诊收费管理' }
238
           { path: false, name: '门诊收费管理' }
239
         ],
239
         ],
240
+        current_index:0,
240
         cal_one:'',
241
         cal_one:'',
241
         cal_two:'',
242
         cal_two:'',
242
         cal_three:'',
243
         cal_three:'',
464
           this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
465
           this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
465
         } else if (index == 4) {
466
         } else if (index == 4) {
466
 
467
 
468
+          if(this.hisPatientInfo.id == 0){
469
+            this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
470
+            return
471
+          }
472
+
467
           let params = {
473
           let params = {
468
             'id': this.patientInfo.id,
474
             'id': this.patientInfo.id,
469
             'record_time': this.record_date
475
             'record_time': this.record_date
473
             if (response.data.state == 0) {
479
             if (response.data.state == 0) {
474
               this.$message.error(response.data.msg)
480
               this.$message.error(response.data.msg)
475
               this.loadingtwo = false
481
               this.loadingtwo = false
476
-
477
               return false
482
               return false
478
-
479
             } else {
483
             } else {
484
+              this.state = '已收费'
485
+              this.$message({ message: '收费成功', type: 'success' })
480
               this.loadingtwo = false
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
         } else if (index == 5) {
493
         } else if (index == 5) {
488
           let params = {
494
           let params = {
489
             'order_id': this.order.id,
495
             'order_id': this.order.id,
493
             if (response.data.state == 0) {
499
             if (response.data.state == 0) {
494
               this.$message.error(response.data.msg)
500
               this.$message.error(response.data.msg)
495
               this.loadingtwo = false
501
               this.loadingtwo = false
496
-
497
               return false
502
               return false
498
-
499
             } else {
503
             } else {
504
+              this.$message({ message: '退费成功', type: 'success' })
500
               this.loadingtwo = false
505
               this.loadingtwo = false
501
 
506
 
502
             }
507
             }
503
           })
508
           })
504
 
509
 
505
-          this.$message({ message: '退费成功', type: 'success' })
506
         } else if (index == 6) {
510
         } else if (index == 6) {
507
 
511
 
508
           if (this.patientInfo.id == 0) {
512
           if (this.patientInfo.id == 0) {
522
               return false
526
               return false
523
 
527
 
524
             } else {
528
             } else {
529
+              this.$message({ message: '挂号成功', type: 'success' })
530
+
525
               this.loadingone = false
531
               this.loadingone = false
526
               var his_info = response.data.data.his_info
532
               var his_info = response.data.data.his_info
527
               this.hisPatientInfo = his_info
533
               this.hisPatientInfo = his_info
631
             this.cal_two = two_count
637
             this.cal_two = two_count
632
             this.cal_three = three_count
638
             this.cal_three = three_count
633
 
639
 
640
+            this.current_index = 0
634
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
641
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
635
             this.getPatientInformation(this.patientTableData[0].patients.id,"")
642
             this.getPatientInformation(this.patientTableData[0].patients.id,"")
636
 
643
 
646
         console.log('val', val)
653
         console.log('val', val)
647
         this.getPatientInformation(val.patients.id, val.info.batch_number)
654
         this.getPatientInformation(val.patients.id, val.info.batch_number)
648
         this.patient_id = val.patients.id
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
             </el-option>
104
             </el-option>
105
           </el-select>
105
           </el-select>
106
           <span>当前处方总价:</span>
106
           <span>当前处方总价:</span>
107
-          <span style="color:red;"></span>元
107
+          <span style="color:red;">{{curTotal}}</span>元
108
           <span style="margin-left:10px;">总价:</span>
108
           <span style="margin-left:10px;">总价:</span>
109
           <span style="color:red;">{{ getTotal() }}</span>元
109
           <span style="color:red;">{{ getTotal() }}</span>元
110
           <span>{{order_status}}</span>
110
           <span>{{order_status}}</span>
343
 
343
 
344
         ],
344
         ],
345
         department:[],
345
         department:[],
346
-        sick:[]
346
+        sick:[],
347
+        curTotal:0,
347
       }
348
       }
348
     },
349
     },
349
     methods: {
350
     methods: {
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
       getTotal() {
393
       getTotal() {
367
         var total = 0
394
         var total = 0
477
           }
504
           }
478
 
505
 
479
         }
506
         }
507
+
508
+        this.total = 0
509
+        this.total = this.getTotalOne()
480
       },
510
       },
481
       clearData() {
511
       clearData() {
482
         this.curPrescriptions = []
512
         this.curPrescriptions = []
526
           this.order_status = '已退费'
556
           this.order_status = '已退费'
527
         }
557
         }
528
 
558
 
559
+        this.total = 0
560
+        this.total = this.getTotalOne()
529
         // console.log(this.$refs)
561
         // console.log(this.$refs)
530
         // this.$nextTick(() => {
562
         // this.$nextTick(() => {
531
         //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
563
         //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
855
                   remark: '',
887
                   remark: '',
856
                   prescribing_number: temp[b].prescribing_number,
888
                   prescribing_number: temp[b].prescribing_number,
857
                   single_dose_unit: temp[b].min_unit,
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
                   min_unit: temp[b].min_unit,
891
                   min_unit: temp[b].min_unit,
860
                   medical_insurance_number: temp[b].medical_insurance_number
892
                   medical_insurance_number: temp[b].medical_insurance_number
861
 
893
 

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

43
         <template slot-scope="scope">
43
         <template slot-scope="scope">
44
           <div style="display:flex;align-items:center;">
44
           <div style="display:flex;align-items:center;">
45
             <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
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
           </div>
47
           </div>
48
         </template>
48
         </template>
49
       </el-table-column>
49
       </el-table-column>