tg_web_dist/js/customer-template-list.I5R3ithx.js
2025-07-01 15:36:27 +08:00

2 lines
4.2 KiB
JavaScript

import{H as e,aS as a,aR as t}from"./index.D1_OMcDq.js";import{_ as l}from"./index.QgL7qSO-.js";import{V as o,r as p,a0 as r,am as s,x as i,y as d,M as n,K as c,B as g,a2 as u,u as _,S as m,J as h}from"./editor-vue.xUJDThhq.js";import"./lodash.lGe4XDVY.js";import"./editor.Ppghu3lf.js";/* empty css *//* empty css */import"./index.QrL91wAP.js";const b={class:"operate"},v={__name:"customer-template-list",setup(v){const w=o({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_unique_code",label:"创建时间",align:"center"},{prop:"operate",label:"操作",width:160,align:"center",slot:"operate",fixed:"right"}],tableData:[],searchFields:[{label:"Telegram ID",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}),f=o({Form:{title:"审核模版",fields:[{label:"模板名称",prop:"name",type:"input",value:""},{label:"模板内容",prop:"withdraw_fee",type:"select",value:""},{label:"备注",prop:"balance",type:"input",value:""}],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:"",google_code:"",txtArea:' <p>标题:[客户填写促销标题]</p><p>详情:[客户填写促销详情]</p><p id="custom_link">链接:<span>[客户填写链接]</span></p><p><br></p>'}},btnLoading:!1,showCheckTemplateDialog:!1});p(null);const y=()=>{w.searchFields.forEach((e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""})),D()};r((()=>{console.log("onMounted")}));const D=()=>{var e,a;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]?t(o.created_at[0]):"",o.created_at_end=o.created_at[1]?t(o.created_at[1]):""),(null==(a=o.updated_at)?void 0:a.length)>0&&(o.updated_at_start=o.updated_at[0]?t(o.updated_at[0]):"",o.updated_at_end=o.updated_at[1]?t(o.updated_at[1]):""),getShopList(Object.assign(l,o)).then((e=>{console.log(e),w.tableData=e.data,w.total=e.total,w.loading=!1})).catch((()=>{w.loading=!1}))},x=()=>{f.showCheckTemplateDialog=!0},F=()=>{f.showCheckTemplateDialog=!1};return(t,o)=>{const p=e,r=l,v=a,k=s("click-debounce");return d(),i("div",null,[n(r,{type:"export",columns:_(w).columns,searchFields:_(w).searchFields,"onUpdate:searchFields":o[0]||(o[0]=e=>_(w).searchFields=e),data:_(w).tableData,per_page:_(w).per_page,"onUpdate:per_page":o[1]||(o[1]=e=>_(w).per_page=e),page:_(w).page,"onUpdate:page":o[2]||(o[2]=e=>_(w).page=e),total:_(w).total,onGetTableData:D,onResetForm:y,loading:_(w).loading,showSelection:!1,showRightRefreshSlot:!1},{operate:c((({row:e})=>[g("div",b,[n(p,{size:"small",type:"danger",onClick:e=>x()},{default:c((()=>o[5]||(o[5]=[u(" 审核通过 ")]))),_:2,__:[5]},1032,["onClick"]),n(p,{size:"small",type:"danger",onClick:e=>x()},{default:c((()=>o[6]||(o[6]=[u(" 审核拒绝 ")]))),_:2,__:[6]},1032,["onClick"])])])),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),n(v,{showDialog:_(f).showCheckTemplateDialog,"onUpdate:showDialog":o[3]||(o[3]=e=>_(f).showCheckTemplateDialog=e),formData:_(f).Form,"onUpdate:formData":o[4]||(o[4]=e=>_(f).Form=e),ref:"addRessetsFormRef",labelWidth:"130px",dialogWidth:"800px"},{submit:c((()=>[m((d(),h(p,{type:"primary",loading:_(f).btnLoading},{default:c((()=>o[7]||(o[7]=[u("确定")]))),_:1,__:[7]},8,["loading"])),[[k,F]])])),_:1},8,["showDialog","formData"])])}}};export{v as default};