import{o as D,p as H}from"./elementPlus.CqHltQSO.js";import I from"./DataTable.DIvOQ2Zf.js";import{V as M}from"./index.DhA83F-e.js";import{u as j}from"./useTableHeight.DC32WYSL.js";import{u as O}from"./useResponse.DqThFJSa.js";import{e as z,f as G}from"./api.rK5X0Kzj.js";import{d as J,aI as b,r as u,Z as P,E as Q,ai as r,o as i,c as m,U as a,O as s,G as Z,a as o,u as l,F as y,a8 as k,M as x,S as B,J as A}from"./vue.1RczIYhx.js";import"./useTableData.DHj98pR6.js";import"./Columns.D29A1xlB.js";import"./index.vue_vue_type_script_setup_true_lang.DfUMpYc_.js";import"./hasPermission.lEsua58A.js";import"./index.DoJnwA7v.js";import"./DataTableSlot.vue_vue_type_style_index_0_lang.OkHSP2Bo.js";import"./useTagColor.B-JXlmrE.js";import"./useCopyText.pVj3jbkF.js";/* empty css                   */import"./ShowSkuDrawer.j1qK3RHn.js";import"./_plugin-vue_export-helper.DlAUqK2U.js";import"./SkuBuilder.Bf3AyuRd.js";const W={class:"p-5"},X={class:"flex flex-1"},Y={class:"w-full whitespace-nowrap"},$={class:"flex items-center"},ee={class:"flex items-center"},te={class:"flex items-center"},le={class:"flex items-center"},ae={class:"flex gap-1.5 ml-5"},we=J({__name:"index",setup(oe){const g=b("titleContainer"),V=b("queryContainer"),{tableHeight:N}=j(g,V),C=b("table"),c=u(!1),f=u(!1),n=P({brandName:"",kind:"",status:"",sku:""});Z("query-parameter",n);const w=u([]),U=u([]),L=u([{key:1,name:"草稿"},{key:3,name:"已发布"}]);Q(()=>{S()});async function S(){w.value=(await O(z)).data,U.value=(await O(G)).data}async function q(){var d;c.value=!0,await((d=C.value)==null?void 0:d.fetchList(!0)),c.value=!1}async function E(){var d;for(const e in n)n[e]="";f.value=!0,await((d=C.value)==null?void 0:d.fetchList(!0)),f.value=!1}return(d,e)=>{const _=r("el-option"),v=r("el-select"),p=r("el-col"),K=r("el-input"),T=r("el-row"),h=r("el-button"),F=r("el-divider"),R=r("el-card");return i(),m("div",W,[a(R,{class:"h-full",style:{color:"rgba(0, 0, 0, 0.88)"}},{default:s(()=>[o("div",{ref_key:"titleContainer",ref:g,class:"text-xl font-semibold pb-5"},"公司SKU",512),o("div",{ref_key:"queryContainer",ref:V,class:"flex justify-between"},[o("div",X,[o("div",Y,[a(T,{gutter:20,style:{"margin-bottom":"5px"}},{default:s(()=>[a(p,{span:5},{default:s(()=>[o("div",$,[e[4]||(e[4]=o("span",{class:"mr-2"},"品牌名称",-1)),a(v,{modelValue:l(n).brandName,"onUpdate:modelValue":e[0]||(e[0]=t=>l(n).brandName=t),clearable:"",placeholder:"请选择品牌名称"},{default:s(()=>[(i(!0),m(y,null,k(l(w),t=>(i(),x(_,{key:t.id,label:t.brand_name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1}),a(p,{span:5},{default:s(()=>[o("div",ee,[e[5]||(e[5]=o("span",{class:"mr-2"},"种 类",-1)),a(v,{modelValue:l(n).kind,"onUpdate:modelValue":e[1]||(e[1]=t=>l(n).kind=t),clearable:"",placeholder:"请选择种类"},{default:s(()=>[(i(!0),m(y,null,k(l(U),t=>(i(),x(_,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1}),a(p,{span:4},{default:s(()=>[o("div",te,[e[6]||(e[6]=o("span",{class:"mr-2"},"状 态",-1)),a(v,{modelValue:l(n).status,"onUpdate:modelValue":e[2]||(e[2]=t=>l(n).status=t),clearable:"",placeholder:"请选择状态"},{default:s(()=>[(i(!0),m(y,null,k(l(L),t=>(i(),x(_,{key:t.key,label:t.name,value:t.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1}),a(p,{span:6},{default:s(()=>[o("div",le,[e[7]||(e[7]=o("span",{class:"mr-2"},"SKU",-1)),a(K,{modelValue:l(n).sku,"onUpdate:modelValue":e[3]||(e[3]=t=>l(n).sku=t),clearable:"",placeholder:"请输入SKU"},null,8,["modelValue"])])]),_:1})]),_:1})])]),a(M),o("div",ae,[a(h,{icon:l(D),loading:l(c),type:"primary",onClick:q},{default:s(()=>e[8]||(e[8]=[B(" 查 询 ")])),_:1},8,["icon","loading"]),a(h,{icon:l(H),loading:l(f),color:"#ECECF1C9",style:{width:"88px",color:"#3c3c3c"},onClick:E},{default:s(()=>e[9]||(e[9]=[B(" 重 置 ")])),_:1},8,["icon","loading"])])],512),a(F,{ref:"dividerContainer",style:{margin:"20px 0 12px 0"}},null,512),o("div",{style:A({height:l(N)+"px"})},[a(I,{ref:"table"},null,512)],4)]),_:1})])}}});export{we as default};
