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

feat: 第二轮报价优化

parent 9c82004f
......@@ -203,7 +203,7 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
style={{ marginBottom: 0, display: 'none' }}
rules={[{
required: true,
message: `awardTaxProbability_${index}_${idx}必须填写`,
message: ` `,
}]}
>
<InputNumber
......
......@@ -17,7 +17,7 @@ import { useBidTable } from '../../../effects/useBidTable';
export interface ContrastProps {
effect?: any,
redux?(e: any),
preview?: boolean
preview?: string
}
const chNum: { [key: number]: string } = {
......@@ -282,12 +282,12 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
/>
供应商信息
</div>
<StandardTable
{/* <StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchTableData(params)}
/>
/> */}
<Skeleton
active
loading={loading}
......@@ -297,8 +297,8 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
<>
<div className={style.divider}>
<Divider type='vertical' className={style.vertical} />
比价信息
</div>
比价信息
</div>
<BidTable preview={preview} redux={reduxFetch} />
</>
)}
......
.divider {
font-size: 12px;
margin-bottom: 12px;
.vertical {
width: 2px;
height: 16px;
margin: 0px 5px 0px 0px ;
background-color: #00B37A;
}
}
.colStyle {
width: 100%;
padding: 8px;
position: relative;
background-color: #FAFBFC;
.card-list {
font-size: 12px;
.card-bold {
font-weight: 700;
margin-bottom: 0;
}
p {
margin: 1px 0px;
}
}
.card-list:nth-child(2) {
margin-bottom: 17px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
.card-badge {
position: absolute;
top: 0;
right: 0;
color: #909399;
font-size: 12px;
padding: 4px 6px;
background-color: #EBECF0;
}
.card-link {
position: absolute;
top: 32px;
right: 8px;
font-size: 12px;
}
}
import React, { Fragment } from 'react';
import { Row, Col, Typography, Divider, Tooltip } from 'antd';
import moment from 'moment';
import style from './index.less';
import { PRICECONTRAST_TYPE } from '../../../../../constants';
export interface IProps {
/** 信息数据 */
rowSource?: any,
}
const RowLayout: React.FC<IProps> = (props: any) => {
const { rowSource } = props;
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
return (
<Fragment>
<div className={style.divider}><Divider type='vertical' className={style.vertical} />供应商信息</div>
<Row gutter={[12, 0]}>
{rowSource.map((item: any) => (
<Col span={6} key={item.id}>
<div className={style.colStyle}>
<div className={style['card-list']}>
<Row>
<Col><p className={style['card-bold']}>{item.createMemberName}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col><p className={style['card-bold']}>¥{item.sumPrice && item.sumPrice.toFixed(2)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>联系人:</p></Col>
<Col><p>{item.contacts}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>联系电话:</p></Col>
<Col><p>{item.tel}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价单号:</p></Col>
<Col><p>{item.quotedPriceNo}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价单摘要:</p></Col>
<Col><p>{item.quotedDetails}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>交易时间:</p></Col>
<Col><p>{format(item.createTime)}</p></Col>
</Row>
</div>
<div className={style['card-badge']}>
{item.isDecrypt === PRICECONTRAST_TYPE.UNENCRYPTED ? '已解密' : '未解密'}
</div>
{item.isDecrypt === PRICECONTRAST_TYPE.UNENCRYPTED && <Typography.Link href={`/memberCenter/procurementAbility/confirmOffer/quote/detail?id=${item.id}&number=${item.quotedPriceNo}&turn=${item.turn}`} className={style['card-link']}>查看报价详情</Typography.Link>}
{item.isDecrypt === PRICECONTRAST_TYPE.UNDECRYPTED && <Tooltip placement="topLeft" title='当前报价为密封报价,请先解密报价单'><Typography.Text className={style['card-link']} type='success'>查看报价详情</Typography.Text></Tooltip>}
</div>
</Col>
))}
</Row>
</Fragment>
)
}
export default RowLayout;
......@@ -61,9 +61,7 @@ const BidModal: React.FC<IProps> = (props: any) => {
}
useEffect(() => {
console.log(dataSource, 10086)
if (dataSource.length > 0) {
console.log(dataSource, 10086)
const arr: any = dataSource[0].company || [];
const params: any = [];
arr.forEach((it: any, idx: number) => {
......@@ -117,11 +115,12 @@ const BidModal: React.FC<IProps> = (props: any) => {
urls: files,
priceParityInfos,
}
PublicApi.postPurchaseConfirmQuotedPriceSubmitContrastPrice(params).then(res => {
if (res.code === 1000) {
handleConfirm();
}
})
console.log(priceParityInfos, 962200)
// PublicApi.postPurchaseConfirmQuotedPriceSubmitContrastPrice(params).then(res => {
// if (res.code === 1000) {
// handleConfirm();
// }
// })
} catch (errInfo) {
console.log('Save failed:', errInfo);
}
......
......@@ -2,11 +2,14 @@ import { useEffect, useState } from 'react'
export const useBidTable = () => {
const [dataSource, setDataSource] = useState<any>([]);
const [soure, setSoure] = useState<any>({});
const formContext = {
dataSource: dataSource,
soure: soure,
ctl: {
setDataSource: setDataSource,
setSoure: setSoure
},
}
......
......@@ -7,7 +7,7 @@ import PeripheralLayout from '../../components/detail';
import ProgressLayout from '../../components/detail/components/progressLayout';
import BasicLayout from '../../components/detail/components/basicLayout';
import ConditionLayout from '../../components/detail/components/conditionLayout';
import ContrastLyout from '../../components/detail/components/contrastLyout';
import ContrastLyout from '../../components/detail/components/contrastLyout1';
import RecordLyout from '../../components/detail/components/recordLyout';
import {
OFFTER_EXTERNALSTATE,
......@@ -45,7 +45,6 @@ const ContrastPrice = () => {
const [conditionEffect, setConditionEffect] = useState<any>([]);
const [visible, setVisible] = useState<boolean>(false);
const [auditDataSource, setAuditDataSource] = useState<any>([]);
const [preview, setPreview] = useState<boolean>(false);
const [link] = useState<string>(pathname.split('/')[pathname.split('/').length - 1]);
const [path] = useState<string>(pathname.split('/')[pathname.split('/').length - 2]);
const [bid, setBid] = useState<any>({});
......@@ -132,9 +131,6 @@ const ContrastPrice = () => {
}
useEffect(() => {
if (link !== 'contrast') {
setPreview(true)
}
handleGetDataSource(turn)
}, [])
......@@ -166,7 +162,6 @@ const ContrastPrice = () => {
return PublicApi.postPurchaseConfirmQuotedPriceStayExamineAward2
}
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -180,14 +175,14 @@ const ContrastPrice = () => {
>
<CheckCircleOutlined />
单据审核
</Button>
</Button>
}
components={
<Fragment>
<ProgressLayout />
<BasicLayout effect={basicEffect} />
<ConditionLayout effect={conditionEffect} />
<ContrastLyout preview={preview} effect={{ id, turn }} redux={handleContrastLyoutData} />
<ContrastLyout preview={link === 'preview' ? true : false} query={{ id, turn }} redux={handleContrastLyoutData} />
<RecordLyout />
</Fragment>
}
......
......@@ -40,11 +40,11 @@ const iconStyle: any = {
const PURCHASETYPE = [
{
type: 1,
name: '单次采购'
name: '有固定采购金额'
},
{
type: 2,
name: '协议采购'
name: '无固定采购金额'
}
]
const PRICECONTRAST = [
......
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