sf_web_dist/js/recharge-ranking.1760689147687DWHq_P4l.js
2025-10-17 16:21:07 +08:00

2 lines
5.0 KiB
JavaScript

import{_ as e}from"./index.176068914768746wjGoDD.js";import{b3 as a,bu as t,r as o,ag as l,de as n,b5 as r,c as s,e as p,N as d,w as m,O as u,bO as c,bM as i,l as _,t as g,g as y,an as b}from"./index.1760689147687BkZt69p9.js";import{E as f}from"./el-card.1760689147687BHBjNElN.js";import{g as h}from"./payee-count.1760689147687CdE7LMsN.js";import{p as v}from"./common.1760689147687CCwWzMi9.js";/* empty css */import"./el-col.1760689147687DD-CDShL.js";const Y=a({__name:"recharge-ranking",setup(a){t({legacy:!0});const Y=o("create_time"),D=o("DESC"),w=l({columns:[{prop:"shop_id",label:"商户编号",align:"center"},{prop:"shop_name",label:"商户名称",align:"center"},{prop:"flow_money",label:"流水金额",align:"center",sortable:"custom",formatter:v,needCount:!0},{prop:"sum_money",label:"跑量金额",align:"center",sortable:"custom",formatter:v,needCount:!0},{prop:"sum_pay_money",label:"实际入金额",align:"center",sortable:"custom",formatter:v,needCount:!0},{prop:"sum_fee",label:"手续费",align:"center",sortable:"custom",formatter:v,needCount:!0},{prop:"account_money",label:"应下发金额",align:"center",slot:"count_money_slot",needCount:!0},{prop:"account_sum_money",label:"总预付金额",align:"center",slot:"sum_money_slot",needCount:!0},{prop:"account_prepay_money",label:"剩余预付金额",align:"center",slot:"prepay_money_slot",needCount:!0},{prop:"succ_num",label:"成功订单笔数",align:"center",sortable:"custom",needCount:!0}],tableData:[],searchFields:[{prop:"shop_name",label:"商户编号/名称",type:"input",value:""},{prop:"create_time",label:"时间范围",type:"date",dateType:"datetimerange",value:[n().startOf("day").format("YYYY-MM-DD HH:mm:ss"),n().endOf("day").format("YYYY-MM-DD HH:mm:ss")]}],total:0,page:1,per_page:50,loading:!1,sum_data:[]}),C=o([]),F=()=>{w.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),x()};function M(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}r(()=>{x()});const x=()=>{w.searchFields.forEach(e=>{"datetimerange"!=e.dateType||e.value||(e.value=[n().startOf("day").format("YYYY-MM-DD HH:mm:ss"),n().endOf("day").format("YYYY-MM-DD HH:mm:ss")])}),w.loading=!0;let e={limit:w.per_page,page:w.page,orderBy:Y.value,orderType:D.value,type:"4"},a=M(w.searchFields);h(Object.assign(e,a)).then(e=>{w.tableData=e.data,w.total=e.total,w.loading=!1,w.sum_data=e.sum}).catch(()=>{w.loading=!1})},H=()=>{w.searchFields.forEach(e=>{"datetimerange"!=e.dateType||e.value||(e.value=[n().startOf("day").format("YYYY-MM-DD HH:mm:ss"),n().endOf("day").format("YYYY-MM-DD HH:mm:ss")])}),w.loading=!0;let e={limit:w.per_page,page:w.page,orderBy:Y.value,orderType:D.value,type:"4",export:"1",saiType:"all"},a=M(w.searchFields);h(Object.assign(e,a)).then(e=>{w.tableData=e.data,w.total=e.total,w.loading=!1,w.sum_data=e.sum}).catch(()=>{w.loading=!1})},O=e=>{Y.value=e.prop,D.value="descending"==e.order?"DESC":"ASC",x()},j=async e=>{C.value=[];let a={shop_id:e.shop_id,limit:"1000",page:1,type:"2",create_time:w.searchFields[1].value},t=await h(a);e.tableData=t.data};return(a,t)=>{const o=b,l=i,n=c,r=f,h=e;return p(),s("div",null,[d(h,{type:"export",columns:y(w).columns,searchFields:y(w).searchFields,"onUpdate:searchFields":t[0]||(t[0]=e=>y(w).searchFields=e),data:y(w).tableData,per_page:y(w).per_page,"onUpdate:per_page":t[1]||(t[1]=e=>y(w).per_page=e),page:y(w).page,"onUpdate:page":t[2]||(t[2]=e=>y(w).page=e),total:y(w).total,onGetTableData:x,onResetForm:F,loading:y(w).loading,showSelection:!1,showRightRefreshSlot:!1,showExpand:!0,expandWidth:120,expandLabel:"支付通道跑量",onSortChange:O,onExpandChange:j,showSummary:!0,sum_data:y(w).sum_data},{"search-btns":m(()=>[d(o,{type:"danger",onClick:H},{default:m(()=>t[3]||(t[3]=[u("导出数据")])),_:1,__:[3]})]),prepay_money_slot:m(({row:e})=>{var a;return[_("div",null,g(y(v)(null==(a=null==e?void 0:e.account)?void 0:a.prepay_money)),1)]}),count_money_slot:m(({row:e})=>{var a;return[_("div",null,g(y(v)(null==(a=null==e?void 0:e.account)?void 0:a.money)),1)]}),sum_money_slot:m(({row:e})=>{var a;return[_("div",null,g(y(v)(null==(a=null==e?void 0:e.account)?void 0:a.sum_money)),1)]}),expand:m(({row:e})=>[d(r,{style:{margin:"20px"}},{header:m(()=>t[4]||(t[4]=[_("div",{class:"card-title"},"商户支付通道跑量",-1)])),default:m(()=>[d(n,{data:e.tableData,border:""},{default:m(()=>[d(l,{prop:"pay_name",label:"通道"}),d(l,{prop:"flow_money",label:"流水"},{default:m(({row:e})=>[_("div",null,g(y(v)(e.flow_money)),1)]),_:2},1024),d(l,{prop:"sum_money",label:"跑量"},{default:m(({row:e})=>[_("div",null,g(y(v)(e.sum_money)),1)]),_:2},1024),d(l,{prop:"sum_pay_money",label:"入账"},{default:m(({row:e})=>[_("div",null,g(y(v)(e.sum_pay_money)),1)]),_:2},1024),d(l,{prop:"succ_num",label:"成功笔数"})]),_:2},1032,["data"])]),_:2},1024)]),default:m(()=>[t[5]||(t[5]=u('" '))]),_:1,__:[5]},8,["columns","searchFields","data","per_page","page","total","loading","sum_data"])])}}},[["__scopeId","data-v-d51c0c5d"]]);export{Y as default};