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

确认询价报价接口接入

parent e9a46aaa
......@@ -360,13 +360,13 @@ const TranactionRoute = {
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/add'
},
// 待审核价单(一级)
// 待审核价单(一级)
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne',
name: 'pendingReviewOne',
component: '@/pages/transaction/inquiryQuote/pendingReviewOne'
},
// 待审核价单(二级)
// 待审核价单(二级)
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo',
name: 'pendingReviewTwo',
......
......@@ -123,11 +123,11 @@ export default {
// 确认询价报价
'menu.tranactionAbility.confirmInquiryQuote': '确认询价报价',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.confirmInquiryQuote.details': '新建价单',
'menu.tranactionAbility.confirmInquiryQuote.details': '新建价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReview': '待提交审核报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmit': '待提交询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmit': '待确认报价单',
// 商品询价
'menu.tranactionAbility.goodsOffer': '商品询价',
'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询',
......@@ -141,12 +141,12 @@ export default {
'menu.tranactionAbility.inquiryQuote': '询价报价',
'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.inquiryQuote.addInquiryOrder': '待新增价单',
'menu.tranactionAbility.inquiryQuote.add': '新建价单',
'menu.tranactionAbility.inquiryQuote.details': '新建价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.inquiryQuote.pendingSubmit': '待提交价单',
'menu.tranactionAbility.inquiryQuote.addInquiryOrder': '待新增价单',
'menu.tranactionAbility.inquiryQuote.add': '新建价单',
'menu.tranactionAbility.inquiryQuote.details': '新建价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.inquiryQuote.pendingSubmit': '待提交价单',
//进销存
'menu.tranactionAbility.stockSellStorage': '进销存',
'menu.tranactionAbility.stockSellStorage.warehouse': '仓库',
......
......@@ -131,5 +131,45 @@ export const filterInternalState = [
}
]
/**
* @description: 商品询价外部状态筛选
* @param {type}
* @return {type} 内
*/
export const filterExternalStateLabelList = [
{
label: '待提交', value: 1
},
{
label: '待确认', value: 2
},
{
label: '接受报价', value: 3
},
{
label: '不接受报价', value: 4
}
]
/**
* @description: 商品询价内部状态筛选
* @param {type}
* @return {type} 内
*/
export const filterInternalStateLabelList = [
{
label: '待提交审核', value: 1
},
{
label: '待审核', value: 2
},
{
label: '审核通过', value: 3
},
{
label: '审核不通过', value: 4
}
]
......@@ -42,15 +42,17 @@ const AuditModal: React.FC<Params> = (props) => {
}
})
break;
// 待审核报价单1级
case 2:
PublicApi.postOrderProductQuotationtAuditSubmit(value).then(res => {
PublicApi.postOrderNotarizeEnquiryQuotedPriceAudit(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
})
break;
// 待审核报价单2级
case 3:
PublicApi.postOrderProductQuotationtAuditSubmitTwo(value).then(res => {
PublicApi.postOrderNotarizeEnquiryQuotedPriceAuditTwo(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
......@@ -59,9 +61,6 @@ const AuditModal: React.FC<Params> = (props) => {
}
}
/**操作 */
return (
<Modal
title='单据审核'
......
......@@ -26,9 +26,9 @@ export const HEADER_WRAPPER_TEXTS = {
const Details: React.FC<{}> = () => {
const [visible, setvisible] = useState(false)
//type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, type, view } = history.location.query;
const { id, page_type, view } = history.location.query;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换
const [detailData, setDetailData] = useState<any>({
......@@ -95,7 +95,7 @@ const Details: React.FC<{}> = () => {
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 3,
interiorState: 1,
fullAddress: '东莞市石龙镇西葫芦53号',
offer: '报价要求',
paymentType: '付款方式',
......@@ -276,37 +276,12 @@ const Details: React.FC<{}> = () => {
}
// 详情请求
useEffect(() => {
switch (Number(type)) {
case 1:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 2:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 3:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
switch (Number(page_type)) {
case 4:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 5:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
default:
PublicApi.getOrderNotarizeEnquiryQuotedPriceDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
......@@ -360,20 +335,20 @@ const Details: React.FC<{}> = () => {
extra={
<>
{
(Number(type) === 4 && data.interiorState === 1) &&
<>
<Button>
<StopOutlined />审核不通过
</Button>
<Button className={style['saveBtn']}>
<CheckSquareOutlined />审核通过
</Button>
</>
(Number(page_type) ===5 && data.interiorState === 1) &&
<Button className={style['saveBtn']} onClick={()=>setvisible(true)}>
<CheckSquareOutlined />提交审核
</Button>
}
{
(Number(type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
((Number(page_type) ===2 ||Number(page_type) ===3) && data.interiorState === 2) &&
<Button className={style['saveBtn']} onClick={()=>setvisible(true)}>
<CheckSquareOutlined />审核
</Button>
}{
(Number(page_type) ===1 && (data.interiorState === 3 || data.interiorState === 4)) &&
<Button className={style['saveBtn']} onClick={()=>setvisible(true)}>
<CheckSquareOutlined />提交
<CheckSquareOutlined />提交报价单
</Button>
}
</>
......@@ -382,7 +357,7 @@ const Details: React.FC<{}> = () => {
< div className={style['headerMain']} >
<div className={style['headerMain-left']}>
{
Number(type) !== 4 &&
Number(page_type) !== 4 &&
<div className={style['headerMain-left-option']}>
<div>询价单号:</div>
<div><a>{data.inquiryListNo}</a> </div>
......@@ -411,7 +386,7 @@ const Details: React.FC<{}> = () => {
>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
Number(page_type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转</div>
<Steps
......@@ -475,10 +450,10 @@ const Details: React.FC<{}> = () => {
<Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].leftElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -494,7 +469,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].centerElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -509,7 +484,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].rightElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -543,7 +518,7 @@ const Details: React.FC<{}> = () => {
</Card>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
Number(page_type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转记录</div>
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
......@@ -561,7 +536,7 @@ const Details: React.FC<{}> = () => {
</Card>
<AuditModal
id={id}
type={type}
type={page_type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
......
......@@ -55,14 +55,14 @@ const ReviewList: React.FC<parmas> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=${type}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=${type}&view=2`}>{text}</EyePreview>
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=${type}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=${type}&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......
......@@ -42,7 +42,7 @@ const PendingReviewOne: React.FC<{}> = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderAuditProductQuotationList({...params}).then(res => {
// PublicApi.getOrderNotarizeEnquiryQuotedPriceAuditList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
......@@ -54,7 +54,7 @@ const PendingReviewOne: React.FC<{}> = () => {
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderProductQuotationtAuditAll({ ids: selectRow }).then(res => {
PublicApi.postOrderNotarizeEnquiryQuotedPriceAuditAll({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
......
......@@ -42,7 +42,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderAuditProductQuotationListTwo({...params}).then(res => {
// PublicApi.getOrderNotarizeEnquiryQuotedPriceAuditListTwo({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
......@@ -54,7 +54,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderProductQuotationtAuditAllTwo({ ids: selectRow }).then(res => {
PublicApi.postOrderNotarizeEnquiryQuotedPriceAuditAllTwo({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
......
......@@ -7,21 +7,22 @@ import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { createFormActions} from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import { pendingReviewSchema } from '../schema/pendingReview';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import AuditModal from '../components/auditModel';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PendingSubmit: React.FC<{}> = () => {
const ref = useRef<any>({});
const [id, setId] = useState<any>(0);
const [visible, setvisible] = useState<boolean>(false);
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const columns: ColumnType<any>[] = [{
......@@ -29,13 +30,13 @@ const PendingSubmit: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=1&view=2`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=1&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -74,7 +75,7 @@ const PendingSubmit: React.FC<{}> = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交报价单</Link></Button>
render: (text: any, record: any) => <Button disabled={record.interiorState !== 1 || record.interiorState !== 2} type='link' onClick={() => { setId(record.id); setvisible(true)}}>提交报价单</Button>
}]
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
......@@ -115,7 +116,7 @@ const PendingSubmit: React.FC<{}> = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
// PublicApi.getOrderNotarizeEnquiryQuotedPriceAffirmList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
......@@ -140,7 +141,12 @@ const PendingSubmit: React.FC<{}> = () => {
ref.current.reload()
})
}
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper>
<Card>
......@@ -167,6 +173,13 @@ const PendingSubmit: React.FC<{}> = () => {
>
</StandardTable>
</Card>
<AuditModal
id={id}
type={1}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
}
......
import React, { useRef, useState } from 'react';
import { history, Link } from 'umi';
import { Button, Card, Space, Row, Col, Dropdown, Menu, Popconfirm } from 'antd';
import { PlusOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons';
import { Button, Card, Space, Row, Col} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import {
interiorState, interiorStateTwo,
quoteOrderInternalState, enquirySearchexternalState,
inquiryQuoteOuterState
} from '../../common/tableStatusList';
import { quoteOrderInternalState,inquiryQuoteOuterState } from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { createFormActions } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { commonEnquieryOfferSchema } from '../schema';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import AuditModal from '../components/auditModel';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PendingSubmitReview: React.FC<{}> = () => {
const ref = useRef<any>({});
const [id, setId] = useState<any>(0);
const [visible, setvisible] = useState<boolean>(false);
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const columns: ColumnType<any>[] = [{
......@@ -33,19 +29,19 @@ const PendingSubmitReview: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=5&view=2`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=5&view=1`}>{text}</EyePreview>
}, {
title: '价单摘要',
title: '价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '价会员',
title: '价会员',
key: 'memberName',
dataIndex: 'memberName',
},{
......@@ -77,7 +73,7 @@ const PendingSubmitReview: React.FC<{}> = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交审核</Link></Button>
render: (text: any, record: any) => <Button disabled={record.interiorState !== 1} type='link' onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button>
}];
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
......@@ -104,7 +100,7 @@ const PendingSubmitReview: React.FC<{}> = () => {
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 1,
id: 100,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
......@@ -124,17 +120,25 @@ const PendingSubmitReview: React.FC<{}> = () => {
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
interiorState: 2
}]
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderNotarizeEnquiryQuotedPriceList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper>
<Card>
......@@ -160,6 +164,13 @@ const PendingSubmitReview: React.FC<{}> = () => {
>
</StandardTable>
</Card>
<AuditModal
id={id}
type={5}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
}
......
......@@ -23,19 +23,19 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=4&view=2`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&page_type=4&view=1`}>{text}</EyePreview>
}, {
title: '价单摘要',
title: '价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '价会员',
title: '价会员',
key: 'memberName',
dataIndex: 'memberName',
},{
......@@ -82,7 +82,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderProductQuotationList({...params}).then(res => {
// PublicApi.getOrderNotarizeEnquiryQuotedPriceList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
......
......@@ -24,7 +24,6 @@ const AddQuotes: React.FC<{}> = () => {
const handleGetDetails = async () => {
await PublicApi.getOrderInquiryListDetails({ id }).then(res => {
if (res.code === 1000) {
console.log(res.data);
setgoodsList(res.data.inquiryListProductRequests);
setEditData(res.data)
}
......
......@@ -77,34 +77,34 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
}
// 模拟数据
const data = {
totalCount: 2,
data: [{
memberId: 6,
name: '测试会员数据',
roleId: 5,
roleName: '可可西',
memberTypeName: '超级会员',
level: 1,
levelTag: '倔强铂金'
},{
memberId: 7,
name: '测试会员数据',
roleId: 5,
roleName: '可可西',
memberTypeName: '超级会员',
level: 1,
levelTag: '倔强铂金'
}]
}
// const data = {
// totalCount: 2,
// data: [{
// memberId: 6,
// name: '测试会员数据',
// roleId: 5,
// roleName: '可可西',
// memberTypeName: '超级会员',
// level: 1,
// levelTag: '倔强铂金'
// },{
// memberId: 7,
// name: '测试会员数据',
// roleId: 5,
// roleName: '可可西',
// memberTypeName: '超级会员',
// level: 1,
// levelTag: '倔强铂金'
// }]
// }
const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => {
// PublicApi.getMemberManageLowerMerchantProviderPage(params).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data);
}, 500);
PublicApi.getMemberManageLowerMerchantProviderPage(params).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data);
// }, 500);
});
}
// 选择会员弹框结束
......
......@@ -170,59 +170,61 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}]
// 模拟数据
const data = [{
commodityId: 1,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
// const data = [{
// commodityId: 1,
// name: '进口头层黄牛皮荔枝纹/红色/XXL',
// customerCategoryName: '牛皮',
// brandName: 'PELLE',
// unitName: '个',
}, {
commodityId: 2,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
}, {
commodityId: 3,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
// }, {
// commodityId: 2,
// name: '进口头层黄牛皮荔枝纹/红色/XXL',
// customerCategoryName: '牛皮',
// brandName: 'PELLE',
// unitName: '个',
// }, {
// commodityId: 3,
// name: '进口头层黄牛皮荔枝纹/红色/XXL',
// customerCategoryName: '牛皮',
// brandName: 'PELLE',
// unitName: '个',
}, {
commodityId: 4,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
}, {
commodityId: 5,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
// }, {
// commodityId: 4,
// name: '进口头层黄牛皮荔枝纹/红色/XXL',
// customerCategoryName: '牛皮',
// brandName: 'PELLE',
// unitName: '个',
// }, {
// commodityId: 5,
// name: '进口头层黄牛皮荔枝纹/红色/XXL',
// customerCategoryName: '牛皮',
// brandName: 'PELLE',
// unitName: '个',
}]
// }]
const fetchGoodsList = async (params) => {
// const res = await PublicApi.getMemberManageLowerProviderPage(params)
// return res.data
return new Promise((resolve, reject) => {
console.log(data, params)
setTimeout(() => {
resolve({
code: 200,
message: '',
data: data,
});
}, 1000);
});
const res = await PublicApi.getMemberManageLowerProviderPage(params)
return res.data
// return new Promise((resolve, reject) => {
// console.log(data, params)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: data,
// });
// }, 1000);
// });
}
// 选择会员弹框结束
useEffect(() => {
// 重选会员清掉已选择的商品
setgoodsList([]);
memberRowCtl.setSelectRow(goodsList)
memberRowCtl.setSelectedRowKeys(goodsList.map(v => v.productId))
}, [memberList])
// 添加商品
const addGoods = () => {
......
......@@ -28,7 +28,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&type=6&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&page_type=6&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......@@ -117,22 +117,22 @@ const AddEnquiryOrder: React.FC<{}> = () => {
},
}
//列表数据
const data = {
totalCount: 2,
data: [{
id: 100,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 2,
interiorState: 2
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 100,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 2,
// interiorState: 2
// }]
// }
const fetchData = async (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getOrderInquiryList({ ...params }).then(res => {
......
......@@ -23,7 +23,7 @@ const Details: React.FC<{}> = () => {
const [visible, setvisible] = useState(false)
//type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, type, view } = history.location.query;
const { id, page_type, view } = history.location.query;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换
const [detailData, setDetailData] = useState<any>({
......@@ -313,7 +313,7 @@ const Details: React.FC<{}> = () => {
extra={
<>
{
((Number(type) === 2 || Number(type) === 3) && (data.interiorState === 2 || data.interiorState === 4)) &&
((Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 4)) &&
<>
<Button type='primary' className={style['saveBtn']} onClick={() => {setvisible(true)}}>
<CheckSquareOutlined />单据审核
......@@ -321,7 +321,7 @@ const Details: React.FC<{}> = () => {
</>
}
{
(Number(type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
(Number(page_type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交
</Button>
......@@ -394,10 +394,10 @@ const Details: React.FC<{}> = () => {
<Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].leftElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -413,7 +413,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].centerElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -428,7 +428,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].rightElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -472,7 +472,7 @@ const Details: React.FC<{}> = () => {
</Card>
<AuditModal
id={id}
type={type}
type={page_type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
......
......@@ -53,7 +53,7 @@ const ReviewList: React.FC<parmas> = (props) => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&type=${type}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&page_type=${type}&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......
......@@ -23,7 +23,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&type=4&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&page_type=4&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -63,29 +63,29 @@ const EnquiryOrder: React.FC<{}> = (props) => {
quoteOrderInternalState(text)
}];
//交易能力 询价报价 询价单查询
const data = {
totalCount: 1,
data: [{
id: 91,
inquiryListNo: 'SD2015PPLJ',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
memberId: 5,
deliveryTime: '2020-10-14 15:37:00',
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 2
}]
}
// const data = {
// totalCount: 1,
// data: [{
// id: 91,
// inquiryListNo: 'SD2015PPLJ',
// details: '阿珍爱上阿强',
// memberName: 'wutiaoren',
// memberId: 5,
// deliveryTime: '2020-10-14 15:37:00',
// quotationAsTime: '2020-10-13 15:37:00',
// voucherTime: '2020-10-13 15:37:00',
// externalState: 1,
// interiorState: 2
// }]
// }
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderProductInquiryList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 1000)
PublicApi.getOrderProductInquiryList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 1000)
})
}
// 搜索
......
......@@ -13,41 +13,41 @@ const PendingReviewOne: React.FC<{}> = () => {
console.log(values, '我是多选的id')
}
// 列表数据
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 100,
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 2
}, {
id: 2,
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
deliveryTime: '2020-10-12 13:59:00',
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = { // 模拟的数据
// totalCount: 6,
// data: [{
// id: 100,
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 2
// }, {
// id: 2,
// inquiryListNo: 'SZX125LIP',
// details: '模拟的数据10086',
// memberName: '打喷嚏',
// memberId: 1,
// deliveryTime: '2020-10-12 13:59:00',
// quotationAsTime: '2020-10-14 23:59:00',
// voucherTime: '2020-10-12 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderInquiryToAuditList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.getOrderInquiryToAuditList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
// 批量操作
......
......@@ -13,41 +13,41 @@ const PendingReviewTwo: React.FC<{}> = () => {
console.log(values, '我是多选的id')
}
// 列表数据
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 1,
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}, {
id: 2,
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
deliveryTime: '2020-10-12 13:59:00',
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = { // 模拟的数据
// totalCount: 6,
// data: [{
// id: 1,
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }, {
// id: 2,
// inquiryListNo: 'SZX125LIP',
// details: '模拟的数据10086',
// memberName: '打喷嚏',
// memberId: 1,
// deliveryTime: '2020-10-12 13:59:00',
// quotationAsTime: '2020-10-14 23:59:00',
// voucherTime: '2020-10-12 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderInquiryToAuditListTwo({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.getOrderInquiryToAuditListTwo({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
// 批量操作
......
......@@ -30,7 +30,7 @@ const PendingSubmit: React.FC<{}> = () => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&type=1&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}&page_type=1&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......@@ -102,30 +102,30 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderSubmitInquirySheetList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.getOrderSubmitInquirySheetList({ ...params }).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
......
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList'
import {TimeList, filterExternalStateLabelList, filterInternalStateLabelList} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
......@@ -279,7 +279,7 @@ export const enquieryOfferSearchSchema: ISchema = {
},
voucherTime:{
type:'string',
default: 0,
// default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
......@@ -287,19 +287,19 @@ export const enquieryOfferSearchSchema: ISchema = {
},
externalState:{
type:'string',
default: 0,
// default: 0,
"x-component-props":{
placeholder:'外部状态'
},
enum: []
enum: filterExternalStateLabelList
},
interiorState :{
type:'string',
default: 0,
// default: 0,
"x-component-props":{
placeholder:'内部状态'
},
enum: []
enum: filterInternalStateLabelList
},
}
},
......
......@@ -163,14 +163,19 @@ const BasicInfo: React.FC<queryProps> = (props) => {
form={basicform}
className={styles.revise_style}
>
<Form.Item label='价单摘要' name='details' rules={[{ required: true, message: '请输入询价单摘要' }]}>
<Form.Item label='价单摘要' name='details' rules={[{ required: true, message: '请输入询价单摘要' }]}>
<Input />
</Form.Item>
<Form.Item label='被询价会员' name='memberName' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Form.Item label='对应询价单号' name='memberName' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Search value={memberList.length > 0 ? memberList[0].name : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={()=>setVisibleChannelMember(true)} />
<Button type='link'>查看会员详情</Button>
</Form.Item>
<Form.Item label='询价单号' name='orderNumber'>
<Form.Item label='报价单号' name='orderNumber'>
<span>{Object.keys(editData).length > 0 ? editData.inquiryListNo : '-'}</span>
</Form.Item>
<Form.Item label='询价会员' name='time'>
<span>{Object.keys(editData).length > 0 ? editData.voucherTime : '-'}</span>
</Form.Item>
<Form.Item label='报价截止时间' name='orderNumber'>
<span>{Object.keys(editData).length > 0 ? editData.inquiryListNo : '-'}</span>
</Form.Item>
<Form.Item label='单据时间' name='time'>
......
......@@ -22,19 +22,18 @@ const AddInquiryOrder: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectRow, setSelectRow] = useState([]);
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const [visible, setvisible] = useState<boolean>(false)
const columns: ColumnType<any>[] = [{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=6&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=6&view=2`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=6&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=6&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -72,19 +71,22 @@ const AddInquiryOrder: React.FC<{}> = () => {
{
title: '操作',
key: 'options',
width: 230,
dataIndex: 'options',
render: (text: any, record: any) => {
console.log(record.interiorState)
return (
<>
<Button type='link'>提交审核</Button>
<Dropdown
visible={visible}
onVisibleChange={(visible) => onVisibleChange(visible) }
overlay={() => optionmenu(record)}
trigger={['click']}>
<Button type='link'>更多 <DownOutlined /></Button>
</Dropdown>
<Button type="link">编辑</Button>
<Popconfirm
destroyTooltipOnHide
title="确定要删除吗?"
okText="是"
cancelText="否"
>
<Button type="link">删除</Button>
</Popconfirm>
</>
)
}
......@@ -92,10 +94,6 @@ const AddInquiryOrder: React.FC<{}> = () => {
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const onVisibleChange = (visible:boolean) => {
console.log(visible)
setvisible(visible)
}
//多选
const rowSelection = {
selectedRowKeys: selectedRowKeys,
......@@ -113,24 +111,6 @@ const AddInquiryOrder: React.FC<{}> = () => {
</Menu.Item>
</Menu>
)
//更多操作
const optionmenu = (record: any) => {
return (
<Menu>
<Menu.Item key='1'><Button type="link" onClick={() => onVisibleChange(false)}>编辑</Button></Menu.Item>
<Menu.Item key='2'>
<Popconfirm
destroyTooltipOnHide
title="确定要删除吗?"
okText="是"
cancelText="否"
>
<Button type="link">删除</Button>
</Popconfirm>
</Menu.Item>
</Menu>
)
}
//列表数据
const data = {
totalCount: 2,
......
......@@ -2,13 +2,10 @@ import React, { useState, useEffect } from 'react';
import style from './index.less'
import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import { StopOutlined, CheckSquareOutlined, LinkOutlined } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import AuditModal from '../components/auditModel';
import { PublicApi } from '@/services/api';
......@@ -26,9 +23,9 @@ export const HEADER_WRAPPER_TEXTS = {
const Details: React.FC<{}> = () => {
const [visible, setvisible] = useState(false)
//type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//page_type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id, type, view } = history.location.query;
const { id, page_type, view } = history.location.query;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换
const [detailData, setDetailData] = useState<any>({
......@@ -267,28 +264,7 @@ const Details: React.FC<{}> = () => {
}
// 详情请求
useEffect(() => {
switch (Number(type)) {
case 1:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 2:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 3:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
switch (Number(page_type)) {
case 4:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
......@@ -296,14 +272,7 @@ const Details: React.FC<{}> = () => {
}
})
break;
case 5:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 6:
default:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
......@@ -358,7 +327,7 @@ const Details: React.FC<{}> = () => {
extra={
<>
{
(Number(type) === 4 && data.interiorState === 1) &&
(Number(page_type) === 4 && data.interiorState === 1) &&
<>
<Button>
<StopOutlined />审核不通过
......@@ -369,7 +338,7 @@ const Details: React.FC<{}> = () => {
</>
}
{
(Number(type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
(Number(page_type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交
</Button>
......@@ -380,7 +349,7 @@ const Details: React.FC<{}> = () => {
< div className={style['headerMain']} >
<div className={style['headerMain-left']}>
{
Number(type) !== 4 &&
Number(page_type) !== 4 &&
<div className={style['headerMain-left-option']}>
<div>询价单号:</div>
<div><a>{data.inquiryListNo}</a> </div>
......@@ -395,7 +364,7 @@ const Details: React.FC<{}> = () => {
<div>{item.label}</div>
<div>
{item.name === 'externalState' ?
<StatusColors status={item.value} type='inquiry' /> :
inquiryQuoteOuterState(item.value) :
item.name === 'interiorState' ?
quoteOrderInternalState(item.value) :
item.value
......@@ -409,7 +378,7 @@ const Details: React.FC<{}> = () => {
>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
Number(page_type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转</div>
<Steps
......@@ -473,10 +442,10 @@ const Details: React.FC<{}> = () => {
<Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].leftElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -492,7 +461,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].centerElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -507,7 +476,7 @@ const Details: React.FC<{}> = () => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].rightElem.map(
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -541,7 +510,7 @@ const Details: React.FC<{}> = () => {
</Card>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
Number(page_type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转记录</div>
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
......@@ -559,7 +528,7 @@ const Details: React.FC<{}> = () => {
</Card>
<AuditModal
id={id}
type={type}
type={page_type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
......
......@@ -7,15 +7,12 @@ import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { createFormActions } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { pendingReviewSchema } from '../schema/pendingReview';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import AuditModal from './auditModel';
import EyePreview from '@/components/EyePreview';
......@@ -56,14 +53,14 @@ const ReviewList: React.FC<parmas> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=${type}&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=${type}&view=2`}>{text}</EyePreview>
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=${type}&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=${type}&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......@@ -92,7 +89,7 @@ const ReviewList: React.FC<parmas> = (props) => {
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='out' />
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
......
......@@ -9,9 +9,8 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import {searchSelectGetSelectCategoryOptionEffect} from '../../effect/index'
import { ColumnType } from 'antd/lib/table/interface';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { filterExternalState } from './../../common/statusList';
import { inquiryQuoteOuterState } from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
......@@ -24,7 +23,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=4&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=4&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -52,7 +51,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='inquiry' />
render: text => inquiryQuoteOuterState(text)
}, {
title: '操作',
key: 'options',
......
......@@ -13,8 +13,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import { pendingReviewSchema } from '../schema/pendingReview';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
......@@ -27,13 +26,13 @@ const PendingSubmit: React.FC<{}> = () => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=1&view=2`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=1&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -57,7 +56,7 @@ const PendingSubmit: React.FC<{}> = () => {
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='inquiry' />
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
......@@ -72,7 +71,7 @@ const PendingSubmit: React.FC<{}> = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交报价单</Link></Button>
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=1&view=1`}>提交报价单</Link></Button>
}]
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
......
import React, { useRef, useEffect } from 'react';
import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button } from 'antd';
import { Card } from 'antd';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
......@@ -10,8 +10,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { searchSelectGetSelectCategoryOptionEffect } from '../../effect/index'
import { ColumnType } from 'antd/lib/table/interface';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
......@@ -24,13 +23,13 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=5&view=2`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&page_type=5&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -54,7 +53,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='inquiry' />
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
......
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList, filterExternalState, filterInternalState} from '../../common/statusList'
import {TimeList, filterExternalStateLabelList, filterInternalStateLabelList} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
......@@ -289,7 +289,7 @@ export const enquieryOfferSearchSchema: ISchema = {
"x-component-props":{
placeholder:'外部状态'
},
enum: TimeList
enum: filterExternalStateLabelList
},
}
},
......@@ -458,14 +458,14 @@ export const quoteFormSearch: ISchema = {
"x-component-props":{
placeholder:'外部状态'
},
enum: []
enum: filterExternalStateLabelList
},
interiorState :{
type:'string',
"x-component-props":{
placeholder:'内部状态'
},
enum: []
enum: filterInternalStateLabelList
},
}
},
......
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