2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
import{a$ as e,r as o,ag as a,b4 as t,c as l,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.CLoJG3mK.js";import{_ as y}from"./index.B9eCB9m-.js";/* empty css */import{E as f}from"./el-text.6OzAhXH8.js";import D from"./modify_deposit.D1yhMgcZ.js";import v from"./modify_deposit_log.MMuukAV7.js";import b from"./single_channel_set.D96pb_xW.js";import C from"./single_fee_set.Cb6vskx7.js";import F from"./modify_password.CodQZ2S-.js";import k from"./clear_account.DgYi035L.js";import R from"./aircraft.C_CNoCGp.js";import S from"./user_gorup.Br0G9EIp.js";import j from"./detail.CYOFPIzE.js";import U from"./account_total.DKJy8U5d.js";import{a as x,c as A,b as M,d as T}from"./payee-user.DZj2e5rg.js";import{s as B}from"./staticData.b8Nd3Dnh.js";/* empty css */import"./el-col.7ob5DkRT.js";import"./payee-order.BzsfQSOF.js";import"./el-card._ufndo5b.js";import"./settlement_log.CAlq3akH.js";import"./payee-channel.DLUeUXRF.js";import"./select_channel.C5mzsn6t.js";import"./handle_balance.B6GmlfTa.js";import"./freeze_balance.tqnte6JJ.js";import"./freeze_money_management.BYpYxHOP.js";import"./freeze_balance_management.Cw8rvPNN.js";const z={class:"statistics-box"},P=["onClick"],L={style:{"margin-top":"4px"}},G={style:{"margin-top":"4px"}},I={__name:"user-info",setup(I){const V=e(),E=B.userType,O=o([]);o("日切清账"),o("warning"),o("init");const W=a({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"},{prop:"",label:"预付操作",align:"center",slot:"modify_deposit_slot",width:"120"},{prop:"",label:"预付",align:"center"},{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:"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:"用户类型",prop:"user_type",type:"select",value:"",options:E},{label:"用户分组",type:"input",prop:"user_group",value:"",options:O}],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:{}}),$=(e,o)=>{let a="";return(0===o?type_options:pay_type_options).some(o=>{if(o.value===e)return a=o.label,!0}),a},K=()=>{W.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),N()};t(()=>{N()});const N=()=>{W.loading=!0;let e={limit:W.per_page,page:W.page},o=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(W.searchFields);x(Object.assign(e,o)).then(e=>{W.tableData=e.data,W.total=e.total,W.loading=!1}).catch(()=>{W.loading=!1})},Q=e=>{W.selectData=e},Z=()=>{let e={username:W.addForm.values.username,name:W.addForm.values.name,user_type:W.addForm.values.user_type,password:W.addForm.values.password,login_white_ip:W.addForm.values.login_white_ip};W.addForm.values.id?(e.id=W.addForm.values.id,M(e).then(e=>{W.showAddDialog=!1,N()})):T(e).then(e=>{W.showAddDialog=!1,N()})},q=(e,o)=>{m.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{A({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,t=f,x=_,A=u,M=y,T=h;return s(),l("div",null,[i(M,{type:"export",columns:w(W).columns,searchFields:w(W).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>w(W).searchFields=e),data:w(W).tableData,per_page:w(W).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>w(W).per_page=e),page:w(W).page,"onUpdate:page":o[4]||(o[4]=e=>w(W).page=e),total:w(W).total,onGetTableData:N,onResetForm:K,loading:w(W).loading,showSelection:!0,selectionChange:Q,showRightRefreshSlot:!1},{btns:n(()=>[d("div",null,[i(a,{type:"warning",onClick:o[0]||(o[0]=e=>{W.showClearAccount=!0})},{default:n(()=>o[17]||(o[17]=[r(" 日切清账 ")])),_:1,__:[17]}),i(a,{type:"primary",onClick:o[1]||(o[1]=e=>(W.showAddDialog=!0,W.addForm.values.id="",void(W.addForm.fields[0].disabled=!1)))},{default:n(()=>o[18]||(o[18]=[r(" 添加用户 ")])),_:1,__:[18]})])]),count:n(({row:e})=>[d("div",z,[o[26]||(o[26]=r(" 商户数量: ")),i(t,{type:"primary"},{default:n(()=>o[19]||(o[19]=[r("1310")])),_:1,__:[19]}),o[27]||(o[27]=r(" 总预付: ")),i(t,{type:"primary"},{default:n(()=>o[20]||(o[20]=[r("14589222.2195")])),_:1,__:[20]}),o[28]||(o[28]=r(" 可提现金额:")),i(t,{type:"success"},{default:n(()=>o[21]||(o[21]=[r("9679160.4464")])),_:1,__:[21]}),o[29]||(o[29]=r(" 剩余预付: ")),i(t,{type:"primary"},{default:n(()=>o[22]||(o[22]=[r("4836605.1411")])),_:1,__:[22]}),o[30]||(o[30]=r(" 冻结金额:")),i(t,{type:"danger"},{default:n(()=>o[23]||(o[23]=[r("73456.632")])),_:1,__:[23]}),o[31]||(o[31]=r(" 已结算保证金:")),i(t,{type:"primary"},{default:n(()=>o[24]||(o[24]=[r("0")])),_:1,__:[24]}),o[32]||(o[32]=r(" 冻结保证金:")),i(t,{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=>{W.showTotalDetailDialog=!0,W.currentRow=e})(e)},[d("div",null,[o[34]||(o[34]=r("可结算")),i(t,{type:"success"},{default:n(()=>o[33]||(o[33]=[r("1000.00")])),_:1,__:[33]})]),d("div",null,[o[36]||(o[36]=r("昨日")),i(t,{type:"success"},{default:n(()=>o[35]||(o[35]=[r("1000.00")])),_:1,__:[35]})])],8,P)]),account_type_slot:n(({row:e})=>[d("div",null,p($(e.account_type,0)),1)]),pay_type_slot:n(({row:e})=>[d("div",null,p($(e.pay_type,1)),1)]),modify_deposit_slot:n(({row:e})=>[d("div",null,[i(a,{type:"primary",size:"small",onClick:o=>(e=>{W.showModifyDeposit=!0,W.currentRow=e})(e)},{default:n(()=>o[37]||(o[37]=[r("加减预付")])),_:2,__:[37]},1032,["onClick"])]),d("div",L,[i(a,{type:"primary",size:"small",onClick:o=>(e=>{W.showModifyDepositLog=!0,W.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=>{W.showSingleChannelSet=!0,W.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:o=>(e=>{W.showSingleFeeSet=!0,W.currentRow=e})(e)},{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(x,{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[42]||(o[42]=r("充值: ")),i(x,{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(A,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=>{W.showBindAircraftDialog=!0}},{default:n(()=>o[44]||(o[44]=[r("飞机")])),_:2,__:[44]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>(()=>{const e=V.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=>{W.showDetailDialog=!0}},{default:n(()=>o[46]||(o[46]=[r("资料")])),_:2,__:[46]},1032,["onClick"])]),_:2},1024)]),d("div",G,[i(A,null,{default:n(()=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{W.showModifyPassword=!0,W.currentRow=e})(e)},{default:n(()=>o[47]||(o[47]=[r("密码")])),_:2,__:[47]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{W.showAddDialog=!0,W.addForm.values.id=e.id,W.addForm.values.username=e.username,W.addForm.values.name=e.name,W.addForm.values.user_type=e.user_type,W.addForm.values.login_white_ip=e.login_white_ip,W.addForm.values.callback_white_ip=e.callback_white_ip,W.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=>{W.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(t,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:w(W).showAddDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>w(W).showAddDialog=e),formData:w(W).addForm,"onUpdate:formData":o[6]||(o[6]=e=>w(W).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:n(()=>[i(a,{type:"primary",loading:w(W).btnLoading,onClick:Z},{default:n(()=>o[51]||(o[51]=[r("确定")])),_:1,__:[51]},8,["loading"])]),_:1},8,["showDialog","formData"]),i(D,{showModifyDeposit:w(W).showModifyDeposit,"onUpdate:showModifyDeposit":o[7]||(o[7]=e=>w(W).showModifyDeposit=e),currentRow:w(W).currentRow},null,8,["showModifyDeposit","currentRow"]),i(v,{showModifyDepositLog:w(W).showModifyDepositLog,"onUpdate:showModifyDepositLog":o[8]||(o[8]=e=>w(W).showModifyDepositLog=e),currentRow:w(W).currentRow},null,8,["showModifyDepositLog","currentRow"]),i(b,{showSingleChannelSet:w(W).showSingleChannelSet,"onUpdate:showSingleChannelSet":o[9]||(o[9]=e=>w(W).showSingleChannelSet=e),currentRow:w(W).currentRow},null,8,["showSingleChannelSet","currentRow"]),i(C,{showSingleFeeSet:w(W).showSingleFeeSet,"onUpdate:showSingleFeeSet":o[10]||(o[10]=e=>w(W).showSingleFeeSet=e),currentRow:w(W).currentRow},null,8,["showSingleFeeSet","currentRow"]),i(F,{showModifyPassword:w(W).showModifyPassword,"onUpdate:showModifyPassword":o[11]||(o[11]=e=>w(W).showModifyPassword=e),currentRow:w(W).currentRow},null,8,["showModifyPassword","currentRow"]),i(k,{showClearAccount:w(W).showClearAccount,"onUpdate:showClearAccount":o[12]||(o[12]=e=>w(W).showClearAccount=e)},null,8,["showClearAccount"]),i(R,{showBindAircraftDialog:w(W).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":o[13]||(o[13]=e=>w(W).showBindAircraftDialog=e)},null,8,["showBindAircraftDialog"]),i(S,{showUserGroupDialog:w(W).showUserGroupDialog,"onUpdate:showUserGroupDialog":o[14]||(o[14]=e=>w(W).showUserGroupDialog=e)},null,8,["showUserGroupDialog"]),i(j,{showDetailDialog:w(W).showDetailDialog,"onUpdate:showDetailDialog":o[15]||(o[15]=e=>w(W).showDetailDialog=e)},null,8,["showDetailDialog"]),i(U,{showTotalDetailDialog:w(W).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":o[16]||(o[16]=e=>w(W).showTotalDetailDialog=e),currentRow:w(W).currentRow},null,8,["showTotalDetailDialog","currentRow"]),o[52]||(o[52]=r('" '))])}}};export{I as default};
|