"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[37809],{37809:function(e,a,t){t.r(a),t.d(a,{default:function(){return d}});var r=function(){var e=this,a=e._self._c;return a("div",{staticStyle:{background:"white"}},[a("el-form",{ref:"form",staticClass:"g-pa-xl",attrs:{inline:!0,model:e.form,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"日期"}},[a("el-date-picker",{attrs:{type:"daterange","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd",clearable:""},model:{value:e.form.createDay,callback:function(a){e.$set(e.form,"createDay",a)},expression:"form.createDay"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(a){return e.fetchDataSource(1)}}},[e._v("搜索")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.dataSource.records}},[a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"createDay",label:"日期"}}),a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"balance",label:"积分余额"}}),a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"frozen",label:"冻结积分"}})],1),a("div",{staticClass:"g-pagination-container"},[a("el-pagination",{attrs:{"current-page":e.dataSource.pageNow,"page-sizes":[20,50,100],"page-size":e.dataSource.pageSize,layout:"sizes, prev, pager, next, jumper",background:"",total:e.dataSource.rowCount},on:{"size-change":function(a){return e.fetchDataSource(null,a)},"current-change":function(a){return e.fetchDataSource(a)}}})],1)],1)},n=[],o=t(17422),l=t.n(o),i={data(){return{form:{createDay:this.getDefaultDateRange()},loading:!1,dataSource:{records:[],pageNow:1,pageSize:20}}},mounted(){this.fetchDataSource()},methods:{getDefaultDateRange(){const e=new Date,a=new Date;return a.setDate(a.getDate()-7),[a,e]},handleParam(){const e={...this.form},{createDay:a}=e;return a&&a.length>0&&(e.startDate=l()(a[0]).format("YYYY-MM-DD HH:mm:ss"),e.endDate=l()(a[1]).hour(23).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss"),delete e.createDay),e},async fetchDataSource(e,a){this.loading=!0;const t={pageNow:e||this.dataSource.pageNow,pageSize:a||this.dataSource.pageSize,...this.handleParam()},r=await this.$store.dispatch({type:"finance/queryPointsDayInfo",payload:{...t}});r&&(this.dataSource=r),this.loading=!1}}},c=i,s=t(81656),u=(0,s.A)(c,r,n,!1,null,null,null),d=u.exports}}]);