sf_web_dist/js/user-info.1758008069410Cb3NTIYB.js
2025-09-16 15:35:47 +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 n,dk as i,c as u,e as p,N as d,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 k,aO as R,a_ as F,dm as x,dn as S,dp as j,dq as U,dr as B,ds as T,dt as A}from"./index.17580080694105cpOYQTO.js";import{_ as z}from"./index.1758008069410DfxGo52h.js";/* empty css */import{E as M}from"./el-text.1758008069410CLFMqvHH.js";import I from"./modify_deposit.1758008069410BzTT7CSl.js";import P from"./modify_deposit_log.1758008069410MF_TmYHG.js";import L from"./single_channel_set.1758008069410TFKfDydf.js";import G from"./single_fee_set.1758008069410CoMHcI5E.js";import V from"./modify_password.1758008069410CaRwCOK0.js";import E from"./clear_account.1758008069410CTmWnkrt.js";import O from"./aircraft.1758008069410kd51i_mJ.js";import $ from"./user_gorup.1758008069410rjGcAck9.js";import W from"./detail.1758008069410BfXk_C0H.js";import q from"./account_total.1758008069410BRRS_zDn.js";import{b as H}from"./payee-order.1758008069410BhZGCJjI.js";import{s as N}from"./staticData.17580080694108wZxkmL4.js";import{p as Z}from"./common.1758008069410CCwWzMi9.js";/* empty css */import"./el-col.1758008069410BlVWK4k0.js";import"./el-card.1758008069410Q-e3G5W7.js";import"./settlement_log.1758008069410nR1VFa3W.js";import"./payee-count.1758008069410CPxJYcQS.js";import"./lodash.1758008069410DXt5MCaJ.js";import"./select_channel.1758008069410CzUA-r8v.js";import"./el-link.1758008069410BBshQBsE.js";import"./handle_balance.1758008069410CfUWMMhy.js";import"./freeze_balance.1758008069410CDUrqyxx.js";import"./freeze_money_management.1758008069410-T5DvKhg.js";import"./freeze_balance_management.1758008069410Bit0WZXg.js";const J={class:"statistics-box"},K={style:{"font-size":"10px"}},Q={style:{"font-size":"10px"}},X=["onClick"],Y={style:{"margin-top":"4px"}},ee={style:{"margin-top":"4px"}},ae={__name:"user-info",setup(ae,{expose:oe}){e();const te=a(),le=o(),se=N.userType,re=t([]),ne=t("日切清账,关闭通道"),ie=t("warning"),ue=t("0"),pe=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:"商户号",prop:"shop_id",type:"input",value:""},{label:"用户名称",type:"input",prop:"username",value:""},{label:"用户定制类型",prop:"user_type",type:"select",value:"",options:se},{label:"用户分组",type:"select",prop:"user_group",value:"",options:re}],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被打则及时变更不影响其他商户用英文逗号隔开"}],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:""}),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},ce=()=>{pe.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),we()};s(async()=>{re.value=[],(await r({})).data.forEach(e=>{re.value.push({label:e.name,value:e.id})}),we(),me()}),n(()=>{clearInterval(De.value)});let _e=!1;const me=()=>{H().then(e=>{0!=e.system_clear_status&&2!=e.system_clear_status||clearInterval(De.value),ue.value=e.system_clear_status,1==e.system_clear_status&&(ie.value="danger",ne.value="日切清账中,所有支付通道已关闭",_e||(Ce(),_e=!0)),2==e.system_clear_status&&(ie.value="success",ne.value="日切清账完成,请手动点击开启所有通道")})};const we=()=>{let e={limit:pe.per_page,page:pe.page,status:pe.freezeStatus},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(pe.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,i(Object.assign(e,a)).then(e=>{pe.tableData=e.data,pe.total=e.total,pe.sum_data=e.sum_data}).catch(()=>{pe.loading=!1})},he=e=>{pe.selectData=e},ge=()=>{A({onoff:"on"}).then(e=>{me(),we(),ne.value="日切清账,关闭通道",ie.value="warning",clearInterval(De.value)}).catch(()=>{})},ye=()=>{let e={username:pe.addForm.values.username,name:pe.addForm.values.name,user_type:pe.addForm.values.user_type,password:pe.addForm.values.password,login_white_ip:pe.addForm.values.login_white_ip,callback_white_ip:pe.addForm.values.callback_white_ip};pe.addForm.values.id?(e.id=pe.addForm.values.id,U(e).then(e=>{pe.showAddDialog=!1,we()})):B(e).then(e=>{pe.showAddDialog=!1,we()})},fe=(e,a)=>{F.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{j({id:e.id,status:1==a?e.status:e.recharge_status,type:a}).then(e=>{R.success("修改成功!")})}).catch(()=>{1==a?e.status=1==e.status?2:1:e.recharge_status=1==e.recharge_status?2:1})},ve=()=>{we()};let De=t(null);const be=(e,a)=>{T({type:e,clear_ids:a}).then(e=>{me(),Ce(),setTimeout(()=>{we()},1e3)})},Ce=()=>{clearInterval(De.value),De.value=setInterval(()=>{me()},1e4)};return oe({getFreezeUserList:()=>{pe.page=1,pe.freezeStatus=2,we()}}),(e,a)=>{const o=g,t=M,l=v,s=h,r=z,n=k;return p(),u("div",null,[d(r,{type:"export",columns:D(pe).columns,searchFields:D(pe).searchFields,"onUpdate:searchFields":a[2]||(a[2]=e=>D(pe).searchFields=e),data:D(pe).tableData,per_page:D(pe).per_page,"onUpdate:per_page":a[3]||(a[3]=e=>D(pe).per_page=e),page:D(pe).page,"onUpdate:page":a[4]||(a[4]=e=>D(pe).page=e),total:D(pe).total,onGetTableData:we,onResetForm:ce,loading:D(pe).loading,showSelection:!0,selectionChange:he,showRightRefreshSlot:!1},{btns:_(()=>[w("div",null,[d(o,{type:D(ie),onClick:a[0]||(a[0]=e=>(()=>{if(1==ue.value)return R.warning("清账中,请勿重复点击");2!=ue.value?pe.showClearAccount=!0:F.alert("确定开启所有通道","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{ge()}).catch(()=>{})})())},{default:_(()=>[c(m(D(ne)),1)]),_:1},8,["type"]),d(o,{type:"primary",onClick:a[1]||(a[1]=e=>(pe.showAddDialog=!0,pe.addForm.values.id="",pe.addForm.fields[0].disabled=!1,void(pe.addForm.title="新增用户")))},{default:_(()=>a[17]||(a[17]=[c(" 添加用户 ")])),_:1,__:[17]})])]),count:_(({row:e})=>[w("div",J,[a[18]||(a[18]=c(" 商户数量: ")),d(t,{type:"primary"},{default:_(()=>[c(m(D(pe).sum_data.shop_num),1)]),_:1}),a[19]||(a[19]=c(" 总预付: ")),d(t,{type:"primary"},{default:_(()=>[c(m(D(Z)(D(pe).sum_data.sum_money)),1)]),_:1}),a[20]||(a[20]=c(" 可结算金额:")),d(t,{type:"success"},{default:_(()=>[c(m(D(Z)(D(pe).sum_data.money)),1)]),_:1}),a[21]||(a[21]=c(" 剩余预付: ")),d(t,{type:"primary"},{default:_(()=>[c(m(D(Z)(D(pe).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})=>[(p(!0),u(b,null,C(e.groupInfo,e=>(p(),u("div",null,m(e.name),1))),256))]),modify_deposit_log_slot:_(({row:e})=>[w("div",null,[a[22]||(a[22]=c("累计:")),d(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("剩余:")),d(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",{onClick:a=>(e=>{pe.showTotalDetailDialog=!0,pe.currentRow=e})(e)},[w("div",null,[a[24]||(a[24]=c("可结算: ")),d(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("昨日: ")),d(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)])],8,X)]),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,[d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showModifyDeposit=!0,pe.currentRow=e})(e)},{default:_(()=>a[26]||(a[26]=[c("加减预付")])),_:2,__:[26]},1032,["onClick"])]),w("div",Y,[d(o,{type:"warning",size:"small",onClick:a=>(e=>{pe.showModifyDepositLog=!0,pe.currentRow=e})(e)},{default:_(()=>a[27]||(a[27]=[c("预付记录")])),_:2,__:[27]},1032,["onClick"])])]),channel_slot:_(({row:e})=>[d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showSingleChannelSet=!0,pe.currentRow=e})(e)},{default:_(()=>a[28]||(a[28]=[c("通道")])),_:2,__:[28]},1032,["onClick"])]),fee_slot:_(({row:e})=>[d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showSingleFeeSet=!0,pe.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("状态: ")),d(l,{onChange:a=>fe(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("充值: ")),d(l,{onChange:a=>fe(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,[d(s,null,{default:_(()=>[d(o,{type:1==e.clear_status?"danger":"warning",size:"small",onClick:a=>(e=>"1"==e.clear_status?R.warning("清账中,请勿重复点击"):"日切清账完成,请手动点击开启所有通道"==ne.value?R.error(ne.value):void F.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{R.success("清账中"),be(3,[e.shop_id])}).catch(()=>{}))(e)},{default:_(()=>[c(m(1==e.clear_status?"清账中":"清账"),1)]),_:2},1032,["type","onClick"]),d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showBindAircraftDialog=!0,pe.currentRow=e})(e)},{default:_(()=>a[32]||(a[32]=[c("飞机")])),_:2,__:[32]},1032,["onClick"]),d(o,{type:"primary",size:"small",onClick:a=>(e=>{x({shop_id:e.shop_id}).then(e=>{const{access_token:a}=e;localStorage.setItem("payeraccessToken",a);const o=le.resolve({path:"/login/payer"});window.open(o.href,"_blank")})})(e)},{default:_(()=>a[33]||(a[33]=[c("登录")])),_:2,__:[33]},1032,["onClick"]),d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showDetailDialog=!0,pe.currentRow=e})(e)},{default:_(()=>a[34]||(a[34]=[c("资料")])),_:2,__:[34]},1032,["onClick"])]),_:2},1024)]),w("div",ee,[d(s,null,{default:_(()=>[1==e.google2fa_bind?(p(),y(o,{key:0,type:"warning",size:"small",onClick:a=>(e=>{var a,o;1==(null==(a=null==te?void 0:te.user.info)?void 0:a.user.google2fa_bind)||1==(null==(o=te.info)?void 0:o.google2fa_bind)?F.prompt("请输入谷歌验证码进行解绑","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(({value:a})=>{S({id:e.id,google_code:a}).then(e=>{R.success("解绑成功!"),we()})}).catch(()=>{}):F.alert("是否确定对当前用户进行解绑Google","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{S({id:e.id}).then(e=>{R.success("解绑成功!"),we()})})})(e)},{default:_(()=>a[35]||(a[35]=[c("解绑")])),_:2,__:[35]},1032,["onClick"])):f("",!0),d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showModifyPassword=!0,pe.currentRow=e})(e)},{default:_(()=>a[36]||(a[36]=[c("密码")])),_:2,__:[36]},1032,["onClick"]),d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showAddDialog=!0,pe.addForm.values.id=e.id,pe.addForm.values.username=e.username,pe.addForm.values.name=e.name,pe.addForm.values.user_type=e.user_type,pe.addForm.values.login_white_ip=e.login_white_ip,pe.addForm.values.callback_white_ip=e.callback_white_ip,pe.addForm.fields[0].disabled=!0,pe.addForm.title="编辑用户"})(e)},{default:_(()=>a[37]||(a[37]=[c("编辑")])),_:2,__:[37]},1032,["onClick"]),d(o,{type:"primary",size:"small",onClick:a=>(e=>{pe.showUserGroupDialog=!0,pe.currentRow=e})(e)},{default:_(()=>a[38]||(a[38]=[c("分组")])),_:2,__:[38]},1032,["onClick"]),d(o,{type:"primary",size:"small",onClick:e=>{F.alert("确定删除当前用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{R.success("删除成功!")}).catch(()=>{})}},{default:_(()=>a[39]||(a[39]=[c("删除")])),_:2,__:[39]},1032,["onClick"])]),_:2},1024)])]),login_time_slot:_(({row:e})=>[d(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"]),d(n,{showDialog:D(pe).showAddDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>D(pe).showAddDialog=e),formData:D(pe).addForm,"onUpdate:formData":a[6]||(a[6]=e=>D(pe).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:_(()=>[d(o,{type:"primary",loading:D(pe).btnLoading,onClick:ye},{default:_(()=>a[40]||(a[40]=[c("确定")])),_:1,__:[40]},8,["loading"])]),_:1},8,["showDialog","formData"]),d(I,{showModifyDeposit:D(pe).showModifyDeposit,"onUpdate:showModifyDeposit":a[7]||(a[7]=e=>D(pe).showModifyDeposit=e),currentRow:D(pe).currentRow},null,8,["showModifyDeposit","currentRow"]),d(P,{showModifyDepositLog:D(pe).showModifyDepositLog,"onUpdate:showModifyDepositLog":a[8]||(a[8]=e=>D(pe).showModifyDepositLog=e),currentRow:D(pe).currentRow},null,8,["showModifyDepositLog","currentRow"]),d(L,{showSingleChannelSet:D(pe).showSingleChannelSet,"onUpdate:showSingleChannelSet":a[9]||(a[9]=e=>D(pe).showSingleChannelSet=e),currentRow:D(pe).currentRow},null,8,["showSingleChannelSet","currentRow"]),d(G,{showSingleFeeSet:D(pe).showSingleFeeSet,"onUpdate:showSingleFeeSet":a[10]||(a[10]=e=>D(pe).showSingleFeeSet=e),currentRow:D(pe).currentRow},null,8,["showSingleFeeSet","currentRow"]),d(V,{showModifyPassword:D(pe).showModifyPassword,"onUpdate:showModifyPassword":a[11]||(a[11]=e=>D(pe).showModifyPassword=e),currentRow:D(pe).currentRow},null,8,["showModifyPassword","currentRow"]),d(E,{showClearAccount:D(pe).showClearAccount,"onUpdate:showClearAccount":a[12]||(a[12]=e=>D(pe).showClearAccount=e),onClearAccount:be},null,8,["showClearAccount"]),d(O,{showBindAircraftDialog:D(pe).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[13]||(a[13]=e=>D(pe).showBindAircraftDialog=e),currentRow:D(pe).currentRow,onRefreshLoad:ve},null,8,["showBindAircraftDialog","currentRow"]),d($,{showUserGroupDialog:D(pe).showUserGroupDialog,"onUpdate:showUserGroupDialog":a[14]||(a[14]=e=>D(pe).showUserGroupDialog=e),currentRow:D(pe).currentRow,onRefreshLoad:ve},null,8,["showUserGroupDialog","currentRow"]),d(W,{showDetailDialog:D(pe).showDetailDialog,"onUpdate:showDetailDialog":a[15]||(a[15]=e=>D(pe).showDetailDialog=e),currentRow:D(pe).currentRow},null,8,["showDetailDialog","currentRow"]),d(q,{showTotalDetailDialog:D(pe).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":a[16]||(a[16]=e=>D(pe).showTotalDetailDialog=e),currentRow:D(pe).currentRow},null,8,["showTotalDetailDialog","currentRow"]),a[41]||(a[41]=c('" '))])}}};export{ae as default};