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

feat: 新增投标相关页面,处理地址选择禁用异常

parent c3e74bd1
...@@ -24,6 +24,62 @@ export const tenderRoute = [ ...@@ -24,6 +24,62 @@ export const tenderRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// 投标查询
{
path: '/memberCenter/procurementAbility/tender/tenderSearch',
name: '投标查询',
component: '@/pages/procurement/tender/tenderSearch'
},
//投标查询-详情
{
path: '/memberCenter/procurementAbility/tender/tenderSearch/detail',
name: '招标详情',
component: '@/pages/procurement/tender/tenderSearch/detail',
hideInMenu: true,
noMargin: true,
},
// 待招标报名
{
path: '/memberCenter/procurementAbility/tender/readyBidRegister',
name: '待招标报名',
component: '@/pages/procurement/tender/readyBidRegister'
},
// 待招标报名-新增
{
path: '/memberCenter/procurementAbility/tender/readyBidRegister/add',
name: '新增待招标报名',
component: '@/pages/procurement/tender/addBidRegister',
hideInMenu: true,
noMargin: true,
},
// 待提交资格预审
{
path: '/memberCenter/procurementAbility/tender/readyQualifityChecked',
name: '待提交资格预审',
component: '@/pages/procurement/tender/readyQualifityChecked'
},
// 待提交资格预审-详情
{
path: '/memberCenter/procurementAbility/tender/readyQualifityChecked/detail',
name: '待提交资格预审详情',
component: '@/pages/procurement/tender/readyQualifityChecked/detail',
hideInMenu: true,
noMargin: true,
},
// 待新建投标
{
path: '/memberCenter/procurementAbility/tender/readyAddTender',
name: '待新建投标',
component: '@/pages/procurement/tender/readyAddTender'
},
// 新建投标
{
path: '/memberCenter/procurementAbility/tender/readyAddTender/add',
name: '新建投标',
component: '@/pages/procurement/tender/addTender',
hideInMenu: true,
noMargin: true,
},
] ]
}, },
] ]
...@@ -66,6 +66,7 @@ const MultAddress = (props) => { ...@@ -66,6 +66,7 @@ const MultAddress = (props) => {
} }
// 触发onChange改变值 // 触发onChange改变值
// num: 1省2市区3区/县
const changeAddress = async (val: any, idx: number, num: number) => { const changeAddress = async (val: any, idx: number, num: number) => {
const result = [...value] const result = [...value]
const cityCode: Array<any> = [] const cityCode: Array<any> = []
...@@ -83,6 +84,12 @@ const MultAddress = (props) => { ...@@ -83,6 +84,12 @@ const MultAddress = (props) => {
result[idx].provinceCode = val; result[idx].provinceCode = val;
result[idx].province = item.name; result[idx].province = item.name;
city[idx] = { citydata: res.data } city[idx] = { citydata: res.data }
// 改变省份 清空市县数据
result[idx].city = null,
result[idx].cityCode = null,
result[idx].area = null,
result[idx].areaCode = null,
mutators.change(result)
setcity([...city]) setcity([...city])
} }
}) })
...@@ -96,13 +103,16 @@ const MultAddress = (props) => { ...@@ -96,13 +103,16 @@ const MultAddress = (props) => {
result[idx].cityCode = val; result[idx].cityCode = val;
result[idx].city = item.name; result[idx].city = item.name;
area[idx] = { areadata: res.data } area[idx] = { areadata: res.data }
// 改变市 清空区县
result[idx].area = null,
result[idx].areaCode = null,
mutators.change(result)
setarea([...area]) setarea([...area])
} }
}) })
} }
}) })
} else if(num === 3) { } else if(num === 3) {
console.log(area, 'area')
area[0].areadata.forEach(item => { area[0].areadata.forEach(item => {
if (item.code === val) { if (item.code === val) {
result[idx].areaCode = val; result[idx].areaCode = val;
...@@ -114,21 +124,21 @@ const MultAddress = (props) => { ...@@ -114,21 +124,21 @@ const MultAddress = (props) => {
mutators.change(result) mutators.change(result)
} }
// 触发select下拉调用 // // 触发select下拉调用
const onDropdownVisibleChange = () => { // const onDropdownVisibleChange = () => {
return new Promise(reslove => reslove(code)).then((res: any) => { // return new Promise(reslove => reslove(code)).then((res: any) => {
city.forEach((item: any) => { // city.forEach((item: any) => {
item.citydata.filter(it => { // item.citydata.filter(it => {
res.map(items => { // res.map(items => {
if (items === it.code) { // if (items === it.code) {
it.disabled = true // it.disabled = true
} // }
}) // })
}) // })
}) // })
setcity([...city]) // setcity([...city])
}) // })
} // }
return (<RowStyleLayout> return (<RowStyleLayout>
{value.map((item: any, idx: number) => { {value.map((item: any, idx: number) => {
...@@ -139,7 +149,7 @@ const MultAddress = (props) => { ...@@ -139,7 +149,7 @@ const MultAddress = (props) => {
<Form.Item> <Form.Item>
<Select <Select
placeholder="请选择" placeholder="请选择"
onDropdownVisibleChange={onDropdownVisibleChange} // onDropdownVisibleChange={onDropdownVisibleChange}
onChange={(value) => { onChange={(value) => {
changeAddress(value, idx, 1) changeAddress(value, idx, 1)
}} }}
...@@ -157,7 +167,7 @@ const MultAddress = (props) => { ...@@ -157,7 +167,7 @@ const MultAddress = (props) => {
<Form.Item> <Form.Item>
<Select <Select
placeholder="请选择" placeholder="请选择"
onDropdownVisibleChange={onDropdownVisibleChange} // onDropdownVisibleChange={onDropdownVisibleChange}
onChange={(value) => { onChange={(value) => {
changeAddress(value, idx, 2) changeAddress(value, idx, 2)
}} }}
...@@ -175,7 +185,7 @@ const MultAddress = (props) => { ...@@ -175,7 +185,7 @@ const MultAddress = (props) => {
<Form.Item> <Form.Item>
<Select <Select
placeholder="请选择" placeholder="请选择"
onDropdownVisibleChange={onDropdownVisibleChange} // onDropdownVisibleChange={onDropdownVisibleChange}
onChange={(value) => { onChange={(value) => {
changeAddress(value, idx, 3) changeAddress(value, idx, 3)
}} }}
......
...@@ -17,7 +17,7 @@ import { PurchaseOrderInsideWorkState } from '@/constants' ...@@ -17,7 +17,7 @@ import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest' import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix' import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待新增订单 // 待新增招标
export interface ReadyAddBidProps {} export interface ReadyAddBidProps {}
......
...@@ -20,16 +20,15 @@ const TenderSearchDetail: React.FC = () => { ...@@ -20,16 +20,15 @@ const TenderSearchDetail: React.FC = () => {
/** 约定好 对应的锚点title和元素id映射 */ /** 约定好 对应的锚点title和元素id映射 */
// type? 用于区分DescriptionsInfo组件的内容 // type? 用于区分DescriptionsInfo组件的内容
// componentName? 用于区分不同组件的渲染 // componentName? 用于区分不同组件的渲染
const anchorTitleList = [ const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" }, { title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '中标结果', id: 'bidResult', type: "bidResult" },
{ title: '中标明细', id: 'bidParticulars', componentName: "BidParticulars" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" }, { title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" }, { title: '投标要求', id: 'tenderNeed', type: "bidNeed" },
{ title: '招标要求', id: 'bidNeed', type: "bidNeed" }, { title: '投标其他要求', id: 'tenderOtherNeed', type: "bidNeed" },
{ title: '报名要求', id: 'registerNeed', type: "registerNeed" }, { title: '投标商品', id: 'tenderParticulars', componentName: "BidParticulars" },
{ title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
{ title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
{ title: '其他要求', id: 'otherNeed', type: "otherNeed" },
{ title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" }, { title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
] ]
...@@ -38,7 +37,8 @@ const TenderSearchDetail: React.FC = () => { ...@@ -38,7 +37,8 @@ const TenderSearchDetail: React.FC = () => {
<BidDetailContext.Provider value={formContext}> <BidDetailContext.Provider value={formContext}>
<BidDetailHeader <BidDetailHeader
detailList={detailList} detailList={detailList}
detailData={formContext.data} formContext={formContext}
// detailData={formContext.data}
anchorList={anchorTitleList} anchorList={anchorTitleList}
backLink="/memberCenter/procurementAbility/callForBids/tenderSearch" backLink="/memberCenter/procurementAbility/callForBids/tenderSearch"
extraRight={ extraRight={
......
...@@ -35,7 +35,7 @@ export const useSelfTable = () => { ...@@ -35,7 +35,7 @@ export const useSelfTable = () => {
dataIndex: 'orderNo', dataIndex: 'orderNo',
key: 'orderNo', key: 'orderNo',
render: (text, record) => <> render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.id}`}> <EyePreview url={`/memberCenter/procurementAbility/callForBids/tenderSearch/detail?id=${record.id}`}>
{text} {text}
</EyePreview> </EyePreview>
<div>{text}</div> <div>{text}</div>
...@@ -47,7 +47,7 @@ export const useSelfTable = () => { ...@@ -47,7 +47,7 @@ export const useSelfTable = () => {
dataIndex: 'orderNo', dataIndex: 'orderNo',
key: 'orderNo', key: 'orderNo',
render: (text, record) => <> render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/callForBidsSearch/preview?id=${record.id}`}> <EyePreview url={`/memberCenter/procurementAbility/callForBids/tenderSearch/preview?id=${record.id}`}>
{text} {text}
</EyePreview> </EyePreview>
<div>{text}</div> <div>{text}</div>
......
import React, {useEffect} from 'react'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { useModalTable } from '../../model/useModalTable'
import ModalTable from '@/components/ModalTable'
import { columnsSetMember } from '../../constant'
import { PublicApi } from '@/services/api'
import {formSearch } from '../../schema/modal'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import ModalSearch from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { PageStatus, usePageStatus } from '@/hooks/usePageStatus'
import { clearModalParams } from '@/utils'
import DrawerTable from '@/components/DrawerTable'
export interface MemberModalProps {
type?: 'radio' | 'checkbox',
schemaAction: ISchemaFormActions | ISchemaFormAsyncActions,
currentRef?: any,
}
const ProjectModal:React.FC<MemberModalProps> = (props) => {
const { type = "checkbox", schemaAction, currentRef, ...restProps } = props
const {
visible,
setVisible,
rowSelection,
rowSelectionCtl,
} = useModalTable({type, customKey: "memberId"})
const {
id,
preview,
pageStatus
} = usePageStatus()
useEffect(() => {
if (currentRef) {
currentRef.current = {
setVisible,
visible,
rowSelectionCtl
}
}
}, [])
// 添加会员
const handleOkAddMember = () => {
setVisible(false)
if(pageStatus === PageStatus.EDIT) {
schemaAction.setFieldState('commodityMemberList', state => {
state.isDelete = true
})
let hasMember: any = schemaAction.getFieldValue('commodityMemberList') || []
schemaAction.setFieldValue('commodityMemberList', hasMember.concat(rowSelectionCtl.selectRow))
rowSelectionCtl.setSelectedRowKeys([])
rowSelectionCtl.setSelectRow([])
} else {
schemaAction.setFieldValue('commodityMemberList', rowSelectionCtl.selectRow)
schemaAction.setFieldState('commodityMemberList', state => {
state.dataSource = rowSelectionCtl.selectRow
})
}
clearModalParams()
}
const handleCancelAddMember = () => {
setVisible(false)
clearModalParams()
}
const fetchMemberList = async (params) => {
const excludeIds = await PublicApi.getProductCommodityGetStrategyMemberByCommodityId({commodityId: schemaAction.getFieldValue("productId")}, {ctlType: 'none'})
let checkedMember = schemaAction.getFieldValue('commodityMemberList')
if(schemaAction.getFieldState('commodityMemberList').isDelete) {
params.excludeList = checkedMember.map(item => ({
memberId: item.memberId,
roleId: item.roleId,
}))
} else {
params.excludeList = excludeIds.data.map(item => ({
memberId: item.memberId,
roleId: item.memberRoleId,
}))
}
const res = await PublicApi.postMemberManageLowerConsumerPage(params, {ctlType: 'none'});
return res.data
}
return (
<ModalTable
modalTitle='选择项目'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visible}
columns={columnsSetMember}
rowSelection={rowSelection}
fetchTableData={params => fetchMemberList(params)}
formilyProps={
{
ctx: {
schema: formSearch,
components: {
ModalSearch,
Submit,
},
effects: ($, actions) => {
actions.reset()
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
},
}
}
}
resetModal={{
destroyOnClose: true
}}
tableProps={{
rowKey: 'memberId'
}}
/>
)
}
ProjectModal.defaultProps = {}
export default ProjectModal
// 选择商品和会员弹框的列
export const columnsSetMember: any[] = [
{
title: 'ID',
dataIndex: 'memberId',
align: 'center',
key: 'memberId',
},
{
title: '会员名称',
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
align: 'center',
key: 'memberTypeName',
},
{
title: '会员角色',
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '会员等级',
dataIndex: 'levelTag',
align: 'center',
key: 'levelTag',
}
]
.ant-input-group-addon {
padding: 0;
border: none;
}
.connectBtn {
width: 80px;
height: 32px;
line-height: 32px;
background: #909399;
color: #fff;
text-align: center;
cursor: pointer;
}
.footer {
position: absolute;
right: 0;
bottom: 0;
padding: 12px 16px 12px 0;
width: 100%;
text-align: right;
border-top: 1px solid #eee;
background-color: #fff;
}
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 12px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
This diff is collapsed.
import { useState, useEffect } from 'react'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
export const useModalTable = (options?) => {
const [visible, setVisible] = useState(false)
const [rowSelection, rowSelectionCtl] = useRowSelectionTable(options)
return {
visible,
setVisible,
rowSelection,
rowSelectionCtl
}
}
This diff is collapsed.
import { FORM_FILTER_PATH } from "@/formSchema/const";
import { ISchema } from "@formily/antd";
// 选择商品和会员高级筛选
export const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入会员名字',
align: 'flex-left',
advanced: false,
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询',
}
}
}
}
}
}
// 选择商品和会员弹框的列
export const columnsSetMember: any[] = [
{
title: 'ID',
dataIndex: 'memberId',
align: 'center',
key: 'memberId',
},
{
title: '会员名称',
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
align: 'center',
key: 'memberTypeName',
},
{
title: '会员角色',
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '会员等级',
dataIndex: 'levelTag',
align: 'center',
key: 'levelTag',
}
]
.ant-input-group-addon {
padding: 0;
border: none;
}
.connectBtn {
width: 80px;
height: 32px;
line-height: 32px;
background: #909399;
color: #fff;
text-align: center;
cursor: pointer;
}
.footer {
position: absolute;
right: 0;
bottom: 0;
padding: 12px 16px 12px 0;
width: 100%;
text-align: right;
border-top: 1px solid #eee;
background-color: #fff;
}
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 12px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
This diff is collapsed.
import { useState, useEffect } from 'react'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
export const useModalTable = (options?) => {
const [visible, setVisible] = useState(false)
const [rowSelection, rowSelectionCtl] = useRowSelectionTable(options)
return {
visible,
setVisible,
rowSelection,
rowSelectionCtl
}
}
This diff is collapsed.
import { FORM_FILTER_PATH } from "@/formSchema/const";
import { ISchema } from "@formily/antd";
// 选择商品和会员高级筛选
export const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入会员名字',
align: 'flex-left',
advanced: false,
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询',
}
}
}
}
}
}
...@@ -22,12 +22,14 @@ const CallForBidsSearchDetailInTender: React.FC = () => { ...@@ -22,12 +22,14 @@ const CallForBidsSearchDetailInTender: React.FC = () => {
const anchorTitleList = [ const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" }, { title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '中标结果', id: 'bidResult', type: "bidResult" },
{ title: '中标明细', id: 'bidParticulars', componentName: "BidParticulars" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" }, { title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '投标要求', id: 'tenderNeed', type: "bidNeed" }, { title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" },
{ title: '投标其他要求', id: 'tenderOtherNeed', type: "bidNeed" }, { title: '招标要求', id: 'bidNeed', type: "bidNeed" },
{ title: '投标商品', id: 'tenderParticulars', componentName: "BidParticulars" }, { title: '报名要求', id: 'registerNeed', type: "registerNeed" },
{ title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
{ title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
{ title: '其他要求', id: 'otherNeed', type: "otherNeed" },
{ title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" }, { title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
] ]
......
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { useSelfTable } from './model'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待新增投标
export interface ReadyAddTenderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementStayAddList(params)
return data
}
const ReadyAddTender:React.FC<ReadyAddTenderProps> = (props) => {
const { run: deleteRun } = useHttpRequest(PublicApi.postOrderProcurementOrderDeleteAll)
const { loading: submitLoading, run: submitRun } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitExamineAll)
const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable()
const handleMenuClick = async (e) => {
switch(e.key) {
case '1': {
// 批量删除
const canDelete = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canDelete) {
const { code } = await deleteRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能删除内部状态为未审核过的订单')
}
break;
}
}
}
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canBitch) {
const { code } = await submitRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交审核待新增的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={() => history.push('/memberCenter/procurementAbility/tender/readyAddTender/add')}
>
新建
</Button>
<Button onClick={handleBitchPush} loading={submitLoading}>批量提交审核</Button>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
</DropDeleteDown>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
ReadyAddTender.defaultProps = {}
export default ReadyAddTender
import React, { useRef } from 'react'
import { Button, Popconfirm } from 'antd'
import { PublicApi } from '@/services/api'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState } from '@/constants'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
// import { baseBidListColumns } from '@/pages/procurement/constants'
// 待新增投标逻辑
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id', extendsSelection: {
getCheckboxProps: record => ({
// 不等于可提交审核的 都无法通过批量提交
disabled: record.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER,
interiorState: record.interiorState,
})
}})
const baseBidListColumns: any[] = [
{
title: '投标编号/项目',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
title: '招标编号/会员',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
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' />
},
]
const handleSubmit = async (id) => {
// 从待新增直接传到一级审核, 状态写死, 默认传-1
await PublicApi.postOrderProcurementOrderSubmitExamine({id, state: -1})
ref.current.reload()
}
const handleDelete = async (id) => {
await PublicApi.postOrderProcurementOrderDelete({id})
ref.current.reload()
}
const handleEdit = (record: any) => {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/edit?id=${record.id}${record.type === 4 ? '&type=4' : ''}`)
}
const handleCancel = async (id) => {
await PublicApi.postOrderPurchaseOrderCancel({id})
ref.current.reload()
}
const secondColumns: any[] = baseBidListColumns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 200,
render: (text, record) => {
return <>
<Button type='link' onClick={() => handleSubmit(record.id)}>提交</Button>
<Button type='link' onClick={() => handleEdit(record)}>修改</Button>
<Popconfirm title='是否要删除该订单' onConfirm={() => handleDelete(record.id)}>
<Button type='link'>删除</Button>
</Popconfirm>
</>
}
}
])
return {
columns: secondColumns,
ref,
rowSelection,
rowSelectionCtl
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginLeft: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { useSelfTable } from './model'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待招标报名 投标
export interface ReadyBidRegisterProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementStayAddList(params)
return data
}
const ReadyBidRegister:React.FC<ReadyBidRegisterProps> = (props) => {
const { run: deleteRun } = useHttpRequest(PublicApi.postOrderProcurementOrderDeleteAll)
const { loading: submitLoading, run: submitRun } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitExamineAll)
const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable()
const handleMenuClick = async (e) => {
switch(e.key) {
case '1': {
// 批量删除
const canDelete = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canDelete) {
const { code } = await deleteRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能删除内部状态为未审核过的订单')
}
break;
}
}
}
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canBitch) {
const { code } = await submitRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交审核待新增的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
// formilyChilds={{
// children: <Space>
// <Button
// icon={<PlusCircleOutlined/>}
// type='primary'
// onClick={() => history.push('/memberCenter/procurementAbility/tender/readyBidRegister/add')}
// >
// 新建
// </Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/>
</Card>
</PageHeaderWrapper>
}
ReadyBidRegister.defaultProps = {}
export default ReadyBidRegister
import React, { useRef } from 'react'
import { Button, Popconfirm } from 'antd'
import { PublicApi } from '@/services/api'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState } from '@/constants'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
// import { baseBidListColumns } from '@/pages/procurement/constants'
// 待招标报名逻辑
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id', extendsSelection: {
getCheckboxProps: record => ({
// 不等于可提交审核的 都无法通过批量提交
disabled: record.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER,
interiorState: record.interiorState,
})
}})
const baseBidListColumns = [
{
title: '招标编号/项目',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
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: 'externalState',
key: 'externalState',
render: text => <CustomTag status={text} type='out' />
},
{
title: '内部状态',
align: 'center',
dataIndex: 'interiorState',
key: 'interiorState',
render: (text) => <CustomBadge status={text} type='inside' />
},
]
const handleSubmit = async (id) => {
// // 从待新增直接传到一级审核, 状态写死, 默认传-1
// await PublicApi.postOrderProcurementOrderSubmitExamine({id, state: -1})
// ref.current.reload()
history.push('/memberCenter/procurementAbility/tender/readyBidRegister/add')
}
const handleDelete = async (id) => {
await PublicApi.postOrderProcurementOrderDelete({id})
ref.current.reload()
}
const handleEdit = (record: any) => {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/edit?id=${record.id}${record.type === 4 ? '&type=4' : ''}`)
}
const handleCancel = async (id) => {
await PublicApi.postOrderPurchaseOrderCancel({id})
ref.current.reload()
}
const secondColumns: any[] = baseBidListColumns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 200,
render: (text, record) => {
return <>
<Button type='link' onClick={() => handleSubmit(record.id)}>报名</Button>
<Button type='link' onClick={() => handleSubmit(record.id)}>重新报名</Button>
{/* <Button type='link' onClick={() => handleEdit(record)}>修改</Button>
<Popconfirm title='是否要删除该订单' onConfirm={() => handleDelete(record.id)}>
<Button type='link'>删除</Button>
</Popconfirm> */}
</>
}
}
])
return {
columns: secondColumns,
ref,
rowSelection,
rowSelectionCtl
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginLeft: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 24px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
import React, { useState, useCallback, useRef, useContext, useEffect, createRef } from 'react';
import { history } from 'umi'
import { Button, Row, Col, Anchor, Skeleton, Upload, message } from 'antd';
import headStyle from '../../../components/bidDetailHeader/index.less'
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';
import { ArrowLeftOutlined, UploadOutlined } from '@ant-design/icons';
import TransferProcess from '@/pages/procurement/components/transferProcess';
import { findLastIndexFlowState } from '@/utils';
import DescriptionsInfo from '@/pages/procurement/components/descriptionsInfo';
import BidTransformRecord from '@/pages/procurement/components/transferRecord';
import MellowCard from '@/components/MellowCard';
const { Link } = Anchor;
const ReadyQualifityCheckedDetail: React.FC = () => {
const { formContext, id, detailList } = useBidDetail({type: 'purchaseOrder'})
const {data, currentPayInfoId} = formContext
const payRef = useRef<any>({})
console.log(data, 'date')
const [isFixed, setIsFixed] = useState<boolean>(false)
const flagRef = useRef({
flag: false,
distanceTop: 0
})
useEffect(() => {
window.addEventListener("scroll", onScroll)
return (()=>{
window.removeEventListener('scroll', onScroll)
})
}, [])
const onScroll = () => {
let navDom: any = document.getElementById("anchorTitle")
if(navDom) {
let distance = navDom.offsetTop - document.documentElement.scrollTop
if(!flagRef.current.flag) {
flagRef.current.distanceTop = navDom.offsetTop
flagRef.current.flag = true
}
if(distance <= 0) {
setIsFixed(true)
}
if(document.documentElement.scrollTop <= flagRef.current.distanceTop) {
setIsFixed(false)
}
}
}
const isLoading = !!formContext.data
const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess' },
{ title: '基本信息', id: 'baseicInfo' },
{ title: '资格预审要求', id: 'checkNeed' },
{ title: '资格证明文件', id: 'qualifityNeed' },
{ title: '流转记录', id: 'transferRecord' },
]
const uploadProps = {
name: 'file',
action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
headers: {
authorization: 'authorization-text',
},
onChange(info) {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
message.success(`${info.file.name} file uploaded successfully`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`);
}
},
}
return (
<div>
<BidDetailContext.Provider value={formContext}>
<div className={isFixed ? [headStyle.detailHeader, headStyle.anchorTitleFixed].join(' '): headStyle.detailHeader} id="detailHeader">
{
isLoading ?
<Row>
{
<>
<Col span={22}>
<Row align='middle'>
<Col>
<ArrowLeftOutlined onClick={() => history.goBack()}/>
</Col>
<Col>
<div className={headStyle.titleAvatorText}>订单号: {formContext.data.orderNo}</div>
</Col>
</Row>
<Row>
<Col>
<div className={headStyle.anchorTitle} id="anchorTitle">
<Anchor onClick={(e)=>e.preventDefault()} showInkInFixed={false} targetOffset={200}>
{
anchorTitleList.map((item, index) => (
<Link key={index} href={`#${item['id']}`} title={item['title']} />
))
}
</Anchor>
</div>
</Col>
</Row>
</Col>
<Col span={2}>
<Button type='primary'>
提交
</Button>
</Col>
</>
}
</Row>
: <Skeleton avatar={{shape: 'square'}} active paragraph={{ rows: 3 }} />
}
</div>
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<div id="transferProcess">
<TransferProcess
cardTitle="流转进度"
customTitleKey='operationalProcess'
customKey='state'
outerVerifyCurrent={findLastIndexFlowState(formContext.data?.externalWorkflowFlowRecordLogResponses || [])}
innerVerifyCurrent={findLastIndexFlowState(formContext.data?.interiorWorkflowFlowRecordLogResponses || [])}
outerVerifySteps={
formContext.data?.externalWorkflowFlowRecordLogResponses ?
formContext.data.externalWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
innerVerifySteps={
formContext.data?.interiorWorkflowFlowRecordLogResponses ?
formContext.data.interiorWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
/>
</div>
<div id="baseicInfo">
<DescriptionsInfo cardTitle="基本信息" type="basicInfo" />
</div>
<div id="checkNeed">
<DescriptionsInfo cardTitle="资格预审要求" type="checkNeed" />
</div>
<div id="qualifityNeed">
<MellowCard
title="资格证明文件"
style={{marginTop: 24}}
bordered={false}
fullHeight
>
<div className={style['card-list']}>
<Row>
<Col span={2}><p className={style['card-list_title']}>资格证明文件:</p></Col>
<Col>
<Upload
{...uploadProps}
>
<Button icon={<UploadOutlined />}>上传附件</Button>
</Upload>
</Col>
</Row>
</div>
</MellowCard>
</div>
<div id="transferRecord">
<BidTransformRecord cardTitle="流转记录" />
</div>
</PreLoading>
</OrderDetailWrapper>
</BidDetailContext.Provider>
</div>
);
};
export default ReadyQualifityCheckedDetail;
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 待提交资格预审 招标
export interface ReadyQualifityCheckedProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListOne(params)
return data
}
// TODO
const ReadyQualifityChecked:React.FC<ReadyQualifityCheckedProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderReviewedAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能批量提交内部状态为审核中的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
// rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
// formilyChilds={{
// children: <Space>
// <Button onClick={handleSubmitBatch} loading={loading}>批量审核通过</Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/>
</Card>
</PageHeaderWrapper>
}
ReadyQualifityChecked.defaultProps = {}
export default ReadyQualifityChecked
import React, { useRef } from 'react'
import { Button } from 'antd'
import { history } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
// import { baseBidListColumns } from '@/pages/procurement/constants'
// 待提交资格预审 投标
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id', extendsSelection: {
getCheckboxProps: record => ({
// 不等于可提交审核的 都无法通过批量提交
disabled: record.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER,
interiorState: record.interiorState,
})
}})
const baseBidListColumns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
render: (t, r, i) => ++i
},
{
title: '招标编号/项目',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
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: 'externalState',
key: 'externalState',
render: text => <CustomTag status={text} type='out' />
},
{
title: '内部状态',
align: 'center',
dataIndex: 'interiorState',
key: 'interiorState',
render: (text) => <CustomBadge status={text} type='inside' />
},
]
const handleSubmit = async (record) => {
if (record.interiorState === PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER) {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/firstApprovedOrder/detail?id=${record.id}`)
}
// await PublicApi.postOrderQuotationBeReviewed({id})
// ref.current.reload()
}
const secondColumns: any[] = baseBidListColumns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
{
record.interiorState === PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER &&
<Button type='link' onClick={() => handleSubmit(record)}>提交</Button>
}
</>
}
])
return {
columns: secondColumns,
ref,
rowSelection,
rowSelectionCtl
}
}
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-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginLeft: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
}
},
"supplyMembersName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
"type": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: Object.keys(OrderTypeMap).map(item => ({
label: OrderTypeMap[item],
value: item,
}))
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
.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 TenderSearchDetail: React.FC = () => {
const { formContext, id, detailList } = useBidDetail({type: 'purchaseOrder'})
const {data, currentPayInfoId} = formContext
const payRef = useRef<any>({})
const contentRef = 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}
// detailData={formContext.data}
anchorList={anchorTitleList}
backLink="/memberCenter/procurementAbility/callForBids/tenderSearch"
extraRight={
<>
<Button type='primary'>
去支付
</Button>
<div style={{ textAlign: 'right' }}>
<p style={{ marginTop: 12, fontSize: 12, color: '#6B778C' }}>本次需支付</p>
{ formContext.data && <p>¥666</p> }
</div>
</>
}
/>
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<BidDetailSection formContext={formContext} anchorList={anchorTitleList} type="tender" />
</PreLoading>
</OrderDetailWrapper>
<OrderPayModal
currentRef={payRef}
/>
</BidDetailContext.Provider>
</div>
);
};
export default TenderSearchDetail;
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 TenderSearch: 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 TenderSearch
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/tenderSearch/detail?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
title: '投标编号/会员',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/tenderSearch/preview?id=${record.id}`}>
{text}
</EyePreview>
<div>{text}</div>
</>
},
{
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) => formatTimeString(record.createTime),
width: 200
},
{
title: '是否中标',
align: 'center',
dataIndex: 'externalState',
key: 'externalState',
},
{
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: '请输入投标项目',
}
},
tenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标编码',
}
},
"[startEnterTime,endEnterTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开标开始时间','开标结束时间'],
},
},
tenderMember: {
type: 'string',
'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,
// }))
// },
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