6.16 询价修改新的外网平台地址

This commit is contained in:
jl-zhoujl2
2022-06-16 15:46:10 +08:00
parent 7dc348be97
commit b4552dd28a
6 changed files with 129 additions and 77 deletions

View File

@ -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<boolean>(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 (
<Card bordered={false} bodyStyle={{ padding: '24px 64px 24px 0px' }}>
<Spin spinning={loading} delay={300}>
<ProTable
columns={columns}
actionRef={actionRef}
search={false}
options={false}
size="small"
pagination={false}
request={async () =>
await getPage(reviewTurnId).then((res) => {
// 表单搜索项会从 params 传入,传递给后端接口。
return {
data: res?.data,
success: res?.success,
};
})
}
rowKey="id"
dateFormatter="string"
/>
<ProTable
columns={columns}
actionRef={actionRef}
search={false}
options={false}
size="small"
pagination={false}
request={async () =>
await getPage(reviewTurnId).then((res) => {
// 表单搜索项会从 params 传入,传递给后端接口。
return {
data: res?.data,
success: res?.success,
};
})
}
rowKey="id"
dateFormatter="string"
/>
</Spin>
</Card>
);