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