sf_web_dist/js/user-info.1759119817149CXD0Gnq_.js
2025-09-29 12:25:07 +08:00

2 lines
17 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{bo as e,aH as a,a$ as o,r as t,ag as l,b4 as s,d6 as r,dj as i,dk as n,c as u,e as d,N as p,O as c,w as _,t as m,l as w,dl as h,an as g,m as y,al as f,bb as v,g as D,a7 as b,a8 as C,c9 as F,aO as k,a_ as R,dm as S,dn as x,dp as j,dq as U,dr as A,ds as B,dt as z,du as M}from"./index.1759119817149BpLSBdxM.js";import{_ as T}from"./index.1759119817149k28QlInN.js";/* empty css */import{E as I}from"./el-text.1759119817149Cglo3WDz.js";import P from"./modify_deposit.1759119817149qyC_6EU0.js";import L from"./modify_deposit_log.1759119817149uh0vzzou.js";import V from"./single_channel_set.1759119817149V2KHSGgt.js";import G from"./single_fee_set.1759119817149BxER8qP8.js";import E from"./modify_password.1759119817149CE594MGG.js";import O from"./clear_account.1759119817149BWA4uEk5.js";import W from"./aircraft.1759119817149Bi343_2u.js";import $ from"./user_gorup.1759119817149Bv6WBDOz.js";import q from"./detail.1759119817149U3MuL4dd.js";import H from"./account_total.1759119817149CRCyLYMP.js";import{b as N}from"./payee-order.1759119817149BjGSii-J.js";import{s as X}from"./staticData.17591198171498wZxkmL4.js";import{p as Z}from"./common.1759119817149CCwWzMi9.js";/* empty css */import"./el-col.17591198171498F0AMze2.js";import"./el-card.1759119817149CJhFE66i.js";import"./settlement_log.1759119817149CSww5s4W.js";import"./payee-count.1759119817149C596bXaW.js";import"./lodash.1759119817149rNaJAojs.js";import"./select_channel.1759119817149iPyxEk2T.js";import"./el-link.1759119817149DQf1AWNF.js";import"./handle_balance.1759119817149DOX-xbJ-.js";import"./freeze_balance.1759119817149Ck-gajJP.js";import"./freeze_money_management.17591198171498jtlXALo.js";import"./freeze_balance_management.1759119817149BrLlokbE.js";const J={class:"statistics-box"},K={style:{"font-size":"10px"}},Q={style:{"font-size":"10px"}},Y={style:{"margin-top":"4px"}},ee={style:{"margin-top":"4px"}},ae={__name:"user-info",setup(ae,{expose:oe}){e(),a();const te=o(),le=X.userType,se=t([]),re=t("日切清账,关闭通道"),ie=t("warning"),ne=t("0"),ue=l({sum_data:[],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",slot:"modify_deposit_log_slot"},{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:"callback_white_ip",label:"回调IP",align:"center"},{prop:"",label:"操作",align:"center",slot:"operate_slot",width:"280"},{prop:"create_time",label:"注册时间",align:"center"},{prop:"login_time",label:"最后登录时间",align:"center",slot:"login_time_slot"}],tableData:[],searchFields:[{label:"用户名称",type:"input",prop:"username",value:""},{label:"商户号",prop:"shop_id",type:"input",value:""},{label:"用户定制类型",prop:"user_type",type:"select",value:"",options:le},{label:"用户分组",type:"select",prop:"user_group",value:"",options:se},{label:"用户IP",type:"input",prop:"callback_white_ip",value:""}],total:0,page:1,per_page:50,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被打则及时变更不影响其他商户用英文逗号隔开"},{label:"商户等级",type:"radio",prop:"is_new",value:"",options:[{label:"新用户",value:1},{label:"信任用户",value:2}]}],rules:{},values:{username:"",name:"",user_type:"",password:"",login_white_ip:"",callback_white_ip:"",is_new:"",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:""}),de=(e,a)=>{let o="";return(0===a?type_options:pay_type_options).some(a=>{if(a.value===e)return o=a.label,!0}),o},pe=()=>{ue.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),me()};s(async()=>{se.value=[],(await r({})).data.forEach(e=>{se.value.push({label:e.name,value:e.id})}),me(),_e()}),i(()=>{clearInterval(ve.value)});let ce=!1;const _e=()=>{N().then(e=>{0!=e.system_clear_status&&2!=e.system_clear_status||clearInterval(ve.value),ne.value=e.system_clear_status,1==e.system_clear_status&&(ie.value="danger",re.value="日切清账中,所有支付通道已关闭",ce||(be(),ce=!0)),2==e.system_clear_status&&(ie.value="success",re.value="日切清账完成00:00系统自动开启所有通道")})};const me=()=>{let e={limit:ue.per_page,page:ue.page,status:ue.freezeStatus},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(ue.searchFields);a.user_type?(e.private_status=1==a.user_type?1:"",e.private_pr=2==a.user_type?1:""):(e.private_status="",e.private_pr=""),delete a.user_type,n(Object.assign(e,a)).then(e=>{ue.tableData=e.data,ue.total=e.total,ue.sum_data=e.sum_data}).catch(()=>{ue.loading=!1})},we=e=>{ue.selectData=e},he=()=>{M({onoff:"on"}).then(e=>{_e(),me(),re.value="日切清账,关闭通道",ie.value="warning",clearInterval(ve.value)}).catch(()=>{})},ge=()=>{let e={username:ue.addForm.values.username,name:ue.addForm.values.name,user_type:ue.addForm.values.user_type,password:ue.addForm.values.password,login_white_ip:ue.addForm.values.login_white_ip,callback_white_ip:ue.addForm.values.callback_white_ip,is_new:ue.addForm.values.is_new};if(ue.addForm.values.id)e.id=ue.addForm.values.id,A(e).then(e=>{ue.showAddDialog=!1,me()});else{if(""==ue.addForm.values.is_new)return k.error("请选择用户等级");B(e).then(e=>{ue.showAddDialog=!1,me()})}},ye=(e,a)=>{R.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{U({id:e.id,status:1==a?e.status:e.recharge_status,type:a}).then(e=>{k.success("修改成功!")})}).catch(()=>{1==a?e.status=1==e.status?2:1:e.recharge_status=1==e.recharge_status?2:1})},fe=()=>{me()};let ve=t(null);const De=(e,a)=>{z({type:e,clear_ids:a}).then(e=>{_e(),be(),setTimeout(()=>{me()},1e3)})},be=()=>{clearInterval(ve.value),ve.value=setInterval(()=>{_e()},1e4)};return oe({getFreezeUserList:()=>{ue.page=1,ue.freezeStatus=2,me()}}),(e,a)=>{const o=g,t=I,l=v,s=h,r=T,i=F;return d(),u("div",null,[p(r,{type:"export",columns:D(ue).columns,searchFields:D(ue).searchFields,"onUpdate:searchFields":a[2]||(a[2]=e=>D(ue).searchFields=e),data:D(ue).tableData,per_page:D(ue).per_page,"onUpdate:per_page":a[3]||(a[3]=e=>D(ue).per_page=e),page:D(ue).page,"onUpdate:page":a[4]||(a[4]=e=>D(ue).page=e),total:D(ue).total,onGetTableData:me,onResetForm:pe,loading:D(ue).loading,showSelection:!0,selectionChange:we,showRightRefreshSlot:!1},{btns:_(()=>[w("div",null,[p(o,{type:D(ie),onClick:a[0]||(a[0]=e=>(()=>{if(1==ne.value)return k.warning("清账中,请勿重复点击");2!=ne.value?ue.showClearAccount=!0:R.alert("确定手动开启所有通道?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{he()}).catch(()=>{})})())},{default:_(()=>[c(m(D(re)),1)]),_:1},8,["type"]),p(o,{type:"primary",onClick:a[1]||(a[1]=e=>(ue.showAddDialog=!0,ue.addForm.values.id="",ue.addForm.values.username="",ue.addForm.values.name="",ue.addForm.values.user_type="",ue.addForm.values.login_white_ip="",ue.addForm.values.callback_white_ip="",ue.addForm.values.is_new="",ue.addForm.fields[0].disabled=!1,ue.addForm.fields[4].disabled=!1,void(ue.addForm.title="新增用户")))},{default:_(()=>a[17]||(a[17]=[c(" 添加用户 ")])),_:1,__:[17]})])]),count:_(({row:e})=>[w("div",J,[a[18]||(a[18]=c(" 商户数量: ")),p(t,{type:"primary"},{default:_(()=>[c(m(D(ue).sum_data.shop_num),1)]),_:1}),a[19]||(a[19]=c(" 总预付: ")),p(t,{type:"primary"},{default:_(()=>[c(m(D(Z)(D(ue).sum_data.sum_money)),1)]),_:1}),a[20]||(a[20]=c(" 可结算金额:")),p(t,{type:"success"},{default:_(()=>[c(m(D(Z)(D(ue).sum_data.money)),1)]),_:1}),a[21]||(a[21]=c(" 剩余预付: ")),p(t,{type:"primary"},{default:_(()=>[c(m(D(Z)(D(ue).sum_data.prepay_money)),1)]),_:1})])]),username_slot:_(({row:e})=>[w("div",null,m(e.username),1),w("div",K,m(1==e.private_pr?"定制费率用户":""),1),w("div",Q,m(1==e.private_status?"定制通道用户":""),1)]),group_slot:_(({row:e})=>[(d(!0),u(b,null,C(e.groupInfo,e=>(d(),u("div",null,m(e.name),1))),256))]),modify_deposit_log_slot:_(({row:e})=>[w("div",null,[a[22]||(a[22]=c("累计:")),p(t,{type:"success"},{default:_(()=>{var a;return[c(m(D(Z)(null==(a=null==e?void 0:e.account)?void 0:a.sum_money)||0),1)]}),_:2},1024)]),w("div",null,[a[23]||(a[23]=c("剩余:")),p(t,{type:"warning"},{default:_(()=>{var a;return[c(m(D(Z)(null==(a=null==e?void 0:e.account)?void 0:a.prepay_money)||0),1)]}),_:2},1024)])]),account_total_slot:_(({row:e})=>[w("div",null,[w("div",null,[a[24]||(a[24]=c("可结算: ")),p(t,{type:"success"},{default:_(()=>{var a;return[c(m(D(Z)(null==(a=null==e?void 0:e.account)?void 0:a.money)||0),1)]}),_:2},1024)]),w("div",null,[a[25]||(a[25]=c("昨日: ")),p(t,{type:"warning"},{default:_(()=>{var a;return[c(m(D(Z)(null==(a=null==e?void 0:e.account)?void 0:a.yesterday_money)||0),1)]}),_:2},1024)])])]),account_type_slot:_(({row:e})=>[w("div",null,m(de(e.account_type,0)),1)]),pay_type_slot:_(({row:e})=>[w("div",null,m(de(e.pay_type,1)),1)]),modify_deposit_slot:_(({row:e})=>[w("div",null,[p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showModifyDeposit=!0,ue.currentRow=e})(e)},{default:_(()=>a[26]||(a[26]=[c("加减预付")])),_:2,__:[26]},1032,["onClick"])]),w("div",Y,[p(o,{type:"warning",size:"small",onClick:a=>(e=>{ue.showModifyDepositLog=!0,ue.currentRow=e})(e)},{default:_(()=>a[27]||(a[27]=[c("预付记录")])),_:2,__:[27]},1032,["onClick"])])]),channel_slot:_(({row:e})=>[p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showSingleChannelSet=!0,ue.currentRow=e})(e)},{default:_(()=>a[28]||(a[28]=[c("通道")])),_:2,__:[28]},1032,["onClick"])]),fee_slot:_(({row:e})=>[p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showSingleFeeSet=!0,ue.currentRow=e})(e)},{default:_(()=>a[29]||(a[29]=[c("费率")])),_:2,__:[29]},1032,["onClick"])]),status_slot:_(({row:e})=>[w("div",null,[a[30]||(a[30]=c("状态: ")),p(l,{onChange:a=>ye(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"])]),w("div",null,[a[31]||(a[31]=c("充值: ")),p(l,{onChange:a=>ye(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:_(({row:e})=>[w("div",null,[p(s,null,{default:_(()=>[p(o,{type:1==e.clear_status?"danger":"warning",size:"small",onClick:a=>(e=>"1"==e.clear_status?k.warning("清账中,请勿重复点击"):"日切清账完成00:00系统自动开启所有通道"==re.value?k.error(re.value):void R.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{k.success("清账中"),De(3,[e.shop_id])}).catch(()=>{}))(e)},{default:_(()=>[c(m(1==e.clear_status?"清账中":"清账"),1)]),_:2},1032,["type","onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showBindAircraftDialog=!0,ue.currentRow=e})(e)},{default:_(()=>a[32]||(a[32]=[c("飞机")])),_:2,__:[32]},1032,["onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{S({shop_id:e.shop_id}).then(e=>{const{access_token:a}=e;localStorage.setItem("payeraccessToken",a);const o=te.resolve({path:"/login/payer"});window.open(o.href,"_blank")})})(e)},{default:_(()=>a[33]||(a[33]=[c("登录")])),_:2,__:[33]},1032,["onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showDetailDialog=!0,ue.currentRow=e})(e)},{default:_(()=>a[34]||(a[34]=[c("资料")])),_:2,__:[34]},1032,["onClick"])]),_:2},1024)]),w("div",ee,[p(s,null,{default:_(()=>[1==e.google2fa_bind?(d(),y(o,{key:0,type:"warning",size:"small",onClick:a=>(e=>{R.prompt("请输入谷歌验证码进行解绑","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(({value:a})=>{x({id:e.id,google_code:a}).then(e=>{k.success("解绑成功!"),me()})}).catch(()=>{})})(e)},{default:_(()=>a[35]||(a[35]=[c("解绑")])),_:2,__:[35]},1032,["onClick"])):f("",!0),p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showModifyPassword=!0,ue.currentRow=e})(e)},{default:_(()=>a[36]||(a[36]=[c("密码")])),_:2,__:[36]},1032,["onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showAddDialog=!0,ue.addForm.values.id=e.id,ue.addForm.values.username=e.username,ue.addForm.values.name=e.name,ue.addForm.values.user_type=e.user_type,ue.addForm.values.login_white_ip=e.login_white_ip,ue.addForm.values.callback_white_ip=e.callback_white_ip,ue.addForm.values.is_new=e.is_new,ue.addForm.fields[0].disabled=!0,ue.addForm.fields[4].disabled=!0,ue.addForm.title="编辑用户"})(e)},{default:_(()=>a[37]||(a[37]=[c("编辑")])),_:2,__:[37]},1032,["onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{ue.showUserGroupDialog=!0,ue.currentRow=e})(e)},{default:_(()=>a[38]||(a[38]=[c("分组")])),_:2,__:[38]},1032,["onClick"]),p(o,{type:"primary",size:"small",onClick:a=>(e=>{R.alert("确定删除当前用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{j({shop_id:e.shop_id}).then(e=>{k.success("删除成功!"),me()})}).catch(()=>{})})(e)},{default:_(()=>a[39]||(a[39]=[c("删除")])),_:2,__:[39]},1032,["onClick"])]),_:2},1024)])]),login_time_slot:_(({row:e})=>[p(t,null,{default:_(()=>[c(m(null==e?void 0:e.login_time),1)]),_:2},1024)]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),p(i,{showDialog:D(ue).showAddDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>D(ue).showAddDialog=e),formData:D(ue).addForm,"onUpdate:formData":a[6]||(a[6]=e=>D(ue).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:_(()=>[p(o,{type:"primary",loading:D(ue).btnLoading,onClick:ge},{default:_(()=>a[40]||(a[40]=[c("确定")])),_:1,__:[40]},8,["loading"])]),_:1},8,["showDialog","formData"]),p(P,{showModifyDeposit:D(ue).showModifyDeposit,"onUpdate:showModifyDeposit":a[7]||(a[7]=e=>D(ue).showModifyDeposit=e),currentRow:D(ue).currentRow},null,8,["showModifyDeposit","currentRow"]),p(L,{showModifyDepositLog:D(ue).showModifyDepositLog,"onUpdate:showModifyDepositLog":a[8]||(a[8]=e=>D(ue).showModifyDepositLog=e),currentRow:D(ue).currentRow},null,8,["showModifyDepositLog","currentRow"]),p(V,{showSingleChannelSet:D(ue).showSingleChannelSet,"onUpdate:showSingleChannelSet":a[9]||(a[9]=e=>D(ue).showSingleChannelSet=e),currentRow:D(ue).currentRow},null,8,["showSingleChannelSet","currentRow"]),p(G,{showSingleFeeSet:D(ue).showSingleFeeSet,"onUpdate:showSingleFeeSet":a[10]||(a[10]=e=>D(ue).showSingleFeeSet=e),currentRow:D(ue).currentRow},null,8,["showSingleFeeSet","currentRow"]),p(E,{showModifyPassword:D(ue).showModifyPassword,"onUpdate:showModifyPassword":a[11]||(a[11]=e=>D(ue).showModifyPassword=e),currentRow:D(ue).currentRow},null,8,["showModifyPassword","currentRow"]),p(O,{showClearAccount:D(ue).showClearAccount,"onUpdate:showClearAccount":a[12]||(a[12]=e=>D(ue).showClearAccount=e),onClearAccount:De},null,8,["showClearAccount"]),p(W,{showBindAircraftDialog:D(ue).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[13]||(a[13]=e=>D(ue).showBindAircraftDialog=e),currentRow:D(ue).currentRow,onRefreshLoad:fe},null,8,["showBindAircraftDialog","currentRow"]),p($,{showUserGroupDialog:D(ue).showUserGroupDialog,"onUpdate:showUserGroupDialog":a[14]||(a[14]=e=>D(ue).showUserGroupDialog=e),currentRow:D(ue).currentRow,onRefreshLoad:fe},null,8,["showUserGroupDialog","currentRow"]),p(q,{showDetailDialog:D(ue).showDetailDialog,"onUpdate:showDetailDialog":a[15]||(a[15]=e=>D(ue).showDetailDialog=e),currentRow:D(ue).currentRow},null,8,["showDetailDialog","currentRow"]),p(H,{showTotalDetailDialog:D(ue).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":a[16]||(a[16]=e=>D(ue).showTotalDetailDialog=e),currentRow:D(ue).currentRow},null,8,["showTotalDetailDialog","currentRow"]),a[41]||(a[41]=c('" '))])}}};export{ae as default};