import{az as C,aa as v,d as z,a6 as S,b as x,p as T,c as i,e as g,f as B,g as m,h as e,i as s,u as n,F as f,j as w,k as E,m as F,t as N,A as O,N as I,E as h,_ as j}from"./index.0308b213.js";import{A as L}from"./index.1d26a072.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const M=o=>C.request({url:"addon/hand2.hand_goods/list",params:o}),$=(o,c)=>C.request({url:"addon/hand2.hand_goods/status",method:"POST",data:{id:o,status:c}}),J=o=>C.request({url:"addon/hand2.hand_goods/delete",method:"POST",data:{id:o}}),K=o=>v.request({url:"agent/plugin.hand2.hand_goods/list",params:o}),Q=(o,c)=>v.request({url:"agent/plugin.hand2.hand_goods/status",method:"POST",data:{id:o,status:c}}),R=o=>v.request({url:"agent/plugin.hand2.hand_goods/delete",method:"POST",data:{id:o}}),W={class:"filter-form"},X=F("\u7B5B\u9009"),Y={class:"data"},Z={class:"table"},ee=F("\u5220\u9664"),te={class:"pagination"},ae=z({setup(o){const{OpPlatform:c}=S(),u=x({page:1,limit:10,agentid:"",cid:""}),r=x({list:[],cids:[],count:0}),_=()=>{c.value=="agent"?K(u).then(l=>{r.list=l.list,r.cids=l.cids,r.count=l.count}):M(u).then(l=>{r.list=l.list,r.cids=l.cids,r.count=l.count})};_();const V=l=>{I.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u8BE5\u5206\u7C7B\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{c.value=="agent"?R(l).then(()=>{h.success("\u5220\u9664\u5546\u54C1\u6210\u529F"),_()}):J(l).then(()=>{h.success("\u5220\u9664\u5546\u54C1\u6210\u529F"),_()})})},y=(l,d)=>{c.value==="agent"?Q(l,d).then(()=>{h.success("\u4FEE\u6539\u5546\u54C1\u72B6\u6001\u6210\u529F"),_()}):$(l,d).then(()=>{h.success("\u4FEE\u6539\u5546\u54C1\u72B6\u6001\u6210\u529F"),_()})};return T(()=>[u.page,u.limit,u.agentid,u.cid],()=>{_()},{deep:!0}),(l,d)=>{const D=i("el-option"),k=i("el-select"),b=i("el-form-item"),A=i("el-button"),q=i("el-form"),a=i("el-table-column"),G=i("el-image"),P=i("el-switch"),H=i("el-table"),U=i("el-pagination");return g(),B(f,null,[m("div",W,[e(q,{"label-width":"90px"},{default:s(()=>[e(b,{label:"\u5546\u54C1\u5206\u7C7B"},{default:s(()=>[e(k,{modelValue:n(u).cid,"onUpdate:modelValue":d[0]||(d[0]=t=>n(u).cid=t),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:"",clearable:""},{default:s(()=>[(g(!0),B(f,null,w(n(r).cids,(t,p)=>(g(),E(D,{key:p,value:t.id,label:t.title},{default:s(()=>[F(N(t.title),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),n(c)==="shangpu"?(g(),E(b,{key:0,label:"\u4EE3\u7406\u533A\u57DF"},{default:s(()=>[e(n(L),{modelValue:n(u).agentid,"onUpdate:modelValue":d[1]||(d[1]=t=>n(u).agentid=t)},null,8,["modelValue"])]),_:1})):O("",!0),e(b,null,{default:s(()=>[e(A,{type:"primary",onClick:_},{default:s(()=>[X]),_:1})]),_:1})]),_:1})]),m("div",Y,[m("div",Z,[e(H,{data:n(r).list},{default:s(()=>[e(a,{prop:"id",align:"center",label:"ID"}),e(a,{prop:"agent_title",align:"center",label:"\u4EE3\u7406\u533A\u57DF"}),e(a,{prop:"buyer_uid",align:"center",label:"\u4E70\u5BB6UID"}),e(a,{prop:"seller_uid",align:"center",label:"\u5356\u5BB6UID"}),e(a,{prop:"ordersn",align:"center",label:"\u8BA2\u5355\u7F16\u53F7"}),e(a,{prop:"total",align:"center",label:"\u603B\u6570"}),e(a,{prop:"title",align:"center",label:"\u6807\u9898"}),e(a,{prop:"category_name",align:"center",label:"\u5546\u54C1\u5206\u7C7B"}),e(a,{prop:"description",align:"center",label:"\u63CF\u8FF0"}),e(a,{align:"center",label:"\u7F29\u7565\u56FE"},{default:s(t=>[(g(!0),B(f,null,w(t.row.thumb,(p,ue)=>(g(),E(G,{style:{width:"200px",height:"200px"},src:p},null,8,["src"]))),256))]),_:1}),e(a,{prop:"realname",align:"center",label:"\u5356\u5BB6\u540D\u79F0"}),e(a,{prop:"price",align:"center",label:"\u4EF7\u683C"}),e(a,{prop:"status_name",align:"center",label:"\u5546\u54C1\u72B6\u6001"}),e(a,{align:"center",width:"140px",label:"\u4E0A\u67B6/\u4E0B\u67B6"},{default:s(t=>[m("div",null,[e(P,{modelValue:t.row.status,"onUpdate:modelValue":p=>t.row.status=p,size:"large",width:60,"inline-prompt":"","active-text":"\u4E0A\u67B6\u4E2D","inactive-text":"\u4E0B\u67B6\u4E2D","active-color":"#00C5A1","active-value":1,"inactive-value":-1,onClick:p=>y(t.row.id,p)},null,8,["modelValue","onUpdate:modelValue","onClick"])])]),_:1}),e(a,{align:"center",label:"\u4FEE\u6539/\u5220\u9664"},{default:s(t=>[e(A,{type:"danger",onClick:p=>V(t.row.id)},{default:s(()=>[ee]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),m("div",te,[e(U,{currentPage:n(u).page,"onUpdate:currentPage":d[2]||(d[2]=t=>n(u).page=t),"page-size":n(u).limit,"onUpdate:page-size":d[3]||(d[3]=t=>n(u).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:n(r).count},null,8,["currentPage","page-size","total"])])],64)}}});const ie=j(ae,[["__scopeId","data-v-e40e5b72"]]);export{ie as default};
