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) => {
dataIndex: 'number',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.name}</Text>
<Text type='secondary' key={'number_1'}>{text}</Text>
<Text type='secondary' key={'number_2'}>{record.name}</Text>
</Space>
)
},
......@@ -51,8 +51,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'unit',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text>
<Text type='secondary' key={'unit_1'} >{record.purchaseCount}</Text>
<Text type='secondary' key={'unit_2'} >{text}</Text>
</Space>
)
},
......@@ -61,8 +61,8 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'isTax',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{transforType[text]}</Text>
<Text type='secondary'>{`${record.taxRate ? `${record.taxRate}%` : ''}`}</Text>
<Text type='secondary' key={'isTax_1'} >{transforType[text]}</Text>
<Text type='secondary' key={'isTax_2'} >{`${record.taxRate ? `${record.taxRate}%` : ''}`}</Text>
</Space>
)
},
......@@ -96,7 +96,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess?.map((item, index) => {
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} />
</Col>
)
......
......@@ -107,7 +107,7 @@ const BidProgressDrawer: React.FC<BidProgressDrawerProps> = (props: any) => {
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess?.length > 0 && awardProcess?.map((item, index) => {
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} />
</Col>
)
......
......@@ -19,7 +19,7 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
const { title, chartsList } = props;
const [listLen, setListLen] = useState(7);
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]);
const scaleObj = useMemo(() => {
let _obj = {};
......
......@@ -21,7 +21,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
if (detail.isOpenRanking) {
return null;
} else {
const _number = Number(detail?.ranking);
const _number = Number(detail?.ranking ?? 0);
switch (_number) {
case 1:
return <img src={level1} alt="第一名" className={styles.icon} />;
......
import React, { useState, useEffect, useMemo } from 'react';
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 BtnItem from '../../../../../../components/detail/components/bidDetailBtnItem';
......@@ -35,8 +35,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
dataIndex: 'number',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.name}</Text>
<Text type='secondary' key={'number_1'} >{text}</Text>
<Text type='secondary' key={'number_2'}>{record.name}</Text>
</Space>
)
},
......@@ -48,8 +48,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
dataIndex: 'unit',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text>
<Text type='secondary' key={'unit_1'} >{record.purchaseCount}</Text>
<Text type='secondary' key={'unit_2'} >{text}</Text>
</Space>
)
},
......@@ -113,12 +113,21 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
}
const bidOk = () => {
// const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
// console.log(_price)
const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
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 = {
biddingId: detail.id,
onlineId: detail.onlineId,
materiels: dataSource2,
materiels: _dataSource2,
}
PublicApi.postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => {
if (res.code === 1000) {
......@@ -145,7 +154,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
</Col>
{awardProcess?.map((item, index) => {
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} />
</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