Commit cbae7c8d authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

feat: 添加投标/招标查询页面

parent 83a1f040
import { callForBidsRoute } from './callForBids'; import { callForBidsRoute } from './callForBids';
import { offterRoute } from './offter'; import { offterRoute } from './offter';
import { purchaseInquiryRoute } from './purchaseInquiry'; import { purchaseInquiryRoute } from './purchaseInquiry';
import { tenderRoute } from './tender';
/** /**
* 采购能力路由 * 采购能力路由
...@@ -12,6 +13,8 @@ const ProcurementRoute = { ...@@ -12,6 +13,8 @@ const ProcurementRoute = {
routes: [ routes: [
// // 招标 // // 招标
...callForBidsRoute, ...callForBidsRoute,
// // 投标
...tenderRoute,
// 采购询价 // 采购询价
...purchaseInquiryRoute, ...purchaseInquiryRoute,
// 报价 // 报价
......
/**
* @description: 采购能力 投标路由 开发中...
* @param {type}
* @return {type}
*/
export const tenderRoute = [
// 投标
{
path:'/memberCenter/procurementAbility/tender',
name:'投标',
routes:[
// 招标查询
{
path: '/memberCenter/procurementAbility/tender/callForBidsSearch',
name: '招标查询',
component: '@/pages/procurement/tender/callForBidsSearch'
},
// 招标查询-详情
{
path: '/memberCenter/procurementAbility/tender/callForBidsSearch/detail',
name: '招标详情',
component: '@/pages/procurement/tender/callForBidsSearch/detail',
hideInMenu: true,
noMargin: true,
},
]
},
]
...@@ -48,7 +48,7 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({ ...@@ -48,7 +48,7 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
"BidMethod": BidMethod, "BidMethod": BidMethod,
// 流转记录组件 // 流转记录组件
"BidTransformRecord": BidTransformRecord, "BidTransformRecord": BidTransformRecord,
// 中标结果详情组件 // 中标明细组件
"BidParticulars": BidParticulars, "BidParticulars": BidParticulars,
// 评标报告 // 评标报告
"RemarkBidReport": RemarkBidReport, "RemarkBidReport": RemarkBidReport,
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
} }
.ant-modal-content { .ant-modal-content {
height: 440px; height: 440px;
background: url('../../../../assets/imgs/thankLetterBg.png') center center no-repeat; background: url("/static/imgs/thankLetterBg.png") center center no-repeat;
// background: url('../../../../assets/imgs/thankLetterBg.png') center center no-repeat;
} }
.ant-modal-footer { .ant-modal-footer {
display: none; display: none;
......
...@@ -227,7 +227,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -227,7 +227,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
] ]
/** 投标区块 **/ /** 投标区块 **/
// 中标结果 // @todo 中标结果 根据后端数据控制
const result = 0 const result = 0
const bidResultList = [ const bidResultList = [
{ {
......
.anchorGap {
div {
&:target {
padding-top: 190px;
margin-top: -190px;
}
}
}
import React, { useState, useCallback, useRef, useContext, useEffect, createRef } from 'react';
import { history } from 'umi'
import { Button } from 'antd';
import style from './index.less'
import OrderDetailWrapper from '@/pages/transaction/components/OrderDetailWrapper';
import PreLoading from '@/components/PreLoading';
import OrderPayModal from '@/pages/transaction/components/orderPayModal';
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { useBidDetail } from '@/pages/procurement/_public/bid/effects/useBidDetail';
import BidDetailHeader from '@/pages/procurement/components/bidDetailHeader';
import BidDetailSection from '@/pages/procurement/components/bidDetailSection';
const CallForBidsSearchDetailInTender: React.FC = () => {
const { formContext, id, detailList } = useBidDetail({type: 'purchaseOrder'})
const {data, currentPayInfoId} = formContext
const payRef = useRef<any>({})
/** 约定好 对应的锚点title和元素id映射 */
// type? 用于区分DescriptionsInfo组件的内容
// componentName? 用于区分不同组件的渲染
const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '中标结果', id: 'bidResult', type: "bidResult" },
{ title: '中标明细', id: 'bidParticulars', componentName: "BidParticulars" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '投标要求', id: 'tenderNeed', type: "bidNeed" },
{ title: '投标其他要求', id: 'tenderOtherNeed', type: "bidNeed" },
{ title: '投标商品', id: 'tenderParticulars', componentName: "BidParticulars" },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
]
return (
<div>
<BidDetailContext.Provider value={formContext}>
<BidDetailHeader
detailList={detailList}
formContext={formContext}
anchorList={anchorTitleList}
backLink="/memberCenter/procurementAbility/tender/callForBidsSearch"
// extraRight={
// <Button type='primary'>
// 去支付
// </Button>
// }
/>
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<BidDetailSection formContext={formContext} anchorList={anchorTitleList} type="callForBid" />
</PreLoading>
</OrderDetailWrapper>
<OrderPayModal
currentRef={payRef}
/>
</BidDetailContext.Provider>
</div>
);
};
export default CallForBidsSearchDetailInTender;
import React, { useRef } from 'react'
import { Button, Popconfirm, Card, Space} from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { useSelfTable } from './model/useSelfTable'
import { tableListSchema } from './schema'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api'
const callForBidsSearch: React.FC<{}> = () => {
const {
ref,
columns
} = useSelfTable()
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderPendingOrderList(params)
return data
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
currentRef={ref}
columns={columns}
rowKey={'orderNo'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}
}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default callForBidsSearch
import React, { useRef } from 'react'
import { history, Link } from 'umi'
import { Button, Row, Col, Progress, Popconfirm } from 'antd'
import { PublicApi } from '@/services/api'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { ORDER_TYPE, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState } from '@/constants'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
// 招标查询
export const useSelfTable = () => {
const ref = useRef<any>({})
const handleCancel = (param) => {
PublicApi.postOrderPurchaseOrderCancel({id: param}).then(res => {
if(res.code === 1000) {
ref.current.reload()
}
})
}
const callForBidColumns: any[] = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
render: (text, record, index) => index + 1
},
{
title: '招标编号/项目',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/tender/callForBidsSearch/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
title: '采购类型',
align: 'center',
dataIndex: 'type',
key: 'type',
render: (text) => ORDER_TYPE[text]
},
{
title: '招标方式',
align: 'left',
dataIndex: 'supplyMembersName',
key: 'supplyMembersName',
},
{
title: '发布时间',
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => formatTimeString(record.createTime),
width: 200
},
{
title: '报名开始/截止时间',
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => <>
<div><PlayCircleOutlined />{formatTimeString(record.createTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.createTime)}</div>
</>,
width: 200
},
{
title: '资格预审开始/截止时间',
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => <>
<div><PlayCircleOutlined />{formatTimeString(record.createTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.createTime)}</div>
</>,
width: 200
},
{
title: '投标开始/截止时间',
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => <>
<div><PlayCircleOutlined />{formatTimeString(record.createTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.createTime)}</div>
</>,
width: 200
},
{
title: '外部状态',
align: 'center',
dataIndex: 'externalState',
key: 'externalState',
render: text => <CustomTag status={text} type='out' />
},
{
title: '内部状态',
align: 'center',
dataIndex: 'interiorState',
key: 'interiorState',
render: (text) => <CustomBadge status={text} type='inside' />
},
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
<Button type='link'>复制</Button>
<Popconfirm
title="是否要取消该订单?"
onConfirm={() => handleCancel(record.id)}
okText="是"
cancelText="否"
>
<Button type='link'>废标</Button>
</Popconfirm>
</>
}
]
return {
ref,
columns: callForBidColumns
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts } from '@/constants';
/**
* 招标查询列表高级筛选
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
},
colStyle: {
marginRight: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
"[startEnterTime,endEnterTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['报名开始时间','报名结束时间'],
},
},
"externalState": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: Object.keys(PurchaseOrderOutWorkStateTexts).map(item => ({
label: PurchaseOrderOutWorkStateTexts[item],
value: item,
}))
},
"interiorState": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: Object.keys(PurchaseOrderInsideWorkStateTexts).map(item => ({
label: PurchaseOrderInsideWorkStateTexts[item],
value: item,
}))
},
"[startApplyTime,endApplyTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['预审开始时间','预审结束时间'],
},
},
"[startBidTime,endBidTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['投标开始时间','投标结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
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