Commit 60b371d1 authored by guang.wu's avatar guang.wu

fix: 修改字段

parent 6f12bd52
...@@ -71,7 +71,7 @@ export const brandColumn = config => { ...@@ -71,7 +71,7 @@ export const brandColumn = config => {
<Button key="check" type="primary" onClick={() => onAction(r, 'edit')}> <Button key="check" type="primary" onClick={() => onAction(r, 'edit')}>
修改 修改
</Button>, </Button>,
<Button key="update" type="primary" ghost onClick={() => onAction(r, 'update')}> <Button key="update" type="primary" ghost onClick={() => onAction(r, 'supplement')}>
补充资质 补充资质
</Button>, </Button>,
], ],
...@@ -82,7 +82,7 @@ export const brandColumn = config => { ...@@ -82,7 +82,7 @@ export const brandColumn = config => {
// 品牌信息字段 // 品牌信息字段
export const brandInfoColumn = config => { export const brandInfoColumn = config => {
const { actionStatus } = config; const { actionStatus } = config;
const disabled = [brandActionAudit, brandActionFind].includes(actionStatus); const disabled = brandActionEdit !== actionStatus;
const baseInfo = [ const baseInfo = [
{ {
title: '资质证书', title: '资质证书',
...@@ -90,9 +90,6 @@ export const brandInfoColumn = config => { ...@@ -90,9 +90,6 @@ export const brandInfoColumn = config => {
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择资质证书' }], rules: [{ required: true, message: '请选择资质证书' }],
}, },
fieldProps: {
disabled,
},
renderFormItem: () => <UploadImage limit={1} />, renderFormItem: () => <UploadImage limit={1} />,
}, },
{ {
...@@ -101,9 +98,6 @@ export const brandInfoColumn = config => { ...@@ -101,9 +98,6 @@ export const brandInfoColumn = config => {
formItemProps: { formItemProps: {
rules: [{ required: true, message: '请选择授权证书' }], rules: [{ required: true, message: '请选择授权证书' }],
}, },
fieldProps: {
disabled,
},
renderFormItem: () => <UploadImage limit={1} />, renderFormItem: () => <UploadImage limit={1} />,
}, },
{ {
...@@ -175,58 +169,6 @@ export const brandInfoColumn = config => { ...@@ -175,58 +169,6 @@ export const brandInfoColumn = config => {
}, },
renderFormItem: () => <UploadImage limit={1} width={192} height={192} />, renderFormItem: () => <UploadImage limit={1} width={192} height={192} />,
}, },
{
title: '',
dataIndex: '',
valueType: 'divider',
hideInForm: ![brandActionAudit, brandActionFind].includes(actionStatus),
formItemProps: {
wrapperCol: { span: 22 },
},
fieldProps: {
children: '品牌审核',
orientation: 'left',
},
},
{
title: '审核结果',
dataIndex: 'status',
valueType: 'radio',
hideInForm: ![brandActionAudit, brandActionFind].includes(actionStatus),
valueEnum: brandAuditEnum,
fieldProps: {
buttonStyle: 'outline',
disabled: [brandActionFind].includes(actionStatus),
onChange: e => {
if (e.target.value === 2) {
config.form.setFieldsValue({ reason: '' });
}
},
},
},
{
valueType: 'dependency',
name: ['status'],
hideInForm: ![brandActionAudit, brandActionFind].includes(actionStatus),
columns: ({ status }) => {
const rejectColumn = [
{
title: '驳回原因',
dataIndex: 'rejectReason',
maxLength: 200,
formItemProps: {
rules: [{ required: true, message: '请输入驳回原因' }],
},
fieldProps: {
placeholder: '请输入驳回原因',
disabled: [brandActionFind].includes(actionStatus),
},
renderFormItem: () => <Input />,
},
];
return +status === 2 ? rejectColumn : [];
},
},
]; ];
return baseInfo; return baseInfo;
}; };
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