import{E as G,g as H,d as J}from"./EditMappingDialog.d8f5b956.js";import{s as K}from"./goodsManage.ac38b63c.js";import{d as Q,a6 as S,r as c,b as C,p as W,c as u,at as X,e as _,f as w,g as i,h as t,i as o,u as l,F as A,j as Y,k as f,w as Z,A as E,q as ee,m as d,y as V,N as te,E as oe,_ as le}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const ae={class:"filter-form"},ne=d("\u7F8E\u56E2"),ue=d("\u6296\u97F3"),se=d("\u67E5\u8BE2"),ie={class:"data"},de={class:"operation-container"},_e={class:"operation-btn"},pe=d("\u6DFB\u52A0"),re={class:"table"},ce=["src"],me=d("\u7F8E\u56E2"),ge=d("\u6296\u97F3"),fe={class:"table-operation-btn"},be={class:"top"},he=d("\u7F16\u8F91"),ve=d("\u5220\u9664"),Be={class:"bottom"},Ce={class:"pagination"},ye=Q({setup(Ee){S();let y=c(!1);const a=C({page:1,limit:10,goods_id:"",type:"",third_coupon_id:"",third_coupon_name:""});C({store:[]});const b=C({list:[],count:0});c([]);const m=()=>{y.value=!0,H(a).then(s=>{b.list=s.list,b.count=s.count,y.value=!1})};m(),c(!1),W(()=>[a.page,a.limit],()=>{m()});const z=()=>{m()};let p=c(!1),h=c(!1),v=c(0);const L=()=>{v.value=0,h.value=!0,V(()=>{p.value=!0})},U=s=>{v.value=s,h.value=!0,V(()=>{p.value=!0})},N=()=>{v.value=0,V(()=>{h.value=!1}),m()},P=s=>{te.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{J({id:s}).then(()=>{oe({message:"\u5220\u9664\u6210\u529F",type:"success"}),m()})}).catch(()=>{})},k=C({list:[]});return(()=>{K({}).then(s=>{console.log("res",s),k.list=s})})(),(s,n)=>{const T=u("el-option"),M=u("el-select"),g=u("el-form-item"),x=u("el-radio"),j=u("el-radio-group"),F=u("el-input"),B=u("el-button"),q=u("el-form"),r=u("el-table-column"),D=u("el-tag"),I=u("el-table"),O=u("el-pagination"),R=X("loading");return _(),w(A,null,[i("div",ae,[t(q,{model:l(a),"label-width":"90px"},{default:o(()=>[t(g,{label:"\u5546\u54C1",prop:"goods_id"},{default:o(()=>[t(M,{modelValue:l(a).goods_id,"onUpdate:modelValue":n[0]||(n[0]=e=>l(a).goods_id=e),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",clearable:"",filterable:""},{default:o(()=>[(_(!0),w(A,null,Y(l(k).list,e=>(_(),f(T,{key:e.id,label:e.title,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(g,{label:"\u7B2C\u4E09\u65B9\u5238\u7C7B\u578B",prop:"type"},{default:o(()=>[t(j,{modelValue:l(a).type,"onUpdate:modelValue":n[1]||(n[1]=e=>l(a).type=e)},{default:o(()=>[t(x,{label:"meituan"},{default:o(()=>[ne]),_:1}),t(x,{label:"douyin"},{default:o(()=>[ue]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(g,{label:"\u7B2C\u4E09\u65B9\u5238id",prop:"third_coupon_id"},{default:o(()=>[t(F,{modelValue:l(a).third_coupon_id,"onUpdate:modelValue":n[2]||(n[2]=e=>l(a).third_coupon_id=e),clearable:""},null,8,["modelValue"])]),_:1}),t(g,{label:"\u7B2C\u4E09\u65B9\u5238\u6807\u9898",prop:"third_coupon_name"},{default:o(()=>[t(F,{modelValue:l(a).third_coupon_name,"onUpdate:modelValue":n[3]||(n[3]=e=>l(a).third_coupon_name=e),clearable:""},null,8,["modelValue"])]),_:1}),t(g,null,{default:o(()=>[t(B,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:z},{default:o(()=>[se]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",ie,[i("div",de,[i("div",_e,[t(B,{class:"btn",type:"primary",onClick:L},{default:o(()=>[pe]),_:1})])]),i("div",re,[Z((_(),f(I,{data:l(b).list},{default:o(()=>[t(r,{label:"\u5546\u54C1\u6807\u9898",prop:"goods_title",align:"center"}),t(r,{label:"\u5546\u54C1\u56FE\u7247",prop:"goods_image",align:"center"},{default:o(e=>[i("img",{src:e.row.goods_image,style:{height:"100px"}},null,8,ce)]),_:1}),t(r,{label:"\u7B2C\u4E09\u65B9\u5238\u7C7B\u578B",prop:"type",align:"center"},{default:o(e=>[e.row.type=="meituan"?(_(),f(D,{key:0,type:"success"},{default:o(()=>[me]),_:1})):E("",!0),e.row.type=="douyin"?(_(),f(D,{key:1,type:"danger"},{default:o(()=>[ge]),_:1})):E("",!0)]),_:1}),t(r,{label:"\u7B2C\u4E09\u65B9\u5238id",prop:"third_coupon_id",align:"center"}),t(r,{label:"\u7B2C\u4E09\u65B9\u5238\u6807\u9898",prop:"third_coupon_name",align:"center"}),t(r,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:o(({row:e})=>[i("div",fe,[i("div",be,[t(B,{size:"small",type:"primary",onClick:$=>U(e.id)},{default:o(()=>[he]),_:2},1032,["onClick"]),t(B,{size:"small",type:"danger",onClick:$=>P(e.id)},{default:o(()=>[ve]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[R,l(y)]])])]),i("div",Be,[i("div",Ce,[t(O,{currentPage:l(a).page,"onUpdate:currentPage":n[4]||(n[4]=e=>l(a).page=e),"page-size":l(a).limit,"onUpdate:page-size":n[5]||(n[5]=e=>l(a).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(b).count},null,8,["currentPage","page-size","total"])])]),l(h)?(_(),f(G,{key:0,modelValue:l(p),"onUpdate:modelValue":n[6]||(n[6]=e=>ee(p)?p.value=e:p=e),id:l(v),onOnClose:N},null,8,["modelValue","id"])):E("",!0)],64)}}});const we=le(ye,[["__scopeId","data-v-3b3663e3"]]);export{we as default};
