|
@@ -210,7 +210,7 @@
|
210
|
210
|
{{getStorehouseName(scope.row.storehouse_id)}}
|
211
|
211
|
</template>
|
212
|
212
|
</el-table-column>
|
213
|
|
- <el-table-column label="出货价" align="center">
|
|
213
|
+ <el-table-column label="出库价" align="center">
|
214
|
214
|
<template slot-scope="scope">
|
215
|
215
|
<span v-if="org_id == 9919">{{scope.row.last_price}} </span>
|
216
|
216
|
<span v-else>
|
|
@@ -591,7 +591,11 @@ export default {
|
591
|
591
|
if(this.org_id == 9919){
|
592
|
592
|
order[i].total_price = order[i].count * order[i].last_price
|
593
|
593
|
total_price += order[i].count * order[i].last_price
|
594
|
|
- }else{
|
|
594
|
+ }else if(this.org_id == 0){
|
|
595
|
+ order[i].total_price = order[i].total_price
|
|
596
|
+ }else if(this.org_id == 10721){
|
|
597
|
+ order[i].total_price = order[i].total_price
|
|
598
|
+ } else{
|
595
|
599
|
if(order[i].price > 0){
|
596
|
600
|
order[i].total_price = 0
|
597
|
601
|
if(order[i].count_unit == order[i].min_unit && order[i].max_unit!=order[i].min_unit){
|
|
@@ -601,7 +605,7 @@ export default {
|
601
|
605
|
if(order[i].is_sys == 0){
|
602
|
606
|
order[i].total_price += order[i].count * order[i].price
|
603
|
607
|
}else{
|
604
|
|
-
|
|
608
|
+
|
605
|
609
|
order[i].total_price += order[i].count * order[i].price * order[i].min_number
|
606
|
610
|
}
|
607
|
611
|
}
|
|
@@ -752,8 +756,7 @@ export default {
|
752
|
756
|
},
|
753
|
757
|
|
754
|
758
|
exportList(){
|
755
|
|
-
|
756
|
|
-
|
|
759
|
+
|
757
|
760
|
|
758
|
761
|
for(let i=0;i<this.tablePrint.length;i++){
|
759
|
762
|
this.tablePrint[i].index = i+1
|
|
@@ -770,7 +773,12 @@ export default {
|
770
|
773
|
this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
|
771
|
774
|
this.tablePrint[i].total = this.getCountSenvenOne(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)/this.tablePrint[i].min_number
|
772
|
775
|
|
773
|
|
- }else{
|
|
776
|
+ }else if(this.org_id == 10721){
|
|
777
|
+ this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
|
|
778
|
+ this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
|
|
779
|
+ this.tablePrint[i].total_price = ((parseInt((this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child))))*this.tablePrint[i].price).toFixed(2)
|
|
780
|
+ this.tablePrint[i].total = this.getTotalPriceTwo(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
|
|
781
|
+ } else{
|
774
|
782
|
this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
|
775
|
783
|
this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
|
776
|
784
|
this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
|
|
@@ -785,7 +793,7 @@ export default {
|
785
|
793
|
|
786
|
794
|
console.log("wowowoowowowowo",this.tablePrint)
|
787
|
795
|
|
788
|
|
-
|
|
796
|
+
|
789
|
797
|
|
790
|
798
|
import('@/vendor/Export2Excel').then(excel => {
|
791
|
799
|
const tHeader = ['序号','药品名称', '规格型号','生产厂商','进销商', '单位','数量','单价','总价','出库时间','备注']
|
|
@@ -866,8 +874,15 @@ export default {
|
866
|
874
|
this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
|
867
|
875
|
}
|
868
|
876
|
|
869
|
|
- }else{
|
|
877
|
+ }else if(this.org_id == 10721){
|
|
878
|
+ this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
|
|
879
|
+ this.tableData[i].total_price = this.tableData[i].total_price
|
|
880
|
+ }else if(this.org_id == 0){
|
870
|
881
|
this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
|
|
882
|
+ this.tableData[i].total_price = this.tableData[i].total_price
|
|
883
|
+ } else{
|
|
884
|
+ this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
|
|
885
|
+
|
871
|
886
|
if(this.tableData[i].count_unit == this.tableData[i].min_unit && this.tableData[i].max_unit!=this.tableData[i].min_unit){
|
872
|
887
|
this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
|
873
|
888
|
}
|
|
@@ -1184,6 +1199,7 @@ export default {
|
1184
|
1199
|
}
|
1185
|
1200
|
return str + min_str
|
1186
|
1201
|
},
|
|
1202
|
+
|
1187
|
1203
|
getTotalPrice(arr,max_unit,min_number,min_price){
|
1188
|
1204
|
console.log("arrwoowowow",arr)
|
1189
|
1205
|
|
|
@@ -1217,6 +1233,14 @@ export default {
|
1217
|
1233
|
|
1218
|
1234
|
return total*min_price
|
1219
|
1235
|
},
|
|
1236
|
+ getTotalPriceTwo(arr,max_unit,min_number,min_price){
|
|
1237
|
+ var total = 0
|
|
1238
|
+ for(let j=0;j<arr.length;j++){
|
|
1239
|
+ total +=arr[j].count
|
|
1240
|
+ }
|
|
1241
|
+
|
|
1242
|
+ return total*min_price
|
|
1243
|
+ },
|
1220
|
1244
|
getCountSix(drug_id,val){
|
1221
|
1245
|
|
1222
|
1246
|
var count = 0
|