From b4552dd28af55cecbe948517e3974dc5c66ee787 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Thu, 16 Jun 2022 15:46:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?6.16=20=E8=AF=A2=E4=BB=B7=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=A4=96=E7=BD=91=E5=B9=B3=E5=8F=B0=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BidDetailed/BidDetailedReview/index.tsx | 44 ++++++++------- .../BidDetailed/BidDetailedReview/service.ts | 23 ++++++-- .../BidDetailedReviewLeader/index.tsx | 44 ++++++++------- .../BidDetailedReviewLeader/service.ts | 21 +++++-- .../ZXunJia/EvaluationRoom/Sing/index.tsx | 56 +++++++++++-------- .../ZXunJia/EvaluationRoom/Sing/service.ts | 18 ++++-- 6 files changed, 129 insertions(+), 77 deletions(-) diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx index 7c58585..e1daeb2 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Pagination, Spin, Form, message, Upload } from 'antd'; -import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getEval, getFile, calculationPriceScore, saveOffer, getPage, getProjectById } from './service'; +import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getEval, getFile, calculationPriceScore, saveOffer, getPage, getProjectById, getOfferUrl } from './service'; import '@/assets/ld_style.less' import FirstTrialTableDetailed from '../BidDetailedManager/module/FirstTrialTableDetailed'; import { getSessionUserData, getRoomId, getUserToken, getProMethod, getProId, getSectionQuot } from '@/utils/session'; @@ -439,22 +439,22 @@ const Index: React.FC<{}> = () => { bidEvalDetailDTOList = [] }) } else { - let date = { -          bidEvalId: bidEvalId, -          reviewTurnId: reviewTurnId, -          category: typeCategory, -          assessRoomId: assessRoomId, -          reviewType: '2' -        } -        getProgress({ ...date }).then((res) => { -          if (res.code == 200) { -            if(res.data == 100){ -              submitApi() -            } else { -              message.error("您有未完成的打分项,请完成后再提交!") -            } -          } -        }) + let date = { + bidEvalId: bidEvalId, + reviewTurnId: reviewTurnId, + category: typeCategory, + assessRoomId: assessRoomId, + reviewType: '2' + } + getProgress({ ...date }).then((res) => { + if (res.code == 200) { + if (res.data == 100) { + submitApi() + } else { + message.error("您有未完成的打分项,请完成后再提交!") + } + } + }) } } } @@ -1021,8 +1021,14 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + getOfferUrl({ userId: JwtToken, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts index 843ebe5..62fc3ee 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts @@ -99,7 +99,7 @@ export async function getEval(params: any) { // 获取页面接口数据 } export async function getFile(id: any) { // 查找是否有应答文件 - return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId='+id, { + return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId=' + id, { method: 'get', }); } @@ -136,8 +136,8 @@ export async function saveOffer(data: any) { // 自动报价保存 * 查询已报名的供应商 * @param params */ - export async function getPage(params?: any) { - return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`,{ +export async function getPage(params?: any) { + return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`, { method: 'GET', }); } @@ -146,6 +146,17 @@ export async function saveOffer(data: any) { // 自动报价保存 * 根据id查询项目信息 * @param id */ - export function getProjectById(id: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); - } +export function getProjectById(id: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} + +/** +* 加密后的查看报价详情跳转地址 +* @param params +*/ +export function getOfferUrl(params: any) { + return request('/api/biz-service-ebtp-extend/v1/singlePoint/getSsoUrlByPage', { + method: 'GET', + params: params, + }); +} \ No newline at end of file diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx index 5fc10f4..7857ccc 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, Modal, Menu, Pagination, Spin, Form, message, Collapse, Upload } from 'antd'; -import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getMemberInfo, getEval, getUnlock, getCheckData, isStatus, getFile, calculationPriceScore, saveOffer, getPage, getProjectById } from './service'; +import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getMemberInfo, getEval, getUnlock, getCheckData, isStatus, getFile, calculationPriceScore, saveOffer, getPage, getProjectById, getOfferUrl } from './service'; import '@/assets/ld_style.less' import FirstTrialTableDetailed from '../BidDetailedManager/module/FirstTrialTableDetailed'; import { getExperts } from '../BidDetailedManager/service'; @@ -466,22 +466,22 @@ const Index: React.FC<{}> = () => { bidEvalDetailDTOList = [] }) } else { - let date = { -          bidEvalId: bidEvalId, -          reviewTurnId: reviewTurnId, -          category: typeCategory, -          assessRoomId: assessRoomId, -          reviewType: '2' -        } -        getProgress({ ...date }).then((res) => { -          if (res.code == 200) { -            if(res.data == 100){ -              submitApi() -            } else { -              message.error("您有未完成的打分项,请完成后再提交!") -            } -          } -        }) + let date = { + bidEvalId: bidEvalId, + reviewTurnId: reviewTurnId, + category: typeCategory, + assessRoomId: assessRoomId, + reviewType: '2' + } + getProgress({ ...date }).then((res) => { + if (res.code == 200) { + if (res.data == 100) { + submitApi() + } else { + message.error("您有未完成的打分项,请完成后再提交!") + } + } + }) } } } @@ -1052,8 +1052,14 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + getOfferUrl({ userId: JwtToken, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts index a3dcdad..cedf51d 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/service.ts @@ -215,8 +215,8 @@ export async function saveOffer(data: any) { // 自动报价保存 * 查询已报名的供应商 * @param params */ - export async function getPage(params?: any) { - return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`,{ +export async function getPage(params?: any) { + return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`, { method: 'GET', }); } @@ -225,6 +225,17 @@ export async function saveOffer(data: any) { // 自动报价保存 * 根据id查询项目信息 * @param id */ - export function getProjectById(id: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); - } \ No newline at end of file +export function getProjectById(id: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} + +/** +* 加密后的查看报价详情跳转地址 +* @param params +*/ +export function getOfferUrl(params: any) { + return request('/api/biz-service-ebtp-extend/v1/singlePoint/getSsoUrlByPage', { + method: 'GET', + params: params, + }); +} \ No newline at end of file diff --git a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx index 9a2bdb3..fe26bb6 100644 --- a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx +++ b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx @@ -2,8 +2,9 @@ import React, { useRef, useState } from 'react'; import '@/assets/xsy_style.less'; import { Button, Card, message, Spin } from 'antd'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { getPage, getProjectById } from './service'; +import { getOfferUrl, getPage, getProjectById } from './service'; import { getURLInformation } from '@/utils/CommonUtils'; +import { getSessionUserData } from '@/utils/session'; const Sing: React.FC<{}> = () => { //表格控制 @@ -12,17 +13,24 @@ const Sing: React.FC<{}> = () => { const reviewTurnId = getURLInformation('turnId') == undefined ? '' : getURLInformation('turnId'); //loading const [loading, setLoading] = useState(false) - + //当前登录人账号 + const userId = getSessionUserData()?.userId; const toViewOffer = async (record: any) => { - if(record.decryptStatus == "1") { + if (record.decryptStatus == "1") { message.info("应答文件未解密,无法查看报价详情,请先到【应答文件查看】中进行解密") } else { setLoading(true) await getProjectById(record?.projectId).then((res) => { if (res?.code == 200 && res?.success == true) { const data = res?.data; - const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` - window.open(url); + // const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` + // window.open(url); + const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }).finally(() => { setLoading(false) @@ -68,25 +76,25 @@ const Sing: React.FC<{}> = () => { return ( - - await getPage(reviewTurnId).then((res) => { - // 表单搜索项会从 params 传入,传递给后端接口。 - return { - data: res?.data, - success: res?.success, - }; - }) - } - rowKey="id" - dateFormatter="string" - /> + + await getPage(reviewTurnId).then((res) => { + // 表单搜索项会从 params 传入,传递给后端接口。 + return { + data: res?.data, + success: res?.success, + }; + }) + } + rowKey="id" + dateFormatter="string" + /> ); diff --git a/src/pages/ZXunJia/EvaluationRoom/Sing/service.ts b/src/pages/ZXunJia/EvaluationRoom/Sing/service.ts index beab5ee..c71c607 100644 --- a/src/pages/ZXunJia/EvaluationRoom/Sing/service.ts +++ b/src/pages/ZXunJia/EvaluationRoom/Sing/service.ts @@ -4,7 +4,7 @@ import request from '@/utils/request'; * @param params */ export async function getPage(params?: any) { - return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`,{ + return request(`/api/biz-service-ebtp-tender/v1/supplier_register/get_register/${params}`, { method: 'GET', }); } @@ -13,6 +13,16 @@ export async function getPage(params?: any) { * 根据id查询项目信息 * @param id */ - export function getProjectById(id: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); - } \ No newline at end of file +export function getProjectById(id: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id); +} +/** +* 加密后的查看报价详情跳转地址 +* @param params +*/ +export function getOfferUrl(params: any) { + return request('/api/biz-service-ebtp-extend/v1/singlePoint/getSsoUrlByPage', { + method: 'GET', + params: params, + }); +} \ No newline at end of file From c7723de63897c8d676126fa308540226bf6e4c36 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Thu, 16 Jun 2022 17:26:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?6.16=20=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BidDetailed/BidDetailedReview/index.tsx | 16 ++++++++-------- .../BidDetailedReviewLeader/index.tsx | 16 ++++++++-------- src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx index e1daeb2..d351579 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx @@ -1021,14 +1021,14 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const data = response?.data - // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) - const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - getOfferUrl({ userId: JwtToken, page }).then(response => { - if (response?.code == 200) { - window.open(response?.data); - } - }) + const resData = response?.data + window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + // getOfferUrl({ userId: JwtToken, page }).then(response => { + // if (response?.code == 200) { + // window.open(response?.data); + // } + // }) } }) } diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx index 7857ccc..d54a7f2 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx @@ -1052,14 +1052,14 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const data = response?.data - // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) - const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - getOfferUrl({ userId: JwtToken, page }).then(response => { - if (response?.code == 200) { - window.open(response?.data); - } - }) + const resData = response?.data + window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + // getOfferUrl({ userId: JwtToken, page }).then(response => { + // if (response?.code == 200) { + // window.open(response?.data); + // } + // }) } }) } diff --git a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx index fe26bb6..246ac2e 100644 --- a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx +++ b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx @@ -23,14 +23,14 @@ const Sing: React.FC<{}> = () => { await getProjectById(record?.projectId).then((res) => { if (res?.code == 200 && res?.success == true) { const data = res?.data; - // const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` - // window.open(url); - const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - getOfferUrl({ userId, page }).then(response => { - if (response?.code == 200) { - window.open(response?.data); - } - }) + const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` + window.open(url); + // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` + // getOfferUrl({ userId, page }).then(response => { + // if (response?.code == 200) { + // window.open(response?.data); + // } + // }) } }).finally(() => { setLoading(false) From dfb22c2a06c0acb1dfc814bfe1d80d38452b5895 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 17 Jun 2022 12:12:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?6.17=20=E8=AF=A2=E4=BB=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.UAT.ts | 4 ++- config/config.dev.ts | 4 ++- config/config.prod.ts | 4 ++- config/config.sim.ts | 4 ++- .../BidDetailed/BidDetailedReview/index.tsx | 21 +++++++++------- .../BidDetailedReviewLeader/index.tsx | 21 +++++++++------- .../ZXunJia/EvaluationRoom/Sing/index.tsx | 25 ++++++++++--------- src/typings.d.ts | 4 ++- 8 files changed, 52 insertions(+), 35 deletions(-) diff --git a/config/config.UAT.ts b/config/config.UAT.ts index 22b07c1..c31047c 100644 --- a/config/config.UAT.ts +++ b/config/config.UAT.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV:'UAT', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8280/provider_uat', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8280/provider_uat', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.dev.ts b/config/config.dev.ts index 971d818..2a4cf79 100644 --- a/config/config.dev.ts +++ b/config/config.dev.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV: 'DEV', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider_dev', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider_dev', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.prod.ts b/config/config.prod.ts index 99e7610..c00bb2e 100644 --- a/config/config.prod.ts +++ b/config/config.prod.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV:'PROD', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'https://60.10.26.178/provider', + // REACT_APP_XUNJIA_REDIRECT: 'https://60.10.26.178/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/config/config.sim.ts b/config/config.sim.ts index bce3024..fa9e473 100644 --- a/config/config.sim.ts +++ b/config/config.sim.ts @@ -18,6 +18,8 @@ export default defineConfig({ START_ENV: 'sim', //询价查看报价跳转地址 - REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider', + // REACT_APP_XUNJIA_REDIRECT: 'http://10.0.204.215:8080/provider', + //询价-查看报价详情-虚拟用户uid + REACT_APP_XUNJIA_UID: 'admin_entrance', }, }); diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx index d351579..41c620e 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/index.tsx @@ -3,7 +3,7 @@ import { Button, Table, Tabs, Space, Progress, Radio, Input, Checkbox, Select, M import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, findPriceScoreList, getEval, getFile, calculationPriceScore, saveOffer, getPage, getProjectById, getOfferUrl } from './service'; import '@/assets/ld_style.less' import FirstTrialTableDetailed from '../BidDetailedManager/module/FirstTrialTableDetailed'; -import { getSessionUserData, getRoomId, getUserToken, getProMethod, getProId, getSectionQuot } from '@/utils/session'; +import { getSessionUserData, getRoomId, getUserToken, getProMethod, getProId, getSectionQuot, getSessionRoleData } from '@/utils/session'; import FileDown from '@/utils/Download'; import { getURLInformation } from '@/utils/CommonUtils'; import { btnAuthority } from '@/utils/authority'; @@ -68,6 +68,8 @@ const Index: React.FC<{}> = () => { const modalHeight = (innerHeight * 96) / 100; //获取标段的标价类型 1-百分比 0-元 const sectionQuot = getSectionQuot(); + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商 if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标 showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; @@ -1021,14 +1023,15 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) - // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - // getOfferUrl({ userId: JwtToken, page }).then(response => { - // if (response?.code == 200) { - // window.open(response?.data); - // } - // }) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`; + const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID; + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx index d54a7f2..09666af 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx +++ b/src/pages/Evaluation/BidDetailed/BidDetailedReviewLeader/index.tsx @@ -8,7 +8,7 @@ import ConsistencyCheck from './components/ConsistencyCheck'; import BidDetailSummary from './components/BidDetailSummary'; import BidDetailSpeed from './components/BidDetailSpeed'; import { handleSubmit } from './utils'; -import { getProId, getProMethod, getRoomId, getSectionQuot, getSessionUserData, getUserToken } from '@/utils/session'; +import { getProId, getProMethod, getRoomId, getSectionQuot, getSessionRoleData, getSessionUserData, getUserToken } from '@/utils/session'; import FileDown from '@/utils/Download'; import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; import { btnAuthority } from '@/utils/authority'; @@ -90,6 +90,8 @@ const Index: React.FC<{}> = () => { const sectionQuot = getSectionQuot(); const [isEndProgress, setIsEndProgress] = useState(false); // 是否可编辑 const [submitLoading, setSubmitLoading] = useState(false); // 提交汇总loading + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商 if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标 showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; @@ -1052,14 +1054,15 @@ const Index: React.FC<{}> = () => { } await getProjectById(getProId()).then(response => { if (response?.code == 200 && response?.success == true) { - const resData = response?.data - window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) - // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - // getOfferUrl({ userId: JwtToken, page }).then(response => { - // if (response?.code == 200) { - // window.open(response?.data); - // } - // }) + const data = response?.data + // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`) + const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`; + const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID; + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }) } diff --git a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx index 246ac2e..5c27e42 100644 --- a/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx +++ b/src/pages/ZXunJia/EvaluationRoom/Sing/index.tsx @@ -4,7 +4,7 @@ import { Button, Card, message, Spin } from 'antd'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { getOfferUrl, getPage, getProjectById } from './service'; import { getURLInformation } from '@/utils/CommonUtils'; -import { getSessionUserData } from '@/utils/session'; +import { getSessionRoleData } from '@/utils/session'; const Sing: React.FC<{}> = () => { //表格控制 @@ -13,24 +13,25 @@ const Sing: React.FC<{}> = () => { const reviewTurnId = getURLInformation('turnId') == undefined ? '' : getURLInformation('turnId'); //loading const [loading, setLoading] = useState(false) - //当前登录人账号 - const userId = getSessionUserData()?.userId; + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; const toViewOffer = async (record: any) => { if (record.decryptStatus == "1") { - message.info("应答文件未解密,无法查看报价详情,请先到【应答文件查看】中进行解密") + message.info("应答文件未解密,无法查看报价详情,请先到【应答文件查看】中进行解密"); } else { setLoading(true) await getProjectById(record?.projectId).then((res) => { if (res?.code == 200 && res?.success == true) { const data = res?.data; - const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` - window.open(url); - // const page = `quote-ztbIndex%26inqueryNo=${data?.ebpProjectNumber}%26offNo=${record?.offerOrderNo}` - // getOfferUrl({ userId, page }).then(response => { - // if (response?.code == 200) { - // window.open(response?.data); - // } - // }) + // const url = `${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${data?.ebpProjectNumber}&offer_no=${record?.offerOrderNo}` + // window.open(url); + const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`; + const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID; + getOfferUrl({ userId, page }).then(response => { + if (response?.code == 200) { + window.open(response?.data); + } + }) } }).finally(() => { setLoading(false) diff --git a/src/typings.d.ts b/src/typings.d.ts index 86fb366..33e3ba7 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -49,4 +49,6 @@ declare const REACT_APP_PASSWORD_PUBLICKEY: string /**ENV-环境参数 */ declare const START_ENV: string /**ENV-询价查看报价跳转地址 */ -declare const REACT_APP_XUNJIA_REDIRECT: string \ No newline at end of file +// declare const REACT_APP_XUNJIA_REDIRECT: string +/**ENV-询价查看报价跳转地址 */ +declare const REACT_APP_XUNJIA_UID: string