Commit f5c9e729 authored by FE-安焕焕's avatar FE-安焕焕 👣

修改审核的选项

parent e6789170
...@@ -33,6 +33,10 @@ const AuditModal = props => { ...@@ -33,6 +33,10 @@ const AuditModal = props => {
label: '影响二次销售', label: '影响二次销售',
value: 2, value: 2,
}, },
{
label: '其他',
value: 3,
},
], ],
}, },
]; ];
...@@ -58,8 +62,9 @@ const AuditModal = props => { ...@@ -58,8 +62,9 @@ const AuditModal = props => {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
}; };
const isAgree = () => getFieldValue('auditResult')?.[0] === 1; const auditResult = getFieldValue('auditResult');
const isRefuse = () => getFieldValue('auditResult') && getFieldValue('auditResult')[0] !== 1; const isAgree = () => auditResult?.[0] === 1;
const isRefuse = () => auditResult && auditResult[0] !== 1;
return ( return (
<Modal <Modal
title="售后操作确认" title="售后操作确认"
...@@ -117,7 +122,7 @@ const AuditModal = props => { ...@@ -117,7 +122,7 @@ const AuditModal = props => {
</FormItem> </FormItem>
</div> </div>
)} )}
{isRefuse() && ( {isRefuse() && auditResult[1] === 3 && (
<FormItem label="拒绝原因"> <FormItem label="拒绝原因">
{getFieldDecorator('refuseDesc', { {getFieldDecorator('refuseDesc', {
initialValue: formData.refuseDesc, initialValue: formData.refuseDesc,
...@@ -136,6 +141,24 @@ const AuditModal = props => { ...@@ -136,6 +141,24 @@ const AuditModal = props => {
)} )}
</FormItem> </FormItem>
)} )}
{isRefuse() && auditResult[1] !== 3 && (
<FormItem label="补充说明">
{getFieldDecorator('refuseDesc', {
initialValue: formData.refuseDesc,
rules: [
{
message: '请填写补充说明!',
},
],
})(
<TextArea
placeholder="请填写补充说明"
allowClear
autoSize={{ minRows: 3, maxRows: 6 }}
/>,
)}
</FormItem>
)}
</Form> </Form>
</Modal> </Modal>
); );
......
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