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

修改审核的选项

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