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

🐞 fix: 修改授标结果

parent c8416811
import React, { useContext } from 'react';
import { Context } from '../context';
import Card from '../../../card';
import { Button, Row, Col, Collapse } from 'antd';
import { ExclamationCircleFilled } from '@ant-design/icons';
const BidLayout = () => {
const context = useContext(Context);
console.log(context.awardResults)
const title = context.isPrize === 1 ? '中标通知' : '授标结果'
return (
<Card
id='bidLayout'
title='中标通知'
backgroundColor='#00B37A'
title={title}
backgroundColor={context.isPrize === 1 && '#00B37A'}
extra={!context.isPrize && <Button type='link'>查看感谢函</Button>}
>
<div style={{ whiteSpace: 'pre' }}>{context.awardResults}</div>
{ context.isPrize === 1 ? (
<div style={{ whiteSpace: 'pre' }}>{context.awardResults}</div>
) : (
<Row>
<Col>
<ExclamationCircleFilled style={{ fontSize: '20px', color: '#91949a' }} />
</Col>
<Col>
<p style={{ fontSize: '16px', marginLeft: 5, }}>贵公司此次未中标!</p>
<p style={{ fontSize: '12px', }}>非常感谢贵公司的积极参与,希望下次合作成功!</p>
</Col>
</Row>
)}
</Card>
)
}
......
export const DEMANDPLAN_INTERNALSTATE_TYPE {
export enum DEMANDPLAN_INTERNALSTATE_TYPE {
/** 待提交审核 */
WAITESUBMITAUDIT_TYPE = 1,
/** 审核不通过(一级) */
AUDITNOPASS1_TYPE = 8,
/** 审核不通过(二级) */
AUDITNOPASS2_TYPE = 9,
/** 采购退回 */
PURCHASEBACK_TYPE = 10,
}
......@@ -95,6 +95,7 @@ export const OFFTER_INTERNALSTATE_COLOR = {
7: 'success',
8: 'error',
9: 'error',
10: 'error',
}
export enum OFFTER_EXTERNALSTATE_TYPE {
......
......@@ -76,7 +76,7 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
<Typography.Text>{fetchdata.userName}</Typography.Text>
</Form.Item>
<Form.Item label="编制时间" name="createTime">
<Typography.Text>{format(fetchdata.createTime)}</Typography.Text>
<Typography.Text>{fetchdata.createTime && format(fetchdata.createTime)}</Typography.Text>
</Form.Item>
<Form.Item label="内部状态" name="innerStatus">
<Typography.Text>{fetchdata.innerStatusName}</Typography.Text>
......
......@@ -102,7 +102,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
<Form.Item
style={{ marginBottom: 0 }}
name={`arriveTime${index}`}
initialValue={moment(text)}
initialValue={text && moment(text)}
>
<DatePicker
style={{ width: '100%' }}
......
......@@ -9,6 +9,7 @@ import { Row, Col, Button, Badge, Space, Typography, Popconfirm } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { DEMANDPLAN_INTERNALSTATE_TYPE } from '../../constants/demandPlan';
import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
......@@ -61,17 +62,21 @@ const DemandPlanAdded = () => {
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>
提交
{ record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>
提交
</Button>
</Popconfirm>
</Popconfirm>
)}
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`)}>修改</Button>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelect(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>
{ record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelect(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>
)}
</>
)
}];
......
......@@ -173,9 +173,11 @@ const QuoteDetails = () => {
{(pathPci === 'offter' && dataSource.externalState === 99) && (
<>
<BidLayout />
<BidResultLayout
fetch={PublicApi.getPurchaseQuotedPriceProductlistListContract}
/>
{dataSource.isPrize === 1 && (
<BidResultLayout
fetch={PublicApi.getPurchaseQuotedPriceProductlistListContract}
/>
)}
</>
)}
<BidInfoLayout
......
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Button, Badge, Space, Typography } from 'antd';
import { Button, Badge, Space, Typography, Popconfirm } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { DEMANDPLAN_INTERNALSTATE_TYPE } from '../../constants/demandPlan';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
......@@ -60,12 +60,18 @@ const PurchasePlanSubmit = () => {
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
{ record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否">
<Button type='link'>
提交
</Button>
</Popconfirm>
)}
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否">
<Button type='link'>
删除
</Button>
</Popconfirm>
</>
)
}];
......
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