app.vue 1.12 KB
<template>
	<com-tab :rows="tab.rows" :active.sync="tab.active"></com-tab>
	<template v-if="tab.active==0">
		<uc-sale :sale-data="sale"></uc-sale>
	</template>
	<template v-if="tab.active==1">
		<uc-refund :refund-data="refund"></uc-refund>
	</template>
</template>
<script>
	import tab from '../../../../components/tab/index';
	import ucRefund from './refundGoods';
	import ucSale from './saleGoods';

	export default {
		components: {
		    comTab: tab,
		    ucSale:ucSale,
		    ucRefund:ucRefund
		},
		data(){
			return {
				tab:{
					rows:[{name:"销售统计"}, {name:"退货统计"}],
					active:0
				},
				sale:{
					cards:[
						{name:"有效订单的商品件数",value:"1240",name1:"环比",value1:"↑  1.8%"},
						{name:"有效订单的商品金额(元)",value:"89004.00",name1:"环比",value1:"↑  1.8%"}
					]
				},
				refund:{
					cards:[
						{name:"退货总数",value:"2",name1:"环比",value1:"↑  1.8%"},
						{name:"退货总金额(元)",value:"2300.00",name1:"环比",value1:"↑  1.8%"},
						{name:"退货率",value:"2.3%",name1:"环比",value1:"↑  1.8%"}
					]
				}
			}
		}
		
	}
</script>