sf_web_dist/js/agent-account.1760348339744DME7jnYZ.js

2 lines
7.3 KiB
JavaScript
Raw Normal View History

2025-10-13 17:40:25 +08:00
import{b3 as e,ag as a,bn as t,r as l,a_ as o,c as i,e as r,N as n,w as s,l as c,O as d,E as p,t as u,n as m,g as _,al as h,an as g,ca as b,bS as y,a$ as w,aO as f}from"./index.1760348339744Dv2hbOcg.js";import{E as v}from"./el-popover.1760348339744CThjUv87.js";import{_ as D}from"./index.1760348339744CFWRBA8y.js";import{d as F,g as $,a as x}from"./channel.1760348339744DGFp-SwX.js";import"./dropdown.1760348339744DjNyXgls.js";/* empty css */import"./el-col.1760348339744BrEVlwzu.js";const j={class:"cell-btn cl-3"},k={class:"cell-btn cl-3"},q={key:0,class:"check"},L=["src"],P={class:"cell-btn cl-3"},E={class:"operate"},T=["onClick"],C=e({__name:"agent-account",setup(e){const C=e=>{if(!e)return"-";let a=e.toString().split(",");return a=a.map(e=>`${Number(e).toFixed(2)}`),a.join(",")},R=(e,a)=>{let t="";return e.forEach(e=>{e.value==a&&(t=e.label)}),t},U=a({columns:[{prop:"id",label:"编号",width:70,align:"center"},{prop:"status",label:"接单状态",width:90,align:"center",slot:"status"},{prop:"pay_channel_id",label:"通道",width:100,align:"center",slot:"pay_channel_id"},{prop:"auto_type",label:"类型",width:120,align:"center",slot:"auto_type"},{prop:"ms_id",label:"代理账号",width:100,align:"center",slot:"ms_id"},{prop:"name",label:"收款码名称",width:120,align:"center"},{prop:"weight",label:"权重",width:60,align:"center"},{prop:"qr_code",label:"二维码内容",width:120,align:"center",slot:"qr_code"},{prop:"pay_info",label:"收款信息",width:210,align:"center"},{prop:"type",label:"金额类型",width:90,align:"center",slot:"type"},{prop:"fixed_amount",label:"固码金额",width:90,align:"center",formatter:C},{prop:"min_amount",label:"最小金额",width:90,align:"center",formatter:C},{prop:"max_amount",label:"最大金额",width:90,align:"center",formatter:C},{prop:"daily_limit_amount",label:"单日限额",width:90,align:"center",formatter:C},{prop:"daily_limit_num",label:"单日限单",width:90,align:"center"},{prop:"daily_success_order_amount",label:"成功收款/次数",width:116,align:"center",slot:"daily_success_order_amount"},{prop:"total_amount",label:"累计收款/次数",width:115,align:"center",slot:"total_amount"},{prop:"daily_limit_amount_sum",label:"今日收款/次数",width:115,align:"center",slot:"daily_limit_amount_sum"},{prop:"yes_order_amount",label:"昨日收款/次数",width:115,align:"center",slot:"yes_order_amount"},{prop:"remark",label:"备注",width:150,align:"center"},{prop:"create_time",label:"创建时间",width:150,align:"center",formatter:function(e){return y(1e3*e)}},{prop:"operate",label:"操作",width:80,align:"center",slot:"operate",fixed:"right"}],tableData:[],searchFields:[{label:"代理ID",type:"input",prop:"ms_id",value:""},{label:"代理名称",type:"input",prop:"ms_name",value:""},{label:"支付渠道",type:"select",prop:"pay_channel_id",value:"",options:[]},{label:"收款码名称",type:"input",prop:"name",value:""},{label:"接单状态",type:"select",prop:"status",value:"",options:[{label:"开启",value:1},{label:"关闭",value:2}]}],total:0,page:1,limit:10,loading:!1,productForm:{title:"",fields:[{label:"产品名称",prop:"pro_name",type:"input",value:null,placeholder:"请输入产品名称"},{label:"费率%",prop:"rate",type:"input",placeholder:"请输入返点"},{label:"排序",prop:"sort",type:"input",placeholder:"排序值越大越靠前"}],rules:{pro_name:[{required:!0,message:"请输入产品名称",trigger:"change"}],rate:[{required:!0,message:"请输入返点",trigger:"blur"}]},values:{pro_name:"",rate:"",sort:""}},editRow:{},showProductDialog:!1,selectList:[],channelList:[]}),B=()=>{U.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),O()},S=e=>{U.selectList=e};t(()=>{O(),I()});const O=()=>{U.loading=!0;let e={limit:U.limit,page:U.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(U.searchFields);$(Object.assign(e,a)).then(e=>{U.tableData=e.list,U.total=e.total,U.loading=!1}).catch(()=>{U.loading=!1})},I=()=>{x({}).then(e=>{let a=e.map(e=>({id