"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[23563],{23563:function(e,t,a){a.r(t),a.d(t,{default:function(){return s}});var l=function(){var e=this,t=e._self._c;return t("div",[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",{attrs:{label:"结算日期"}},[t("el-date-picker",{attrs:{type:"datetimerange","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss",clearable:""},model:{value:e.form.collectTime,callback:function(t){e.$set(e.form,"collectTime",t)},expression:"form.collectTime"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSearch()}}},[e._v("查询")])],1)],1),t("p",{staticStyle:{"padding-left":"16px"}},[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.exportOnClick()}}},[e._v("下载明细")])],1),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:{"header-align":"center",align:"center",type:"selection"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"days",label:"结算日期"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"count",label:"揽收单数"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"logisticsWeight",label:"总重量kg"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"logisticsAmount",label:"总收费€"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.exportOnClick(a.row)}}},[e._v("下载明细")])]}}])})],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:"total, 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)])},n=[],r=(a(81454),a(7896),{components:{},data(){return{selectedRows:[],form:{},dataSource:{records:[],pageNow:1,pageSize:20},loading:!1}},mounted(){this.fetchDataSource()},methods:{exportOnClick(e){let t=[];if(e)t=[e.days];else{if(!(this.selectedRows.length>0))return void this.$message.error("请选择要导出的行");t=this.selectedRows.map((e=>e.days))}const a={times:t};this.$store.dispatch({type:"settlementManager/downloadManagerBill",payload:a}),this.$message.success("导出已开始，稍后可以在 任务中心-导出任务 中下载文件~")},handleParam(){const e={...this.form},{collectTime:t}=e;return t&&t.length>0&&(e.collectTimeStart=t[0],e.collectTimeEnd=t[1],delete e.collectTime),e},onSearch(){this.fetchDataSource()},async fetchDataSource(e,t){this.loading=!0;const a={pageNow:e||this.dataSource.pageNow,pageSize:t||this.dataSource.pageSize,...this.handleParam()},l=await this.$store.dispatch({type:"settlementManager/getCollectBillSettle",payload:{...a}});l&&(this.dataSource=l),this.loading=!1}}}),o=r,i=a(81656),c=(0,i.A)(o,l,n,!1,null,null,null),s=c.exports}}]);