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

🐞 fix: 修改授标结果

parent c8416811
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import { Context } from '../context'; import { Context } from '../context';
import Card from '../../../card'; import Card from '../../../card';
import { Button, Row, Col, Collapse } from 'antd';
import { ExclamationCircleFilled } from '@ant-design/icons';
const BidLayout = () => { const BidLayout = () => {
const context = useContext(Context); const context = useContext(Context);
console.log(context.awardResults) console.log(context.awardResults)
const title = context.isPrize === 1 ? '中标通知' : '授标结果'
return ( return (
<Card <Card
id='bidLayout' id='bidLayout'
title='中标通知' title={title}
backgroundColor='#00B37A' 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> </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 = { ...@@ -95,6 +95,7 @@ export const OFFTER_INTERNALSTATE_COLOR = {
7: 'success', 7: 'success',
8: 'error', 8: 'error',
9: 'error', 9: 'error',
10: 'error',
} }
export enum OFFTER_EXTERNALSTATE_TYPE { export enum OFFTER_EXTERNALSTATE_TYPE {
......
...@@ -76,7 +76,7 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => { ...@@ -76,7 +76,7 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
<Typography.Text>{fetchdata.userName}</Typography.Text> <Typography.Text>{fetchdata.userName}</Typography.Text>
</Form.Item> </Form.Item>
<Form.Item label="编制时间" name="createTime"> <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>
<Form.Item label="内部状态" name="innerStatus"> <Form.Item label="内部状态" name="innerStatus">
<Typography.Text>{fetchdata.innerStatusName}</Typography.Text> <Typography.Text>{fetchdata.innerStatusName}</Typography.Text>
......
...@@ -102,7 +102,7 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -102,7 +102,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
<Form.Item <Form.Item
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
name={`arriveTime${index}`} name={`arriveTime${index}`}
initialValue={moment(text)} initialValue={text && moment(text)}
> >
<DatePicker <DatePicker
style={{ width: '100%' }} style={{ width: '100%' }}
......
...@@ -9,6 +9,7 @@ import { Row, Col, Button, Badge, Space, Typography, Popconfirm } from 'antd'; ...@@ -9,6 +9,7 @@ import { Row, Col, Button, Badge, Space, Typography, Popconfirm } from 'antd';
import { import {
OFFTER_INTERNALSTATE_COLOR, OFFTER_INTERNALSTATE_COLOR,
} from '../../constants'; } from '../../constants';
import { DEMANDPLAN_INTERNALSTATE_TYPE } from '../../constants/demandPlan';
import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography; const { Text } = Typography;
...@@ -61,17 +62,21 @@ const DemandPlanAdded = () => { ...@@ -61,17 +62,21 @@ const DemandPlanAdded = () => {
dataIndex: 'operate', dataIndex: 'operate',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<> <>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}> { record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
<Button type='link'> <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
提交 <Button type='link'>
提交
</Button> </Button>
</Popconfirm> </Popconfirm>
)}
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`)}>修改</Button> <Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`)}>修改</Button>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelect(record.id)}> { record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
<Button type='link'> <Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelect(record.id)}>
删除 <Button type='link'>
</Button> 删除
</Popconfirm> </Button>
</Popconfirm>
)}
</> </>
) )
}]; }];
......
...@@ -173,9 +173,11 @@ const QuoteDetails = () => { ...@@ -173,9 +173,11 @@ const QuoteDetails = () => {
{(pathPci === 'offter' && dataSource.externalState === 99) && ( {(pathPci === 'offter' && dataSource.externalState === 99) && (
<> <>
<BidLayout /> <BidLayout />
<BidResultLayout {dataSource.isPrize === 1 && (
fetch={PublicApi.getPurchaseQuotedPriceProductlistListContract} <BidResultLayout
/> fetch={PublicApi.getPurchaseQuotedPriceProductlistListContract}
/>
)}
</> </>
)} )}
<BidInfoLayout <BidInfoLayout
......
import React from 'react'; import React from 'react';
import { history } from 'umi';
import Table from '../../components/table' import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import moment from 'moment'; import moment from 'moment';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { Button, Badge, Space, Typography } from 'antd'; import { Button, Badge, Space, Typography, Popconfirm } from 'antd';
import { import {
OFFTER_INTERNALSTATE_COLOR, OFFTER_INTERNALSTATE_COLOR,
} from '../../constants'; } from '../../constants';
import { DEMANDPLAN_INTERNALSTATE_TYPE } from '../../constants/demandPlan';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography; const { Text } = Typography;
...@@ -60,12 +60,18 @@ const PurchasePlanSubmit = () => { ...@@ -60,12 +60,18 @@ const PurchasePlanSubmit = () => {
dataIndex: 'operate', dataIndex: 'operate',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<> <>
<Button { record.innerStatus === DEMANDPLAN_INTERNALSTATE_TYPE.WAITESUBMITAUDIT_TYPE && (
type='link' <Popconfirm title="确定要提交吗?" okText="是" cancelText="否">
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)} <Button type='link'>
> 提交
审核 </Button>
</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