(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{440:function(t,e,n){},501:function(t,e,n){"use strict";var r=n(440);n.n(r).a},564:function(t,e,n){"use strict";n.r(e);n(57),n(187),n(30);var r=n(3),o={data:function(){return{pageInfo:{page:1,size:20,total:0},tableHeaders:[],tableProps:[],tableData:[]}},mounted:function(){this.getTableData()},methods:{getTableData:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.tableData=[],e.next=3,t.$post("/api/admin/ReportForm/index",{id:"MonthCashTotal"});case 3:n=e.sent,data=n.data,t.tableData=data.list,t.pageInfo.total=Number(data.total),t.pageInfo.page=data.totalPage,t.setTitles(data.titles);case 9:case"end":return e.stop()}}),e)})))()},exportList:function(){return Object(r.a)(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.location.host+"/api/admin/ReportForm/export?id=MonthCashTotal",window.location.href="https://"+e;case 2:case"end":return t.stop()}}),t)})))()},setTitles:function(title){for(var i in title)this.tableProps.push(i),this.tableHeaders.push(title[i])},clickProject:function(t,e){var path="";if(["alipay","wxpay","apple","admin_confirm","alipay_outcome","gongmall","qingtuanbao","kaifabao"].includes(e)){switch("admin_confirm"===e&&(path="/main/artificial_orders"),e){case"alipay":case"wxpay":case"apple":path="/main/cash_form";break;case"admin_confirm":path="/main/artificial_orders";break;case"alipay_outcome":path="/main/withdraw";break;case"gongmall":case"qingtuanbao":case"kaifabao":path="/main/orders"}if(""!==path){var n=t.month;if(!n||n.length<6)this.$message.error("时间格式不正确");else{var r=n.substring(0,4),o=n.substring(4,6),data={channel:e,start_time:this.beginTime(r,o),end_time:this.lastTime(r,o)};this.$router.push({path:path,query:data})}}}else this.$message.error("渠道不正确")},beginTime:function(t,e){if(e.length<=1);return t+"-"+e+"-01 00:00:00"},lastTime:function(t,e){if(e.length<=1);var n=t+"-"+e+"-"+new Date(t,e,0).getDate()+" 23:59:59";return n}}},c=(n(501),n(2)),component=Object(c.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticStyle:{"text-align":"right","margin-bottom":"10px"}},[n("el-button",{staticClass:"export-excel",attrs:{type:"primary"},on:{click:t.exportList}},[t._v("导出报表")])],1),t._v(" "),n("div",{staticClass:"table"},[t.tableData.length?n("el-table",{staticStyle:{width:"100%"},attrs:{border:"",data:t.tableData}},t._l(t.tableProps,(function(e,r){return n("el-table-column",{key:r,attrs:{prop:e,label:t.tableHeaders[r]},scopedSlots:t._u([{key:"default",fn:function(r){return["alipayIncome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"alipay")}}},[t._v(t._s(r.row[e])+"\n          ")]):"wechatIncome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"wxpay")}}},[t._v(t._s(r.row[e])+"\n          ")]):"appleIncome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"apple")}}},[t._v(t._s(r.row[e])+"\n          ")]):"p"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"admin_confirm")}}},[t._v(t._s(r.row[e])+"\n          ")]):"alipayOutcome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"alipay_outcome")}}},[t._v(t._s(r.row[e])+"\n          ")]):"gongMallOutcome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"gongmall")}}},[t._v(t._s(r.row[e])+"\n          ")]):"qingtuanbaoOutcome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"qingtuanbao")}}},[t._v(t._s(r.row[e])+"\n          ")]):"kaifabaoOutcome"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,"kaifabao")}}},[t._v(t._s(r.row[e])+"\n          ")]):n("span",[t._v(t._s(r.row[e]))])]}}],null,!0)})})),1):t._e()],1),t._v(" "),n("div",[n("el-pagination",{attrs:{"current-page":t.pageInfo.page,"page-size":t.pageInfo.size,layout:"total, prev, pager, next",total:t.pageInfo.total},on:{"current-change":t.getTableData,"update:currentPage":function(e){return t.$set(t.pageInfo,"page",e)},"update:current-page":function(e){return t.$set(t.pageInfo,"page",e)}}})],1)])}),[],!1,null,"3bd2e589",null);e.default=component.exports}}]);