From d6be967de7e1abcd3e9cda9966e6132753e26265 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Thu, 5 May 2022 14:42:13 +0800 Subject: [PATCH 1/7] =?UTF-8?q?5.5=20=E5=85=AC=E5=91=8A=E5=85=AC=E7=A4=BA?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=A4=A7=E5=B0=8F=E5=92=8C=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BiddingAnnouncement.tsx | 2 +- .../components/BiddingAnnouncement4Change.tsx | 2 +- .../components/BiddingInvitation.tsx | 2 +- .../components/BidPublicityResults.tsx | 6 +- .../components/BiddingAnnouncement.tsx | 2 +- .../components/BiddingAnnouncement4Change.tsx | 2 +- .../components/BiddingAnnouncement.tsx | 2 +- .../components/BiddingAnnouncement4Change.tsx | 2 +- .../components/BidPublicityResults.tsx | 70 +++++++++---------- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx index a998615..1e176ff 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx @@ -760,7 +760,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx index a9c4eb6..b57bddc 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingAnnouncement4Change.tsx @@ -713,7 +713,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} }> diff --git a/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx b/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx index 2d80e39..785150a 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/BiddingInvitation.tsx @@ -813,7 +813,7 @@ const BiddingInvitation: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} diff --git a/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx b/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx index 4929ab5..0927e04 100644 --- a/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx +++ b/src/pages/Calibration/BidPublicityResult/components/BidPublicityResults.tsx @@ -274,7 +274,7 @@ const BidPublicityResults: React.FC = (props) => { } 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 setRiskData(data) setRiskVisible(true) @@ -452,7 +452,7 @@ const BidPublicityResults: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} @@ -475,7 +475,7 @@ const BidPublicityResults: React.FC = (props) => { {/* */} {/**风控组件 */} - {riskVisible && { setRiskVisible(false) diff --git a/src/pages/ZYuShen/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx b/src/pages/ZYuShen/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx index f9194bf..f76150a 100644 --- a/src/pages/ZYuShen/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx +++ b/src/pages/ZYuShen/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx @@ -778,7 +778,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} }> diff --git a/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx b/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx index ebe7b0e..bd9e780 100644 --- a/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx +++ b/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/components/BiddingAnnouncement.tsx @@ -519,7 +519,7 @@ const BiddingAnnouncement: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} }> diff --git a/src/pages/ZZhaoMu/Calibration/BidPublicityResult/components/BidPublicityResults.tsx b/src/pages/ZZhaoMu/Calibration/BidPublicityResult/components/BidPublicityResults.tsx index b0c2ba4..2aa5112 100644 --- a/src/pages/ZZhaoMu/Calibration/BidPublicityResult/components/BidPublicityResults.tsx +++ b/src/pages/ZZhaoMu/Calibration/BidPublicityResult/components/BidPublicityResults.tsx @@ -37,7 +37,7 @@ const layout = { var objDeepCopy = function (source: any) { var sourceCopy = source instanceof Array ? [] : {}; 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; } @@ -83,18 +83,18 @@ const BidPublicityResults: React.FC = (props) => { dataIndex: 'rooms', render: (text: any, record: any) => { let defaultValue: any = [] - record.rooms.map((item: any)=>{ - if(item.select == 1){ - defaultValue.push(record.bsId+'&'+item.assessRoomId+'-'+item.assessRoomSort) + record.rooms.map((item: any) => { + if (item.select == 1) { + defaultValue.push(record.bsId + '&' + item.assessRoomId + '-' + item.assessRoomSort) } }) return ( <> - { onCheckChange(e, record) }} + value={defaultValue} + onChange={(e) => { onCheckChange(e, record) }} /> ) @@ -159,7 +159,7 @@ const BidPublicityResults: React.FC = (props) => { val.value = item.bsId + '&' + val.assessRoomId + '-' + val.assessRoomSort val.label = '轮次' + val.assessRoomSort val.select = 1 - bags+=1 + bags += 1 }) }) setRoundsTotal(bags) // 轮次数量 @@ -192,19 +192,19 @@ const BidPublicityResults: React.FC = (props) => { const data = res.data setBagsTotal(data?.sections.length) // 包数量 let bags: any = 0 - data?.sections.map((item: any)=>{ - item.rooms.map((val: any)=>{ - bags+=1 + data?.sections.map((item: any) => { + item.rooms.map((val: any) => { + bags += 1 }) }) setRoundsTotal(bags) // 轮次数量 - editVal.map((item: any)=>{ - data?.sections.map((val: any)=>{ - if(item.bsId == val.bsId){ + editVal.map((item: any) => { + data?.sections.map((val: any) => { + if (item.bsId == val.bsId) { item.bag = 1 - item.rooms.map((val1: any)=>{ - val.rooms.map((val2: any)=>{ - if(val1.assessRoomSort == val2.assessRoomSort){ + item.rooms.map((val1: any) => { + val.rooms.map((val2: any) => { + if (val1.assessRoomSort == val2.assessRoomSort) { val1.select = 1 } }) @@ -232,12 +232,12 @@ const BidPublicityResults: React.FC = (props) => { const roundsOk = () => { // 选中标段轮次确定 let bags: any = 0 let rounds: any = 0 - columnsData.map((item: any)=>{ - if(item.bag && item.bag == 1 && item.rooms.length > 0){ - bags+=1 - item.rooms.map((val: any)=>{ - if(val.select == 1){ - rounds+=1 + columnsData.map((item: any) => { + if (item.bag && item.bag == 1 && item.rooms.length > 0) { + bags += 1 + item.rooms.map((val: any) => { + if (val.select == 1) { + rounds += 1 } }) } @@ -245,10 +245,10 @@ const BidPublicityResults: React.FC = (props) => { setOldColumnsData(objDeepCopy(columnsData)) setBagsTotal(bags) setRoundsTotal(rounds) - if(bags != 0 && rounds != 0){ - form.setFieldsValue({"sectionIds": '已选'+bags+'个包,'+rounds+'轮'}) + if (bags != 0 && rounds != 0) { + form.setFieldsValue({ "sectionIds": '已选' + bags + '个包,' + rounds + '轮' }) } else { - form.setFieldsValue({"sectionIds": ''}) + form.setFieldsValue({ "sectionIds": '' }) } setRoundsVisible(false) } @@ -266,7 +266,7 @@ const BidPublicityResults: React.FC = (props) => { columnsData.map((item: any) => { if (item.bsId == record.bsId) { item.rooms.map((val1: any) => { - if(e.length > 0){ + if (e.length > 0) { item.bag = 1 val1.select = 0 e.map((val: any) => { @@ -309,7 +309,7 @@ const BidPublicityResults: React.FC = (props) => { } setSping(true); 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 setRiskData(data) setRiskVisible(true) @@ -449,7 +449,7 @@ const BidPublicityResults: React.FC = (props) => { ]} > { - bagsTotal > 0 ? : + bagsTotal > 0 ? : } @@ -458,7 +458,7 @@ const BidPublicityResults: React.FC = (props) => { name="attDatasetId" extra="单个附件最大30MB" > - {UploadID != "empty" ? : null} + {UploadID != "empty" ? : null} {/* 发布媒体 */} = (props) => { {/**风控组件 */} - {riskVisible && { setRiskVisible(false) @@ -497,10 +497,10 @@ const BidPublicityResults: React.FC = (props) => { style={{ maxHeight: modalHeight }} bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }} footer={[ - editInformation ? - : - <>, - + editInformation ? + : + <>, + ]} centered width={800} From 60c6c254c4791b5bff2ac42270352133e6408da5 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Tue, 17 May 2022 16:48:28 +0800 Subject: [PATCH 2/7] =?UTF-8?q?5.17=20=E5=A2=9E=E5=8A=A0=E5=AF=BB=E6=89=BE?= =?UTF-8?q?=E5=95=86=E6=9C=BA=E4=B8=AD=E9=97=B4=E9=A1=B5=E5=92=8C=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E9=A1=B9=E7=9B=AE=E8=B7=9F=E8=BF=9B=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router_transfer.ts | 4 - src/pages/401.tsx | 43 +++++- src/pages/LoadingPage/BasDicData.ts | 6 - .../MiddleLoading/ToFindBusiness.tsx | 50 +++++++ .../LoadingPage/MiddleLoading/ToHomePage.tsx | 59 ++++++++ src/pages/LoadingPage/ToAuth/index.tsx | 30 ---- src/pages/LoadingPage/index.tsx | 137 +++++++++--------- src/pages/LoadingPage/service.ts | 26 +++- .../LookingForBusinessOpportunitiesList.tsx | 8 +- src/utils/session.ts | 37 +++-- 10 files changed, 266 insertions(+), 134 deletions(-) delete mode 100644 src/pages/LoadingPage/BasDicData.ts create mode 100644 src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx create mode 100644 src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx delete mode 100644 src/pages/LoadingPage/ToAuth/index.tsx diff --git a/config/router_transfer.ts b/config/router_transfer.ts index cb935d6..b6877fc 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -50,10 +50,6 @@ export default [ path: '/redirect', component: './LoadingPage', }, - { - path: '/toAuth', - component: './LoadingPage/ToAuth', - }, //跨工程跳转中间页开始 { path: '/xunjia', diff --git a/src/pages/401.tsx b/src/pages/401.tsx index 88abc40..dd7dbb4 100644 --- a/src/pages/401.tsx +++ b/src/pages/401.tsx @@ -1,19 +1,54 @@ -import { getURLInformation } from '@/utils/CommonUtils'; -import { Result } from 'antd'; -import React from 'react'; +import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; +import { getSessionRoleData } from '@/utils/session'; +import { Result, Typography } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { history } from 'umi'; const message = { 401: '您的用户信息有误,请联系管理员', + 402: '您的用户角色信息缺失,请联系管理员', 90401: '您的登录已超时,请重新登录', 404: '系统错误,请联系管理员', }; const RequestTimeoutPage: React.FC<{}> = () => { const code: any = getURLInformation('code') == null ? '404' : getURLInformation('code'); - + const { Text } = Typography; + const [time, setTime] = useState(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 ( {time}秒后进入默认角色} /> ); }; diff --git a/src/pages/LoadingPage/BasDicData.ts b/src/pages/LoadingPage/BasDicData.ts deleted file mode 100644 index 3269d8c..0000000 --- a/src/pages/LoadingPage/BasDicData.ts +++ /dev/null @@ -1,6 +0,0 @@ -import request from '@/utils/request'; - -// 获取字典信息 -export async function getDictionaries(){ - return request('/api/biz-service-ebtp-project/v1/dictProject/refreshDictCache'); -} \ No newline at end of file diff --git a/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx new file mode 100644 index 0000000..3321d21 --- /dev/null +++ b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx @@ -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('ebpProjectNumber') === null ? '' : getURLInformation('ebpProjectNumber'); + //菜单类型 + 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 ( +
+
+ +
+
+ ); +}; +export default Loading; diff --git a/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx b/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx new file mode 100644 index 0000000..208e832 --- /dev/null +++ b/src/pages/LoadingPage/MiddleLoading/ToHomePage.tsx @@ -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 ( +
+
+ +
+
+ ); +}; +export default Loading; diff --git a/src/pages/LoadingPage/ToAuth/index.tsx b/src/pages/LoadingPage/ToAuth/index.tsx deleted file mode 100644 index 8f2aff8..0000000 --- a/src/pages/LoadingPage/ToAuth/index.tsx +++ /dev/null @@ -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 ( -
-
- - -
-
- ); -} -export default Loading; \ No newline at end of file diff --git a/src/pages/LoadingPage/index.tsx b/src/pages/LoadingPage/index.tsx index 32b668c..a963091 100644 --- a/src/pages/LoadingPage/index.tsx +++ b/src/pages/LoadingPage/index.tsx @@ -1,11 +1,10 @@ import React, { useEffect } from 'react'; import { message, Spin } from 'antd'; import { history } from 'umi'; -import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getTokenByCode } from './service'; -import { getDictionaries } from './BasDicData'; -import { getTotalURLInformation, getURLInformation } from '@/utils/CommonUtils'; +import { cloudReloadToken, cooperReloadToken, fgetUserMsg, getDictionaries, getTokenByCode } from './service'; +import { getTotalURLInformation, getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; import { refreshTokenApi } from '@/services/login'; -import { getUserRefreshToken, getUserScope } from '@/utils/session'; +import { getUserRefreshToken, getUserScope, setUserData } from '@/utils/session'; const Loading: React.FC<{}> = () => { //存字典 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 = { Authorization: token, clientId: REACT_APP_CLIENT_KEY, @@ -32,84 +31,89 @@ const Loading: React.FC<{}> = () => { const header = { clientId: REACT_APP_CLIENT_KEY, } - if(userType == '0') {//联通用户 - await cloudReloadToken('',headers) + if (userType == '0') {//联通用户 + await cloudReloadToken('', headers) await getUserData(token, url, extra, 1) - } else if(userType == '1') {//合作方 - await cooperReloadToken('',headers) + } else if (userType == '1') {//合作方 + await cooperReloadToken('', headers) await getUserData(token, url, extra, 1) - } else if(userType == '2') {//专家 - await refreshTokenApi(params,header).then(async res => { - if(res?.success == true) { + } else if (userType == '2') {//专家 + await refreshTokenApi(params, header).then(async res => { + if (res?.success == true) { sessionStorage.setItem('Authorization', res?.data?.value); 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 roleId = getURLInformation('roleId'); + if (isNotEmpty(roleId)) { + const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleId == roleId); + 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 => { if (res) { - if(res?.userType == null) { - history.replace({ - pathname: '/401', - query: { - code: '401' - } - }) + if (res?.userType == null) { + error('401'); } else { - 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 (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') { let newAuthority: any[] = [] 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", roleId: "20004", roleName: "联通普通用户", roleScope: "EBTP" }) - res.authorityList = [...newAuthority] - setDict();//存字典 - 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) + res.authorityList = [...newAuthority]; + await redirect(res, url, extra); } else { - if(status == 0) { - await refreshUserData(res?.userType,token,url,extra) + if (status == 0) { + await refreshUserData(res?.userType, token, url, extra); } else { - history.replace({ - pathname: '/401', - query: { - code: '401' - } - }) + error('401'); } } } else { - setDict();//存字典 - 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) + await redirect(res, url, extra); } } } else { @@ -120,7 +124,7 @@ const Loading: React.FC<{}> = () => { //通过code取token async function getToken(code: string, data: any) { let e = '' - if(data != null && data != undefined && data != '') { + if (data != null && data != undefined && data != '') { e = '?' + data } //获取当前浏览器主机部分(含端口号) @@ -128,17 +132,13 @@ const Loading: React.FC<{}> = () => { //获取协议部分 http: https: const protocol = window.location.protocol 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_secret = REACT_APP_CLIENT_SECRET; - // const redirect_uri = `${process.env.client_redirect}${e}`; const redirect_uri = `${protocol}//${host}/redirect${e}`; let token = ''; await getTokenByCode({ grant_type, client_id, client_secret, redirect_uri, code }).then(res => { if (res?.success == true) { - sessionStorage.setItem('Authorization',res?.data?.value) + sessionStorage.setItem('Authorization', res?.data?.value) token = 'Bearer ' + res?.data?.value; } else { message.error("认证请求失败,请联系管理员") @@ -149,18 +149,17 @@ const Loading: React.FC<{}> = () => { //主方法 async function mainFc() { const code = getURLInformation('code'); - const urlData: any = getTotalURLInformation()||{}; - // const urlData: any = {}; + const urlData: any = getTotalURLInformation() || {}; //形成url额外参数 let str: string = '' let obj: any = {} for (let key in urlData) { - if(key != 'code') { + if (key != 'code') { str = str + '&' + key + '=' + urlData[key] - if(key != 'page') { + if (key != 'page' && key != 'roleId') { obj[key] = urlData[key] } - } + } } str = str.substring(1) //初始化token diff --git a/src/pages/LoadingPage/service.ts b/src/pages/LoadingPage/service.ts index b2b9a37..84a3e2a 100644 --- a/src/pages/LoadingPage/service.ts +++ b/src/pages/LoadingPage/service.ts @@ -5,10 +5,10 @@ import request from '@/utils/request'; * @param params * @returns */ -export async function fgetUserMsg(params: any) { +export async function fgetUserMsg(params: any) { return request('/api/biz-service-ebtp-extend/v1/userinfo/get', { method: 'GET', - headers: {'Authorization': params}, + headers: { 'Authorization': params }, data: params, }); } @@ -17,7 +17,7 @@ export async function fgetUserMsg(params: any) { * @param params * @returns */ -export async function getTokenByCode(params: any) { +export async function getTokenByCode(params: any) { return request('/api/auth/oauth/token', { method: 'POST', params: params, @@ -28,7 +28,7 @@ export async function getTokenByCode(params: any) { * 根据询价单id查询项目数据 * @param id */ - export function getProjectByInquiryId(inquiryId?:any){ +export function getProjectByInquiryId(inquiryId?: any) { return request('/api/biz-service-ebtp-project/v1/projectRecord/getByInquiryId/' + inquiryId); } @@ -36,7 +36,7 @@ export async function getTokenByCode(params: any) { * 刷新上下文接口(云门户) * @param id */ - export function cloudReloadToken(params: any,header: any) { +export function cloudReloadToken(params: any, header: any) { return request('/api/auth/reloadToken', { method: 'POST', headers: header @@ -46,11 +46,25 @@ export async function getTokenByCode(params: any) { * 刷新上下文接口(合作方) * @param id */ - export function cooperReloadToken(params: any,header: any) { +export function cooperReloadToken(params: any, header: any) { return request('/api/auth/reloadPartnerToken', { method: 'POST', 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); +} diff --git a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx index e2a778f..e3fff82 100644 --- a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx +++ b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx @@ -95,6 +95,8 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { } const docSaveBtn = "compact";//保存按钮是否展示 + //项目编号 + const ebpProjectNumber = getURLInformation('number'); function getBsName() { if (bidMethodDict.indexOf("procurement_mode_4") !== -1) { @@ -108,12 +110,14 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { useEffect(() => { setTableLoading(true); 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); setTableLoading(false); }) } 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); setTableLoading(false); }) diff --git a/src/utils/session.ts b/src/utils/session.ts index b2a6a1c..c385766 100644 --- a/src/utils/session.ts +++ b/src/utils/session.ts @@ -160,7 +160,7 @@ export function getUserToken() { /** * 获取session userRefreshToken */ - export function getUserRefreshToken() { +export function getUserRefreshToken() { let userRefreshToken: any | null = sessionStorage.getItem('refreshToken'); return userRefreshToken; } @@ -168,7 +168,7 @@ export function getUserToken() { /** * 获取session userScope */ - export function getUserScope() { +export function getUserScope() { let userScope: any | null = sessionStorage.getItem('scope'); return userScope; } @@ -246,7 +246,7 @@ export async function jurySaveInfo(record: any) { })); sessionStorage.setItem('roomId', record.id); sessionStorage.setItem("groupId", record.chatGroupId) - sessionStorage.setItem("expertGroupId",record.expertChatGroupId) + sessionStorage.setItem("expertGroupId", record.expertChatGroupId) await getQuotationMethodById(record.id) } @@ -270,7 +270,7 @@ export interface projectDataItem { isIPassFile?: string projectName?: string openTenderForm?: string - returnURL?:string + returnURL?: string } /** @@ -301,7 +301,7 @@ export function followUpAProjectManager(projectData: projectDataItem): Promise { removePurchaseCanOperate(); return new Promise(resolve => { - if(projectData?.id == undefined || projectData?.id == null) { + if (projectData?.id == undefined || projectData?.id == null) { message.error("项目数据错误,无法获取流程,请联系管理员") } else { getDefById(projectData?.id).then((res) => { @@ -358,21 +358,21 @@ export function getPurchaseCanOperate() { /** * 设置session roleAuthority */ - export function setPurchaseCanOperate() { +export function setPurchaseCanOperate() { sessionStorage.setItem('purchaseCanOperate', '1'); } /** * 删除session roleAuthority */ - export function removePurchaseCanOperate() { +export function removePurchaseCanOperate() { sessionStorage.removeItem('purchaseCanOperate'); } /** * 获取returnURL * @returns */ -export function getReturnURL () { +export function getReturnURL() { let returnURL = sessionStorage.getItem('returnURL'); return returnURL === null ? "" : returnURL; } @@ -381,7 +381,7 @@ export function getReturnURL () { * 获取getRoomReturnURL * @returns */ - export function getRoomReturnURL () { +export function getRoomReturnURL() { let roomReturnURL = sessionStorage.getItem('roomReturnURL'); return roomReturnURL === null ? "" : roomReturnURL; } @@ -390,7 +390,7 @@ export function getReturnURL () { * 获取当前评审室对应标段的报价类型(只能在评审室内使用) * @returns */ - export function getSectionQuot () { +export function getSectionQuot() { let returnURL = sessionStorage.getItem('sectionQuot'); return returnURL === null ? "0" : returnURL; } @@ -401,15 +401,15 @@ export function getReturnURL () { * @returns 1-%(优惠率,折扣率) 0-元(总价,单价) */ export async function getQuotationMethodById(roomId: any) { - if(roomId == undefined || roomId == '' || roomId == null) { + if (roomId == undefined || roomId == '' || roomId == null) { message.error('参数缺失') return } else { await getRoomDataById(roomId).then(async res => { - if(res?.code == 200 && res?.success == true) { + if (res?.code == 200 && res?.success == true) { let roomData = res?.data 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 result = (quotationMethodDict == "quotation_method_2" || quotationMethodDict == "quotation_method_3") ? "1" : "0" 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)); +} From 4bcedc11e512f64181f5acc323864f4cb10cb975 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Wed, 18 May 2022 09:40:02 +0800 Subject: [PATCH 3/7] =?UTF-8?q?5.18=20=E8=B7=AF=E7=94=B1=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router_transfer.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/router_transfer.ts b/config/router_transfer.ts index b6877fc..0a255ad 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -60,6 +60,16 @@ export default [ path: '/chooseRole', component: './LoadingPage/MiddleLoading/chooseRole', }, + //寻找商机跳转 + { + path: '/ToFindBusiness', + component: './LoadingPage/MiddleLoading/ToFindBusiness', + }, + //项目跟进跳转 + { + path: '/ToHomePage', + component: './LoadingPage/MiddleLoading/ToHomePage', + }, //跨工程跳转中间页结束 { name: 'index_1', From 5f79636b27ea954f0b2b1dff186f9c2e3c1b9649 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 20 May 2022 09:32:06 +0800 Subject: [PATCH 4/7] =?UTF-8?q?5.20=20roleId=E6=94=B9=E4=B8=BAroleCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoadingPage/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/LoadingPage/index.tsx b/src/pages/LoadingPage/index.tsx index a963091..ee8da3e 100644 --- a/src/pages/LoadingPage/index.tsx +++ b/src/pages/LoadingPage/index.tsx @@ -57,9 +57,9 @@ const Loading: React.FC<{}> = () => { } //跳转 const redirect = async (userData: any, url: string, extra: any) => { - const roleId = getURLInformation('roleId'); - if (isNotEmpty(roleId)) { - const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleId == roleId); + 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 { @@ -156,7 +156,7 @@ const Loading: React.FC<{}> = () => { for (let key in urlData) { if (key != 'code') { str = str + '&' + key + '=' + urlData[key] - if (key != 'page' && key != 'roleId') { + if (key != 'page' && key != 'roleCode') { obj[key] = urlData[key] } } From a59f168ba251646d640ae6902fefd931163b187f Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Sat, 21 May 2022 12:43:33 +0800 Subject: [PATCH 5/7] =?UTF-8?q?5.21=20=E5=AF=BB=E6=89=BE=E5=95=86=E6=9C=BA?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E9=A1=B5=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx index 3321d21..08f185f 100644 --- a/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx +++ b/src/pages/LoadingPage/MiddleLoading/ToFindBusiness.tsx @@ -10,7 +10,7 @@ const Loading: React.FC<{}> = () => { useEffect(() => { //获取必要参数 //项目编号 - const number = getURLInformation('ebpProjectNumber') === null ? '' : getURLInformation('ebpProjectNumber'); + const number = getURLInformation('number') === null ? '' : getURLInformation('number'); //菜单类型 const type = getURLInformation('type') === null ? '' : getURLInformation('type'); if (isEmpty(type)) { From df1812f4135e05ca2e453153f6d3bc0b68aca07f Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Thu, 9 Jun 2022 09:11:01 +0800 Subject: [PATCH 6/7] =?UTF-8?q?6.9=20=E7=94=9F=E4=BA=A7=E6=9C=89=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=9C=8D=E5=8A=A1=E5=B9=B3=E5=8F=B0=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Bid/BiddingAnnouncement/components/Medias.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx b/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx index 653564d..2b665b3 100644 --- a/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx +++ b/src/pages/Bid/BiddingAnnouncement/components/Medias.tsx @@ -113,7 +113,7 @@ const Media: React.FC = (props) => {
- {defId != "recruit_multi" && 如选择发布到【中国招标投标公共服务平台】,在发布前需填写【公共服务平台】信息} + {/* {defId != "recruit_multi" && 如选择发布到【中国招标投标公共服务平台】,在发布前需填写【公共服务平台】信息} */} ) } From e4d912cb795f8a7ad3828f965a6c224ba3b5be8a Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Wed, 15 Jun 2022 16:52:15 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E9=A1=B9=E7=9B=AE=E5=A7=94=E6=89=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E5=88=97?= =?UTF-8?q?=E5=AE=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Finance/Cost/components/Complete.tsx | 16 +++--- src/pages/Finance/Cost/index.tsx | 23 ++++---- .../components/AlreadyConfirmed.tsx | 26 ++++----- .../components/WaitConfirmed.tsx | 22 ++++---- src/pages/Invoice/Manager/index.tsx | 20 +++---- src/pages/Invoice/Supplier/index.tsx | 7 ++- .../Project/EntrustAssign/operator/index.tsx | 16 +++--- src/pages/Project/EntrustWithdraw/index.tsx | 12 ++--- .../Examination/components/ProjectManage.tsx | 13 ++--- .../Supervision/components/FavoritesList.tsx | 54 ++++++++++--------- .../Supervision/components/ProjectManage.tsx | 12 +++-- src/pages/Tender/ProjectsInvolved/index.tsx | 22 ++++---- .../components/InvitationLetter.tsx | 6 +-- .../LookingForBusinessOpportunitiesList.tsx | 8 ++- 14 files changed, 140 insertions(+), 117 deletions(-) diff --git a/src/pages/Finance/Cost/components/Complete.tsx b/src/pages/Finance/Cost/components/Complete.tsx index f3aaf3e..cc489ed 100644 --- a/src/pages/Finance/Cost/components/Complete.tsx +++ b/src/pages/Finance/Cost/components/Complete.tsx @@ -18,9 +18,9 @@ const Complete: React.FC<{}> = () => { const columnsComplete: ProColumns[] = [ //已完成表格 - { title: '项目名称', dataIndex: 'projectName', width: 200 }, + { title: '项目名称', dataIndex: 'projectName', width: '35%' }, { - title: '费用类型', width: 100, render: (_, record) => { + title: '费用类型', width: '5%', render: (_, record) => { let val = '-'; if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { @@ -40,14 +40,14 @@ const Complete: React.FC<{}> = () => { return val; } }, - { title: '费用内容描述', dataIndex: 'commodityDescribe' }, - { title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime' }, - { title: '支付时间', dataIndex: 'paymentTime', width: 100, valueType: 'dateTime' }, - { title: '金额(元)', dataIndex: 'amount', width: 80 }, + { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' }, + { title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' }, + { title: '支付时间', dataIndex: 'paymentTime', width: '10%', valueType: 'dateTime' }, + { title: '金额(元)', dataIndex: 'amount', width: '4%' }, { title: '操作', dataIndex: 'option', - width: 150, + width: '3%', valueType: 'option', render: (_, record) => { if (record.bidInvoice == null) { @@ -99,6 +99,8 @@ const Complete: React.FC<{}> = () => { getCheckboxProps: (record) => ({ disabled: record.bidInvoice == null ? false : true }), + columnWidth: '1px', + fixed: true, }} pagination={{ defaultPageSize: 10 }} //默认显示条数 // bordered diff --git a/src/pages/Finance/Cost/index.tsx b/src/pages/Finance/Cost/index.tsx index be63b23..13d549f 100644 --- a/src/pages/Finance/Cost/index.tsx +++ b/src/pages/Finance/Cost/index.tsx @@ -30,11 +30,16 @@ const finance: React.FC<{}> = () => { setActiveKey(key); } const columns: ProColumns[] = [//未支付 - { title: '序号', valueType: 'index', width: 60, hideInTable: true }, - { title: '项目名称', dataIndex: 'projectName', }, - { title: '订单号', dataIndex: 'orderNumber', width: 100, }, + { title: '序号', valueType: 'index', width: 0, hideInTable: true }, + { title: '项目名称', dataIndex: 'projectName', width: '25%', }, { - title: '费用类型', width: 100, render: (_, record) => { + title: '订单号', dataIndex: 'orderNumber', width: '9.3%', + render: (record) => { + return {record} + } + }, + { + title: '费用类型', width: '5%', render: (_, record) => { let val = '-'; if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用 if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') { @@ -54,11 +59,11 @@ const finance: React.FC<{}> = () => { return val; } }, - { title: '费用内容描述', dataIndex: 'commodityDescribe', }, - { title: '下单时间', dataIndex: 'createDate', width: 100, valueType: 'dateTime', }, - { title: '金额(元)', dataIndex: 'amount', width: 100, }, + { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%', }, + { title: '下单时间', dataIndex: 'createDate', width: '6%', valueType: 'dateTime', }, + { title: '金额(元)', dataIndex: 'amount', width: '4%', }, { - title: '状态', dataIndex: 'state', width: 80, + title: '状态', dataIndex: 'state', width: '3%', valueEnum: { "0": { text: '未支付', }, "1": { text: '支付中', }, @@ -69,7 +74,7 @@ const finance: React.FC<{}> = () => { }, }, { - title: '操作', dataIndex: 'option', width: 150, + title: '操作', dataIndex: 'option', width: '5%', valueType: 'option', render: (_, record) => { return ( diff --git a/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx b/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx index d3b58ef..4141320 100644 --- a/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx +++ b/src/pages/Finance/ProjectManager/RevenueRecognition/components/AlreadyConfirmed.tsx @@ -22,13 +22,13 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '项目名称', dataIndex: 'projectName', key: 'projectName', - width: '15%', + width: '25%', }, { title: '订单编号', dataIndex: 'orderNumber', key: 'orderNumber', - width:140, + width: '9.3%', render: (record) => { return {record} } @@ -37,7 +37,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '费用类别', dataIndex: 'expensesType', key: 'expensesType', - width: '10%', + width: '6.1%', valueType: 'select', valueEnum: { '1': '标书费', @@ -68,35 +68,35 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '缴费单位', dataIndex: 'payerName', key: 'payerName', - width: '12%', + width: '15%', search: false, }, { - title: '订单金额(元)', + title: '订单金额(元)', dataIndex: 'cartAmount', key: 'cartAmount', - width: '10%', + width: '6%', search: false, }, { - title: '实际支付金额(元)', + title: '实际支付金额(元)', dataIndex: 'amount', key: 'amount', - width: '10%', + width: '5%', search: false, }, { title: '付款人', dataIndex: 'payerUserName', key: 'payerUserName', - width: '8%', + width: '3.6%', search: false, }, { title: '付款时间', dataIndex: 'paymentTime', key: 'paymentTime', - width: '10%', + width: '9.5%', valueType: 'dateTime', search: false, }, @@ -104,7 +104,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '支付方式', dataIndex: 'paymentMethod', key: 'paymentMethod', - width: '8%', + width: '5%', valueType: 'select', valueEnum: { '0': '线上支付', @@ -115,7 +115,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { title: '支付状态', dataIndex: 'state', key: 'state', - width: '10%', + width: '5%', valueType: 'select', valueEnum: { '2': '支付成功', @@ -139,7 +139,7 @@ const AlreadyConfirmed: React.FC<{}> = () => { { title: '操作', valueType: 'option', - width: '5%', + width: '3.5%', render: (text, record, _, action) => ( toView(record)} className="operation"> 查看 diff --git a/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx b/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx index 03cc6b3..0071a46 100644 --- a/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx +++ b/src/pages/Finance/ProjectManager/RevenueRecognition/components/WaitConfirmed.tsx @@ -26,13 +26,13 @@ const WaitConfirmed: React.FC<{}> = () => { title: '项目名称', dataIndex: 'projectName', key: 'projectName', - width: '20%', + width: '25%', }, { title: '订单编号', dataIndex: 'orderNumber', key: 'orderNumber', - width: 140, + width: '9.3%', render: (record) => { return {record} } @@ -41,7 +41,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '费用类别', dataIndex: 'expensesType', key: 'expensesType', - width: '10%', + width: '6.1%', valueType: 'select', valueEnum: { '1': '标书费', @@ -72,28 +72,28 @@ const WaitConfirmed: React.FC<{}> = () => { title: '缴费单位', dataIndex: 'payerName', key: 'payerName', - width: '12%', + width: '15%', search: false, }, { - title: '订单金额(元)', + title: '订单金额(元)', dataIndex: 'cartAmount', key: 'cartAmount', - width: '12%', + width: '6.9%', search: false, }, { title: '下单人', dataIndex: 'payerUserName', key: 'payerUserName', - width: '8%', + width: '3.6%', search: false, }, { title: '付款时间', dataIndex: 'paymentTime', key: 'paymentTime', - width: '10%', + width: '9.5%', valueType: 'dateTime', search: false, }, @@ -101,7 +101,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '支付方式', dataIndex: 'paymentMethod', key: 'paymentMethod', - width: '8%', + width: '5%', valueType: 'select', valueEnum: { '0': '线上支付', @@ -112,7 +112,7 @@ const WaitConfirmed: React.FC<{}> = () => { title: '支付状态', dataIndex: 'state', key: 'state', - width: '10%', + width: '5%', valueType: 'select', valueEnum: { '0': '待支付', @@ -137,7 +137,7 @@ const WaitConfirmed: React.FC<{}> = () => { { title: '操作', valueType: 'option', - width: '15%', + width: '10%', render: (text, record, _, action) => { return ( <> diff --git a/src/pages/Invoice/Manager/index.tsx b/src/pages/Invoice/Manager/index.tsx index c7a77c8..1120448 100644 --- a/src/pages/Invoice/Manager/index.tsx +++ b/src/pages/Invoice/Manager/index.tsx @@ -46,12 +46,12 @@ const Invoice: React.FC = (props) => { title: '项目名称', dataIndex: 'projectName', valueType: 'text', - width: '12%', + width: '25%', }, { title: '费用名称', dataIndex: 'commodityName', - width: '8%', + width: '6.1%', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 render: (_, record) => { @@ -78,14 +78,14 @@ const Invoice: React.FC = (props) => { title: '支付单位', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '10%', + width: '15%', dataIndex: 'payerName', }, { title: '支付方式', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '5%', dataIndex: 'paymentMethod', valueEnum: { "0": { text: '线上', status: '' }, @@ -103,7 +103,7 @@ const Invoice: React.FC = (props) => { title: '付款状态', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '5%', dataIndex: 'payState', valueEnum: { "0": { text: '未支付', status: '' }, @@ -119,14 +119,14 @@ const Invoice: React.FC = (props) => { title: '金额', valueType: 'money', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '4%', dataIndex: 'amount', }, { title: '发票状态', valueType: 'select', dataIndex: 'invoiceState', - width: '8%', + width: '4.8%', valueEnum: { "0": { text: '未开', status: '' }, "1": { text: '已开', status: '' }, @@ -136,7 +136,7 @@ const Invoice: React.FC = (props) => { title: '需要邮寄', valueType: 'text', hideInSearch: true,//列表中显示,查询条件中不显示 - width: '8%', + width: '4.8%', dataIndex: 'mail', valueEnum: { "0": { text: '不需要', status: '' }, @@ -147,7 +147,7 @@ const Invoice: React.FC = (props) => { title: '邮寄状态', valueType: 'text', dataIndex: 'mailState', - width: '8%', + width: '4.8%', valueEnum: { "0": { text: '未邮寄', status: '' }, "1": { text: '已邮寄', status: '' }, @@ -158,7 +158,7 @@ const Invoice: React.FC = (props) => { dataIndex: 'type', hideInSearch: true,//列表中显示,查询条件中不显示 valueType: 'text', - width: '8%', + width: '5%', valueEnum: { "0": { text: '增值税普通发票' }, "1": { text: '增值税专用发票' }, diff --git a/src/pages/Invoice/Supplier/index.tsx b/src/pages/Invoice/Supplier/index.tsx index 0a90ccf..28b4d11 100644 --- a/src/pages/Invoice/Supplier/index.tsx +++ b/src/pages/Invoice/Supplier/index.tsx @@ -37,7 +37,7 @@ const InvoiceSupplier: React.FC<{}> = () => { title: '序号', dataIndex: 'key', key: 'key', - width: 60, + width: 50, search: false, }, { @@ -55,6 +55,7 @@ const InvoiceSupplier: React.FC<{}> = () => { dataIndex: 'type', key: 'type', valueType: 'select', + width: 115, valueEnum: { '0': '增值税普通发票', '1': '增值税专用发票', @@ -65,6 +66,7 @@ const InvoiceSupplier: React.FC<{}> = () => { title: '发票状态', dataIndex: 'state', valueType: 'select', + width: 75, valueEnum: { '0': '未开', '1': '已开', @@ -72,13 +74,14 @@ const InvoiceSupplier: React.FC<{}> = () => { }, { title: '是否需要邮寄', + width: 100, render:(_: any,record: any) => record.isMail == -1 ? '无需邮寄' : '需要邮寄', search: false, }, { title: '操作', dataIndex: 'option', - width: 80, + width: 70, valueType: 'option', search: false, render: (_, record) => diff --git a/src/pages/Project/EntrustAssign/operator/index.tsx b/src/pages/Project/EntrustAssign/operator/index.tsx index 166b70b..583162e 100644 --- a/src/pages/Project/EntrustAssign/operator/index.tsx +++ b/src/pages/Project/EntrustAssign/operator/index.tsx @@ -147,17 +147,17 @@ const entrust: React.FC<{}> = () => { //委托列表 const columns: ProColumns[] = [ { - title: '序号', valueType: 'index', width: 60, + title: '序号', valueType: 'index', width: 50, // render: (text: any, record: any, index: number,) => index + (pageData.pageNo - 1) * 10 }, - { title: '委托方', dataIndex: 'purchaser', width: '10%', search: false }, - { title: '项目名称', dataIndex: 'projectName', }, - { title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false }, + { title: '委托方', dataIndex: 'purchaser', width: '15%', search: false },//, ellipsis: true + { title: '项目名称', dataIndex: 'projectName', width: 400, }, + { title: '方案编号', dataIndex: 'projectNumber', width: '6%', search: false }, { title: '接收时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false }, - { title: '采购方式', dataIndex: 'procurementMode', width: '10%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, - { title: '标的类型', dataIndex: 'procurementType', width: '10%', hideInTable: typeVisible, search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, + { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=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: { 1: { text: '已拒收', status: 'Processing' }, 2: { text: '未接受', status: 'Warning' }, @@ -174,7 +174,7 @@ const entrust: React.FC<{}> = () => { } }, { - title: '操作', width: '12%', + title: '操作', width: '9%', valueType: 'option', render: (_, record) => { if (record.status === 1) { diff --git a/src/pages/Project/EntrustWithdraw/index.tsx b/src/pages/Project/EntrustWithdraw/index.tsx index aadef01..c600f72 100644 --- a/src/pages/Project/EntrustWithdraw/index.tsx +++ b/src/pages/Project/EntrustWithdraw/index.tsx @@ -40,15 +40,15 @@ const entrust: React.FC<{}> = () => { //委托列表 const columns: ProColumns[] = [ { title: '序号', valueType: 'index', width: 60, }, - { title: '委托方', dataIndex: 'purchaser', width: '10%', search: false }, - { title: '项目名称', dataIndex: 'projectName', }, - { title: '方案编号', dataIndex: 'projectNumber', width: '10%', search: false }, + { title: '委托方', dataIndex: 'purchaser', width: '15%', search: false }, + { title: '项目名称', dataIndex: 'projectName', width: 400, }, + { title: '方案编号', dataIndex: 'projectNumber', width: '6%', search: false }, { title: '接收时间', dataIndex: 'receiveTime', 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: 'procurementType', width: '10%', search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, + { title: '采购方式', dataIndex: 'procurementMode', width: '6%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, + { title: '标的类型', dataIndex: 'procurementType', width: '5%', search: false, valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, { - title: '操作', width: '12%', + title: '操作', width: '4%', valueType: 'option', render: (_, record) => { return diff --git a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx index dc12e65..8c9c0a5 100644 --- a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx +++ b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx @@ -45,7 +45,8 @@ const ProjectManage: React.FC = (props) => { { title: '采购方式', dataIndex: 'bidMethodDict', - width: '8%', + + width: '7.5%', valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null , }, @@ -58,7 +59,7 @@ const ProjectManage: React.FC = (props) => { title: '项目编号', dataIndex: 'ebpProjectNumber', search: false, - width: '10%', + width: '8%', }, { title: '采购人', @@ -70,12 +71,12 @@ const ProjectManage: React.FC = (props) => { title: '建档时间', dataIndex: 'createDate', search: false, - width: '10%', + width: '9.5%', }, { title: '标的类型', dataIndex: 'procurementType', - width: '8%', + width: '5%', search: false, valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), }, @@ -83,12 +84,12 @@ const ProjectManage: React.FC = (props) => { title: '所属区域', dataIndex: 'regionDictName', search: false, - width: '10%', + width: '12%', }, { title: '操作', valueType: 'option', - width: 150, + width: '5%', render: (_: any, record: any) => ( <> diff --git a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx index e76352a..34a7e40 100644 --- a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx +++ b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx @@ -45,7 +45,7 @@ const FavoritesList: React.FC = (props) => { { title: '采购方式', dataIndex: 'bidMethodDict', - width: '8%', + width: '5%', valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), initialValue: tabs === 'favoritesList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null, }, @@ -91,12 +91,12 @@ const FavoritesList: React.FC = (props) => { title: '建档时间', dataIndex: 'createDate', search: false, - width: '10%', + width: '9.5%', }, { title: '标的类型', dataIndex: 'procurementType', - width: '8%', + width: '5%', search: false, valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), }, @@ -109,7 +109,7 @@ const FavoritesList: React.FC = (props) => { { title: '公开状态', dataIndex: 'isPublic', - width: '10%', + width: '4.5%', valueEnum: { 0: { text: 未公开 @@ -123,31 +123,33 @@ const FavoritesList: React.FC = (props) => { { title: '操作', valueType: 'option', - width: 150, - render: (_: any, record: any) => [ - , - removeFavorites(record)} - okText="确定" - cancelText="取消" - > + width: '4.5%', + render: (text: any, record: any) => { + return (<> - , - ] + removeFavorites(record)} + okText="确定" + cancelText="取消" + > + + + ) + } }, ] @@ -260,6 +262,8 @@ const FavoritesList: React.FC = (props) => { onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} rowKey={"id"} rowSelection={{ + columnWidth: '1px', + fixed: true, selectedRowKeys: selectedRows, onChange: (_, selectedRows) => setSelectedRows(_), }} diff --git a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx index d46fa28..bde5c17 100644 --- a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx +++ b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx @@ -45,7 +45,7 @@ const ProjectManage: React.FC = (props) => { { title: '采购方式', dataIndex: 'bidMethodDict', - width: '8%', + width: '7%', valueEnum: proTableValueEnum(dictData[procurementModeEntrust]), initialValue: tabs === 'projectList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null, }, @@ -77,12 +77,12 @@ const ProjectManage: React.FC = (props) => { title: '建档时间', dataIndex: 'createDate', search: false, - width: '10%', + width: '9.5%', }, { title: '标的类型', dataIndex: 'procurementType', - width: '8%', + width: '5%', search: false, valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), }, @@ -95,7 +95,7 @@ const ProjectManage: React.FC = (props) => { { title: '公开状态', dataIndex: 'isPublic', - width: '10%', + width: '4.5%', valueEnum: { 0: { text: 未公开 @@ -109,7 +109,7 @@ const ProjectManage: React.FC = (props) => { { title: '操作', valueType: 'option', - width: 150, + width: '4.5%', render: (_: any, record: any) => ( <> @@ -216,6 +216,8 @@ const ProjectManage: React.FC = (props) => { onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} rowKey={"id"} rowSelection={{ + columnWidth: '1px', + fixed: true, selectedRowKeys: selectedRows, onChange: (_, selectedRows) => setSelectedRows(_), }} diff --git a/src/pages/Tender/ProjectsInvolved/index.tsx b/src/pages/Tender/ProjectsInvolved/index.tsx index 4f485f6..2d40af1 100644 --- a/src/pages/Tender/ProjectsInvolved/index.tsx +++ b/src/pages/Tender/ProjectsInvolved/index.tsx @@ -101,7 +101,7 @@ const Index: React.FC<{}> = () => { search: proTypeCode?.length > 1 ? null : false, initialValue: bidMethodDict ? bidMethodDict : void 0, valueEnum: proTableValueEnumOther(dictData['procurement_mode=entrust'], proTypeCode), - width: '10%', + width: '7%', render: (_: any, record: any) => { if (proTypeCode.indexOf("procurement_mode_4") !== -1) { const recruitmentMethod = getDictName(dictData[recruitmentMethodRecord], record.examinationMethodDict) @@ -124,7 +124,7 @@ const Index: React.FC<{}> = () => { title: proTypeCode.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人', dataIndex: 'tendereeOrgName', search: false, - width: '10%' + width: '15%' }, { title: '代理机构', @@ -137,17 +137,17 @@ const Index: React.FC<{}> = () => { dataIndex: 'procurementType', valueEnum: proTableValueEnum(dictData['procurement_type=entrust']), search: false, - width: '8%' + width: '5%' }, { title: '所属区域', dataIndex: 'regionDictName', search: false, - width: '10%' + width: '15%' }, { title: '操作', - width: '15%', + width: '7%', search: false, render: (text: any, record: any) => { if (MethodDict == "procurement_mode_7") { @@ -156,11 +156,11 @@ const Index: React.FC<{}> = () => { ) } else { return ( - + <> - + ) } } @@ -182,31 +182,33 @@ const Index: React.FC<{}> = () => { title: '采购类型', dataIndex: 'procurementTypeDict', search: false, - width: '8%', + width: '5%', valueEnum: proTableValueEnum(dictData['procurement_type=entrust']) }, { title: '采购方式', dataIndex: 'bidMethodDict', search: false, - width: '10%', + width: '7%', valueEnum: proTableValueEnum(dictData['procurement_mode=entrust']) }, { title: '已报名标段名称', dataIndex: 'bidSectName', + width: '20%', search: false }, { title: '已报名标段编号', dataIndex: 'bidSectBizNum', + width: '10%', search: false }, { title: '项目负责人', dataIndex: 'projectBidUser', search: false, - width: '10%' + width: '7%' }, ]; const dataSource = [ diff --git a/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx b/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx index 2ed6912..6ec29eb 100644 --- a/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx +++ b/src/pages/Tender/supplier/InvitationLetter/components/InvitationLetter.tsx @@ -123,7 +123,7 @@ const LookingForBusinessOpportunitiesList: React.FC = () => { title: '代理机构', dataIndex: 'tenderAgencyName', search: false, - width: '10%', + width: '15%', }, { title: '项目分类', @@ -136,12 +136,12 @@ const LookingForBusinessOpportunitiesList: React.FC = () => { title: '所属区域', dataIndex: 'regionDictName', search: false, - width: '10%', + width: '15%', }, { title: '操作', valueType: 'option', - width: '15%', + width: '8%', render: (text: any, record: any, index: number) => { return <> diff --git a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx index e2a778f..71fb8d1 100644 --- a/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx +++ b/src/pages/Tender/supplier/LookingForBusinessOpportunities/components/LookingForBusinessOpportunitiesList.tsx @@ -132,6 +132,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募方式' : '采购方式', dataIndex: 'bidMethodDict', search: bidMethodDict?.length > 1 ? void 0 : false, + width: '7%', valueEnum: proTableValueEnumOther(dictData[procurementModeEntrust], bidMethodDict), render: (_: any, record: any) => { if (bidMethodDict.indexOf("procurement_mode_4") !== -1) { @@ -154,16 +155,18 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { title: bidMethodDict.indexOf("procurement_mode_4") !== -1 ? '招募人' : '采购人', dataIndex: 'tendereeOrgName', search: false, + width: '15%' }, { title: '代理机构', dataIndex: 'tenderAgencyName', search: false, + width: '15%' }, { title: '项目分类', dataIndex: 'procurementType', - width: 80, + width: '5%', valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]), search: false, }, @@ -171,11 +174,12 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => { title: '所属区域', dataIndex: 'regionDictName', search: false, + width: '15%' }, { title: '操作', valueType: 'option', - width: 150, + width: '7%', render: (text: any, record: any, index: number) => { return <>