import{_ as L}from"./EditDialog.vue_vue_type_script_setup_true_lang.8eb93a0f.js";import{l as M,b as $}from"./goods.b10a6ed3.js";import{d as j,b as E,r,p as O,c as n,at as R,e as m,f as G,g as u,h as e,i as l,u as o,w as H,k as v,A as D,q as J,F as K,m as _,y,N as Q,E as S,_ as W}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./TEditor.fed75c12.js";import"./index.esm.3fe50213.js";import"./classify.a92ceae9.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";import"./clerk_shift.2a7d44e0.js";const X={class:"filter-form"},Y=_("\u67E5\u8BE2"),Z={class:"data"},ee={class:"operation-container"},te={class:"operation-btn"},le=_("\u6DFB\u52A0"),oe={class:"table"},ae=_("\u4E0B\u67B6"),se=_("\u4E0A\u67B6"),ne={class:"table-operation-btn"},ue={class:"top"},ie=_("\u7F16\u8F91"),ce=_("\u5220\u9664"),de={class:"bottom"},re={class:"pagination"},_e=j({setup(pe){const a=E({page:1,limit:10,title:""}),f=E({list:[],count:0});r([]);let x=r(!1);const p=()=>{x.value=!0,M(a).then(c=>{f.list=c.list,f.count=c.count,x.value=!1})};p(),r(!1),O(()=>[a.page,a.limit],()=>{p()});const A=()=>{p()};let d=r(!1),g=r(!1),h=r(0);const k=()=>{h.value=0,g.value=!0,y(()=>{d.value=!0})},F=c=>{h.value=c,g.value=!0,y(()=>{d.value=!0})},w=()=>{h.value=0,y(()=>{g.value=!1}),p()},V=c=>{Q.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{$({id:c}).then(()=>{S({message:"\u5220\u9664\u6210\u529F",type:"success"}),p()})}).catch(()=>{})};return(c,i)=>{const z=n("el-input"),B=n("el-form-item"),b=n("el-button"),N=n("el-form"),s=n("el-table-column"),T=n("el-image"),C=n("el-tag"),U=n("el-table"),I=n("el-pagination"),P=R("loading");return m(),G(K,null,[u("div",X,[e(N,{model:o(a),"label-width":"90px"},{default:l(()=>[e(B,{class:"tn-el-form-item",label:"\u670D\u52A1\u6807\u9898"},{default:l(()=>[e(z,{modelValue:o(a).title,"onUpdate:modelValue":i[0]||(i[0]=t=>o(a).title=t),placeholder:"\u8BF7\u8F93\u5165\u670D\u52A1\u6807\u9898"},null,8,["modelValue"])]),_:1}),e(B,null,{default:l(()=>[e(b,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:A},{default:l(()=>[Y]),_:1})]),_:1})]),_:1},8,["model"])]),u("div",Z,[u("div",ee,[u("div",te,[e(b,{class:"btn",type:"primary",onClick:k},{default:l(()=>[le]),_:1})])]),u("div",oe,[H((m(),v(U,{data:o(f).list,"row-key":"id"},{default:l(()=>[e(s,{label:"ID",prop:"id"}),e(s,{label:"\u670D\u52A1\u6807\u9898",prop:"title"}),e(s,{label:"\u5206\u7C7B",prop:"classify_title"}),e(s,{label:"\u670D\u52A1\u7F16\u7801",prop:"code"}),e(s,{label:"\u670D\u52A1\u539F\u4EF7",prop:"old_price"}),e(s,{label:"\u670D\u52A1\u6210\u672C",prop:"cost_price"}),e(s,{label:"\u670D\u52A1\u4E3B\u56FE"},{default:l(t=>[e(T,{style:{width:"50px",height:"50px","border-radius":"8px"},src:t.row.image},null,8,["src"])]),_:1}),e(s,{label:"\u72B6\u6001",width:"160px"},{default:l(t=>[t.row.status==0?(m(),v(C,{key:0,type:"warning"},{default:l(()=>[ae]),_:1})):D("",!0),t.row.status==1?(m(),v(C,{key:1,type:"success"},{default:l(()=>[se]),_:1})):D("",!0)]),_:1}),e(s,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:l(({row:t})=>[u("div",ne,[u("div",ue,[e(b,{size:"small",type:"primary",onClick:q=>F(t.id)},{default:l(()=>[ie]),_:2},1032,["onClick"]),e(b,{size:"small",type:"danger",onClick:q=>V(t.id)},{default:l(()=>[ce]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[P,o(x)]])])]),u("div",de,[u("div",re,[e(I,{currentPage:o(a).page,"onUpdate:currentPage":i[1]||(i[1]=t=>o(a).page=t),"page-size":o(a).limit,"onUpdate:page-size":i[2]||(i[2]=t=>o(a).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:o(f).count},null,8,["currentPage","page-size","total"])])]),o(g)?(m(),v(L,{key:0,modelValue:o(d),"onUpdate:modelValue":i[3]||(i[3]=t=>J(d)?d.value=t:d=t),id:o(h),onOnClose:w},null,8,["modelValue","id"])):D("",!0)],64)}}});const Fe=W(_e,[["__scopeId","data-v-c6626380"]]);export{Fe as default};
