You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
12 KiB
1 lines
12 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ee6cc51"],{"2e83":function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));a("28a5");var i=a("8122"),s=a("e8ae"),l=a.n(s),n=a("21a6");function c(t,e,a,s,c,o){var r,u=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],d=1,m=new l.a.Workbook,h=t.length;function g(t){var e=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:{};r=m.addWorksheet(e,a)}function v(t,e){if(!Object(i["isEmpty"])(t)){t=Array.isArray(t)?t:t.split(",");for(var a=0;a<t.length;a++){var s=r.getRow(a+1);s.getCell(1).value=t[a],s.height=30,s.font={bold:!0,size:20,vertAlign:"subscript"},s.alignment={vertical:"bottom",horizontal:"center"},s.outlineLevel=1,r.mergeCells(a+1,1,a+1,e),s.commit(),d++}}}function p(t){if(!Object(i["isEmpty"])(t)){for(var e=r.getRow(d),a=1;a<=t.length;a++)e.getCell(a).value=t[a-1];e.height=25,e.width=50,e.font={bold:!0,size:18,vertAlign:"subscript"},e.alignment={vertical:"bottom",horizontal:"center"},e.outlineLevel=1,e.commit(),d++}}function b(t){if(!Object(i["isEmpty"])(t))for(var e=0;e<t.length;e++){for(var a=d,s=r.getRow(d),l=!1,n=0,c=0,o=0,u=0;u<t[e].length;u++)Array.isArray(t[e][u])?(n=o,l=!0,_(t[e][u],o),o+=t[e][u][0].length,c=o):(s.getCell(D(o)).value=t[e][u],s.getCell(D(o)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},s.alignment={vertical:"middle",horizontal:"center"},o++);l&&y(a,d,n,c),s.height=25,s.commit(),d++}}function _(t,e){for(var a=t.length,i=a-1,s=0;s<t.length;s++){for(var l=r.getRow(d),n=0;n<t[s].length;n++)l.getCell(D(e+n)).value=t[s][n],l.getCell(D(e+n)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},l.alignment={vertical:"middle",horizontal:"center"};l.height=25,l.commit(),s<i&&d++}}function y(t,e,a,i){for(var s=0;s<h;s++)(s<a||s>i)&&r.mergeCells(D(s)+t+":"+D(s)+e)}function C(t){if(!Object(i["isEmpty"])(t))if(Array.isArray(t))for(var e=0;e<t.length;e++){var a=r.getRow(d);a.getCell(1).value=t[e],a.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.alignment={vertical:"middle",horizontal:"left"},r.mergeCells("A"+d+":"+D(h-1)+d),d++}else{var s=r.getRow(d);s.getCell(1).value=t[f],s.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},s.alignment={vertical:"middle",horizontal:"left"},r.mergeCells("A"+d+":"+D(h-1)+d)}}function D(t){if(t<26)return u[t];var e=t%26,a=Math.floor(t%26);return u[a]+u[e]}function w(t){t||(t=(new Date).getTime()),m.xlsx.writeBuffer().then((function(e){var a=new Blob([e],{type:"application/octet-stream"});n["saveAs"](a,t+".xlsx")}))}g(o),v(e,h),p(t),b(a),C(s),w(c)}},"47bc":function(t,e,a){},"8cc4":function(t,e,a){"use strict";a("47bc")},"8e0d":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"filter-container"},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!0}},[a("el-form-item",{staticClass:"mr10",attrs:{label:"时间选择:"}},[a("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy/MM/dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1)],1),t._v(" "),a("cards-data",{attrs:{"card-lists":t.cardLists}}),t._v(" "),t.headeNum.length>0?a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableForm.type,callback:function(e){t.$set(t.tableForm,"type",e)},expression:"tableForm.type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.title}})})),1):t._e()],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"序号","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.$index+(t.tableForm.page-1)*t.tableForm.limit+1))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"time",label:"日期","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"income",label:"账期内收入","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"expend",label:"账期内支出","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"charge",label:"平台应入账金额","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"200",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetails(e.row.time)}}},[t._v("详情")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.exports(e.row.time)}}},[t._v("下载账单")])]}}])})],1),t._v(" "),a("div",{staticClass:"block mb20"},[a("el-pagination",{attrs:{"page-sizes":[10,20,30,40],"page-size":t.tableForm.limit,"current-page":t.tableForm.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("el-dialog",{attrs:{title:1==t.tableForm.type?"日账单详情":"月账单详情",visible:t.dialogVisible,width:"830px","before-close":t.handleClose,center:""},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-row",{staticClass:"ivu-mt mt20",attrs:{align:"middle"}},[a("el-col",{attrs:{span:4}},[a("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{"default-active":"0"}},[a("el-menu-item",{attrs:{name:t.accountDetails.date}},[a("span",[t._v(t._s(t.accountDetails.date))])])],1)],1),t._v(" "),a("el-col",{attrs:{span:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"},[a("span",{staticClass:"title"},[t._v(t._s(t.accountDetails.income&&t.accountDetails.income.title))]),t._v(" "),a("span",{staticClass:"color_red"},[t._v(t._s(t.accountDetails.income&&t.accountDetails.income.number)+"元")]),t._v(" "),a("span",{staticClass:"count"},[t._v(t._s(t.accountDetails.income&&t.accountDetails.income.count))]),t._v(" "),t.accountDetails.income&&t.accountDetails.income.data&&t.accountDetails.income.data.length>0?a("div",{staticClass:"list"},t._l(t.accountDetails.income.data,(function(e,i){return a("el-row",{key:i,staticClass:"item"},[a("el-col",{staticClass:"name",attrs:{span:12}},[t._v(t._s(e["0"]))]),t._v(" "),a("el-col",{staticClass:"cost",attrs:{span:12}},[a("span",{staticClass:"cost_num"},[t._v(t._s(e["1"]))]),t._v(" "),a("span",{staticClass:"cost_count"},[t._v(t._s(e["2"]))])])],1)})),1):t._e()]),t._v(" "),a("el-divider",{attrs:{direction:"vertical"}})],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"},[a("span",{staticClass:"title"},[t._v(t._s(t.accountDetails.bill&&t.accountDetails.bill.title))]),t._v(" "),a("span",{staticClass:"color_red"},[t._v(t._s(t.accountDetails.bill&&t.accountDetails.bill.number)+"元")]),t._v(" "),a("span",{staticClass:"count"},[t._v(t._s(t.accountDetails.bill&&t.accountDetails.bill.count))]),t._v(" "),t.accountDetails.bill&&t.accountDetails.bill.data&&t.accountDetails.bill.data.length>0?a("div",{staticClass:"list"},t._l(t.accountDetails.bill.data,(function(e,i){return a("el-row",{key:i,staticClass:"item"},[a("el-col",{staticClass:"name",attrs:{span:12}},[t._v(t._s(e["0"]))]),t._v(" "),a("el-col",{staticClass:"cost",attrs:{span:12}},[a("span",{staticClass:"cost_num"},[t._v(t._s(e["1"]))]),t._v(" "),a("span",{staticClass:"cost_count"},[t._v(t._s(e["2"]))])])],1)})),1):t._e()]),t._v(" "),a("el-divider",{attrs:{direction:"vertical"}})],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"},[a("span",{staticClass:"title"},[t._v(t._s(t.accountDetails.expend&&t.accountDetails.expend.title))]),t._v(" "),a("span",{staticClass:"color_gray"},[t._v(t._s(t.accountDetails.expend&&t.accountDetails.expend.number)+"元")]),t._v(" "),a("span",{staticClass:"count"},[t._v(t._s(t.accountDetails.expend&&t.accountDetails.expend.count))]),t._v(" "),t.accountDetails.expend&&t.accountDetails.expend.data&&t.accountDetails.expend.data.length>0?a("div",{staticClass:"list"},t._l(t.accountDetails.expend.data,(function(e,i){return a("el-row",{key:i,staticClass:"item"},[a("el-col",{staticClass:"name",attrs:{span:12}},[t._v(t._s(e["0"]))]),t._v(" "),a("el-col",{staticClass:"cost",attrs:{span:12}},[a("span",{staticClass:"cost_num"},[t._v(t._s(e["1"]))]),t._v(" "),a("span",{staticClass:"cost_count"},[t._v(t._s(e["2"]))])])],1)})),1):t._e()]),t._v(" "),a("el-divider",{attrs:{direction:"vertical"}})],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"grid-content"},[a("span",{staticClass:"title"},[t._v(t._s(t.accountDetails.charge&&t.accountDetails.charge.title))]),t._v(" "),a("span",{staticClass:"color_gray"},[t._v(t._s(t.accountDetails.charge&&t.accountDetails.charge.number)+"元")])])])],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("我知道了")])],1)],1)],1)},s=[],l=a("c80c"),n=(a("96cf"),a("3b8d")),c=a("2801"),o=a("83d6"),r=a("0f56"),u=a("2e83"),d={name:"Record",components:{cardsData:r["a"]},data:function(){return{loading:!1,roterPre:o["roterPre"],timeVal:[],listLoading:!0,tableData:{data:[],total:0},tableForm:{page:1,limit:10,date:"",type:"1"},ruleForm:{status:"0"},headeNum:[{type:1,title:"日账单"},{type:2,title:"月账单"}],dialogVisible:!1,rules:{status:[{required:!0,message:"请选择对账状态",trigger:"change"}]},reconciliationId:0,cardLists:[],accountDetails:{date:"",charge:{},expend:{},income:{}}}},computed:{},mounted:function(){this.getList(""),this.getHeaderData()},methods:{onDetails:function(t){var e=this;Object(c["j"])(this.tableForm.type,{date:t}).then((function(t){e.dialogVisible=!0,e.accountDetails=t.data})).catch((function(t){e.$message.error(t.message)}))},getHeaderData:function(){var t=this;Object(c["i"])({date:this.tableForm.date}).then((function(e){t.cardLists=e.data.stat})).catch((function(e){t.$message.error(e.message)}))},exports:function(){var t=Object(n["a"])(Object(l["a"])().mark((function t(e){var a,i,s,n,c;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=JSON.parse(JSON.stringify(this.tableForm)),i=[],a.page=1,s=1,n={},c=0;case 5:if(!(c<s)){t.next=14;break}return t.next=8,this.downData(a,e);case 8:n=t.sent,s=Math.ceil(n.count/a.limit),n.export.length&&(i=i.concat(n.export),a.page++);case 11:c++,t.next=5;break;case 14:return Object(u["a"])(n.header,n.title,i,n.foot,n.filename),t.abrupt("return");case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),downData:function(t,e){var a=this;return t.date=e,new Promise((function(e,i){Object(c["e"])(a.tableForm.type,t).then((function(t){return e(t.data)}))}))},handleClose:function(){this.dialogVisible=!1},onchangeTime:function(t){this.timeVal=t,this.tableForm.date=this.timeVal?this.timeVal.join("-"):"",this.getList(""),this.getHeaderData()},getList:function(t){var e=this;this.listLoading=!0,this.tableForm.page=t||this.tableForm.page,Object(c["k"])(this.tableForm).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableForm.page=t,this.getList("")},handleSizeChange:function(t){this.tableForm.limit=t,this.chkName="",this.getList("")}}},m=d,h=(a("8cc4"),a("2877")),g=Object(h["a"])(m,i,s,!1,null,"09efe018",null);e["default"]=g.exports}}]); |