import{C as h,D as x,F as D}from"./element-plus.a63a26dd.js";import{P as R}from"./index.c69e7fd7.js";import{c as k}from"./store_order.1334fb6f.js";import"./lodash.2473fc51.js";import{d as f,s as i,r as g,b as I,Z as _,o as O,c as U,U as u,L as s,u as a}from"./@vue.18505fe0.js";const A={class:"edit-popup"},P=f({name:"warehouseOrderEdit"}),Z=f({...P,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(S,{expose:F,emit:C}){const m=C,p=i(),r=i(),c=g("add"),b=I(()=>c.value=="edit"?"\u7F16\u8F91\u5546\u54C1":"\u65B0\u589E\u5546\u54C1\u4ED3\u50A8\u8BA2\u5355"),o=_({id:"",oid:"",store_name:"",total_price:"",cart_num:""}),v=_({total_price:[{required:!0,message:"\u8BF7\u8F93\u5165\u603B\u4EF7\u683C",trigger:["blur"]}]}),E=async t=>{for(const e in o)t[e]!=null&&t[e]!=null&&(o[e]=t[e])},y=async()=>{var e,l;await((e=p.value)==null?void 0:e.validate());const t={...o};await k(t),(l=r.value)==null||l.close(),m("success")},w=(t="add")=>{var e;c.value=t,(e=r.value)==null||e.open()},B=()=>{m("close")};return F({open:w,setFormData:E}),(t,e)=>{const l=h,d=x,V=D;return O(),U("div",A,[u(R,{ref_key:"popupRef",ref:r,title:a(b),async:!0,width:"550px",onConfirm:y,onClose:B},{default:s(()=>[u(V,{ref_key:"formRef",ref:p,model:a(o),"label-width":"90px",rules:a(v)},{default:s(()=>[u(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:s(()=>[u(l,{modelValue:a(o).store_name,"onUpdate:modelValue":e[0]||(e[0]=n=>a(o).store_name=n),disabled:""},null,8,["modelValue"])]),_:1}),u(d,{label:"\u6570\u91CF",prop:"cart_num"},{default:s(()=>[u(l,{modelValue:a(o).cart_num,"onUpdate:modelValue":e[1]||(e[1]=n=>a(o).cart_num=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF",readonly:!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{Z as _};
