diff --git a/「优化调整」附件上传.md b/「优化调整」附件上传.md index 48b22e8..404c52e 100644 --- a/「优化调整」附件上传.md +++ b/「优化调整」附件上传.md @@ -19,4 +19,38 @@ var obj_v=WfForm.getFieldValue(obj_id); return (obj_v != "" && obj_v.split(",").length>1) ? false : true; } +``` + +# 「CSS」样式美化 + +```css + /* ----------> 附件美化调整 <---------- */ + /* 上传附件位置调整 */ + .wea-upload-container{ margin-left: 2px!important; } + .wea-upload,.wea-upload-list,.wea-upload-list-item-file{ padding: 0px!important; } + .wea-upload-list-item-file{ min-height: 0px!important; } + .icon-coms-AddTo{ margin: 0px 5px 0px 0px!important; } +``` + +# 「扩展」初始化函数中调用 + +```javascript +// 「控件设置」附件 +let att_a=list_att.split(','); // 将上面设置的附件列表分割为数组 +for(let obj_id of att_a){ + AttBtnnSet(obj_id); +} +``` + +# 「扩展」拦截事件中调用 + +```javascript + // 「校验」附件数量 + let att_a=list_att.split(','); // 将上面设置的附件列表分割为数组 + for(let obj_id of att_a){ + if(!AttCountCheck(obj_id)){ + WfForm.showMessage(`请注意「证明材料-${list_att_name[obj_id]}」控件只接受单一附件,当前控件不符合规则,流程将无法保存与提交!`, 2, 2); + return; + } + } ``` \ No newline at end of file