2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
|
import{y as e}from"./index.vnxWwO7O.js";/* empty css */import{_ as a}from"./index.BDoRN0N8.js";import{f as l,k as t,l as o,m as u,o as p,p as d,Z as r,_ as n,h as s,a as c,E as _}from"./element-plus.RkKozuVi.js";import{V as m,r as i,a0 as f,x as b,y as g,M as y,K as h,B as v,a2 as D,u as V,H as U,ad as k}from"./editor-vue.DJDELE42.js";import"./lodash.lGe4XDVY.js";/* empty css */const q={class:"operate"},w={__name:"fee-setting",setup(w){const x=[{label:"预设模板",value:"1"},{label:"定制模板",value:"2"}],F=[{label:"小时",value:"1"},{label:"天",value:"2"},{label:"周",value:"3"},{label:"月",value:"4"},{label:"年",value:"5"}],j=m({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_unique_code",label:"频率",align:"center"},{prop:"shop_unique_code",label:"周期",align:"center"},{prop:"shop_unique_code",label:"USDT价格",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:"select",value:""},{label:"群组数量",prop:"shop_unique_code",type:"input",value:""},{label:"模板类型",prop:"shop_unique_code",type:"input",value:""},{label:"USDT价格",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}),T=m({showDialog:!1,formData:{name:"",type:"",group_limit:"",frequency:"",frequency_type:"1",cycle:"",cycle_type:"1",price:"",remark:""}});i(null);const S=()=>{j.searchFields.forEach((e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""})),C()};f((()=>{}));const C=()=>{var a,l;j.loading=!0;let t={per_page:j.per_page,page:j.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}(j.searchFields);(null==(a=o.created_at)?void 0:a.length)>0&&(o.created_at_start=o.created_at[0]?e(o.created_at[0]):"",o.created_at_end=o.created_at[1]?e(o.created_at[1]):""),(null==(l=o.updated_at)?void 0:l.length)>0&&(o.updated_at_start=o.updated_at[0]?e(o.updated_at[0]):"",o.updated_at_end=o.updated_at[1]?e(o.updated_at[1]):""),getShopList(Object.assign(t,o)).then((e=>{j.tableData=e.data,j.total=e.total,j.loading=!1})).catch((()=>{j.loading=!1}))},B=async e=>{c.confirm("确认要删除吗","系统提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((()=>{delShop(e.id).then((e=>{_.success("操作成功"),C()}))}))};return(e,c)=>{const _=l,m=a,i=u,f=o,w=d,E=p,R=n,z=r,H=t,G=s;return g(),b("div",null,[y(m,{type:"export",columns:V(j).columns,searchFields:V(j).searchFields,"onUpdate:searchFields":c[1]||(c[1]=e=>V(j).searchFields=e),data:V(j).tableData,per_page:V(j).per_page,"onUpdate:per_page":c[2]||(c[2]=e=>V(j).per_page=e),page:V(j).page,"onUpdate:page":c[3]||(c[3]=e=>V(j).page=e),total:V(j).total,onGetTableData:C,onResetForm:S,loading:V(j).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:h((()=>[y(_,{type:"primary",onClick:c[0]||(c[0]=a=>(e.row,void(T.showDialog=!0)))},{default:h((()=>c[15]||(c[15]=[D(" 创建配置 ")]))),_:1,__:[15]})])),operate:h((({row:e})=>[v("div",q,[y(_,{size:"small",type:"danger",onClick:a=>B(e)},{default:h((()=>c[16]||(c[16]=[D(" 编辑 ")]))),_:2,__:[16]},1032,["onClick"]),y(_,{size:"small",type:"danger",onClick:a=>B(e)},{default:h((()=>c[17]||(c[17]=[D(" 删除 ")]))),_:2,__:[17]},1032,["onClick"])])])),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),y(G,{modelValue:V(T).showDialog,"onUpdate:modelValue":c[14]||(c[14]=e=>V(T).showDialog=e),title:"收费配置",width:"600"},{default:h((()=>[y(H,{m
|