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

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents f88ee4ba a8ed6d6d
...@@ -38,8 +38,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -38,8 +38,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'number', dataIndex: 'number',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{text}</Text> <Text type='secondary' key={'number_1'}>{text}</Text>
<Text type='secondary'>{record.name}</Text> <Text type='secondary' key={'number_2'}>{record.name}</Text>
</Space> </Space>
) )
}, },
...@@ -51,8 +51,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -51,8 +51,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'unit', dataIndex: 'unit',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{record.purchaseCount}</Text> <Text type='secondary' key={'unit_1'} >{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text> <Text type='secondary' key={'unit_2'} >{text}</Text>
</Space> </Space>
) )
}, },
...@@ -61,8 +61,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -61,8 +61,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'isTax', dataIndex: 'isTax',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{transforType[text]}</Text> <Text type='secondary' key={'isTax_1'} >{transforType[text]}</Text>
<Text type='secondary'>{`${record.taxRate ? `${record.taxRate}%` : ''}`}</Text> <Text type='secondary' key={'isTax_2'} >{`${record.taxRate ? `${record.taxRate}%` : ''}`}</Text>
</Space> </Space>
) )
}, },
...@@ -96,7 +96,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -96,7 +96,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}> <Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess?.map((item, index) => { {awardProcess?.map((item, index) => {
return ( return (
<Col span={7} key={item.id} onClick={() => { chooseItem(item, index) }}> <Col span={7} key={`${item.id}_${item.peportTime}`} onClick={() => { chooseItem(item, index) }}>
<BtnItem btnType={btnType} detail={{ ...item, isOpenPurchase, isOpenRanking }} active={index === activeIndex} /> <BtnItem btnType={btnType} detail={{ ...item, isOpenPurchase, isOpenRanking }} active={index === activeIndex} />
</Col> </Col>
) )
......
...@@ -107,7 +107,7 @@ const BidProgressDrawer: React.FC<BidProgressDrawerProps> = (props: any) => { ...@@ -107,7 +107,7 @@ const BidProgressDrawer: React.FC<BidProgressDrawerProps> = (props: any) => {
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}> <Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess?.length > 0 && awardProcess?.map((item, index) => { {awardProcess?.length > 0 && awardProcess?.map((item, index) => {
return ( return (
<Col span={7} key={item.id} onClick={() => { chooseItem(item,index) }}> <Col span={7} key={`${item.id}_${item.peportTime}`} onClick={() => { chooseItem(item,index) }}>
<BtnItem detail={item} active={index === activeIndex} /> <BtnItem detail={item} active={index === activeIndex} />
</Col> </Col>
) )
......
...@@ -19,7 +19,7 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => { ...@@ -19,7 +19,7 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
const { title, chartsList } = props; const { title, chartsList } = props;
const [listLen, setListLen] = useState(7); const [listLen, setListLen] = useState(7);
const data = useMemo(() => { const data = useMemo(() => {
return chartsList ? chartsList.reduce((total, cur) => total.concat(cur?.list ? (listLen ? [...cur.list].splice(0, listLen) : [...cur.list]) : []), []) : [] return chartsList ? chartsList.reduce((total, cur) => total.concat(cur?.list ? (listLen ? [...cur.list].slice(-listLen) : [...cur.list]) : []), []) : []
}, [chartsList, listLen]); }, [chartsList, listLen]);
const scaleObj = useMemo(() => { const scaleObj = useMemo(() => {
let _obj = {}; let _obj = {};
......
...@@ -21,7 +21,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => { ...@@ -21,7 +21,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
if (detail.isOpenRanking) { if (detail.isOpenRanking) {
return null; return null;
} else { } else {
const _number = Number(detail?.ranking); const _number = Number(detail?.ranking ?? 0);
switch (_number) { switch (_number) {
case 1: case 1:
return <img src={level1} alt="第一名" className={styles.icon} />; return <img src={level1} alt="第一名" className={styles.icon} />;
......
import React, { useState, useEffect, useMemo } from 'react'; import React, { useState, useEffect, useMemo } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Row, Col, Input, Drawer, Table, Space, Typography } from 'antd'; import { Row, Col, Input, Drawer, Table, Space, Typography, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import BtnItem from '../../../../../../components/detail/components/bidDetailBtnItem'; import BtnItem from '../../../../../../components/detail/components/bidDetailBtnItem';
...@@ -35,8 +35,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -35,8 +35,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
dataIndex: 'number', dataIndex: 'number',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{text}</Text> <Text type='secondary' key={'number_1'} >{text}</Text>
<Text type='secondary'>{record.name}</Text> <Text type='secondary' key={'number_2'}>{record.name}</Text>
</Space> </Space>
) )
}, },
...@@ -48,8 +48,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -48,8 +48,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
dataIndex: 'unit', dataIndex: 'unit',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{record.purchaseCount}</Text> <Text type='secondary' key={'unit_1'} >{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text> <Text type='secondary' key={'unit_2'} >{text}</Text>
</Space> </Space>
) )
}, },
...@@ -113,12 +113,21 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -113,12 +113,21 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
} }
const bidOk = () => { const bidOk = () => {
// const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0); const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
// console.log(_price) if (Number(detail.minLowPrice) - _price < detail.minPrice) {
message.error('当前报价金额不满足最小价差要求,请修改后再报价!');
return;
}
let _dataSource2 = dataSource2.map((item) => {
if (!item.taxRate || item.taxRate == '0') {
item.isTax = 0;
}
return item;
})
const _params = { const _params = {
biddingId: detail.id, biddingId: detail.id,
onlineId: detail.onlineId, onlineId: detail.onlineId,
materiels: dataSource2, materiels: _dataSource2,
} }
PublicApi.postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => { PublicApi.postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
...@@ -145,7 +154,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -145,7 +154,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
</Col> </Col>
{awardProcess?.map((item, index) => { {awardProcess?.map((item, index) => {
return ( return (
<Col span={7} key={`BtnItem_${item.id}`} onClick={() => { chooseItem(item, index) }}> <Col span={7} key={`${item.id}_${item.peportTime}`} onClick={() => { chooseItem(item, index) }}>
<BtnItem btnType={2} detail={{ ...item, isOpenPurchase, isOpenRanking }} active={index === activeIndex} /> <BtnItem btnType={2} detail={{ ...item, isOpenPurchase, isOpenRanking }} active={index === activeIndex} />
</Col> </Col>
) )
......
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