供应商退出、准入、 工作台

This commit is contained in:
孙景学
2025-06-27 10:41:33 +08:00
parent 527637cce3
commit 4d54b36a16
40 changed files with 3746 additions and 1631 deletions

View File

@ -3,7 +3,6 @@ import { Modal, Form, Select, Button, Tree, message, DatePicker, Radio, Upload,
//
import { UploadOutlined } from '@ant-design/icons';
import type { UploadFile } from 'antd/es/upload/interface';
import moment from 'moment';
//组件
import SupplierSelector from './SupplierSelector';
import ReviewerSelector from './ReviewerSelector';
@ -14,10 +13,10 @@ const { Option } = Select;
const { RangePicker } = DatePicker;
//selected 类型
interface Reviewer {
key: string;
userId: string;
name: string;
id: string;
dept: string;
deptId: string;
}
// 传入的人接口
interface ReviewerSelectorData {
@ -85,7 +84,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
// 只取叶子节点 key
const leafKeys = findLeafKeys(convertTreeData(categoriesTreeData));
const onlyLeafChecked = keys.filter(key => leafKeys.includes(key));
const onlyLeafChecked = keys.filter(key => leafKeys.includes(String(key)));
setCheckedKeys(keys); // UI 显示用,还是全量
form.setFieldsValue({ categoryIds: onlyLeafChecked }); // 只存叶子到表单
@ -138,7 +137,20 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
};
// 提交
const onFinish = async (values: any) => {
const finalPayload = {
const finalPayload: {
coscoAccessWork: {
startTime: string;
endTime: string;
accessType: string;
accessWorkName: string;
deptId: string;
};
categoryIds: string[];
supplierIds: string[];
coscoAccessUserls: { userId: string; deptId: string; isLeader: number }[];
coscoAccessItems: { itemName: string; reviewBy: string[] }[];
coscoAccessWorkAttachments: any;
} = {
coscoAccessWork: {
startTime: '',
endTime: '',