zx/public/mer/js/chunk-e4c6492a.d941fc40.js

1 line
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e4c6492a"],{2801:function(t,e,a){"use strict";a.d(e,"k",(function(){return i})),a.d(e,"o",(function(){return r})),a.d(e,"m",(function(){return l})),a.d(e,"n",(function(){return o})),a.d(e,"l",(function(){return s})),a.d(e,"c",(function(){return c})),a.d(e,"b",(function(){return u})),a.d(e,"s",(function(){return d})),a.d(e,"i",(function(){return f})),a.d(e,"j",(function(){return m})),a.d(e,"a",(function(){return g})),a.d(e,"q",(function(){return h})),a.d(e,"p",(function(){return p})),a.d(e,"r",(function(){return v})),a.d(e,"g",(function(){return b})),a.d(e,"f",(function(){return _})),a.d(e,"e",(function(){return y})),a.d(e,"d",(function(){return C})),a.d(e,"h",(function(){return w}));var n=a("0c6d");function i(t){return n["a"].get("store/order/reconciliation/lst",t)}function r(t,e){return n["a"].post("store/order/reconciliation/status/".concat(t),e)}function l(t,e){return n["a"].get("store/order/reconciliation/".concat(t,"/order"),e)}function o(t,e){return n["a"].get("store/order/reconciliation/".concat(t,"/refund"),e)}function s(t){return n["a"].get("store/order/reconciliation/mark/".concat(t,"/form"))}function c(t){return n["a"].get("financial_record/list",t)}function u(t){return n["a"].get("financial_record/export",t)}function d(t){return n["a"].get("financial/export",t)}function f(){return n["a"].get("version")}function m(){return n["a"].get("financial/account/form")}function g(){return n["a"].get("financial/create/form")}function h(t){return n["a"].get("financial/lst",t)}function p(t){return n["a"].get("financial/detail/".concat(t))}function v(t){return n["a"].get("financial/mark/".concat(t,"/form"))}function b(t){return n["a"].get("financial_record/lst",t)}function _(t,e){return n["a"].get("financial_record/detail/".concat(t),e)}function y(t){return n["a"].get("financial_record/title",t)}function C(t,e){return n["a"].get("financial_record/detail_export/".concat(t),e)}function w(t){return n["a"].get("financial_record/count",t)}},"2e83":function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));a("28a5");var n=a("8122"),i=a("e8ae"),r=a.n(i),l=a("21a6");function o(t,e,a,i,o,s){var c,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 r.a.Workbook,g=t.length;function h(t){var e=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:{};c=m.addWorksheet(e,a)}function p(t,e){if(!Object(n["isEmpty"])(t)){t=Array.isArray(t)?t:t.split(",");for(var a=0;a<t.length;a++){var i=c.getRow(a+1);i.getCell(1).value=t[a],i.height=30,i.font={bold:!0,size:20,vertAlign:"subscript"},i.alignment={vertical:"bottom",horizontal:"center"},i.outlineLevel=1,c.mergeCells(a+1,1,a+1,e),i.commit(),d++}}}function v(t){if(!Object(n["isEmpty"])(t)){for(var e=c.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(n["isEmpty"])(t))for(var e=0;e<t.length;e++){for(var a=d,i=c.getRow(d),r=!1,l=0,o=0,s=0,u=0;u<t[e].length;u++)Array.isArray(t[e][u])?(l=s,r=!0,_(t[e][u],s),s+=t[e][u][0].length,o=s):(i.getCell(w(s)).value=t[e][u],i.getCell(w(s)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},i.alignment={vertical:"middle",horizontal:"center"},s++);r&&y(a,d,l,o),i.height=25,i.commit(),d++}}function _(t,e){for(var a=t.length,n=a-1,i=0;i<t.length;i++){for(var r=c.getRow(d),l=0;l<t[i].length;l++)r.getCell(w(e+l)).value=t[i][l],r.getCell(w(e+l)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},r.alignment={vertical:"middle",horizontal:"center"};r.height=25,r.commit(),i<n&&d++}}function y(t,e,a,n){for(var i=0;i<g;i++)(i<a||i>=n)&&c.mergeCells(w(i)+t+":"+w(i)+e)}function C(t){if(!Object(n["isEmpty"])(t))if(Array.isArray(t))for(var e=0;e<t.length;e++){var a=c.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"},c.mergeCells("A"+d+":"+w(g-1)+d),d++}else{var i=c.getRow(d);i.getCell(1).value=t[f],i.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},i.alignment={vertical:"middle",horizontal:"left"},c.mergeCells("A"+d+":"+w(g-1)+d)}}function w(t){if(t<26)return u[t];var e=t%26,a=Math.floor(t%26);return u[a]+u[e]}function x(t){t||(t=(new Date).getTime()),m.xlsx.writeBuffer().then((function(e){var a=new Blob([e],{type:"application/octet-stream"});l["saveAs"](a,t+".xlsx")}))}h(s),p(e,g),v(t),b(a),C(i),x(o)}},"8e0d":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard mb14"},[a("el-form",{attrs:{size:"small","label-width":"85px",inline:!0}},[a("el-form-item",{attrs:{label:"时间选择:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{type:"daterange",align:"right","unlink-panels":"",format:"yyyy/MM/dd","value-format":"yyyy/MM/dd"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1)],1),t._v(" "),t.cardLists.length>0?a("cards-data",{attrs:{more:!0,"card-lists":t.cardLists}}):t._e(),t._v(" "),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"mb20"},[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",attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"序号","min-width":"100"},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":"150"}}),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":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",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:{background:"","page-size":t.tableForm.limit,"current-page":t.tableForm.page,layout:"total, 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:"900px","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:8}},[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.data?a("div",{staticClass:"list"},t._l(t.accountDetails.income.data,(function(e,n){return a("el-row",{key:n,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:8}},[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.data?a("div",{staticClass:"list"},t._l(t.accountDetails.expend.data,(function(e,n){return a("el-row",{key:n,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:8}},[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)},i=[],r=a("c80c"),l=(a("96cf"),a("3b8d")),o=a("2801"),s=a("2e83"),c=a("83d6"),u=a("0f56"),d={name:"Record",components:{cardsData:u["a"]},data:function(){return{loading:!1,roterPre:c["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(o["f"])(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(o["e"])({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(l["a"])(Object(r["a"])().mark((function t(e){var a,n,i,l,o;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=JSON.parse(JSON.stringify(this.tableForm)),n=[],a.page=1,i=1,l={},o=0;case 5:if(!(o<i)){t.next=14;break}return t.next=8,this.downloadAccounts(a,e);case 8:l=t.sent,i=Math.ceil(l.count/a.limit),l.export.length&&(n=n.concat(l.export),a.page++);case 11:o++,t.next=5;break;case 14:return Object(s["a"])(l.header,l.title,n,l.foot,l.filename),t.abrupt("return");case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),downloadAccounts:function(t,e){var a=this;return t.date=e,new Promise((function(e,n){Object(o["d"])(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(o["g"])(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("")}}},f=d,m=(a("ea41c"),a("2877")),g=Object(m["a"])(f,n,i,!1,null,"649a7f3e",null);e["default"]=g.exports},"905f":function(t,e,a){},ea41c:function(t,e,a){"use strict";a("905f")}}]);