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

feat: 完成采购报价

parent 66e6900e
......@@ -77,7 +77,11 @@ const AddOffter = () => {
record.interiorState === OFFTER_INTERNALSTATE_TYPE.WAITSUBMITAUDIT_TYPE
&& (
<>
<Button type='link'>提交审核</Button>
<Popconfirm title="确定要提交审核吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link'>
提交审核
</Button>
</Popconfirm>
<Button
onClick={() => history.push(`/memberCenter/procurementAbility/offter/edit?id=${record.id}&number=${record.quotedPriceNo}`)}
type='link'
......@@ -97,8 +101,13 @@ const AddOffter = () => {
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
/** 批量审核 */
const fetchSubmitBatch = async () => {
const res = await PublicApi.postPurchaseQuotedPriceSubmitBatch({ ids: rowkeys });
const fetchSubmitBatch = async (id?: number) => {
let res = null;
if (id) {
res = await PublicApi.postPurchaseQuotedPriceSubmit({ id });
} else {
res = await PublicApi.postPurchaseQuotedPriceSubmitBatch({ ids: rowkeys });
}
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
......@@ -136,7 +145,7 @@ const AddOffter = () => {
<Col span={24}>
<Space size={16}>
<Button
onClick={fetchSubmitBatch}
onClick={() => fetchSubmitBatch()}
disabled={rowkeys.length === 0}
>
批量提交审核
......
......@@ -73,7 +73,7 @@ const AuditOffterOne = () => {
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/purchaseInquiry/auditInquiryOne/detail?id=${record.id}&number=${record.purchaseInquiryNo}`)}
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
......
......@@ -74,7 +74,7 @@ const AuditOffterTwo = () => {
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/purchaseInquiry/auditInquiryOne/detail?id=${record.id}&number=${record.purchaseInquiryNo}`)}
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterTwo/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
......
......@@ -25,6 +25,9 @@
}
}
.titleBox {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
}
.anchorBox {
......@@ -74,3 +77,50 @@
}
}
}
.tableStyle {
:global {
.ant-table-thead {
tr {
th {
padding: 10px;
.ant-space-item {
margin-bottom: 0;
}
}
}
}
.ant-table-expanded-row td {
padding: 0;
}
}
}
.childrenWrap {
background-color: #fff;
.childrenTitle {
height: 100%;
background: linear-gradient(to left, #FFFFFF, #DAF2E7);
color: #00B37A;
p {
padding-left: 16px;
margin: 0;
font-size: 12px;
height: 14px;
line-height: 14px;
}
padding: 12px 0;
}
.childrenContent {
margin-top: 8px;
p {
margin: 0;
span {
height: 12px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 12px;
padding-right: 10px;
}
}
}
}
......@@ -5,7 +5,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography } from 'antd';
import { Row, Col, Button, Badge, Tag, Space, Typography, Popconfirm } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
......@@ -72,12 +72,11 @@ const SubmitOffter = () => {
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/purchaseInquiry/auditInquiryOne/detail?id=${record.id}&number=${record.purchaseInquiryNo}`)}
>
提交报价单
</Button>
<Popconfirm title="确定要提交报价单吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(record.id)}>
<Button type='link'>
提交报价单
</Button>
</Popconfirm>
</>
)
}];
......@@ -88,9 +87,14 @@ const SubmitOffter = () => {
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
const fetchSubmitBatch = async (id?: number) => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceStayCommitBatch({ ids: rowkeys });
let res = null;
if (id) {
res = await PublicApi.postPurchaseQuotedPriceStayCommit({ id });
} else {
res = await PublicApi.postPurchaseQuotedPriceStayCommitBatch({ ids: rowkeys });
}
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
......@@ -114,7 +118,7 @@ const SubmitOffter = () => {
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
onClick={() => fetchSubmitBatch()}
disabled={rowkeys.length === 0}
>
批量提交审核
......
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