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

feat:采购竞价&在线竞价增加静态页面,增加时分秒倒计时hook

parent 9e24e282
import React, { useState, useEffect, useRef } from 'react';
const useCountDown = (timeStamp: number) => {
const intervalRef = useRef<any>(null);
const now: any = Math.round(new Date().getTime() / 1000).toString();
const end: any = timeStamp;
const [leftTime, setLeftTime] = useState(end - now);
const [h, setHours] = useState<any>('');
const [m, setMinutes] = useState<any>('');
const [s, setSeconds] = useState<any>('');
useEffect(() => {
if (leftTime > 0) {
intervalRef.current = setInterval(() => {
const newNow: any = Math.round(new Date().getTime() / 1000).toString();
let newLeftTime = timeStamp - newNow
setLeftTime(() => newLeftTime)
const _hours = Math.floor(newLeftTime / 60 / 60 % 24);
const _minutes = Math.floor(newLeftTime / 60 % 60);
const _seconds = Math.floor(newLeftTime % 60);
let hours = _hours < 10 ? `0${_hours}` : _hours;
let minutes = _minutes < 10 ? `0${_minutes}` : _minutes;
let seconds = _seconds < 10 ? `0${_seconds}` : _seconds;
setHours(() => hours)
setMinutes(() => minutes)
setSeconds(() => seconds)
}, 1000);
} else {
setLeftTime(0)
setHours(0)
setMinutes(0)
setSeconds(0)
clearInterval(intervalRef.current);
}
return () => clearInterval(intervalRef.current);
}, []);
if (leftTime <= 0) {
return ['00', '00', '00', false]
} else {
return [h, m, s, true];
}
}
export default useCountDown;
\ No newline at end of file
.pieItem{
background-color: #FAFBFC;
padding: 6px;
display: flex;
.box{
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 20px;
.title{
font-size: 12px;
color: #909399;
}
.price{
font-size: 18px;
color: #303133;
}
}
}
\ No newline at end of file
import React, { useContext, useEffect, useState } from 'react';
import { Tabs, Table, Row, Col, Space, Typography, Divider, Tooltip } from 'antd';
import { Context } from '../context';
import Card from '../../../card';
import { QuestionCircleOutlined, CaretRightOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import Card from '../../../card';
import { Context } from '../context';
import style from '../basicLayout/index.less';
import { QuestionCircleOutlined, CaretRightOutlined } from '@ant-design/icons';
import selfStyles from './index.less';
import MsgItem from './msgItem';
import ResultItem from './resultItem';
import PieItem from './pieItem';
const ICON_STYLE: any = {
color: '#C0C4CC',
......@@ -37,6 +43,16 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
<h5 className={style.content}>{child.extra}</h5>
</div>
)
}else if(child.type === 'pie'){
return (
<div className={selfStyles.pieItem} key={key}>
<PieItem />
<div className={selfStyles.box}>
<div className={selfStyles.title}>中标金额(含税):</div>
<div className={selfStyles.price}>¥114,000.00</div>
</div>
</div>
)
}
}
const _returnWarp = () => {
......@@ -58,24 +74,24 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
</Row>)
} else if (layoutType === 'result') {
return (
<>
<Row gutter={[8, 8]}>
{effect.map((item, index) => (
<Col span={5} key={`effect_result_${index}`}>
<ResultItem itemIndex={index} checkDetailFunc={checkDetailFunc} />
</Col>
))}
</Row>
<Divider dashed style={{ color: '#EBECF0' }} />
<div className={style.cell}>
<h5 className={style.label}>授标意见: </h5>
<h5 className={style.content}>最低价中标</h5>
</div>
<div className={style.cell}>
<h5 className={style.label}>附件: </h5>
<h5 className={style.content}></h5>
</div>
</>
<Row gutter={[8, 8]}>
{effect.map((item, index) => (
<Col span={5} key={`effect_result_${index}`}>
<ResultItem itemIndex={index} checkDetailFunc={checkDetailFunc} />
</Col>
))}
<Col span={24}>
<Divider dashed style={{ color: '#EBECF0' }} />
<div className={style.cell}>
<h5 className={style.label}>授标意见: </h5>
<h5 className={style.content}>最低价中标</h5>
</div>
<div className={style.cell}>
<h5 className={style.label}>附件: </h5>
<h5 className={style.content}></h5>
</div>
</Col>
</Row>
)
}
}
......
import React from "react";
import {
Chart,
// Interval,
Axis,
Tooltip,
Coordinate,
Legend,
View,
} from "bizcharts";
import Interval from 'bizcharts/lib/geometry/Interval';
import { Text } from 'bizcharts/lib/components/Annotation';
import DataSet from "@antv/data-set";
const PieItem = () => {
const { DataView } = DataSet;
const userData = [
{ type: '睡觉', value: 70 },
{ type: '晨练', value: 30 },
];
const userDv = new DataView();
userDv.source(userData).transform({
type: 'percent',
field: 'value',
dimension: 'type',
as: 'percent',
});
return (
<Chart placeholder={false} height={60} width={60} padding={0} autoFit>
<Legend visible={false} />
{/* 绘制图形 */}
<View data={userDv.rows} scale={{
percent: {
formatter: (val) => {
return (val * 100).toFixed(2) + '%';
},
}
}}>
<Tooltip shared showTitle={false} />
<Coordinate type="theta" innerRadius={0.75} />
<Interval
position="percent"
adjust="stack"
color={['type',['#FFC400','#6C9CEB']]}
// color="type"
// label={['type', {offset: 40}]}
/>
<Text
position={['50%', '50%']}
content="75%"
style={{
lineHeight: 64,
fontSize: 10,
fill: '#262626',
textAlign: 'center',
}}
/>
</View>
</Chart>
);
}
export default PieItem
\ No newline at end of file
......@@ -2,7 +2,6 @@
height: 131px;
background: #FAFBFC;
padding: 12px 14px;
position: absolute;
.resultItemWinBid{
position: absolute;
......
......@@ -31,3 +31,86 @@
}
}
}
.btnItem2 {
border: 1px solid #F4F5F7;
font-size: 12px;
cursor: pointer;
background-color: #FFFFFF;
color: #909399;
.info {
background-color: #F7F8FA;
padding: 6px 12px;
display: flex;
flex-direction: row;
span {
flex: 1;
text-align: right;
}
}
.box {
padding: 12px;
.price {
display: flex;
flex-direction: row;
margin-bottom: 4px;
div {
flex: 1;
color: #303133;
font-size: 12px;
span {
color: #909399;
font-size: 12px;
margin-left: 4px;
}
}
}
.time {
display: flex;
flex-direction: row;
span {
flex: 1;
color: #303133;
}
div {
color: #E63F3B;
background-color: #FFEBE6;
padding: 0 2px;
}
}
}
}
.btnItem3 {
border: 1px solid #F4F5F7;
font-size: 12px;
cursor: pointer;
.title {
padding: 18.5px 12px;
display: flex;
flex-direction: row;
div {
flex: 1;
font-size: 16px;
color: #303133;
span {
color: #909399;
font-size: 12px;
margin-left: 4px;
}
}
}
}
import React, { useContext, useEffect, useState } from 'react';
import { Row, Col, Table, Button } from 'antd';
import { CaretDownOutlined } from '@ant-design/icons'
import style from './index.less';
import styles from './index.less';
interface BtnItemProps {
btnType?: number,
......@@ -12,11 +14,11 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
const _returnBtn = () => {
if (btnType === 1) {
return (
<div className={style.btnItem} style={{borderColor: active ? '#00B37A' : '#F4F5F7'}}>
<div className={style.btnItemTitle}>
<div className={styles.btnItem} style={{borderColor: active ? '#00B37A' : '#F4F5F7'}}>
<div className={styles.btnItemTitle}>
<div>广州白马皮具交易中心</div>
第2次</div>
<div className={style.btnItemPrice}>
<div className={styles.btnItemPrice}>
<div>
¥900.00
<span>(含税)</span>
......@@ -25,6 +27,48 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
</div>
</div>
)
}else if(btnType === 2){
return (
<div className={styles.btnItem2} style={{borderColor: active ? '#00B37A' : '#F4F5F7'}}>
<div className={styles.info}>
第 2 名
<span>当前最低价:¥1,000.00</span>
</div>
<div className={styles.box}>
<div className={styles.price}>
<div>¥900.00<span>(含税)</span></div>
第2次
</div>
<div className={styles.time}>
<span>10:43:56</span>
<div>
<CaretDownOutlined style={{color: '#E63F3B',fontSize: '10px',marginRight: '10px'}} />
24.5%
</div>
</div>
</div>
</div>
)
}else if(btnType === 3){
return (
<div className={styles.btnItem3} style={{borderColor: active ? '#00B37A' : '#F4F5F7'}}>
<div className={styles.title}>
<div>
¥900.00
<span>(含税)</span>
</div>
第2次
</div>
<Row>
<Col span={12}>
<Button block style={{backgroundColor: '#F4F5F7',border: 0}}>取消</Button>
</Col>
<Col span={12}>
<Button type="primary" block>提交报价</Button>
</Col>
</Row>
</div>
)
}
}
return (
......
......@@ -26,7 +26,7 @@ const BidDetailLayout = () => {
id={'BidDetailLayout'}
title={'竞价详情'}
>
<Row gutter={[8, 8]}>
<Row gutter={[8, 8]} style={{marginBottom: '10px'}}>
<Col span={7}>
<BtnItem />
</Col>
......
import React, { useState, useEffect } from 'react';
import { Chart, Tooltip, Axis } from 'bizcharts';
import { Radio } from 'antd';
import Point from 'bizcharts/lib/geometry/Point';
import Line from 'bizcharts/lib/geometry/Line';
import Card from '../../../card';
import styles from '../../index.less';
interface QuotationDeskProps {
title?: string,
extra?: React.ReactNode
......@@ -13,41 +16,111 @@ const data = [
{
year: "1991",
value: 3,
type: 'min'
},
{
year: "1992",
value: 4,
type: 'min'
},
{
year: "1993",
value: 3.5,
type: 'min'
},
{
year: "1994",
value: 5,
type: 'min'
},
{
year: "1995",
value: 4.9,
type: 'min'
},
{
year: "1996",
value: 6,
type: 'min'
},
{
year: "1997",
value: 7,
type: 'min'
},
{
year: "1998",
value: 9,
type: 'min'
},
{
year: "1999",
value: 13,
type: 'min'
},
{
year: "1991",
value: 4,
type: 'offer'
},
{
year: "1992",
value: 3,
type: 'offer'
},
{
year: "1993",
value: 4.5,
type: 'offer'
},
{
year: "1994",
value: 6,
type: 'offer'
},
{
year: "1995",
value: 5.9,
type: 'offer'
},
{
year: "1996",
value: 7,
type: 'offer'
},
{
year: "1997",
value: 8,
type: 'offer'
},
{
year: "1998",
value: 10,
type: 'offer'
},
{
year: "1999",
value: 14,
type: 'offer'
},
];
const scale = {
value: { min: 0, alias: '', type: 'linear-strict' },
ear: { range: [0, 1] },
type: {
formatter: v => {
return {
offer: '报价金额',
min: '最低价'
}[v]
}
}
}
const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
const { title, extra } = props;
// const [data] = useState({
......@@ -55,30 +128,41 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
// value: 3,
// })
return (
<Card
id={'QuotationDesk'}
title={title}
extra={extra}
>
<Chart
appendPadding={[10, 0, 0, 10]}
autoFit
height={375}
data={data}
scale={{ value: { min: 0, alias: '', type: 'linear-strict' }, year: { range: [0, 1] } }}
>
<Axis
title={{text: '金额(元)'}}
// visible={false}
name='value'
// line={{ style: { stroke: "#ff0000" } }}
tickLine={{ style: { lineWidth: 1 }, length: 5 }}
/>
<Line position="year*value" />
<Point position="year*value" />
<Tooltip showCrosshairs />
</Chart>
</Card>
<div className={styles.wrap}>
<div className={styles.layout} style={{margin: 0}}>
<Card
id={'QuotationDesk'}
title={title}
extra={<Radio.Group
defaultValue={1}
>
<Radio.Button value={1}>最近7次</Radio.Button>
<Radio.Button value={2}>最近15次</Radio.Button>
<Radio.Button value={3}>全部</Radio.Button>
</Radio.Group>
}
>
<Chart
appendPadding={[10, 0, 0, 10]}
autoFit
height={404}
data={data}
scale={scale}
>
<Axis
title={{ text: '金额(元)' }}
// visible={false}
name='value'
// line={{ style: { stroke: "#ff0000" } }}
tickLine={{ style: { lineWidth: 1 }, length: 5 }}
/>
<Line position="year*value" color="type" />
<Point position="year*value" color="type" />
<Tooltip shared showCrosshairs />
</Chart>
</Card>
</div>
</div>
)
}
......
......@@ -14,10 +14,11 @@ export interface IProps {
title: string,
visible: boolean,
id: number,
modalType: 'audit' | 'abandon' | 'date' | 'next' | 'key',
modalType: 'audit' | 'abandon' | 'date' | 'next' | 'key' | 'discard',
onCancel?: () => void,
onOk?: () => void,
fetch?: () => Promise<unknown>,
maxNumber?: number
}
const ModalOperate: React.FC<IProps> = (props: any) => {
......@@ -29,6 +30,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
onOk,
modalType,
fetch,
maxNumber,
} = props;
const useFormEffects = () => {
......@@ -75,6 +77,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
x-component-props={{}}
/>
case 'abandon':
case 'discard':
return <Field
title="作废时间"
name="reasonTime"
......@@ -150,6 +153,9 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
} else if (modalType === 'abandon') {
params.reason = value.reason
params.reasonTime = new Date(value.reasonTime).getTime();
}else if(modalType === 'discard'){
params.discardCaues = value.reason
params.discardTime = new Date(value.reasonTime).getTime();
} else if (modalType === 'date') {
params.quotedPriceTime = new Date(value.quotedPriceTime).getTime();
} else if (modalType === 'next') {
......@@ -204,15 +210,20 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
placeholder: `在此输入你的内容,最多${maxNumber}个汉字`
}}
x-rules={{
max: 60,
message: '原因最多60个汉字'
max: maxNumber,
message: `原因最多${maxNumber}个汉字`
}}
/>)}
</SchemaForm>
</Modal>
)
}
ModalOperate.defaultProps = {
maxNumber : 60
}
export default ModalOperate;
......@@ -70,7 +70,7 @@ const AddForm = () => {
const fileRef = await currentFile.current.get();
const ruleRef = await currentRules.current.get();
const requirementRef = await currentRequirement.current.get();
if (basicRef.state && materialRef.state && conditionRef.state && demandRef.state && fileRef.state && ruleRef.state && requirementRef.state) {
if (basicRef.state && materialRef.state && conditionRef.state && demandRef.state && ruleRef.state && requirementRef.state) {
const params: PostPurchasePurchaseInquiryAddRequest = {
memberId,
memberRoleId,
......@@ -223,6 +223,7 @@ const AddForm = () => {
currentRef={currentDemand}
fetchdata={demand}
onBadge={getError}
badgeIndex={5}
/>
</TabPane>
<TabPane key='7' tab='附件' forceRender>
......
......@@ -117,13 +117,20 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
<Form.Item
label='报名要求时间'
name='signUpTime'
rules={[{ required: true, message: '报名要求时间' }]}
rules={[{ required: true, message: '请选择报名要求时间' }]}
>
<DatePicker.RangePicker showTime format="YYYY-MM-DD HH:mm:ss" placeholder={['开始时间', '结束时间']} />
<DatePicker.RangePicker
showTime
format="YYYY-MM-DD HH:mm:ss"
placeholder={['开始时间', '结束时间']}
disabledDate={(current) => {
return current && current < moment().startOf('second')
}} />
</Form.Item>
<Form.Item
label="报名要求"
name="demand"
rules={[{ required: true, message: '请输入报名要求' }]}
>
<TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" />
</Form.Item>
......
......@@ -117,7 +117,11 @@ const Condition: React.FC<Iprops> = (props: any) => {
name="deliver"
rules={[{ required: true, message: '请选择支付日期' }]}
>
<DatePicker style={{ width: '100%' }} />
<DatePicker style={{ width: '100%' }}
disabledDate={(current) => {
return current && current <= moment().startOf('day')
}}
/>
</Form.Item>
<Form.Item
label="交付地址"
......@@ -135,36 +139,47 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item
label="报价要求"
name="offer"
rules={[{ required: true, message: '请输入报价要求' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
<Form.Item
label="付款方式"
name="paymentType"
rules={[{ required: true, message: '请输入付款方式' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
<Form.Item
label="税费要求"
name="taxes"
rules={[{ required: true, message: '请输入税费要求' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
<Form.Item
label="物流要求"
name="logistics"
rules={[{ required: true, message: '请输入物流要求' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
<Form.Item
label="包装要求"
name="packRequire"
rules={[{ required: true, message: '请输入包装要求' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
<Form.Item
label="其他要求"
name="otherRequire"
rules={[{ required: true, message: '请输入其他要求' }]}
>
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item>
......
import React from 'react';
import { Row, Col, Tooltip, Divider } from 'antd';
import { Row, Col, Button, Divider } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import useCountDown from '@/hooks/useCountDown';
import styles from './index.less'
const StatuBox = () => {
interface StatuBoxProps {
hasBidBtn?: boolean
}
const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
const { hasBidBtn } = props;
const [hour, minute, second, stillRun] = useCountDown(1627282562);
return (
<div className='ant-card ant-card-bordered'>
<div className='ant-card ant-card-bordered'>
<div className='ant-card-body'>
<div className={styles.statusBox}>
<div className={styles.statusBoxStatus}>当前状态:<span>竞价中</span></div>
<p className={styles.statusBoxTips}>距离竞价结束还剩</p>
<div className={styles.statusBoxTime}>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>02</div>
<div className={styles.statusBoxTimeChild_top}>{hour}</div>
<p className={styles.statusBoxTimeChild_bottom}>小时</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>32</div>
<div className={styles.statusBoxTimeChild_top}>{minute}</div>
<p className={styles.statusBoxTimeChild_bottom}>分钟</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>48</div>
<div className={styles.statusBoxTimeChild_top}>{second}</div>
<p className={styles.statusBoxTimeChild_bottom}></p>
</div>
</div>
<Divider dashed style={{color: '#EBECF0',margin: '6px 0' }} />
<h4></h4>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<h4>竞价规则</h4>
<div className={styles.statusBoxText}><div>报价规则:</div>项目总价(含税)</div>
<div className={styles.statusBoxText}><div>起拍价:</div>¥ 1,500.00</div>
<div className={styles.statusBoxText}><div>目标价:</div>¥ 900.00</div>
{!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>¥ 900.00</div>}
<div className={styles.statusBoxText}><div>最小价差:</div>¥ 100.00</div>
<div className={styles.statusBoxText}><div>允许报价次数:</div>3</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
<div className={styles.statusBoxText}><div>公开最低报价:</div></div>
<div className={styles.statusBoxText}><div>公开报价排名:</div></div>
{hasBidBtn ? (
<Button type="primary" icon={<PlusOutlined />} block >我要报价</Button>
) : (
<>
<div className={styles.statusBoxText}><div>公开最低报价:</div></div>
<div className={styles.statusBoxText}><div>公开报价排名:</div></div>
</>
)}
</div>
</div>
</div>
......
import React, { Fragment, useEffect, useState } from 'react';
import { Tag, Badge, Tooltip, Button } from 'antd';
import { history } from 'umi';
import { CheckCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { Context } from '../../components/detail/components/context';
import PeripheralLayout from '../../components/detail';
import ProgressLayout from '../../components/detail/components/progressLayout';
import RecordLyout from '../../components/detail/components/recordLyout';
import { formatTimeString } from '@/utils'
import MaterialLayout from '../../components/detail/components/materialLayout';
import DemandLayout from '../../components/detail/components/demandLayout';
import BidCommonLayout from '../../components/detail/components/bidCommonLayout';
import ModalOperate from '../../components/modalOperate';
import {
OFFTER_EXTERNALSTATE,
......@@ -15,11 +22,7 @@ import {
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR
} from '../../constants';
import { CheckCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import MaterialLayout from '../../components/detail/components/materialLayout';
import DemandLayout from '../../components/detail/components/demandLayout';
import BidCommonLayout from '../../components/detail/components/bidCommonLayout';
import ModalOperate from '../../components/modalOperate';
import ConfirmBidResultModal from '../components/confirmBidResultModal';
import UploadBidResultModal from '../components/uploadBidResultModal';
import QuotationDetailsDrawer from '../components/quotationDetailsDrawer';
......@@ -236,13 +239,24 @@ const SearchDetail = () => {
col: [
{ label: '会员名称', extra: '温州龙昌手袋有限公司',type: 'text' },
// {
// label: '适用地市', extra: (
// <Tooltip placement="top" title='设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'>
// {data.areas.map((it: any, idx: number) => (
// `${it.province}/${it.city}`
// ))}<QuestionCircleOutlined style={ICON_STYLE} />
// </Tooltip>
// )
// label: '适用地市', extra: {
// render : (t, r) => {
// const showDataSource = showMore ? data['inviteTenderAreaList'] : [...data['inviteTenderAreaList']].splice(0, 3)
// return <>
// <p>
// {
// showDataSource.map((_item, _i) => <p key={`address${_i}`}>{_item.provinceName+'/'+(_item.cityName||'')}</p>)
// }
// </p>
// {
// data.length > 3 &&
// <p onClick={toogleMore} style={{ cursor: 'pointer' }} className="commonPickColor">
// 展开{showMore ? <CaretDownOutlined /> : <CaretUpOutlined />}
// </p>
// }
// </>
// }
// }
// },
]
},
......@@ -292,6 +306,7 @@ const SearchDetail = () => {
{
col: [
{ label: '报名要求附件', extra: '',type: 'text' },
{ label: '报名要求附件', extra: '',type: 'pie' },
]
},
]
......
......@@ -101,7 +101,8 @@ const Search = () => {
id={id}
title="作废原因"
visible={visible}
modalType='abandon'
modalType='discard'
maxNumber={50}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
fetch={PublicApi.postPurchaseBiddingDiscard}
......
......@@ -33,6 +33,7 @@ interface Iprops {
currentRef: any,
fetchdata: { [key: string]: any },
onBadge?: Function,
badgeIndex? : number
}
const { Link } = Typography
......@@ -42,7 +43,8 @@ const Demand: React.FC<Iprops> = (props: any) => {
const {
currentRef,
fetchdata,
onBadge
onBadge,
badgeIndex
} = props;
const [value, setValue] = useState<number>(0);
const [store, setStore] = useState<Array<any>>([]);
......@@ -199,10 +201,10 @@ const Demand: React.FC<Iprops> = (props: any) => {
...params,
},
})
onBadge(0, 3)
onBadge(0, badgeIndex)
}).catch(error => {
if (error && error.errorFields) {
onBadge(error.errorFields.length, 3)
onBadge(error.errorFields.length, badgeIndex)
}
})
})
......@@ -313,4 +315,8 @@ const Demand: React.FC<Iprops> = (props: any) => {
)
}
Demand.defaultProps = {
badgeIndex : 3
}
export default Demand;
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