import{h as F,y as N,r as z,p as n,M as m,N as r,a6 as f,l as B,W as u,V as c,k as e,o as y,q as i,m as k,$ as D,a0 as I,a4 as W,a2 as $,an as T,t as d,a7 as s}from"./vue-a39e6937.js";import{f as U}from"./index-ba596ae9.js";import{F as b}from"./index-f0d8af94.js";import{b as _}from"./validate-4ecec794.js";const q={class:"title"},L=F({__name:"popupForm",setup(K){const p=N(),a=T("baTable"),{t}=U(),v=z({bank_name:[_({name:"required",title:t("platformPayment.bank_name")})],create_time:[_({name:"date",title:t("platformPayment.create_time")})],update_time:[_({name:"date",title:t("platformPayment.update_time")})]});return(M,o)=>{const V=d("el-form"),h=d("el-scrollbar"),g=d("el-button"),P=d("el-dialog"),C=s("drag"),w=s("zoom"),x=s("loading"),S=s("blur");return n(),m(P,{class:"ba-operate-dialog","close-on-click-modal":!1,"model-value":["add","edit"].includes(e(a).form.operate),onClose:e(a).toggleForm,width:"50%"},{header:r(()=>[f((n(),B("div",q,[u(c(e(a).form.operate?e(t)(e(a).form.operate):""),1)])),[[C,[".ba-operate-dialog",".el-dialog__header"]],[w,".ba-operate-dialog"]])]),footer:r(()=>[y("div",{style:k("width: calc(100% - "+e(a).form.labelWidth/1.8+"px)")},[i(g,{onClick:o[5]||(o[5]=l=>e(a).toggleForm(""))},{default:r(()=>[u(c(e(t)("Cancel")),1)]),_:1}),f((n(),m(g,{loading:e(a).form.submitLoading,onClick:o[6]||(o[6]=l=>e(a).onSubmit(p.value)),type:"primary"},{default:r(()=>[u(c(e(a).form.operateIds&&e(a).form.operateIds.length>1?e(t)("Save and edit next item"):e(t)("Save")),1)]),_:1},8,["loading"])),[[S]])],4)]),default:r(()=>[f((n(),m(h,{class:"ba-table-form-scrollbar"},{default:r(()=>[y("div",{class:$(["ba-operate-form","ba-"+e(a).form.operate+"-form"]),style:k("width: calc(100% - "+e(a).form.labelWidth/2+"px)")},[e(a).form.loading?W("",!0):(n(),m(V,{key:0,ref_key:"formRef",ref:p,onSubmit:o[3]||(o[3]=D(()=>{},["prevent"])),onKeyup:o[4]||(o[4]=I(l=>e(a).onSubmit(p.value),["enter"])),model:e(a).form.items,"label-position":"right","label-width":e(a).form.labelWidth+"px",rules:v},{default:r(()=>[i(b,{label:e(t)("platformPayment.bank_name"),type:"string",modelValue:e(a).form.items.bank_name,"onUpdate:modelValue":o[0]||(o[0]=l=>e(a).form.items.bank_name=l),prop:"bank_name",placeholder:e(t)("Please input field",{field:e(t)("platformPayment.bank_name")})},null,8,["label","modelValue","placeholder"]),i(b,{label:e(t)("platformPayment.bank_account"),type:"string",modelValue:e(a).form.items.bank_account,"onUpdate:modelValue":o[1]||(o[1]=l=>e(a).form.items.bank_account=l),prop:"bank_account",placeholder:e(t)("Please input field",{field:e(t)("platformPayment.bank_account")})},null,8,["label","modelValue","placeholder"]),i(b,{label:e(t)("platformPayment.admin_id"),type:"remoteSelect",modelValue:e(a).form.items.admin_id,"onUpdate:modelValue":o[2]||(o[2]=l=>e(a).form.items.admin_id=l),prop:"admin_id","input-attr":{pk:"admin.id",field:"username","remote-url":"/admin/auth.Admin/index"},placeholder:e(t)("Please select field",{field:e(t)("platformPayment.admin_id")})},null,8,["label","modelValue","input-attr","placeholder"])]),_:1},8,["model","label-width","rules"]))],6)]),_:1})),[[x,e(a).form.loading]])]),_:1},8,["model-value","onClose"])}}});export{L as _};
