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

feat: 报价新增完善

parent 6ff2d931
......@@ -32,7 +32,7 @@ export const offterRoute = [
},
{
// 报价单详情
path: '/memberCenter/procurementAbility/offter/preview',
path: '/memberCenter/procurementAbility/offter/view',
name: '报价单 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -62,7 +62,7 @@ export const offterRoute = [
},
{
// 待新增报价单详情
path: '/memberCenter/procurementAbility/addOffter/preview',
path: '/memberCenter/procurementAbility/offter/addOffter/view',
name: '待新增报价单 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -70,13 +70,27 @@ export const offterRoute = [
},
{
// 待新增报价单操作
path: '/memberCenter/procurementAbility/addOffter/detail',
path: '/memberCenter/procurementAbility/offter/addOffter/detail',
name: '待新增报价单 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
noMargin: true,
},
{
// 需求单报价
path: '/memberCenter/procurementAbility/offter/quote',
name: '报价',
component: '@/pages/transaction/purchaseAbility/offter/addOffter/add',
hideInMenu: true,
},
{
// 新增报价单
path: '/memberCenter/procurementAbility/offter/add',
name: '新增报价单',
component: '@/pages/transaction/purchaseAbility/offter/addOffter/add',
hideInMenu: true,
},
{
// 采购需求单详情
path: '/memberCenter/procurementAbility/offter/addOffter/preview',
name: '采购需求单详情',
......@@ -92,7 +106,7 @@ export const offterRoute = [
},
{
// 待审核报价单(一级)详情
path: '/memberCenter/procurementAbility/auditOffterOne/preview',
path: '/memberCenter/procurementAbility/offter/auditOffterOne/view',
name: '待审核报价单(一级) 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -100,7 +114,7 @@ export const offterRoute = [
},
{
// 待审核报价单(一级)操作
path: '/memberCenter/procurementAbility/auditOffterOne/detail',
path: '/memberCenter/procurementAbility/offter/auditOffterOne/detail',
name: '待审核报价单(一级) 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -122,7 +136,7 @@ export const offterRoute = [
},
{
// 待审核报价单(二级)详情
path: '/memberCenter/procurementAbility/auditOffterTwo/preview',
path: '/memberCenter/procurementAbility/offter/auditOffterTwo/view',
name: '待审核报价单(二级) 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -130,7 +144,7 @@ export const offterRoute = [
},
{
// 待审核报价单(二级)操作
path: '/memberCenter/procurementAbility/auditOffterTwo/detail',
path: '/memberCenter/procurementAbility/offter/auditOffterTwo/detail',
name: '待审核报价单(二级) 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -152,7 +166,7 @@ export const offterRoute = [
},
{
// 待提交报价单详情
path: '/memberCenter/procurementAbility/submitOffter/preview',
path: '/memberCenter/procurementAbility/offter/submitOffter/view',
name: '待提交报价单 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......@@ -160,7 +174,7 @@ export const offterRoute = [
},
{
// 待提交报价单操作
path: '/memberCenter/procurementAbility/submitOffter/detail',
path: '/memberCenter/procurementAbility/offter/submitOffter/detail',
name: '待提交报价单 详情',
component: '@/pages/transaction/purchaseAbility/offter/detail',
hideInMenu: true,
......
import React, { useEffect, useState } from 'react';
import { Tabs, Button, Card } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import { PublicApi } from '@/services/api';
import Basic from './components/basic';
import Offer from './components/offer';
import Explain from './components/explain';
import File from './components/file';
const { TabPane } = Tabs;
const AddForm = () => {
const {
query: { id, number },
pathname,
} = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
/** 基本信息 */
const [basic, setbasic] = useState<any>({});
/** 报价信息 */
const [offer, setoffer] = useState<any>([]);
/** 报价说明 */
const [explain, setexplain] = useState<any>({});
/** 附件 */
const [file, setfile] = useState<any>([]);
useEffect(() => {
let link: any;
const params = {
id,
number,
current: '1',
pageSize: '1',
}
if (path === 'quote') {
link = PublicApi.getPurchaseQuotedPricePurchaseInquiryDetails
} else if (path === 'add' && id && number) {
link = PublicApi.getPurchaseQuotedPriceDetails
}
link(params).then(res => {
if (res.code === 1000) {
const params: any = { ...res.data };
const basicInfo: any = { ...basic };
const offerInfo: any = { ...offer };
const explainInfo: any = { ...explain };
const fileInfo: any = { ...file };
basicInfo.id = params.purchaseInquiryId || params.id;
basicInfo.number = params.purchaseInquiryNo;
basicInfo.purchaseInquiryNo = params.purchaseInquiryNo;
basicInfo.quotedPriceNo = params.quotedPriceNo;
basicInfo.memberName = params.memberName;
basicInfo.offerEndTime = params.offerEndTime;
basicInfo.createTime = params.createTime;
basicInfo.externalState = params.externalState;
basicInfo.interiorState = params.interiorState;
offerInfo.count = params.count || 1;
if (params.count) {
offerInfo.materiels = params.quotedPriceProducts;
} else {
offerInfo.materiels = params.materiels;
}
/** 修改才有回显下面这些的 */
if (path === 'edit') {
basicInfo.telPrefix = params.telPrefix;
basicInfo.tel = params.tel;
explainInfo.payDetails = params.payDetails;
explainInfo.taxes = params.taxes;
explainInfo.logistics = params.logistics;
explainInfo.packRequire = params.packRequire;
explainInfo.otherRequire = params.otherRequire;
explainInfo.deliveryDetails = params.deliveryDetails;
fileInfo.enclosureUrls = params.enclosureUrls;
}
setbasic(basicInfo);
setoffer(offerInfo);
setexplain(explainInfo);
console.log(res.data, 10086)
}
})
}, [])
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary"> 保存</Button>
}
>
<Card>
<Tabs type='card'>
<TabPane key='1' tab='基本信息'>
<Basic
fetchdata={basic}
/>
</TabPane>
<TabPane key='2' tab='报价信息'>
<Offer
fetchdata={offer}
/>
</TabPane>
<TabPane key='3' tab='报价说明'>
<Explain
fetchdata={explain}
/>
</TabPane>
<TabPane key='4' tab='附件'>
<File
fetchdata={file}
/>
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
)
}
export default AddForm;
import React, { useEffect } from 'react';
import {
Form,
Input,
Typography,
Select,
Tag,
Badge
} from 'antd';
import style from './index.less';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR
} from '../../../constants';
const { Option } = Select;
const { Text, Link } = Typography;
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
}
export interface IProps {
fetchdata: any,
}
const BasicInfo: React.FC<IProps> = (props: any) => {
const [form] = Form.useForm();
const {
fetchdata,
} = props;
useEffect(() => {
if (fetchdata) {
form.setFieldsValue({
quotedDetails: fetchdata.quotedDetails,
contacts: fetchdata.contacts,
phone: {
telPrefix: fetchdata.telPrefix,
tel: fetchdata.tel,
},
})
}
}, [fetchdata])
return (
<Form
className={style.formStyle}
form={form}
{...layout}
>
<Form.Item
label='报价单摘要'
name='quotedDetails'
rules={[{ required: true, message: '请输入需求单摘要' }]}
>
<Input maxLength={30} placeholder='最长60个字符,30个汉字' />
</Form.Item>
<Form.Item
label='对应需求单号'
name='purchaseInquiryNo'
required
>
<Link strong href={`/memberCenter/procurementAbility/offter/inquiry/preview?id=${fetchdata && fetchdata.id}&number=${fetchdata && fetchdata.number}`} target="_blank">
{fetchdata && fetchdata.purchaseInquiryNo}
</Link>
</Form.Item>
<Form.Item
label='需求会员'
name='memberName'
>
<Text>{fetchdata && fetchdata.memberName}</Text>
</Form.Item>
<Form.Item
label='联系人姓名'
name='contacts'
rules={[{ required: true, message: '请输入需求单摘要' }]}
>
<Input maxLength={6} placeholder='最长12个字符,6个汉字' />
</Form.Item>
<Form.Item
label='联系人手机'
required
>
<Input.Group compact>
<Form.Item
name={['phone', 'telPrefix']}
noStyle
rules={[{ required: true, message: '请输入需求单摘要' }]}
>
<Select placeholder="Select province">
<Option value="Zhejiang">浙江</Option>
<Option value="Jiangsu">江苏</Option>
</Select>
</Form.Item>
<Form.Item
name={['phone', 'tel']}
noStyle
rules={[{ required: true, message: '请输入需求单摘要' }]}
>
<Input style={{ width: '50%' }} placeholder="请输入你的手机号码" />
</Form.Item>
</Input.Group>
</Form.Item>
<Form.Item
label='报价单号'
name='quotedPriceNo'
>
<Text strong>{fetchdata && fetchdata.quotedPriceNo}</Text>
</Form.Item>
<Form.Item
label='报价截止时间'
name='offerEndTime'
>
<Text strong>{fetchdata && fetchdata.offerEndTime}</Text>
</Form.Item>
<Form.Item
label='单据时间'
name='createTime'
>
<Text strong>{fetchdata && fetchdata.createTime}</Text>
</Form.Item>
<Form.Item
label='外部状态'
name='externalState'
>
{ fetchdata && <Tag color={OFFTER_EXTERNALSTATE_COLOR[fetchdata.externalState]}>{OFFTER_EXTERNALSTATE[fetchdata.externalState]}</Tag> }
</Form.Item>
<Form.Item
label='内部状态'
name='interiorState'
>
{ fetchdata && <Badge status={OFFTER_INTERNALSTATE_COLOR[fetchdata.interiorState]} text={OFFTER_INTERNALSTATE[fetchdata.interiorState]} /> }
</Form.Item>
</Form>
)
}
export default BasicInfo;
import React, { useEffect } from 'react';
import {
Form,
Input
} from 'antd';
const { TextArea } = Input;
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
}
export interface IProps {
fetchdata: any,
}
const OfferExplain: React.FC<IProps> = (props:any) => {
const [form] = Form.useForm();
const {
fetchdata
} = props;
useEffect(() => {
if (fetchdata) {
form.setFieldsValue({...fetchdata});
}
}, [fetchdata])
return (
<Form
{...layout}
form={form}
>
<Form.Item
label='交付说明'
name='deliveryDetails'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
<Form.Item
label='付款说明'
name='payDetails'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
<Form.Item
label='税费说明'
name='taxes'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
<Form.Item
label='物流说明'
name='logistics'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
<Form.Item
label='包装说明'
name='packRequire'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
<Form.Item
label='其他说明'
name='otherRequire'
>
<TextArea maxLength={50} rows={3} placeholder='最长100字符,50个汉字' />
</Form.Item>
</Form>
)
}
export default OfferExplain;
import React, { useState, useEffect } from 'react';
import { Form, Button, Upload, message } from 'antd';
import { UPLOAD_TYPE } from '@/constants'
import styles from './index.less';
import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
export interface IProps {
fetchdata: any,
handleGetEnclosureUrls?: Function,
editData?: any
}
const File: React.FC<IProps> = (props) => {
const { handleGetEnclosureUrls, editData } = props;
const [files, setFiles] = useState([]);
const [loading, setloading] = useState(false);
/**判断文件类型和大小 */
const beforeDocUpload = (file: any) => {
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) {
message.error('上传文件大小不超过 20M!');
}
return isLt20M;
}
// 上传回调
const handleChange = ({ file }) => {
const arr: any = files;
setloading(true);
if (file.response) {
if (file.response.code === 1000) {
arr.push({
name: file.name,
url: file.response.data
})
setloading(false);
}
}
setFiles([...arr])
handleGetEnclosureUrls(arr);
}
// 删除附件
const removeFiles = (index: any) => {
const arr = [...files];
arr.splice(index, 1);
setFiles(arr);
handleGetEnclosureUrls(arr);
}
// useEffect(() => {
// if (Object.keys(editData).length > 0) {
// setFiles(editData.enclosureUrls)
// }
// }, [editData])
return (
<Form
{...layout}
className={styles.revise_style}
>
<Form.Item label='附件' name='upload'>
<div className={styles.upload_data}>
{files.length > 0 && files.map((v, index) => (
<div key={index} className={styles.upload_item}>
<div className={styles.upload_left}>
<LinkOutlined />
<span>{v.name}</span>
</div>
<div className={styles.upload_right} onClick={() => removeFiles(index)}>
<DeleteOutlined />
</div>
</div>
))}
</div>
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
onChange={handleChange}
>
<Button loading={loading} icon={<UploadOutlined />}>上传文件</Button>
<div style={{ marginTop: '8px' }}>一次上传一个文件,每个附件大小不能超过 20M</div>
</Upload>
</Form.Item>
</Form>
)
}
export default File;
.formStyle {
:global {
.ant-input-group {
display: flex;
.ant-select {
width: 50% !important;
}
.ant-input {
width: 100% !important;
margin-left: 20px;
}
}
}
}
.offerStyle {
:global {
.ant-radio-button-wrapper {
height: 24px;
line-height: 23px;
}
.ant-radio-button-wrapper:hover {
color: #606266;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #6B778C;
border-color: #6B778C;
}
.ant-radio-button-wrapper-checked:not([class*=' ant-radio-button-wrapper-disabled']).ant-radio-button-wrapper:first-child {
border-right-color: #6B778C;
}
.ant-table-wrapper {
margin-top: 24px;
}
}
}
import React, { useEffect, useState } from 'react';
import {
Form,
Table,
Radio,
Button,
Input,
Select,
} from 'antd';
import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons';
import style from './index.less';
const { Option } = Select;
export interface IProps {
fetchdata: any,
}
const OfferInfo: React.FC<IProps> = (props:any) => {
const {
fetchdata
} = props;
const [tabs, setTabs] = useState<number[]>([]);
const [dataSource, setDataSource] = useState<any>(fetchdata.materiels)
const columns = [
{
title: '物料编号/名称',
key: 'number',
dataIndex: 'number',
},
{
title: '规格型号',
key: 'model',
dataIndex: 'model',
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
},
{
title: '采购数量/单位',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
render: () => (
<Select>
<Option value={1}></Option>
<Option value={2}></Option>
</Select>
)
},
{
title: '含税',
key: 'isTax',
dataIndex: 'isTax',
},
{
title: '税率',
key: 'taxProbability',
dataIndex: 'taxProbability',
render: () => <Input addonAfter="%" />
},
{
title: '单价(含税)',
key: 'taxUnitPrice',
dataIndex: 'taxUnitPrice',
render: () => <Input addonBefore="¥" />
},
{
title: '金额(含税)',
key: 'taxPrice',
dataIndex: 'taxPrice',
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text:any) => <Button type='link'>关联报价商品</Button>
},
]
/** 用于展示有第几轮的TABS */
const handleTabs = (num: number = 1) => {
const tabs: number[] = []
for (let i = 0; i < num; i += 1) {
tabs.push(i + 1)
}
setTabs(tabs.reverse())
}
useEffect(() => {
console.log(fetchdata.count, 11882266)
handleTabs(fetchdata && fetchdata.count);
}, [])
return (
<Form
className={style.offerStyle}
>
<Radio.Group defaultValue={fetchdata && fetchdata.count}>
{ tabs.length > 0 && tabs.map(item => (
<Radio.Button key={item} value={item}>{item}</Radio.Button>
)) }
</Radio.Group>
<Table
columns={columns}
dataSource={dataSource}
pagination={{ size: "small" }}
rowKey='id'
expandable={{
expandedRowRender: record => <p style={{ margin: 0 }}>11231235</p>,
expandIcon: ({ expanded, onExpand, record }) =>
expanded ? (
<CaretDownOutlined onClick={e => onExpand(record, e)} />
) : (
<CaretRightOutlined onClick={e => onExpand(record, e)} />
)
}}
/>
</Form>
)
}
export default OfferInfo;
......@@ -26,7 +26,7 @@ const AddOffter = () => {
dataIndex: 'quotedPriceNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/addOffter/preview`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/offter/addOffter/view?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......
......@@ -24,7 +24,7 @@ const AuditOffterOne = () => {
dataIndex: 'quotedPriceNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/auditOffterOne/preview`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......
......@@ -25,7 +25,7 @@ const AuditOffterTwo = () => {
dataIndex: 'quotedPriceNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/auditOffterTwo/preview`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterTwo/view?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......
import React, { useEffect, useState, useRef } from 'react';
import { Anchor, Radio, Steps, Row, Col, Table, Tooltip, Switch } from 'antd';
import { Anchor, Radio, Steps, Row, Col, Table } from 'antd';
import { history } from 'umi';
import style from './index.less';
import { ArrowLeftOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
import { GetPurchasePurchaseInquiryDetailsResponse } from '@/services/PurchaseApi/id4801';
import { GetPurchaseQuotedPricePurchaseInquiryDetailsResponse } from '@/services/PurchaseApi/id4897';
import { PublicApi } from '@/services/api';
import DetailDrawer from '../../components/detailDrawer';
import EyePreview from '@/components/EyePreview';
......@@ -32,14 +32,13 @@ const TYPE = {
const Detail: React.FC<{}> = () => {
const ref = useRef({});
const { id, number } = history.location.query;
const [data, setData] = useState<GetPurchasePurchaseInquiryDetailsResponse | any>({})
const [data, setData] = useState<GetPurchaseQuotedPricePurchaseInquiryDetailsResponse | any>({})
const [currLink, setCurrLink] = useState(activeAnchorClassName);
const [tabPane] = useState([
{ id: 'progress', title: '流转进度' },
{ id: 'process', title: '基本流程' },
{ id: 'materials', title: '采购材料' },
{ id: 'conditions', title: '交易条件' },
{ id: 'docking', title: '需求对接' },
{ id: 'record', title: '流转记录' },
]);
const [targetOffset, setTargetOffset] = useState<number | undefined>(undefined);
......@@ -55,7 +54,7 @@ const Detail: React.FC<{}> = () => {
current: '1',
pageSize: '1',
}
PublicApi.getPurchasePurchaseInquiryDetails(parmas).then(res => {
PublicApi.getPurchaseQuotedPricePurchaseInquiryDetails(parmas).then(res => {
if (res.code === 1000) {
setData(res.data)
}
......@@ -165,7 +164,7 @@ const Detail: React.FC<{}> = () => {
/** 采购材料分页查询 */
const productlist = (params: any) => {
return new Promise(resolve => {
PublicApi.getPurchasePurchaseInquiryProductlistList({ id, number, ...params }).then(res => {
PublicApi.getPurchaseQuotedPriceProductlistList({ id, number, ...params }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -242,67 +241,7 @@ const Detail: React.FC<{}> = () => {
dataIndex: 'auditOpinion',
},
]
/** 需求对接 */
const switchState = (text, record, index) => {
return <Switch disabled defaultChecked={text ? true : false} size="small" />
}
const demandColums = [
{
title: '序号',
key: 'number',
dataIndex: 'number',
render: (text: any, record: any, index: number) => <>{index + 1}</>
},
{
title: '会员名称',
key: 'memberName',
dataIndex: 'memberName',
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName',
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName',
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag',
},
{
title: '是否归属会员',
key: 'membershipOrNot',
dataIndex: 'membershipOrNot',
},
{
title: (
<>
<span>需求发送</span>
<Tooltip placement="top" title='打开开关,审核通过后,将发送需求至选择的归属会员'>
<QuestionCircleOutlined
style={{
marginLeft: '5px',
fontSize: '14px',
color: '#909399'
}}
/>
</Tooltip>
</>
),
key: 'state',
dataIndex: 'state',
render: switchState,
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
},
]
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -359,8 +298,8 @@ const Detail: React.FC<{}> = () => {
onChange={(e) => setLogStatesStatus(e.target.value)}
defaultValue={LogStatesType.externalLogStates}
>
<Radio.Button value={LogStatesType.externalLogStates}>外部流转</Radio.Button>
<Radio.Button value={LogStatesType.interiorLogStates}>内部流转</Radio.Button>
{data.externalLogStates && <Radio.Button value={LogStatesType.externalLogStates}>外部流转</Radio.Button>}
{data.interiorLogStates && <Radio.Button value={LogStatesType.interiorLogStates}>内部流转</Radio.Button>}
</Radio.Group>
</div>
</div>
......@@ -486,27 +425,6 @@ const Detail: React.FC<{}> = () => {
</Row>
</div>
</div>
{/* 交易条件 */}
<div id='docking' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
需求对接
</div>
</div>
</div>
<div className='ant-card-body'>
<div className={style.list}>
<h5 className={style.listLable} style={{ flex: '0 0 100px' }}>发布方式:</h5>
<h5 className={style.listContent}>{TYPE[data.type]}</h5>
</div>
<Table
dataSource={data.demandMembers}
columns={demandColums}
rowKey='id'
/>
</div>
</div>
{/* 流转记录 */}
<div id='record' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
......@@ -518,8 +436,8 @@ const Detail: React.FC<{}> = () => {
<Radio.Group
onChange={(e) => setLogStatus(e.target.value)}
defaultValue={LogType.externalLogs}>
<Radio.Button value={LogType.externalLogs}>外部流转</Radio.Button>
<Radio.Button value={LogType.interiorLogs}>内部流转</Radio.Button>
{data.externalLogs && <Radio.Button value={LogType.externalLogs}>外部流转</Radio.Button>}
{data.interiorLogs && <Radio.Button value={LogType.interiorLogs}>内部流转</Radio.Button>}
</Radio.Group>
</div>
</div>
......
import React from 'react';
import Table from '../../components/table'
import Table from '../../components/table';
import { history } from 'umi';
import { Button, Space, Typography, Tag } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
......@@ -23,7 +24,7 @@ const Inquiry = () => {
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/purchaseInquiry/inquiry/preview?id=${record.id}&number=${record.purchaseInquiryNo}`}>{text}</EyePreview>
url={`/memberCenter/procurementAbility/offter/inquiry/preview?id=${record.id}&number=${record.purchaseInquiryNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......@@ -55,7 +56,13 @@ const Inquiry = () => {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => <Button type='link'>报价</Button>
render: (text: any, record: any) =>
<Button
onClick={() => history.push(`/memberCenter/procurementAbility/offter/quote?id=${record.id}&number=${record.purchaseInquiryNo}`)}
type='link'
>
报价
</Button>
}];
return (
<Table
......
......@@ -24,7 +24,7 @@ const Offter = () => {
dataIndex: 'quotedPriceNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/preview?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/offter/view?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......
......@@ -25,7 +25,7 @@ const SubmitOffter = () => {
dataIndex: 'quotedPriceNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/submitOffter/preview`}>{text}</EyePreview>
<EyePreview url={`/memberCenter/procurementAbility/offter/submitOffter/view?id=${record.id}&number=${record.quotedPriceNo}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......
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