import{d as S,a6 as I,b as C,r as v,p as K,c as u,e as c,f as x,g as i,h as o,i as l,u as a,k as y,A as h,F as B,j as M,m as r,t as D,a1 as q,N as G,E as V,y as w,_ as H}from"./index.0308b213.js";import{R as J,g as Q,a as W,p as X,b as Y}from"./routeEdit.f2f4ff10.js";import{A as Z}from"./index.1d26a072.js";import{u as ee}from"./useAgent.c0cb1751.js";import"./index.b06ad809.js";import"./loading.c9286a4b.js";import"./setting.644fa418.js";import"./install.524ae6f2.js";import"./list.5526c7ef.js";const te={class:"filter-form"},oe=r("\u67E5\u8BE2"),ae={class:"data"},le={class:"operation-container"},se={class:"operation-btn"},ne=r("\u6DFB\u52A0\u8DEF\u7EBF"),ue=r("\u5220\u9664"),ie={class:"table"},re={class:"table-operation-btn"},de={class:"top"},pe=r("\u7F16\u8F91"),_e=r("\u5220\u9664"),ce={class:"bottom"},me={class:"pagination"},ge=S({setup(fe){const{OpPlatform:g}=I(),s=C({page:1,limit:10,agentid:0,type:0,keyword:"",store_areaid:""}),d=C({count:0,routes:[],store_areas:[],address_type:0}),f=v(!1),F=v(!1),E=v();v([]);const p=()=>{g.value==="agent"?Q(s).then(n=>{Object.assign(d,n),console.log(d.store_areas,"store_areas")}):W(s).then(n=>{Object.assign(d,n),console.log(d.store_areas,"store_areas")})};p(),K(()=>[s.page,s.limit],()=>{p()});const k=()=>{p()},{getAgentList:R,getAgentTitle:be}=ee();R();const U=n=>{G.confirm("\u786E\u5B9A\u5220\u9664\u5417\uFF1F",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{g.value==="agent"?X(n).then(t=>{V({message:t.msg,type:"success"}),p()}):Y(n).then(t=>{V({message:t.msg,type:"success"}),p()})})},A=n=>{F.value=!0,w(()=>{E.value=n,f.value=!0})},z=()=>{F.value=!1,w(()=>{f.value=!1}),p()};return(n,t)=>{const b=u("el-form-item"),N=u("el-option"),P=u("el-select"),T=u("el-input"),m=u("el-button"),j=u("el-form"),_=u("el-table-column"),O=u("el-table"),$=u("el-pagination");return c(),x(B,null,[i("div",te,[o(j,{model:a(s),"label-width":"90px"},{default:l(()=>[a(g)==="shangpu"?(c(),y(b,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:l(()=>[o(a(Z),{modelValue:a(s).agentid,"onUpdate:modelValue":t[0]||(t[0]=e=>a(s).agentid=e)},null,8,["modelValue"])]),_:1})):h("",!0),o(b,{class:"tn-el-form-item",label:"\u9009\u62E9\u5546\u5708"},{default:l(()=>[o(P,{modelValue:a(s).store_areaid,"onUpdate:modelValue":t[1]||(t[1]=e=>a(s).store_areaid=e),placeholder:"\u8BF7\u9009\u62E9\u5546\u5708",filterable:"",clearable:""},{default:l(()=>[(c(!0),x(B,null,M(a(d).store_areas,e=>(c(),y(N,{key:e.id,value:e.id,label:e.title},{default:l(()=>[r(D(e.title),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(b,{class:"tn-el-form-item",label:"\u641C\u7D22"},{default:l(()=>[o(T,{modelValue:a(s).keyword,"onUpdate:modelValue":t[2]||(t[2]=e=>a(s).keyword=e),placeholder:"\u8F93\u5165\u914D\u9001\u7AD9\u70B9\u540D\u79F0",onKeyup:t[3]||(t[3]=q(e=>k(),["enter"]))},null,8,["modelValue"])]),_:1}),o(b,null,{default:l(()=>[o(m,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:k},{default:l(()=>[oe]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",ae,[i("div",le,[i("div",se,[o(m,{class:"btn",type:"primary",onClick:t[4]||(t[4]=e=>A(0))},{default:l(()=>[ne]),_:1}),o(m,{class:"btn",type:"danger",onClick:t[5]||(t[5]=()=>{})},{default:l(()=>[ue]),_:1})])]),i("div",ie,[o(O,{data:a(d).routes,onSelectionChange:t[6]||(t[6]=()=>{})},{default:l(()=>[o(_,{type:"selection",width:"55"}),o(_,{label:"\u8DEF\u7EBF\u540D\u79F0",prop:"title",width:"200px"}),a(g)=="shangpu"?(c(),y(_,{key:0,label:"\u6240\u5C5E\u4EE3\u7406",width:"200px"},{default:l(({row:e})=>[r(D(e.agent_text),1)]),_:1})):h("",!0),o(_,{label:"\u914D\u9001\u5546\u5708"},{default:l(({row:e})=>[r(D(e.store_area_text),1)]),_:1}),o(_,{label:"\u521B\u5EFA\u65F6\u95F4",width:"240px"},{default:l(({row:e})=>[r(D(e.addtime),1)]),_:1}),o(_,{label:"\u64CD\u4F5C",width:"240px",align:"center"},{default:l(({row:e})=>[i("div",re,[i("div",de,[o(m,{type:"primary",onClick:L=>A(e.id)},{default:l(()=>[pe]),_:2},1032,["onClick"]),o(m,{type:"danger",onClick:L=>U(e.id)},{default:l(()=>[_e]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",ce,[i("div",me,[o($,{currentPage:a(s).page,"onUpdate:currentPage":t[7]||(t[7]=e=>a(s).page=e),"page-size":a(s).limit,"onUpdate:page-size":t[8]||(t[8]=e=>a(s).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(d).count},null,8,["currentPage","page-size","total"])])]),F.value?(c(),y(J,{key:0,modelValue:f.value,"onUpdate:modelValue":t[9]||(t[9]=e=>f.value=e),id:E.value,areas:a(d).store_areas,onOnClose:z},null,8,["modelValue","id","areas"])):h("",!0)],64)}}});const xe=H(ge,[["__scopeId","data-v-4f09d3e9"]]);export{xe as default};
