import{ar as E,d as I,i as M,r as _,f as N,m as T,S as W,o as d,x as y,w as l,y as D,a as e,g as t,h as X,q as r,c as V,R as h,D as A,aj as F,ak as H,B as K,aX as L,G as O,J as Q,_ as Y,__tla as Z}from"./index-7d5b26d3.js";import{_ as $,__tla as aa}from"./ContentWrap-07931e94.js";import{E as ea,__tla as la}from"./el-card-698191e2.js";import{C as ta,__tla as sa}from"./CardTitle-2fda2394.js";import{u as oa,__tla as ra}from"./useMessage-c81eaa5b.js";import{__tla as na}from"./ContentWrap.vue_vue_type_script_setup_true_lang-831d711e.js";let w,ua=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return na}catch{}})()]).then(async()=>{let p,v,b;p={class:"flex items-center justify-between"},v={key:0},b={key:0},w=Y(I({name:"CrmCustomerPoolConfig",__name:"index",setup(da){const C=oa(),{t:z}=M(),n=_(!1),a=_({enabled:!1,contactExpireDays:void 0,dealExpireDays:void 0,notifyEnabled:!1,notifyDays:void 0}),k=N({enabled:[{required:!0,message:"\u662F\u5426\u542F\u7528\u5BA2\u6237\u516C\u6D77\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),c=_(),x=async()=>{try{n.value=!0;const u=await(async()=>await E.get({url:"/crm/customer-pool-config/get"}))();if(u===null)return;a.value=u}finally{n.value=!1}},P=async()=>{if(c&&await c.value.validate()){n.value=!0;try{const u=a.value;await(async s=>await E.put({url:"/crm/customer-pool-config/save",data:s}))(u),C.success(z("common.updateSuccess")),await x(),n.value=!1}finally{n.value=!1}}},U=()=>{a.value.enabled||(a.value.contactExpireDays=void 0,a.value.dealExpireDays=void 0,a.value.notifyEnabled=!1,a.value.notifyDays=void 0)},j=()=>{a.value.notifyEnabled||(a.value.notifyDays=void 0)};return T(()=>{x()}),(u,s)=>{const q=A,i=F,g=H,m=K,f=L,B=ea,R=O,S=$,G=W("hasPermi"),J=Q;return d(),y(S,null,{default:l(()=>[D((d(),y(R,{ref_key:"formRef",ref:c,model:e(a),rules:e(k),"label-width":"160px"},{default:l(()=>[t(B,{shadow:"never"},{header:l(()=>[X("div",p,[t(e(ta),{title:"\u5BA2\u6237\u516C\u6D77\u89C4\u5219\u8BBE\u7F6E"}),D((d(),y(q,{type:"primary",onClick:P},{default:l(()=>[r(" \u4FDD\u5B58 ")]),_:1})),[[G,["crm:customer-pool-config:update"]]])])]),default:l(()=>[t(m,{label:"\u5BA2\u6237\u516C\u6D77\u89C4\u5219\u8BBE\u7F6E",prop:"enabled"},{default:l(()=>[t(g,{modelValue:e(a).enabled,"onUpdate:modelValue":s[0]||(s[0]=o=>e(a).enabled=o),onChange:U,class:"ml-4"},{default:l(()=>[t(i,{label:!1,size:"large"},{default:l(()=>[r("\u4E0D\u542F\u7528")]),_:1}),t(i,{label:!0,size:"large"},{default:l(()=>[r("\u542F\u7528")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(a).enabled?(d(),V("div",v,[t(m,null,{default:l(()=>[t(f,{class:"mr-2",modelValue:e(a).contactExpireDays,"onUpdate:modelValue":s[1]||(s[1]=o=>e(a).contactExpireDays=o)},null,8,["modelValue"]),r(" \u5929\u4E0D\u8DDF\u8FDB\u6216 "),t(f,{class:"mx-2",modelValue:e(a).dealExpireDays,"onUpdate:modelValue":s[2]||(s[2]=o=>e(a).dealExpireDays=o)},null,8,["modelValue"]),r(" \u5929\u672A\u6210\u4EA4 ")]),_:1}),t(m,{label:"\u63D0\u524D\u63D0\u9192\u8BBE\u7F6E",prop:"notifyEnabled"},{default:l(()=>[t(g,{modelValue:e(a).notifyEnabled,"onUpdate:modelValue":s[3]||(s[3]=o=>e(a).notifyEnabled=o),onChange:j,class:"ml-4"},{default:l(()=>[t(i,{label:!1,size:"large"},{default:l(()=>[r("\u4E0D\u63D0\u9192")]),_:1}),t(i,{label:!0,size:"large"},{default:l(()=>[r("\u63D0\u9192")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(a).notifyEnabled?(d(),V("div",b,[t(m,null,{default:l(()=>[r(" \u63D0\u524D "),t(f,{class:"mx-2",modelValue:e(a).notifyDays,"onUpdate:modelValue":s[4]||(s[4]=o=>e(a).notifyDays=o)},null,8,["modelValue"]),r(" \u5929\u63D0\u9192 ")]),_:1})])):h("",!0)])):h("",!0)]),_:1})]),_:1},8,["model","rules"])),[[J,e(n)]])]),_:1})}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/crm/customer/poolConfig/index.vue"]])});export{ua as __tla,w as default};
