import{b as G,ar as P,aU as M,as as I,_ as N,c as r,e as p,f as m,g as u,h as s,i as d,F as h,j as E,k as U,t as L,A as T,m as g,R as O,S as R}from"./index.0308b213.js";import{g as j}from"./classifyManage.6f51847c.js";const z={setup(){const e=G({searchLoading:!1,tableData:[{timeBucket:"\u65E9\u9910"},{timeBucket:"\u5348\u9910"},{timeBucket:"\u665A\u9910"},{timeBucket:"\u5BB5\u591C"}],weekList:["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u5F53\u65E5\u9910"],goodsList:[1,2,3,4,5,6,7,8].map(o=>{let t=[];for(let n=1;n<=8;n++)t.push({goodsArr:[]});return{goods:t}}),showDialog:!1,openMenu:{row:0,column:0},goodsParams:{cid:"",keyword:""},classifyList:[],goodsData:[],cascader:[],temporary:[]});j({page:1,limit:200}).then(o=>{console.log("\u8BF7\u6C42\u7ED3\u679C:",o.lists),e.classifyList=o.lists.map(t=>({value:t.id,label:t.title,children:t.child.map(n=>({value:n.id,label:n.title}))}))});const a=(o,t,n)=>{console.log(`\u5220\u9664\uFF1A\u7B2C${o+1}\u884C,\u7B2C${t+1}\u4E2A`),e.goodsList[o].goods[t].goodsArr.splice(n,1)},f=(o,t)=>{e.showDialog=!0,e.temporary=[],e.openMenu={row:o,column:t},console.log(`\u7B2C${o+1}\u884C,\u7B2C${t+1}\u4E2A`)},y=o=>{console.log("\u9009\u4E2D\uFF1A",o);const t=e.temporary.indexOf(o);t==-1?e.temporary.push(o):e.temporary.splice(t,1)},b=o=>e.temporary.indexOf(o)==-1?void 0:"success",C=()=>{e.showDialog=!1;const{row:o,column:t}=e.openMenu;e.goodsList[o].goods[t].goodsArr.push(...e.temporary)},i=()=>{var o,t;e.goodsParams.cid=((o=e.cascader)==null?void 0:o[1])||((t=e.cascader)==null?void 0:t[0])||"",e.searchLoading=!0};return{...P(e),delGoods:a,handleDialog:f,selectedGoods:y,dialogConfirm:C,Edit:M,Search:I,searchGoods:i,isPickGoods:b}}};const q=e=>(O("data-v-b83d1698"),e=e(),R(),e),H={class:"container"},J=q(()=>u("h1",{class:"title"},"\u5546\u54C1\u8BBE\u7F6E",-1)),K={key:0,class:"wrap"},Q=g("\u4FEE\u6539\u83DC\u54C1"),W=g("\u63D0\u4EA4"),X={class:"dialog-wrap"},Y={class:"search-wrap"},Z=g("\u641C\u7D22"),x=g("\u9009\u62E9"),ee={class:"dialog-footer"},oe=g("\u53D6\u6D88"),te=g("\u786E\u5B9A");function se(e,a,f,y,b,C){const i=r("el-table-column"),o=r("CircleCloseFilled"),t=r("el-icon"),n=r("el-button"),k=r("el-table"),V=r("el-cascader"),A=r("el-input"),F=r("el-image"),S=r("el-dialog");return p(),m(h,null,[u("div",H,[J,s(k,{data:e.tableData,border:"",align:"center",style:{width:"100%"}},{default:d(()=>[s(i,{prop:"timeBucket",label:"\u65F6\u6BB5",align:"center"}),(p(!0),m(h,null,E(e.weekList,(l,c)=>(p(),U(i,{key:c,label:l,align:"center"},{default:d(_=>{var w,v,$;return[($=(v=(w=e.goodsList)==null?void 0:w[_.$index])==null?void 0:v.goods)!=null&&$[c]?(p(),m("div",K,[(p(!0),m(h,null,E(e.goodsList[_.$index].goods[c].goodsArr,(B,D)=>(p(),m("div",{class:"goods",key:D},[u("span",null,L(B.title),1),s(t,{class:"icon-close",size:16,onClick:le=>e.delGoods(_.$index,c,D)},{default:d(()=>[s(o)]),_:2},1032,["onClick"])]))),128))])):T("",!0),s(n,{style:{width:"100%"},icon:e.Edit,onClick:B=>e.handleDialog(_.$index,c)},{default:d(()=>[Q]),_:2},1032,["icon","onClick"])]}),_:2},1032,["label"]))),128))]),_:1},8,["data"]),s(n,{class:"submit-btn",type:"primary"},{default:d(()=>[W]),_:1})]),s(S,{modelValue:e.showDialog,"onUpdate:modelValue":a[5]||(a[5]=l=>e.showDialog=l),title:"\u9009\u62E9\u5546\u54C1"},{footer:d(()=>[u("span",ee,[s(n,{onClick:a[3]||(a[3]=l=>e.showDialog=!1)},{default:d(()=>[oe]),_:1}),s(n,{type:"primary",onClick:a[4]||(a[4]=l=>e.dialogConfirm())},{default:d(()=>[te]),_:1})])]),default:d(()=>[u("div",X,[u("div",Y,[s(V,{style:{width:"180px"},modelValue:e.cascader,"onUpdate:modelValue":a[0]||(a[0]=l=>e.cascader=l),options:e.classifyList,clearable:"",placeholder:"\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options"]),s(A,{modelValue:e.goodsParams.keyword,"onUpdate:modelValue":a[1]||(a[1]=l=>e.goodsParams.keyword=l),placeholder:"\u8F93\u5165\u5546\u54C1\u540D\u79F0\u8FDB\u884C\u641C\u7D22",clearable:""},null,8,["modelValue"]),s(n,{type:"primary",loading:e.searchLoading,icon:e.Search,onClick:a[2]||(a[2]=l=>e.searchGoods())},{default:d(()=>[Z]),_:1},8,["loading","icon"])]),s(k,{data:e.goodsData,border:"",style:{width:"100%"},"max-height":"500"},{default:d(()=>[s(i,{prop:"title",label:"\u540D\u79F0",align:"center",width:"200"},{default:d(l=>[s(F,{src:l.row.thumb,style:{width:"50px"}},null,8,["src"]),u("p",null,L(l.row.title),1)]),_:1}),s(i,{prop:"store_title",label:"\u5546\u6237",align:"center"}),s(i,{prop:"price",label:"\u4EF7\u683C",align:"center"}),s(i,{prop:"total",label:"\u5E93\u5B58",align:"center"}),s(i,{label:"\u64CD\u4F5C",align:"center"},{default:d(l=>[s(n,{type:e.isPickGoods(l.row),onClick:c=>e.selectedGoods(l.row)},{default:d(()=>[x]),_:2},1032,["type","onClick"])]),_:1})]),_:1},8,["data"])])]),_:1},8,["modelValue"])],64)}const de=N(z,[["render",se],["__scopeId","data-v-b83d1698"]]);export{de as default};
