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,{model:V(T).formData,"label-width":"100px"},{default:h((()=>[y(f,{label:"名称"},{default:h((()=>[y(i,{modelValue:V(T).formData.name,"onUpdate:modelValue":c[4]||(c[4]=e=>V(T).formData.name=e),autocomplete:"off",clearable:""},null,8,["modelValue"])])),_:1}),y(f,{label:"模版类型"},{default:h((()=>[y(E,{modelValue:V(T).formData.type,"onUpdate:modelValue":c[5]||(c[5]=e=>V(T).formData.type=e),placeholder:"请选择模板类型",clearable:""},{default:h((()=>[(g(),b(U,null,k(x,((e,a)=>y(w,{key:a,value:e.value,label:e.label},null,8,["value","label"]))),64))])),_:1},8,["modelValue"])])),_:1}),y(f,{label:"群组数量"},{default:h((()=>[y(i,{type:"number",modelValue:V(T).formData.group_limit,"onUpdate:modelValue":c[6]||(c[6]=e=>V(T).formData.group_limit=e),autocomplete:"off",clearable:""},null,8,["modelValue"])])),_:1}),y(f,{label:"群组选择"},{default:h((()=>[y(E,{modelValue:V(T).formData.type,"onUpdate:modelValue":c[7]||(c[7]=e=>V(T).formData.type=e),placeholder:"请选择模板类型",clearable:""},{default:h((()=>[(g(),b(U,null,k(x,((e,a)=>y(w,{key:a,value:e.value,label:e.label},null,8,["value","label"]))),64))])),_:1},8,["modelValue"])])),_:1}),y(f,{label:"频率"},{default:h((()=>[y(z,{gutter:20},{default:h((()=>[y(R,{span:8},{default:h((()=>[y(i,{type:"number",modelValue:V(T).formData.frequency,"onUpdate:modelValue":c[8]||(c[8]=e=>V(T).formData.frequency=e),clearable:""},null,8,["modelValue"])])),_:1}),y(R,{span:4},{default:h((()=>c[18]||(c[18]=[v("span",null,"次每",-1)]))),_:1,__:[18]}),y(R,{span:10},{default:h((()=>[y(E,{modelValue:V(T).formData.frequency_type,"onUpdate:modelValue":c[9]||(c[9]=e=>V(T).formData.frequency_type=e),placeholder:"请选择频率"},{default:h((()=>[(g(),b(U,null,k(F,((e,a)=>y(w,{key:a,value:e.value,label:e.label},null,8,["value","label"]))),64))])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1}),y(f,{label:"周期"},{default:h((()=>[y(z,{gutter:20},{default:h((()=>[y(R,{span:10},{default:h((()=>[y(i,{type:"number",modelValue:V(T).formData.cycle,"onUpdate:modelValue":c[10]||(c[10]=e=>V(T).formData.cycle=e),placeholder:"请输入周期",clearable:""},null,8,["modelValue"])])),_:1}),y(R,{span:10},{default:h((()=>[y(E,{modelValue:V(T).formData.cycle_type,"onUpdate:modelValue":c[11]||(c[11]=e=>V(T).formData.cycle_type=e),placeholder:"请选择周期"},{default:h((()=>[(g(),b(U,null,k(F,((e,a)=>y(w,{key:a,value:e.value,label:e.label},null,8,["value","label"]))),64))])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1}),y(f,{label:"USDT价格"},{default:h((()=>[y(i,{type:"number",modelValue:V(T).formData.price,"onUpdate:modelValue":c[12]||(c[12]=e=>V(T).formData.price=e),autocomplete:"off",clearable:""},null,8,["modelValue"])])),_:1}),y(f,{label:"备注"},{default:h((()=>[y(i,{type:"text",modelValue:V(T).formData.remark,"onUpdate:modelValue":c[13]||(c[13]=e=>V(T).formData.remark=e),autocomplete:"off",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["model"])])),_:1},8,["modelValue"])])}}};export{w as default};
|