Files
aiot-platform-ui/apps/web-antd/dist/js/index-Bd0BALhK.js

2 lines
2.3 KiB
JavaScript

var c=(e,i,o)=>new Promise((r,s)=>{var t=a=>{try{l(o.next(a))}catch(d){s(d)}},n=a=>{try{l(o.throw(a))}catch(d){s(d)}},l=a=>a.done?r(a.value):Promise.resolve(a.value).then(t,n);l((o=o.apply(e,i)).next())});import{aq as f,ar as b,a9 as g,$ as C,au as y}from"./bootstrap-DsjPfOC_.js";import{_ as w}from"./page.vue_vue_type_script_setup_true_lang-BL-xU9lB.js";import{m as _,v as h,ab as v,b2 as E,bJ as m,j as u,u as p}from"../jse/index-index-CO0ZsLf2.js";function N(){return f.get("/crm/customer-pool-config/get")}function x(e){return f.put("/crm/customer-pool-config/save",e)}const P=[{component:"RadioGroup",fieldName:"enabled",label:"客户公海规则设置",componentProps:{options:[{label:"开启",value:!0},{label:"关闭",value:!1}]}},{component:"InputNumber",fieldName:"contactExpireDays",componentProps:{min:0,precision:0},renderComponentContent:()=>({addonAfter:()=>"天不跟进或"}),dependencies:{triggerFields:["enabled"],show:e=>e.enabled}},{component:"InputNumber",fieldName:"dealExpireDays",renderComponentContent:()=>({addonBefore:()=>"或",addonAfter:()=>"天未成交"}),componentProps:{min:0,precision:0},dependencies:{triggerFields:["enabled"],show:e=>e.enabled}},{component:"RadioGroup",fieldName:"notifyEnabled",label:"提前提醒设置",componentProps:{options:[{label:"开启",value:!0},{label:"关闭",value:!1}]},dependencies:{triggerFields:["enabled"],show:e=>e.enabled},defaultValue:!1},{component:"InputNumber",fieldName:"notifyDays",componentProps:{min:0,precision:0},renderComponentContent:()=>({addonBefore:()=>"提前",addonAfter:()=>"天提醒"}),dependencies:{triggerFields:["notifyEnabled"],show:e=>e.enabled&&e.notifyEnabled}}],B=_({__name:"index",setup(e){const[i,o]=b({commonConfig:{labelClass:"w-100"},layout:"horizontal",schema:P,handleSubmit:r});function r(){return c(this,null,function*(){const{valid:t}=yield o.validate();if(!t)return;const n=yield o.getValues();n.enabled||(n.contactExpireDays=void 0,n.dealExpireDays=void 0,n.notifyEnabled=!1),n.notifyEnabled||(n.notifyDays=void 0),yield x(n),yield o.setValues(n),g.success(C("ui.actionMessage.operationSuccess"))})}function s(){return c(this,null,function*(){const t=yield N();yield o.setValues(t)})}return h(()=>{s()}),(t,n)=>(E(),v(p(w),{"auto-content-height":""},{default:m(()=>[u(p(y),{title:"客户公海规则设置"},{default:m(()=>[u(p(i),{class:"w-1/4"})]),_:1})]),_:1}))}});export{B as default};