import{_ as L,q as z,A as T,B as d,a4 as M,r as o,as as R,o as c,n as C,L as y,K as h,H as u,t as e,I as j,J as H,v as E,M as J,p as D,bd as K,S as v,V as P,W}from"./index.7a111e62.js";import{m as Y}from"./status.8b8d6c88.js";const G=p=>(P("data-v-191dac5c"),p=p(),W(),p),O={class:"addEditForm"},Q=G(()=>D("span",null,"\u64CD\u4F5C",-1)),X=v("\u6DFB\u52A0\u8BA2\u5355"),Z=v("\u7F16\u8F91"),ee=v("\u5220\u9664"),ue={class:"flex justify-end"},le=v("\u4FDD\u5B58"),ae=z({__name:"addEditForm",emits:["reload"],setup(p,{emit:te}){T();const w=d("order"),B=d(null),F=d(!1),V=d(!1),k=d([]),t=d({...{buy_id:"",companyNo:"",khNo:"",invtype:"",email:"",remark:"",orderArr:[]}}),g=M({buy_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",trigger:"blur"},{min:1,max:10,message:"\u957F\u5EA6\u5728 1 \u5230 10 \u4E2A\u5B57\u7B26",trigger:"blur"}],companyNo:[{required:!0,message:"\u8BF7\u9009\u62E9\u83DC\u5355\u7C7B\u578B",trigger:"change"}],khNo:[{required:!0,message:"\u8BF7\u9009\u62E9\u83DC\u5355\u56FE\u6807",trigger:"change"}],invtype:[{required:!0,message:"\u8BF7\u9009\u62E9\u53D1\u7968\u7C7B\u578B",trigger:"change"}],email:[{required:!0,message:"\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1",trigger:"blur"}],remark:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BF7\u5907\u6CE8",trigger:"blur"}]}),b=(r,a)=>{r===-1&&(V.value=!0)},x=(r,a)=>{};function A(){B.value.validate(async r=>{})}function N(){const{menu_type:r}=t.value;g.menu_url[0].required=r==="2"}return(r,a)=>{const m=o("el-input"),s=o("el-form-item"),i=o("el-col"),q=o("el-option"),S=o("el-select"),n=o("el-table-column"),_=o("el-button"),I=o("el-table"),U=o("el-row"),$=R("loading");return c(),C("div",O,[y((c(),h(E(K),{ref_key:"formRef",ref:B,model:t.value,rules:g,"label-width":"90px","status-icon":""},{default:u(()=>[e(U,null,{default:u(()=>[e(i,{span:12},{default:u(()=>[e(s,{label:"\u9500\u552E\u65B9\u516C\u53F8\u62AC\u5934",prop:"buy_id","label-width":"135px"},{default:u(()=>[e(m,{modelValue:t.value.buy_id,"onUpdate:modelValue":a[0]||(a[0]=l=>t.value.buy_id=l),placeholder:"\u9500\u552E\u65B9\u516C\u53F8\u62AC\u5934"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:12},{default:u(()=>[e(s,{label:"\u8D2D\u4E70\u65B9\u516C\u53F8\u62AC\u5934",prop:"companyNo","label-width":"135px"},{default:u(()=>[e(m,{modelValue:t.value.companyNo,"onUpdate:modelValue":a[1]||(a[1]=l=>t.value.companyNo=l),placeholder:"\u8D2D\u4E70\u65B9\u516C\u53F8\u62AC\u5934"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:8},{default:u(()=>[e(s,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invtype"},{default:u(()=>[e(S,{modelValue:t.value.invtype,"onUpdate:modelValue":a[2]||(a[2]=l=>t.value.invtype=l),style:{width:"100%"},onChange:N,placeholder:"\u53D1\u7968\u7C7B\u578B"},{default:u(()=>[(c(!0),C(j,null,H(E(Y),(l,f)=>(c(),h(q,{key:"type"+l.value+f,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u7535\u5B50\u90AE\u7BB1",prop:"email"},{default:u(()=>[e(m,{modelValue:t.value.email,"onUpdate:modelValue":a[3]||(a[3]=l=>t.value.email=l),placeholder:"\u7535\u5B50\u90AE\u7BB1"},null,8,["modelValue"])]),_:1})]),_:1}),e(i,{span:16},{default:u(()=>[e(s,{label:"\u7533\u8BF7\u5907\u6CE8",prop:"remark"},{default:u(()=>[e(m,{modelValue:t.value.remark,"onUpdate:modelValue":a[4]||(a[4]=l=>t.value.remark=l),rows:3,type:"textarea",maxlength:"2000",placeholder:"\u7533\u8BF7\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1}),y(e(i,{span:24,style:{padding:"0 16px"}},{default:u(()=>[e(I,{data:k.value,stripe:"",border:"",style:{width:"100%"}},{default:u(()=>[e(n,{prop:"sequenceNo",label:"\u9500\u552E\u8BA2\u5355\u7F16\u53F7",width:"160"}),e(n,{prop:"address",label:"\u9500\u552E\u65B9\u516C\u53F8\u7F16\u53F7",width:"160"}),e(n,{prop:"address",label:"\u9500\u552E\u65B9\u516C\u53F8\u540D\u79F0",width:"160"}),e(n,{prop:"address",label:"\u8D2D\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",width:"160"}),e(n,{prop:"address",label:"\u8D2D\u4E70\u65B9\u516C\u53F8\u540D\u79F0",width:"160"}),e(n,{prop:"inv_fee",label:"\u5F00\u7968\u91D1\u989D",width:"110"}),e(n,null,{header:u(()=>[Q,e(_,{size:"small",class:"fr",onClick:a[5]||(a[5]=l=>b(-1))},{default:u(()=>[X]),_:1})]),default:u(l=>[e(_,{size:"small",onClick:f=>b(l.$index,l.row)},{default:u(()=>[Z]),_:2},1032,["onClick"]),e(_,{size:"small",type:"danger",onClick:f=>x(l.$index,l.row)},{default:u(()=>[ee]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},512),[[J,w.value==="order"]])]),_:1}),D("div",ue,[e(_,{loading:F.value,type:"primary",onClick:A},{default:u(()=>[le]),_:1},8,["loading"])])]),_:1},8,["model","rules"])),[[$,F.value]])])}}});var de=L(ae,[["__scopeId","data-v-191dac5c"]]);export{de as default};
