2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
var l=(e,s,t)=>new Promise((r,i)=>{var o=n=>{try{c(t.next(n))}catch(f){i(f)}},a=n=>{try{c(t.throw(n))}catch(f){i(f)}},c=n=>n.done?r(n.value):Promise.resolve(n.value).then(o,a);c((t=t.apply(e,s)).next())});import{aq as p,ar as g,a9 as b,$ as y,au as C}from"./bootstrap-BdGqHkJ8.js";import{_}from"./page.vue_vue_type_script_setup_true_lang-CdwUlckY.js";import{m as w,v as h,ab as v,b2 as V,bJ as d,j as m,u}from"../jse/index-index-DZkv9inb.js";function E(){return p.get("/crm/contract-config/get")}function x(e){return p.put("/crm/contract-config/save",e)}const N=[{component:"RadioGroup",fieldName:"notifyEnabled",label:"提前提醒设置",componentProps:{options:[{label:"提醒",value:!0},{label:"不提醒",value:!1}]},defaultValue:!0},{component:"InputNumber",fieldName:"notifyDays",componentProps:{min:0,precision:0},renderComponentContent:()=>({addonBefore:()=>"提前",addonAfter:()=>"天提醒"}),dependencies:{triggerFields:["notifyEnabled"],show:e=>e.notifyEnabled,trigger(e){e.notifyEnabled||(e.notifyDays=void 0)}}}],k=w({__name:"index",setup(e){const[s,t]=g({commonConfig:{labelClass:"w-100"},layout:"horizontal",schema:N,handleSubmit:r});function r(){return l(this,null,function*(){const{valid:o}=yield t.validate();if(!o)return;const a=yield t.getValues();a.notifyEnabled||(a.notifyDays=void 0),yield x(a),yield t.setValues(a),b.success(y("ui.actionMessage.operationSuccess"))})}function i(){return l(this,null,function*(){const o=yield E();yield t.setValues(o)})}return h(()=>{i()}),(o,a)=>(V(),v(u(_),{"auto-content-height":""},{default:d(()=>[m(u(C),{title:"合同配置设置"},{default:d(()=>[m(u(s),{class:"w-1/4"})]),_:1})]),_:1}))}});export{k as default};
|