Merge branch 'master' into master_jnryy_customerservice

This commit is contained in:
unknown
2022-06-22 11:03:01 +08:00
33 changed files with 462 additions and 297 deletions

View File

@ -50,10 +50,6 @@ export default [
path: '/redirect', path: '/redirect',
component: './LoadingPage', component: './LoadingPage',
}, },
{
path: '/toAuth',
component: './LoadingPage/ToAuth',
},
//跨工程跳转中间页开始 //跨工程跳转中间页开始
{ {
path: '/xunjia', path: '/xunjia',
@ -64,6 +60,16 @@ export default [
path: '/chooseRole', path: '/chooseRole',
component: './LoadingPage/MiddleLoading/chooseRole', component: './LoadingPage/MiddleLoading/chooseRole',
}, },
//寻找商机跳转
{
path: '/ToFindBusiness',
component: './LoadingPage/MiddleLoading/ToFindBusiness',
},
//项目跟进跳转
{
path: '/ToHomePage',
component: './LoadingPage/MiddleLoading/ToHomePage',
},
//跨工程跳转中间页结束 //跨工程跳转中间页结束
{ {
name: 'index_1', name: 'index_1',

View File

@ -1,19 +1,54 @@
import { getURLInformation } from '@/utils/CommonUtils'; import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
import { Result } from 'antd'; import { getSessionRoleData } from '@/utils/session';
import React from 'react'; import { Result, Typography } from 'antd';
import React, { useEffect, useState } from 'react';
import { history } from 'umi';
const message = { const message = {
401: '您的用户信息有误,请联系管理员', 401: '您的用户信息有误,请联系管理员',
402: '您的用户角色信息缺失,请联系管理员',
90401: '您的登录已超时,请重新登录', 90401: '您的登录已超时,请重新登录',
404: '系统错误,请联系管理员', 404: '系统错误,请联系管理员',
}; };
const RequestTimeoutPage: React.FC<{}> = () => { const RequestTimeoutPage: React.FC<{}> = () => {
const code: any = getURLInformation('code') == null ? '404' : getURLInformation('code'); const code: any = getURLInformation('code') == null ? '404' : getURLInformation('code');
const { Text } = Typography;
const [time, setTime] = useState<number>(10);
const roleData = getSessionRoleData();
useEffect(() => {
let timeInteval: any
if (code == 402 && isNotEmpty(roleData)) {
timeInteval = setInterval(() => { // 倒计时
setTime(n => {
if (n == 1) {
clearInterval(timeInteval)
redirect();
}
return n - 1;
})
}, 1000);
} else {
clearInterval(timeInteval);
}
return () => {
clearInterval(timeInteval);
}
}, []);
const redirect = () => {
if (isNotEmpty(roleData)) {
history.replace({
pathname: '/Dashboard',
})
}
}
return ( return (
<Result <Result
title={message[code]} title={message[code]}
extra={isNotEmpty(roleData) && code == 402 && <Text type="secondary" strong>{time}</Text>}
/> />
); );
}; };

View File

@ -760,7 +760,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
{/* 发布媒体 */} {/* 发布媒体 */}

View File

@ -713,7 +713,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
<Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}> <Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}>

View File

@ -813,7 +813,7 @@ const BiddingInvitation: React.FC<BiddingInvitation> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>

View File

@ -113,7 +113,7 @@ const Media: React.FC<MediaProps> = (props) => {
</Row> </Row>
</Checkbox.Group> </Checkbox.Group>
</Form.Item> </Form.Item>
{defId != "recruit_multi" && <Text type="secondary"></Text>} {/* {defId != "recruit_multi" && <Text type="secondary">如选择发布到【中国招标投标公共服务平台】,在发布前需填写【公共服务平台】信息</Text>} */}
</> </>
) )
} }

View File

@ -274,7 +274,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
} }
creatNotice(type, fromData).then(res => { creatNotice(type, fromData).then(res => {
if(res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改公示增加风控 if (res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改公示增加风控
const data = res?.data?.result == undefined ? [] : res?.data?.result const data = res?.data?.result == undefined ? [] : res?.data?.result
setRiskData(data) setRiskData(data)
setRiskVisible(true) setRiskVisible(true)
@ -452,7 +452,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
{/* 发布媒体 */} {/* 发布媒体 */}
@ -475,7 +475,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
{/* </Card> */} {/* </Card> */}
</Form> </Form>
{/**风控组件 */} {/**风控组件 */}
{riskVisible && <RiskPrevention {riskVisible && <RiskPrevention
modalVisible={riskVisible} modalVisible={riskVisible}
onCancel={() => { onCancel={() => {
setRiskVisible(false) setRiskVisible(false)

View File

@ -18,9 +18,9 @@ const Complete: React.FC<{}> = () => {
const columnsComplete: ProColumns<any>[] = [ const columnsComplete: ProColumns<any>[] = [
//已完成表格 //已完成表格
{ title: '项目名称', dataIndex: 'projectName', width: 200 }, { title: '项目名称', dataIndex: 'projectName', width: '35%' },
{ {
title: '费用类型', width: 100, render: (_, record) => { title: '费用类型', width: '5%', render: (_, record) => {
let val = '-'; let val = '-';
if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用
if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') {
@ -40,14 +40,14 @@ const Complete: React.FC<{}> = () => {
return val; return val;
} }
}, },
{ title: '费用内容描述', dataIndex: 'commodityDescribe' }, { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' },
{ title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime' }, { title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' },
{ title: '支付时间', dataIndex: 'paymentTime', width: 100, valueType: 'dateTime' }, { title: '支付时间', dataIndex: 'paymentTime', width: '10%', valueType: 'dateTime' },
{ title: '金额(元)', dataIndex: 'amount', width: 80 }, { title: '金额(元)', dataIndex: 'amount', width: '4%' },
{ {
title: '操作', title: '操作',
dataIndex: 'option', dataIndex: 'option',
width: 150, width: '3%',
valueType: 'option', valueType: 'option',
render: (_, record) => { render: (_, record) => {
if (record.bidInvoice == null) { if (record.bidInvoice == null) {
@ -99,6 +99,8 @@ const Complete: React.FC<{}> = () => {
getCheckboxProps: (record) => ({ getCheckboxProps: (record) => ({
disabled: record.bidInvoice == null ? false : true disabled: record.bidInvoice == null ? false : true
}), }),
columnWidth: '1px',
fixed: true,
}} }}
pagination={{ defaultPageSize: 10 }} //默认显示条数 pagination={{ defaultPageSize: 10 }} //默认显示条数
// bordered // bordered

View File

@ -30,11 +30,16 @@ const finance: React.FC<{}> = () => {
setActiveKey(key); setActiveKey(key);
} }
const columns: ProColumns<any>[] = [//未支付 const columns: ProColumns<any>[] = [//未支付
{ title: '序号', valueType: 'index', width: 60, hideInTable: true }, { title: '序号', valueType: 'index', width: 0, hideInTable: true },
{ title: '项目名称', dataIndex: 'projectName', }, { title: '项目名称', dataIndex: 'projectName', width: '25%', },
{ title: '订单号', dataIndex: 'orderNumber', width: 100, },
{ {
title: '费用类型', width: 100, render: (_, record) => { title: '订单号', dataIndex: 'orderNumber', width: '9.3%',
render: (record) => {
return <span style={{ wordBreak: 'break-all', wordWrap: 'break-word' }}>{record}</span>
}
},
{
title: '费用类型', width: '5%', render: (_, record) => {
let val = '-'; let val = '-';
if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用
if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') {
@ -54,11 +59,11 @@ const finance: React.FC<{}> = () => {
return val; return val;
} }
}, },
{ title: '费用内容描述', dataIndex: 'commodityDescribe', }, { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%', },
{ title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime', }, { title: '下单时间', dataIndex: 'createDate', width: '6%', valueType: 'dateTime', },
{ title: '金额(元)', dataIndex: 'amount', width: 100, }, { title: '金额(元)', dataIndex: 'amount', width: '4%', },
{ {
title: '状态', dataIndex: 'state', width: 80, title: '状态', dataIndex: 'state', width: '3%',
valueEnum: { valueEnum: {
"0": { text: '未支付', }, "0": { text: '未支付', },
"1": { text: '支付中', }, "1": { text: '支付中', },
@ -69,7 +74,7 @@ const finance: React.FC<{}> = () => {
}, },
}, },
{ {
title: '操作', dataIndex: 'option', width: 150, title: '操作', dataIndex: 'option', width: '5%',
valueType: 'option', valueType: 'option',
render: (_, record) => { render: (_, record) => {
return ( return (

View File

@ -22,13 +22,13 @@ const AlreadyConfirmed: React.FC<{}> = () => {
title: '项目名称', title: '项目名称',
dataIndex: 'projectName', dataIndex: 'projectName',
key: 'projectName', key: 'projectName',
width: '15%', width: '25%',
}, },
{ {
title: '订单编号', title: '订单编号',
dataIndex: 'orderNumber', dataIndex: 'orderNumber',
key: 'orderNumber', key: 'orderNumber',
width:140, width: '9.3%',
render: (record) => { render: (record) => {
return <span style={{wordBreak:'break-all',wordWrap:'break-word'}}>{record}</span> return <span style={{wordBreak:'break-all',wordWrap:'break-word'}}>{record}</span>
} }
@ -37,7 +37,7 @@ const AlreadyConfirmed: React.FC<{}> = () => {
title: '费用类别', title: '费用类别',
dataIndex: 'expensesType', dataIndex: 'expensesType',
key: 'expensesType', key: 'expensesType',
width: '10%', width: '6.1%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'1': '标书费', '1': '标书费',
@ -68,35 +68,35 @@ const AlreadyConfirmed: React.FC<{}> = () => {
title: '缴费单位', title: '缴费单位',
dataIndex: 'payerName', dataIndex: 'payerName',
key: 'payerName', key: 'payerName',
width: '12%', width: '15%',
search: false, search: false,
}, },
{ {
title: '订单金额(元)', title: '订单金额(元)',
dataIndex: 'cartAmount', dataIndex: 'cartAmount',
key: 'cartAmount', key: 'cartAmount',
width: '10%', width: '6%',
search: false, search: false,
}, },
{ {
title: '实际支付金额(元)', title: '实际支付金额(元)',
dataIndex: 'amount', dataIndex: 'amount',
key: 'amount', key: 'amount',
width: '10%', width: '5%',
search: false, search: false,
}, },
{ {
title: '付款人', title: '付款人',
dataIndex: 'payerUserName', dataIndex: 'payerUserName',
key: 'payerUserName', key: 'payerUserName',
width: '8%', width: '3.6%',
search: false, search: false,
}, },
{ {
title: '付款时间', title: '付款时间',
dataIndex: 'paymentTime', dataIndex: 'paymentTime',
key: 'paymentTime', key: 'paymentTime',
width: '10%', width: '9.5%',
valueType: 'dateTime', valueType: 'dateTime',
search: false, search: false,
}, },
@ -104,7 +104,7 @@ const AlreadyConfirmed: React.FC<{}> = () => {
title: '支付方式', title: '支付方式',
dataIndex: 'paymentMethod', dataIndex: 'paymentMethod',
key: 'paymentMethod', key: 'paymentMethod',
width: '8%', width: '5%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'0': '线上支付', '0': '线上支付',
@ -115,7 +115,7 @@ const AlreadyConfirmed: React.FC<{}> = () => {
title: '支付状态', title: '支付状态',
dataIndex: 'state', dataIndex: 'state',
key: 'state', key: 'state',
width: '10%', width: '5%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'2': '支付成功', '2': '支付成功',
@ -139,7 +139,7 @@ const AlreadyConfirmed: React.FC<{}> = () => {
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: '5%', width: '3.5%',
render: (text, record, _, action) => ( render: (text, record, _, action) => (
<a key="view" onClick={() => toView(record)} className="operation"> <a key="view" onClick={() => toView(record)} className="operation">

View File

@ -26,13 +26,13 @@ const WaitConfirmed: React.FC<{}> = () => {
title: '项目名称', title: '项目名称',
dataIndex: 'projectName', dataIndex: 'projectName',
key: 'projectName', key: 'projectName',
width: '20%', width: '25%',
}, },
{ {
title: '订单编号', title: '订单编号',
dataIndex: 'orderNumber', dataIndex: 'orderNumber',
key: 'orderNumber', key: 'orderNumber',
width: 140, width: '9.3%',
render: (record) => { render: (record) => {
return <span style={{ wordBreak: 'break-all', wordWrap: 'break-word' }}>{record}</span> return <span style={{ wordBreak: 'break-all', wordWrap: 'break-word' }}>{record}</span>
} }
@ -41,7 +41,7 @@ const WaitConfirmed: React.FC<{}> = () => {
title: '费用类别', title: '费用类别',
dataIndex: 'expensesType', dataIndex: 'expensesType',
key: 'expensesType', key: 'expensesType',
width: '10%', width: '6.1%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'1': '标书费', '1': '标书费',
@ -72,28 +72,28 @@ const WaitConfirmed: React.FC<{}> = () => {
title: '缴费单位', title: '缴费单位',
dataIndex: 'payerName', dataIndex: 'payerName',
key: 'payerName', key: 'payerName',
width: '12%', width: '15%',
search: false, search: false,
}, },
{ {
title: '订单金额(元)', title: '订单金额(元)',
dataIndex: 'cartAmount', dataIndex: 'cartAmount',
key: 'cartAmount', key: 'cartAmount',
width: '12%', width: '6.9%',
search: false, search: false,
}, },
{ {
title: '下单人', title: '下单人',
dataIndex: 'payerUserName', dataIndex: 'payerUserName',
key: 'payerUserName', key: 'payerUserName',
width: '8%', width: '3.6%',
search: false, search: false,
}, },
{ {
title: '付款时间', title: '付款时间',
dataIndex: 'paymentTime', dataIndex: 'paymentTime',
key: 'paymentTime', key: 'paymentTime',
width: '10%', width: '9.5%',
valueType: 'dateTime', valueType: 'dateTime',
search: false, search: false,
}, },
@ -101,7 +101,7 @@ const WaitConfirmed: React.FC<{}> = () => {
title: '支付方式', title: '支付方式',
dataIndex: 'paymentMethod', dataIndex: 'paymentMethod',
key: 'paymentMethod', key: 'paymentMethod',
width: '8%', width: '5%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'0': '线上支付', '0': '线上支付',
@ -112,7 +112,7 @@ const WaitConfirmed: React.FC<{}> = () => {
title: '支付状态', title: '支付状态',
dataIndex: 'state', dataIndex: 'state',
key: 'state', key: 'state',
width: '10%', width: '5%',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'0': '待支付', '0': '待支付',
@ -137,7 +137,7 @@ const WaitConfirmed: React.FC<{}> = () => {
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: '15%', width: '10%',
render: (text, record, _, action) => { render: (text, record, _, action) => {
return ( return (
<> <>

View File

@ -46,12 +46,12 @@ const Invoice: React.FC<any> = (props) => {
title: '项目名称', title: '项目名称',
dataIndex: 'projectName', dataIndex: 'projectName',
valueType: 'text', valueType: 'text',
width: '12%', width: '25%',
}, },
{ {
title: '费用名称', title: '费用名称',
dataIndex: 'commodityName', dataIndex: 'commodityName',
width: '8%', width: '6.1%',
valueType: 'text', valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
render: (_, record) => { render: (_, record) => {
@ -78,14 +78,14 @@ const Invoice: React.FC<any> = (props) => {
title: '支付单位', title: '支付单位',
valueType: 'text', valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
width: '10%', width: '15%',
dataIndex: 'payerName', dataIndex: 'payerName',
}, },
{ {
title: '支付方式', title: '支付方式',
valueType: 'text', valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%', width: '5%',
dataIndex: 'paymentMethod', dataIndex: 'paymentMethod',
valueEnum: { valueEnum: {
"0": { text: '线上', status: '' }, "0": { text: '线上', status: '' },
@ -103,7 +103,7 @@ const Invoice: React.FC<any> = (props) => {
title: '付款状态', title: '付款状态',
valueType: 'text', valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%', width: '5%',
dataIndex: 'payState', dataIndex: 'payState',
valueEnum: { valueEnum: {
"0": { text: '未支付', status: '' }, "0": { text: '未支付', status: '' },
@ -119,14 +119,14 @@ const Invoice: React.FC<any> = (props) => {
title: '金额', title: '金额',
valueType: 'money', valueType: 'money',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%', width: '4%',
dataIndex: 'amount', dataIndex: 'amount',
}, },
{ {
title: '发票状态', title: '发票状态',
valueType: 'select', valueType: 'select',
dataIndex: 'invoiceState', dataIndex: 'invoiceState',
width: '8%', width: '4.8%',
valueEnum: { valueEnum: {
"0": { text: '未开', status: '' }, "0": { text: '未开', status: '' },
"1": { text: '已开', status: '' }, "1": { text: '已开', status: '' },
@ -136,7 +136,7 @@ const Invoice: React.FC<any> = (props) => {
title: '需要邮寄', title: '需要邮寄',
valueType: 'text', valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%', width: '4.8%',
dataIndex: 'mail', dataIndex: 'mail',
valueEnum: { valueEnum: {
"0": { text: '不需要', status: '' }, "0": { text: '不需要', status: '' },
@ -147,7 +147,7 @@ const Invoice: React.FC<any> = (props) => {
title: '邮寄状态', title: '邮寄状态',
valueType: 'text', valueType: 'text',
dataIndex: 'mailState', dataIndex: 'mailState',
width: '8%', width: '4.8%',
valueEnum: { valueEnum: {
"0": { text: '未邮寄', status: '' }, "0": { text: '未邮寄', status: '' },
"1": { text: '已邮寄', status: '' }, "1": { text: '已邮寄', status: '' },
@ -158,7 +158,7 @@ const Invoice: React.FC<any> = (props) => {
dataIndex: 'type', dataIndex: 'type',
hideInSearch: true,//列表中显示,查询条件中不显示 hideInSearch: true,//列表中显示,查询条件中不显示
valueType: 'text', valueType: 'text',
width: '8%', width: '5%',
valueEnum: { valueEnum: {
"0": { text: '增值税普通发票' }, "0": { text: '增值税普通发票' },
"1": { text: '增值税专用发票' }, "1": { text: '增值税专用发票' },

View File

@ -37,7 +37,7 @@ const InvoiceSupplier: React.FC<{}> = () => {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
key: 'key', key: 'key',
width: 60, width: 50,
search: false, search: false,
}, },
{ {
@ -55,6 +55,7 @@ const InvoiceSupplier: React.FC<{}> = () => {
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
valueType: 'select', valueType: 'select',
width: 115,
valueEnum: { valueEnum: {
'0': '增值税普通发票', '0': '增值税普通发票',
'1': '增值税专用发票', '1': '增值税专用发票',
@ -65,6 +66,7 @@ const InvoiceSupplier: React.FC<{}> = () => {
title: '发票状态', title: '发票状态',
dataIndex: 'state', dataIndex: 'state',
valueType: 'select', valueType: 'select',
width: 75,
valueEnum: { valueEnum: {
'0': '未开', '0': '未开',
'1': '已开', '1': '已开',
@ -72,13 +74,14 @@ const InvoiceSupplier: React.FC<{}> = () => {
}, },
{ {
title: '是否需要邮寄', title: '是否需要邮寄',
width: 100,
render:(_: any,record: any) => record.isMail == -1 ? '无需邮寄' : '需要邮寄', render:(_: any,record: any) => record.isMail == -1 ? '无需邮寄' : '需要邮寄',
search: false, search: false,
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'option', dataIndex: 'option',
width: 80, width: 70,
valueType: 'option', valueType: 'option',
search: false, search: false,
render: (_, record) => render: (_, record) =>

View File

@ -1,6 +0,0 @@
import request from '@/utils/request';
// 获取字典信息
export async function getDictionaries(){
return request('/api/biz-service-ebtp-project/v1/dictProject/refreshDictCache');
}

View File

@ -0,0 +1,50 @@
import React, { useEffect } from 'react';
import { message, Spin } from 'antd';
import { getURLInformation, isEmpty } from '@/utils/CommonUtils';
import { history } from 'umi';
const Loading: React.FC<{}> = () => {
/**
* 寻找商机中转页
*/
useEffect(() => {
//获取必要参数
//项目编号
const number = getURLInformation('number') === null ? '' : getURLInformation('number');
//菜单类型
const type = getURLInformation('type') === null ? '' : getURLInformation('type');
if (isEmpty(type)) {
message.error('缺少必要参数,请重试');
} else {
let params = {}
isEmpty(number) ? null : params['number'] = number
if (type == 'procurement_mode_1' || type == 'procurement_mode_2') {//招标类
history.push({ pathname: '/Bid/FindBusiness', query: { ...params } });
} else if (type == 'procurement_mode_5' || type == 'procurement_mode_6') {//谈判类
history.push({ pathname: '/Negotiation/FindBusiness', query: { ...params } });
} else if (type == 'procurement_mode_4') {//招募类
history.push({ pathname: '/Recruit/FindBusiness', query: { ...params } });
} else if (type == 'procurement_mode_3') {//比选类
history.push({ pathname: '/Comparison/FindBusiness', query: { ...params } });
} else {
message.error('参数错误,请联系管理员');
}
}
}, []);
return (
<div
style={{
textAlign: 'center',
height: '100%',
background: 'rgba(0,0,0,.05)',
position: 'relative',
}}
>
<div style={{ position: 'absolute', left: '50%', top: '48%' }}>
<Spin tip="Loading..." />
</div>
</div>
);
};
export default Loading;

View File

@ -0,0 +1,59 @@
import React, { useEffect } from 'react';
import { message, Spin } from 'antd';
import { getURLInformation, isEmpty } from '@/utils/CommonUtils';
import { followUpAProjectManager, followUpAProjectSupplier, getSessionRoleData } from '@/utils/session';
import { history } from 'umi';
import { getProjectById } from '../service';
const Loading: React.FC<{}> = () => {
/**
* 项目跟进中转页
*/
//获取角色
const role = getSessionRoleData()?.roleCode;
useEffect(() => {
//获取必要参数
const projectId = getURLInformation('id') === null ? '' : getURLInformation('id');
if (isEmpty(projectId)) {
message.error('缺少必要参数,请重试');
} else {
//获取项目数据
getProjectById(projectId).then((res) => {
if (res?.code == 200 && res?.success == true) {
const data = res?.data;
if (role == "ebtp-purchase" || role == "ebtp-agency-project-manager") {//采购经理或代理
//调用存储session方法
followUpAProjectManager(data);
setTimeout(() => {
history.push('./ProjectLayout/Manager/HomePageSectionList');
}, 1000);
} else if (role == "ebtp-supplier") {//供应商
followUpAProjectSupplier(data);
setTimeout(() => {
history.push('./ProjectLayout/Supplier/HomePageSectionList');
}, 1000);
} else {
message.error("用户角色信息获取错误,请联系管理员")
}
}
});
}
}, []);
return (
<div
style={{
textAlign: 'center',
height: '100%',
background: 'rgba(0,0,0,.05)',
position: 'relative',
}}
>
<div style={{ position: 'absolute', left: '50%', top: '48%' }}>
<Spin tip="Loading..." />
</div>
</div>
);
};
export default Loading;

View File

@ -1,30 +0,0 @@
import React, { useEffect } from 'react';
import { Button, message, Spin } from 'antd';
import request from '@/utils/request';
import { JumpToOutside } from '@/utils/CommonUtils';
const Loading: React.FC<{}> = () => {
useEffect(() => {
// request('/auth/oauth/authorize', {
// method: 'get',
// params: {
// response_type: 'code',
// client_id: 'KgPEkttG',
// redirect_uri: 'http://10.242.31.158:18022/redirect?page=xunjia&pid=123&vid=456&qid=789',
// mall3_token: sessionStorage.getItem('Authorization'),
// },
// }).then(res => {
// })
}, []);
return (
<div style={{ textAlign: 'center', height: '100%', background: 'rgba(0,0,0,.05)', position: 'relative' }}>
<div style={{ position: 'absolute', left: '50%', top: '48%' }}>
<Spin tip="Loading..." />
<Button onClick={() => JumpToOutside("http://10.242.31.158:18022/redirect?page=xunjia%26pid=123%26vid=456%26qid=789")}></Button>
</div>
</div>
);
}
export default Loading;

View File

@ -1,11 +1,10 @@
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { message, Spin } from 'antd'; import { message, Spin } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getTokenByCode } from './service'; import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getDictionaries, getTokenByCode } from './service';
import { getDictionaries } from './BasDicData'; import { getTotalURLInformation, getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
import { getTotalURLInformation, getURLInformation } from '@/utils/CommonUtils';
import { refreshTokenApi } from '@/services/login'; import { refreshTokenApi } from '@/services/login';
import { getUserRefreshToken, getUserScope } from '@/utils/session'; import { getUserRefreshToken, getUserScope, setUserData } from '@/utils/session';
const Loading: React.FC<{}> = () => { const Loading: React.FC<{}> = () => {
//存字典 //存字典
async function setDict() { async function setDict() {
@ -17,7 +16,7 @@ const Loading: React.FC<{}> = () => {
}) })
} }
//用户信息错误处理方法 //用户信息错误处理方法
async function refreshUserData(userType: string,token: string, url: string,extra: any) { async function refreshUserData(userType: string, token: string, url: string, extra: any) {
const headers = { const headers = {
Authorization: token, Authorization: token,
clientId: REACT_APP_CLIENT_KEY, clientId: REACT_APP_CLIENT_KEY,
@ -32,84 +31,89 @@ const Loading: React.FC<{}> = () => {
const header = { const header = {
clientId: REACT_APP_CLIENT_KEY, clientId: REACT_APP_CLIENT_KEY,
} }
if(userType == '0') {//联通用户 if (userType == '0') {//联通用户
await cloudReloadToken('',headers) await cloudReloadToken('', headers)
await getUserData(token, url, extra, 1) await getUserData(token, url, extra, 1)
} else if(userType == '1') {//合作方 } else if (userType == '1') {//合作方
await cooperReloadToken('',headers) await cooperReloadToken('', headers)
await getUserData(token, url, extra, 1) await getUserData(token, url, extra, 1)
} else if(userType == '2') {//专家 } else if (userType == '2') {//专家
await refreshTokenApi(params,header).then(async res => { await refreshTokenApi(params, header).then(async res => {
if(res?.success == true) { if (res?.success == true) {
sessionStorage.setItem('Authorization', res?.data?.value); sessionStorage.setItem('Authorization', res?.data?.value);
await getUserData(token, url, extra, 1) await getUserData(token, url, extra, 1)
} }
}) })
} }
} }
//错误页
const error = (code: string) => {
history.replace({
pathname: '/401',
query: {
code: code
}
})
}
//跳转
const redirect = async (userData: any, url: string, extra: any) => {
const roleCode = getURLInformation('roleCode');
if (isNotEmpty(roleCode)) {
const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleCode == roleCode);
if (authIndex != -1) {
setUserData(userData, userData.authorityList[authIndex].roleCode, userData.authorityList[authIndex])//角色信息存储
} else {
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
error('402');
return;
}
} else {
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
}
await setDict();//存字典
setTimeout(() => {
history.push({
pathname: `/${url}`,
query: {
...extra
}
})
}, 2000)
}
//获取用户信息 //获取用户信息
async function getUserData(token: string, url: string,extra: any,status: number) { async function getUserData(token: string, url: string, extra: any, status: number) {
await fgetUserMsg(token).then(async res => { await fgetUserMsg(token).then(async res => {
if (res) { if (res) {
if(res?.userType == null) { if (res?.userType == null) {
history.replace({ error('401');
pathname: '/401',
query: {
code: '401'
}
})
} else { } else {
if(res?.authorityList == null || res?.authorityList?.length == 0) { if (res?.authorityList == null || res?.authorityList?.length == 0) {
if(url == 'ExamineAndApprove/Announcement' || url == 'ExamineAndApprove/ChangeTheAnnouncement' || url == 'ExamineAndApprove/Publicity' || url == 'ExamineAndApprove/InvitationLetter' || url == 'ExamineAndApprove/ExternalReference' || url == 'ExamineAndApprove/FailureAnnouncement') { if (url == 'ExamineAndApprove/Announcement' ||
url == 'ExamineAndApprove/ChangeTheAnnouncement' ||
url == 'ExamineAndApprove/Publicity' ||
url == 'ExamineAndApprove/InvitationLetter' ||
url == 'ExamineAndApprove/ExternalReference' ||
url == 'ExamineAndApprove/FailureAnnouncement') {
let newAuthority: any[] = [] let newAuthority: any[] = []
newAuthority.push({ newAuthority.push({
authorities: [null,"system:user:test","system:user:test","system:user:test","system:user:test",null,null], authorities: [null, "system:user:test", "system:user:test", "system:user:test", "system:user:test", null, null],
roleCode: "ebtp-unicom-default", roleCode: "ebtp-unicom-default",
roleId: "20004", roleId: "20004",
roleName: "联通普通用户", roleName: "联通普通用户",
roleScope: "EBTP" roleScope: "EBTP"
}) })
res.authorityList = [...newAuthority] res.authorityList = [...newAuthority];
setDict();//存字典 await redirect(res, url, extra);
res.roleIds = res.authorityList[0].roleCode;
sessionStorage.setItem('userData', JSON.stringify(res));
sessionStorage.setItem('roleAuthority', JSON.stringify([res.roleIds]));
sessionStorage.setItem('roleData', JSON.stringify(res.authorityList[0]));
setTimeout(() => {
history.push({
pathname: `/${url}`,
query: {
...extra
}
})
}, 2000)
} else { } else {
if(status == 0) { if (status == 0) {
await refreshUserData(res?.userType,token,url,extra) await refreshUserData(res?.userType, token, url, extra);
} else { } else {
history.replace({ error('401');
pathname: '/401',
query: {
code: '401'
}
})
} }
} }
} else { } else {
setDict();//存字典 await redirect(res, url, extra);
res.roleIds = res.authorityList[0].roleCode;
sessionStorage.setItem('userData', JSON.stringify(res));
sessionStorage.setItem('roleAuthority', JSON.stringify([res.roleIds]));
sessionStorage.setItem('roleData', JSON.stringify(res.authorityList[0]));
setTimeout(() => {
history.push({
pathname: `/${url}`,
query: {
...extra
}
})
}, 2000)
} }
} }
} else { } else {
@ -120,7 +124,7 @@ const Loading: React.FC<{}> = () => {
//通过code取token //通过code取token
async function getToken(code: string, data: any) { async function getToken(code: string, data: any) {
let e = '' let e = ''
if(data != null && data != undefined && data != '') { if (data != null && data != undefined && data != '') {
e = '?' + data e = '?' + data
} }
//获取当前浏览器主机部分(含端口号) //获取当前浏览器主机部分(含端口号)
@ -128,17 +132,13 @@ const Loading: React.FC<{}> = () => {
//获取协议部分 http: https: //获取协议部分 http: https:
const protocol = window.location.protocol const protocol = window.location.protocol
const grant_type = 'authorization_code'; const grant_type = 'authorization_code';
// const client_id = 'KgPEkttG';
// const client_secret = 'ae5bdb183c502355d2055b3de73300aa73cbfdf3';
// const redirect_uri = `http://10.242.31.158:18022/redirect${e}`;
const client_id = REACT_APP_CLIENT_KEY; const client_id = REACT_APP_CLIENT_KEY;
const client_secret = REACT_APP_CLIENT_SECRET; const client_secret = REACT_APP_CLIENT_SECRET;
// const redirect_uri = `${process.env.client_redirect}${e}`;
const redirect_uri = `${protocol}//${host}/redirect${e}`; const redirect_uri = `${protocol}//${host}/redirect${e}`;
let token = ''; let token = '';
await getTokenByCode({ grant_type, client_id, client_secret, redirect_uri, code }).then(res => { await getTokenByCode({ grant_type, client_id, client_secret, redirect_uri, code }).then(res => {
if (res?.success == true) { if (res?.success == true) {
sessionStorage.setItem('Authorization',res?.data?.value) sessionStorage.setItem('Authorization', res?.data?.value)
token = 'Bearer ' + res?.data?.value; token = 'Bearer ' + res?.data?.value;
} else { } else {
message.error("认证请求失败,请联系管理员") message.error("认证请求失败,请联系管理员")
@ -149,18 +149,17 @@ const Loading: React.FC<{}> = () => {
//主方法 //主方法
async function mainFc() { async function mainFc() {
const code = getURLInformation('code'); const code = getURLInformation('code');
const urlData: any = getTotalURLInformation()||{}; const urlData: any = getTotalURLInformation() || {};
// const urlData: any = {};
//形成url额外参数 //形成url额外参数
let str: string = '' let str: string = ''
let obj: any = {} let obj: any = {}
for (let key in urlData) { for (let key in urlData) {
if(key != 'code') { if (key != 'code') {
str = str + '&' + key + '=' + urlData[key] str = str + '&' + key + '=' + urlData[key]
if(key != 'page') { if (key != 'page' && key != 'roleCode') {
obj[key] = urlData[key] obj[key] = urlData[key]
} }
} }
} }
str = str.substring(1) str = str.substring(1)
//初始化token //初始化token

View File

@ -5,10 +5,10 @@ import request from '@/utils/request';
* @param params * @param params
* @returns * @returns
*/ */
export async function fgetUserMsg(params: any) { export async function fgetUserMsg(params: any) {
return request('/api/biz-service-ebtp-extend/v1/userinfo/get', { return request('/api/biz-service-ebtp-extend/v1/userinfo/get', {
method: 'GET', method: 'GET',
headers: {'Authorization': params}, headers: { 'Authorization': params },
data: params, data: params,
}); });
} }
@ -17,7 +17,7 @@ export async function fgetUserMsg(params: any) {
* @param params * @param params
* @returns * @returns
*/ */
export async function getTokenByCode(params: any) { export async function getTokenByCode(params: any) {
return request('/api/auth/oauth/token', { return request('/api/auth/oauth/token', {
method: 'POST', method: 'POST',
params: params, params: params,
@ -28,7 +28,7 @@ export async function getTokenByCode(params: any) {
* 根据询价单id查询项目数据 * 根据询价单id查询项目数据
* @param id * @param id
*/ */
export function getProjectByInquiryId(inquiryId?:any){ export function getProjectByInquiryId(inquiryId?: any) {
return request('/api/biz-service-ebtp-project/v1/projectRecord/getByInquiryId/' + inquiryId); return request('/api/biz-service-ebtp-project/v1/projectRecord/getByInquiryId/' + inquiryId);
} }
@ -36,7 +36,7 @@ export async function getTokenByCode(params: any) {
* 刷新上下文接口(云门户) * 刷新上下文接口(云门户)
* @param id * @param id
*/ */
export function cloudReloadToken(params: any,header: any) { export function cloudReloadToken(params: any, header: any) {
return request('/api/auth/reloadToken', { return request('/api/auth/reloadToken', {
method: 'POST', method: 'POST',
headers: header headers: header
@ -46,11 +46,25 @@ export async function getTokenByCode(params: any) {
* 刷新上下文接口(合作方) * 刷新上下文接口(合作方)
* @param id * @param id
*/ */
export function cooperReloadToken(params: any,header: any) { export function cooperReloadToken(params: any, header: any) {
return request('/api/auth/reloadPartnerToken', { return request('/api/auth/reloadPartnerToken', {
method: 'POST', method: 'POST',
headers: header headers: header
}); });
} }
/**
* 获取字典信息
* @returns
*/
export async function getDictionaries() {
return request('/api/biz-service-ebtp-project/v1/dictProject/refreshDictCache');
}
/**
* 根据projectId获取项目信息
* @param id
*/
export async function getProjectById(id?: any) {
return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id);
}

View File

@ -147,17 +147,17 @@ const entrust: React.FC<{}> = () => {
//委托列表 //委托列表
const columns: ProColumns<any>[] = [ const columns: ProColumns<any>[] = [
{ {
title: '序号', valueType: 'index', width: 60, title: '序号', valueType: 'index', width: 50,
// render: (text: any, record: any, index: number,) => index + (pageData.pageNo - 1) * 10 // render: (text: any, record: any, index: number,) => index + (pageData.pageNo - 1) * 10
}, },
{ title: '委托方', dataIndex: 'purchaser', width: '10%', search: false }, { title: '委托方', dataIndex: 'purchaser', width: '15%', search: false },//, ellipsis: true
{ title: '项目名称', dataIndex: 'projectName', }, { title: '项目名称', dataIndex: 'projectName', width: 400, },
{ title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false }, { title: '方案编号', dataIndex: 'projectNumber', width: '6%', search: false },
{ title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, { title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false },
{ title: '采购方式', dataIndex: 'procurementMode', width: '10%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) },
{ title: '标的类型', dataIndex: 'procurementType', width: '10%', hideInTable: typeVisible, search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, { title: '标的类型', dataIndex: 'procurementType', width: '5%', hideInTable: typeVisible, search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) },
{ {
title: '状态', dataIndex: 'status', width: '10%', title: '状态', dataIndex: 'status', width: '4%',
valueEnum: { valueEnum: {
1: { text: '已拒收', status: 'Processing' }, 1: { text: '已拒收', status: 'Processing' },
2: { text: '未接受', status: 'Warning' }, 2: { text: '未接受', status: 'Warning' },
@ -174,7 +174,7 @@ const entrust: React.FC<{}> = () => {
} }
}, },
{ {
title: '操作', width: '12%', title: '操作', width: '9%',
valueType: 'option', valueType: 'option',
render: (_, record) => { render: (_, record) => {
if (record.status === 1) { if (record.status === 1) {

View File

@ -40,15 +40,15 @@ const entrust: React.FC<{}> = () => {
//委托列表 //委托列表
const columns: ProColumns<any>[] = [ const columns: ProColumns<any>[] = [
{ title: '序号', valueType: 'index', width: 60, }, { title: '序号', valueType: 'index', width: 60, },
{ title: '委托方', dataIndex: 'purchaser', width: '10%', search: false }, { title: '委托方', dataIndex: 'purchaser', width: '15%', search: false },
{ title: '项目名称', dataIndex: 'projectName', }, { title: '项目名称', dataIndex: 'projectName', width: 400, },
{ title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false }, { title: '方案编号', dataIndex: 'projectNumber', width: '6%', search: false },
{ title: '接收时间', dataIndex: 'receiveTime', width: '10%', valueType: 'dateTime', search: false }, { title: '接收时间', dataIndex: 'receiveTime', width: '10%', valueType: 'dateTime', search: false },
{ title: '撤回时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, { title: '撤回时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false },
{ title: '采购方式', dataIndex: 'procurementMode', width: '10%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) },
{ title: '标的类型', dataIndex: 'procurementType', width: '10%', search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, { title: '标的类型', dataIndex: 'procurementType', width: '5%', search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) },
{ {
title: '操作', width: '12%', title: '操作', width: '4%',
valueType: 'option', valueType: 'option',
render: (_, record) => { render: (_, record) => {
return <Button type='text' onClick={() => recordIdSet(record.id)}></Button> return <Button type='text' onClick={() => recordIdSet(record.id)}></Button>

View File

@ -45,7 +45,8 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
{ {
title: '采购方式', title: '采购方式',
dataIndex: 'bidMethodDict', dataIndex: 'bidMethodDict',
width: '8%',
width: '7.5%',
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null , initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null ,
}, },
@ -58,7 +59,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
title: '项目编号', title: '项目编号',
dataIndex: 'ebpProjectNumber', dataIndex: 'ebpProjectNumber',
search: false, search: false,
width: '10%', width: '8%',
}, },
{ {
title: '采购人', title: '采购人',
@ -70,12 +71,12 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
title: '建档时间', title: '建档时间',
dataIndex: 'createDate', dataIndex: 'createDate',
search: false, search: false,
width: '10%', width: '9.5%',
}, },
{ {
title: '标的类型', title: '标的类型',
dataIndex: 'procurementType', dataIndex: 'procurementType',
width: '8%', width: '5%',
search: false, search: false,
valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]),
}, },
@ -83,12 +84,12 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
title: '所属区域', title: '所属区域',
dataIndex: 'regionDictName', dataIndex: 'regionDictName',
search: false, search: false,
width: '10%', width: '12%',
}, },
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: '5%',
render: (_: any, record: any) => render: (_: any, record: any) =>
( (
<> <>

View File

@ -45,7 +45,7 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
{ {
title: '采购方式', title: '采购方式',
dataIndex: 'bidMethodDict', dataIndex: 'bidMethodDict',
width: '8%', width: '5%',
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
initialValue: tabs === 'favoritesList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null, initialValue: tabs === 'favoritesList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
}, },
@ -91,12 +91,12 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
title: '建档时间', title: '建档时间',
dataIndex: 'createDate', dataIndex: 'createDate',
search: false, search: false,
width: '10%', width: '9.5%',
}, },
{ {
title: '标的类型', title: '标的类型',
dataIndex: 'procurementType', dataIndex: 'procurementType',
width: '8%', width: '5%',
search: false, search: false,
valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]),
}, },
@ -109,7 +109,7 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
{ {
title: '公开状态', title: '公开状态',
dataIndex: 'isPublic', dataIndex: 'isPublic',
width: '10%', width: '4.5%',
valueEnum: { valueEnum: {
0: { 0: {
text: <Tag color='green'></Tag> text: <Tag color='green'></Tag>
@ -123,31 +123,33 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: '4.5%',
render: (_: any, record: any) => [ render: (text: any, record: any) => {
<Button return (<>
key="followUpProject"
type="text"
onClick={() =>
followUpProject(record)
}
>
</Button>,
<Popconfirm
title="您确定要移除收藏吗?"
onConfirm={() => removeFavorites(record)}
okText="确定"
cancelText="取消"
>
<Button <Button
key="remove" key="followUpProject"
type="text" type="text"
onClick={() =>
followUpProject(record)
}
> >
</Button> </Button>
</Popconfirm>, <Popconfirm
] title="您确定要移除收藏吗?"
onConfirm={() => removeFavorites(record)}
okText="确定"
cancelText="取消"
>
<Button
key="remove"
type="text"
>
</Button>
</Popconfirm>
</>)
}
}, },
] ]
@ -260,6 +262,8 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
rowKey={"id"} rowKey={"id"}
rowSelection={{ rowSelection={{
columnWidth: '1px',
fixed: true,
selectedRowKeys: selectedRows, selectedRowKeys: selectedRows,
onChange: (_, selectedRows) => setSelectedRows(_), onChange: (_, selectedRows) => setSelectedRows(_),
}} }}

View File

@ -45,7 +45,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
{ {
title: '采购方式', title: '采购方式',
dataIndex: 'bidMethodDict', dataIndex: 'bidMethodDict',
width: '8%', width: '7%',
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
initialValue: tabs === 'projectList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null, initialValue: tabs === 'projectList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
}, },
@ -77,12 +77,12 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
title: '建档时间', title: '建档时间',
dataIndex: 'createDate', dataIndex: 'createDate',
search: false, search: false,
width: '10%', width: '9.5%',
}, },
{ {
title: '标的类型', title: '标的类型',
dataIndex: 'procurementType', dataIndex: 'procurementType',
width: '8%', width: '5%',
search: false, search: false,
valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]),
}, },
@ -95,7 +95,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
{ {
title: '公开状态', title: '公开状态',
dataIndex: 'isPublic', dataIndex: 'isPublic',
width: '10%', width: '4.5%',
valueEnum: { valueEnum: {
0: { 0: {
text: <Tag color='green'></Tag> text: <Tag color='green'></Tag>
@ -109,7 +109,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: '4.5%',
render: (_: any, record: any) => render: (_: any, record: any) =>
( (
<> <>
@ -216,6 +216,8 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
rowKey={"id"} rowKey={"id"}
rowSelection={{ rowSelection={{
columnWidth: '1px',
fixed: true,
selectedRowKeys: selectedRows, selectedRowKeys: selectedRows,
onChange: (_, selectedRows) => setSelectedRows(_), onChange: (_, selectedRows) => setSelectedRows(_),
}} }}

View File

@ -101,7 +101,7 @@ const Index: React.FC<{}> = () => {
search: proTypeCode?.length > 1 ? null : false, search: proTypeCode?.length > 1 ? null : false,
initialValue: bidMethodDict ? bidMethodDict : void 0, initialValue: bidMethodDict ? bidMethodDict : void 0,
valueEnum: proTableValueEnumOther(dictData['procurement_mode=entrust'], proTypeCode), valueEnum: proTableValueEnumOther(dictData['procurement_mode=entrust'], proTypeCode),
width: '10%', width: '7%',
render: (_: any, record: any) => { render: (_: any, record: any) => {
if (proTypeCode.indexOf("procurement_mode_4") !== -1) { if (proTypeCode.indexOf("procurement_mode_4") !== -1) {
const recruitmentMethod = getDictName(dictData[recruitmentMethodRecord], record.examinationMethodDict) const recruitmentMethod = getDictName(dictData[recruitmentMethodRecord], record.examinationMethodDict)
@ -124,7 +124,7 @@ const Index: React.FC<{}> = () => {
title: proTypeCode.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人', title: proTypeCode.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人',
dataIndex: 'tendereeOrgName', dataIndex: 'tendereeOrgName',
search: false, search: false,
width: '10%' width: '15%'
}, },
{ {
title: '代理机构', title: '代理机构',
@ -137,17 +137,17 @@ const Index: React.FC<{}> = () => {
dataIndex: 'procurementType', dataIndex: 'procurementType',
valueEnum: proTableValueEnum(dictData['procurement_type=entrust']), valueEnum: proTableValueEnum(dictData['procurement_type=entrust']),
search: false, search: false,
width: '8%' width: '5%'
}, },
{ {
title: '所属区域', title: '所属区域',
dataIndex: 'regionDictName', dataIndex: 'regionDictName',
search: false, search: false,
width: '10%' width: '15%'
}, },
{ {
title: '操作', title: '操作',
width: '15%', width: '7%',
search: false, search: false,
render: (text: any, record: any) => { render: (text: any, record: any) => {
if (MethodDict == "procurement_mode_7") { if (MethodDict == "procurement_mode_7") {
@ -156,11 +156,11 @@ const Index: React.FC<{}> = () => {
) )
} else { } else {
return ( return (
<Space> <>
<Button hidden={btnAuthority(['ebtp-supplier'])} type="text" onClick={() => saveProject(record)} danger></Button> <Button hidden={btnAuthority(['ebtp-supplier'])} type="text" onClick={() => saveProject(record)} danger></Button>
<Button hidden={btnAuthority(['ebtp-supplier'])} type="text" danger onClick={() => changePerson(record)} ></Button> <Button hidden={btnAuthority(['ebtp-supplier'])} type="text" danger onClick={() => changePerson(record)} ></Button>
<Button hidden={btnAuthority(['ebtp-supplier'])} type="text" danger onClick={() => quitProject(record.id)} >退</Button> <Button hidden={btnAuthority(['ebtp-supplier'])} type="text" danger onClick={() => quitProject(record.id)} >退</Button>
</Space> </>
) )
} }
} }
@ -182,31 +182,33 @@ const Index: React.FC<{}> = () => {
title: '采购类型', title: '采购类型',
dataIndex: 'procurementTypeDict', dataIndex: 'procurementTypeDict',
search: false, search: false,
width: '8%', width: '5%',
valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) valueEnum: proTableValueEnum(dictData['procurement_type=entrust'])
}, },
{ {
title: '采购方式', title: '采购方式',
dataIndex: 'bidMethodDict', dataIndex: 'bidMethodDict',
search: false, search: false,
width: '10%', width: '7%',
valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) valueEnum: proTableValueEnum(dictData['procurement_mode=entrust'])
}, },
{ {
title: '已报名标段名称', title: '已报名标段名称',
dataIndex: 'bidSectName', dataIndex: 'bidSectName',
width: '20%',
search: false search: false
}, },
{ {
title: '已报名标段编号', title: '已报名标段编号',
dataIndex: 'bidSectBizNum', dataIndex: 'bidSectBizNum',
width: '10%',
search: false search: false
}, },
{ {
title: '项目负责人', title: '项目负责人',
dataIndex: 'projectBidUser', dataIndex: 'projectBidUser',
search: false, search: false,
width: '10%' width: '7%'
}, },
]; ];
const dataSource = [ const dataSource = [

View File

@ -123,7 +123,7 @@ const LookingForBusinessOpportunitiesList: React.FC = () => {
title: '代理机构', title: '代理机构',
dataIndex: 'tenderAgencyName', dataIndex: 'tenderAgencyName',
search: false, search: false,
width: '10%', width: '15%',
}, },
{ {
title: '项目分类', title: '项目分类',
@ -136,12 +136,12 @@ const LookingForBusinessOpportunitiesList: React.FC = () => {
title: '所属区域', title: '所属区域',
dataIndex: 'regionDictName', dataIndex: 'regionDictName',
search: false, search: false,
width: '10%', width: '15%',
}, },
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: '15%', width: '8%',
render: (text: any, record: any, index: number) => { render: (text: any, record: any, index: number) => {
return <> return <>
<Button key="participation" hidden={btnAuthority(["ebtp-supplier"])} type="text" danger onClick={() => participation(record)}></Button> <Button key="participation" hidden={btnAuthority(["ebtp-supplier"])} type="text" danger onClick={() => participation(record)}></Button>

View File

@ -95,6 +95,8 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
} }
const docSaveBtn = "compact";//保存按钮是否展示 const docSaveBtn = "compact";//保存按钮是否展示
//项目编号
const ebpProjectNumber = getURLInformation('number');
function getBsName() { function getBsName() {
if (bidMethodDict.indexOf("procurement_mode_4") !== -1) { if (bidMethodDict.indexOf("procurement_mode_4") !== -1) {
@ -108,12 +110,14 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
useEffect(() => { useEffect(() => {
setTableLoading(true); setTableLoading(true);
if (bidMethodDict.indexOf("procurement_mode_4") > -1) { if (bidMethodDict.indexOf("procurement_mode_4") > -1) {
lookingForBussinessOther(bussinessParams).then(res => { lookingForBussinessOther(isNotEmpty(ebpProjectNumber) ? { ...bussinessParams, ebpProjectNumber } : bussinessParams).then(res => {
isNotEmpty(window.location.search) && history.push(window.location.pathname);
setTableList(res.data); setTableList(res.data);
setTableLoading(false); setTableLoading(false);
}) })
} else { } else {
lookingForBussiness(bussinessParams).then(res => { lookingForBussiness(isNotEmpty(ebpProjectNumber) ? { ...bussinessParams, ebpProjectNumber } : bussinessParams).then(res => {
isNotEmpty(window.location.search) && history.push(window.location.pathname);
setTableList(res.data); setTableList(res.data);
setTableLoading(false); setTableLoading(false);
}) })
@ -132,6 +136,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募方式' : '采购方式', title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募方式' : '采购方式',
dataIndex: 'bidMethodDict', dataIndex: 'bidMethodDict',
search: bidMethodDict?.length > 1 ? void 0 : false, search: bidMethodDict?.length > 1 ? void 0 : false,
width: '7%',
valueEnum: proTableValueEnumOther(dictData[procurementModeEntrust], bidMethodDict), valueEnum: proTableValueEnumOther(dictData[procurementModeEntrust], bidMethodDict),
render: (_: any, record: any) => { render: (_: any, record: any) => {
if (bidMethodDict.indexOf("procurement_mode_4") !== -1) { if (bidMethodDict.indexOf("procurement_mode_4") !== -1) {
@ -154,16 +159,18 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人', title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人',
dataIndex: 'tendereeOrgName', dataIndex: 'tendereeOrgName',
search: false, search: false,
width: '15%'
}, },
{ {
title: '代理机构', title: '代理机构',
dataIndex: 'tenderAgencyName', dataIndex: 'tenderAgencyName',
search: false, search: false,
width: '15%'
}, },
{ {
title: '项目分类', title: '项目分类',
dataIndex: 'procurementType', dataIndex: 'procurementType',
width: 80, width: '5%',
valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]),
search: false, search: false,
}, },
@ -171,11 +178,12 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
title: '所属区域', title: '所属区域',
dataIndex: 'regionDictName', dataIndex: 'regionDictName',
search: false, search: false,
width: '15%'
}, },
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: '7%',
render: (text: any, record: any, index: number) => { render: (text: any, record: any, index: number) => {
return <> return <>
<Button key="participation" hidden={btnAuthority(["ebtp-supplier"])} type="text" danger onClick={() => participation(record)}></Button> <Button key="participation" hidden={btnAuthority(["ebtp-supplier"])} type="text" danger onClick={() => participation(record)}></Button>

View File

@ -778,7 +778,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
{/* 发布媒体 */} {/* 发布媒体 */}
<Medias <Medias

View File

@ -649,7 +649,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
<Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}> <Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}>

View File

@ -519,7 +519,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
{/* 发布媒体 */} {/* 发布媒体 */}
<Medias <Medias

View File

@ -477,7 +477,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
<Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}> <Collapse defaultActiveKey={["1", "2"]} ghost expandIcon={() => <BarsOutlined />}>

View File

@ -37,7 +37,7 @@ const layout = {
var objDeepCopy = function (source: any) { var objDeepCopy = function (source: any) {
var sourceCopy = source instanceof Array ? [] : {}; var sourceCopy = source instanceof Array ? [] : {};
for (var item in source) { for (var item in source) {
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item]; sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
} }
return sourceCopy; return sourceCopy;
} }
@ -83,18 +83,18 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
dataIndex: 'rooms', dataIndex: 'rooms',
render: (text: any, record: any) => { render: (text: any, record: any) => {
let defaultValue: any = [] let defaultValue: any = []
record.rooms.map((item: any)=>{ record.rooms.map((item: any) => {
if(item.select == 1){ if (item.select == 1) {
defaultValue.push(record.bsId+'&'+item.assessRoomId+'-'+item.assessRoomSort) defaultValue.push(record.bsId + '&' + item.assessRoomId + '-' + item.assessRoomSort)
} }
}) })
return ( return (
<> <>
<Checkbox.Group <Checkbox.Group
disabled={editInformation} disabled={editInformation}
options={record.rooms} options={record.rooms}
value={defaultValue} value={defaultValue}
onChange={(e) => { onCheckChange(e, record) }} onChange={(e) => { onCheckChange(e, record) }}
/> />
</> </>
) )
@ -159,7 +159,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
val.value = item.bsId + '&' + val.assessRoomId + '-' + val.assessRoomSort val.value = item.bsId + '&' + val.assessRoomId + '-' + val.assessRoomSort
val.label = '轮次' + val.assessRoomSort val.label = '轮次' + val.assessRoomSort
val.select = 1 val.select = 1
bags+=1 bags += 1
}) })
}) })
setRoundsTotal(bags) // 轮次数量 setRoundsTotal(bags) // 轮次数量
@ -192,19 +192,19 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
const data = res.data const data = res.data
setBagsTotal(data?.sections.length) // 包数量 setBagsTotal(data?.sections.length) // 包数量
let bags: any = 0 let bags: any = 0
data?.sections.map((item: any)=>{ data?.sections.map((item: any) => {
item.rooms.map((val: any)=>{ item.rooms.map((val: any) => {
bags+=1 bags += 1
}) })
}) })
setRoundsTotal(bags) // 轮次数量 setRoundsTotal(bags) // 轮次数量
editVal.map((item: any)=>{ editVal.map((item: any) => {
data?.sections.map((val: any)=>{ data?.sections.map((val: any) => {
if(item.bsId == val.bsId){ if (item.bsId == val.bsId) {
item.bag = 1 item.bag = 1
item.rooms.map((val1: any)=>{ item.rooms.map((val1: any) => {
val.rooms.map((val2: any)=>{ val.rooms.map((val2: any) => {
if(val1.assessRoomSort == val2.assessRoomSort){ if (val1.assessRoomSort == val2.assessRoomSort) {
val1.select = 1 val1.select = 1
} }
}) })
@ -232,12 +232,12 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
const roundsOk = () => { // 选中标段轮次确定 const roundsOk = () => { // 选中标段轮次确定
let bags: any = 0 let bags: any = 0
let rounds: any = 0 let rounds: any = 0
columnsData.map((item: any)=>{ columnsData.map((item: any) => {
if(item.bag && item.bag == 1 && item.rooms.length > 0){ if (item.bag && item.bag == 1 && item.rooms.length > 0) {
bags+=1 bags += 1
item.rooms.map((val: any)=>{ item.rooms.map((val: any) => {
if(val.select == 1){ if (val.select == 1) {
rounds+=1 rounds += 1
} }
}) })
} }
@ -245,10 +245,10 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
setOldColumnsData(objDeepCopy(columnsData)) setOldColumnsData(objDeepCopy(columnsData))
setBagsTotal(bags) setBagsTotal(bags)
setRoundsTotal(rounds) setRoundsTotal(rounds)
if(bags != 0 && rounds != 0){ if (bags != 0 && rounds != 0) {
form.setFieldsValue({"sectionIds": '已选'+bags+'个包,'+rounds+'轮'}) form.setFieldsValue({ "sectionIds": '已选' + bags + '个包,' + rounds + '轮' })
} else { } else {
form.setFieldsValue({"sectionIds": ''}) form.setFieldsValue({ "sectionIds": '' })
} }
setRoundsVisible(false) setRoundsVisible(false)
} }
@ -266,7 +266,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
columnsData.map((item: any) => { columnsData.map((item: any) => {
if (item.bsId == record.bsId) { if (item.bsId == record.bsId) {
item.rooms.map((val1: any) => { item.rooms.map((val1: any) => {
if(e.length > 0){ if (e.length > 0) {
item.bag = 1 item.bag = 1
val1.select = 0 val1.select = 0
e.map((val: any) => { e.map((val: any) => {
@ -309,7 +309,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
} }
setSping(true); setSping(true);
creatNotice(type, fromData).then(res => { creatNotice(type, fromData).then(res => {
if(res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改招募公示增加风控 if (res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改招募公示增加风控
const data = res?.data?.result == undefined ? [] : res?.data?.result const data = res?.data?.result == undefined ? [] : res?.data?.result
setRiskData(data) setRiskData(data)
setRiskVisible(true) setRiskVisible(true)
@ -449,7 +449,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
]} ]}
> >
{ {
bagsTotal > 0 ? <Input value={'已选'+bagsTotal+'个包,'+roundsTotal+'轮'} style={{ width: '70%' }} disabled /> : <Input style={{ width: '70%' }} disabled /> bagsTotal > 0 ? <Input value={'已选' + bagsTotal + '个包,' + roundsTotal + '轮'} style={{ width: '70%' }} disabled /> : <Input style={{ width: '70%' }} disabled />
} }
<Button type="primary" style={{ float: 'right' }} onClick={() => chooseRounds()}></Button> <Button type="primary" style={{ float: 'right' }} onClick={() => chooseRounds()}></Button>
</Form.Item> </Form.Item>
@ -458,7 +458,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
name="attDatasetId" name="attDatasetId"
extra="单个附件最大30MB" extra="单个附件最大30MB"
> >
{UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} bid={UploadID} /> : null} {UploadID != "empty" ? <ExtendUpload uploadProps={UploadProps} maxCount={3} bid={UploadID} /> : null}
</Form.Item> </Form.Item>
{/* 发布媒体 */} {/* 发布媒体 */}
<Medias <Medias
@ -474,7 +474,7 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
<BraftText braftRef={braftRef} echo={echo} disabled={editInformation} /> <BraftText braftRef={braftRef} echo={echo} disabled={editInformation} />
</Form> </Form>
{/**风控组件 */} {/**风控组件 */}
{riskVisible && <RiskPrevention {riskVisible && <RiskPrevention
modalVisible={riskVisible} modalVisible={riskVisible}
onCancel={() => { onCancel={() => {
setRiskVisible(false) setRiskVisible(false)
@ -497,10 +497,10 @@ const BidPublicityResults: React.FC<BiddingAnnouncementProps> = (props) => {
style={{ maxHeight: modalHeight }} style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }} bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
footer={[ footer={[
editInformation ? editInformation ?
<Button onClick={()=> setRoundsVisible(false)}></Button> : <Button onClick={() => setRoundsVisible(false)}></Button> :
<><Button onClick={chooseCancel}></Button>, <><Button onClick={chooseCancel}></Button>,
<Button onClick={roundsOk} type="primary"></Button></> <Button onClick={roundsOk} type="primary"></Button></>
]} ]}
centered centered
width={800} width={800}

View File

@ -160,7 +160,7 @@ export function getUserToken() {
/** /**
* 获取session userRefreshToken * 获取session userRefreshToken
*/ */
export function getUserRefreshToken() { export function getUserRefreshToken() {
let userRefreshToken: any | null = sessionStorage.getItem('refreshToken'); let userRefreshToken: any | null = sessionStorage.getItem('refreshToken');
return userRefreshToken; return userRefreshToken;
} }
@ -168,7 +168,7 @@ export function getUserToken() {
/** /**
* 获取session userScope * 获取session userScope
*/ */
export function getUserScope() { export function getUserScope() {
let userScope: any | null = sessionStorage.getItem('scope'); let userScope: any | null = sessionStorage.getItem('scope');
return userScope; return userScope;
} }
@ -246,7 +246,7 @@ export async function jurySaveInfo(record: any) {
})); }));
sessionStorage.setItem('roomId', record.id); sessionStorage.setItem('roomId', record.id);
sessionStorage.setItem("groupId", record.chatGroupId) sessionStorage.setItem("groupId", record.chatGroupId)
sessionStorage.setItem("expertGroupId",record.expertChatGroupId) sessionStorage.setItem("expertGroupId", record.expertChatGroupId)
await getQuotationMethodById(record.id) await getQuotationMethodById(record.id)
} }
@ -270,7 +270,7 @@ export interface projectDataItem {
isIPassFile?: string isIPassFile?: string
projectName?: string projectName?: string
openTenderForm?: string openTenderForm?: string
returnURL?:string returnURL?: string
} }
/** /**
@ -301,7 +301,7 @@ export function followUpAProjectManager(projectData: projectDataItem): Promise<b
export function followUpAProjectSupplier(projectData: projectDataItem): Promise<boolean> { export function followUpAProjectSupplier(projectData: projectDataItem): Promise<boolean> {
removePurchaseCanOperate(); removePurchaseCanOperate();
return new Promise<boolean>(resolve => { return new Promise<boolean>(resolve => {
if(projectData?.id == undefined || projectData?.id == null) { if (projectData?.id == undefined || projectData?.id == null) {
message.error("项目数据错误,无法获取流程,请联系管理员") message.error("项目数据错误,无法获取流程,请联系管理员")
} else { } else {
getDefById(projectData?.id).then((res) => { getDefById(projectData?.id).then((res) => {
@ -358,21 +358,21 @@ export function getPurchaseCanOperate() {
/** /**
* 设置session roleAuthority * 设置session roleAuthority
*/ */
export function setPurchaseCanOperate() { export function setPurchaseCanOperate() {
sessionStorage.setItem('purchaseCanOperate', '1'); sessionStorage.setItem('purchaseCanOperate', '1');
} }
/** /**
* 删除session roleAuthority * 删除session roleAuthority
*/ */
export function removePurchaseCanOperate() { export function removePurchaseCanOperate() {
sessionStorage.removeItem('purchaseCanOperate'); sessionStorage.removeItem('purchaseCanOperate');
} }
/** /**
* 获取returnURL * 获取returnURL
* @returns * @returns
*/ */
export function getReturnURL () { export function getReturnURL() {
let returnURL = sessionStorage.getItem('returnURL'); let returnURL = sessionStorage.getItem('returnURL');
return returnURL === null ? "" : returnURL; return returnURL === null ? "" : returnURL;
} }
@ -381,7 +381,7 @@ export function getReturnURL () {
* 获取getRoomReturnURL * 获取getRoomReturnURL
* @returns * @returns
*/ */
export function getRoomReturnURL () { export function getRoomReturnURL() {
let roomReturnURL = sessionStorage.getItem('roomReturnURL'); let roomReturnURL = sessionStorage.getItem('roomReturnURL');
return roomReturnURL === null ? "" : roomReturnURL; return roomReturnURL === null ? "" : roomReturnURL;
} }
@ -390,7 +390,7 @@ export function getReturnURL () {
* 获取当前评审室对应标段的报价类型(只能在评审室内使用) * 获取当前评审室对应标段的报价类型(只能在评审室内使用)
* @returns * @returns
*/ */
export function getSectionQuot () { export function getSectionQuot() {
let returnURL = sessionStorage.getItem('sectionQuot'); let returnURL = sessionStorage.getItem('sectionQuot');
return returnURL === null ? "0" : returnURL; return returnURL === null ? "0" : returnURL;
} }
@ -401,15 +401,15 @@ export function getReturnURL () {
* @returns 1-%(优惠率,折扣率) 0-元(总价,单价) * @returns 1-%(优惠率,折扣率) 0-元(总价,单价)
*/ */
export async function getQuotationMethodById(roomId: any) { export async function getQuotationMethodById(roomId: any) {
if(roomId == undefined || roomId == '' || roomId == null) { if (roomId == undefined || roomId == '' || roomId == null) {
message.error('参数缺失') message.error('参数缺失')
return return
} else { } else {
await getRoomDataById(roomId).then(async res => { await getRoomDataById(roomId).then(async res => {
if(res?.code == 200 && res?.success == true) { if (res?.code == 200 && res?.success == true) {
let roomData = res?.data let roomData = res?.data
await getSectionDataById(roomData?.sectionId).then(response => { await getSectionDataById(roomData?.sectionId).then(response => {
if(response?.code == 200 && response?.success == true) { if (response?.code == 200 && response?.success == true) {
let quotationMethodDict = response?.data?.quotationMethodDict let quotationMethodDict = response?.data?.quotationMethodDict
let result = (quotationMethodDict == "quotation_method_2" || quotationMethodDict == "quotation_method_3") ? "1" : "0" let result = (quotationMethodDict == "quotation_method_2" || quotationMethodDict == "quotation_method_3") ? "1" : "0"
sessionStorage.setItem("sectionQuot", result)//roomType存入session sessionStorage.setItem("sectionQuot", result)//roomType存入session
@ -419,3 +419,14 @@ export async function getQuotationMethodById(roomId: any) {
}) })
} }
} }
/**
* 存储角色信息
* @param {总数据} userData
* @param {权限} role
* @param {当前角色} roleData
*/
export function setUserData(userData: any, role: string, roleData: any): void {
sessionStorage.setItem('userData', JSON.stringify(userData));
sessionStorage.setItem('roleAuthority', JSON.stringify([role]));
sessionStorage.setItem('roleData', JSON.stringify(roleData));
}