|
- const checkAttachmentCount = async (viewmodel, requestList) => {
- // requestList = [{objectId: 'xxxx', objectName: 'mdf'}]
- data = await window?.YYCooperationBridge?.YYFormFileGetAllListByObjectId(requestList, false);
- if(data?.length<1){
- cb.utils.alert('无附件,请上传')
- return false
- }else{
- return true
- }
- }
- viewModel.on('beforeWorkflowAction', function(param) {
- checkAttachmentCount(viewModel, [{objectId: viewModel.get('stockStampFileId').getValue(), objectName: viewModel.getEnv('appCode') || 'diwork_yuncai'}])
- });
复制代码 好像这样弄也没有用。能弹出提示但是还是没有成功拦截动作
|
|