import{_ as j}from"./TrayDialog.vue_vue_type_script_setup_true_lang.6988608c.js";import{f as O,h as R,b as G,i as H}from"./index.76faad0e.js";import{d as J,r as h,b as v,p as k,c as u,e as b,f as K,g as i,h as t,i as n,u as s,k as y,A as C,q as P,F as Q,m as r,y as x,N as W,E as X,_ as Y}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./index.ad00c928.js";const Z={class:"filter-form"},ee={style:{display:"flex"}},te=r("\u67E5\u8BE2"),oe={class:"data"},ae={class:"operation-btn",style:{"margin-bottom":"10px"}},le=r("\u6DFB\u52A0\u6258\u76D8"),ne=r("\u5BFC\u51FA"),se={class:"table"},ue=r("\u7A7A\u95F2"),ie=r("\u4F7F\u7528\u4E2D"),de={class:"table-operation-btn"},re={class:"top"},ce=r("\u4FEE\u6539"),_e=r("\u5220\u9664"),pe={class:"bottom"},me={class:"pagination"},ge=J({setup(fe){let c=h(!1),g=h(!1),f=h(0);const l=v({agentid:"",sid:"",plate_no:"",page:1,limit:10}),_=v({count:0,list:[],areas:[]}),w=v({list:[]}),d=()=>{O(l).then(o=>{_.list=o.list,_.count=o.count,_.areas=o.areas})};d();const B=()=>{R(l).then(o=>{console.log("res",o),window.open(o.data)})};let E=h([]);const A=o=>{E.value=[],o.forEach(a=>E.value.push(a.id))};k(()=>[l.page,l.limit],()=>{d()}),k(()=>[l.agentid],()=>{l.agentid&&G(l.agentid).then(o=>{w.list=o})});const V=()=>{d()},z=()=>{f.value=0,x(()=>{g.value=!1}),d()},N=()=>{f.value=0,g.value=!0,x(()=>{c.value=!0})},q=o=>{f.value=o,g.value=!0,x(()=>{c.value=!0})},L=o=>{W.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6258\u76D8\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{H(o).then(a=>{X({message:"\u5220\u9664\u6258\u76D8\u6210\u529F",type:"success"}),d()})}).catch(()=>{})};return(o,a)=>{const S=u("el-input"),F=u("el-form-item"),p=u("el-button"),T=u("el-form"),m=u("el-table-column"),D=u("el-tag"),U=u("el-image"),$=u("el-table"),I=u("el-pagination");return b(),K(Q,null,[i("div",Z,[t(T,{model:s(l),"label-width":"90px"},{default:n(()=>[i("view",ee,[t(F,{class:"tn-el-form-item",label:"\u6258\u76D8\u53F7",style:{width:"500px",flex:"1"}},{default:n(()=>[t(S,{modelValue:s(l).plate_no,"onUpdate:modelValue":a[0]||(a[0]=e=>s(l).plate_no=e),placeholder:"\u8BF7\u8F93\u5165\u6258\u76D8\u53F7"},null,8,["modelValue"])]),_:1})]),t(F,null,{default:n(()=>[t(p,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:V},{default:n(()=>[te]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",oe,[i("div",ae,[t(p,{class:"btn",type:"primary",onClick:N},{default:n(()=>[le]),_:1}),t(p,{class:"btn",type:"success",onClick:B},{default:n(()=>[ne]),_:1})]),i("div",se,[t($,{data:s(_).list,onSelectionChange:A},{default:n(()=>[t(m,{label:"\u9910\u5385\u540D\u79F0",prop:"store_title"}),t(m,{label:"\u6258\u76D8\u53F7",prop:"plate_no"}),t(m,{label:"\u72B6\u6001",width:"160px"},{default:n(e=>[e.row.status==0?(b(),y(D,{key:0,type:"warning"},{default:n(()=>[ue]),_:1})):C("",!0),e.row.status==1?(b(),y(D,{key:1,type:"success"},{default:n(()=>[ie]),_:1})):C("",!0)]),_:1}),t(m,{label:"\u4E8C\u7EF4\u7801",prop:"qrcode_link",align:"center"},{default:n(e=>[t(U,{src:e.row.qrcode_link,style:{width:"80px"}},null,8,["src"])]),_:1}),t(m,{label:"\u64CD\u4F5C",align:"center"},{default:n(e=>[i("div",de,[i("div",re,[t(p,{type:"primary",onClick:M=>q(e.row.id)},{default:n(()=>[ce]),_:2},1032,["onClick"]),t(p,{type:"danger",onClick:M=>L(e.row.id)},{default:n(()=>[_e]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",pe,[i("div",me,[t(I,{"current-page":s(l).page,"onUpdate:current-page":a[1]||(a[1]=e=>s(l).page=e),"page-size":s(l).limit,"onUpdate:page-size":a[2]||(a[2]=e=>s(l).limit=e),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:s(_).count,onSizeChange:a[3]||(a[3]=e=>d()),onCurrentChange:a[4]||(a[4]=e=>d())},null,8,["current-page","page-size","total"])])]),s(g)?(b(),y(j,{key:0,modelValue:s(c),"onUpdate:modelValue":a[5]||(a[5]=e=>P(c)?c.value=e:c=e),id:s(f),areas:s(_).areas,onOnClose:z},null,8,["modelValue","id","areas"])):C("",!0)],64)}}});const xe=Y(ge,[["__scopeId","data-v-be6f037d"]]);export{xe as default};
