Commit 193a2661 authored by 卢均锐's avatar 卢均锐

chore: 采购竞价单审核 替换状态类型组件

parent 3d130f5e
import React, { useContext, useRef } from 'react';
import { Row, Col, Image, Tag, Tooltip, Switch, Typography } from 'antd';
import { Row, Col, Image, Tooltip, Switch, Typography } from 'antd';
import { StandardTable } from 'god';
import StatusTag from '@/components/StatusTag';
import Card from '../../../card';
import { Context } from '../context';
import style from './index.less';
......@@ -70,7 +72,7 @@ const DemandLayout: React.FC<DemandLayoutIProps> = (props: any) => {
title: '是否归属会员',
key: 'membershipOrNot',
dataIndex: 'membershipOrNot',
render: (text: any) => (<Tag color={text ? 'success' : 'error'}>{text ? '是' : '否'}</Tag>)
render: (text: any) => (<StatusTag type={text ? 'success' : 'danger'} title={text ? '是' : '否'} />)
},
{
title: (
......
/** 详情通用 - 流转进度 */
import React, { useContext, useState, useMemo } from 'react';
import { Radio, Table, Typography, Tag } from 'antd';
import { Radio, Table, Typography } from 'antd';
const { Text } = Typography;
import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils'
......@@ -45,7 +47,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) => <StatusTag type={externalColors(_text)} title={_record.stateName} />
},
{
title: '操作',
......@@ -94,7 +96,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) => <StatusTag type={internalColors(_text)} title={_record.stateName} />
},
{
title: '操作',
......
......@@ -4,13 +4,13 @@ export const BID_EXTERNALSTATE_COLOR = (text) => {
case -1:
case 7:
case 8:
return 'error';
return 'danger';
case 2:
case 3:
case 4:
return 'warning';
return 'warnning';
case 6:
return 'processing';
return 'primary';
case 99:
return 'success';
default:
......@@ -42,10 +42,10 @@ export const BID_INTERNALSTATE_COLOR = (text) => {
case 13:
case 14:
case 15:
return 'warning';
return 'warnning';
case 4:
case 12:
return 'processing';
return 'primary';
case 99:
return 'success';
default:
......
import React, { Fragment, useEffect, useState, useMemo } from 'react';
import { Tag, Button } from 'antd';
import { Button } from 'antd';
import { history } from 'umi';
import { CheckCircleOutlined } from '@ant-design/icons';
......@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api';
import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
import { Context } from '../../components/detail/components/context';
import PeripheralLayout from '../../components/detail';
......@@ -103,7 +104,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: <StatusTag type={BID_EXTERNALSTATE_COLOR(data.externalState)} title={data.externalStateName} />, type: 'text' },
// { label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR[data.interiorState]} text={data.interiorStateName} />, type: 'text' },
]
},
......
import React, { useRef, useState } from 'react';
import { Tag, Typography, Space, Row, Col, Button } from 'antd';
import { Typography, Space, Row, Col, Button } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils'
import { PublicApi } from '@/services/api';
......@@ -14,7 +15,6 @@ import ModalOperate from '../../components/modalOperate';
import {
BID_EXTERNALSTATE_COLOR,
BID_INTERNALSTATE_COLOR
} from '../../constants/purchaseBid';
const { Text } = Typography;
......@@ -58,7 +58,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) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, {
title: '操作',
key: 'operate',
......
import React, { useRef } from 'react';
import { Tag, Typography, Space } from 'antd';
import { Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils'
import { PublicApi } from '@/services/api';
......@@ -12,7 +13,6 @@ import Table from '../../components/table';
import {
BID_EXTERNALSTATE_COLOR,
BID_INTERNALSTATE_COLOR
} from '../../constants/purchaseBid';
const { Text } = Typography;
......@@ -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) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}];
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