准入查看与零星采购/应急采购/个人供应商和个人修改
This commit is contained in:
@ -143,12 +143,14 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
accessType: string;
|
||||
accessWorkName: string;
|
||||
deptId: string;
|
||||
accessDesc: string;
|
||||
};
|
||||
categoryIds: string[];
|
||||
supplierIds: string[];
|
||||
coscoAccessUserls: { userId: string; deptId: string; isLeader: number }[];
|
||||
coscoAccessItems: { itemName: string; reviewBy: string[] }[];
|
||||
coscoAccessWorkAttachments: any;
|
||||
attachmentsType: any;
|
||||
} = {
|
||||
coscoAccessWork: {
|
||||
startTime: '',
|
||||
@ -156,12 +158,14 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
accessType: '',
|
||||
accessWorkName: '',
|
||||
deptId: '',
|
||||
accessDesc: '',
|
||||
},
|
||||
categoryIds: [],
|
||||
supplierIds: [],
|
||||
coscoAccessUserls: [],
|
||||
coscoAccessItems: [],
|
||||
coscoAccessWorkAttachments: {},
|
||||
attachmentsType: {},
|
||||
};
|
||||
|
||||
//标题名称
|
||||
@ -170,6 +174,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
finalPayload.coscoAccessWork.accessType = values.accessType;
|
||||
//准入部门
|
||||
finalPayload.coscoAccessWork.deptId = values.deptId;
|
||||
// 准入说明
|
||||
finalPayload.coscoAccessWork.accessDesc = values.accessDesc;
|
||||
//品类选择
|
||||
finalPayload.categoryIds = values.categoryIds;
|
||||
//选择供应商
|
||||
@ -200,7 +206,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
});
|
||||
} else {
|
||||
// 供应商符合性审查
|
||||
finalPayload.coscoAccessWorkAttachments = values.supplierCompliance[0].response
|
||||
finalPayload.coscoAccessWorkAttachments = values.supplierCompliance[0].response;
|
||||
finalPayload.coscoAccessWorkAttachments.fileUrl = values.supplierCompliance[0].response.url;
|
||||
}
|
||||
|
||||
const res = await add(finalPayload);
|
||||
@ -278,7 +285,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
<Radio.Group onChange={onMethodChange} value={admissionMethod}>
|
||||
<Radio value="online">线上准入</Radio>
|
||||
<Radio value="offline">线下准入</Radio>
|
||||
<Radio value="scattered">零星采购/应急采购</Radio>
|
||||
<Radio value="scattered">零星采购/应急采购/个人供应商</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
@ -425,10 +432,54 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
{admissionMethod === 'scattered' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label="准入说明"
|
||||
name="accessDesc"
|
||||
rules={[{ required: true, message: '请输入准入说明' }]}
|
||||
>
|
||||
<Input.TextArea placeholder="请依照《集团供应商管理制度》填写准入说明" rows={2} maxLength={200} showCount />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="附件"
|
||||
name="supplierCompliance"
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={e => (Array.isArray(e) ? e : e && e.fileList)}
|
||||
>
|
||||
<Upload
|
||||
fileList={fileList}
|
||||
customRequest={handleCustomRequest}
|
||||
beforeUpload={(file) => {
|
||||
if (fileList.length >= 1) {
|
||||
message.error('只能上传一个文件');
|
||||
return Upload.LIST_IGNORE;
|
||||
}
|
||||
return true; // 允许进入 customRequest
|
||||
}}
|
||||
onChange={({ fileList: newFileList }) => {
|
||||
setFileList(newFileList);
|
||||
form.setFieldsValue({ supplierCompliance: newFileList });
|
||||
}}
|
||||
onRemove={(file) => {
|
||||
const newList = fileList.filter(item => item.uid !== file.uid);
|
||||
setFileList(newList);
|
||||
form.setFieldsValue({ supplierCompliance: newList });
|
||||
}}
|
||||
accept=".pdf,.doc,.docx" // 可选,限制文件类型
|
||||
maxCount={1} // 只允许一个
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Form.Item wrapperCol={{ offset: 6 }}>
|
||||
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }}>
|
||||
{ admissionMethod === 'online'? '确认': admissionMethod === 'offline'? '提交审核':'提交' }
|
||||
|
||||
{admissionMethod === 'online' ? '确认' : admissionMethod === 'offline' ? '提交审核' : '提交'}
|
||||
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
Reference in New Issue
Block a user