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