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

feat: 采购竞价单补充字段

parent eb93e257
......@@ -2,7 +2,11 @@ import React from 'react';
import { Typography } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
const FilesItem = (props: any) => {
interface FilesItemProps {
files?: any
}
const FilesItem: React.FC<FilesItemProps> = (props: any) => {
const { files } = props;
if (files && files.length > 0) {
return (
......@@ -17,10 +21,10 @@ const FilesItem = (props: any) => {
)
})
)
}else{
return ''
} else {
return '-'
}
}
export default FilesItem
\ No newline at end of file
......@@ -2,6 +2,7 @@
background-color: #FAFBFC;
padding: 6px;
display: flex;
margin-bottom: 16px;
.box{
flex: 1;
display: flex;
......
......@@ -60,7 +60,7 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
<div className={selfStyles.pieItem} key={key}>
<PieItem />
<div className={selfStyles.box}>
<div className={selfStyles.title}>中标金额(含税)</div>
<div className={selfStyles.title}>{child.label}</div>
<div className={selfStyles.price}>¥114,000.00</div>
</div>
</div>
......@@ -100,7 +100,7 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
</div>
<div className={selfStyles.baseItem}>
<h5 className={selfStyles.label}>附件: </h5>
<h5 className={selfStyles.content}><FilesItem /></h5>
<h5 className={selfStyles.content}><FilesItem files={effect.returnUrls} /></h5>
</div>
</Col>
</Row>
......
......@@ -45,7 +45,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
title: '状态',
key: 'state',
dataIndex: 'state',
render: (_text: any, _record: any) => <Tag color={externalColors[_text]}>{_record.stateName}</Tag>
render: (_text: any, _record: any) => <Tag color={externalColors(_text)}>{_record.stateName}</Tag>
},
{
title: '操作',
......@@ -94,7 +94,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
title: '状态',
key: 'state',
dataIndex: 'state',
render: (_text: any, _record: any) => <Tag color={internalColors[_text]}>{_record.stateName}</Tag>
render: (_text: any, _record: any) => <Tag color={internalColors(_text)}>{_record.stateName}</Tag>
},
{
title: '操作',
......
/** 价单外部状态颜色 */
export const BID_EXTERNALSTATE_COLOR = {
'-1': 'error',
99: 'success',
1: 'default',
2: 'warning',
3: 'warning',
4: 'warning',
5: 'default',
6: 'processing',
7: 'error',
8: 'error',
export const BID_EXTERNALSTATE_COLOR = (text) => {
switch (Number(text)) {
case -1:
case 7:
case 8:
return 'error';
case 2:
case 3:
case 4:
return 'warning';
case 6:
return 'processing';
case 99:
return 'success';
default:
return 'default'
}
}
// export const BID_EXTERNALSTATE_COLOR = {
// '-1': 'error',
// 99: 'success',
// 1: 'default',
// 2: 'warning',
// 3: 'warning',
// 4: 'warning',
// 5: 'default',
// 6: 'processing',
// 7: 'error',
// 8: 'error',
// }
/** 报价内部状态颜色 */
export const BID_INTERNALSTATE_COLOR = {
'-1': 'error',
99: 'success',
1: 'default',
2: 'warning',
3: 'warning',
4: 'processing',
8: 'error',
9: 'error',
10: 'default',
11: 'error',
12: 'processing',
13: 'warning',
14: 'warning',
15: 'warning',
}
\ No newline at end of file
export const BID_INTERNALSTATE_COLOR = (text) => {
switch (Number(text)) {
case -1:
case 8:
case 9:
case 11:
return 'error';
case 2:
case 3:
case 13:
case 14:
case 15:
return 'warning';
case 4:
case 12:
return 'processing';
case 99:
return 'success';
default:
return 'default';
}
}
// export const BID_INTERNALSTATE_COLOR = {
// '-1': 'error',
// 99: 'success',
// 1: 'default',
// 2: 'warning',
// 3: 'warning',
// 4: 'processing',
// 8: 'error',
// 9: 'error',
// 10: 'default',
// 11: 'error',
// 12: 'processing',
// 13: 'warning',
// 14: 'warning',
// 15: 'warning',
// }
\ No newline at end of file
......@@ -102,7 +102,7 @@ const SearchDetail = () => {
col: [
{ label: '竞价编号', extra: data.biddingNo, type: 'text' },
{ label: '竞价摘要', extra: data.details, type: 'text' },
{ label: '外部状态', extra: <Tag color={BID_EXTERNALSTATE_COLOR[data.externalState]}>{data.externalStateName}</Tag>, type: 'text' },
{ label: '外部状态', extra: <Tag color={BID_EXTERNALSTATE_COLOR(data.externalState)}>{data.externalStateName}</Tag>, type: 'text' },
// { label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR[data.interiorState]} text={data.interiorStateName} />, type: 'text' },
]
},
......@@ -206,7 +206,8 @@ const SearchDetail = () => {
setAwardResult(
{
list: data.awardsFruits || [],
signUpIdea: data.signUpIdea
signUpIdea: data.signUpIdea,
returnUrls: data.returnUrls
}
)
}
......
......@@ -59,7 +59,7 @@ const ExamineSearch = () => {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag>
}, {
title: '操作',
key: 'operate',
......
......@@ -53,7 +53,7 @@ const Search = () => {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag>
}];
return (
......
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