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