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 h,c8 as w,a_ as m,aO as g}from"./index.Cf-jAOZU.js";import{_ as y}from"./index.Bg1VCFas.js";/* empty css */import{E as f}from"./el-text.nwqXyDtv.js";import D from"./modify_deposit.DN5HoL5U.js";import v from"./modify_deposit_log.Ni9i26KT.js";import b from"./single_channel_set.91KoKuK2.js";import C from"./single_fee_set.g_PqQZ1K.js";import F from"./modify_password.CZkRgBcv.js";import k from"./clear_account.CcHvi2KU.js";import R from"./aircraft.CqDW9JbC.js";import S from"./user_gorup.B-xx78Wd.js";import j from"./detail.BVB-fGfJ.js";import U from"./account_total.VRDgsBZc.js";import{a as A,c as M,b as x,d as T}from"./payee-user.D3C39I4M.js";import{s as B}from"./staticData.b8Nd3Dnh.js";/* empty css */import"./el-col.CQAFfm4Z.js";import"./payee-order.CSxBfFYn.js";import"./el-card.C6yDa8ld.js";import"./settlement_log.B2FrrGJm.js";import"./payee-channel.m5RMvef0.js";import"./select_channel.t2QwVqtN.js";import"./handle_balance.CCSNuzL3.js";import"./freeze_balance.CU4AqLnw.js";import"./freeze_money_management.BjXuVYyN.js";import"./freeze_balance_management.DLUmHv69.js";const z=["onClick"],P={style:{"margin-top":"4px"}},L={__name:"freeze-user",setup(L){const G=e(),I=B.userType,V=o([]),E=a({columns:[{prop:"shop_id",label:"商户号",align:"center",width:"120"},{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:"user_type",value:"",options:I},{label:"用户分组",type:"select",prop:"user_group",value:"",options:V}],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},W=()=>{E.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),$()};l(()=>{$()});const $=()=>{E.loading=!0;let e={limit:E.per_page,page:E.page,status:2},o=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(E.searchFields);A(Object.assign(e,o)).then(e=>{E.tableData=e.data,E.total=e.total,E.loading=!1}).catch(()=>{E.loading=!1})},K=e=>{E.selectData=e},N=()=>{let e={username:E.addForm.values.username,name:E.addForm.values.name,user_type:E.addForm.values.user_type,password:E.addForm.values.password,login_white_ip:E.addForm.values.login_white_ip};E.addForm.values.id?(e.id=E.addForm.values.id,x(e).then(e=>{E.showAddDialog=!1,$()})):T(e).then(e=>{E.showAddDialog=!1,$()})},Q=(e,o)=>{m.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{M({id:e.id,status:1==o?e.status:e.recharge_status,type:o}).then(e=>{g.success("修改成功!")})}).catch(()=>{1==o?e.status=1==e.status?2:1:e.recharge_status=1==e.recharge_status?2:1})};return(e,o)=>{const a=c,l=f,A=_,M=u,x=y,T=w;return s(),t("div",null,[i(x,{type:"export",columns:h(E).columns,searchFields:h(E).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>h(E).searchFields=e),data:h(E).tableData,per_page:h(E).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>h(E).per_page=e),page:h(E).page,"onUpdate:page":o[4]||(o[4]=e=>h(E).page=e),total:h(E).total,onGetTableData:$,onResetForm:W,loading:h(E).loading,showSelection:!0,selectionChange:K,showRightRefreshSlot:!1},{btns:n(()=>[d("div",null,[i(a,{type:"warning",onClick:o[0]||(o[0]=e=>{E.showClearAccount=!0})},{default:n(()=>o[17]||(o[17]=[r(" 日切清账 ")])),_:1,__:[17]}),i(a,{type:"primary",onClick:o[1]||(o[1]=e=>(E.showAddDialog=!0,E.addForm.values.id="",void(E.addForm.fields[0].disabled=!1)))},{default:n(()=>o[18]||(o[18]=[r(" 添加用户 ")])),_:1,__:[18]})])]),username_slot:n(({row:e})=>[d("div",null,p(e.username),1),d("div",null,p(h(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=>{E.showTotalDetailDialog=!0,E.currentRow=e})(e)},[d("div",null,[o[20]||(o[20]=r("可结算")),i(l,{type:"success"},{default:n(()=>o[19]||(o[19]=[r("1000.00")])),_:1,__:[19]})]),d("div",null,[o[22]||(o[22]=r("昨日")),i(l,{type:"success"},{default:n(()=>o[21]||(o[21]=[r("1000.00")])),_:1,__:[21]})])],8,z)]),account_type_slot:n(({row:e})=>[d("div",null,p(O(e.account_type,0)),1)]),pay_type_slot:n(({row:e})=>[d("div",null,p(O(e.pay_type,1)),1)]),modify_deposit_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{E.showModifyDeposit=!0,E.currentRow=e})(e)},{default:n(()=>o[23]||(o[23]=[r("加减预付")])),_:2,__:[23]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{E.showModifyDepositLog=!0,E.currentRow=e})(e)},{default:n(()=>o[24]||(o[24]=[r("预付记录")])),_:2,__:[24]},1032,["onClick"])]),channel_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{E.showSingleChannelSet=!0,E.currentRow=e})(e)},{default:n(()=>o[25]||(o[25]=[r("通道")])),_:2,__:[25]},1032,["onClick"])]),fee_slot:n(({row:e})=>[i(a,{type:"primary",size:"small",onClick:e=>{E.showSingleFeeSet=!0}},{default:n(()=>o[26]||(o[26]=[r("费率")])),_:2,__:[26]},1032,["onClick"])]),status_slot:n(({row:e})=>[d("div",null,[o[27]||(o[27]=r("状态: ")),i(A,{onChange:o=>Q(e,1),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[28]||(o[28]=r("充值: ")),i(A,{onChange:o=>Q(e,2),modelValue:e.recharge_status,"onUpdate:modelValue":o=>e.recharge_status=o,"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,[i(M,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[29]||(o[29]=[r("清账")])),_:2,__:[29]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{E.showBindAircraftDialog=!0}},{default:n(()=>o[30]||(o[30]=[r("飞机")])),_:2,__:[30]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>(()=>{const e=G.resolve("/login/payer");window.open(e.href,"_blank")})()},{default:n(()=>o[31]||(o[31]=[r("登录")])),_:2,__:[31]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{E.showDetailDialog=!0}},{default:n(()=>o[32]||(o[32]=[r("资料")])),_:2,__:[32]},1032,["onClick"])]),_:2},1024)]),d("div",P,[i(M,null,{default:n(()=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{E.showModifyPassword=!0,E.currentRow=e})(e)},{default:n(()=>o[33]||(o[33]=[r("密码")])),_:2,__:[33]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{E.showAddDialog=!0,E.addForm.values.id=e.id,E.addForm.values.username=e.username,E.addForm.values.name=e.name,E.addForm.values.user_type=e.user_type,E.addForm.values.login_white_ip=e.login_white_ip,E.addForm.values.callback_white_ip=e.callback_white_ip,E.addForm.fields[0].disabled=!0})(e)},{default:n(()=>o[34]||(o[34]=[r("编辑")])),_:2,__:[34]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{E.showUserGroupDialog=!0}},{default:n(()=>o[35]||(o[35]=[r("分组")])),_:2,__:[35]},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[36]||(o[36]=[r("删除")])),_:2,__:[36]},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(T,{showDialog:h(E).showAddDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>h(E).showAddDialog=e),formData:h(E).addForm,"onUpdate:formData":o[6]||(o[6]=e=>h(E).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:n(()=>[i(a,{type:"primary",loading:h(E).btnLoading,onClick:N},{default:n(()=>o[37]||(o[37]=[r("确定")])),_:1,__:[37]},8,["loading"])]),_:1},8,["showDialog","formData"]),i(D,{showModifyDeposit:h(E).showModifyDeposit,"onUpdate:showModifyDeposit":o[7]||(o[7]=e=>h(E).showModifyDeposit=e),currentRow:h(E).currentRow},null,8,["showModifyDeposit","currentRow"]),i(v,{showModifyDepositLog:h(E).showModifyDepositLog,"onUpdate:showModifyDepositLog":o[8]||(o[8]=e=>h(E).showModifyDepositLog=e),currentRow:h(E).currentRow},null,8,["showModifyDepositLog","currentRow"]),i(b,{showSingleChannelSet:h(E).showSingleChannelSet,"onUpdate:showSingleChannelSet":o[9]||(o[9]=e=>h(E).showSingleChannelSet=e),currentRow:h(E).currentRow},null,8,["showSingleChannelSet","currentRow"]),i(C,{showSingleFeeSet:h(E).showSingleFeeSet,"onUpdate:showSingleFeeSet":o[10]||(o[10]=e=>h(E).showSingleFeeSet=e),currentRow:h(E).currentRow},null,8,["showSingleFeeSet","currentRow"]),i(F,{showModifyPassword:h(E).showModifyPassword,"onUpdate:showModifyPassword":o[11]||(o[11]=e=>h(E).showModifyPassword=e),currentRow:h(E).currentRow},null,8,["showModifyPassword","currentRow"]),i(k,{showClearAccount:h(E).showClearAccount,"onUpdate:showClearAccount":o[12]||(o[12]=e=>h(E).showClearAccount=e)},null,8,["showClearAccount"]),i(R,{showBindAircraftDialog:h(E).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":o[13]||(o[13]=e=>h(E).showBindAircraftDialog=e)},null,8,["showBindAircraftDialog"]),i(S,{showUserGroupDialog:h(E).showUserGroupDialog,"onUpdate:showUserGroupDialog":o[14]||(o[14]=e=>h(E).showUserGroupDialog=e)},null,8,["showUserGroupDialog"]),i(j,{showDetailDialog:h(E).showDetailDialog,"onUpdate:showDetailDialog":o[15]||(o[15]=e=>h(E).showDetailDialog=e)},null,8,["showDetailDialog"]),i(U,{showTotalDetailDialog:h(E).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":o[16]||(o[16]=e=>h(E).showTotalDetailDialog=e),currentRow:h(E).currentRow},null,8,["showTotalDetailDialog","currentRow"]),o[38]||(o[38]=r('" '))])}}};export{L as default};