import{d as x,r as n,w as h,o as L,A as b,B as l,f as r,a as s,aN as C,E as P,G as S,aB as E,X as I,Y as A,__tla as B}from"./index-92ad187a.js";import{E as D,__tla as U}from"./el-image-ee9e09ec.js";import{__tla as z}from"./el-image-viewer-d472c5a2.js";import{c as G,__tla as N}from"./index-d9067f1c.js";import{_ as R,__tla as T}from"./SkuList.vue_vue_type_script_setup_true_lang-9d8ed665.js";let w,X=Promise.all([(()=>{try{return B}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return z}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return T}catch{}})()]).then(async()=>{w=x({name:"PromotionSpuAndSkuList",__name:"SpuAndSkuList",props:{spuList:{},ruleConfig:{},spuPropertyListP:{}},setup(k,{expose:g}){const c=k,m=n([]),f=n(),p=n([]),y=n();return g({getSkuConfigs:t=>{f.value.validateSku();const i=[];return p.value.forEach(a=>{a.spuDetail.skus.forEach(u=>{i.push(u[t])})}),i}}),h(()=>c.spuList,t=>{t&&(m.value=t)},{deep:!0,immediate:!0}),h(()=>c.spuPropertyListP,t=>{t&&(p.value=t,setTimeout(()=>{y.value=t.map(i=>i.spuId)},200))},{deep:!0,immediate:!0}),(t,i)=>{const a=I,u=D,v=A;return L(),b(v,{data:s(m),"expand-row-keys":s(y),"row-key":"id"},{default:l(()=>[r(a,{type:"expand",width:"30"},{default:l(({row:e})=>{var d,o;return[r(s(R),{ref_key:"skuListRef",ref:f,"is-activity-component":!0,"prop-form-data":(d=s(p).find(_=>_.spuId===e.id))==null?void 0:d.spuDetail,"property-list":(o=s(p).find(_=>_.spuId===e.id))==null?void 0:o.propertyList,"rule-config":t.ruleConfig},{extension:l(()=>[C(t.$slots,"default")]),_:2},1032,["prop-form-data","property-list","rule-config"])]}),_:3}),r(a,{key:"id",align:"center",label:"\u5546\u54C1\u7F16\u53F7",prop:"id"}),r(a,{label:"\u5546\u54C1\u56FE","min-width":"80"},{default:l(({row:e})=>[r(u,{src:e.picUrl,class:"h-30px w-30px",onClick:d=>{return o=e.picUrl,void G({zIndex:99999999,urlList:[o]});var o}},null,8,["src","onClick"])]),_:1}),r(a,{"show-overflow-tooltip":!0,label:"\u5546\u54C1\u540D\u79F0","min-width":"300",prop:"name"}),r(a,{align:"center",label:"\u5546\u54C1\u552E\u4EF7","min-width":"90",prop:"price"},{default:l(({row:e})=>[P(S(s(E)(e.price)),1)]),_:1}),r(a,{align:"center",label:"\u9500\u91CF","min-width":"90",prop:"salesCount"}),r(a,{align:"center",label:"\u5E93\u5B58","min-width":"90",prop:"stock"})]),_:3},8,["data","expand-row-keys"])}}})});export{w as _,X as __tla};
