You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在流程的脚本里编写以下代码即可:
//// 发送事件
$(".instance-form").on('instance-before-submit', function (e) {
//判断是否有上传附件
hasAttach(e);
});
// hasAttach:判断是否有上传附件
function hasAttach(e) {
var attach_count = cfs.instances.find({ 'metadata.instance': Session.get('instanceId'), 'metadata.current': true }).count();
console.log('InstanceManager.getMyApprove().values ----',InstanceManager.getMyApprove().values )
if (attach_count < 1) {
toastr.error("请上传附件");
e.preventDefault();
}
}
Beta Was this translation helpful? Give feedback.
All reactions