Commit f52df316 by zhaochengxiang

流程详情回退代码

parent 0961ec29
...@@ -270,17 +270,16 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) { ...@@ -270,17 +270,16 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) {
marginRight: 4, marginRight: 4,
color: '#ff4d4f', color: '#ff4d4f',
}}>*</span> }}>*</span>
{ type === 'design' ? '设计评审结论' : '规范评审结论' } 评审结论
</span>, </span>,
dataIndex: (type === 'design') ? 'designReviewPass' : 'standardReviewPass', dataIndex: (type === 'design') ? 'designReviewPass' : 'standardReviewPass',
width: 120, width: 120,
className: 'highlight', className: 'highlight',
render: (text, record, index) => { render: (text, record, index) => {
form?.setFieldsValue({ [`pass${index}`]: text }) form?.setFieldsValue({ [`pass${index}`]: (type==='rule'&&!record.designReviewPass)?false:text })
return ( return (
<React.Fragment> <Tooltip title={(type==='rule'&&!record.designReviewPass) ? '设计评审不通过' : ''}>
{ <Form.Item name={`pass${index}`}
(type==='rule'&&!record.designReviewPass) ? '-' : <Form.Item name={`pass${index}`}
rules={[{ required: true, message: '请选择评审结论!' }]} rules={[{ required: true, message: '请选择评审结论!' }]}
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
...@@ -290,6 +289,7 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) { ...@@ -290,6 +289,7 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) {
style={{ style={{
width: '100%' width: '100%'
}} }}
disabled={(type==='rule')&&!record.designReviewPass}
onChange={(val) => { onChange={(val) => {
setTableData(prev => { setTableData(prev => {
return produce(prev, (draft) => { return produce(prev, (draft) => {
...@@ -305,18 +305,17 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) { ...@@ -305,18 +305,17 @@ const List = React.forwardRef(function ({type, data, taskId}, ref) {
<Select.Option value={true}>通过</Select.Option> <Select.Option value={true}>通过</Select.Option>
<Select.Option value={false}>不通过</Select.Option> <Select.Option value={false}>不通过</Select.Option>
</Select> </Select>
</Form.Item> </Form.Item>
} </Tooltip>
</React.Fragment>
) )
} }
}, },
{ {
title: (type === 'design') ? '设计评审意见' : '规范评审意见', title: '评审意见',
dataIndex: (type === 'design') ? 'designReviewComment' : 'standardReviewComment', dataIndex: (type === 'design') ? 'designReviewComment' : 'standardReviewComment',
className: 'highlight', className: 'highlight',
render: (text, record, index) => ( render: (text, record, index) => (
<Tooltip title={((type==='rule')&&!record.designReviewPass) ? '设计评审不通过' : ''}> <Tooltip title={(type==='rule'&&!record.designReviewPass) ? '设计评审不通过' : ''}>
<Form.Item style={{ marginBottom: 0 }}> <Form.Item style={{ marginBottom: 0 }}>
<Input.TextArea rows={1} <Input.TextArea rows={1}
value={text} value={text}
......
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