import{I as q,r as u,A as E,B as I,c as o,C as N,d as p,e as x,D as g,E as V,i as t,f as e,h as r,G as w,l as Q,F as A,J as G,m as k,v as J}from"./index-D1zVguhy.js";function T(c){return q({url:"/djl-archives/channel/query/dispatch/list",method:"get",params:c})}function z(c){return q({url:"/djl-archives/channel/query/list",method:"get",params:c})}const H={class:"app-container"},W={__name:"index",setup(c){const{proxy:C}=J(),b=u([]),d=u(!0),B=u(!0),m=u(0),h=u([]),L=E({form:{},queryParams:{page:1,limit:10}}),{queryParams:l,form:M}=I(L);T().then(s=>{h.value=[{value:"",label:"请选择"},...s.data.map(a=>({value:a,label:a,id:a}))]});function _(){d.value=!0,z(l.value).then(s=>{b.value=s.data,m.value=s.count,d.value=!1})}function f(){l.value.page=1,l.value.limit=10,_()}function R(){C.resetForm("queryRef"),f()}return _(),(s,a)=>{const S=o("el-input"),v=o("el-form-item"),U=o("el-option"),D=o("el-select"),y=o("el-button"),F=o("el-form"),i=o("el-table-column"),K=o("el-table"),P=o("pagination"),j=N("loading");return p(),x("div",H,[g(e(F,{model:t(l),ref:"queryRef",inline:!0},{default:r(()=>[e(v,{label:"渠道公司名称",prop:"name"},{default:r(()=>[e(S,{modelValue:t(l).name,"onUpdate:modelValue":a[0]||(a[0]=n=>t(l).name=n),clearable:"",style:{width:"300px"},onKeyup:Q(f,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(v,{label:"派遣公司",prop:"dispatch"},{default:r(()=>[e(D,{modelValue:t(l).dispatch,"onUpdate:modelValue":a[1]||(a[1]=n=>t(l).dispatch=n),placeholder:"请选择",filterable:"",style:{width:"300px"}},{default:r(()=>[(p(!0),x(A,null,G(t(h),n=>(p(),w(U,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(v,null,{default:r(()=>[e(y,{type:"primary",icon:"Search",onClick:f},{default:r(()=>[k("搜索")]),_:1}),e(y,{icon:"Refresh",onClick:R},{default:r(()=>[k("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[V,t(B)]]),g((p(),w(K,{data:t(b)},{default:r(()=>[e(i,{label:"渠道公司名称",align:"left",prop:"name"}),e(i,{label:"所属派遣公司",align:"left",prop:"dispatch"}),e(i,{label:"联系人",align:"center",prop:"contracts"}),e(i,{label:"联系电话",align:"center",prop:"contract_number"}),e(i,{label:"联系地址",align:"center",prop:"address"}),e(i,{label:"入库时间",align:"left",prop:"create_time"}),e(i,{label:"更新时间",align:"left",prop:"update_time"})]),_:1},8,["data"])),[[j,t(d)]]),g(e(P,{total:t(m),page:t(l).page,"onUpdate:page":a[2]||(a[2]=n=>t(l).page=n),limit:t(l).limit,"onUpdate:limit":a[3]||(a[3]=n=>t(l).limit=n),onPagination:_},null,8,["total","page","limit"]),[[V,t(m)>0]])])}}};export{W as default};
