|
@@ -136,15 +136,25 @@
|
136
|
136
|
</el-table-column>
|
137
|
137
|
<el-table-column label="数量" align="center">
|
138
|
138
|
<template slot-scope="scope">
|
139
|
|
- {{scope.row.count}}
|
|
139
|
+ {{scope.row.count}}
|
140
|
140
|
</template>
|
141
|
141
|
</el-table-column>
|
142
|
142
|
<el-table-column label="总价" align="center">
|
143
|
143
|
<template slot-scope="scope">
|
144
|
144
|
<span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span>
|
145
|
145
|
<span v-else>
|
146
|
|
- <span v-if="scope.row.price >0">{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
|
147
|
|
- <span v-if="scope.row.price == 0">{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
|
|
146
|
+ <span v-if="scope.row.price >0">
|
|
147
|
+ <span v-if="scope.row.count >= scope.row.min_number">
|
|
148
|
+ {{((scope.row.last_price * scope.row.count)/scope.row.min_number).toFixed(2)}}
|
|
149
|
+ </span>
|
|
150
|
+ <span v-else>{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
|
|
151
|
+ </span>
|
|
152
|
+ <span v-if="scope.row.price == 0">
|
|
153
|
+ <span v-if="scope.row.count >=scope.row.min_number">
|
|
154
|
+ {{((getPrice(scope.row.drug_id)* scope.row.count)/scope.row.min_number).toFixed(2)}}
|
|
155
|
+ </span>
|
|
156
|
+ <span v-else>{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
|
|
157
|
+ </span>
|
148
|
158
|
</span>
|
149
|
159
|
<!-- {{scope.row.total_price}} -->
|
150
|
160
|
</template>
|
|
@@ -562,17 +572,35 @@ export default {
|
562
|
572
|
for(let i=0;i<this.tableData.length;i++){
|
563
|
573
|
if(this.tableData[i].is_total == 0){
|
564
|
574
|
this.tableData[i].index = i+1
|
565
|
|
-
|
566
|
|
- this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
|
|
575
|
+ if(this.tableData[i].drug_type == 1){
|
|
576
|
+ this.tableData[i].drugtype = "西药"
|
|
577
|
+ }
|
|
578
|
+ if(this.tableData[i].drug_type == 2){
|
|
579
|
+ this.tableData[i].drugtype = "草药"
|
|
580
|
+ }
|
|
581
|
+ if(this.tableData[i].drug_type == 3){
|
|
582
|
+ this.tableData[i].drugtype = "成药"
|
|
583
|
+ }
|
|
584
|
+ // this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
|
567
|
585
|
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
|
568
|
586
|
this.tableData[i].time = this.getTime(this.tableData[i].ctime)
|
569
|
587
|
this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
|
570
|
588
|
if(this.org_id == 9671 || this.org_id == 9919){
|
571
|
589
|
this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
|
572
|
|
- this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
|
|
590
|
+ if(this.tableData[i].count >=this.tableData[i].min_number){
|
|
591
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
|
|
592
|
+ }else{
|
|
593
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
|
|
594
|
+ }
|
|
595
|
+
|
573
|
596
|
}else{
|
574
|
597
|
this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
|
575
|
|
- this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
|
|
598
|
+ if(this.tableData[i].count >=this.tableData[i].min_number){
|
|
599
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)/this.tableData[i].min_number
|
|
600
|
+ }else{
|
|
601
|
+ this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
|
|
602
|
+ }
|
|
603
|
+
|
576
|
604
|
}
|
577
|
605
|
}
|
578
|
606
|
}
|