diff --git a/config/router.config.ts b/config/router.config.ts index b4159e9..4d57d33 100644 --- a/config/router.config.ts +++ b/config/router.config.ts @@ -71,6 +71,14 @@ export default [ }, ], }, + {//内拍-参与竞拍列表 + path: '/AuctionParticipateList', + component: './Auction/AuctionParticipateList', + }, + {//内拍-参与竞拍详情 + path: '/AuctionParticipateDetail', + component: './Auction/AuctionParticipateDetail', + }, {//公共服务平台 path: '/PublicPlatform', component: './Bid/BiddingAnnouncement/components/PublicPlatform', diff --git a/src/components/BiddingRoom/index.less b/src/components/BiddingRoom/index.less index c3ea6a4..8fc9318 100644 --- a/src/components/BiddingRoom/index.less +++ b/src/components/BiddingRoom/index.less @@ -31,7 +31,7 @@ text-align: center; line-height: 50px; font-size: 15px; - border:1px solid#f0f0f0; + border:1px solid #f0f0f0; //border-radius: 3px; margin-left: -1px; &:hover{ diff --git a/src/images/auction/participateLogo.jpg b/src/images/auction/participateLogo.jpg new file mode 100644 index 0000000..90fdff6 Binary files /dev/null and b/src/images/auction/participateLogo.jpg differ diff --git a/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx b/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx index 4a8a364..e99b579 100644 --- a/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx +++ b/src/pages/Auction/AuctionLookingForInnerShot/components/AuctionLookingForInnerShot.tsx @@ -131,23 +131,26 @@ const AuctionLookingForInnerShot: React.FC<{}> = () => { //参与竞拍 const handleOk = () => { - const fromData = { - "auctionId": auctionId, - "biddersLxdh": form.getFieldValue("biddersLxdh"), - "biddersFj": form.getFieldValue("biddersFj"), - "biddersBs": 0 - } - insertBidders(fromData).then(res => { - if (res != null && res.message == "success") { - message.success("参与竞拍成功!"); - checkRelationRef.current?.reload(); - setIsModalVisible(false); - } else { - message.error("参与竞拍失败!"); - checkRelationRef.current?.reload(); - setIsModalVisible(false); + form.validateFields().then(values => { + const fromData = { + "auctionId": auctionId, + "biddersCpr": form.getFieldValue("biddersCpr"), + "biddersLxdh": form.getFieldValue("biddersLxdh"), + "biddersFj": form.getFieldValue("biddersFj"), + "biddersBs": 0 } - }); + insertBidders(fromData).then(res => { + if (res != null && res.message == "success") { + message.success("参与竞拍成功!"); + checkRelationRef.current?.reload(); + setIsModalVisible(false); + } else { + message.error("参与竞拍失败!"); + checkRelationRef.current?.reload(); + setIsModalVisible(false); + } + }); + }) }; const handleCancel = () => { @@ -222,7 +225,8 @@ const AuctionLookingForInnerShot: React.FC<{}> = () => { diff --git a/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx b/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx new file mode 100644 index 0000000..9ee9b57 --- /dev/null +++ b/src/pages/Auction/AuctionParticipateDetail/components/AuctionViewAuctions.tsx @@ -0,0 +1,669 @@ +/* + * @Author: liqiang + * @Date: 2021-02-23 13:49:53 + * @LastEditTime: 2021-03-25 16:46:14 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: \ebtp-cloud-frontend\src\pages\Auction\AuctionViewAuctions\components\A.tsx + */ +import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; +import { Button, Col, Divider, Form, Input, message, Modal, Row, Spin, Tabs } from 'antd'; +import React, { useEffect, useRef, useState } from 'react'; +import ProTable from '@ant-design/pro-table'; +import ExtendUpload from '@/utils/ExtendUpload'; +import '../../AuctionViewAuctions/auctionParts.less'; +import { getProId, getSessionUserData } from '@/utils/session'; +import { pictureDisplayPath } from '@/utils/DownloadUtils'; +import { algebraicAddition, digitalConversionAmount } from '@/utils/NumberUtils'; +import { getFilelist } from '@/services/download_'; +import { getAuctionViewAuctions, getRedisBidData, putOrderBidPrice, updatetOnlookers } from '../../AuctionViewAuctions/service'; +import AuctionImage from '../../AuctionViewAuctions/components/AuctionImage'; +import CountDownUtils from '../../AuctionViewAuctions/components/CountDownUtils'; +import { insertBidders } from '../../AuctionLookingForInnerShot/service'; +const { TabPane } = Tabs; + +const layout = { + labelCol: { span: 7 }, + wrapperCol: { span: 13 }, +}; + +//定时器间隔时间 +const timingInterval = 5000; +//金额校验正则 保留两位小数 +const amountMoney = /^\d{1,15}([.]\d{1,2})?$/; +const AuctionViewAuctions: React.FC = () => { + //项目id + const tpId = isEmpty(getProId()) ? getURLInformation('id') : getProId(); + //状态 0围观 1 参拍 + const [viewStatus, setViewStatus] = useState(''); + //出价数据 + const [cjDataSource, setCjDataSource] = useState([]); + //起拍价 + const [startingPrice, setStartingPrice] = useState(); + //公告数据 + const [noticeData, setNoticeData] = useState(); + //物资数据 + const [auctionMaterialsList, setAuctionMaterialsList] = useState([]); + //标的物所在地:右侧信息 + const [locationOfTheSubjectMatter, setLocationOfTheSubjectMatter] = useState(); + const [subjectMatterIntroductionForm] = Form.useForm(); + //标的物清单附件bid + const [subjectMatterIntroductionBid, setSubjectMatterIntroductionBid] = useState(''); + //项目名称 + const [projectName, setProjectName] = useState(''); + //参拍信息 + const [participateData, setParticipateData] = useState(); + //当前价 + const [currentPrice, setCurrentPrice] = useState(0); + //延时次数 + const [delay, setDelay] = useState(); + //是否结束 + const [overFlag, setOverFlag] = useState(false); + //是否开始 + const [startFlag, setStartFlag] = useState(false); + //竞拍数据 + const [auctionData, setAuctionData] = useState(); + //倒计时剩余时间 + const [countDownTime, setCountDownTime] = useState(null); + //结束时间 + const [endTime, setEndTime] = useState(''); + //开始时间 + const [startTime, setStartTime] = useState(''); + const ref = useRef(); + + const overFlagRef = useRef(); + //图片 + const [auctionImage, setAuctionImage] = useState([]); + //显示图片 + const [auctionImageFlag, setAuctionImageFlag] = useState(false); + //控制模态框是否显示 + const [isModalVisible, setIsModalVisible] = useState(false); + //loading + const [loading, setLoading] = useState(false); + //form + const [form] = Form.useForm(); + //当前用户信息 + const userData = getSessionUserData(); + + const cjColumns = [ + { + title: '序号', + valueType: 'index' + }, + { + title: '参拍人', + dataIndex: 'supplierId', + }, + { + title: '出价(元)', + dataIndex: 'price', + }, + { + title: '出价时间', + dataIndex: 'bidTime', + }, + ]; + + const wzColumns = [ + { + title: '所属OU组织', + dataIndex: 'organization', + }, + { + title: '物资名称', + dataIndex: 'materialName', + }, + { + title: '物料编码', + dataIndex: 'materialCode', + }, + { + title: '物资厂家', + dataIndex: 'manufacturer', + }, + { + title: '规格型号', + dataIndex: 'specification', + key: 'specification', + }, + { + title: '库龄', + dataIndex: 'reservoirAge', + }, + { + title: '数量', + dataIndex: 'amount', + }, + { + title: '计量单位', + dataIndex: 'materialUnit', + }, + { + title: '单价', + dataIndex: 'unitPrice', + }, + { + title: '统一目录名称', + dataIndex: 'directoryName', + }, + { + title: '统一目录编码', + dataIndex: 'directoryCode', + }, + ]; + + useEffect(() => { + + init(); + + setTimeout(() => { + //项目已结束 + if (overFlagRef.current) { + return; + } + ref.current = setInterval(() => { + getRedisBidData(tpId).then(res => { + res = res !== null ? res : {}; + if (res.code === 200) { + let data = res.data; + timedRefreshData(data); + if (Number(data.jssj) <= 0) { + setOverFlag(true); + clearInterval(ref.current); + } + } else { + // clearInterval(ref.current); + } + }) + + }, timingInterval); + + }, timingInterval); + + }, []); + + + const reloadData = () => { + getRedisBidData(tpId).then(res => { + if (res.code === 200) { + let data = res.data; + timedRefreshData(data); + if (Number(data.jssj) <= 0) { + setOverFlag(true); + } + } + }) + } + + const timedRefreshData = (data: any) => { + let participateData = [data.cpr, data.cjcs, data.wgr]; + getParticipateData(participateData); + setCjDataSource(data.cjjl); + setCurrentPrice(data.zgjg); + setDelay(data.yscs); + setCountDownTime(data.jssj); + setStartFlag(data.bidOpeningStatus != "0"); + } + /** + * 倒计时结束 + */ + const countDownOver = () => { + setOverFlag(true); + } + + const getParticipateData = (arr: any[]) => { + setParticipateData( + <> + {arr[0]}人参拍 + {arr[1]}次出价 + {arr[2]}人围观 + + ) + } + + /** + * 初始化 + */ + const [range, rangeSet] = useState(0)//加价幅度 + const init = () => { + getAuctionViewAuctions(tpId).then(res => { + if (res.code === 200) { + let data = res.data; + //判断项目是否结束 + if (data.yczt) { + setOverFlag(data.yczt); + overFlagRef.current = data.yczt; + } + //项目是否开始 + setStartFlag(data.bidOpeningStatus != "0"); + findFile(data.gg.auctionBdwxcdfzp) + setProjectName(data.xm.auction.projectName); + setCurrentPrice(data.inner02_04); + let participateData = [data.inner02_03.cprsl, data.inner02_03.xmcjcs, data.inner02_03.wgrsl]; + getParticipateData(participateData); + setDelay(data.inner02_02.yscs); + setCjDataSource(data.tab03_01); + //状态 0围观 1 参拍 + setViewStatus(data.cprdm !== null ? '1' : '0'); + setStartingPrice( + <> + 起拍价:¥{digitalConversionAmount(String(data.gg.auctionJpjg), 2)} + 加价幅度:¥{digitalConversionAmount(String(data.gg.auctionJjfd), 2)} + 延时周期:{data.gg.auctionYszq}分钟/次 + + ); + rangeSet(Number(data.gg.auctionJjfd));//幅度 + // offerAPriceSet(Number(data.inner02_04));//出价 + //公告数据 + setNoticeData( +
+ +
+
+
+ 竞拍公告附件: + + +
+ ) + setAuctionMaterialsList(data.xm.auctionMaterialsList); + subjectMatterIntroductionForm.setFieldsValue(data.gg); + setSubjectMatterIntroductionBid(data.gg.auctionBdwqdfj); + setLocationOfTheSubjectMatter( + <> +
  • 标的物所在地:{data.gg.auctionBdwwz}
  • +
  • 挂拍方:{data.gg.auctionGpf}
  • +
  • 联系人:{data.gg.auctionLxr}
  • +
  • 联系电话:{data.gg.auctionLxdh}
  • + + ) + setEndTime(data.gg.auctionJpjssj); + setStartTime(data.gg.auctionJpkssj); + setCountDownTime(data.jpjssjTime); + setAuctionData(data); + //围观+1 + if (data.cprdm == null && data.bidOpeningStatus != "0") {//开始后未报名的才算围观 + updatetOnlookers(tpId).then(res => { + + }); + } + } + }) + } + + const findFile = (id: string) => { + getFilelist([id]).then(res => { + let arr = [] + if (res?.success && res?.data.length > 0) { + for (const item of res?.data) { + arr.push(pictureDisplayPath + '?filePath=' + item.filePath); + } + } + setAuctionImage(arr); + setAuctionImageFlag(true); + }) + } + + /** + * 出价 + */ + const [offerAPrice, offerAPriceSet] = useState(''); + const onSearch = () => { + let value: any = Number(offerAPrice); + if (isEmpty(value)) { + message.info('请出价!'); + return; + } + + if (!amountMoney.test(value)) { + message.info('请输入正确的格式(小数点前15位,小数点后2位)!'); + return; + } + if (Number(value) <= Number(currentPrice)) { + message.info('请输入高于当前价的金额!'); + return; + } + // let differ = (Number(value) - Number(currentPrice)) % range + let differ = (value * 1000 - currentPrice * 1000) % (range * 1000) + if (differ !== 0) { + message.info('请增加加价幅度整数倍的金额!'); + return; + } + //出价 + confirmBidOrNot(tpId, value); + } + + + /** + * 确认出价 + * @param tpId + * @param value + */ + const confirmBidOrNot = (tpId: any, value: any) => { + const orderBidPrice = (tpId: any, value: any) => { + //出价 + putOrderBidPrice(tpId, value).then(res => { + if (res.code === 200) { + let data = res.data; + if (data) { + message.success('出价成功!'); + } + reloadData(); + } + }) + } + Modal.confirm({ + content: "请确认出价", + okText: '确认', + cancelText: '取消', + keyboard: false, + centered: true, + onCancel: () => { }, + onOk: () => orderBidPrice(tpId, value) + }); + } + /** + * 我要参拍 + */ + const toParticipate = () => { + if (isParticipant()) {//有权限 + setIsModalVisible(true); + form.setFieldsValue({ + "organizationName": userData.organizationName, + "biddersCpr": userData.fullName, + }); + } else { + message.info("您好,您不具有参拍人权限,无法参与竞拍出价,您可联系省分接口人配置参拍权限。"); + } + } + //参与竞拍 + const handleOk = () => { + form.validateFields().then(values => { + const fromData = { + "auctionId": tpId, + "biddersCpr": form.getFieldValue("biddersCpr"), + "biddersLxdh": form.getFieldValue("biddersLxdh"), + "biddersFj": form.getFieldValue("biddersFj"), + "biddersBs": 0 + } + setLoading(true); + insertBidders(fromData).then(res => { + if (res != null && res.message == "success") { + message.success("参与竞拍成功!"); + init(); + setIsModalVisible(false); + } + }).finally(() => { + setLoading(false); + }); + }) + }; + + const handleCancel = () => { + setIsModalVisible(false); + }; + //判断当前登录人是否有参拍人角色 + const isParticipant = () => { + if (userData.authorityList?.length > 0) { + for (const ite of userData.authorityList) { + if (ite.roleCode == "ebtp-auction-participant") {//参拍人角色 + return true; + } + } + return false; + } + return false; + } + + return ( + +
    + { + auctionImageFlag && + } +
    + {/* */} +
    +

    {projectName}

    + {/* */} +
    + + { + overFlag ? ( + <> + 竞拍结束 + +  结束时间:{endTime}(延时{delay}次) + + + ) : startFlag ? ( + <> + 正在进行 + +  距离结束仅剩: + countDownOver()} />(延时{delay}次) + + + + ) : ( + <> + 未开始 + +  开始时间:{startTime} + + + ) + } +

    + {participateData} +

    +
    +
    + {overFlag ? '最终价:' : '当前价:'}¥{digitalConversionAmount(String(currentPrice), 2)} +
    + { + !overFlag && ( + viewStatus === '1' ? ( + startFlag ? (
    + <> + 请出价: + offerAPriceSet(e.target.value)} + /> + + + + +
    ) : ( +
    + 您已报名参拍,竞拍未开始! +
    + ) + ) : ( +
    + +
    + ) + ) + } +
    + {startingPrice} + { + viewStatus === '1' && isParticipant() && startFlag && 竞拍代码:{auctionData?.cprdm} + } +
    +
    +
    +
      + {locationOfTheSubjectMatter} +
    +
    +
    + + + + + + + 竞拍公告 + {noticeData} + + + 标的物介绍 +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* + + */} + + +
    + + 出价记录 + + +
    + +
    + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + + +
    + ) +} +export default AuctionViewAuctions; \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateDetail/index.tsx b/src/pages/Auction/AuctionParticipateDetail/index.tsx new file mode 100644 index 0000000..33df42c --- /dev/null +++ b/src/pages/Auction/AuctionParticipateDetail/index.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import AuctionViewAuctions from './components/AuctionViewAuctions'; + +const Index: React.FC = () => { + return ( + <> + + + ) +} + +export default Index; \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateList/index.less b/src/pages/Auction/AuctionParticipateList/index.less new file mode 100644 index 0000000..34e0760 --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/index.less @@ -0,0 +1,109 @@ +.header { + display: flex; + height: 56px; + color: white; + font-size: 20px; + background-color: #b30000; + + .headerAlign { + align-self: center; + margin-left: 20px; + font-weight: 400; + } + + .rightBtns { + position: absolute; + right: 0; + + li { + float: left; + padding: 0 14px; + color: #fff; + font-weight: 400 !important; + font-size: 14px; + line-height: 56px; + list-style: none; + + span { + padding-right: 6px; + font-size: 16px; + } + + a { + color: #fff; + } + } + } +} + +.auction-start-time { + margin-top: 4px; + padding: 2px 0px; + color: #b30000; + background: #f2f2f2; + font-size: 90%; + font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; + text-align: center; + border-radius: 3px; +} + +.auction-final-time { + margin-top: 4px; + padding: 2px 0px; + color: #b30000; + font-size: 90%; + font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; + text-align: center; + border: 1px solid #b30000; + border-radius: 3px; +} + +.site-input-group-wrapper .site-input-split { + background-color: #fff; +} + +.site-input-group-wrapper .site-input-right { + border-left-width: 0; +} + +.site-input-group-wrapper .site-input-right { + border-left-width: 0; +} + +.site-input-group-wrapper .site-input-right:hover, +.site-input-group-wrapper .site-input-right:focus { + border-left-width: 1px; +} + +.site-input-group-wrapper .ant-input-rtl.site-input-right { + border-right-width: 0; +} + +.site-input-group-wrapper .ant-input-rtl.site-input-right:hover, +.site-input-group-wrapper .ant-input-rtl.site-input-right:focus { + border-right-width: 1px; +} + +.auction-wks-tag { + position: absolute; + top: 4px; + left: 4px; + margin: 0px; + font-size: 90%; + padding: 3px 12px; + background: #aaaaaa; + color: #fff; + border: none; +} + +.auction-jpz-tag { + position: absolute; + top: 4px; + left: 4px; + margin: 0px; + font-size: 90%; + padding: 3px 12px; + background: #b30000; + color: #fff; + border: none; +} \ No newline at end of file diff --git a/src/pages/Auction/AuctionParticipateList/index.tsx b/src/pages/Auction/AuctionParticipateList/index.tsx new file mode 100644 index 0000000..1be36da --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/index.tsx @@ -0,0 +1,346 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { Avatar, Button, Card, DatePicker, Descriptions, Input, List, Radio, Space, Spin, Tag, Typography } from 'antd'; +import './index.less'; +import styles from './index.less'; +import logo from '@/images/opening/logo.svg'; +import { UserSwitchOutlined, CarryOutOutlined, EnvironmentOutlined, SearchOutlined } from '@ant-design/icons'; +import moment from 'moment'; +import { getSessionUserData } from '@/utils/session'; +import { getProvince } from '../AuctionAnnouncementData/service'; +import { getList, getSfbm } from './service'; +import { saveDateTimeFormatter } from '@/utils/DateUtils'; +import { isNotEmpty } from '@/utils/CommonUtils'; +import { pictureDisplayPath } from '@/utils/DownloadUtils'; +import { getFilelist } from '@/services/download_'; +import participateLogo from '@/images/auction/participateLogo.jpg' + +export default () => { + //获取用户数据 + let userData = getSessionUserData(); + //省数据 + const [sfbms, setSfbms] = useState([]); + //商品列表数据 + const [productList, setProductList] = useState([]); + //loading + const [loading, setLoading] = useState(false); + //所属省份 + const sfbm = useRef('all'); + //拍卖状态 + const zt = useRef('all'); + //当前/起拍价-最低价 + const zdjg = useRef(''); + //当前/起拍价-最高价 + const zgjg = useRef(''); + //拍卖时间-开始日期 + const kssj = useRef(''); + //拍卖时间-结束日期 + const jssj = useRef(''); + //项目名称 + const name = useRef(''); + //省字典 + const provinces = useRef([]); + //最低价ref + const zdjgRef = useRef(); + //最高价ref + const zgjgRef = useRef(); + //页码 + const pageNo = useRef(1); + const { Text } = Typography; + //查询 + const getParticipateList = async () => { + const params = { + pageNo: pageNo.current, + pageSize: 12, + } + sfbm.current != 'all' ? params['sfbm'] = [sfbm.current] : null; + zt.current != 'all' ? params['zt'] = zt.current : null; + isNotEmpty(zdjg.current) ? params['zdjg'] = zdjg.current : null; + isNotEmpty(zgjg.current) ? params['zgjg'] = zgjg.current : null; + isNotEmpty(kssj.current) ? params['kssj'] = kssj.current : null; + isNotEmpty(jssj.current) ? params['jssj'] = jssj.current : null; + isNotEmpty(name.current) ? params['projectName'] = name.current : null; + setLoading(true); + await getList(params).then(async res => { + if (res?.code == 200) { + for (const ite of res?.data.records) { + await getFilelist([ite.dfzp]).then(response => {//获取主图 + if (response?.success && response?.data?.length > 0) { + const returnUrl = window.location.origin + pictureDisplayPath + '?filePath=' + response?.data[0].filePath; + ite["dfzpUrl"] = returnUrl; + } + }) + } + setProductList(res?.data.records); + } + }).finally(() => { + setLoading(false); + }) + } + //获取省份字典及数据 + const getProvinces = async () => { + await getProvince().then(res => { + if (res?.code == 200) { + provinces.current = res?.data; + } + }) + //获取省份数据 + await getSfbm().then(res => { + if (res?.code == 200) { + setSfbms(res?.data); + } + }) + } + //省份名称转换 + const getProvinceName = (id: string) => { + if (provinces.current.length > 0) { + for (const item of provinces.current) { + if (item.id == id) { + return item.name; + } + } + } + return null; + } + const sfbmChange = (e: any) => { + sfbm.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + const bidOpeningStatusChange = (e: any) => { + zt.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + const zdjgBlur = (e: any) => { + e.persist(); + if (zdjg.current !== e.target.value) { + zdjg.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + } + const zgjgBlur = (e: any) => { + e.persist(); + if (zgjg.current !== e.target.value) { + zgjg.current = e.target.value; + pageNo.current = 1; + getParticipateList(); + } + } + const sjChange = (times: any) => { + if (times?.length > 0) { + kssj.current = saveDateTimeFormatter(times[0].startOf('day')); + jssj.current = saveDateTimeFormatter(times[1].endOf('day')); + pageNo.current = 1; + getParticipateList(); + } else { + kssj.current = ''; + jssj.current = ''; + pageNo.current = 1; + getParticipateList(); + } + } + const pageChange = (page: number) => { + pageNo.current = page; + getParticipateList(); + } + const nameChange = (e: any) => { + e.persist(); + name.current = e.target.value; + if (e.currentTarget?.value == "") { + pageNo.current = 1; + getParticipateList(); + } + } + //点击商品进入详情 + const cardClick = (id: string) => { + let projectData = { + id: id + }; + sessionStorage.setItem('projectData', JSON.stringify(projectData)); + window.open("/AuctionParticipateDetail"); + } + //项目名称模糊查询 + const onSearch = () => { + if (isNotEmpty(name.current)) { + pageNo.current = 1; + getParticipateList(); + } + }; + + useEffect(() => { + getProvinces(); + getParticipateList(); + }, []); + + return ( +
    +
    +
    + 中国联通智慧供应链平台 | 招标采购中心 +
    +
      +
    • {moment().format("YYYY-MM-DD")}
    • + {userData?.organizationName == null ? null : (
    • {userData.organizationName}
    • )} +
    • + + + {userData.fullName} + +
    • +
    +
    +
    + +
    +
    +
    + + 物资处置 · 内拍 +
    +
    + {/* } + /> */} +
    + } allowClear bordered={false} onChange={nameChange} onPressEnter={() => onSearch()} /> + +
    +
    +
    + + + + + 不限 + {sfbms.map(item => {getProvinceName(item)})} + + + + + + + 不限 + 未开始 + 竞拍中 + + + + +
    + + zdjgBlur(event)} + onPressEnter={() => zdjgRef.current.blur()} + /> + + zgjgBlur(event)} + onPressEnter={() => zgjgRef.current.blur()} + /> + +
    +
    + + + +
    + pageChange(page), + pageSize: 12, + }} + renderItem={item => ( + + + } + onClick={() => cardClick(item.id)} + > +
    + {item.bidOpeningStatus == "0" ? `竞拍开始时间:${item.jpkssj}` : `竞拍结束时间:${item.jpjssj}`} +
    +
    +
    + {item.projectName} +
    +
    +
    + + {getProvinceName(item.sfbm)} + +
    +
    + {item.bidOpeningStatus == "0" ? `起拍价:${item.qpjg}元` : `当前价:${item.dqjg}元`} + {item.offerNumber}次出价 +
    +
    +
    + {item.bidOpeningStatus == "0" ? '未开始' : '竞拍中'} +
    +
    + )} + /> +
    +
    +
    +
    + ) +}; diff --git a/src/pages/Auction/AuctionParticipateList/service.ts b/src/pages/Auction/AuctionParticipateList/service.ts new file mode 100644 index 0000000..0076f23 --- /dev/null +++ b/src/pages/Auction/AuctionParticipateList/service.ts @@ -0,0 +1,20 @@ +import request from '@/utils/request'; + +/** + * 获取省份数据 + * @returns + */ +export async function getSfbm() { + return request('/api/biz-service-ebtp-auction/v1/innerShot/getProvince'); +} +/** + * 查询商品列表 + * @param data + * @returns + */ +export async function getList(data: any) { + return request('/api/biz-service-ebtp-auction/v1/innerShot/libraryTube/getPageList', { + method: 'POST', + data: data, + }); +} \ No newline at end of file diff --git a/src/pages/Auction/AuctionViewAuctions/auctionParts.less b/src/pages/Auction/AuctionViewAuctions/auctionParts.less index 88b39e4..5882608 100644 --- a/src/pages/Auction/AuctionViewAuctions/auctionParts.less +++ b/src/pages/Auction/AuctionViewAuctions/auctionParts.less @@ -43,11 +43,13 @@ ul.small-img-ul li.img.active{ border-color:#b30000; } .priceBlock{ height: 56px; line-height: 56px;} .priceBlock span{ font-size: 24px; font-weight: bold;} .saleBlock{ height: 56px;} -.saleBlock span{ font-size: 24px; font-weight: bold; color: #b30000;} -.saleBlock input[type="text"]{ padding: 2px; width: 200px; height: 28px; border: 1px solid #ddd; border-radius: 2px;} -.saleBlock button{ width: 64px; height: 32px; line-height: 32px; text-align: center; background: #b30000; color: #fff; border-radius: 3px; cursor: pointer;} +.saleBlock span{ font-size: 24px; font-weight: bold; color: #b30000; position: relative; top: 2px;} +.saleBlock input[type="text"]{ padding: 2px; width: 200px; height: auto; border: 1px solid #ddd; border-radius: 2px;} +.saleBlock button{ width: 64px; height: auto; line-height: 32px; text-align: center; background: #b30000; color: #fff; border-radius: 3px; cursor: pointer;margin: 0px;padding: 0px;border: none;} .otherInform{} .otherInform span{ display:inline-block; float: left; width: 49%; line-height: 2;} .contentParts .rightInform{ position: absolute; top: 10px; right: 15px; width: 280px;} .contentParts .rightInform ul{} .contentParts .rightInform ul li{ margin: 2px 0 8px; line-height: 1.8; color: #999;} +.auction-not-started{ height: 48px;} +.auction-not-started span{ font-size: 20px; font-weight: bold; color: #b30000;}