准入品类增加单位ID
This commit is contained in:
@ -109,13 +109,17 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
form.setFieldsValue({ accessWorkName: autoTitle });
|
form.setFieldsValue({ accessWorkName: autoTitle });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//获取 cuCompanyNumber
|
||||||
|
const onChangeDepartmentSelect = (value: any, label: any, extra: any) => {
|
||||||
|
form.setFieldsValue({ orgId: extra?.triggerNode?.props.cuCompanyNumber });
|
||||||
|
}
|
||||||
// 提交
|
// 提交
|
||||||
const onFinish = async (values: any) => {
|
const onFinish = async (values: any) => {
|
||||||
const finalPayload: {
|
const finalPayload: {
|
||||||
coscoAccessWork: {
|
coscoAccessWork: {
|
||||||
accessWorkName: string;
|
accessWorkName: string;
|
||||||
deptId: string;
|
deptId: string;
|
||||||
|
orgId: string;
|
||||||
};
|
};
|
||||||
categoryIds: string[];
|
categoryIds: string[];
|
||||||
supplierIds: string[];
|
supplierIds: string[];
|
||||||
@ -123,6 +127,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
coscoAccessWork: {
|
coscoAccessWork: {
|
||||||
accessWorkName: '',
|
accessWorkName: '',
|
||||||
deptId: '',
|
deptId: '',
|
||||||
|
orgId: '',
|
||||||
},
|
},
|
||||||
categoryIds: [],
|
categoryIds: [],
|
||||||
supplierIds: [],
|
supplierIds: [],
|
||||||
@ -131,6 +136,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
finalPayload.coscoAccessWork.accessWorkName = values.accessWorkName;
|
finalPayload.coscoAccessWork.accessWorkName = values.accessWorkName;
|
||||||
//准入部门
|
//准入部门
|
||||||
finalPayload.coscoAccessWork.deptId = values.deptId;
|
finalPayload.coscoAccessWork.deptId = values.deptId;
|
||||||
|
//准入单位
|
||||||
|
finalPayload.coscoAccessWork.orgId = values.orgId;
|
||||||
//品类选择
|
//品类选择
|
||||||
finalPayload.categoryIds = values.categoryIds;
|
finalPayload.categoryIds = values.categoryIds;
|
||||||
//选择供应商
|
//选择供应商
|
||||||
@ -207,9 +214,11 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
name="deptId"
|
name="deptId"
|
||||||
rules={[{ required: true, message: '请选择准入部门' }]}
|
rules={[{ required: true, message: '请选择准入部门' }]}
|
||||||
>
|
>
|
||||||
<AccessDepartmentSelect style={{ width: '100%' }} orgCategory='' />
|
<AccessDepartmentSelect style={{ width: '100%' }} orgCategory='' onChange={onChangeDepartmentSelect} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item name="orgId" noStyle>
|
||||||
|
<Input type="hidden" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="选择供应商"
|
label="选择供应商"
|
||||||
@ -245,7 +254,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item wrapperCol={{ offset: 6 }}>
|
<Form.Item wrapperCol={{ offset: 6 }}>
|
||||||
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }} disabled={submitting}>
|
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }} disabled={submitting}>
|
||||||
提交
|
提交
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
Reference in New Issue
Block a user