import{_ as z,g as I,d as U}from"./EditRecordDialog.vue_vue_type_script_setup_true_lang.f8d4f2d9.js";import{A as L}from"./index.1d26a072.js";import{u as R}from"./useAgent.c0cb1751.js";import{d as $,b as E,r as b,c as r,e as h,f as q,g as i,h as e,i as a,u as l,m as p,t as M,k as S,q as j,A as H,F as G,y as B,N as J,E as K,_ as O}from"./index.0308b213.js";import"./install.524ae6f2.js";import"./list.5526c7ef.js";const P={class:"filter-form"},Q=p("\u67E5\u8BE2"),W={class:"data"},X={class:"operation-btn",style:{"margin-bottom":"10px"}},Y=p("\u6DFB\u52A0\u8BBE\u7F6E"),Z={class:"table"},ee={class:"table-operation-btn"},te={class:"top"},le=p("\u4FEE\u6539"),oe=p("\u5220\u9664"),ae={class:"bottom"},ne={class:"pagination"},se=$({setup(ie){let n=E({page:1,limit:10,agentid:0}),_=E({limit:"",page:"",pages:1,total:0,list:[]});const c=()=>{I(n).then(u=>{_.list=u.list,_.total=u.count})};c();const{getAgentList:F,getAgentTitle:y}=R();F();let d=b(!1),m=b(!1),g=b(0);const C=u=>{g.value=u,m.value=!0,B(()=>{d.value=!0})},A=()=>{m.value=!1,g.value=0},x=()=>{g.value=0,m.value=!0,B(()=>{d.value=!0})},D=u=>{J.confirm("\u786E\u5B9A\u5220\u9664\u5417\uFF1F","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{U(u).then(o=>{K.success("\u5220\u9664\u6210\u529F"),c()})})},k=()=>{n.page=1,c()};return(u,o)=>{const v=r("el-form-item"),f=r("el-button"),V=r("el-form"),s=r("el-table-column"),w=r("el-table"),N=r("el-pagination");return h(),q(G,null,[i("div",P,[e(V,{model:l(n),"label-width":"90px"},{default:a(()=>[e(v,{class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:a(()=>[e(l(L),{modelValue:l(n).agentid,"onUpdate:modelValue":o[0]||(o[0]=t=>l(n).agentid=t)},null,8,["modelValue"])]),_:1}),e(v,null,{default:a(()=>[e(f,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:k},{default:a(()=>[Q]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",W,[i("div",X,[e(f,{class:"btn",type:"primary",onClick:x},{default:a(()=>[Y]),_:1})]),i("div",Z,[e(w,{data:l(_).list},{default:a(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"id",prop:"id"}),e(s,{label:"\u6240\u5C5E\u57CE\u5E02",width:"100px"},{default:a(({row:t})=>[p(M(l(y)(t.agentid)),1)]),_:1}),e(s,{label:"\u56E2\u957Fid",prop:"deliveryer_id"}),e(s,{label:"\u5F00\u59CB\u65E5\u671F",prop:"start_date"}),e(s,{label:"\u8BA1\u7B97\u5468\u671F",prop:"day"}),e(s,{label:"\u6BCF\u5355x\u5143",prop:"price"}),e(s,{label:"\u9664\u53BB\u9A91\u624B\u59D3\u540D",prop:"not_match_title"}),e(s,{label:"\u64CD\u4F5C"},{default:a(t=>[i("div",ee,[i("div",te,[e(f,{type:"primary",onClick:T=>C(t.row.id)},{default:a(()=>[le]),_:2},1032,["onClick"]),e(f,{type:"danger",onClick:T=>D(t.row.id)},{default:a(()=>[oe]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",ae,[i("div",ne,[e(N,{"current-page":l(n).page,"onUpdate:current-page":o[1]||(o[1]=t=>l(n).page=t),"page-size":l(n).limit,"onUpdate:page-size":o[2]||(o[2]=t=>l(n).limit=t),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(_).total},null,8,["current-page","page-size","total"])])]),l(m)?(h(),S(z,{key:0,modelValue:l(d),"onUpdate:modelValue":o[3]||(o[3]=t=>j(d)?d.value=t:d=t),EditId:l(g),onHideEdit:A,onRefresh:o[4]||(o[4]=t=>c())},null,8,["modelValue","EditId"])):H("",!0)],64)}}});const me=O(se,[["__scopeId","data-v-829c1976"]]);export{me as default};
