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 c,an as u,bb as _,g as h,c8 as w,a_ as g,aO as m}from"./index.D-JAz8fn.js";import{_ as y}from"./index.DW2pts2U.js";/* empty css */import{E as f}from"./el-text.B1y3OTsE.js";import D from"./modify_deposit.BiWb89WP.js";import v from"./modify_deposit_log.D0ruySum.js";import b from"./single_channel_set.CUf9SFM6.js";import C from"./single_fee_set.BY2a6HK2.js";import F from"./modify_password.BSKswhj-.js";import k from"./clear_account.CBY4ftzf.js";import R from"./aircraft.B3nySsXi.js";import S from"./user_gorup.gF9dAwx5.js";import j from"./detail.0UGGFlSv.js";import U from"./account_total.BJMBuFND.js";import{a as x,c as B,b as A,d as M}from"./payee-user.CK4TwN7V.js";import{s as T}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.C7cUACVi.js";import"./payee-order.CyzHlAgO.js";import"./el-card.DLWFTWbi.js";import"./settlement_log.DNQW9Su-.js";import"./select_channel.D_Sx8GBk.js";import"./payee-channel.BNTX1Dj_.js";import"./handle_balance.Btu2UmkW.js";import"./freeze_balance.BD4wuIzP.js";import"./freeze_money_management.BEK7yYbv.js";import"./freeze_balance_management.ogewJvys.js";const z={class:"statistics-box"},P=["onClick"],L={style:{"margin-top":"4px"}},V={style:{"margin-top":"4px"}},G={__name:"user-info",setup(G,{expose:I}){const O=e(),E=T.userType,W=o([]);o("日切清账"),o("warning"),o("init");const $=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:"240"},{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:W}],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:"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:{}}),N=(e,o)=>{let a="";return(0===o?type_options:pay_type_options).some(o=>{if(o.value===e)return a=o.label,!0}),a},X=()=>{$.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),Z()};function Y(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}t(()=>{Z()});const Z=()=>{$.loading=!0;let e={limit:$.per_page,page:$.page},o=Y($.searchFields);x(Object.assign(e,o)).then(e=>{$.tableData=e.data,$.total=e.total,$.loading=!1}).catch(()=>{$.loading=!1})},q=e=>{$.selectData=e},H=()=>{let e={username:$.addForm.values.username,name:$.addForm.values.name,user_type:$.addForm.values.user_type,password:$.addForm.values.password,login_white_ip:$.addForm.values.login_white_ip};$.addForm.values.id?(e.id=$.addForm.values.id,A(e).then(e=>{$.showAddDialog=!1,Z()})):M(e).then(e=>{$.showAddDialog=!1,Z()})},J=(e,o)=>{g.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{B({id:e.id,status:1==o?e.status:e.recharge_status,type:o}).then(e=>{m.success("修改成功!")})}).catch(()=>{1==o?e.status=1==e.status?2:1:e.recharge_status=1==e.recharge_status?2:1})};return I({getFreezeUserList:()=>{$.loading=!0,$.page=1;let e={limit:$.per_page,page:$.page,status:2},o=Y($.searchFields);x(Object.assign(e,o)).then(e=>{$.tableData=e.data,$.total=e.total,$.loading=!1}).catch(()=>{$.loading=!1})}}),(e,o)=>{const a=u,t=f,x=_,B=c,A=y,M=w;return s(),l("div",null,[i(A,{type:"export",columns:h($).columns,searchFields:h($).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>h($).searchFields=e),data:h($).tableData,per_page:h($).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>h($).per_page=e),page:h($).page,"onUpdate:page":o[4]||(o[4]=e=>h($).page=e),total:h($).total,onGetTableData:Z,onResetForm:X,loading:h($).loading,showSelection:!0,selectionChange:q,showRightRefreshSlot:!1},{btns:n(()=>[d("div",null,[i(a,{type:"warning",onClick:o[0]||(o[0]=e=>{$.showClearAccount=!0})},{default:n(()=>o[17]||(o[17]=[r(" 日切清账,关闭通道 ")])),_:1,__:[17]}),i(a,{type:"primary",onClick:o[1]||(o[1]=e=>($.showAddDialog=!0,$.addForm.values.id="",$.addForm.fields[0].disabled=!1,void($.addForm.title="新增用户")))},{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(h(T).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=>{$.showTotalDetailDialog=!0,$.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(N(e.account_type,0)),1)]),pay_type_slot:n(({row:e})=>[d("div",null,p(N(e.pay_type,1)),1)]),modify_deposit_slot:n(({row:e})=>[d("div",null,[i(a,{type:"primary",size:"small",onClick:o=>(e=>{$.showModifyDeposit=!0,$.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=>{$.showModifyDepositLog=!0,$.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=>{$.showSingleChannelSet=!0,$.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=>{$.showSingleFeeSet=!0,$.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=>J(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=>J(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(B,null,{default:n(()=>[i(a,{type:"清账中"==e.clearBtn?"danger":"warning",size:"small",onClick:o=>(e=>{"清账中"!=e.clearBtn&&g.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{m.success("清账中"),e.clearBtn="清账中"}).catch(()=>{})})(e)},{default:n(()=>[r(p(e.clearBtn?e.clearBtn:"清账"),1)]),_:2},1032,["type","onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{$.showBindAircraftDialog=!0}},{default:n(()=>o[43]||(o[43]=[r("飞机")])),_:2,__:[43]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>(()=>{const e=O.resolve("/login/payer");window.open(e.href,"_blank")})()},{default:n(()=>o[44]||(o[44]=[r("登录")])),_:2,__:[44]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{$.showDetailDialog=!0}},{default:n(()=>o[45]||(o[45]=[r("资料")])),_:2,__:[45]},1032,["onClick"])]),_:2},1024)]),d("div",V,[i(B,null,{default:n(()=>[i(a,{type:"primary",size:"small",onClick:o=>(e=>{$.showModifyPassword=!0,$.currentRow=e})(e)},{default:n(()=>o[46]||(o[46]=[r("密码")])),_:2,__:[46]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:o=>(e=>{$.showAddDialog=!0,$.addForm.values.id=e.id,$.addForm.values.username=e.username,$.addForm.values.name=e.name,$.addForm.values.user_type=e.user_type,$.addForm.values.login_white_ip=e.login_white_ip,$.addForm.values.callback_white_ip=e.callback_white_ip,$.addForm.fields[0].disabled=!0,$.addForm.title="编辑用户"})(e)},{default:n(()=>o[47]||(o[47]=[r("编辑")])),_:2,__:[47]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{$.showUserGroupDialog=!0}},{default:n(()=>o[48]||(o[48]=[r("分组")])),_:2,__:[48]},1032,["onClick"]),i(a,{type:"primary",size:"small",onClick:e=>{g.alert("确定删除当前用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{m.success("删除成功!")}).catch(()=>{})}},{default:n(()=>o[49]||(o[49]=[r("删除")])),_:2,__:[49]},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(M,{showDialog:h($).showAddDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>h($).showAddDialog=e),formData:h($).addForm,"onUpdate:formData":o[6]||(o[6]=e=>h($).addForm=e),ref:"addFormRef",labelWidth:"120px"},{submit:n(()=>[i(a,{type:"primary",loading:h($).btnLoading,onClick:H},{default:n(()=>o[50]||(o[50]=[r("确定")])),_:1,__:[50]},8,["loading"])]),_:1},8,["showDialog","formData"]),i(D,{showModifyDeposit:h($).showModifyDeposit,"onUpdate:showModifyDeposit":o[7]||(o[7]=e=>h($).showModifyDeposit=e),currentRow:h($).currentRow},null,8,["showModifyDeposit","currentRow"]),i(v,{showModifyDepositLog:h($).showModifyDepositLog,"onUpdate:showModifyDepositLog":o[8]||(o[8]=e=>h($).showModifyDepositLog=e),currentRow:h($).currentRow},null,8,["showModifyDepositLog","currentRow"]),i(b,{showSingleChannelSet:h($).showSingleChannelSet,"onUpdate:showSingleChannelSet":o[9]||(o[9]=e=>h($).showSingleChannelSet=e),currentRow:h($).currentRow},null,8,["showSingleChannelSet","currentRow"]),i(C,{showSingleFeeSet:h($).showSingleFeeSet,"onUpdate:showSingleFeeSet":o[10]||(o[10]=e=>h($).showSingleFeeSet=e),currentRow:h($).currentRow},null,8,["showSingleFeeSet","currentRow"]),i(F,{showModifyPassword:h($).showModifyPassword,"onUpdate:showModifyPassword":o[11]||(o[11]=e=>h($).showModifyPassword=e),currentRow:h($).currentRow},null,8,["showModifyPassword","currentRow"]),i(k,{showClearAccount:h($).showClearAccount,"onUpdate:showClearAccount":o[12]||(o[12]=e=>h($).showClearAccount=e)},null,8,["showClearAccount"]),i(R,{showBindAircraftDialog:h($).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":o[13]||(o[13]=e=>h($).showBindAircraftDialog=e)},null,8,["showBindAircraftDialog"]),i(S,{showUserGroupDialog:h($).showUserGroupDialog,"onUpdate:showUserGroupDialog":o[14]||(o[14]=e=>h($).showUserGroupDialog=e)},null,8,["showUserGroupDialog"]),i(j,{showDetailDialog:h($).showDetailDialog,"onUpdate:showDetailDialog":o[15]||(o[15]=e=>h($).showDetailDialog=e)},null,8,["showDetailDialog"]),i(U,{showTotalDetailDialog:h($).showTotalDetailDialog,"onUpdate:showTotalDetailDialog":o[16]||(o[16]=e=>h($).showTotalDetailDialog=e),currentRow:h($).currentRow},null,8,["showTotalDetailDialog","currentRow"]),o[51]||(o[51]=r('" '))])}}};export{G as default};
|