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

feat: 询价报价 - 待分配询价单

parent 50963d04
...@@ -6,7 +6,7 @@ module.exports = [ ...@@ -6,7 +6,7 @@ module.exports = [
{ name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [0], }, // 搜索服务V2 { name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [0], }, // 搜索服务V2
{ name: 'PurchaseV2', token: '84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c', categoryIds: [0] }, // 采购服务V2 { name: 'PurchaseV2', token: '84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c', categoryIds: [0] }, // 采购服务V2
{ name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] }, { name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] },
{ name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2 { name: 'TransactionV2', token: 'f8efd57dd9686fb8563dd3495b53a36bb5b2d24e5db48fecea43a7057de81bd7', categoryIds: [0] }, // 交易服务V2-318
{ name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2 { name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderNewV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2 New { name: 'OrderNewV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2 New
{ name: 'MemberV2', token: 'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834', categoryIds: [0]}, //会员服务 V2 { name: 'MemberV2', token: 'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834', categoryIds: [0]}, //会员服务 V2
......
...@@ -16,6 +16,14 @@ export default [ ...@@ -16,6 +16,14 @@ export default [
component: '@/pages/transaction/dealAbility/inquiryOffer/waitAllotOrder', component: '@/pages/transaction/dealAbility/inquiryOffer/waitAllotOrder',
}, },
{ {
/** 待分配询价单 */
path: '/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview',
name: '询价单详情',
component: '@/pages/transaction/dealAbility/inquiryOffer/preview',
hideInMenu: true,
noMargin: true,
},
{
/** 询价单查询 */ /** 询价单查询 */
path: '/memberCenter/tranactionAbility/inquiryOffer/inquirySearch', path: '/memberCenter/tranactionAbility/inquiryOffer/inquirySearch',
name: '询价单查询', name: '询价单查询',
......
...@@ -4,32 +4,47 @@ import { getIntl, history } from 'umi'; ...@@ -4,32 +4,47 @@ import { getIntl, history } from 'umi';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import moment from 'moment' import moment from 'moment'
import { Row, Col, Button, Tag, Badge } from 'antd'; import { Row, Col, Button, Tag, Badge, Modal } from 'antd';
import { WAITALLOTORDERSCHEMA } from './schema'; import { WAITALLOTORDERSCHEMA } from './schema';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor'; import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
import { getTransactionAuditProductQuotationList, getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, postTransactionProductQuotationtAuditAll } from '@/services/TransactionV2Api'; import { getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, getTransactionProductInquiryNotAssignedAssigned, getTransactionProductInquiryNotAssignedList, postTransactionProductInquiryNotAssignedAssignedBatch } from '@/services/TransactionV2Api';
const intl = getIntl(); const intl = getIntl();
const WaitAllotOrder = () => { const WaitAllotOrder = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const format = (text, fmt?: string) => { const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
} }
const [loading, setLoading] = useState<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
/** 批量审核 */ /** 批量审核 */
const fetchSubmitBatch = async () => { const fetchSubmitBatch = async (id?: string, index?: number) => {
const res = await postTransactionProductQuotationtAuditAll({ ids: rowkeys }); let res = null;
if (res.code === 1000) { if (id) {
ref.current.reload(); setLoading({[index]: true})
setRowKeys([]) res = await getTransactionProductInquiryNotAssignedAssigned({ inquiryId: id })
} else {
setLoading({load: true})
res = await postTransactionProductInquiryNotAssignedAssignedBatch({ idList: rowkeys });
}
if (res.code !== 1000) {
setLoading({})
return
} }
setLoading({})
ref.current.reload();
Modal.success({
content: '询价单领取成功!',
});
setRowKeys([])
} }
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: intl.formatMessage({id: 'dealAbility.xunjiadanhao'}), title: intl.formatMessage({ id: 'dealAbility.xunjiadanhao' }),
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/productInquiry/inquirySearch/preview?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: intl.formatMessage({ id: 'dealAbility.xunjiadanzhaiyao' }), title: intl.formatMessage({ id: 'dealAbility.xunjiadanzhaiyao' }),
...@@ -42,40 +57,40 @@ const WaitAllotOrder = () => { ...@@ -42,40 +57,40 @@ const WaitAllotOrder = () => {
dataIndex: 'memberName', dataIndex: 'memberName',
}, },
{ {
title: intl.formatMessage({id: 'dealAbility.jiaofuriqi'}), title: intl.formatMessage({ id: 'dealAbility.jiaofuriqi' }),
key: 'deliveryTime', key: 'deliveryTime',
dataIndex: 'deliveryTime', dataIndex: 'deliveryTime',
render: (text: any) => format(text) render: (text: any) => format(text)
}, },
{ {
title:intl.formatMessage({id: 'dealAbility.baojiajiezhishijian'}), title: intl.formatMessage({ id: 'dealAbility.baojiajiezhishijian' }),
key: 'quotationAsTime', key: 'quotationAsTime',
dataIndex: 'quotationAsTime', dataIndex: 'quotationAsTime',
render: (text: any) => format(text) render: (text: any) => format(text)
}, },
{ {
title: intl.formatMessage({id: 'dealAbility.danjushijian'}), title: intl.formatMessage({ id: 'dealAbility.danjushijian' }),
key: 'voucherTime', key: 'voucherTime',
dataIndex: 'voucherTime', dataIndex: 'voucherTime',
render: (text: any) => format(text) render: (text: any) => format(text)
}, },
{ {
title: intl.formatMessage({id: 'dealAbility.waibuzhuangtai'}), title: intl.formatMessage({ id: 'dealAbility.waibuzhuangtai' }),
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag> render: (text: any, record: any) => <Tag color={EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
}, },
{ {
title: intl.formatMessage({id: 'dealAbility.neibuzhuangtai'}), title: intl.formatMessage({ id: 'dealAbility.neibuzhuangtai' }),
key: 'interiorState', key: 'interiorState',
dataIndex: 'interiorState', dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={INTERNALSTATE_COLOR[text]} text={record.interiorStateName} /> render: (text: any, record: any) => <Badge status={INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
}, },
{ {
title: intl.formatMessage({id: 'dealAbility.caozuo'}), title: intl.formatMessage({ id: 'dealAbility.caozuo' }),
key: 'options', key: 'options',
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'>领取</Button> render: (text: any, record: any, index: number) => <Button type='link' loading={loading[index]} onClick={() => fetchSubmitBatch(record.id, index)}>领取</Button>
}, },
]; ];
return ( return (
...@@ -85,7 +100,7 @@ const WaitAllotOrder = () => { ...@@ -85,7 +100,7 @@ const WaitAllotOrder = () => {
schema={WAITALLOTORDERSCHEMA} schema={WAITALLOTORDERSCHEMA}
columns={columns} columns={columns}
effects="inquiryListNo" effects="inquiryListNo"
fetch={getTransactionAuditProductQuotationList} fetch={getTransactionProductInquiryNotAssignedList}
externalStatusFetch={getTransactionProductInquiryExternalStateEnum({ type: '2' })} externalStatusFetch={getTransactionProductInquiryExternalStateEnum({ type: '2' })}
interiorStatusFetch={getTransactionProductInquiryInteriorStateEnum({ type: '2' })} interiorStatusFetch={getTransactionProductInquiryInteriorStateEnum({ type: '2' })}
fetchRowkeys={(e) => setRowKeys(e)} fetchRowkeys={(e) => setRowKeys(e)}
...@@ -93,8 +108,9 @@ const WaitAllotOrder = () => { ...@@ -93,8 +108,9 @@ const WaitAllotOrder = () => {
<Row> <Row>
<Col span={6}> <Col span={6}>
<Button <Button
loading={loading?.load}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
onClick={fetchSubmitBatch} onClick={() => fetchSubmitBatch()}
> >
批量领取 批量领取
</Button> </Button>
......
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