Compare commits
3 Commits
85de5dcc2f
...
fda9237e0a
Author | SHA1 | Date | |
---|---|---|---|
fda9237e0a | |||
d6c3afdb96 | |||
8bdfa73c93 |
@ -33,35 +33,18 @@ const Config: React.FC<{}> = () => {
|
|||||||
roomType = getURLInformation("roomType");
|
roomType = getURLInformation("roomType");
|
||||||
}
|
}
|
||||||
//查评分办法和采购方式
|
//查评分办法和采购方式
|
||||||
//TODO zyx假数据 start
|
getBizInfo(bizId).then((res) => {
|
||||||
// getBizInfo(bizId).then((res) => {
|
|
||||||
let methodT = false;
|
let methodT = false;
|
||||||
// if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// const data = res.data;
|
const data = res.data;
|
||||||
const data = {
|
console.log("data",data)
|
||||||
"createBy": "ex-wanghy623", "createDate": "2025-05-09 08:58:57",
|
|
||||||
"updateBy": "ex-wanghy623", "updateDate": null, "tenantId": "ebtp_mall", "tenantName": "ebtp_mall", "deleteFlag": "normal",
|
|
||||||
"lastUpdateTime": "2024-10-28 15:56:21", "id": "1920644626720436224", "projectId": "1920644626460389376",
|
|
||||||
"bidSectBizNum": "ZX36102410002138", "bidSectCode": 1, "bidSectName": "测试001", "bidSectContent": null, "bidSectTypeDict": null,
|
|
||||||
"bidSectContractPrice": 1000.00000, "contractPriceCurrencyDict": null, "selectionMethod": null, "reviewRules": null,
|
|
||||||
"priceUnitDict": null, "bidderQual": null, "quotationMethodDict": "quotation_method_2", "tenderOpeningTime": null,
|
|
||||||
"ptcpMode": null, "ptcpCount": null, "businessModule": 8, "status": 2, "attDatasetId": null, "checkMethodDict": null,
|
|
||||||
"chooseProcess": "choose_process_4", "reviewReportId": null, "sectionNumber": null, "evalMethodDict": "eval_method_2",
|
|
||||||
"procurementTypeDict": null, "miitSectionId": null, "monetaryUnit": null, "remarks": null, "parentSectionId": "1916736930678689792",
|
|
||||||
"projectPlanId": "1850785019690168356", "subprojectId": "1850783951401635842", "isAnnouncement": null, "priceCeiling": 800.00000,
|
|
||||||
"priceCeilingExplain": null, "isStructureQuote": "1", "structureQuoteModel": "003", "structureQuoteLimitType": "002",
|
|
||||||
"bidNumberIsDefinite": "1", "projBidRatioInfoVoList": [], "bidDefiniteNumber": "2", "structureNote": null,
|
|
||||||
"basePriceUnitLimit": null, "materialList": [], "purcModel": null, "preBidAnalysisFlag": 0, "quotePreResultFlag": "0"
|
|
||||||
};
|
|
||||||
//TODO zyx假数据 end
|
|
||||||
if (roomType == '2') {
|
if (roomType == '2') {
|
||||||
data.evalMethodDict === 'eval_method_2' ? methodT = true : null;//评分办法 1最低价 2综合评估
|
data.evalMethodDict === 'eval_method_2' ? methodT = true : null;//评分办法 1最低价 2综合评估
|
||||||
}
|
}
|
||||||
data.ptcpMode === 'ptcp_mode_2' ? methodT = true : null;//采购方式 1合格制 2有限数量制
|
data.ptcpMode === 'ptcp_mode_2' ? methodT = true : null;//采购方式 1合格制 2有限数量制
|
||||||
// }
|
}
|
||||||
methodSet(methodT);
|
methodSet(methodT);
|
||||||
// });
|
});
|
||||||
//TODO zyx假数据 end
|
|
||||||
|
|
||||||
}, [])
|
}, [])
|
||||||
return (
|
return (
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
import React, { useState, useRef, useMemo, useEffect } from 'react';
|
import React, { useState, useRef, useMemo, useEffect } from 'react';
|
||||||
import { message, Modal, Input, Form, PageHeader, Button, Spin, Tree, Checkbox, Row, Col, Upload } from 'antd';
|
import { message, Modal, Input, Form, PageHeader, Button, Spin, Tree, Checkbox, Row, Col, Upload, TreeSelect } from 'antd';
|
||||||
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { getPage, getDataById, allocationIF, assignsRoles, updateRole } from './service';
|
import { getPage, getDataById, allocationIF, assignsRoles, updateRole } from './service';
|
||||||
import { fetchAllDepartment } from '../Department/service';
|
import { fetchAllDepartment } from '../Department/service';
|
||||||
import { getDicData } from '@/utils/session';
|
import { getDicData } from '@/utils/session';
|
||||||
import { fetchIamUsers, syncIamUser } from './service';
|
import { fetchIamUsers, syncIamUser } from './service';
|
||||||
import { UploadOutlined, DownloadOutlined } from '@ant-design/icons';
|
import { UploadOutlined, DownloadOutlined, EditOutlined } from '@ant-design/icons';
|
||||||
const { Search } = Input;
|
const { Search } = Input;
|
||||||
|
|
||||||
const entrust: React.FC<{}> = () => {
|
const entrust: React.FC<{}> = () => {
|
||||||
const [roleModalForm] = Form.useForm();
|
const [roleModalForm] = Form.useForm();
|
||||||
|
const [editModalForm] = Form.useForm();
|
||||||
const [open, setOpen] = useState<boolean>(false);
|
const [open, setOpen] = useState<boolean>(false);
|
||||||
|
const [editOpen, setEditOpen] = useState<boolean>(false);
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const [spin, spinSet] = useState<boolean>(false);
|
const [spin, spinSet] = useState<boolean>(false);
|
||||||
const [roles, setRoles] = useState<any>([]);
|
const [roles, setRoles] = useState<any>([]);
|
||||||
|
const [departments, setDepartments] = useState<any>([]);
|
||||||
|
const [departmentTreeData, setDepartmentTreeData] = useState<any>([]);
|
||||||
//查询分页数据
|
//查询分页数据
|
||||||
const [pageData, pageDataSet] = useState<any>({
|
const [pageData, pageDataSet] = useState<any>({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -29,6 +34,8 @@ const entrust: React.FC<{}> = () => {
|
|||||||
const [iamTotal, setIamTotal] = useState(0);
|
const [iamTotal, setIamTotal] = useState(0);
|
||||||
const [iamPage, setIamPage] = useState({ pageNo: 1, pageSize: 10 });
|
const [iamPage, setIamPage] = useState({ pageNo: 1, pageSize: 10 });
|
||||||
const [iamSearch, setIamSearch] = useState('');
|
const [iamSearch, setIamSearch] = useState('');
|
||||||
|
const [currentUser, setCurrentUser] = useState<any>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDepartmentList();
|
getDepartmentList();
|
||||||
}, []);
|
}, []);
|
||||||
@ -42,15 +49,58 @@ const entrust: React.FC<{}> = () => {
|
|||||||
{ title: '部门', dataIndex: 'orgName', hideInSearch: true },
|
{ title: '部门', dataIndex: 'orgName', hideInSearch: true },
|
||||||
{ title: '邮箱', dataIndex: 'email' },
|
{ title: '邮箱', dataIndex: 'email' },
|
||||||
{
|
{
|
||||||
title: '操作', width: '9%',
|
title: '操作', width: '12%',
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
render: (_, record) => [
|
render: (_, record) => [
|
||||||
<Button type='text' onClick={() => { chooseRole(record) }}>分配角色</Button>
|
<Button type='text' onClick={() => { chooseRole(record) }}>分配角色</Button>,
|
||||||
// <Button type='text' onClick={() => { handleUpdate(record) }}>修改</Button>,
|
<Button type='text' icon={<EditOutlined />} onClick={() => { handleEdit(record) }}>修改</Button>
|
||||||
// <Button type='text' onClick={() => { handleDelete(record.roleId) }}>删除</Button>
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 处理修改用户
|
||||||
|
const handleEdit = (record: any) => {
|
||||||
|
setCurrentUser(record);
|
||||||
|
editModalForm.resetFields();
|
||||||
|
editModalForm.setFieldsValue({
|
||||||
|
userId: record.userId,
|
||||||
|
name: record.name,
|
||||||
|
employeeNumber: record.employeeNumber,
|
||||||
|
email: record.email,
|
||||||
|
orgId: record.orgId,
|
||||||
|
orgName: record.orgName
|
||||||
|
});
|
||||||
|
setEditOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭修改Modal
|
||||||
|
const closeEditModal = () => {
|
||||||
|
editModalForm.resetFields();
|
||||||
|
setEditOpen(false);
|
||||||
|
setCurrentUser(null);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交修改
|
||||||
|
const onEditSubmit = async () => {
|
||||||
|
try {
|
||||||
|
const values = await editModalForm.validateFields();
|
||||||
|
const { success } = await updateRole(values);
|
||||||
|
if (success) {
|
||||||
|
message.success('修改成功!');
|
||||||
|
closeEditModal();
|
||||||
|
actionRef.current?.reload();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 部门选择变化
|
||||||
|
const handleDepartmentChange = (value: string, labelList: any) => {
|
||||||
|
const selectedLabel = labelList[labelList.length - 1];
|
||||||
|
editModalForm.setFieldsValue({ orgName: selectedLabel });
|
||||||
|
};
|
||||||
|
|
||||||
//分配角色查询数据
|
//分配角色查询数据
|
||||||
const chooseRole = (record: any) => {
|
const chooseRole = (record: any) => {
|
||||||
roleModalForm.resetFields();
|
roleModalForm.resetFields();
|
||||||
@ -89,6 +139,68 @@ const entrust: React.FC<{}> = () => {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 修改用户Modal
|
||||||
|
const editUserModal = (
|
||||||
|
<Modal
|
||||||
|
title="修改用户信息"
|
||||||
|
visible={editOpen}
|
||||||
|
width="50%"
|
||||||
|
centered
|
||||||
|
destroyOnClose={true}
|
||||||
|
onOk={onEditSubmit}
|
||||||
|
onCancel={closeEditModal}
|
||||||
|
>
|
||||||
|
<Form form={editModalForm} {...layout}>
|
||||||
|
<Form.Item label="用户ID" name="userId" hidden>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="用户名"
|
||||||
|
name="name"
|
||||||
|
rules={[{ required: true, message: '请输入用户名' }]}
|
||||||
|
>
|
||||||
|
<Input placeholder="请输入用户名" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="用户账号"
|
||||||
|
name="employeeNumber"
|
||||||
|
rules={[{ required: true, message: '请输入用户账号' }]}
|
||||||
|
>
|
||||||
|
<Input placeholder="请输入用户账号" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="邮箱"
|
||||||
|
name="email"
|
||||||
|
rules={[
|
||||||
|
{ type: 'email', message: '请输入正确的邮箱格式' },
|
||||||
|
{ required: true, message: '请输入邮箱' }
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Input placeholder="请输入邮箱" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="部门"
|
||||||
|
name="orgId"
|
||||||
|
rules={[{ required: true, message: '请选择部门' }]}
|
||||||
|
>
|
||||||
|
<TreeSelect
|
||||||
|
placeholder="请选择部门"
|
||||||
|
treeData={departmentTreeData}
|
||||||
|
onChange={handleDepartmentChange}
|
||||||
|
showSearch
|
||||||
|
treeNodeFilterProp="title"
|
||||||
|
allowClear
|
||||||
|
treeDefaultExpandAll
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="部门名称" name="orgName" hidden>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
|
||||||
const setRoleModal = (
|
const setRoleModal = (
|
||||||
<Modal
|
<Modal
|
||||||
title={"分配角色"}
|
title={"分配角色"}
|
||||||
@ -168,6 +280,8 @@ const entrust: React.FC<{}> = () => {
|
|||||||
};
|
};
|
||||||
generateList(data);
|
generateList(data);
|
||||||
treeDataListSet(dataList);
|
treeDataListSet(dataList);
|
||||||
|
setDepartments(dataList);
|
||||||
|
setDepartmentTreeData(data);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -354,6 +468,7 @@ const entrust: React.FC<{}> = () => {
|
|||||||
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }); setOrgId(''); }}
|
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }); setOrgId(''); }}
|
||||||
/>
|
/>
|
||||||
{setRoleModal}
|
{setRoleModal}
|
||||||
|
{editUserModal}
|
||||||
{/* IAM用户同步Modal */}
|
{/* IAM用户同步Modal */}
|
||||||
<Modal
|
<Modal
|
||||||
title="同步用户信息"
|
title="同步用户信息"
|
||||||
|
@ -456,7 +456,6 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
const juryNumber = parseInt(uniqueJuryNumbers[0]) || 0;
|
const juryNumber = parseInt(uniqueJuryNumbers[0]) || 0;
|
||||||
const repNumber = parseInt(form.getFieldValue('representativeNumber')) || 0;
|
const repNumber = parseInt(form.getFieldValue('representativeNumber')) || 0;
|
||||||
|
|
||||||
|
|
||||||
if (repNumber < 0 || repNumber > juryNumber) {
|
if (repNumber < 0 || repNumber > juryNumber) {
|
||||||
message.error(`直接录入数量应在 0 ~ ${juryNumber} 之间`);
|
message.error(`直接录入数量应在 0 ~ ${juryNumber} 之间`);
|
||||||
form.setFieldsValue({ representativeNumber: undefined, expertNumber: undefined });
|
form.setFieldsValue({ representativeNumber: undefined, expertNumber: undefined });
|
||||||
@ -469,11 +468,11 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 在 useEffect 中监听依赖项
|
// 在 useEffect 中监听依赖项
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
if (Array.isArray(sections) && sections.length > 0) {
|
// if (Array.isArray(sections) && sections.length > 0) {
|
||||||
calculateExpertNumber();
|
// calculateExpertNumber();
|
||||||
}
|
// }
|
||||||
}, [form.getFieldValue('representativeNumber'), checkedList, sections]);
|
// }, [form.getFieldValue('representativeNumber'), checkedList, sections]);
|
||||||
const tab1 = () => {//cqtab1
|
const tab1 = () => {//cqtab1
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -600,20 +599,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
rules={[...rule(`直接录入数量`), { pattern: /^([1-9]?\d|100)$/, message: '请输入正确数值' }]}
|
rules={[...rule(`直接录入数量`), { pattern: /^([1-9]?\d|100)$/, message: '请输入正确数值' }]}
|
||||||
{...formLayout}
|
{...formLayout}
|
||||||
>
|
>
|
||||||
<Input style={{ width: "90%" }} type="number" disabled={disabled} placeholder={`直接录入数量`}
|
<Input style={{ width: "90%" }} type="number" disabled={disabled} placeholder={`直接录入数量`}/>
|
||||||
// onChange={(e) => {
|
|
||||||
// const value = e.target.value;
|
|
||||||
// if (value && !checkedList?.length) {
|
|
||||||
// form.resetFields(['representativeNumber']);
|
|
||||||
// message.error("请先选择关联标段");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 继续触发计算
|
|
||||||
// form.setFieldsValue({ representativeNumber: value });
|
|
||||||
// calculateExpertNumber();
|
|
||||||
// }}
|
|
||||||
/>
|
|
||||||
</FormItem></Col>
|
</FormItem></Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<FormItem
|
<FormItem
|
||||||
@ -622,7 +608,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
rules={[...rule('抽取数量'), { pattern: /^([1-9]?\d|100)$/, message: '请输入正确数值' }]}
|
rules={[...rule('抽取数量'), { pattern: /^([1-9]?\d|100)$/, message: '请输入正确数值' }]}
|
||||||
{...formLayout}
|
{...formLayout}
|
||||||
>
|
>
|
||||||
<Input style={{ width: "90%" }} type="number" />
|
<Input style={{ width: "90%" }} type="number" disabled={disabled} placeholder={`专家抽取数量`} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
@ -668,13 +654,6 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
{/* <Col span={12}><FormItem
|
|
||||||
name="description"
|
|
||||||
label="申请要求"
|
|
||||||
rules={[{ type: 'string', message: '请输入正确内容' }, { max: 100, message: '内容超长' }]}
|
|
||||||
>
|
|
||||||
<Input style={{ width: "90%" }} disabled={disabled} />
|
|
||||||
</FormItem></Col> */}
|
|
||||||
</Row>
|
</Row>
|
||||||
</Form>
|
</Form>
|
||||||
</>
|
</>
|
||||||
@ -698,13 +677,16 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: professionalMap,
|
valueEnum: professionalMap,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
|
fieldProps: {
|
||||||
|
disabled: disabled // 查看时禁用选择
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '人数',
|
title: '人数',
|
||||||
dataIndex: 'extractNumber',
|
dataIndex: 'extractNumber',
|
||||||
width: '30%',
|
width: '30%',
|
||||||
renderFormItem: (_, { record }) => {
|
renderFormItem: (_, { record }) => {
|
||||||
return <InputNumber min={0} addonAfter="人" />;
|
return <InputNumber min={0} addonAfter="人" disabled={disabled} />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user