|
|
@@ -13,12 +13,13 @@
|
|
|
<view class="space-view ex-table">
|
|
|
<block>
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
- <t-tr header><t-th>供货商</t-th><t-th>数量</t-th><t-th>金额</t-th><t-th>操作</t-th></t-tr>
|
|
|
- <view v-for="(item, index) in profile" :key="index">
|
|
|
+ <t-tr header><t-th>供货商</t-th><t-th>订单数</t-th><t-th>金额</t-th><t-th>操作</t-th></t-tr>
|
|
|
+ <view style="font-size:30upx;margin:10upx 0 10upx 10upx;">总金额:{{ totalActPrice }}</view>
|
|
|
+ <view v-for="(item, index) in storageData" :key="index">
|
|
|
<t-tr>
|
|
|
- <t-td><view>{{item.ghsName}}</view></t-td>
|
|
|
+ <t-td><view>{{item.name}}</view></t-td>
|
|
|
<t-td><view>{{parseFloat(item.num)}}</view></t-td>
|
|
|
- <t-td><view>{{parseFloat(item.amount)}}</view></t-td>
|
|
|
+ <t-td><view>{{parseFloat(item.actPrice)}}</view></t-td>
|
|
|
<t-td></t-td>
|
|
|
</t-tr>
|
|
|
</view>
|
|
|
@@ -27,7 +28,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view style="font-size:30upx;margin-top:30upx;margin-left:30upx;">以上数据有略微误差,仅供参考</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -42,7 +42,9 @@ import {mapActions, mapGetters} from "vuex";
|
|
|
export default {
|
|
|
components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
|
|
|
mixins: [list],
|
|
|
- computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["getDictionariesInfo","getLoginInfo"])
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
isShow:false,
|
|
|
@@ -60,9 +62,9 @@ export default {
|
|
|
],
|
|
|
dataList: [],
|
|
|
params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
|
|
|
- profile:[],
|
|
|
storageData:[],
|
|
|
searchContent:'',
|
|
|
+ totalActPrice:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -82,23 +84,6 @@ export default {
|
|
|
this.searchContent = e;
|
|
|
this.filterStat()
|
|
|
},
|
|
|
- filterStat(){
|
|
|
- let that = this
|
|
|
- if(this.searchContent.length > 0){
|
|
|
- that.profile = [];
|
|
|
- that.storageData.forEach(obj => {
|
|
|
- let hasName = obj.name && obj.name.indexOf(this.searchContent) >= 0;
|
|
|
- let elePy = (obj.py && obj.py.toLocaleUpperCase()) || "";
|
|
|
- let hasPy = elePy.indexOf(this.searchContent.toLocaleUpperCase()) >= 0;
|
|
|
- if (hasName || hasPy) {
|
|
|
- that.profile.push(obj)
|
|
|
- }
|
|
|
- })
|
|
|
- }else{
|
|
|
- that.profile = that.storageData
|
|
|
- }
|
|
|
- },
|
|
|
- //选择分店
|
|
|
selectShopFn(val){
|
|
|
this.params.shopId = val.id;
|
|
|
this.init();
|
|
|
@@ -118,11 +103,11 @@ export default {
|
|
|
uni.hideLoading()
|
|
|
if (!this.$util.isEmpty(res.data.list)) {
|
|
|
that.storageData = res.data.list
|
|
|
- that.filterStat()
|
|
|
+ that.totalActPrice = res.data.totalActPrice?parseFloat(res.data.totalActPrice):0
|
|
|
}else{
|
|
|
- that.storageData=[]
|
|
|
+ that.storageData = []
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|