sf_web_dist/js/platform-withdraw.1760685172143CUs3s_YX.js

2 lines
7.5 KiB
JavaScript
Raw Normal View History

2025-10-17 15:16:42 +08:00
import{b3 as e,ag as a,bU as l,bn as t,r as o,a_ as r,aV as d,c as u,e as s,N as i,w as n,l as m,O as p,E as c,n as g,t as b,g as _,bq as f,br as h,am as D,aX as v,R as w,m as V,an as U,ca as F,bS as y,cb as T,aO as k,cc as x,cd as P}from"./index.1760685172143ChvXXrGI.js";import{_ as S}from"./index.1760685172143Dni7r4WH.js";/* empty css */import"./el-col.1760685172143CNfdOm1y.js";const R={class:"cell-btn cl-2"},q={class:"operate"},j=["onClick"],$={class:"cell-btn cl-2"},C=["src"],I=e({__name:"platform-withdraw",setup(e){function I(e){return y(1e3*e)}const A=e=>`${Number(e).toFixed(2)}`,E=a({columns:[{prop:"id",label:"编号",width:100,align:"center"},{prop:"order_sn",label:"订单号",align:"center"},{prop:"amount",label:"订单金额",width:100,formatter:A,align:"center"},{prop:"usdtAmount",label:"USDT金额",align:"center",slot:"usdtAmount"},{prop:"exchange_rate",label:"汇率",width:100,align:"center"},{prop:"usdt_url",label:"USDT地址",width:180,align:"center"},{prop:"status",label:"提现状态",width:100,slot:"status",align:"center"},{prop:"ip",label:"IP",width:180,align:"center"},{prop:"remark",label:"备注",align:"center"},{prop:"create_time",label:"创建时间",width:180,formatter:I,align:"center"},{prop:"operate",label:"操作",width:200,slot:"operate",fixed:"right",align:"center"}],tableData:[],searchFields:[{prop:"order_sn",label:"订单号",type:"input",value:""},{prop:"usdt_url",label:"USDT地址",type:"input",value:""},{prop:"status",label:"提现状态",type:"select",value:"",options:[{label:"待审核",value:1},{label:"已通过",value:2},{label:"已拒绝",value:3}]},{prop:"create_time",label:"创建时间",type:"date",dateType:"datetimerange",value:l()}],total:0,page:1,limit:10,amount:0,loading:!1,formData:{},showDialog:!1,productForm:{title:"添加平台提现",fields:[{label:"提现金额",prop:"amount",type:"input",value:null,placeholder:"请输入金额"},{label:"USDT地址",prop:"usdt_url",type:"input",placeholder:"请输入USDT地址"},{label:"备注",prop:"remark",type:"input",placeholder:"请输入备注"}],rules:{amount:[{required:!0,message:"请输入金额",trigger:"blur"}],usdt_url:[{required:!0,message:"请输入地址",trigger:"blur"}]},values:{amount:"",usdt_url:"",remark:""}},editRow:{},showProductDialog:!1}),N=()=>{E.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=l():e.value=""}),O()};t(()=>{O()});const O=()=>{var e,a,l,t,o;E.loading=!0;let r={limit:E.limit,page:E.page},d=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(E.searchFields);(null==(e=d.create_time)?void 0:e.length)>0&&(d.start_time=(null==(a=d.create_time[0])?void 0:a.getTime())?(null==(l=d.create_time[0])?void 0:l.getTime())/1e3:"",d.end_time=(null==(t=d.create_time[1])?void 0:t.getTime())?(null==(o=d.create_time[1])?void 0:o.getTime())/1e3:""),P(Object.assign(r,d)).then(e=>{E.tableData=e.list,E.total=e.total,E.amount=e.total_usable_amount,E.loading=!1}).catch(()=>{E.loading=!1})},G=o(null),X=async()=>{G.value&&G.value.hasValid&&G.value.hasValid().validate(e=>{var a;e&&((null==(a=E.editRow)?void 0:a.id)?editNotice({...E.editRow,...E.productForm.values}).then(e=>{k.success(e),E.showProductDialog=!1,O()}):x(E.productForm.values).then(e=>{k.success(e),E.showProductDialog=!1,O()}))})},z=()=>{E.showDialog=!1};return(e,a)=>{const l=r("Plus"),t=c,o=r("InfoFilled"),y=D,k=h,x=f,P=v,B=U,H=F,J=d("click-debounce");return s(),u("div",null,[i(S,{type:"merchant-withdraw",columns:_(E).columns,searchFields:_(E).searchFields,"onUpdate:searchFields":a[1]||(a[1]=e=>_(E).searchFields=e),data:_(E).tableData,limit:_(E).limit,"onUpdate:limit":a[2]||(a[2]=e=>_(E).limit=e),page:_(E).page,"onUpdate:page":a[3]||(a[3]=e=>_(E).page=e),total:_(E).total,onGetTableData:O,onResetForm:N,loading:_(E).loading,name:"merchant-withdraw"},{btns:n(()=>[m("div",{class:"blue",onClick:a[0]||(a[0]=e=>(e=>{if(E.editRow=e,null==e?void 0:e.id){E.productForm.title="修改公告";for(let a in e)E.productForm.values[a]=e[a]}else E.productForm={title:"添加平台提现",fie