Commit e20ccf8a by zhaochengxiang

流程保存时评审结论必填

parent ca39ec67
...@@ -351,7 +351,7 @@ const EditModel = (props) => { ...@@ -351,7 +351,7 @@ const EditModel = (props) => {
const onExportCancel = (val) => { const onExportCancel = (val) => {
setExportParams({ visible: false }) setExportParams({ visible: false })
let _id = (approvalId) ? currentApprovalModelId : modelerData?.id let _id = modelerData?.id
if (val === 'ddl') { if (val === 'ddl') {
setExportDDLParams({ visible: true }) setExportDDLParams({ visible: true })
...@@ -701,7 +701,7 @@ const EditModel = (props) => { ...@@ -701,7 +701,7 @@ const EditModel = (props) => {
<ExportDDLModel <ExportDDLModel
{...exportDDLParams} {...exportDDLParams}
reference='exportDDL' reference='exportDDL'
ids={(approvalId) ? [currentApprovalModelId] : [modelerData?.id]} ids={[modelerData?.id]}
names={[modelerData?.name]} names={[modelerData?.name]}
onCancel={() => { onCancel={() => {
setExportDDLParams({ setExportDDLParams({
...@@ -773,11 +773,18 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk, ...@@ -773,11 +773,18 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
} }
const onOkClick = () => { const onOkClick = () => {
setWaiting(true); if (
(type==='design'&&(item?.designReviewPass===null||item?.designReviewPass===undefined))
|| (type==='rule'&&(item?.standardReviewPass===null||item?.standardReviewPass===undefined))
) {
showMessage('warn', '请先选择评审结论')
return
}
let newModelInfoList = [...data?.modelInfoList??[]]; let newModelInfoList = [...data?.modelInfoList??[]];
(newModelInfoList??[]).splice(index, 1, item); (newModelInfoList??[]).splice(index, 1, item);
setWaiting(true);
dispatch({ dispatch({
type: 'datamodel.updatePhysicalModelApproval', type: 'datamodel.updatePhysicalModelApproval',
payload: { payload: {
......
...@@ -51,8 +51,9 @@ const FC = (props) => { ...@@ -51,8 +51,9 @@ const FC = (props) => {
}) })
} }
const onSaveClick = () => { const onSaveClick = async () => {
try { try {
await listRef.current?.validate()
const tableData = listRef.current?.tableData const tableData = listRef.current?.tableData
console.log('table data', tableData) console.log('table data', tableData)
setWaiting(true) setWaiting(true)
...@@ -127,7 +128,19 @@ const FC = (props) => { ...@@ -127,7 +128,19 @@ const FC = (props) => {
<Descriptions.Item label="当前环节">{type==='design'?'设计评审':'规范评审'}</Descriptions.Item> <Descriptions.Item label="当前环节">{type==='design'?'设计评审':'规范评审'}</Descriptions.Item>
<Descriptions.Item label="送审时间">{data?.createdTs?new Date(data?.createdTs).toLocaleString():''}</Descriptions.Item> <Descriptions.Item label="送审时间">{data?.createdTs?new Date(data?.createdTs).toLocaleString():''}</Descriptions.Item>
<Descriptions.Item label="送审说明">{data?.sendReviewExplain}</Descriptions.Item> <Descriptions.Item label="送审说明">{data?.sendReviewExplain}</Descriptions.Item>
<Descriptions.Item label="附件">{<AttachesItem readOnly value={data?.fileList} />}</Descriptions.Item> <Descriptions.Item label="附件">
<Space>
{
(data?.fileList??[]).map(item => (
<a key={item.id} onClick={() => {
window.open(`/api/datamodeler/file/download?id=${item.id}`)
}}>
{item.fileName}
</a>
))
}
</Space>
</Descriptions.Item>
</Descriptions> </Descriptions>
</div> </div>
<div className='my-5'> <div className='my-5'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment