|
@@ -641,6 +641,51 @@ export default {
|
641
|
641
|
}
|
642
|
642
|
return manufacturer_name
|
643
|
643
|
},
|
|
644
|
+ getEndOverPrice(val,val3,val1,val2,val4){
|
|
645
|
+ var total_price = 0
|
|
646
|
+ var total_price_one = 0
|
|
647
|
+ var total_price_two = 0
|
|
648
|
+ var total_price_three = 0
|
|
649
|
+ var total_price_four =0
|
|
650
|
+ var all_price = 0
|
|
651
|
+ if(val!=null && val.length >0){
|
|
652
|
+ for(let i=0;i<val.length;i++){
|
|
653
|
+ total_price +=val[i].count * val[i].buy_price
|
|
654
|
+ }
|
|
655
|
+ }
|
|
656
|
+ if(val1!=null && val1.length > 0){
|
|
657
|
+ for(let i=0;i<val1.length;i++){
|
|
658
|
+ total_price_one +=val1[i].count * val1[i].buy_price
|
|
659
|
+ }
|
|
660
|
+ }
|
|
661
|
+ if(val3!=null && val3.length > 0){
|
|
662
|
+ for(let i=0;i<val3.length;i++){
|
|
663
|
+ total_price_three +=val3[i].count * val3[i].buy_price
|
|
664
|
+ }
|
|
665
|
+ }
|
|
666
|
+ if(val2!=null && val2.length > 0){
|
|
667
|
+ for(let i=0;i<val2.length;i++){
|
|
668
|
+ total_price_two +=val2[i].count * val2[i].buy_price
|
|
669
|
+ }
|
|
670
|
+ }
|
|
671
|
+ if(val4!=null && val4.length > 0){
|
|
672
|
+ for(let i=0;i<val4.length;i++){
|
|
673
|
+ total_price_four +=val4[i].count * val4[i].buy_price
|
|
674
|
+ }
|
|
675
|
+ }
|
|
676
|
+ console.log("total_price",total_price)
|
|
677
|
+ console.log("total_price_three",total_price_three)
|
|
678
|
+ console.log("total_price_two",total_price_two)
|
|
679
|
+ console.log("total_price_one",total_price_one)
|
|
680
|
+ console.log("total_price_four",total_price_four)
|
|
681
|
+ all_price = total_price- total_price_three +total_price_one - total_price_two + total_price_four
|
|
682
|
+ console.log("arrll_price",all_price)
|
|
683
|
+ if(all_price >0){
|
|
684
|
+ return all_price.toFixed(2)
|
|
685
|
+ }else{
|
|
686
|
+ return 0
|
|
687
|
+ }
|
|
688
|
+ },
|
644
|
689
|
},
|
645
|
690
|
created(){
|
646
|
691
|
this.org_id = this.$store.getters.xt_user.org_id
|