"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[84129],{84129:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var n=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{background:"white"}},[t("el-form",{ref:"form",staticClass:"g-pa-xl",attrs:{inline:!0,model:e.form,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",[t("el-date-picker",{attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separtor":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.form.payDate,callback:function(t){e.$set(e.form,"payDate",t)},expression:"form.payDate"}})],1),t("el-form-item",{attrs:{label:"类型"}},[t("el-select",{attrs:{clearable:""},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.shopDepositTypes,(function([e,a]){return t("el-option",{key:e,attrs:{label:a,value:e}})})),1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.fetchShopDepositList(1)}}},[e._v("查询")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.exportExcel()}}},[e._v("下载")])],1)],1),t("div",{staticClass:"g-relative-position"},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.dataSource.records},on:{"selection-change":function(t){e.selectedRows=t}}},[t("el-table-column",{attrs:{fixed:"","header-align":"center",align:"center",prop:"shopId",label:"店铺号"}}),t("el-table-column",{attrs:{fixed:"","header-align":"center",align:"center",prop:"type",label:"类型"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.getShopDepositType(a.row.type)))])]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"settleMoney",label:"金额"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"createTime",label:"时间"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"settleDate",label:"关联账期"}})],1),t("div",{staticClass:"g-pagination-container"},[t("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(t){return e.fetchDataSource(null,t)},"current-change":function(t){return e.fetchDataSource(t)}}})],1)],1)],1)},r=[],o=a(7896),i=a(13054),l=a(17422),s=a.n(l),c={data(){return{shopDepositTypes:i.wM,form:{payDate:this.defaultDateRange()},loading:!1,dataSource:{records:[],pageNow:1,pageSize:20}}},mounted(){this.fetchShopDepositList(1)},methods:{getShopDepositType:i.Pc,defaultDateRange(){const e=new Date;e.setDate(e.getDate()-1);const t=new Date;return t.setMonth(t.getMonth()-1),[t,e]},fetchShopDepositList(e){this.fetchDataSource(e)},async fetchDataSource(e,t){this.loading=!0;const a={pageNow:e||this.dataSource.pageNow,pageSize:t||this.dataSource.pageSize,...this.handleParams()},n=await this.$store.dispatch({type:"financeReport/queryShopDeposit",payload:a});n&&(this.dataSource=n),this.loading=!1},exportExcel(){(0,o.Ne)("/buss-finance/shopDepositLog/export",{...this.handleParams()})},handleParams(){const e={...this.form},{payDate:t}=e;return t&&t.length>0&&(e.startDate=s()(t[0]).format("YYYY-MM-DD HH:mm:ss"),e.endDate=s()(t[1]).hour(23).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss"),delete e.payDate),e}}},u=c,p=a(81656),d=(0,p.A)(u,n,r,!1,null,null,null),f=d.exports},13054:function(e,t,a){a.d(t,{B5:function(){return u},Bz:function(){return o},Kf:function(){return n},O:function(){return h},On:function(){return s},Pc:function(){return y},RY:function(){return c},aQ:function(){return l},bp:function(){return i},jk:function(){return p},mS:function(){return r},s1:function(){return f},wM:function(){return m},x0:function(){return d}});const n=new Map([[0,"收款"],[1,"退款"],[2,"罚款"]]),r=e=>n.get(e),o=new Map([[1,"支付成功"],[2,"退款中"],[3,"已退款"]]),i=e=>o.get(e),l=new Map([[0,"未结算"],[2,"已结算"]]),s=e=>l.get(e),c=new Map([[0,"自营"],[1,"平台"]]),u=e=>c.get(e),p=new Map([[1,"自营成本"],[2,"物流成本"]]),d=e=>p.get(e),f={title:{text:"毛利统计"},tooltip:{trigger:"axis"},legend:{data:["毛利","收入合计","支出合计"]},toolbox:{feature:{saveAsImage:{show:!1}}},calculable:!0,xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[{name:"毛利",type:"line",data:[]},{name:"收入合计",type:"line",data:[]},{name:"支出合计",type:"line",data:[]}]},g=new Map([[0,"否"],[1,"是"]]),h=e=>g.get(e),m=new Map([[1,"扣减"],[2,"释放"]]),y=e=>m.get(e)}}]);