2025-09-26 16:29:36 +08:00
|
|
|
import{_ as e}from"./index.1758875307304Drnfzvd7.js";import{b2 as a,bt as t,r as o,ag as s,db as r,b4 as l,c as n,e as p,N as c,w as m,an as d,O as u,t as i,g}from"./index.1758875307304Bqu9OSaU.js";import{g as _}from"./payee-count.1758875307304BJeZVbOG.js";import{p as b}from"./common.1758875307304CCwWzMi9.js";/* empty css */import"./el-col.1758875307304DQSijX35.js";const f=a({__name:"interface-transaction-statistics",setup(a){t({legacy:!0});const f=o("create_time"),y=o("DESC"),h=s({columns:[{prop:"pay_code",label:"通道编号",align:"center"},{prop:"pay_name",label:"通道名称",align:"center"},{prop:"flow_money",label:"流水金额",align:"center",sortable:"custom",formatter:b,needCount:!0},{prop:"sum_money",label:"跑量金额",align:"center",sortable:"custom",formatter:b,needCount:!0},{prop:"sum_pay_money",label:"实际入金额",align:"center",sortable:"custom",formatter:b,needCount:!0},{prop:"fee_slot",label:"费率",align:"center",slot:"fee_slot"},{prop:"sum_fee",label:"通道手续费",align:"center",sortable:"custom",formatter:b,needCount:!0},{prop:"num",label:"交易总笔数",align:"center",sortable:"custom",needCount:!0},{prop:"succ_num",label:"成功总笔数",align:"center",sortable:"custom",needCount:!0},{prop:"succ_pr",label:"总成功率",align:"center",slot:"succ_pr_slot"}],tableData:[],searchFields:[{prop:"pay_query",label:"通道编号/名称",type:"input",value:""},{prop:"create_time",label:"时间范围",type:"date",dateType:"datetimerange",value:[r().startOf("day").format("YYYY-MM-DD HH:mm:ss"),r().endOf("day").format("YYYY-MM-DD HH:mm:ss")]}],total:0,page:1,per_page:50,loading:!1,sum_data:[]}),Y=()=>{h.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),v()};l(()=>{v()});const v=()=>{h.searchFields.forEach(e=>{"datetimerange"!=e.dateType||e.value||(e.value=[r().startOf("day").format("YYYY-MM-DD HH:mm:ss"),r().endOf("day").format("YYYY-MM-DD HH:mm:ss")])}),h.loading=!0;let e={limit:h.per_page,page:h.page,orderBy:f.value,orderType:y.value,type:"2"},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(h.searchFields);_(Object.assign(e,a)).then(e=>{h.tableData=e.data,h.total=e.total,h.loading=!1,h.sum_data=e.sum}).catch(()=>{h.loading=!1})},D=e=>{f.value=e.prop,y.value="descending"==e.order?"DESC":"ASC",v()};return(a,t)=>{const o=d,s=e;return p(),n("div",null,[c(s,{type:"export",columns:g(h).columns,searchFields:g(h).searchFields,"onUpdate:searchFields":t[0]||(t[0]=e=>g(h).searchFields=e),data:g(h).tableData,per_page:g(h).per_page,"onUpdate:per_page":t[1]||(t[1]=e=>g(h).per_page=e),page:g(h).page,"onUpdate:page":t[2]||(t[2]=e=>g(h).page=e),total:g(h).total,onGetTableData:v,onResetForm:Y,loading:g(h).loading,showSelection:!1,showRightRefreshSlot:!1,onSortChange:D,showSummary:!0,sum_data:g(h).sum_data},{succ_pr_slot:m(({row:e})=>[u(i(g(b)(e.succ_pr))+"% ",1)]),fee_slot:m(({row:e})=>[u(i(g(b)((e.sum_fee/e.sum_money).toFixed(4))||0),1)]),"search-btns":m(()=>[c(o,{type:"danger"},{default:m(()=>t[3]||(t[3]=[u("导出数据")])),_:1,__:[3]})]),_:1},8,["columns","searchFields","data","per_page","page","total","loading","sum_data"])])}}},[["__scopeId","data-v-218b930d"]]);export{f as default};
|