|
@@ -468,36 +468,38 @@
|
468
|
468
|
// this.$message.error('该处方已经结算或记账,无法删除')
|
469
|
469
|
//
|
470
|
470
|
// }
|
471
|
|
- if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
472
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
473
|
|
- console.log(1)
|
474
|
|
- scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
|
475
|
|
- } else {
|
476
|
|
- console.log(12)
|
477
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
|
478
|
|
- }
|
479
|
|
- } else {
|
480
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
481
|
|
- console.log(123)
|
482
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
|
|
471
|
+ if(this.$store.getters.xt_user.org_id != 10206) {
|
|
472
|
+ if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
|
473
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
474
|
+ console.log(1)
|
|
475
|
+ scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
|
|
476
|
+ } else {
|
|
477
|
+ console.log(12)
|
|
478
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
|
|
479
|
+ }
|
483
|
480
|
} else {
|
484
|
|
- console.log(1234)
|
485
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
481
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
482
|
+ console.log(123)
|
|
483
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
|
|
484
|
+ } else {
|
|
485
|
+ console.log(1234)
|
|
486
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
487
|
+ }
|
486
|
488
|
}
|
487
|
|
- }
|
488
|
|
- if (scope.row.prescribing_number == 0) {
|
489
|
|
- scope.row.prescribing_number = 1
|
490
|
|
- }
|
491
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
492
|
|
- // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
493
|
|
- if (scope.row.prescribing_number > scope.row.drug.sum_count) {
|
494
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
|
489
|
+ if (scope.row.prescribing_number == 0) {
|
|
490
|
+ scope.row.prescribing_number = 1
|
495
|
491
|
}
|
496
|
|
- } else {
|
497
|
|
- if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
|
498
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
|
492
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
|
493
|
+ // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
|
494
|
+ if (scope.row.prescribing_number > scope.row.drug.sum_count) {
|
|
495
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
496
|
+ }
|
|
497
|
+ } else {
|
|
498
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
|
|
499
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
500
|
+ }
|
|
501
|
+ // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
499
|
502
|
}
|
500
|
|
- // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
501
|
503
|
}
|
502
|
504
|
|
503
|
505
|
},
|
|
@@ -506,42 +508,44 @@
|
506
|
508
|
this.$message.error('该处方包含已发药的药品,无法修改')
|
507
|
509
|
return
|
508
|
510
|
}
|
509
|
|
- if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
510
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
511
|
|
- console.log(1)
|
512
|
|
- scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
|
|
511
|
+ if(this.$store.getters.xt_user.org_id != 10206) {
|
|
512
|
+ if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
|
|
513
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
514
|
+ console.log(1)
|
|
515
|
+ scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
|
|
516
|
+ } else {
|
|
517
|
+ console.log(12)
|
|
518
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
|
|
519
|
+ }
|
513
|
520
|
} else {
|
514
|
|
- console.log(12)
|
515
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
|
|
521
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
|
522
|
+ console.log(123)
|
|
523
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
|
|
524
|
+ } else {
|
|
525
|
+ console.log(1234)
|
|
526
|
+ scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
527
|
+ }
|
|
528
|
+ }
|
|
529
|
+ if (scope.row.prescribing_number == 0) {
|
|
530
|
+ scope.row.prescribing_number = 1
|
516
|
531
|
}
|
517
|
|
- } else {
|
518
|
532
|
if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
519
|
|
- console.log(123)
|
520
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
|
|
533
|
+ // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
|
534
|
+ if (scope.row.drug.is_user != 1) {
|
|
535
|
+ if (scope.row.prescribing_number > scope.row.drug.sum_count && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
|
536
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
537
|
+ }
|
|
538
|
+ }
|
|
539
|
+
|
521
|
540
|
} else {
|
522
|
|
- console.log(1234)
|
523
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
|
524
|
|
- }
|
525
|
|
- }
|
526
|
|
- if (scope.row.prescribing_number == 0) {
|
527
|
|
- scope.row.prescribing_number = 1
|
528
|
|
- }
|
529
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
|
530
|
|
- // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
531
|
|
- if(scope.row.drug.is_user!=1){
|
532
|
|
- if (scope.row.prescribing_number > scope.row.drug.sum_count && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
533
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
534
|
|
- }
|
535
|
|
- }
|
|
541
|
+ if (scope.row.drug.is_user != 1) {
|
|
542
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
|
543
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
544
|
+ }
|
|
545
|
+ }
|
536
|
546
|
|
537
|
|
- } else {
|
538
|
|
- if(scope.row.drug.is_user!=1){
|
539
|
|
- if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
540
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
541
|
|
- }
|
|
547
|
+ // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
542
|
548
|
}
|
543
|
|
-
|
544
|
|
- // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
545
|
549
|
}
|
546
|
550
|
|
547
|
551
|
},
|
|
@@ -633,22 +637,23 @@
|
633
|
637
|
// this.$message.error(scope.row.drug_name + '库存不足')
|
634
|
638
|
// }
|
635
|
639
|
// }
|
|
640
|
+ if(this.$store.getters.xt_user.org_id != 10206) {
|
636
|
641
|
|
637
|
|
-
|
638
|
|
- if (scope.row.prescribing_number_unit == scope.row.drug.min_unit && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
639
|
|
- if(scope.row.drug.is_user!=1){
|
640
|
|
- if (parseInt(scope.row.prescribing_number) > scope.row.drug.sum_count) {
|
641
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
|
642
|
+ if (scope.row.prescribing_number_unit == scope.row.drug.min_unit && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
|
643
|
+ if (scope.row.drug.is_user != 1) {
|
|
644
|
+ if (parseInt(scope.row.prescribing_number) > scope.row.drug.sum_count) {
|
|
645
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
646
|
+ }
|
642
|
647
|
}
|
643
|
|
- }
|
644
|
648
|
|
645
|
|
- } else {
|
646
|
|
- if(scope.row.drug.is_user!=1 && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0){
|
647
|
|
- if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
|
648
|
|
- this.$message.error(scope.row.drug_name + '库存不足')
|
|
649
|
+ } else {
|
|
650
|
+ if (scope.row.drug.is_user != 1 && this.$store.getters.xt_user.org_id != 10206 && this.$store.getters.xt_user.org_id != 0) {
|
|
651
|
+ if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
|
|
652
|
+ this.$message.error(scope.row.drug_name + '库存不足')
|
|
653
|
+ }
|
649
|
654
|
}
|
650
|
|
- }
|
651
|
655
|
|
|
656
|
+ }
|
652
|
657
|
}
|
653
|
658
|
},
|
654
|
659
|
getProjectSingleDose(scope) {
|