Commit e6758f20 authored by 卢均锐's avatar 卢均锐

fix: [12900,12862] 百分比前端自己算 修改新增竞价单时候的demanMembers -> members

parent efe30dd1
......@@ -27,7 +27,7 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
_obj[`${item.type}`] = item.title;
});
return {
value: { min: 0, alias: '' },
value: { min: 0 },
// time: { range: [0, 1] },
type: {
formatter: v => {
......@@ -74,7 +74,6 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
title={{ text: '金额(元)' }}
visible={true}
name='value'
// line={{ style: { stroke: "#ff0000" } }}
tickLine={{ style: { lineWidth: 1 } }}
/>
<Line position="time*value" color={['type', ['#5B8FF9', '#00B37A']]} />
......
......@@ -19,6 +19,7 @@ interface HistoryItemProps {
const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
const { detail } = props;
const mapData = detail.offerLogs ? [...detail.offerLogs].splice(0, 3) : [];
const firstData = mapData[0];
const _returnBadge = () => {
if (!detail.isOpenRanking) {
return null;
......@@ -36,7 +37,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
}
}
}
return (
<div className={styles.history}>
<div className={styles.historyHeader}>
......@@ -44,13 +45,13 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
<div className={styles.box}>
{_returnBadge()}
<div className={styles.rightPosition}>
{detail?.offerRatio ? <TrendTag ratio={detail?.offerRatio} /> : ''}
{firstData?.offerRatio ? <TrendTag ratio={firstData?.offerRatio} /> : ''}
</div>
<p>本次报价金额</p>
<p className={styles.currentPrice}><span>¥</span>{detail?.offerPrice ? priceFormat(detail?.offerPrice) : '-'}</p>
<p className={styles.currentPrice}><span>¥</span>{firstData?.offerPrice ? priceFormat(firstData?.offerPrice) : '-'}</p>
<div className={styles.row}>
<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 className={styles.col}>报价次数:<span>{firstData?.offerCount ? firstData?.offerCount : '-'}</span></div>
</div>
</div>
</div>
......
......@@ -69,7 +69,14 @@ const Detail = () => {
data.minLowPrice = socketObj.minLowPrice;
}
data.onlineId = Number(onlineId);
setDataSource(data);
let _data : any = {...data};
_data?.offerLogs.forEach((item,index,arr) => {
const _arrLength = arr.length;
if (index != _arrLength - 1 && _arrLength > 2) {
_data.offerLogs[index].offerRatio = Number(((item.offerPrice - arr[index + 1].offerPrice) / arr[index + 1].offerPrice * 100).toFixed(2))
}
})
setDataSource(_data);
let _list = [];
let _offerList = [];
let _minList = [];
......
......@@ -187,7 +187,7 @@ const AddForm = () => {
setCondition(conditionInfo);
demandInfo.type = params.type;
demandInfo.shopIds = params.shopIds;
demandInfo.demandMembers = params.demandMembers;
demandInfo.demandMembers = params.members;
setDemand(demandInfo);
setfile([...params.urls]);
}
......@@ -267,4 +267,4 @@ const AddForm = () => {
</PageHeaderWrapper>
)
}
export default AddForm
\ No newline at end of file
export default AddForm
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