import{_ as I}from"./EditTemplate.vue_vue_type_script_setup_true_lang.796c0706.js";import{A as $}from"./index.1d26a072.js";import{d as j,a6 as q,b as k,r as C,p as O,c,e as d,f as h,g as m,h as e,i as s,u as a,k as x,A as _,a2 as L,t as M,q as R,m as F,E as A,_ as G}from"./index.0308b213.js";import{f as H,h as J,i as K,j as Q,p as W,k as X}from"./index.bf3882f3.js";import"./useInstance.233fbdde.js";import"./index.de7bcb5e.js";import"./install.524ae6f2.js";import"./index.e2f68f5b.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const Y={class:"filter-form"},Z=F("\u7B5B\u9009"),ee={class:"data"},te={class:"operation-container"},le={class:"operation-btn"},ae=F("\u6DFB\u52A0\u6A21\u677F"),ne={class:"table"},oe={key:0},se={key:1},ue={key:0},ie={key:1},de=F("\u63A8\u9001"),pe=F("\u7F16\u8F91"),re=F("\u5220\u9664"),ce={class:"pagination"},me=j({setup(_e){const{OpPlatform:g}=q(),p=k({list:[],count:0}),o=k({page:1,limit:10,agentid:"",keyword:""});let E=C([]);const i=()=>{g.value==="agent"?H(o).then(n=>{p.lists=n.lists,p.count=n.count}):J(o).then(n=>{p.lists=n.lists,p.count=n.count})};i();const D=n=>{g.value==="agent"?K({id:n}).then(l=>{A({message:l.msg,type:"success"}),i()}):Q({id:n}).then(l=>{A({message:l.msg,type:"success"}),i()})},w=n=>{E.value=n.map(l=>String(l.id))},B=()=>{i()},V=n=>{g.value==="agent"?W({id:n}).then(l=>{A({message:l.msg,type:"success"}),i()}):X({id:n}).then(l=>{A({message:l.msg,type:"success"}),i()})};let r=C(!1),y=C(0);const T=()=>{y.value=0,r.value=!0},z=n=>{y.value=n,r.value=!0},P=()=>{y.value=0,i()};return O(()=>[o.page,o.limit,o.agentid],()=>{i()},{deep:!0}),(n,l)=>{const v=c("el-form-item"),S=c("el-input"),f=c("el-button"),u=c("el-table-column"),U=c("el-table"),N=c("el-pagination");return d(),h("div",null,[m("div",Y,[e(a(L),{model:a(o),"label-width":"90px"},{default:s(()=>[a(g)==="shangpu"?(d(),x(v,{key:0,label:"\u4EE3\u7406\u533A\u57DF"},{default:s(()=>[e(a($),{modelValue:a(o).agentid,"onUpdate:modelValue":l[0]||(l[0]=t=>a(o).agentid=t)},null,8,["modelValue"])]),_:1})):_("",!0),e(v,{class:"tn-el-form-item",label:"\u6A21\u677F\u540D\u79F0"},{default:s(()=>[e(S,{placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0",class:"ls-input",modelValue:a(o).keyword,"onUpdate:modelValue":l[1]||(l[1]=t=>a(o).keyword=t)},null,8,["modelValue"])]),_:1}),e(v,null,{default:s(()=>[e(f,{type:"primary",onClick:B},{default:s(()=>[Z]),_:1})]),_:1})]),_:1},8,["model"])]),m("div",ee,[m("div",te,[m("div",le,[e(f,{class:"btn",type:"primary",onClick:T},{default:s(()=>[ae]),_:1})])]),m("div",ne,[e(U,{data:a(p).lists,onSelectionChange:w},{default:s(()=>[e(u,{type:"selection",width:"55"}),e(u,{fixed:"",label:"\u6A21\u677F\u6807\u9898",prop:"title",align:"center"}),e(u,{fixed:"",label:"\u6A21\u677FID",prop:"template_id",align:"center"}),e(u,{fixed:"",label:"\u6A21\u677F\u7C7B\u578B",align:"center"},{default:s(t=>[t.row.type=="coupon_expires"?(d(),h("span",oe,"\u4F18\u60E0\u5238\u8FC7\u671F\u63D0\u9192")):_("",!0),t.row.type=="coupon_received"?(d(),h("span",se,"\u4F18\u60E0\u5238\u53D1\u653E\u901A\u77E5")):_("",!0)]),_:1}),e(u,{fixed:"",label:"\u8DF3\u8F6C\u94FE\u63A5",prop:"redirect_url",align:"center"}),a(g)==="shangpu"?(d(),x(u,{key:0,fixed:"",label:"\u53D1\u653E\u7C7B\u578B",align:"center"},{default:s(t=>[t.row.send_type==2?(d(),h("span",ue,"\u5168\u90E8")):_("",!0),t.row.send_type==1?(d(),h("span",ie,"\u4EE3\u7406\u533A\u57DF: "+M(t.row.agenti_title),1)):_("",!0)]),_:1})):_("",!0),e(u,{fixed:"",label:"\u8BA2\u9605\u4EBA\u6570",prop:"appointment_people",align:"center"}),e(u,{fixed:"",label:"\u6700\u540E\u4E00\u6B21\u53D1\u9001\u65F6\u95F4",prop:"sendtime_cn",align:"center"}),e(u,{fixed:"",label:"\u6DFB\u52A0\u65F6\u95F4",prop:"addtime_cn",align:"center"}),e(u,{label:"\u64CD\u4F5C",width:"340px"},{default:s(t=>[e(f,{type:"success",size:"small",onClick:b=>V(t.row.id)},{default:s(()=>[de]),_:2},1032,["onClick"]),e(f,{type:"primary",size:"small",onClick:b=>z(t.row.id)},{default:s(()=>[pe]),_:2},1032,["onClick"]),e(f,{type:"danger",size:"small",onClick:b=>D(t.row.id)},{default:s(()=>[re]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),m("div",ce,[e(N,{currentPage:a(o).page,"onUpdate:currentPage":l[2]||(l[2]=t=>a(o).page=t),"page-size":a(o).limit,"onUpdate:page-size":l[3]||(l[3]=t=>a(o).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(p).count},null,8,["currentPage","page-size","total"])]),e(I,{modelValue:a(r),"onUpdate:modelValue":l[4]||(l[4]=t=>R(r)?r.value=t:r=t),id:a(y),onOnClose:P},null,8,["modelValue","id"])])}}});const xe=G(me,[["__scopeId","data-v-cd3c3a9e"]]);export{xe as default};
