import{a$ as e,r as o,ag as a,b4 as l,c as t,e as s,N as i,O as r,w as n,t as p,l as d,d8 as u,an as c,bb as _,g as w,c8 as h,a_ as m,aO as g}from"./index.D-dPCPex.js";import{_ as y}from"./index.BjoJdfQe.js";/* empty css */import{E as f}from"./el-text.G0Bzx_At.js";import D from"./modify_deposit.DZiYTZW1.js";import v from"./modify_deposit_log.2MYOvJwd.js";import b from"./single_channel_set.DDZ8lhsH.js";import C from"./single_fee_set.BRMFKUtX.js";import{g as F,M as k,c as S,e as R,a as j}from"./modify_password.BaQ8Qxjy.js";import U from"./clear_account.UzUpkWcP.js";import A from"./aircraft.BJ3aRCv4.js";import M from"./user_gorup.D4JHDNFu.js";import x from"./detail.CjHrKnbc.js";import T from"./account_total.Cry7GhVP.js";import{s as B}from"./staticData.b8Nd3Dnh.js";/* empty css */import"./el-col.B5UjR5Pf.js";import"./payee-order.BK8JYEfG.js";import"./el-card.DAxKTjhH.js";import"./settlement_log.BmH9Z3R6.js";import"./payee-channel.ve7v5XFH.js";import"./select_channel.CfRSBKR8.js";import"./handle_balance.CWXwCTSj.js";import"./freeze_balance.ehhlIG8V.js";import"./freeze_money_management.B2PlkN7I.js";import"./freeze_balance_management.Dd3tYUJh.js";const P={class:"statistics-box"},z=["onClick"],L={style:{"margin-top":"4px"}},G={__name:"user-info",setup(G){const I=e(),V=B.userType,E=o([]),O=a({columns:[{prop:"shop_id",label:"商户号",align:"center"},{prop:"username",label:"用户名",align:"center",slot:"username_slot"},{prop:"group",label:"分组",align:"center"},{prop:"",label:"预付操作",align:"center",slot:"modify_deposit_slot",width:"220"},{prop:"",label:"预付",align:"center"},{prop:"",label:"账号总额",align:"center",slot:"account_total_slot"},{prop:"",label:"通道",align:"center",slot:"channel_slot"},{prop:"",label:"费率",align:"center",slot:"fee_slot"},{prop:"",label:"状态",align:"center",slot:"status_slot"},{prop:"created_at",label:"回调IP",align:"center"},{prop:"",label:"操作",align:"center",slot:"operate_slot",width:"220"},{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:"用户类型",type:"select",prop:"status",value:"",options:V},{label:"用户分组",type:"select",prop:"status",value:"",options:E}],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:"name",type:"input",value:""},{label:"用户类别",prop:"user_type",type:"select",options:B.userType,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:{}}),W=(e,o)=>{let a="";return(0===o?type_options:pay_type_options).some(o=>{if(o.value===e)return a=o.label,!0}),a},$=()=>{O.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),J()};l(()=>{J()});const J=()=>{O.loading=!0;let e={limit:O.per_page,page:O.page},o=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(O.searchFields);F(Object.assign(e,o)).then(e=>{O.tableData=e.data,O.total=e.total,O.loading=!1}).catch(()=>{O.loading=!1})},N=e=>{O.selectData=e},Q=()=>{let e={username:O.addForm.values.username,name:O.addForm.values.name,user_type:O.addForm.values.user_type,password:O.addForm.values.password,login_white_ip:O.addForm.values.login_white_ip};O.addForm.values.id?(e.id=O.addForm.values.id,R(e).then(e=>{O.showAddDialog=!1,J()})):j(e).then(e=>{O.showAddDialog=!1,J()})};return(e,o)=>{const a=c,l=f,F=_,R=u,j=y,G=h;return s(),t("div",null,[i(j,{type:"export",columns:w(O).columns,searchFields:w(O).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>w(O).searchFields=e),data:w(O).tableData,per_page:w(O).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>w(O).per_page=e),page:w(O).page,"onUpdate:page":o[4]||(o[4]=e=>w(O).page=e),total:w(O).total,onGetTableData:J,onResetForm:$,loading:w(O).loading,showSelection:!0,selectionChange:N,showRightRefreshSlot:!1},{btns:n(()=>[d("div",null,[i(a,{type:"warning",onClick:o[0]||(o[0]=e=>{O.showClearAccount=!0})},{default:n(()=>o[17]||(o[17]=[r(" 日切清账 ")])),_:1,__:[17]}),i(a,{type:"primary",onClick:o[1]||(o[1]=e=>(O.showAddDialog=!0,O.addForm.values.id="",void(O.addForm.fields[0].disabled=!1)))},{default:n(()=>o[18]||(o[18]=[r(" 添加用户 ")])),_:1,__:[18]})])]),count:n(({row:e})=>[d("div",P,[o[26]||(o[26]=r(" 商户数量: ")),i(l,{type:"primary"},{default:n(()=>o[19]||(o[19]=[r("1310")])),_:1,__:[19]}),o[27]||(o[27]=r(" 总预付: ")),i(l,{type:"primary"},{default:n(()=>o[20]||(o[20]=[r("14589222.2195")])),_:1,__:[20]}),o[28]||(o[28]=r(" 可提现金额:")),i(l,{type:"success"},{default:n(()=>o[21]||(o[21]=[r("9679160.4464")])),_:1,__:[21]}),o[29]||(o[29]=r(" 剩余预付: ")),i(l,{type:"primary"},{default:n(()=>o[22]||(o[22]=[r("4836605.1411")])),_:1,__:[22]}),o[30]||(o[30]=r(" 冻结金额:")),i(l,{type:"danger"},{default:n(()=>o[23]||(o[23]=[r("73456.632")])),_:1,__:[23]}),o[31]||(o[31]=r(" 已结算保证金:")),i(l,{type:"primary"},{default:n(()=>o[24]||(o[24]=[r("0")])),_:1,__:[24]}),o[32]||(o[32]=r(" 冻结保证金:")),i(l,{type:"warning"},{default:n(()=>o[25]||(o[25]=[r("0")])),_:1,__:[25]})])]),username_slot:n(({row:e})=>[d("div",null,p(e.username),1),d("div",null,p(w(B).userType.find(o=>o.value==(null==e?void 0:e.user_type)).label),1)]),account_total_slot:n(({row:e})=>[d("div",{onClick:o=>(e=>{O.showTotalDetailDialog=!0,O.currentRow=e})(e)},[d("div",null,[o[34]||(o[34]=r("可结算")),i(l,{type:"success"},{default:n(()=>o[33]||(o[33]=[r("1000.00")])),_:1,__:[33]})]),d("div",null,[o[36]||(o[36]=r("昨日")),i(l,{type:"success"},{default:n(()=>o[35]||(o[35]=[r("1000.00")])),_:1,__:[35]})])],8,z)]),account_type_slot:n(({row:e})=>[d("div",null,p(W(e.account_type,0)),1)]),pay_type_slot:n(({row:e})=>[d("div",null,p(W(e.pay_type,1)),1)]),modify_deposit_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{O.showModifyDeposit=!0,O.currentRow=e})(e)},{default:n(()=>o[37]||(o[37]=[r("加减预付")])),_:2,__:[37]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{O.showModifyDepositLog=!0,O.currentRow=e})(e)},{default:n(()=>o[38]||(o[38]=[r("预付记录")])),_:2,__:[38]},1032,["onClick"])]),channel_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{O.showSingleChannelSet=!0,O.currentRow=e})(e)},{default:n(()=>o[39]||(o[39]=[r("通道")])),_:2,__:[39]},1032,["onClick"])]),fee_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:e=>{O.showSingleFeeSet=!0}},{default:n(()=>o[40]||(o[40]=[r("费率")])),_:2,__:[40]},1032,["onClick"])]),status_slot:n(({row:e})=>[d("div",null,[o[41]||(o[41]=r("状态: ")),i(F,{onChange:o=>(e=>{m.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{S({id:e.id,status:e.status}).then(e=>{g.success("修改成功!")})}).catch(()=>{e.status=1==e.status?2:1})})(e),modelValue:e.status,"onUpdate:modelValue":o=>e.status=o,"inline-prompt":"","active-value":1,"inactive-value":2,"active-text":"正常","inactive-text":"冻结"},null,8,["onChange","modelValue","onUpdate:modelValue"])]),d("div",null,[o[42]||(o[42]=r("充值: ")),i(F,{modelValue:e.status,"onUpdate:modelValue":o=>e.status=o,"inline-prompt":"","active-value":1,"inactive-value":2,"active-text":"开启","inactive-text":"关闭"},null,8,["modelValue","onUpdate:modelValue"])])]),operate_slot:n(({row:e})=>[d("div",null,[i(R,null,{default:n(()=>[i(a,{type:"warning",size:"small",onClick:e=>{m.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{g.success("清零成功!")}).catch(()=>{})}},{default:n(()=>o[43]||(o[43]=[r("清账")])),_:2,__:[43]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{O.showBindAircraftDialog=!0}},{default:n(()=>o[44]||(o[44]=[r("飞机")])),_:2,__:[44]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>(()=>{const e=I.resolve("/login/payer");window.open(e.href,"_blank")})()},{default:n(()=>o[45]||(o[45]=[r("登录")])),_:2,__:[45]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{O.showDetailDialog=!0}},{default:n(()=>o[46]||(o[46]=[r("资料")])),_:2,__:[46]},1032,["onClick"])]),_:2},1024)]),d("div",L,[i(R,null,{default:n(()=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{O.showModifyPassword=!0,O.currentRow=e})(e)},{default:n(()=>o[47]||(o[47]=[r("密码")])),_:2,__:[47]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{O.showAddDialog=!0,O.addForm.values.id=e.id,O.addForm.values.username=e.username,O.addForm.values.name=e.name,O.addForm.values.user_type=e.user_type,O.addForm.values.login_white_ip=e.login_white_ip,O.addForm.values.callback_white_ip=e.callback_white_ip,O.addForm.fields[0].disabled=!0})(e)},{default:n(()=>o[48]||(o[48]=[r("编辑")])),_:2,__:[48]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{O.showUserGroupDialog=!0}},{default:n(()=>o[49]||(o[49]=[r("分组")])),_:2,__:[49]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{m.alert("确定删除当前用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{g.success("删除成功!")}).catch(()=>{})}},{default:n(()=>o[50]||(o[50]=[r("删除")])),_:2,__:[50]},1032,["onClick"])]),_:2},1024)])]),login_time_slot:n(({row:e})=>[i(l,null,{default:n(()=>[r(p(null==e?void 0:e.login_time),1)]),_:2},1024)]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),i(G,{showDialog:w(O).showAddDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>w(O).showAddDialog=e),formData:w(O).addForm,"onUpdate:formData":o[6]||(o[6]=e=>w(O).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:n(()=>[i(a,{type:"primary",loading:w(O).btnLoading,onClick:Q},{default:n(()=>o[51]||(o[51]=[r("确定")])),_:1,__:[51]},8,["loading"])]),_:1},8,["showDialog","formData"]),i(D,{showModifyDeposit:w(O).showModifyDeposit,"onUpdate:showModifyDeposit":o[7]||(o[7]=e=>w(O).showModifyDeposit=e),currentRow:w(O).currentRow},null,8,["showModifyDeposit","currentRow"]),i(v,{showModifyDepositLog:w(O).showModifyDepositLog,"onUpdate:showModifyDepositLog":o[8]||(o[8]=e=>w(O).showModifyDepositLog=e),currentRow:w(O).currentRow},null,8,["showModifyDepositLog","currentRow"]),i(b,{showSingleChannelSet:w(O).showSingleChannelSet,"onUpdate:showSingleChannelSet":o[9]||(o[9]=e=>w(O).showSingleChannelSet=e),currentRow:w(O).currentRow},null,8,["showSingleChannelSet","currentRow"]),i(C,{showSingleFeeSet:w(O).showSingleFeeSet,"onUpdate:showSingleFeeSet":o[10]||(o[10]=e=>w(O).showSingleFeeSet=e)},null,8,["showSingleFeeSet"]),i(k,{showModifyPassword:w(O).showModifyPassword,"onUpdate:showModifyPassword":o[11]||(o[11]=e=>w(O).showModifyPassword=e),currentRow:w(O).currentRow},null,8,["showModifyPassword","currentRow"]),i(U,{showClearAccount:w(O).showClearAccount,"onUpdate:showClearAccount":o[12]||(o[12]=e=>w(O).showClearAccount=e)},null,8,["showClearAccount"]),i(A,{showBindAircraftDialog:w(O).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":o[13]||(o[13]=e=>w(O).showBindAircraftDialog=e)},null,8,["showBindAircraftDialog"]),i(M,{showUserGroupDialog:w(O).showUserGroupDialog,"onUpdate:showUserGroupDialog":o[14]||(o[14]=e=>w(O).showUserGroupDialog=e)},null,8,["showUserGroupDialog"]),i(x,{showDetailDialog:w(O).showDetailDialog,"onUpdate:showDetailDialog":o[15]||(o[15]=e=>w(O).showDetailDialog=e)},null,8,["showDetailDialog"]),i(T,{showTotalDetailDialog:w(O).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":o[16]||(o[16]=e=>w(O).showTotalDetailDialog=e),currentRow:w(O).currentRow},null,8,["showTotalDetailDialog","currentRow"]),o[52]||(o[52]=r('" '))])}}};export{G as default};