/* empty css             *//* empty css                   */import{_ as e}from"./index-9f9af49f.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-66f33117.js";/* empty css                        *//* empty css                    *//* empty css               */import"./el-tooltip-4ed993c7.js";/* empty css                  *//* empty css                     *//* empty css                *//* empty css                  */import{_ as l}from"./search.vue_vue_type_script_setup_true_lang-72910575.js";/* empty css                     *//* empty css                 */import{d as t,R as o,ax as i,p as s,m as r,x as n,ao as u,o as d,c as p,a as m,w as c,f as _,e as v,X as b,l as f,b as h,t as y,aE as j,F as k,a5 as w,aD as V,a3 as x,a4 as g,U as C,a8 as E,J as L,ak as D,a9 as I,a0 as J}from"./index-0ffeeea6.js";import U from"./create-d83f44c7.js";import z from"./paybackConfig-3c3e4078.js";import{u as q}from"./useGetList-07470d8e.js";/* empty css                 *//* empty css                   */import"./http-ffb58baa.js";/* empty css                   */const A={class:"table-default"},T={class:"pt-5 pl-2"},B={class:"flex items-center"},F=v("span",null,"最新更改时间",-1),$=v("br",null,null,-1),G=t({__name:"index",setup(t){const G=o(),H=i(),{data:N,query:O,search:R,reset:S,loading:X}=q("callback/jlEvent/list",!0),K=s((()=>{var e;return null==(e=N.value)?void 0:e.data})),M=r(!1),P=r(null),Q=r([]),W=r(!1),Y=e=>{switch(e){case"paybackVisible":W.value=!1;break;case"addAccountVisible":M.value=!1}R()},Z=()=>{if(Q.value.length<=0)return w.warning("至少选择一条数据");{const e="确定批量设置回传配置吗？";V.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{W.value=!0,P.value={name:"",is_roi:2,charge_type:1,charge_money_map:[{min_money:0,max_money:null,callback_type:1,callback_param:""}]},P.value.ids=Q.value.map((e=>e.id))})).catch((()=>{}))}},ee=e=>{Q.value=e};return n((()=>{O.value.id=H.query.id,R()})),(t,o)=>{const i=x,s=g,r=l,n=C,w=E,V=L,q=D,H=I,N=a,Q=e,ae=u("action"),le=J;return d(),p(k,null,[m(r,{search:_(R),reset:_(S)},{body:c((()=>[m(s,{label:"回传配置ID"},{default:c((()=>[m(i,{placeholder:"请输入回传配置ID",class:"input",icon:"search",modelValue:_(O).id,"onUpdate:modelValue":o[0]||(o[0]=e=>_(O).id=e),clearable:""},null,8,["modelValue"])])),_:1}),m(s,{label:"配置名称"},{default:c((()=>[m(i,{placeholder:"请输入配置名称",class:"input",icon:"search",modelValue:_(O).name,"onUpdate:modelValue":o[1]||(o[1]=e=>_(O).name=e),clearable:""},null,8,["modelValue"])])),_:1}),m(s,{label:"关联推广ID"},{default:c((()=>[m(i,{placeholder:"关联推广ID",class:"input",icon:"search",modelValue:_(O).promotion_id,"onUpdate:modelValue":o[2]||(o[2]=e=>_(O).promotion_id=e),clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),v("div",A,[v("div",T,[b((d(),f(n,{type:"primary",size:"default",onClick:o[3]||(o[3]=e=>(P.value=null,void(M.value=!0)))},{default:c((()=>[h("新增回传配置")])),_:1})),[[ae,"callback.JLEvent\\JLEvent.add"]]),b((d(),f(n,{size:"default",onClick:Z},{default:c((()=>[h("批量设置")])),_:1})),[[ae,"callback.JLEvent\\JLEvent.update"]])]),b((d(),f(H,{data:_(K),class:"mt-3",onSelectionChange:ee},{default:c((()=>[m(w,{type:"selection",width:"80"}),m(w,{label:"回传配置ID","min-width":"100",prop:"id"}),m(w,{label:"配置名称","min-width":"180","show-overflow-tooltip":"",prop:"name"}),m(w,{label:"充值行为","min-width":"160",prop:"charge_type_str"}),m(w,{label:"关联推广ID","min-width":"100","show-overflow-tooltip":"",prop:"promotion_id"},{default:c((e=>[m(n,{link:"",type:"primary",size:"default",onClick:a=>{return l=e.row,void G.push({path:"/promotion/promotionList",query:{tab:1,id:l.promotion_id}});var l}},{default:c((()=>[h(y(e.row.promotion_id),1)])),_:2},1032,["onClick"])])),_:1}),m(w,{label:"最新更改时间",width:"260"},{header:c((()=>[v("div",B,[F,m(q,{placement:"top"},{content:c((()=>[h(" 更改时间之后的订单全部重新计算"),$])),default:c((()=>[m(V,null,{default:c((()=>[m(_(j))])),_:1})])),_:1})])])),default:c((e=>[v("span",null,y(e.row.updated_at),1)])),_:1}),m(w,{label:"操作","min-width":"200",fixed:"right"},{default:c((e=>[b((d(),f(n,{link:"",type:"primary",size:"small",onClick:a=>{return e.$index,l=e.row,P.value=l,P.value.ids=[l.id],void(M.value=!0);var l}},{default:c((()=>[h("编辑")])),_:2},1032,["onClick"])),[[ae,"callback.JLEvent\\JLEvent.update"]])])),_:1})])),_:1},8,["data"])),[[le,_(X)]]),m(N)]),m(Q,{modelValue:W.value,"onUpdate:modelValue":o[5]||(o[5]=e=>W.value=e),title:"批量回传配置",width:"1000px","destroy-on-close":""},{default:c((()=>[m(z,{onClose:o[4]||(o[4]=e=>Y("paybackVisible")),primary:P.value},null,8,["primary"])])),_:1},8,["modelValue"]),m(Q,{modelValue:M.value,"onUpdate:modelValue":o[7]||(o[7]=e=>M.value=e),title:"新增回传配置",width:"1000px","destroy-on-close":""},{default:c((()=>[m(U,{onClose:o[6]||(o[6]=e=>Y("addAccountVisible")),primary:P.value},null,8,["primary"])])),_:1},8,["modelValue"])],64)}}});export{G as _};
