test_lgq/niucloud/public/admin/assets/cash_out-74b9736b.js

2 lines
4.0 KiB
JavaScript
Raw Permalink Normal View History

2024-01-24 17:36:08 +08:00
import{d as U,O as D,r as y,n as x,h as i,c as E,a as b,t as u,u as r,y as I,I as d,w as t,e as n,N as s,B as f,i as p,F as S,G as W,aM as G,X as H,W as j,az as L,aA as M,aB as P,cO as $,$ as X,Y,E as q,a0 as J}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{b as K,H as Q,I as Z}from"./member-97cfd04b.js";const ee={class:"main-container"},ae={class:"flex ml-[18px] justify-between items-center mt-[20px]"},te={class:"text-[20px]"},oe=b("span",{class:"ml-2"},"%",-1),le={class:"fixed-footer-wrap"},se={class:"fixed-footer"},Ee=U({__name:"cash_out",setup(re){const k=D().meta.title,c=y(!0),g=y(),a=x({is_auto_transfer:"0",is_auto_verify:"0",is_open:"0",min:"0.01",rate:"0",transfer_type:[]}),h=y([]);(async()=>{h.value=await(await K()).data})(),(async(m=0)=>{const e=await(await Q()).data;Object.keys(a).forEach(o=>{e[o]!=null&&(a[o]=e[o])}),a.is_open=Boolean(Number(a.is_open)),c.value=!1})();const R=x({min:[{validator:(m,e,o)=>{Number(e)<.01?o(new Error(s("cashWithdrawalAmountHint"))):o()},trigger:"blur"}],rate:[{validator:(m,e,o)=>{Number(e)>100||Number(e)<0?o(new Error(s("commissionRatioHint"))):o()},trigger:"blur"}]}),C=async m=>{c.value||!m||await m.validate(e=>{if(e){const o={...a};o.is_open=Number(o.is_open).toString(),Z(o).then(()=>{c.value=!1}).catch(()=>{c.value=!1})}})};return(m,e)=>{const o=G,_=H,V=j,v=L,w=M,N=P,F=$,B=X,T=Y,z=q,A=J;return i(),E("div",ee,[b("div",ae,[b("span",te,u(r(k)),1)]),I((i(),d(T,{model:a,"label-width":"150px",ref_key:"ruleFormRef",ref:g,rules:R,class:"page-form"},{default:t(()=>[n(B,{class:"box-card !border-none",shadow:"never"},{default:t(()=>[n(_,{label:r(s)("isOpen")},{default:t(()=>[n(o,{modelValue:a.is_open,"onUpdate:modelValue":e[0]||(e[0]=l=>a.is_open=l)},null,8,["modelValue"])]),_:1},8,["label"]),a.is_open?(i(),d(_,{key:0,label:r(s)("cashWithdrawalAmount"),prop:"min"},{default:t(()=>[n(V,{modelValue:a.min,"onUpdate:modelValue":e[1]||(e[1]=l=>a.min=l),type:"number",class:"input-width",placeholder:r(s)("cashWithdrawalAmountPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):f("",!0),a.is_open?(i(),d(_,{key:1,label:r(s)("commissionRatio"),prop:"rate"},{default:t(()=>[n(V,{modelValue:a.rate,"onUpdate:modelValue":e[2]||(e[2]=l=>a.rate=l),type:"number",class:"input-width",placeholder:r(s)("commissionRatioPlaceholder")},null,8,["modelValue","placeholder"]),oe]),_:1},8,["label"])):f("",!0),a.is_open?(i(),d(_,{key:2,label:r(s)("audit"),class:"items-center"},{default:t(()=>[n(w,{modelValue:a.is_auto_verify,"onUpdate:modelValue":e[3]||(e[3]=l=>a.is_auto_verify=l)},{default:t(()=>[n(v,{label:"0",size:"large"},{default:t(()=>[p(u(r(s)("manualAudit")),1)]),_:1}),n(v,{label:"1",size:"large"},{default:t(()=>[p(u(r(s)("automaticAudit")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):f("",!0),a.is_open?(i(),d(_,{key:3,label:r(s)("transfer"),class:"items-center"},{default:t(()=>[n(w,{modelValue:a.is_auto_transfer,"onUpdate:modelValue":e[4]||(e[4]=l=>a.is_auto_transfer=l)},{default:t(()=>[n(v,{label:"0",size:"large"},{default:t(()=>[p(u(r(s)("manualTransfer")),1)]),_:1}),n(v,{label:"1",size:"large"},{default:t(()=>[p(u(r(s)("automatedTransit")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):f("",!0),a.is_open?(i(),d(_,{key:4,label:r(s)("transferMode"),class:"items-center"},{default:t(()=>[n(F,{modelValue:a.transfer_type,"onUpdate:modelValue":e[5]||(e[5]=l=>a.transfer_type=l),size:"large"},{default:t(()=>[(i(!0),E(S,null,W(h.value,(l,O)=>(i(),d(N,{label:l.key,key:"a"+O},{default:t(()=>[p(u(l.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])):f("",!0)]),_:1})]),_:1},8,["model","rules"])),[[A,c.value]]),b("div",le,[b("div",se,[n(z,{type:"primary",onClick:e[6]||(e[6]=l=>C(g.value))},{default:t(()=>[p(u(r(s)("save")),1)]),_:1})])])]