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