周建军 发表于 2024-6-4 16:41:17

流程的默认提交界面的意见不能为空,该怎么写?

流程的默认提交界面的意见不能为空,该怎么写?

周建军 发表于 2024-6-4 16:55:52

已解决if( this.form.opinion === "" ){ //判断意见
      return "请填写意见";
}else{
      return true;
}

周建军 发表于 2024-6-4 17:01:48

周建军 发表于 2024-6-4 16:55
已解决if( this.form.opinion === "" ){ //判断意见
      return "请填写意见";
}else{


if( this.form.opinion === "" ){ //判断意见
      return "请填写意见";
}else{
      return true;
}


但是这样写的话,在拟稿人提交的界面弹不出来提示,其他审批人可以弹出来提示,是怎么回事?
Uncaught TypeError: Cannot read property 'setStyle' of undefined
    at Object.notValidationOpinionMode (<anonymous>:1:130478)
    at Object.i.extend.$owner (mootools-1.6.0_all.js:1399)
    at Object.validationOpinion (<anonymous>:1:129781)
    at Object.i.extend.$owner (mootools-1.6.0_all.js:1399)
    at Object.validation (<anonymous>:1:129186)
    at Object.i.extend.$owner (mootools-1.6.0_all.js:1399)
    at Object.submitWork (<anonymous>:1:131562)
    at Object.i.extend.$owner (mootools-1.6.0_all.js:1399)
    at Object.onSubmit (<anonymous>:1:141387)
    at Object.<anonymous> (<anonymous>:1:183472)
notValidationOpinionMode @ VM2963:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
validationOpinion @ VM2963:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
validation @ VM2963:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
submitWork @ VM2963:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
onSubmit @ VM2963:1
(匿名) @ VM2913:1
(匿名) @ mootools-1.6.0_all.js:235
each @ mootools-1.6.0_all.js:345
fireEvent @ VM2913:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
(匿名) @ VM3739:1
saveOrgsWithCheckEmpower @ VM3739:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
submit @ VM3739:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
submit @ VM3739:1
i.extend.$owner @ mootools-1.6.0_all.js:1399
(匿名) @ VM2963:1
setTimeout(异步)
(匿名) @ VM2963:1
(匿名) @ VM2913:1
a @ mootools-1.6.0_all.js:4606

F12,报这个错

周建军 发表于 2024-6-4 17:03:02

可不可以设置拟稿人不用填意见,审批人必须填意见?

论坛管理员 发表于 2024-6-5 11:18:48

this.workContext.getWork().activityName;获取当前所在的活动节点,排除一下拟稿环节
页: [1]
查看完整版本: 流程的默认提交界面的意见不能为空,该怎么写?