1 |
- import{ar as V,d as L,A as M,r as y,g as T,y as W,S as $,o as d,k as _,w as l,C as x,a as e,i as t,j as B,l as r,c as h,R as D,q as F,ai as G,aj as J,H as K,aV as N,I as O,L as Q,__tla as X}from"./index-abaca7e8.js";import{_ as Y,__tla as Z}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9818245e.js";import{E as aa,__tla as ea}from"./el-card-ff5a526a.js";import{C as la,__tla as ta}from"./CardTitle-8c976bdf.js";import{u as sa,__tla as oa}from"./useMessage-7c79d01b.js";import"./_plugin-vue_export-helper-1b428a4d.js";let w,ra=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return oa}catch{}})()]).then(async()=>{let p,v,b;p={class:"flex items-center justify-between"},v={key:0},b={key:0},w=L({name:"CrmCustomerPoolConfig",__name:"index",setup(na){const C=sa(),{t:k}=M(),n=y(!1),a=y({enabled:!1,contactExpireDays:void 0,dealExpireDays:void 0,notifyEnabled:!1,notifyDays:void 0}),P=T({enabled:[{required:!0,message:"\u662F\u5426\u542F\u7528\u5BA2\u6237\u516C\u6D77\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),c=y(),g=async()=>{try{n.value=!0;const u=await(async()=>await V.get({url:"/crm/customer-pool-config/get"}))();if(u===null)return;a.value=u}finally{n.value=!1}},U=async()=>{if(c&&await c.value.validate()){n.value=!0;try{const u=a.value;await(async s=>await V.put({url:"/crm/customer-pool-config/save",data:s}))(u),C.success(k("common.updateSuccess")),await g(),n.value=!1}finally{n.value=!1}}},z=()=>{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 W(()=>{g()}),(u,s)=>{const R=F,i=G,E=J,m=K,f=N,q=aa,H=O,S=Y,A=$("hasPermi"),I=Q;return d(),_(S,null,{default:l(()=>[x((d(),_(H,{ref_key:"formRef",ref:c,model:e(a),rules:e(P),"label-width":"160px"},{default:l(()=>[t(q,{shadow:"never"},{header:l(()=>[B("div",p,[t(e(la),{title:"\u5BA2\u6237\u516C\u6D77\u89C4\u5219\u8BBE\u7F6E"}),x((d(),_(R,{type:"primary",onClick:U},{default:l(()=>[r(" \u4FDD\u5B58 ")]),_:1})),[[A,["crm:customer-pool-config:update"]]])])]),default:l(()=>[t(m,{label:"\u5BA2\u6237\u516C\u6D77\u89C4\u5219\u8BBE\u7F6E",prop:"enabled"},{default:l(()=>[t(E,{modelValue:e(a).enabled,"onUpdate:modelValue":s[0]||(s[0]=o=>e(a).enabled=o),onChange:z,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(),h("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(E,{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(),h("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})])):D("",!0)])):D("",!0)]),_:1})]),_:1},8,["model","rules"])),[[I,e(n)]])]),_:1})}}})});export{ra as __tla,w as default};
|