供应商入库,评委会组建

This commit is contained in:
jlzhangyx5
2025-07-18 16:57:07 +08:00
parent c5204dcd06
commit 410a34da85
7 changed files with 5975 additions and 0 deletions

View File

@ -46,6 +46,11 @@ export default [//投标
path: '/ProjectLayout/Tender/ProjectManager/JudgingPanel',
component: './Tender/ProjectManager/JudgingPanel/List'
},
// 评委会设置-专家入库
{
path: '/ProjectLayout/Tender/ProjectManager/JudgingPanelStoreIn',
component: './Tender/ProjectManager/JudgingPanelStoreIn/List'
},
// 保证金
{
path: '/ProjectLayout/Tender/supplier/EarnestMoney',

View File

@ -0,0 +1,337 @@
import ExpertPhotoUpload from "@/components/ElecBidEvaluation/ExpertPhotoUpload";
import { btnAuthority } from "@/utils/authority";
import { downloadPath } from "@/utils/DownloadUtils";
import ProTable, { ProColumns } from "@ant-design/pro-table";
import { Button, Collapse, Modal, Spin, Image, Popconfirm, Drawer, Form, Input, Row, Col, Select, message } from "antd";
import React, { useEffect, useState } from "react";
import './judgList.less';
import '@/assets/xsy_style.less';
import { saveAssistPeople } from "./service";
import { isEmpty } from "@/utils/CommonUtils";
interface OutsourcingManageProps {
modalVisible: boolean,
onCancel: () => void,
onSubmit: () => void,//保存回调
open: boolean,//评委会里是否有开启评标的评审室 true有开启的 false无
assistData: any[],//外协人数据
assistNumber: string,//外协人数量
juryId: string,//评委会id
}
const formLayoutDrawer = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, };
const tailLayoutDrawer = { wrapperCol: { offset: 8, span: 20 }, };
/**
* 外协管理
* @param props
* @returns
*/
const OutsourcingManage: React.FC<OutsourcingManageProps> = (props) => {
const modalHeight = window.innerHeight * 96 / 100;
const { Panel } = Collapse;
const { Option } = Select;
const [formMem] = Form.useForm();
const { modalVisible, onCancel, onSubmit, open, assistData = [], assistNumber = "0", juryId } = props;
//loading
const [loading, setLoading] = useState<boolean>(false);
//录入外协人员 drawerVisible
const [add, setAdd] = useState<boolean>(false);
//外协人员数据
const [dataSource, setDataSource] = useState<any[]>([]);
//外协人员-修改存key
const [updateKeyMem, updateKeyMemSet] = useState<number>(-1);
//删除回调
const confirmMem = async (record: any) => {
const dataTem = [...dataSource];
dataTem.map((item: any, index: any) => {
if (item.key == record.key) {
dataTem.splice(index, 1);
}
});
setDataSource(dataTem);
}
const columnsMember: ProColumns<any>[] = [//成员管理页面表格
{ title: '序号', valueType: 'index', width: 50, },
{ title: '姓名', dataIndex: 'name', },
{ title: '手机号码', dataIndex: 'mobile', },
{ title: '证件号码', dataIndex: 'certificate', },
{ title: '工作单位', dataIndex: 'workunit', },
{
title: '照片',
dataIndex: 'faceId',
render: (_, record) => {
if (record.faceId) {
// return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
return <Image height={80} width={60} src={downloadPath + '?fileId=' + record.faceId} />
};
return '-';
}
},
{
title: '操作', dataIndex: 'option', width: 180,
valueType: 'option',
render: (_, record) => {
return (
<>
<Button type='text' hidden={open || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={() => {//修改
setAdd(true);
updateKeyMemSet(record.key);
formMem.setFieldsValue({ ...record });
}}></Button>
<Popconfirm
placement="topRight"
title={"确定删除么?"}
onConfirm={() => { confirmMem(record); }}
okText="确定"
cancelText="取消"
>
<Button type='text' hidden={open || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])}></Button>
</Popconfirm>
</>
);
}
},
];
useEffect(() => {
setDataSource(assistData);
return () => {
updateKeyMemSet(-1);
setDataSource([]);
setLoading(false);
setAdd(false);
}
}, [assistData]);
return (
<>
<Modal
visible={modalVisible}
maskClosable={false}
style={{ overflowX: 'hidden', maxHeight: modalHeight, minWidth: 1000 }}
width={"60%"}
centered
destroyOnClose
title="外协人员管理"
bodyStyle={{ maxHeight: modalHeight - 140, minHeight: modalHeight * 0.6, overflow: 'auto', padding: '16px 0px 0px 0px' }}
okButtonProps={{ hidden: btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase']), disabled: open, loading: loading }}
cancelText="取消"
okText="保存"
// onCancel={() => {
// setMemberVis(false);
// reset();
// }}
onOk={() => {
if (Number(assistNumber) == dataSource.length) {
let count = 0
for (let i = 0, length = dataSource.length; i < length; i++) {
const item = dataSource[i];
if (isEmpty(item.faceId)) {
count += 1;
}
}
if (count > 0) {
message.error(`请上传专家照片`);
return;
}
const params = {
juryId,
assistList: [...dataSource],
}
setLoading(true);
saveAssistPeople(params).then(res => {
if (res?.code == 200) {
message.success('保存成功!');
onSubmit();
}
}).finally(() => {
setLoading(false);
})
} else {
message.error('外协人数不符合规定!');
}
}}
onCancel={onCancel}
>
<Spin spinning={loading}>
<div className='headerDiv pl24 pr16'>
<h3 className="first-title"></h3>
</div>
<div style={{ marginTop: '11px', marginLeft: '35px' }}>
<span style={{ color: '#b30000' }}></span>
</div>
<Collapse className='xsy-collapse' style={{ marginTop: '16px' }} defaultActiveKey={['1']}>
<Panel header={`外协人员(最大人数:${assistNumber})`} key="1">
<ProTable
key='proTable1'
columns={columnsMember}
dataSource={dataSource}
bordered
style={{ padding: '16px' }}
options={false}
search={false}
pagination={false}
toolBarRender={() => [
<Button key="button" hidden={open || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} disabled={Number(assistNumber) == dataSource.length} type="primary"
onClick={() => {
if (Number(assistNumber) != dataSource.length) {
setAdd(true); formMem.resetFields();
} else {
message.error('录入人数已满')
}
}}
> </Button>
]}
/>
</Panel>
</Collapse>
</Spin>
<Drawer
title="录入外协人员"
placement="right"
width={'50%'}
onClose={() => { setAdd(false) }}
visible={add}
getContainer={false}
style={{ position: 'absolute' }}
>
<Form {...formLayoutDrawer} form={formMem}>
<Row><Col span={24}><Form.Item
name="mobile"
label="手机号"
rules={[
{
required: true,
message: '请录入手机号',
},
{
pattern: /(^[1][3,4,5,6,7,8,9][0-9]{9}$)|(^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$)/,
message: '输入的电话号码不正确',
},
]}
>
<Input style={{ width: "60%" }} />
</Form.Item></Col></Row>
<Row><Col span={24}><Form.Item
name="name"
label="姓名"
rules={[{ required: true, message: '请录入姓名' }]}
>
<Input style={{ width: "60%" }} />
</Form.Item></Col></Row>
<Row><Col span={24}><Form.Item
name="workunit"
label="工作单位"
>
<Input style={{ width: "60%" }} />
</Form.Item></Col></Row>
<Row><Col span={24}><Form.Item
name="phone"
label="办公电话"
rules={[
{
pattern: /^\d+$|^\d+[.]?\d+$/,
message: '输入的电话号码不正确',
},
]}
>
<Input style={{ width: "60%" }} />
</Form.Item></Col></Row>
<Row><Col span={24}><Form.Item
name="certificateType"
label="证件类别"
initialValue={'1'}
>
<Select style={{ width: "60%" }} >
<Option value={'1'} title="居民身份证"></Option>
</Select>
</Form.Item></Col></Row>
<Row><Col span={24}><Form.Item
name="certificate"
label="证件号码"
rules={[
{
required: true,
message: '请录入证件号码',
},
{
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '输入的身份证号不正确',
},
]}
>
<Input style={{ width: "60%" }} />
</Form.Item></Col></Row>
<Form.Item label="照片" required style={{ marginBottom: 0 }} tooltip="若预约了电子评标室,请提前维护外协人员照片,避免无法进入电子评标室。">
<Form.Item
name="faceId"
style={{ display: 'inline-block', width: '80%' }}
rules={[{ required: true, message: "请上传照片" }]}
extra={<span style={{ color: '#b30000' }}>2psJPG格式400k以下</span>}
>
<ExpertPhotoUpload maxSize={400} uploadProps={{ accept: ".jpg,.jpeg" }} />
</Form.Item>
{/* <Form.Item
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
>
</Form.Item> */}
</Form.Item>
<Row><Col span={24}><Form.Item {...tailLayoutDrawer}>
<Button type="primary" loading={loading} hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={async () => {
setLoading(true);
let pass = true;
let formValsMem = formMem.getFieldsValue();
const dataTem = [...dataSource];
await formMem.validateFields().then(() => {
for (const item of dataTem) {
if (item.certificate == formValsMem.certificate && item.key != updateKeyMem) {//身份证号重复
pass = false;
message.error('身份证号重复');
break;
}
if (item.mobile == formValsMem.mobile && item.key != updateKeyMem) {//手机号重复
pass = false;
message.error('手机号重复');
break;
}
}
}).catch(() => {
pass = false;
});
if (pass) {
//如果 updateKey有值走修改
if (updateKeyMem != undefined && updateKeyMem != -1) {
dataTem.map((item: any, index: any) => {
if (item.key == updateKeyMem) {
dataTem[index] = { ...formValsMem, key: updateKeyMem, juryId };
}
});
setDataSource(dataTem);
} else {
if (Number(assistNumber) != dataTem.length) {
let num = 0;
if (dataTem.length != 0) {
num = dataTem[dataTem.length - 1].key + 1;
}
dataTem.push({ ...formValsMem, key: num, juryId });
setDataSource(dataTem);
} else {
message.error('录入人数已满!');
}
}
updateKeyMemSet(-1);
setAdd(false);
}
setLoading(false);
}}></Button>
</Form.Item></Col></Row>
</Form>
</Drawer>
</Modal>
</>
)
}
export default OutsourcingManage;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
.headerDiv {
// padding: 16px 24px 0px 0px;
margin-left: 0px;
width: 100%;
// border-bottom: solid;
// border-bottom-color: rgb(187,16,39);
// border-width: 1px;
height: 32px;
}
.leftDiv {
font-size: middle;
font-weight: normal;
background-color: rgb(187, 16, 39);
padding: 3px 8px;
width: 130px;
float: left;
height: 30px;
text-align: center;
}
.rightDiv {
float: right;
height: 30px;
text-align: center;
}
.mt15 {
margin-top: 15px;
}
.pl24 {
padding-left: 24px;
}
.pr16 {
padding-right: 16px;
}
.xsy-collapse {
.ant-collapse-content-box {
padding: 0px 0px 16px 0px
}
}
.eval-location-title {
&>p {
margin-bottom: 0;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
import request from '@/utils/request';
import { message } from 'antd';
//列表查询
export async function getList(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/list`, {
method: 'GET',
params,
});
}
//查询标包
export async function getSecs(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/section/list/${params.tpId}`, {
params,
});
}
//删除
export async function delOne(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/info/del/${params.id}`, {
method: 'POST'
});
}
//创建评审小组
export async function saveGroup(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/info/save`, {
method: 'POST',
data: {
...params,
},
});
}
//添加成员
export async function saveMember(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/member/save`, {
method: 'POST',
data: {
...params,
},
});
}
//更换专家
export async function changeEx(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/change/apply/save`, {
method: 'POST',
data: {
...params,
},
});
}
//更换专家重新查volist
export async function queryVoList(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/detail/${params.id}`);
}
//更换专家
export async function changeMember(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/change/member`, {
method: 'POST',
data: {
...params
}
});
}
//提交申请
export async function applyFor(params?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/extract/apply/${params.id}`, {
method: 'POST',
});
}
//查是否开启评标
export async function roomStatus(id?: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/check/roomStatus/${id}`);
}
//下载模板
export async function juryTem() {
return request(`/api/biz-service-ebtp-extend/v1/template/warehouse/juryTemp`);
};
//重置密码接口
export async function rePW(id: any) {
return request(`/api/biz-service-ebtp-rsms/v1/jury/reset/password/${id}`, { method: 'POST' });
};
//重置密码
export const rePassWord = async (id: any) => {
const hide = message.loading('正在重置');
try {
const success = await rePW(id).then(res => { return res.success });
hide();
if (success) {
message.success('重置成功');
return true;
} else {
return false;
}
} catch (error) {
hide();
message.error('重置失败请重试,或联系管理员!');
return false;
}
};
/**
* 专家账号解除锁定
* @returns
*/
export async function unlockAccount(id: any, juryId: any, projectId: any) {
return request("/api/biz-service-ebtp-rsms/v1/jury/account/debLocking", { method: 'POST', data: { id, juryId, projectId } });
};
/**
* 成员录入-获取照片
* @returns
*/
export async function getUserPhoto(idCard: any) {
return request("/api/biz-service-ebtp-rsms/v1/jury/user/photo/" + idCard, {
method: 'GET',
});
};
/**
* 协办管理-协办成员保存
* @returns
*/
export async function saveAssistPeople(data: any) {
return request("/api/biz-service-ebtp-rsms/v1/jury/assist/save", {
method: 'POST',
data
});
};
export async function getCrotchListUsingGET() {
return request("/api/biz-service-ebtp-rsms/v1/specialitydict/getCrotchList", {
method: 'GET',
});
};