2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
import{z as e,y as a}from"./index.RLT4iza1.js";import{_ as t}from"./index.BTCG2PED.js";import{f as l,a as o,E as r}from"./element-plus.RkKozuVi.js";import{V as p,r as n,a0 as s,ao as i,x as d,y as c,M as u,K as _,B as g,a2 as h,u as m,S as b,J as v}from"./editor-vue.DJDELE42.js";import"./lodash.lGe4XDVY.js";/* empty css *//* empty css */const f={class:"operate"},y={__name:"customer-task-list",setup(y){const w=p({columns:[{prop:"id",label:"ID",width:80,align:"center"},{prop:"service",label:"任务名称",align:"center",slot:"service_name_slot"},{prop:"shop_remark",label:"客户名称",align:"center"},{prop:"shop_remark",label:"模板名称",align:"center"},{prop:"shop_remark",label:"模板类型",align:"center"},{prop:"shop_remark",label:"群组",align:"center"},{prop:"shop_remark",label:"周期/频率",align:"center"},{prop:"shop_unique_code",label:"状态",align:"center"},{prop:"shop_unique_code",label:"执行时间",align:"center"},{prop:"shop_unique_code",label:"创建时间",align:"center"},{prop:"shop_unique_code",label:"创建人",align:"center"},{prop:"shop_unique_code",label:"备注",align:"center"},{prop:"operate",label:"操作",width:160,align:"center",slot:"operate",fixed:"right"}],tableData:[],searchFields:[{label:"任务名称",prop:"id",type:"input",value:""},{label:"模板名称",prop:"shop_unique_code",type:"input",value:""},{label:"群组",prop:"shop_unique_code",type:"input",value:""},{label:"频率/周期",prop:"shop_unique_code",type:"input",value:""},{prop:"created_at",label:"创建时间",type:"date",dateType:"datetimerange",value:[]}],total:0,page:1,per_page:10,loading:!1,countColumns:[{prop:"shop_unique_code",label:"执行时间",align:"center"},{prop:"shop_unique_code",label:"发送成功率",align:"center"},{prop:"shop_unique_code",label:"失败原因",align:"center"},{prop:"shop_unique_code",label:"发送次数",align:"center"}],taskData:{addForm:{title:"任务审核",fields:[{label:"任务名称",prop:"name",type:"input",value:""},{label:"模板类型",prop:"withdraw_fee",type:"input",value:""},{label:"频率/周期",prop:"balance",type:"select",value:""},{label:"模版内容",prop:"balance",type:"select",value:"",options:[{label:"立即执行",value:"1"},{label:"定时执行",value:"2"}]}],rules:{amount:[{required:!0,message:"请输入提现金额",trigger:"blur"}],account_id:[{required:!0,message:"请选择提款账号",trigger:"change"}],pay_password:[{required:!0,message:"请输入支付密码",trigger:"blur"}],google_code:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"}]},values:{name:"",withdraw_min:"",withdraw_max:"",withdraw_fee:"",balance:"",amount:"",account_id:"",pay_password:"",google_code:""}},btnLoading:!1,showFormDialog:!1,htmlTxt:""}});n(null);const D=()=>{w.searchFields.forEach((e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""})),k()};s((()=>{}));const k=()=>{var e,t;w.loading=!0;let l={per_page:w.per_page,page:w.page,channel_id:1},o=function(e){const a={};return e.forEach((e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)})),a}(w.searchFields);(null==(e=o.created_at)?void 0:e.length)>0&&(o.created_at_start=o.created_at[0]?a(o.created_at[0]):"",o.created_at_end=o.created_at[1]?a(o.created_at[1]):""),(null==(t=o.updated_at)?void 0:t.length)>0&&(o.updated_at_start=o.updated_at[0]?a(o.updated_at[0]):"",o.updated_at_end=o.updated_at[1]?a(o.updated_at[1]):""),getShopList(Object.assign(l,o)).then((e=>{w.tableData=e.data,w.total=e.total,w.loading=!1})).catch((()=>{w.loading=!1}))},x=async e=>{o.confirm("确认要删除吗","系统提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((()=>{delShop(e.id).then((e=>{r.success("操作成功"),k()}))}))};return(a,o)=>{const r=t,p=l,n=e,s=i("click-debounce");return c(),d("div",null,[u(r,{type:"export",columns:m(w).columns,searchFields:m(w).searchFields,"onUpdate:searchFields":o[0]||(o[0]=e=>m(w).searchFields=e),data:m(w).tableData,per_page:m(w).per_page,"onUpdate:per_page":o[1]||(o[1]=e=>m(w).per_page=e),page:m(w).page,"onUpdate:page":o[2]||(o[2]=e=>m(w).page=e),total:m(w).total,onGetTableData:k,onResetForm:D,loading:m(w).loading,showSelection:!1,showRightRefreshSlot:!1,showExpand:!0},{expandName:_((()=>[u(r,{type:"export",columns:m(w).countColumns,data:m(w).tableData,showSelection:!1,showRightRefreshSlot:!1},null,8,["columns","data"])])),operate:_((({row:e})=>[g("div",f,[u(p,{size:"small",type:"danger",onClick:a=>x(e)},{default:_((()=>o[5]||(o[5]=[h(" 任务审核 ")]))),_:2,__:[5]},1032,["onClick"]),u(p,{size:"small",type:"danger",onClick:a=>x(e)},{default:_((()=>o[6]||(o[6]=[h(" 暂停任务 ")]))),_:2,__:[6]},1032,["onClick"]),u(p,{size:"small",type:"danger",onClick:a=>x(e)},{default:_((()=>o[7]||(o[7]=[h(" 取消任务 ")]))),_:2,__:[7]},1032,["onClick"])])])),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),u(n,{showDialog:m(w).taskData.showFormDialog,"onUpdate:showDialog":o[3]||(o[3]=e=>m(w).taskData.showFormDialog=e),formData:m(w).taskData.addForm,"onUpdate:formData":o[4]||(o[4]=e=>m(w).taskData.addForm=e),ref:"addTaskFormRef",labelWidth:"130px",dialogWidth:"600px"},{submit:_((()=>[b((c(),v(p,{type:"primary",loading:m(w).taskData.btnLoading},{default:_((()=>o[8]||(o[8]=[h("确定")]))),_:1,__:[8]},8,["loading"])),[[s,a.addRresetTemplate]])])),_:1},8,["showDialog","formData"])])}}};export{y as default};
|