import{_ as R,g as G,a as H,d as J}from"./EditDialog.vue_vue_type_script_setup_true_lang.42f45a3b.js";import{A as K}from"./index.1d26a072.js";import{d as Q,a6 as W,r,b as C,p as A,c as u,at as X,e as d,f as w,g as i,h as l,i as a,u as t,k as p,A as z,F as L,j as Y,m as c,t as Z,w as ee,q as te,y as D,N as le,E as ae,_ as oe}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const se={class:"filter-form"},ne=c("\u67E5\u8BE2"),ue={class:"data"},ie={class:"operation-container"},de={class:"operation-btn"},re=c("\u6DFB\u52A0"),ce={class:"table"},_e=c("\u5F00\u542F"),pe=c("\u5173\u95ED"),me={class:"table-operation-btn"},fe={class:"top"},ge=c("\u7F16\u8F91"),ve=c("\u5220\u9664"),be={class:"bottom"},he={class:"pagination"},Ee=Q({setup(ye){const{OpPlatform:E}=W();let y=r(!1);const o=C({page:1,limit:10,customer_number:""}),F=C({store:[]}),B=()=>{E.value==="shangpu"&&G({agentid:o.agentid}).then(n=>{F.store=n})};E.value=="agent"&&B(),A(()=>o.agentid,()=>{B()});const g=C({list:[],count:0});r([]);const m=()=>{y.value=!0,H(o).then(n=>{g.list=n.list,g.count=n.count,y.value=!1})};m(),r(!1),r(!1),A(()=>[o.page,o.limit],()=>{m()});const N=()=>{m()};let _=r(!1),v=r(!1),b=r(0);const P=()=>{b.value=0,v.value=!0,D(()=>{_.value=!0})},U=n=>{b.value=n,v.value=!0,D(()=>{_.value=!0})},S=()=>{b.value=0,D(()=>{v.value=!1}),m()},T=n=>{le.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{J({id:n}).then(()=>{ae({message:"\u5220\u9664\u6210\u529F",type:"success"}),m()})}).catch(()=>{})};return(n,s)=>{const k=u("el-form-item"),$=u("el-option"),j=u("el-select"),h=u("el-button"),q=u("el-form"),f=u("el-table-column"),V=u("el-tag"),I=u("el-table"),M=u("el-pagination"),O=X("loading");return d(),w(L,null,[i("div",se,[l(q,{model:t(o),"label-width":"90px"},{default:a(()=>[t(E)==="shangpu"?(d(),p(k,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:a(()=>[l(t(K),{modelValue:t(o).agentid,"onUpdate:modelValue":s[0]||(s[0]=e=>t(o).agentid=e)},null,8,["modelValue"])]),_:1})):z("",!0),l(k,{class:"tn-el-form-item",label:"\u95E8\u5E97"},{default:a(()=>[l(j,{modelValue:t(o).sid,"onUpdate:modelValue":s[1]||(s[1]=e=>t(o).sid=e),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",filterable:"",clearable:""},{default:a(()=>[(d(!0),w(L,null,Y(t(F).store,(e,x)=>(d(),p($,{key:`statcenter-store-store-${x}`,value:e.id,label:e.title},{default:a(()=>[c(Z(e.title),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(k,null,{default:a(()=>[l(h,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:N},{default:a(()=>[ne]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",ue,[i("div",ie,[i("div",de,[l(h,{class:"btn",type:"primary",onClick:P},{default:a(()=>[re]),_:1})])]),i("div",ce,[ee((d(),p(I,{data:t(g).list},{default:a(()=>[l(f,{label:"\u4EE3\u7406",prop:"agent_title"}),l(f,{label:"\u5546\u6237",prop:"store_title"}),l(f,{label:"\u6253\u6B3E\u5468\u671F",prop:"day"}),l(f,{label:"\u5F00\u5173",prop:"is_open"},{default:a(e=>[e.row.is_open?(d(),p(V,{key:0,type:"success"},{default:a(()=>[_e]),_:1})):(d(),p(V,{key:1,type:"danger"},{default:a(()=>[pe]),_:1}))]),_:1}),l(f,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:a(({row:e})=>[i("div",me,[i("div",fe,[l(h,{size:"small",type:"primary",onClick:x=>U(e.id)},{default:a(()=>[ge]),_:2},1032,["onClick"]),l(h,{size:"small",type:"danger",onClick:x=>T(e.id)},{default:a(()=>[ve]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[O,t(y)]])])]),i("div",be,[i("div",he,[l(M,{currentPage:t(o).page,"onUpdate:currentPage":s[2]||(s[2]=e=>t(o).page=e),"page-size":t(o).limit,"onUpdate:page-size":s[3]||(s[3]=e=>t(o).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:t(g).count},null,8,["currentPage","page-size","total"])])]),t(v)?(d(),p(R,{key:0,modelValue:t(_),"onUpdate:modelValue":s[4]||(s[4]=e=>te(_)?_.value=e:_=e),id:t(b),onOnClose:S},null,8,["modelValue","id"])):z("",!0)],64)}}});const Ae=oe(Ee,[["__scopeId","data-v-6428f002"]]);export{Ae as default};
