import{g as F,u as A}from"./index.74b837d9.js";import{d as b,r as m,b as E,c as i,e as B,f as h,h as n,i as s,u as t,a2 as D,g as C,m as V,b4 as k,E as p,_ as v}from"./index.0308b213.js";const y={class:"base-config"},x={class:"submit"},I=V(" \u63D0\u4EA4 "),q=b({setup(L){let c=m(),u=E({merchant_no:"",account_no:"",sign_key:"",inst_no:""});const f=m({merchant_no:[{required:!0,message:"\u626B\u5457\u5546\u6237\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],account_no:[{required:!0,message:"\u4E00\u8D26\u901A\u8D26\u6237\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],sign_key:[{required:!0,message:"token\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],inst_no:[{required:!0,message:"\u673A\u6784\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=()=>{const r=k.service({fullscreen:!0});F().then(e=>{r.close(),console.log(e),u.merchant_no=e.merchant_no,u.account_no=e.account_no,u.sign_key=e.sign_key,u.inst_no=e.inst_no})};d();const g=()=>{var r;(r=c.value)==null||r.validate((e,l)=>{var a,_,o;e?A(u).then(U=>{p.success("\u66F4\u65B0\u8D26\u6237\u57FA\u7840\u4FE1\u606F\u6210\u529F"),d()}):l&&p.error(((o=(_=(a=Object.values(l))==null?void 0:a[0])==null?void 0:_[0])==null?void 0:o.message)||"\u672A\u77E5\u9519\u8BEF")})};return(r,e)=>{const l=i("el-input"),a=i("el-form-item"),_=i("el-button");return B(),h("div",y,[n(t(D),{ref_key:"formRef",ref:c,model:t(u),rules:f.value,"label-width":"120px"},{default:s(()=>[n(a,{label:"\u626B\u5457\u5546\u6237\u53F7",prop:"merchant_no"},{default:s(()=>[n(l,{modelValue:t(u).merchant_no,"onUpdate:modelValue":e[0]||(e[0]=o=>t(u).merchant_no=o),placeholder:"\u8BF7\u8F93\u5165\u626B\u5457\u5546\u6237\u53F7"},null,8,["modelValue"])]),_:1}),n(a,{label:"\u4E00\u8D26\u901A\u8D26\u6237",prop:"account_no"},{default:s(()=>[n(l,{modelValue:t(u).account_no,"onUpdate:modelValue":e[1]||(e[1]=o=>t(u).account_no=o),placeholder:"\u8BF7\u8F93\u5165\u4E00\u8D26\u901A\u8D26\u6237"},null,8,["modelValue"])]),_:1}),n(a,{label:"\u673A\u6784\u53F7",prop:"inst_no"},{default:s(()=>[n(l,{modelValue:t(u).inst_no,"onUpdate:modelValue":e[2]||(e[2]=o=>t(u).inst_no=o),placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u53F7"},null,8,["modelValue"])]),_:1}),n(a,{label:"token",prop:"sign_key"},{default:s(()=>[n(l,{modelValue:t(u).sign_key,"onUpdate:modelValue":e[3]||(e[3]=o=>t(u).sign_key=o),placeholder:"\u8BF7\u8F93\u5165token"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),C("div",x,[n(_,{type:"primary",onClick:g},{default:s(()=>[I]),_:1})])])}}});const R=v(q,[["__scopeId","data-v-0b5b0700"]]);export{R as default};
