|
@@ -161,20 +161,22 @@
|
161
|
161
|
<template slot-scope="scope">
|
162
|
162
|
<span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span>
|
163
|
163
|
<span v-else>
|
164
|
|
- <span v-if="scope.row.price >0">
|
165
|
|
- <span v-if="scope.row.count >= scope.row.min_number">
|
166
|
|
- {{((scope.row.price * scope.row.count)/scope.row.min_number).toFixed(2)}}
|
|
164
|
+ <!-- <span v-if="scope.row.price >0">
|
|
165
|
+ <span v-if="scope.row.count_unit == scope.row.min_unit">
|
|
166
|
+ {{(scope.row.price * scope.row.count).toFixed(2)}}
|
167
|
167
|
</span>
|
168
|
|
- <span v-else>{{(scope.row.price * scope.row.count).toFixed(2)}}</span>
|
|
168
|
+ <span v-if="scope.row.count_unit == scope.row.max_unit">{{(scope.row.price * scope.row.count * scope.row.min_number).toFixed(2)}}</span>
|
169
|
169
|
</span>
|
170
|
170
|
<span v-if="scope.row.price == 0">
|
171
|
|
- <span v-if="scope.row.count >=scope.row.min_number">
|
172
|
|
- {{((getPrice(scope.row.drug_id)* scope.row.count)/scope.row.min_number).toFixed(2)}}
|
|
171
|
+ <span v-if="scope.row.count_unit == scope.row.min_unit">
|
|
172
|
+ {{((getPrice(scope.row.drug_id)* scope.row.count)).toFixed(2)}}
|
173
|
173
|
</span>
|
174
|
|
- <span v-else>{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
|
175
|
|
- </span>
|
|
174
|
+ <span v-if="scope.row.count_unit == scope.row.max_unit">
|
|
175
|
+ {{(getPrice(scope.row.drug_id)* scope.row.count * scope.row.min_number).toFixed(2)}}
|
|
176
|
+ </span>
|
|
177
|
+ </span> -->
|
|
178
|
+ {{scope.row.total_price}}
|
176
|
179
|
</span>
|
177
|
|
- <!-- {{scope.row.total_price}} -->
|
178
|
180
|
</template>
|
179
|
181
|
</el-table-column>
|
180
|
182
|
</el-table>
|
|
@@ -433,13 +435,31 @@ export default {
|
433
|
435
|
total_price += order[i].count * order[i].last_price
|
434
|
436
|
}else{
|
435
|
437
|
if(order[i].price > 0){
|
436
|
|
- order[i].total_price = order[i].count * order[i].price
|
437
|
|
- total_price += order[i].count * order[i].price
|
|
438
|
+ if(order[i].count_unit == order[i].min_unit){
|
|
439
|
+ order[i].total_price = order[i].count * order[i].price
|
|
440
|
+ total_price += order[i].total_price
|
|
441
|
+ }
|
|
442
|
+ if(order[i].count_unit == order[i].max_unit){
|
|
443
|
+ order[i].total_price += order[i].count * order[i].price * order[i].min_number
|
|
444
|
+ total_price += order[i].total_price
|
|
445
|
+ }
|
|
446
|
+
|
438
|
447
|
}
|
439
|
448
|
if(order[i].price ==0 ){
|
440
|
|
- order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
|
441
|
|
- total_price += order[i].count * this.getPrice(order[i].drug_id)
|
442
|
|
- order[i].price = this.getPrice(order[i].drug_id)
|
|
449
|
+ if(order[i].count_unit == order[i].min_unit){
|
|
450
|
+ order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
|
|
451
|
+ // total_price += order[i].count * this.getPrice(order[i].drug_id)
|
|
452
|
+ total_price +=order[i].total_price
|
|
453
|
+ order[i].price = this.getPrice(order[i].drug_id)
|
|
454
|
+ }
|
|
455
|
+
|
|
456
|
+ if(order[i].count_unit == order[i].max_unit){
|
|
457
|
+ order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) * order[i].min_number
|
|
458
|
+ //total_price += order[i].count * this.getPrice(order[i].drug_id)
|
|
459
|
+ order[i].total_price+=order[i].total_price
|
|
460
|
+ order[i].price = this.getPrice(order[i].drug_id)
|
|
461
|
+ }
|
|
462
|
+
|
443
|
463
|
}
|
444
|
464
|
|
445
|
465
|
}
|
|
@@ -458,7 +478,7 @@ export default {
|
458
|
478
|
order[i].total_price = order[i].total_price.toFixed(2)
|
459
|
479
|
}
|
460
|
480
|
|
461
|
|
-
|
|
481
|
+ console.log("233223322323322332232323",order)
|
462
|
482
|
this.tableData = order
|
463
|
483
|
let objInfo = {}
|
464
|
484
|
order.forEach((item,index)=>{
|
|
@@ -524,7 +544,7 @@ export default {
|
524
|
544
|
for(let i=0;i<list.length;i++){
|
525
|
545
|
list[i].total_price = list[i].count * list[i].price
|
526
|
546
|
}
|
527
|
|
-
|
|
547
|
+
|
528
|
548
|
this.tableList = list
|
529
|
549
|
var total = response.data.data.total
|
530
|
550
|
this.total = total
|
|
@@ -611,7 +631,7 @@ export default {
|
611
|
631
|
this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit + "/" + this.tableData[i].max_unit
|
612
|
632
|
this.tableData[i].time = this.getTime(this.tableData[i].ctime)
|
613
|
633
|
this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
|
614
|
|
- if(this.org_id == 9671 || this.org_id == 9919){
|
|
634
|
+ if(this.org_id == 9919){
|
615
|
635
|
this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
|
616
|
636
|
if(this.tableData[i].count >=this.tableData[i].min_number){
|
617
|
637
|
this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
|
|
@@ -621,12 +641,12 @@ export default {
|
621
|
641
|
|
622
|
642
|
}else{
|
623
|
643
|
this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
|
624
|
|
- if(this.tableData[i].count >=this.tableData[i].min_number){
|
625
|
|
- this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)/this.tableData[i].min_number
|
626
|
|
- }else{
|
627
|
|
- this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
|
|
644
|
+ if(this.tableData[i].count_unit == this.tableData[i].min_unit){
|
|
645
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
|
|
646
|
+ }
|
|
647
|
+ if(this.tableData[i].count_unit == this.tableData[i].max_unit){
|
|
648
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
|
628
|
649
|
}
|
629
|
|
-
|
630
|
650
|
}
|
631
|
651
|
}
|
632
|
652
|
}
|
|
@@ -678,7 +698,7 @@ export default {
|
678
|
698
|
var list = response.data.data.list
|
679
|
699
|
|
680
|
700
|
let objInfo = {}
|
681
|
|
- if(this.org_id == 9671 || this.org_id == 9919){
|
|
701
|
+ if(this.org_id == 9919){
|
682
|
702
|
list.forEach((item,index)=>{
|
683
|
703
|
let { drug_id } = item
|
684
|
704
|
if(!objInfo[drug_id]){
|