import{_ as a,r as e,b as t,cK as o,d as s,e as l,f as d,h as i,w as m,g as r,j as n,k as u,i as c,n as p,E as f,q as b,t as v,v as j}from"./index.286e9b79.js";import{v as _}from"./loading.c49775a6.js";import{E as V,a as g}from"./form.ad10dcd5.js";import{E as x,a as h}from"./tab-pane.1cc0f769.js";import{E as w}from"./input.31de1b37.js";import"./form-item.9355e6dc.js";/* empty css            */import{E,a as y}from"./select.297a82d5.js";import{_ as U}from"./page-header.29890ed0.js";import{g as k,p as I}from"./http.f588794f.js";import"./_initCloneObject.fb8fbaea.js";import"./strings.8c60bfae.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./isEqual.57d72c4a.js";import"./scroll.a50153b5.js";import"./_baseIteratee.9ead53a1.js";import"./debounce.caafe00b.js";import"./divider.948c4b18.js";const q=a=>(v("data-v-7b4bc6c6"),a=a(),j(),a),C={class:"editor-card"},F={class:"editor-card-box"},K=q((()=>i("div",{class:"form-item-tips"},"设置最小提现金额",-1))),M=q((()=>i("div",{class:"form-item-tips"},"提现手续费0 - 100（单位%）支持小数点",-1))),O={class:"tool"},R={class:"tool-box"},z=a({__name:"setting",setup(a){let v=e(!1),j=e(!1),q=e("0"),z=e(),A=t({data:{status:1,amount:100,commission:0,content:""}});const B=t({});j.value=!0,k("finance.index/setting").then((a=>{j.value=!1,a.code&&!o(a.data)&&(A.data=a.data)}));const D=async()=>{z.value&&await z.value.validate(((a,e)=>{j.value=!1,a?(j.value=!0,I("finance.index/setting",A.data).then((a=>{j.value=!1,a.code?f.success("操作成功"):f.error(a.msg)})).catch((a=>{f.error(a)}))):f.error("请完善内容")}))};return(a,e)=>{const t=U,o=E,f=y,k=V,I=w,G=x,H=h,J=g,L=b,N=_;return s(),l("div",null,[d(t,{title:"汇款设置"}),i("div",C,[m((s(),n(J,{model:r(A).data,rules:r(B),ref_key:"ruleFormRef",ref:z},{default:u((()=>[i("div",F,[d(H,{modelValue:r(q),"onUpdate:modelValue":e[6]||(e[6]=a=>c(q)?q.value=a:q=a)},{default:u((()=>[d(G,{label:"基本信息",name:"0"},{default:u((()=>[d(k,{label:"提现状态",prop:"status","label-width":"100px"},{default:u((()=>[d(f,{modelValue:r(A).data.status,"onUpdate:modelValue":e[0]||(e[0]=a=>r(A).data.status=a),placeholder:"请选择提现状态"},{default:u((()=>[d(o,{label:"开启",value:1}),d(o,{label:"关闭",value:0})])),_:1},8,["modelValue"])])),_:1}),d(k,{label:"提现金额",prop:"amount","label-width":"100px"},{default:u((()=>[d(I,{modelValue:r(A).data.amount,"onUpdate:modelValue":e[1]||(e[1]=a=>r(A).data.amount=a),onInput:e[2]||(e[2]=a=>r(A).data.amount=r(A).data.amount.replace(/[^0-9.]/g,""))},null,8,["modelValue"]),K])),_:1}),d(k,{label:"提现手续费",prop:"commission","label-width":"100px"},{default:u((()=>[d(I,{modelValue:r(A).data.commission,"onUpdate:modelValue":e[3]||(e[3]=a=>r(A).data.commission=a),modelModifiers:{number:!0},onInput:e[4]||(e[4]=a=>{r(A).data.commission<=0?r(A).data.commission=0:r(A).data.commission>=100&&(r(A).data.commission=100)})},null,8,["modelValue"]),M])),_:1}),d(k,{label:"提现说明",prop:"content","label-width":"100px"},{default:u((()=>[d(I,{type:"textarea",modelValue:r(A).data.content,"onUpdate:modelValue":e[5]||(e[5]=a=>r(A).data.content=a),rows:8},null,8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["model","rules"])),[[N,r(v)]])]),i("div",O,[i("div",R,[d(L,{type:"primary",loading:r(j),onClick:D},{default:u((()=>[p("保存")])),_:1},8,["loading"])])])])}}},[["__scopeId","data-v-7b4bc6c6"]]);export{z as default};
