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

feat: 添加待发中标评标模板页面

parent d0e64241
...@@ -206,6 +206,20 @@ export const callForBidsRoute = [ ...@@ -206,6 +206,20 @@ export const callForBidsRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// 评标模板
{
path: '/memberCenter/procurementAbility/callForBids/remarkBidTemplate',
name: '评标模板',
component: '@/pages/procurement/callForBids/remarkBidTemplate',
},
// 评标模板-新建
{
path: '/memberCenter/procurementAbility/callForBids/remarkBidTemplate/add',
name: '评标模板',
component: '@/pages/procurement/callForBids/addRemarkBidTemplate',
hideInMenu: true,
noMargin: true,
},
] ]
}, },
] ]
import React, { useRef, useState, useEffect, useContext } from 'react'
import { history } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import ReutrnEle from '@/components/ReturnEle'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import { Button, Card } from 'antd'
import { createFormActions } from '@formily/antd'
import { PlusOutlined, SaveOutlined } from '@ant-design/icons'
import NiceForm from '@/components/NiceForm'
import styles from './index.less'
import { formSchema } from './schema'
import { Input, ArrayTable } from '@formily/antd-components'
export interface AddRemarkBidTemplateProps {}
const addSchemaAction = createFormActions()
// 新增评标模板. 包含新增和编辑
const AddNewBid:React.FC<AddRemarkBidTemplateProps> = (props) => {
const [formLoading, setFormLoading] = useState(false)
const [btnLoading, setBtnLoading] = useState(false)
const [initFormValue, setInitFormValue] = useState<any>({})
const handleSubmit = async (value) => {
console.log(value)
}
const addd = (<span>添加评标内容</span>)
return (
<PageHeaderWrapper
style={{margin: 0}}
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
title="新建评标模板"
extra={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
保存
</Button>,
]}
>
<Card>
<NiceForm
loading={formLoading}
previewPlaceholder=' '
// editable={pageStatus !== PageStatus.PREVIEW}
value={initFormValue}
actions={addSchemaAction}
schema={formSchema}
onSubmit={handleSubmit}
components={{
ArrayTable
}}
effects={($, ctx) => {
$('onFormMount').subscribe(() => {
})
}}
expressionScope={{
addd
}}
className={styles.formContainer}
/>
</Card>
</PageHeaderWrapper>
)
}
AddNewBid.defaultProps = {}
export default AddNewBid
import React from 'react'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const formSchema: ISchema = {
type: 'object',
properties: {
STRATEGY_TABS: {
type: 'object',
"x-component": "tab",
"x-component-props": {
type: 'card',
},
properties: {
"tab-1": {
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "基本信息",
},
"properties": {
MEGA_LAYOUT1: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelCol: 4,
wrapperCol: 8,
labelAlign: 'left'
},
properties: {
name: {
type: 'string',
title: '模板名称',
"x-component-props": {
placeholder: '最长60个字符,30字汉字'
},
"x-rules": [
{
required: true,
message: '请填写模板名称'
},
{
limitByte: true,
maxByte: 60
},
]
},
productName: {
type: 'string',
title: '版本号',
"x-component-props": {
placeholder: '最长12个字符'
},
"x-rules": [
{
required: true,
message: '请填写版本号'
},
{
limitByte: true,
maxByte: 12
},
]
},
templateDesc: {
type: 'textarea',
title: '模板说明',
"x-component-props": {
placeholder: '最长60个字符,30字汉字'
},
"x-rules": [
{
limitByte: true,
maxByte: 60
},
]
},
}
}
}
},
"tab-2": {
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "内容信息"
},
"properties": {
MEGA_LAYOUT2: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelCol: 4,
labelAlign: 'left'
},
properties: {
contentLists: {
title: "",
type: "array",
"x-component": "ArrayTable",
"x-component-props": {
draggable: false,
renderAddition: () => React.createElement('p', { style: { color: "#00B37A", width: '100%', textAlign: "center" }}, ' + 添加评标内容'),
renderMoveUp: () => null,
renderMoveDown: () => null,
// renderRemove: () => React.createElement('button', { type: "button", class: "ant-btn ant-btn-link"}, '删除'),
},
items: {
type: 'object',
properties: {
classify: {
title: "评标分类",
type: 'string',
'x-component-props': {
},
},
item: {
title: "评分项",
type: 'string',
'x-component-props': {
},
},
condition: {
title: "评分标准",
type: 'string',
'x-component-props': {
},
},
score: {
title: "标准分",
type: 'string',
'x-component-props': {
},
},
}
},
}
}
}
}
},
}
}
}
}
...@@ -22,6 +22,7 @@ const ReadySendBidNoticeDetail: React.FC = () => { ...@@ -22,6 +22,7 @@ const ReadySendBidNoticeDetail: React.FC = () => {
const anchorTitleList = [ const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: 'TransferProcess' }, { title: '流转进度', id: 'transferProcess', componentName: 'TransferProcess' },
{ title: '基本信息', id: 'baseicInfo', type: 'basicInfo' }, { title: '基本信息', id: 'baseicInfo', type: 'basicInfo' },
{ title: '会员中标信息', id: 'memberWinInfo', componentName: 'MemberWinInfo' },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" }, { title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
] ]
......
...@@ -82,7 +82,7 @@ export const useSelfTable = () => { ...@@ -82,7 +82,7 @@ export const useSelfTable = () => {
render: (text, record) => <> render: (text, record) => <>
{ {
record.interiorState === PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER && record.interiorState === PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER &&
<Button type='link' onClick={() => handleSubmit(record)}>审核</Button> <Button type='link' onClick={() => handleSubmit(record)}>发送中标公示</Button>
} }
</> </>
} }
......
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space } 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 } from '@ant-design/icons'
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'
// 评标模板 招标
export interface RemarkBidTemplateProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListOne(params)
return data
}
const RemarkBidTemplate:React.FC<RemarkBidTemplateProps> = (props) => {
const {
columns,
ref,
} = useSelfTable()
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
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
icon={<PlusCircleOutlined/>}
type='primary'
onClick={() => history.push('/memberCenter/procurementAbility/callForBids/remarkBidTemplate/add')}
>
新建
</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
RemarkBidTemplate.defaultProps = {}
export default RemarkBidTemplate
import React, { useRef } from 'react'
import { Button } from 'antd'
import StatusSwitch from '@/components/StatusSwitch'
// 评标模板 招标
export const useSelfTable = () => {
const ref = useRef<any>({})
const baseBidListColumns: any[] = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
render: (t, r, i) => ++i
},
{
title: '模板名称',
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
},
{
title: '版本号',
align: 'center',
dataIndex: 'type',
key: 'type',
},
{
title: '模板说明',
align: 'center',
dataIndex: 'supplyMembersName',
key: 'supplyMembersName',
},
{
title: '状态',
align: 'center',
dataIndex: 'externalState',
key: 'externalState',
render: (text: any, record: any) => (
<StatusSwitch
handleConfirm={() => handleUpdateState(record)}
record={record}
fieldNames="isEnable"
expectTrueValue={true}
/>
),
},
]
const handleUpdateState = (record) => {
console.log(record, 'update')
}
const secondColumns: any[] = baseBidListColumns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
<Button type='link'>编辑</Button>
<Button type='link'>删除</Button>
</>
}
])
return {
columns: secondColumns,
ref,
}
}
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: '查询',
},
},
},
},
}
}
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
// tabs标签锚点 // tabs标签锚点
.anchorTitle { .anchorTitle {
height: 48px; // height: 48px;
ul { ul {
padding-left: 0; padding-left: 0;
display: flex; display: flex;
......
...@@ -10,6 +10,7 @@ import BidParticulars from '../bidParticulars' ...@@ -10,6 +10,7 @@ import BidParticulars from '../bidParticulars'
import RemarkBidReport from '../remarkBidReport' import RemarkBidReport from '../remarkBidReport'
import ParticipateInfo from '../participateInfo' import ParticipateInfo from '../participateInfo'
import BidConfirm from '../bidConfirm' import BidConfirm from '../bidConfirm'
import MemberWinInfo from '../memberWinInfo'
export interface BidDetailSectionProps { export interface BidDetailSectionProps {
formContext: any, formContext: any,
...@@ -55,6 +56,8 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({ ...@@ -55,6 +56,8 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
"ParticipateInfo": ParticipateInfo, "ParticipateInfo": ParticipateInfo,
// 招标定标 // 招标定标
"BidConfirm": BidConfirm, "BidConfirm": BidConfirm,
// 会员中标信息
"MemberWinInfo": MemberWinInfo,
} }
const RenderDetailSection = ({ componentList }) => { const RenderDetailSection = ({ componentList }) => {
...@@ -116,6 +119,9 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({ ...@@ -116,6 +119,9 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
case "BidConfirm": case "BidConfirm":
RcDom = (<BidConfirm cardTitle={title} />) RcDom = (<BidConfirm cardTitle={title} />)
break; break;
case "MemberWinInfo":
RcDom = (<MemberWinInfo cardTitle={title} />)
break;
default: default:
RcDom = (<DescriptionsInfo cardTitle={title} type={type} />) RcDom = (<DescriptionsInfo cardTitle={title} type={type} />)
} }
......
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 16px;
border: 1px solid #F4F5F7;
padding: 12px;
background-color: #FAFBFC;
position: relative;
img {
display: block;
position: absolute;
top: 0;
right: 8px;
}
}
.card-list_title {
font-size: 12px;
color: #909399;
}
.amount {
font-size: 16px;
font-weight: 500;
color: #303133;
}
import React, { useContext, useState } from 'react'
import { Table, Button, Radio, Divider, Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { QuestionCircleOutlined, UserOutlined } from '@ant-design/icons';
import style from './index.less'
import winBid from '@/assets/imgs/winBid.png'
/**
* 会员中标信息
*/
export interface MemberWinInfoProps {
cardTitle?: string;
}
const MemberWinInfo: React.FC<MemberWinInfoProps> = ({cardTitle}) => {
const bidDetailContext = useContext(BidDetailContext)
const { data, ctl } = bidDetailContext
return (
<MellowCard
title={cardTitle}
style={{marginTop: 24}}
bordered={false}
fullHeight
>
<div className={style.remarkBidReportWrapper}>
<div className={style.bidMemberContainer}>
<h3 className="commonPanelTitle">中标会员</h3>
<Row gutter={[16, 0]}>
<Col span={6}>
<div className={style['card-list']}>
<h4>广州室间隔度过后工地</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>中标总金额(含税):</p></Col>
<Col><p className={style.amount}>¥160,000.00</p></Col>
</Row>
<img src={winBid} alt="已中标"/>
</div>
</Col>
<Col span={6}>
<div className={style['card-list']}>
<h4>广州室间隔度过后工地</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>中标总金额(含税):</p></Col>
<Col><p className={style.amount}>¥160,000.00</p></Col>
</Row>
<img src={winBid} alt="已中标"/>
</div>
</Col>
</Row>
</div>
<Divider dashed />
<div className={style.remarkCommitteeContainer}>
<h3 className="commonPanelTitle">中标理由</h3>
<Row gutter={[16, 0]}>
<Col span={4}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>中标理由</p></Col>
<Col><p>七天无理由中标</p></Col>
</Row>
<Row>
<Col span={8}><p className={style['card-list_title']}>中标附件</p></Col>
<Col><p>666.pdf</p></Col>
</Row>
</div>
</Col>
</Row>
</div>
</div>
</MellowCard>)
}
MemberWinInfo.defaultProps = {}
export default MemberWinInfo
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