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

商品询价加多几个路由

parent f3965b9d
...@@ -14,10 +14,10 @@ export default [ ...@@ -14,10 +14,10 @@ export default [
name: 'enquiryOrder', name: 'enquiryOrder',
component: '@/pages/transaction/goodsOffer/enquiryOrder' component: '@/pages/transaction/goodsOffer/enquiryOrder'
}, },
// 询价单查询详情 // 询价单查询查看详情
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/enquiryOrder/details', path: '/memberCenter/tranactionAbility/goodsOffer/enquiryOrder/preview',
name: 'enquiryOrderDetails', name: 'enquiryOrderPreview',
hideInMenu: true, hideInMenu: true,
component: '@/pages/transaction/goodsOffer/enquiryOrder/details' component: '@/pages/transaction/goodsOffer/enquiryOrder/details'
}, },
...@@ -48,7 +48,14 @@ export default [ ...@@ -48,7 +48,14 @@ export default [
hideInMenu: true, hideInMenu: true,
component: '@/pages/transaction/goodsOffer/addEnquiryOrder/edit' component: '@/pages/transaction/goodsOffer/addEnquiryOrder/edit'
}, },
// 待新增询价单详情 // 询价单查询查看详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/preview',
name: 'addEnquiryOrderPreview',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/enquiryOrder/details'
},
// 待新增询价单审核详情
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/details', path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/details',
name: 'addEnquiryOrderDetails', name: 'addEnquiryOrderDetails',
...@@ -61,7 +68,14 @@ export default [ ...@@ -61,7 +68,14 @@ export default [
name: 'pendingReviewOne', name: 'pendingReviewOne',
component: '@/pages/transaction/goodsOffer/pendingReviewOne' component: '@/pages/transaction/goodsOffer/pendingReviewOne'
}, },
// 待审核询价单(一级)详情 // 待审核询价单(一级)查看详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/preview',
name: 'pendingReviewOnePreview',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/pendingReviewOne/details'
},
// 待审核询价单(一级)审核详情
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/details', path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/details',
name: 'pendingReviewOneDetails', name: 'pendingReviewOneDetails',
...@@ -74,7 +88,14 @@ export default [ ...@@ -74,7 +88,14 @@ export default [
name: 'pendingReviewTwo', name: 'pendingReviewTwo',
component: '@/pages/transaction/goodsOffer/pendingReviewTwo' component: '@/pages/transaction/goodsOffer/pendingReviewTwo'
}, },
// 待审核询价单(二级)详情 // 待审核询价单(二级)查看详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/preview',
name: 'pendingReviewTwoPreview',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/pendingReviewTwo/details'
},
// 待审核询价单(二级)审核详情
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/details', path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/details',
name: 'pendingReviewTwoDetails', name: 'pendingReviewTwoDetails',
......
...@@ -169,16 +169,19 @@ export default { ...@@ -169,16 +169,19 @@ export default {
// 商品询价 // 商品询价
'menu.tranactionAbility.goodsOffer': '商品询价', 'menu.tranactionAbility.goodsOffer': '商品询价',
'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询', 'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询',
'menu.tranactionAbility.goodsOffer.enquiryOrderDetails': '询价单查询详情', 'menu.tranactionAbility.goodsOffer.enquiryOrderPreview': '询价单查询详情',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增询价单', 'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增询价单',
'menu.tranactionAbility.goodsOffer.rfq': '立即询价', 'menu.tranactionAbility.goodsOffer.rfq': '立即询价',
'menu.tranactionAbility.goodsOffer.add': '新建询价单', 'menu.tranactionAbility.goodsOffer.add': '新建询价单',
'menu.tranactionAbility.goodsOffer.edit': '编辑询价单', 'menu.tranactionAbility.goodsOffer.edit': '编辑询价单',
'menu.tranactionAbility.goodsOffer.addEnquiryOrderPreview': '待新增询价详情',
'menu.tranactionAbility.goodsOffer.addEnquiryOrderDetails': '待新增询价详情', 'menu.tranactionAbility.goodsOffer.addEnquiryOrderDetails': '待新增询价详情',
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核询价单(一级)', 'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核询价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewOneDetails': '待审核询价单(一级)详情', 'menu.tranactionAbility.goodsOffer.pendingReviewOneDetails': '待审核询价单(一级)详情',
'menu.tranactionAbility.goodsOffer.pendingReviewOnePreview': '待审核询价单(一级)详情',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核询价单(二级)', 'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核询价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwoDetails': '待审核询价单(二级)详情', 'menu.tranactionAbility.goodsOffer.pendingReviewTwoDetails': '待审核询价单(二级)详情',
'menu.tranactionAbility.goodsOffer.pendingReviewTwoPreview': '待审核询价单(二级)详情',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交询价单', 'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交询价单',
'menu.tranactionAbility.goodsOffer.pendingSubmitDetails': '待提交询价单详情', 'menu.tranactionAbility.goodsOffer.pendingSubmitDetails': '待提交询价单详情',
'menu.tranactionAbility.goodsOffer.quoteOrderDetails': '报价单查询详情', 'menu.tranactionAbility.goodsOffer.quoteOrderDetails': '报价单查询详情',
......
...@@ -657,7 +657,7 @@ const Detail: React.FC<{}> = () => { ...@@ -657,7 +657,7 @@ const Detail: React.FC<{}> = () => {
*/ */
const externalTextState = (text) => { const externalTextState = (text) => {
let name = '' let name = ''
dataInfo.externalRequisitionFormStateResponses.forEach(element => { dataInfo.externalQuotationStateResponses.forEach(element => {
if (element.state === text) { if (element.state === text) {
name = element.operationalProcess name = element.operationalProcess
} }
......
import React from 'react'; import React, {useState} from 'react';
import { history } from 'umi'; import { history } from 'umi';
import Datails from '../components/details'; import Datails from '../components/details';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
...@@ -7,11 +7,25 @@ const AddEnquiryOrderDatails:React.FC<{}> = () => { ...@@ -7,11 +7,25 @@ const AddEnquiryOrderDatails:React.FC<{}> = () => {
//type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单 //type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号 //view: 1.询价单号,2.报价单号
const { id } = history.location.query; const { id } = history.location.query;
const { pathname } = history.location;
const last = pathname.split('/')[pathname.split('/').length - 1];
const type = pathname.split('/')[pathname.split('/').length - 2];
const [view, setview] = useState<Number>(1);
if(last === 'details') {
// 代表是进来提交审核
} else if(type === 'rfq') {
// 代表的是查看询价
} else if(type === 'quote') {
// 代表的是查看报价
}
return( return(
<Datails <Datails
page_type={6} page_type={6}
id={id} id={id}
view={1} view={1}
action={true}
/> />
) )
} }
......
...@@ -31,7 +31,7 @@ const AddEnquiryOrder: React.FC<{}> = () => { ...@@ -31,7 +31,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '询价单摘要', title: '询价单摘要',
...@@ -91,7 +91,8 @@ const AddEnquiryOrder: React.FC<{}> = () => { ...@@ -91,7 +91,8 @@ const AddEnquiryOrder: React.FC<{}> = () => {
render: (text: any, record: any) => { render: (text: any, record: any) => {
return ( return (
<> <>
<Button type='link' disabled={record.interiorState !== 1} onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button> {/* <Button type='link' disabled={record.interiorState !== 1} onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button> */}
<Button type='link' disabled={record.interiorState !== 1} onClick={()=> history.push(`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/details?id=${record.id}`)}>提交审核</Button>
<Button type="link" disabled={record.interiorState !== 1 && record.interiorState !== 6 }><Link to={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit?id=${record.id}`}>编辑</Link></Button> <Button type="link" disabled={record.interiorState !== 1 && record.interiorState !== 6 }><Link to={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Popconfirm <Popconfirm
title="确定要删除吗?" title="确定要删除吗?"
...@@ -225,7 +226,7 @@ const AddEnquiryOrder: React.FC<{}> = () => { ...@@ -225,7 +226,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
</Card> </Card>
<AuditModal <AuditModal
id={id} id={id}
type={4} type={6}
dialogVisible={visible} dialogVisible={visible}
onCancel={() => setvisible(false)} onCancel={() => setvisible(false)}
onOK={handleModalOK} onOK={handleModalOK}
......
...@@ -35,7 +35,7 @@ const AuditModal: React.FC<Params> = (props) => { ...@@ -35,7 +35,7 @@ const AuditModal: React.FC<Params> = (props) => {
let value = { ...values } let value = { ...values }
value.id = props.id value.id = props.id
switch (props.type) { switch (props.type) {
case 1: case 6:
PublicApi.postOrderInquirySubmit(value).then(res => { PublicApi.postOrderInquirySubmit(value).then(res => {
if(res.code === 1000) { if(res.code === 1000) {
props.onOK() props.onOK()
......
...@@ -23,14 +23,17 @@ export const HEADER_WRAPPER_TEXTS = { ...@@ -23,14 +23,17 @@ export const HEADER_WRAPPER_TEXTS = {
export interface parmas { export interface parmas {
page_type?: any, page_type?: any,
id?: any, id?: any,
view?: any view?: any,
action?: boolean
} }
const Details: React.FC<parmas> = (props) => { const Details: React.FC<parmas> = (props) => {
const [visible, setvisible] = useState(false) const [visible, setvisible] = useState(false)
//type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单 //type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号 //view: 1.询价单号,2.报价单号
const { id, page_type, view } = props; //action: 审核按钮
const { id, page_type, view, action } = props;
console.log(action)
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]); const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换 // steps 切换
const [detailData, setDetailData] = useState<any>({ const [detailData, setDetailData] = useState<any>({
...@@ -310,7 +313,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -310,7 +313,7 @@ const Details: React.FC<parmas> = (props) => {
extra={ extra={
<> <>
{ {
((Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 4)) && (action === true && (Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 3)) &&
<> <>
<Button type='primary' className={style['saveBtn']} onClick={() => { setvisible(true) }}> <Button type='primary' className={style['saveBtn']} onClick={() => { setvisible(true) }}>
<CheckSquareOutlined />单据审核 <CheckSquareOutlined />单据审核
...@@ -318,7 +321,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -318,7 +321,7 @@ const Details: React.FC<parmas> = (props) => {
</> </>
} }
{ {
(Number(page_type) === 1 && data.externalState === 1 && data.interiorState === 3) && ( action === true && Number(page_type) === 6 && data.interiorState === 1) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}> <Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交 <CheckSquareOutlined />提交
</Button> </Button>
......
...@@ -100,7 +100,12 @@ const ReviewList: React.FC<parmas> = (props) => { ...@@ -100,7 +100,12 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作', title: '操作',
key: 'options', key: 'options',
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any) => <Button disabled={record.interiorState === 1 && record.interiorState === 3} type='link' onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button> render: (text: any, record: any) =>
<>
{type === 2 && <Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/details?id=${record.id}`)}>审核</Button>}
{type === 3 && <Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/details?id=${record.id}`)}>审核</Button>}
</>
}, },
] ]
const format = (text) => { const format = (text) => {
......
...@@ -27,7 +27,7 @@ const EnquiryOrder: React.FC<{}> = (props) => { ...@@ -27,7 +27,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/enquiryOrder/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/goodsOffer/enquiryOrder/preview?id=${record.id}`}>{text}</EyePreview>
}, { }, {
title: '询价单摘要', title: '询价单摘要',
key: 'details', key: 'details',
......
...@@ -12,6 +12,7 @@ const PendingReviewOneDatails:React.FC<{}> = () => { ...@@ -12,6 +12,7 @@ const PendingReviewOneDatails:React.FC<{}> = () => {
page_type={2} page_type={2}
id={id} id={id}
view={1} view={1}
action={true}
/> />
) )
} }
......
...@@ -42,7 +42,7 @@ const PendingReviewOne: React.FC<{}> = () => { ...@@ -42,7 +42,7 @@ const PendingReviewOne: React.FC<{}> = () => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne/preview?id=${record.id}`}>{text}</EyePreview>
} }
return ( return (
<ReviewList <ReviewList
......
...@@ -12,6 +12,7 @@ const PendingReviewTwoDatails:React.FC<{}> = () => { ...@@ -12,6 +12,7 @@ const PendingReviewTwoDatails:React.FC<{}> = () => {
page_type={3} page_type={3}
id={id} id={id}
view={1} view={1}
action={true}
/> />
) )
} }
......
...@@ -42,7 +42,7 @@ const PendingReviewTwo: React.FC<{}> = () => { ...@@ -42,7 +42,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo/preview?id=${record.id}`}>{text}</EyePreview>
} }
return ( return (
<ReviewList <ReviewList
......
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