(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7c9ebac"],{"7cf9":function(a,t,e){},b147:function(a,t,e){"use strict";e("7cf9")},caf4:function(a,t,e){"use strict";e.r(t);var i=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"page-container"},[e("el-card",{staticClass:"custom-card",attrs:{shadow:"never"}},[e("div",{staticClass:"custom-card-header",attrs:{slot:"header"},slot:"header"},[e("div",{staticStyle:{display:"flex","align-items":"center"}},[e("el-radio-group",{attrs:{size:"medium"},on:{change:a.tabChange},model:{value:a.apiParams.type,callback:function(t){a.$set(a.apiParams,"type",t)},expression:"apiParams.type"}},[e("el-radio-button",{attrs:{label:"day"}},[a._v("日")]),e("el-radio-button",{attrs:{label:"week"}},[a._v("周")]),e("el-radio-button",{attrs:{label:"month"}},[a._v("月")]),e("el-radio-button",{attrs:{label:"all"}},[a._v("全部")])],1),e("span",{staticStyle:{margin:"0 8px 0 24px"}},[a._v("开始日期:")]),e("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择"},model:{value:a.apiParams.start_time,callback:function(t){a.$set(a.apiParams,"start_time",t)},expression:"apiParams.start_time"}}),e("span",{staticStyle:{margin:"0 8px 0 24px"}},[a._v("结束日期:")]),e("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择"},model:{value:a.apiParams.end_time,callback:function(t){a.$set(a.apiParams,"end_time",t)},expression:"apiParams.end_time"}}),e("el-button",{staticStyle:{"margin-left":"30px"},attrs:{type:"primary"},on:{click:a.handleSearch}},[a._v("搜索")]),e("el-button",{on:{click:a.resetSearch}},[a._v("重置")])],1)]),e("div",{staticClass:"custom-card-body"},[e("span",{staticStyle:{"font-weight":"bold"}},[a._v("数据汇总")]),e("div",{staticClass:"dashboard-total-content"},a._l(a.dashboards,(function(t,i){return e("div",{key:i,staticClass:"dashboard-total-content-item",style:{backgroundColor:t.bgColor}},[e("div",["price"===t.type?e("span",[a._v(" $"+a._s(a.dataRef[t.prop]||"0.00")+" ")]):e("span",[a._v(" "+a._s(a.dataRef[t.prop]||0)+" ")])]),e("div",[a._v(a._s(t.title))])])})),0)])]),e("div",{staticClass:"table-container"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:a.tableData,border:""}},[e("el-table-column",{attrs:{prop:"recharge",label:"充值",align:"center"}}),e("el-table-column",{attrs:{prop:"withdraw",label:"提现",align:"center"}}),e("el-table-column",{attrs:{prop:"balance_difference",label:"充值差额",align:"center"}}),e("el-table-column",{attrs:{prop:"total_price",label:"销售额",align:"center"}}),e("el-table-column",{attrs:{prop:"user_total_money",label:"用户存量",align:"center"}}),e("el-table-column",{attrs:{prop:"date",label:"日期",align:"center"}})],1),e("div",{staticClass:"pagination-wrapper"},[e("el-pagination",{attrs:{"current-page":a.apiParams.page,"page-sizes":[10,20,50,100],"page-size":a.apiParams.limit,layout:"total, sizes, prev, pager, next, jumper",total:a.total},on:{"size-change":a.handleSizeChange,"current-change":a.handleCurrentChange}})],1)],1)],1)},r=[],l=e("7e1e"),s={data:function(){return{loading:!1,dataRef:{},tableData:[],total:0,apiParams:{type:"all",start_time:"",end_time:"",limit:20,page:1},dashboards:[{title:"充值",prop:"recharge",bgColor:"#ff8399",type:"price"},{title:"提现",prop:"withdraw",bgColor:"#71c3ff",type:"price"},{title:"销售额",prop:"total_price",bgColor:"#7190ff",type:"price"}]}},mounted:function(){this.getData()},methods:{getData:function(){var a=this;this.loading=!0,Object(l["S"])(this.apiParams).then((function(t){if(a.loading=!1,0===t.code){var e=t.data||{};a.dataRef=e.count||{},a.tableData=e.data||[],a.total=e.total||0}else a.$message.error(t.msg||"获取数据失败")})).catch((function(){a.loading=!1}))},handleSearch:function(){this.apiParams.page=1,this.getData()},resetSearch:function(){this.apiParams.type="all",this.apiParams.start_time="",this.apiParams.end_time="",this.apiParams.page=1,this.getData()},tabChange:function(a){this.apiParams.type=a,this.apiParams.page=1,this.getData()},handleSizeChange:function(a){this.apiParams.limit=a,this.apiParams.page=1,this.getData()},handleCurrentChange:function(a){this.apiParams.page=a,this.getData()}}},n=s,o=(e("b147"),e("2877")),c=Object(o["a"])(n,i,r,!1,null,"377ebf6e",null);t["default"]=c.exports}}]);