sf_web_dist/js/user-info.C_Db9I9e.js
2025-08-13 18:37:04 +08:00

2 lines
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{a$ as e,r as a,ag as o,b4 as t,c as l,e as s,N as r,O as i,w as n,t as p,l as d,d8 as u,an as c,bb as _,a7 as w,a8 as h,g as m,c8 as g,aO as y,a_ as f}from"./index.ZfD0KPCP.js";import{_ as v}from"./index.Dr3pgF4g.js";/* empty css */import{E as D}from"./el-text.8O7bSRLl.js";import C from"./modify_deposit.CJZg-e9A.js";import b from"./modify_deposit_log.D47vmZX-.js";import F from"./single_channel_set.6g5W1HAm.js";import R from"./single_fee_set.B_raMPqH.js";import k from"./modify_password.BvcZX_jI.js";import S from"./clear_account.B-z-cKgd.js";import j from"./aircraft.Dp1ijG8T.js";import U from"./user_gorup.DK9Zu-YF.js";import x from"./detail.RcarGq7t.js";import A from"./account_total.Dj4gVTTE.js";import{g as M,c as z,d as B,f as T,h as P,i as I}from"./payee-user.DjeMsTF2.js";import{s as L}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.DgnSRLc_.js";import"./payee-order.CQQhFXKL.js";import"./el-card.CPZqRzRU.js";import"./settlement_log.BdwVFCWd.js";import"./select_channel.DrdYgPXJ.js";import"./payee-channel.CLZxH5NA.js";import"./handle_balance.B2iXxAAa.js";import"./freeze_balance.BotMCAWX.js";import"./freeze_money_management.DBKm2YwX.js";import"./freeze_balance_management.DxN0BrLx.js";const V={class:"statistics-box"},G={style:{"font-size":"10px"}},E=["onClick"],O={style:{"margin-top":"4px"}},W={style:{"margin-top":"4px"}},$={__name:"user-info",setup($,{expose:N}){const X=e(),Y=L.userType,Z=a([]),q=a("日切清账,关闭通道"),H=a("warning"),J=a("0"),K=o({columns:[{prop:"shop_id",label:"商户号",align:"center",width:"100"},{prop:"username",label:"用户名",align:"center",slot:"username_slot",width:"100"},{prop:"group",label:"分组",align:"center",width:"100px",slot:"group_slot"},{prop:"",label:"预付操作",align:"center",slot:"modify_deposit_slot",width:"120"},{prop:"",label:"预付",align:"center"},{prop:"",label:"账号总额",align:"center",slot:"account_total_slot"},{prop:"",label:"通道",align:"center",slot:"channel_slot",width:"100px"},{prop:"",label:"费率",align:"center",slot:"fee_slot",width:"100px"},{prop:"",label:"状态",align:"center",slot:"status_slot"},{prop:"created_at",label:"回调IP",align:"center"},{prop:"",label:"操作",align:"center",slot:"operate_slot",width:"240"},{prop:"create_time",label:"注册时间",align:"center"},{prop:"login_time",label:"最后登录时间",align:"center",slot:"login_time_slot"}],tableData:[],searchFields:[{label:"商户号",prop:"shop_id",type:"input",value:""},{label:"用户名称",type:"input",prop:"username",value:""},{label:"用户定制类型",prop:"user_type",type:"select",value:"",options:Y},{label:"用户分组",type:"select",prop:"user_group",value:"",options:Z}],total:0,page:1,per_page:10,loading:!1,selectData:[],showAddDialog:!1,btnLoading:!1,addForm:{title:"新增用户",fields:[{label:"用户名称",prop:"username",type:"input",value:""},{label:"登录密码",prop:"password",type:"password"},{label:"登录IP白名单",prop:"login_white_ip",type:"textarea",value:""},{label:"回调IP白名单",prop:"callback_white_ip",type:"textarea",value:"",placeholder:"商户的回调IP管理员有IP池建议每个商户独立IP若是包网则改为批量切记线下一定要记录每个商户的IP若IP被打则及时变更不影响其他商户用英文逗号隔开"}],rules:{},values:{username:"",name:"",user_type:"",password:"",login_white_ip:"",callback_white_ip:"",id:""}},showBatchChannel:!1,showBatchFee:!1,showWrongAccount:!1,showRepairRecord:!1,showModifyDeposit:!1,showModifyDepositLog:!1,showSingleChannelSet:!1,showSingleFeeSet:!1,showModifyPassword:!1,showClearAccount:!1,showBindAircraftDialog:!1,showUserGroupDialog:!1,showDetailDialog:!1,showTotalDetailDialog:!1,currentRow:{},freezeStatus:""}),Q=(e,a)=>{let o="";return(0===a?type_options:pay_type_options).some(a=>{if(a.value===e)return o=a.label,!0}),o},ee=()=>{K.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),oe()};t(async()=>{Z.value=[],(await M({})).data.forEach(e=>{Z.value.push({label:e.name,value:e.id})}),oe()});let ae=!1;const oe=()=>{let e={limit:K.per_page,page:K.page,status:K.freezeStatus},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(K.searchFields);z(Object.assign(e,a)).then(e=>{K.tableData=e.data,K.total=e.total,clearInterval(ie.value),J.value=e.system_clear_status,1==e.system_clear_status&&(H.value="danger",q.value="日切清账中,所有支付通道已关闭",ae||(pe(),ae=!0)),2==e.system_clear_status&&(H.value="success",q.value="日切清账完成,请手动点击开启所有通道")}).catch(()=>{K.loading=!1})},te=e=>{K.selectData=e},le=()=>{let e={username:K.addForm.values.username,name:K.addForm.values.name,user_type:K.addForm.values.user_type,password:K.addForm.values.password,login_white_ip:K.addForm.values.login_white_ip};K.addForm.values.id?(e.id=K.addForm.values.id,T(e).then(e=>{K.showAddDialog=!1,oe()})):P(e).then(e=>{K.showAddDialog=!1,oe()})},se=(e,a)=>{f.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{B({id:e.id,status:1==a?e.status:e.recharge_status,type:a}).then(e=>{y.success("修改成功!")})}).catch(()=>{1==a?e.status=1==e.status?2:1:e.recharge_status=1==e.recharge_status?2:1})},re=()=>{oe()};let ie=a(null);const ne=(e,a)=>{I({type:e,clear_ids:a}).then(e=>{oe(),clearInterval(ie.value),pe()})},pe=()=>{ie.value=setInterval(()=>{oe()},1e4)};return N({getFreezeUserList:()=>{K.loading=!0,K.page=1,K.freezeStatus=2,oe()}}),(e,a)=>{const o=c,t=D,M=_,z=u,B=v,T=g;return s(),l("div",null,[r(B,{type:"export",columns:m(K).columns,searchFields:m(K).searchFields,"onUpdate:searchFields":a[2]||(a[2]=e=>m(K).searchFields=e),data:m(K).tableData,per_page:m(K).per_page,"onUpdate:per_page":a[3]||(a[3]=e=>m(K).per_page=e),page:m(K).page,"onUpdate:page":a[4]||(a[4]=e=>m(K).page=e),total:m(K).total,onGetTableData:oe,onResetForm:ee,loading:m(K).loading,showSelection:!0,selectionChange:te,showRightRefreshSlot:!1},{btns:n(()=>[d("div",null,[r(o,{type:m(H),onClick:a[0]||(a[0]=e=>(()=>{if(1==J.value)return y.warning("清账中,请勿重复点击");K.showClearAccount=!0})())},{default:n(()=>[i(p(m(q)),1)]),_:1},8,["type"]),r(o,{type:"primary",onClick:a[1]||(a[1]=e=>(K.showAddDialog=!0,K.addForm.values.id="",K.addForm.fields[0].disabled=!1,void(K.addForm.title="新增用户")))},{default:n(()=>a[17]||(a[17]=[i(" 添加用户 ")])),_:1,__:[17]})])]),count:n(({row:e})=>[d("div",V,[a[25]||(a[25]=i(" 商户数量: ")),r(t,{type:"primary"},{default:n(()=>a[18]||(a[18]=[i("1310")])),_:1,__:[18]}),a[26]||(a[26]=i(" 总预付: ")),r(t,{type:"primary"},{default:n(()=>a[19]||(a[19]=[i("14589222.2195")])),_:1,__:[19]}),a[27]||(a[27]=i(" 可提现金额:")),r(t,{type:"success"},{default:n(()=>a[20]||(a[20]=[i("9679160.4464")])),_:1,__:[20]}),a[28]||(a[28]=i(" 剩余预付: ")),r(t,{type:"primary"},{default:n(()=>a[21]||(a[21]=[i("4836605.1411")])),_:1,__:[21]}),a[29]||(a[29]=i(" 冻结金额:")),r(t,{type:"danger"},{default:n(()=>a[22]||(a[22]=[i("73456.632")])),_:1,__:[22]}),a[30]||(a[30]=i(" 已结算保证金:")),r(t,{type:"primary"},{default:n(()=>a[23]||(a[23]=[i("0")])),_:1,__:[23]}),a[31]||(a[31]=i(" 冻结保证金:")),r(t,{type:"warning"},{default:n(()=>a[24]||(a[24]=[i("0")])),_:1,__:[24]})])]),username_slot:n(({row:e})=>[d("div",null,p(e.username),1),d("div",G,p(m(L).userType.find(a=>a.value==(null==e?void 0:e.user_type)).label),1)]),group_slot:n(({row:e})=>[(s(!0),l(w,null,h(e.groupInfo,e=>(s(),l("div",null,p(e.name),1))),256))]),account_total_slot:n(({row:e})=>[d("div",{onClick:a=>(e=>{K.showTotalDetailDialog=!0,K.currentRow=e})(e)},[d("div",null,[a[33]||(a[33]=i("可结算")),r(t,{type:"success"},{default:n(()=>a[32]||(a[32]=[i("1000.00")])),_:1,__:[32]})]),d("div",null,[a[35]||(a[35]=i("昨日")),r(t,{type:"success"},{default:n(()=>a[34]||(a[34]=[i("1000.00")])),_:1,__:[34]})])],8,E)]),account_type_slot:n(({row:e})=>[d("div",null,p(Q(e.account_type,0)),1)]),pay_type_slot:n(({row:e})=>[d("div",null,p(Q(e.pay_type,1)),1)]),modify_deposit_slot:n(({row:e})=>[d("div",null,[r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showModifyDeposit=!0,K.currentRow=e})(e)},{default:n(()=>a[36]||(a[36]=[i("加减预付")])),_:2,__:[36]},1032,["onClick"])]),d("div",O,[r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showModifyDepositLog=!0,K.currentRow=e})(e)},{default:n(()=>a[37]||(a[37]=[i("预付记录")])),_:2,__:[37]},1032,["onClick"])])]),channel_slot:n(({row:e})=>[r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showSingleChannelSet=!0,K.currentRow=e})(e)},{default:n(()=>a[38]||(a[38]=[i("通道")])),_:2,__:[38]},1032,["onClick"])]),fee_slot:n(({row:e})=>[r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showSingleFeeSet=!0,K.currentRow=e})(e)},{default:n(()=>a[39]||(a[39]=[i("费率")])),_:2,__:[39]},1032,["onClick"])]),status_slot:n(({row:e})=>[d("div",null,[a[40]||(a[40]=i("状态: ")),r(M,{onChange:a=>se(e,1),modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-value":1,"inactive-value":2,"active-text":"正常","inactive-text":"冻结"},null,8,["onChange","modelValue","onUpdate:modelValue"])]),d("div",null,[a[41]||(a[41]=i("充值: ")),r(M,{onChange:a=>se(e,2),modelValue:e.recharge_status,"onUpdate:modelValue":a=>e.recharge_status=a,"inline-prompt":"","active-value":1,"inactive-value":2,"active-text":"开启","inactive-text":"关闭"},null,8,["onChange","modelValue","onUpdate:modelValue"])])]),operate_slot:n(({row:e})=>[d("div",null,[r(z,null,{default:n(()=>[r(o,{type:1==e.clear_status?"danger":"warning",size:"small",onClick:a=>(e=>{if("1"==e.clear_status)return y.warning("清账中,请勿重复点击");f.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{y.success("清账中"),ne(3,[e.shop_id])}).catch(()=>{})})(e)},{default:n(()=>[i(p(1==e.clear_status?"清账中":"清账"),1)]),_:2},1032,["type","onClick"]),r(o,{type:"primary",size:"small",onClick:e=>{K.showBindAircraftDialog=!0}},{default:n(()=>a[42]||(a[42]=[i("飞机")])),_:2,__:[42]},1032,["onClick"]),r(o,{type:"primary",size:"small",onClick:e=>(()=>{const e=X.resolve("/login/payer");window.open(e.href,"_blank")})()},{default:n(()=>a[43]||(a[43]=[i("登录")])),_:2,__:[43]},1032,["onClick"]),r(o,{type:"primary",size:"small",onClick:e=>{K.showDetailDialog=!0}},{default:n(()=>a[44]||(a[44]=[i("资料")])),_:2,__:[44]},1032,["onClick"])]),_:2},1024)]),d("div",W,[r(z,null,{default:n(()=>[r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showModifyPassword=!0,K.currentRow=e})(e)},{default:n(()=>a[45]||(a[45]=[i("密码")])),_:2,__:[45]},1032,["onClick"]),r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showAddDialog=!0,K.addForm.values.id=e.id,K.addForm.values.username=e.username,K.addForm.values.name=e.name,K.addForm.values.user_type=e.user_type,K.addForm.values.login_white_ip=e.login_white_ip,K.addForm.values.callback_white_ip=e.callback_white_ip,K.addForm.fields[0].disabled=!0,K.addForm.title="编辑用户"})(e)},{default:n(()=>a[46]||(a[46]=[i("编辑")])),_:2,__:[46]},1032,["onClick"]),r(o,{type:"primary",size:"small",onClick:a=>(e=>{K.showUserGroupDialog=!0,K.currentRow=e})(e)},{default:n(()=>a[47]||(a[47]=[i("分组")])),_:2,__:[47]},1032,["onClick"]),r(o,{type:"primary",size:"small",onClick:e=>{f.alert("确定删除当前用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{y.success("删除成功!")}).catch(()=>{})}},{default:n(()=>a[48]||(a[48]=[i("删除")])),_:2,__:[48]},1032,["onClick"])]),_:2},1024)])]),login_time_slot:n(({row:e})=>[r(t,null,{default:n(()=>[i(p(null==e?void 0:e.login_time),1)]),_:2},1024)]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),r(T,{showDialog:m(K).showAddDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>m(K).showAddDialog=e),formData:m(K).addForm,"onUpdate:formData":a[6]||(a[6]=e=>m(K).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:n(()=>[r(o,{type:"primary",loading:m(K).btnLoading,onClick:le},{default:n(()=>a[49]||(a[49]=[i("确定")])),_:1,__:[49]},8,["loading"])]),_:1},8,["showDialog","formData"]),r(C,{showModifyDeposit:m(K).showModifyDeposit,"onUpdate:showModifyDeposit":a[7]||(a[7]=e=>m(K).showModifyDeposit=e),currentRow:m(K).currentRow},null,8,["showModifyDeposit","currentRow"]),r(b,{showModifyDepositLog:m(K).showModifyDepositLog,"onUpdate:showModifyDepositLog":a[8]||(a[8]=e=>m(K).showModifyDepositLog=e),currentRow:m(K).currentRow},null,8,["showModifyDepositLog","currentRow"]),r(F,{showSingleChannelSet:m(K).showSingleChannelSet,"onUpdate:showSingleChannelSet":a[9]||(a[9]=e=>m(K).showSingleChannelSet=e),currentRow:m(K).currentRow},null,8,["showSingleChannelSet","currentRow"]),r(R,{showSingleFeeSet:m(K).showSingleFeeSet,"onUpdate:showSingleFeeSet":a[10]||(a[10]=e=>m(K).showSingleFeeSet=e),currentRow:m(K).currentRow},null,8,["showSingleFeeSet","currentRow"]),r(k,{showModifyPassword:m(K).showModifyPassword,"onUpdate:showModifyPassword":a[11]||(a[11]=e=>m(K).showModifyPassword=e),currentRow:m(K).currentRow},null,8,["showModifyPassword","currentRow"]),r(S,{showClearAccount:m(K).showClearAccount,"onUpdate:showClearAccount":a[12]||(a[12]=e=>m(K).showClearAccount=e),onClearAccount:ne},null,8,["showClearAccount"]),r(j,{showBindAircraftDialog:m(K).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[13]||(a[13]=e=>m(K).showBindAircraftDialog=e)},null,8,["showBindAircraftDialog"]),r(U,{showUserGroupDialog:m(K).showUserGroupDialog,"onUpdate:showUserGroupDialog":a[14]||(a[14]=e=>m(K).showUserGroupDialog=e),currentRow:m(K).currentRow,onRefreshLoad:re},null,8,["showUserGroupDialog","currentRow"]),r(x,{showDetailDialog:m(K).showDetailDialog,"onUpdate:showDetailDialog":a[15]||(a[15]=e=>m(K).showDetailDialog=e)},null,8,["showDetailDialog"]),r(A,{showTotalDetailDialog:m(K).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":a[16]||(a[16]=e=>m(K).showTotalDetailDialog=e),currentRow:m(K).currentRow},null,8,["showTotalDetailDialog","currentRow"]),a[50]||(a[50]=i('" '))])}}};export{$ as default};