import{h as S,y as F,r as N,p as i,M as s,N as r,a6 as f,l as z,W as y,V as _,k as e,o as g,q as m,m as v,$ as B,a0 as D,a4 as I,a2 as U,an as W,t as p,a7 as d}from"./vue-a39e6937.js";import{f as $}from"./index-ba596ae9.js";import{F as n}from"./index-f0d8af94.js";import{b}from"./validate-4ecec794.js";const M={class:"title"},L=S({__name:"popupForm",setup(P){const u=F(),a=W("baTable"),{t}=$(),V=N({pay_amount:[b({name:"float",title:t("payApply.pay_amount")})],create_time:[b({name:"date",title:t("payApply.create_time")})],update_time:[b({name:"date",title:t("payApply.update_time")})]});return(R,l)=>{const A=p("el-form"),k=p("el-scrollbar"),c=p("el-button"),C=p("el-dialog"),h=d("drag"),w=d("zoom"),x=d("loading"),q=d("blur");return i(),s(C,{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((i(),z("div",M,[y(_(e(a).form.operate?e(t)(e(a).form.operate):""),1)])),[[h,[".ba-operate-dialog",".el-dialog__header"]],[w,".ba-operate-dialog"]])]),footer:r(()=>[g("div",{style:v("width: calc(100% - "+e(a).form.labelWidth/1.8+"px)")},[m(c,{onClick:l[6]||(l[6]=o=>e(a).toggleForm(""))},{default:r(()=>[y(_(e(t)("Cancel")),1)]),_:1}),f((i(),s(c,{loading:e(a).form.submitLoading,onClick:l[7]||(l[7]=o=>e(a).onSubmit(u.value)),type:"primary"},{default:r(()=>[y(_(e(a).form.operateIds&&e(a).form.operateIds.length>1?e(t)("Save and edit next item"):e(t)("Save")),1)]),_:1},8,["loading"])),[[q]])],4)]),default:r(()=>[f((i(),s(k,{class:"ba-table-form-scrollbar"},{default:r(()=>[g("div",{class:U(["ba-operate-form","ba-"+e(a).form.operate+"-form"]),style:v("width: calc(100% - "+e(a).form.labelWidth/2+"px)")},[e(a).form.loading?I("",!0):(i(),s(A,{key:0,ref_key:"formRef",ref:u,onSubmit:l[4]||(l[4]=B(()=>{},["prevent"])),onKeyup:l[5]||(l[5]=D(o=>e(a).onSubmit(u.value),["enter"])),model:e(a).form.items,"label-position":"right","label-width":e(a).form.labelWidth+"px",rules:V},{default:r(()=>[m(n,{label:e(t)("payApply.req_id"),type:"remoteSelect",modelValue:e(a).form.items.req_id,"onUpdate:modelValue":l[0]||(l[0]=o=>e(a).form.items.req_id=o),prop:"req_id","input-attr":{pk:"req_order.id",field:"name","remote-url":"/admin/ReqOrder/index"},placeholder:e(t)("Please select field",{field:e(t)("payApply.req_id")})},null,8,["label","modelValue","input-attr","placeholder"]),m(n,{label:e(t)("payApply.status"),type:"select",modelValue:e(a).form.items.status,"onUpdate:modelValue":l[1]||(l[1]=o=>e(a).form.items.status=o),prop:"status",data:{content:{待审核:e(t)("payApply.status 待审核"),已通过:e(t)("payApply.status 已通过"),已驳回:e(t)("payApply.status 已驳回")}},placeholder:e(t)("Please select field",{field:e(t)("payApply.status")})},null,8,["label","modelValue","data","placeholder"]),m(n,{label:e(t)("payApply.pay_amount"),type:"number",prop:"pay_amount","input-attr":{step:1},modelValue:e(a).form.items.pay_amount,"onUpdate:modelValue":l[2]||(l[2]=o=>e(a).form.items.pay_amount=o),modelModifiers:{number:!0},placeholder:e(t)("Please input field",{field:e(t)("payApply.pay_amount")})},null,8,["label","modelValue","placeholder"]),m(n,{label:e(t)("payApply.images"),type:"images",modelValue:e(a).form.items.images,"onUpdate:modelValue":l[3]||(l[3]=o=>e(a).form.items.images=o),prop:"images"},null,8,["label","modelValue"])]),_:1},8,["model","label-width","rules"]))],6)]),_:1})),[[x,e(a).form.loading]])]),_:1},8,["model-value","onClose"])}}});export{L as _};
