Commit 652a1937 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: 完成确认报价

parent 736501b0
......@@ -20,7 +20,7 @@ export const confirmOfferRoute = [
/** 报价查询 查看详情 */
path: '/memberCenter/procurementAbility/confirmOffer/offerInquire/preview',
name: '报价查询',
component: '@/pages/transaction/purchaseAbility/confirmOffer/preview',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
......@@ -34,7 +34,7 @@ export const confirmOfferRoute = [
/** 待比价 查看详情 */
path: '/memberCenter/procurementAbility/confirmOffer/toComparePrices/preview',
name: '待比价',
component: '@/pages/transaction/purchaseAbility/confirmOffer/preview',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
......@@ -56,7 +56,15 @@ export const confirmOfferRoute = [
/** 待审核授标结果(一级) 查看详情 */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsOne/preview',
name: '待审核授标结果(一级)',
component: '@/pages/transaction/purchaseAbility/confirmOffer/preview',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
{
/** 待审核授标结果(一级) 审核 */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsOne/detail',
name: '待审核授标结果(一级)',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
......@@ -70,7 +78,15 @@ export const confirmOfferRoute = [
/** 待审核授标结果(二级) 查看详情 */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsTwo/preview',
name: '待审核授标结果(二级)',
component: '@/pages/transaction/purchaseAbility/confirmOffer/preview',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
{
/** 待审核授标结果(二级) 审核 */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsTwo/detail',
name: '待审核授标结果(二级)',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
......@@ -84,7 +100,15 @@ export const confirmOfferRoute = [
/** 待确认授标结果 查看详情 */
path: '/memberCenter/procurementAbility/confirmOffer/confirmResults/preview',
name: '待确认授标结果',
component: '@/pages/transaction/purchaseAbility/confirmOffer/preview',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
{
/** 待确认授标结果 审核 */
path: '/memberCenter/procurementAbility/confirmOffer/confirmResults/detail',
name: '待确认授标结果',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
......
.wrap {
:global {
.ant-modal-body {
padding: 0px;
.ant-tabs-nav {
width: 144px;
.ant-tabs-tab {
padding: 15px 24px;
}
.ant-tabs-tab + .ant-tabs-tab {
margin: 0px;
}
.ant-tabs-ink-bar {
left: 0;
}
}
.ant-tabs-tabpane {
padding: 24px;
}
}
}
}
import React, { useEffect, useRef } from 'react';
import ModalForm from '@/components/ModalForm';
import style from './index.less';
import { history } from 'umi';
import { createAsyncFormActions } from '@formily/antd'
import { PublicApi } from '@/services/api';
const schemaActions = createAsyncFormActions();
export interface BidProps {
bid: any,
visible: boolean,
cancel?(),
}
const Bidmodal: React.FC<BidProps> = (props: any) => {
const { bid, visible, cancel } = props;
const ref = useRef<any>({});
const handleConfirm = () => {
schemaActions.submit()
}
const handleSubmit = (value) => {
// 提交重置
const params: any = {
id: bid.id,
state: 1,
prizeNotice: value.prizeNotice ? 1 : 0,
thank: value.thank ? 1 : 0,
notice: value.notice ? 1 : 0,
}
if (value.prizeNotice || value.notice) {
params.awardResults = value.awardResults
}
if (value.thank) {
params.content = value.content
}
PublicApi.postPurchaseConfirmQuotedPriceStayConfirmAwardResult({ ...params }).then(res => {
if (res.code === 1000) {
history.goBack()
}
})
}
useEffect(() => {
if (visible) {
ref.current.setVisible(true);
console.log(bid)
bid.awardResults && schemaActions.setFieldValue('awardResults', bid.awardResults);
bid.content && schemaActions.setFieldValue('content', bid.content);
}
}, [visible, bid])
const handleCancel = () => {
ref.current.setVisible(false);
cancel()
}
return (
<ModalForm
width={800}
modalTitle='确认授标结果'
actions={schemaActions}
currentRef={ref}
modalProps={{
className: style.wrap
}}
schema={{
type: 'object',
properties: {
LAYOUT_WRAP: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelAlign: 'top',
},
properties: {
tabs: {
type: 'object',
'x-component': 'tab',
'x-component-props': {
tabPosition: 'left',
},
properties: {
tab1: {
type: 'object',
"x-component": "tabpane",
"x-component-props": {
"tab": "中标公示"
},
properties: {
LAYOUT_TABPANE: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
grid: true,
enableSafeWidth: false,
},
properties: {
prizeNotice: {
type: 'number',
"x-component-props": {
children: "发送中标公示"
},
"x-component": "checkboxsingle",
default: true
},
notice: {
type: 'number',
"x-component-props": {
children: "发送中标通知"
},
"x-component": "checkboxsingle",
default: true
},
},
},
awardResults: {
type: 'string',
"x-component": 'TextArea',
'x-component-props': {
rows: 4
}
}
}
},
tab2: {
type: 'object',
"x-component": "tabpane",
"x-component-props": {
"tab": "感谢函"
},
properties: {
LAYOUT_TABPANE: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
grid: true,
enableSafeWidth: false,
},
properties: {
thank: {
type: 'number',
"x-component-props": {
children: "发送感谢函"
},
"x-component": "checkboxsingle",
default: true
},
},
},
content: {
type: 'string',
"x-component": 'TextArea',
'x-component-props': {
rows: 4
}
}
}
},
}
}
}
}
}
}}
cancel={handleCancel}
confirm={handleConfirm}
onSubmit={handleSubmit}
/>
)
}
export default Bidmodal;
.card-list {
font-size: 12px;
// line-height: 20px;
// margin-top: 24px;
// border: 1px solid #F4F5F7;
// padding: 12px;
p {
margin-bottom: 8px;
}
......
......@@ -15,7 +15,7 @@ const ConditionLayout: React.FC<ConditionProps> = (props: any) => {
return (
<Card
id='conditionLayout'
title='基本信息'
title='交易条件'
>
<Row gutter={[8, 8]}>
{effect.length > count && effect.map((item, index) => (
......
......@@ -8,3 +8,23 @@
background-color: #00B37A;
}
}
.card-list {
font-size: 12px;
margin: 2px;
p {
margin-bottom: 0px;
}
.card-list_file {
display: flex;
align-items: center;
.card-list_fileicon {
color: #3F7ED2;
font-size: 12px;
margin-right: 5px;
}
}
}
.card-list_title {
font-size: 12px;
color: #909399;
}
import React, { useContext, useEffect, useState } from 'react';
import { Space, Button, Tabs, Divider, Skeleton, Typography, message } from 'antd';
import { Space, Button, Tabs, Divider, Skeleton, Typography, message, Row, Col } from 'antd';
import { StandardTable } from 'god';
import { history } from 'umi';
import moment from 'moment';
......@@ -11,6 +11,7 @@ import { PublicApi } from '@/services/api';
import BidTable from '../bidTable';
import { Context, BidDetailContext } from '../context';
import { useBidTable } from '../../../effects/useBidTable';
import { FilePdfOutlined } from '@ant-design/icons';
export interface ContrastProps {
effect?: any,
......@@ -149,6 +150,9 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
params.push(item);
})
setDataSource(params);
if (preview) {
redux(params)
}
}
/** 立即比价 */
......@@ -199,20 +203,20 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
title='报价信息'
extra={
preview ? null :
<Space>
<Button onClick={() => history.goBack()}>发起下轮报价</Button>
{context.priceContrast === PRICECONTRAST_TYPE.UNDECRYPTED &&
<Button>
解密报价单
<Space>
<Button onClick={() => history.goBack()}>发起下轮报价</Button>
{context.priceContrast === PRICECONTRAST_TYPE.UNDECRYPTED &&
<Button>
解密报价单
</Button>}
<Button
type='primary'
disabled={disabled}
onClick={atonceContrast}
>
立即比价
<Button
type='primary'
disabled={disabled}
onClick={atonceContrast}
>
立即比价
</Button>
</Space>
</Space>
}
>
<Tabs>
......@@ -245,6 +249,34 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
)}
</Tabs.TabPane>
</Tabs>
{ preview &&
<Row gutter={[0, 4]} style={{ marginTop: '1em' }}>
<Col span={24}>
<div className={style['card-list']}>
<Row>
<Col span={2}><p className={style['card-list_title']}>授标意见:</p></Col>
<Col><p>{context.awardComments}</p></Col>
</Row>
</div>
</Col>
<Col span={24}>
<div className={style['card-list']}>
<Row>
<Col span={2}><p className={style['card-list_title']}>附件:</p></Col>
<Col>
{context.urls && context.urls.map((item, index) => (
<p key={`urls_${index + 1}`} className={style['card-list_file']}>
<FilePdfOutlined className={style[`card-list_fileicon`]} />
<Typography.Link href={item.url}>{item.name}</Typography.Link>
</p>
))}
</Col>
</Row>
</div>
</Col>
</Row>
}
</Card>
</BidDetailContext.Provider>
)
......
import React, { useEffect, useState, useContext } from 'react';
import { Anchor, Button } from 'antd';
import { Anchor } from 'antd';
import { Context } from './components/context';
import style from './index.less';
import { ArrowLeftOutlined, CheckCircleOutlined } from '@ant-design/icons';
import { ArrowLeftOutlined } from '@ant-design/icons';
import {history} from 'umi';
const activeAnchorClassName = 'ant-anchor-link-active'
......@@ -64,7 +65,7 @@ const PeripheralLayout: React.FC<IProps> = (props: any) => {
<div style={{ flex: 1 }}>
<div className={style.title}>
<div className={style.titleBox}>
<ArrowLeftOutlined className={style.goBack} />
<ArrowLeftOutlined className={style.goBack} onClick={() => history.goBack()} />
<span className={style.titleContext}>
{dataSource.details}
|
......
......@@ -10,10 +10,6 @@ export const useBidTable = () => {
},
}
useEffect(() => {
console.log(dataSource, 10086)
}, [dataSource])
return {
formContext
}
......
import React, { useEffect, useState } from 'react';
import { Modal, Button, Popconfirm } from 'antd';
import React, { useEffect } from 'react';
import { Modal } from 'antd';
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
......
......@@ -93,7 +93,7 @@ const AuditResultsOne = () => {
dataIndex: 'operate',
render: (text: any, record: any) =>
<>
<Button type='link'>审核</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/auditResultsOne/detail?id=${record.id}&turn=${record.turn}`)}>审核</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/auditResultsOne/preview?id=${record.id}&turn=${record.turn}`)}>查看</Button>
</>
......@@ -107,7 +107,7 @@ const AuditResultsOne = () => {
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
const res = await PublicApi.postPurchaseConfirmQuotedPriceStayExamineAwards1({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
......
......@@ -93,8 +93,8 @@ const AuditResultsTwo = () => {
dataIndex: 'operate',
render: (text: any, record: any) =>
<>
<Button type='link'>审核</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/auditResultsOne/preview??id=${record.id}&turn=${record.turn}`)}>查看</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/auditResultsTwo/detail?id=${record.id}&turn=${record.turn}`)}>审核</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/auditResultsTwo/preview?id=${record.id}&turn=${record.turn}`)}>查看</Button>
</>
}];
......@@ -106,7 +106,7 @@ const AuditResultsTwo = () => {
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
const res = await PublicApi.postPurchaseConfirmQuotedPriceStayExamineAwards2({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
......
......@@ -93,7 +93,7 @@ const ConfirmResults = () => {
dataIndex: 'operate',
render: (text: any, record: any) =>
<>
<Button type='link'>确认授标结果</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/confirmResults/detail?id=${record.id}&turn=${record.turn}`)}>确认授标结果</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/confirmResults/preview?id=${record.id}&turn=${record.turn}`)}>查看</Button>
</>
......
......@@ -18,6 +18,8 @@ import {
import { CheckCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import moment from 'moment';
import BidModal from '../../components/detail/modal';
import ModalOperate from '../../components/modalOperate';
import Bidmodal from '../../components/bidmodal';
const ICONSTYLE: any = {
color: '#C0C4CC',
......@@ -37,12 +39,16 @@ const ContrastPrice = () => {
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const { query: { id, turn } } = history.location;
const { query: { id, turn }, pathname } = history.location;
const [dataSource, setDataSource] = useState<any>({});
const [basicEffect, setBasicEffect] = useState<any>([]);
const [conditionEffect, setConditionEffect] = useState<any>([]);
const [visible, setVisible] = useState<boolean>(false);
const [auditDataSource, setAuditDataSource] = useState<any>([]);
const [preview, setPreview] = useState<boolean>(false);
const [link] = useState<string>(pathname.split('/')[pathname.split('/').length - 1]);
const [path] = useState<string>(pathname.split('/')[pathname.split('/').length - 2]);
const [bid, setBid] = useState<any>({});
const handleBasicEffect = (data: any) => {
setBasicEffect([
......@@ -126,6 +132,9 @@ const ContrastPrice = () => {
}
useEffect(() => {
if (link !== 'contrast') {
setPreview(true)
}
handleGetDataSource(turn)
}, [])
......@@ -135,21 +144,42 @@ const ContrastPrice = () => {
}
const handleContrastLyoutData = (data: any) => {
let company = [];
data[0].company.forEach(item => {
if (item.isPrize) {
company.push(`${item.memberName}(中标总金额(含税):¥${item.sumPrice})`)
}
})
setBid({
id,
awardResults: ` ${dataSource.memberName}${dataSource.details}》评标工作已经结束,中标人已经确定。现将中标结果公布如下:\n中标供应商: ${company.join(',')}\n中标理由:价格最低。`,
content: `贵公司参与了我公司《${dataSource.details}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。`,
})
setAuditDataSource(data)
}
const fetchLink = () => {
switch (path) {
case 'auditResultsOne':
return PublicApi.postPurchaseConfirmQuotedPriceStayExamineAward1
case 'auditResultsTwo':
return PublicApi.postPurchaseConfirmQuotedPriceStayExamineAward2
}
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
no={dataSource.purchaseInquiryNo}
tabLink={TABLINK}
effect={
<Button
type='primary'
onClick={() => setVisible(true)}
>
<CheckCircleOutlined />
单据审核
link === 'preview' ? null :
<Button
type='primary'
onClick={() => setVisible(true)}
>
<CheckCircleOutlined />
单据审核
</Button>
}
components={
......@@ -157,21 +187,40 @@ const ContrastPrice = () => {
<ProgressLayout />
<BasicLayout effect={basicEffect} />
<ConditionLayout effect={conditionEffect} />
<ContrastLyout effect={{ id, turn }} redux={handleContrastLyoutData} />
<ContrastLyout preview={preview} effect={{ id, turn }} redux={handleContrastLyoutData} />
<RecordLyout />
</Fragment>
}
/>
<BidDetailContext.Provider value={auditDataSource}>
<BidModal
{ link === 'contrast' && (
<BidDetailContext.Provider value={auditDataSource}>
<BidModal
id={id}
turn={turn}
visible={visible}
handleConfirm={handleConfirm}
onCancel={() => setVisible(false)}
/>
</BidDetailContext.Provider>
)}
{ (link !== 'contrast' && path !== 'confirmResults') && (
<ModalOperate
id={id}
turn={turn}
title="单据审核"
modalType="audit"
visible={visible}
handleConfirm={handleConfirm}
fetch={fetchLink()}
onCancel={() => setVisible(false)}
onOk={() => history.goBack()}
/>
</BidDetailContext.Provider>
)}
{ (link !== 'preview' && path === 'confirmResults') && (
<Bidmodal
bid={bid}
visible={visible}
cancel={() => setVisible(false)}
/>
)}
</Context.Provider>
)
}
......
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