|
@@ -430,24 +430,26 @@
|
430
|
430
|
|
431
|
431
|
},
|
432
|
432
|
getPrescribingNumberUnit(scope){
|
433
|
|
- if(scope.row.drug.min_unit == scope.row.single_dose_unit){
|
434
|
|
- if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
435
|
|
- scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
|
436
|
|
- }else{
|
437
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
|
438
|
|
- }
|
439
|
|
- }else{
|
440
|
|
- if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
441
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
|
442
|
|
- }else{
|
443
|
|
- scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
|
444
|
|
- }
|
445
|
|
- }
|
446
|
|
- if(scope.row.prescribing_number == 0){
|
447
|
|
- scope.row.prescribing_number = 1
|
448
|
|
- }
|
|
433
|
+
|
|
434
|
+ // console.log('scope',scope)
|
|
435
|
+ // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
|
|
436
|
+ // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
437
|
+ // scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
|
|
438
|
+ // }else{
|
|
439
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
|
|
440
|
+ // }
|
|
441
|
+ // }else{
|
|
442
|
+ // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
|
443
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
|
|
444
|
+ // }else{
|
|
445
|
+ // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
|
|
446
|
+ // }
|
|
447
|
+ // }
|
|
448
|
+ // if(scope.row.prescribing_number == 0){
|
|
449
|
+ // scope.row.prescribing_number = 1
|
|
450
|
+ // }
|
449
|
451
|
if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
|
450
|
|
- scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
|
|
452
|
+ scope.row.retail_price = scope.row.drug.min_price
|
451
|
453
|
if(scope.row.prescribing_number > scope.row.drug.total){
|
452
|
454
|
this.$message.error(scope.row.drug_name + '库存不足')
|
453
|
455
|
}
|
|
@@ -455,7 +457,7 @@
|
455
|
457
|
if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
|
456
|
458
|
this.$message.error(scope.row.drug_name + '库存不足')
|
457
|
459
|
}
|
458
|
|
- scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
|
|
460
|
+ scope.row.retail_price = scope.row.drug.retail_price
|
459
|
461
|
}
|
460
|
462
|
},
|
461
|
463
|
changePrescribingNumber(scope){
|