Commit 625c4d18 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

确认询价报价 新增路由

parent 7c362abd
......@@ -14,12 +14,26 @@ export default [
name: 'quoteOrder',
component: '@/pages/transaction/confirmInquiryQuote/quoteOrder'
},
// 报价单查询 - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/rfq/preview',
name: 'quoteOrderRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/quoteOrder/details'
},
// 报价单查询 - 查看报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/quote/preview',
name: 'quoteOrderQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/quoteOrder/details'
},
// 报价单查询详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/details',
name: 'quoteOrderDetails',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/components/details'
component: '@/pages/transaction/confirmInquiryQuote/quoteOrder/details'
},
// 待提交审核报价单
{
......@@ -27,12 +41,26 @@ export default [
name: 'pendingSubmitReview',
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview'
},
// 待提交审核报价单 - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/rfq/preview',
name: 'pendingSubmitReviewRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview/details'
},
// 待提交审核报价单 - 查看报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/quote/preview',
name: 'pendingSubmitReviewQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview/details'
},
// 待提交审核报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/details',
name: 'pendingSubmitReviewDetails',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/components/details'
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview/details'
},
// 待审核询价单(一级)
{
......@@ -40,6 +68,20 @@ export default [
name: 'pendingReviewOne',
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewOne'
},
// 待审核询价单(一级) - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/rfq/preview',
name: 'pendingReviewOneRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewOne/details'
},
// 待审核询价单(一级)- 查看报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/quote/preview',
name: 'pendingReviewOneQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewOne/details'
},
// 待审核询价单(一级)详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/details',
......@@ -53,6 +95,20 @@ export default [
name: 'pendingReviewTwo',
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewTwo'
},
// 待审核询价单(二级) - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewTwo/rfq/preview',
name: 'pendingReviewTwoRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewTwo/details'
},
// 待审核询价单(二级)- 查看报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewTwo/quote/preview',
name: 'pendingReviewTwoQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewTwo/details'
},
// 待审核询价单(二级)详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewTwo/details',
......@@ -66,6 +122,20 @@ export default [
name: 'pendingSubmit',
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmit'
},
// 待提交报价单 - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/rfq/preview',
name: 'pendingSubmitRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmit/details'
},
// 待提交报价单- 查看报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/quote/preview',
name: 'pendingSubmitQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmit/details'
},
// 待提交报价单详情
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/details',
......
......@@ -16,8 +16,8 @@ export default [
},
// 询价单查询详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder/details',
name: 'enquiryOrder',
path: '/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder/rfq/preview',
name: 'enquiryOrderRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/enquiryOrder/details'
},
......@@ -27,10 +27,17 @@ export default [
name: 'quoteOrder',
component: '@/pages/transaction/inquiryQuote/quoteOrder'
},
// 报价单查询详情
// 报价单 - 询价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/rfq/preview',
name: 'quoteOrderRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/quoteOrder/details'
},
// 报价单 - 报价单详情quote
{
path: '/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/details',
name: 'quoteOrderDetails',
path: '/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/quote/preview',
name: 'quoteOrderQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/quoteOrder/details'
},
......@@ -61,10 +68,24 @@ export default [
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/edit'
},
// 新建报价单 - 查看询价单
{
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/rfq/preview',
name: 'addInquiryOrderRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/details'
},
// 新建报价单 - 查看报价单
{
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote/preview',
name: 'addInquiryOrderQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/details'
},
// 新建报价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/details',
name: 'details',
name: 'addInquiryOrderDetails',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/details'
},
......@@ -74,6 +95,20 @@ export default [
name: 'pendingReviewOne',
component: '@/pages/transaction/inquiryQuote/pendingReviewOne'
},
// 待审核报价单(一级)- 查看询价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/rfq/preview',
name: 'pendingReviewOneRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingReviewOne/details'
},
// 待审核报价单(一级)- 查看报价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/quote/preview',
name: 'pendingReviewOneQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingReviewOne/details'
},
// 待审核报价单(一级)详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/details',
......@@ -87,6 +122,20 @@ export default [
name: 'pendingReviewTwo',
component: '@/pages/transaction/inquiryQuote/pendingReviewTwo'
},
// 待审核报价单(二级)- 查看询价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/rfq/preview',
name: 'pendingReviewTwoRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingReviewTwo/details'
},
// 待审核报价单(二级)- 查看报价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/quote/preview',
name: 'pendingReviewTwoQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingReviewTwo/details'
},
// 待审核报价单(二级)详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/details',
......@@ -100,6 +149,20 @@ export default [
name: 'pendingSubmit',
component: '@/pages/transaction/inquiryQuote/pendingSubmit'
},
// 待提交报价单 - 查看询价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/rfq/preview',
name: 'pendingSubmitRfqPreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingSubmit/details'
},
// 待提交报价单 - 查看报价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/quote/preview',
name: 'pendingSubmitQuotePreview',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/pendingSubmit/details'
},
// 待提交报价单详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/details',
......
......@@ -156,14 +156,24 @@ export default {
// 确认询价报价
'menu.tranactionAbility.confirmInquiryQuote': '确认询价报价',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrderRfqPreview': '查看询价单',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrderQuotePreview': '查看报价单',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrderDetails': '报价单查询详情',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReview': '待提交审核报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReviewRfqPreview': '查看询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReviewQuotePreview': '查看报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReviewDetails': '待提交审核报价单详情',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOne': '待审核报价单(一级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOneRfqPreview': '查看询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOneQuotePreview': '查看报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOneDetails': '待审核报价单(一级)详情',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwo': '待审核报价单(二级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwoRfqPreview': '查看询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwoQuotePreview': '查看报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwoDetails': '待审核报价单(二级)详情',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmit': '待确认报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitRfqPreview': '查看询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitQuotePreview': '查看报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitDetails': '待确认报价单详情',
// 商品询价
......@@ -189,20 +199,28 @@ export default {
// 询价报价
'menu.tranactionAbility.inquiryQuote': '询价报价',
'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询',
'menu.tranactionAbility.inquiryQuote.enquiryOrderDetails': '询价单查询详情',
'menu.tranactionAbility.inquiryQuote.enquiryOrderRfqPreview': '询价单查询详情',
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrderDetails': '报价单查询详情',
'menu.tranactionAbility.inquiryQuote.quoteOrderRfqPreview': '询价单查询详情',
'menu.tranactionAbility.inquiryQuote.quoteOrderQuotePreview': '报价单查询详情',
'menu.tranactionAbility.inquiryQuote.addInquiryOrder': '待新增报价单',
'menu.tranactionAbility.inquiryQuote.quote': '报价',
'menu.tranactionAbility.inquiryQuote.add': '新建报价单',
'menu.tranactionAbility.inquiryQuote.edit': '编辑报价单',
'menu.tranactionAbility.inquiryQuote.details': '新建报价单',
'menu.tranactionAbility.inquiryQuote.addInquiryOrderRfqPreview': '查看询价单',
'menu.tranactionAbility.inquiryQuote.addInquiryOrderQuotePreview': '查看报价单',
'menu.tranactionAbility.inquiryQuote.addInquiryOrderDetails': '待新增报价单详情',
'menu.tranactionAbility.inquiryQuote.pendingReviewOne': '待审核报价单(一级)',
'menu.tranactionAbility.inquiryQuote.pendingReviewOneRfqPreview': '查看询价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewOneQuotePreview': '查看报价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewOneDetails': '待审核报价单(一级)详情',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwo': '待审核报价单(二级)',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwoRfqPreview': '查看询价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwoQuotePreview': '查看报价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwoDetails': '待审核报价单(二级)详情',
'menu.tranactionAbility.inquiryQuote.pendingSubmit': '待提交报价单',
'menu.tranactionAbility.inquiryQuote.pendingSubmitRfqPreview': '查看询价单',
'menu.tranactionAbility.inquiryQuote.pendingSubmitQuotePreview': '查看报价单',
'menu.tranactionAbility.inquiryQuote.pendingSubmitDetails': '待提交报价单详情',
//进销存
......
......@@ -34,8 +34,12 @@ const Details: React.FC<parmas> = (props) => {
const [visible, setvisible] = useState(false)
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, page_type, view } = props;
const { id, page_type } = props;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// 拿到pathname,通过判断来显示询价单号或报价单号
const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 2];
const [view, setview] = useState<Number>(1);
// steps 切换
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
......@@ -227,22 +231,28 @@ const Details: React.FC<parmas> = (props) => {
}
// 详情请求
useEffect(() => {
switch (Number(page_type)) {
case 4:
PublicApi.getOrderNotarizeEnquiryProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
default:
PublicApi.getOrderNotarizeEnquiryQuotedPriceDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
if(type === 'rfq') {
// 代表的是查看询价
setview(1)
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
} else {
// 代表的是查看报价
setview(2)
PublicApi.getOrderNotarizeEnquiryProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
}
// PublicApi.getOrderNotarizeEnquiryQuotedPriceDetails({ id }).then(res => {
// if (res.code === 1000) {
// setdata(res.data)
// }
// })
}, [])
......
......@@ -96,7 +96,12 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link' disabled={record.interiorState === 1} onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
render: (text: any, record: any) =>
<Button
type='link'
disabled={record.interiorState === 1}
onClick={()=>{setId(record.id);setvisible(true);}
}>审核</Button>
},
]
const format = (text) => {
......
......@@ -6,12 +6,11 @@ import { PublicApi } from '@/services/api';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Datails
page_type={2}
id={id}
view={view}
/>
)
}
......
......@@ -44,13 +44,13 @@ const PendingReviewOne: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}]
return (
......
......@@ -6,12 +6,11 @@ import { PublicApi } from '@/services/api';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Datails
page_type={3}
id={id}
view={view}
/>
)
}
......
......@@ -73,13 +73,13 @@ const PendingReviewTwo: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}]
return (
......
......@@ -6,12 +6,11 @@ import { PublicApi } from '@/services/api';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Datails
page_type={1}
id={id}
view={view}
/>
)
}
......
......@@ -30,13 +30,13 @@ const PendingSubmit: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......
......@@ -6,12 +6,11 @@ import { PublicApi } from '@/services/api';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Datails
page_type={5}
id={id}
view={view}
/>
)
}
......
......@@ -29,13 +29,13 @@ const PendingSubmitReview: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/quote/preview?id=${record.id}`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '报价单摘要',
key: 'details',
......
......@@ -6,12 +6,11 @@ import { PublicApi } from '@/services/api';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Datails
page_type={4}
id={id}
view={view}
/>
)
}
......
......@@ -27,13 +27,13 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '报价单摘要',
key: 'details',
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { Card, Button, Row, Col, Popconfirm } from 'antd';
import { history } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -82,7 +82,10 @@ const PendingSubmit: React.FC<{}> = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link' onClick={() => { setId(record.id); setvisible(true)}}>提交询价单</Button>
render: (text: any, record: any) =>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交询价单</Button>
</Popconfirm>
},
]
const format = (text) => {
......@@ -104,6 +107,16 @@ const PendingSubmit: React.FC<{}> = () => {
</Col>
</Row>
// 单个提交
const handleSubmit = (id:any) => {
const value = {id,state: 1}
PublicApi.postOrderInquiryListSubmit(value).then(res => {
if(res.code === 1000) {
ref.current.reload()
}
})
}
/**列表数据 */
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
......@@ -162,13 +175,13 @@ const PendingSubmit: React.FC<{}> = () => {
>
</StandardTable>
</Card>
<AuditModal
{/* <AuditModal
id={id}
type={1}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
/> */}
</PageHeaderWrapper>
)
}
......
......@@ -5,12 +5,12 @@ import Details from '../components/details';
const AddInquiryOrderDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={6}
id={id}
view={view}
view={2}
/>
)
}
......
......@@ -30,13 +30,13 @@ const AddInquiryOrder: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -83,7 +83,7 @@ const AddInquiryOrder: React.FC<{}> = () => {
console.log(record.interiorState)
return (
<>
<Button type='link' onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/details?id=${record.id}`)}>提交审核</Button>
<Button type="link" disabled={record.externalState !==4 && record.interiorState !==1 && record.interiorState !==4}><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Popconfirm
destroyTooltipOnHide
......
......@@ -32,8 +32,13 @@ const Details: React.FC<parmas> = (props) => {
const [visible, setvisible] = useState(false)
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, page_type, view } = props;
const { id, page_type } = props;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// 拿到pathname,通过判断来显示询价单号或报价单号
const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 2];
const [view, setview] = useState<Number>(1);
// 模拟数据
const [data, setdata] = useState<any>([]);
const format = (text) => {
......@@ -252,21 +257,23 @@ const Details: React.FC<parmas> = (props) => {
}
// 详情请求
useEffect(() => {
switch (Number(page_type)) {
case 4:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
default:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
console.log(type)
if(type === 'rfq') {
// 代表的是查看询价
setview(1)
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
} else {
// 代表的是查看报价
setview(2)
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
}
}, [])
......
......@@ -5,12 +5,12 @@ import Details from '../components/details';
const EnquiryOrderDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={4}
id={id}
view={view}
/>
)
}
......
......@@ -28,7 +28,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder/rfq/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......
......@@ -5,12 +5,11 @@ import Details from '../components/details';
const PendingReviewOneDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={2}
id={id}
view={view}
/>
)
}
......
......@@ -43,14 +43,14 @@ const PendingReviewOne: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/quote/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne/rfq/preview?id=${record.id}`}>{text}</EyePreview>
}]
return (
<ReviewList
......
......@@ -5,12 +5,11 @@ import Details from '../components/details';
const PendingReviewTwoDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={3}
id={id}
view={view}
/>
)
}
......
......@@ -43,14 +43,14 @@ const PendingReviewTwo: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/quote/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo/rfq/preview?id=${record.id}`}>{text}</EyePreview>
}]
return (
<ReviewList
......
......@@ -5,12 +5,11 @@ import Details from '../components/details';
const PendingSubmitDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={1}
id={id}
view={view}
/>
)
}
......
......@@ -29,13 +29,13 @@ const PendingSubmit: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/quote/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit/rfq/preview?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......
......@@ -5,12 +5,11 @@ import Details from '../components/details';
const QuoteOrderDetails: React.FC<{}> = () => {
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, view } = history.location.query;
const { id } = history.location.query;
return (
<Details
page_type={5}
id={id}
view={view}
/>
)
}
......
......@@ -27,13 +27,13 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/details?id=${record.id}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/quote/preview?id=${record.id}`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/details?id=${record.id}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment