|
@@ -55,9 +55,8 @@ const Detail: React.FC<RouteComponentProps> = props => {
|
|
|
checkOrder: {
|
|
|
// 整改单
|
|
|
name: '',
|
|
|
- status: 0,
|
|
|
opinion: '',
|
|
|
- create_time: new Date().toDateString()
|
|
|
+ rectifiedTime: ''
|
|
|
},
|
|
|
auditHistory: [],
|
|
|
rectifiedInfo: [],
|
|
@@ -175,9 +174,13 @@ const Detail: React.FC<RouteComponentProps> = props => {
|
|
|
return message.error('现场检查情况或处理要求措施不能为空')
|
|
|
}
|
|
|
}
|
|
|
- if (type === 'pass' && detail.latestAuditor.progress === '1' && !detail.checkOrder.opinion) {
|
|
|
-
|
|
|
- return message.error('请填写整改单')
|
|
|
+ if (type === 'pass' && detail.latestAuditor.progress === '1' ) {
|
|
|
+ if (!detail.checkOrder.opinion) {
|
|
|
+ return message.error('请填写整改单')
|
|
|
+ }
|
|
|
+ if (!detail.checkOrder.rectifiedTime) {
|
|
|
+ return message.error('请选择整改完成日期')
|
|
|
+ }
|
|
|
}
|
|
|
setModalObj({ ...modalObj, auditType: type, auditModal: true })
|
|
|
}
|
|
@@ -203,11 +206,8 @@ const Detail: React.FC<RouteComponentProps> = props => {
|
|
|
if (modalObj.auditType === 'pass' || modalObj.auditType === 'back') {
|
|
|
payload.id = detail.latestAuditor.id
|
|
|
if (detail.latestAuditor.progress === '1') {
|
|
|
- // if (!detail.checkOrder.opinion) {
|
|
|
- // return message.error('请填写整改单')
|
|
|
- // } else {
|
|
|
- // }
|
|
|
payload.rectifiedInfo = detail.checkOrder.opinion
|
|
|
+ payload.rectifiedTime = detail.checkOrder.rectifiedTime
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -388,7 +388,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
|
|
|
size="small"
|
|
|
allowClear={false}
|
|
|
disabledDate={disabledDate}
|
|
|
- onChange={value => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, create_time: value?.format() } })} />
|
|
|
+ onChange={value => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, rectifiedTime: value?.format("YYYY-MM-DD HH:mm:ss") } })} />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@@ -413,7 +413,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
|
|
|
<td>{item.opinion}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th style={{ width: '150px' }}>整改日期</th>
|
|
|
+ <th style={{ width: '150px' }}>整改完成日期</th>
|
|
|
<td>{dayjsFormat(item.create_time, 'YYYY-MM-DD')}</td>
|
|
|
</tr>
|
|
|
<tr>
|