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

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

parents 2b3fc154 a305fa00
......@@ -20,7 +20,7 @@ const MsgItem: React.FC<MsgItemPrpos> = (props: any) => {
<div className={styles.title}>{data.memberName}</div>
</div>
<div className={styles.msgItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{data.contacts}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{data.tel}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{data.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>电子邮箱:</div><div className={styles.title}>{data.mail}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>联系地址:</div>{<Tooltip placement="top" title={data.address}>
<div className={styles.title}>{data.address}</div>
......
......@@ -42,7 +42,7 @@ const ResultItem: React.FC<ResultItemPrpos> = (props: any) => {
</div>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<div className={styles.resultItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{detail.contacts}</div></div>
<div className={styles.resultItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{detail.tel}</div></div>
<div className={styles.resultItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{detail.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div>
</div>
)
}
......
......@@ -47,7 +47,7 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
</div>
<div className={styles.time}>
<span>{formatTimeString(detail?.peportTime, 'HH:mm:ss')}</span>
<TrendTag />
<TrendTag ratio={detail.ratio} />
</div>
</div>
</div>
......
......@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react';
import { Row, Col, Table, Button, Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { priceFormat } from '@/utils/numberFomat';
import Card from '../../../card';
import BtnItem from '../bidDetailBtnItem';
......@@ -69,12 +71,12 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
{
title: '单价(含税)',
dataIndex: 'price',
render: (text: any, record: any) => <Text type='secondary'>¥{text}</Text>
render: (text: any, record: any) => <Text type='secondary'>¥{priceFormat(text)}</Text>
},
{
title: '金额(含税)',
dataIndex: 'price',
render: (text: any, record: any) => <Text type='secondary'>¥{text}</Text>
render: (text: any, record: any) => <Text type='secondary'>¥{priceFormat(text)}</Text>
},
]
......@@ -94,10 +96,15 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
title={'竞价详情'}
>
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess?.map((item, index) => {
{awardProcess?.map((item, index, arr) => {
let _ratio = 0;
let _arrLength = arr.length;
if (index != _arrLength - 1 && _arrLength > 2) {
_ratio = Number(((item.sumPice - arr[index + 1].sumPice) / arr[index + 1].sumPice * 100).toFixed(2))
}
return (
<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, ratio: _ratio }} active={index === activeIndex} />
</Col>
)
})}
......
......@@ -20,7 +20,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
const { detail } = props;
const mapData = detail.offerLogs ? [...detail.offerLogs].splice(0, 3) : [];
const _returnBadge = () => {
if (detail.isOpenRanking) {
if (!detail.isOpenRanking) {
return null;
} else {
const _number = Number(detail?.ranking ?? 0);
......@@ -49,7 +49,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
<p>本次报价金额</p>
<p className={styles.currentPrice}><span>¥</span>{detail?.offerPrice ? priceFormat(detail?.offerPrice) : '-'}</p>
<div className={styles.row}>
<div className={styles.col} style={{ borderRight: '1px solid #EBECF0' }}>当前最低价:<span>{detail?.minLowPrice ? priceFormat(detail?.minLowPrice) : '-'}</span></div>
<div className={styles.col} style={{ borderRight: '1px solid #EBECF0' }}>当前最低价:<span>{detail.isOpenPurchase ? (detail?.minLowPrice ? `¥${priceFormat(detail?.minLowPrice)}` : '-') : '不公开'}</span></div>
<div className={styles.col}>报价次数:<span>{detail?.offerCount ? detail?.offerCount : '-'}</span></div>
</div>
</div>
......
......@@ -4,6 +4,7 @@ import { Row, Col } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { priceFormat } from '@/utils/numberFomat';
import { formatTimeString } from '@/utils'
import StatusBox from '../../../purchaseBid/readyBid/management/components/statusBox';
......@@ -49,12 +50,12 @@ const Detail = () => {
let _minList = [];
let _offerLogs = data?.offerLogs ? [...data.offerLogs].reverse() : [];
_offerLogs.forEach((item) => {
_offerList.push({ type: 'offer', time: formatTimeString(item.offerTime, 'HH:mm:ss'), value: item.offerPrice });
_offerList.push({ type: 'offer', time: formatTimeString(item.offerTime, 'HH:mm:ss'), value: priceFormat(item.offerPrice,0) });
})
_list.push({ title: '报价金额', type: 'offer', list: _offerList });
if (data.isOpenPurchase) {
_offerLogs.forEach((item) => {
_minList.push({ type: 'min', time: formatTimeString(item.offerTime, 'HH:mm:ss'), value: item.minPrice });
_minList.push({ type: 'min', time: formatTimeString(item.offerTime, 'HH:mm:ss'), value: priceFormat(item.minPrice,0) });
})
_list.push({ title: '最低价', type: 'min', list: _minList });
}
......
......@@ -57,8 +57,8 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
}
const _returnDefaultAwardResults = useMemo(() => {
return record ? `${record?.purchaseMamberName ?? record?.createMemberName}${record.details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:
中标供应商:${record.mamberName || record.memberName}(中标总金额(含税):${priceFormat(record.sumAwardPrice)})。
return record ? `${record?.purchaseMemberName ?? record?.createMemberName}${record.details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:
中标供应商:${record.memberName}(中标总金额(含税):${priceFormat(record.sumAwardPrice)})。
中标理由:价格最低` : '';
}, [record])
......
......@@ -428,7 +428,7 @@ const SearchDetail = () => {
case 'readyExamineSignUp':
let _data: any = {};
for (let key in dataSource.sginUpInfos) {
if (dataSource.sginUpInfos[key].id = signUpId) {
if (dataSource.sginUpInfos[key].id == signUpId) {
_data = dataSource.sginUpInfos[key];
}
}
......
......@@ -61,7 +61,7 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
<div className={`${styles.rankRow}`}>
<div className={styles.rankRowLeft}>
<div className={styles.rankRowLeftTop}>{detail.memberName}</div>
<div className={styles.rankRowLeftBottomPhone}>{detail.tel}</div>
<div className={styles.rankRowLeftBottomPhone}>{detail.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div>
</div>
<div className={styles.rankRowRight}>
{detail.contacts}
......
......@@ -116,7 +116,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
const bidOk = () => {
const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
if (Number(detail.minLowPrice) - _price < detail.minPrice) {
if (detail?.minLowPrice && Number(detail.minLowPrice) - _price < detail.minPrice) {
message.error('当前报价金额不满足最小价差要求,请修改后再报价!');
return;
}
......@@ -154,10 +154,15 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
<Col span={7} key={'BtnItem_0'} onClick={() => { chooseItem() }}>
<BtnItem btnType={3} detail={{ sumPice: _calcCurrentTotal, peportPriceSum: offerCount + 1 }} active={!activeItem} onOk={bidOk} onCancle={onClose} />
</Col>
{awardProcess?.map((item, index) => {
{awardProcess?.map((item, index, arr) => {
let _ratio = 0;
let _arrLength = arr.length;
if (index != _arrLength - 1 && _arrLength > 2) {
_ratio = Number(((item.sumPice - arr[index + 1].sumPice) / arr[index + 1].sumPice * 100).toFixed(2))
}
return (
<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, ratio: _ratio }} active={index === activeIndex} />
</Col>
)
})}
......
......@@ -5,7 +5,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout';
import BidDetailLayout from '../../../components/detail/components/bidDetailLayout';
......@@ -89,7 +89,7 @@ const Management = () => {
setLowestList({
type: 'min',
title: '最低价',
list: data ? data.map((item) => { return { type: 'min', time: formatTimeString(item.peportTime, 'HH:mm:ss'), value: item.sumPice } }) : []
list: data ? data.map((item) => { return { type: 'min', time: formatTimeString(item.peportTime, 'HH:mm:ss'), value: priceFormat(item.sumPice,0) } }) : []
})
})
}
......
......@@ -35,14 +35,14 @@ const ReadyConfirm = () => {
dataIndex: 'biddingNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyConfirm/detail?id=${record.id}&number=${text}&memberName=${record.mamberName}`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyConfirm/detail?id=${record.id}&number=${text}&memberName=${record.memberName}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
}, {
title: '授标会员',
key: 'mamberName',
dataIndex: 'mamberName',
key: 'memberName',
dataIndex: 'memberName',
render: (text: any, record: any) => (
<EyePreview url={`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`}>{text}</EyePreview>
)
......
......@@ -35,8 +35,8 @@ const ReadyExamineResultOne = () => {
)
}, {
title: '授标会员',
key: 'mamberName',
dataIndex: 'mamberName',
key: 'memberName',
dataIndex: 'memberName',
render: (text: any, record: any) => (
<EyePreview url={`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`}>{text}</EyePreview>
)
......
......@@ -36,8 +36,8 @@ const ReadyExamineResultTwo = () => {
)
}, {
title: '授标会员',
key: 'mamberName',
dataIndex: 'mamberName',
key: 'memberName',
dataIndex: 'memberName',
render: (text: any, record: any) => (
<EyePreview url={`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`}>{text}</EyePreview>
)
......
......@@ -37,8 +37,8 @@ const ReadySubmitExamineResult = () => {
)
}, {
title: '授标会员',
key: 'mamberName',
dataIndex: 'mamberName',
key: 'memberName',
dataIndex: 'memberName',
render: (text: any, record: any) => (
<EyePreview url={`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`}>{text}</EyePreview>
)
......
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