| | |
| | | { fieldName: 'documentVersion', label: '资料版本', component: 'Input', componentProps: { disabled: true } }, |
| | | { fieldName: 'reviewerNickname', label: '审核人', component: 'Input', componentProps: { disabled: true } }, |
| | | { |
| | | fieldName: 'auditStatus', |
| | | // 字段名不能用 auditStatus:自动审批模式下会被 adapter/form 的 isAuditField 整条过滤掉,导致审核人无法选择 |
| | | fieldName: 'auditResult', |
| | | label: '审核结果', |
| | | component: 'Select', |
| | | componentProps: { options: getDictOptions(DICT_TYPE.MES_PD_DOCUMENT_AUDIT_STATUS, 'number'), placeholder: '请选择审核结果' }, |
| | | componentProps: { |
| | | options: getDictOptions( |
| | | DICT_TYPE.MES_PD_DOCUMENT_AUDIT_STATUS, |
| | | 'number', |
| | | ).filter((item) => item.value !== 0), // 0 为待审核,审核时只允许通过/不通过 |
| | | placeholder: '请选择审核结果', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | | { fieldName: 'remark', label: '审核意见', component: 'Textarea', componentProps: { placeholder: '请输入审核意见', rows: 3 } }, |
| | |
| | | modalApi.lock(); |
| | | try { |
| | | const raw = await formApi.getValues(); |
| | | await updatePdDocumentAudit({ id: raw.id, auditStatus: raw.auditStatus, remark: raw.remark, auditTime: Date.now() }); |
| | | await updatePdDocumentAudit({ id: raw.id, auditStatus: raw.auditResult, remark: raw.remark, auditTime: Date.now() }); |
| | | emit('success'); |
| | | message.success($t('ui.actionMessage.operationSuccess')); |
| | | await modalApi.close(); |
| | |
| | | if (!isOpen) return; |
| | | const data = modalApi.getData<MesPdDocumentAuditApi.DocumentAudit>(); |
| | | modalApi.setState({ title: '资料审核' }); |
| | | await formApi.setValues(data); |
| | | // 每次打开都清空审核结果,避免复用上一行已选的值 |
| | | await formApi.setValues({ ...data, auditResult: undefined }); |
| | | }, |
| | | }); |
| | | </script> |