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

fix: 创建新增招标提交时,需判断当前采购会员是否创建采购门户

parent df35ab4a
......@@ -815,6 +815,7 @@ export default {
'table.purchase.qingxianxuanzezhao': 'Please select bidding first',
'table.purchase.shenhe': 'review',
'table.purchase.qingxuanzezhaobiao': 'Please select bidding',
'table.purchase.qingchuangjiancaigoumenhu': 'Members have not created purchasing portal, please create purchasing portal first',
'table.purchase.shifouyaoshanchu': 'Do you want to delete this order',
'table.purchase.xiangmuyusuan': 'Project Budget',
'table.purchase.shiyongdizhi': 'Applicable address',
......
......@@ -812,6 +812,7 @@ export default {
'table.purchase.qingxianxuanzezhao': '먼저 입찰을 선택하세요',
'table.purchase.shenhe': '심사',
'table.purchase.qingxuanzezhaobiao': '입찰을 선택하세요',
'table.purchase.qingchuangjiancaigoumenhu': '회원이 구매 포털을 생성하지 않았습니다. 먼저 구매 포털을 생성하십시오',
'table.purchase.shifouyaoshanchu': '주문을 삭제하시겠습니까?',
'table.purchase.xiangmuyusuan': '프로젝트 예산',
'table.purchase.shiyongdizhi': '해당 주소',
......
......@@ -814,6 +814,7 @@ export default {
'table.purchase.qingxianxuanzezhao': '请先选择招标',
'table.purchase.shenhe': '审核',
'table.purchase.qingxuanzezhaobiao': '请选择招标',
'table.purchase.qingchuangjiancaigoumenhu': '会员还未创建采购门户,请先创建采购门户',
'table.purchase.shifouyaoshanchu': '是否要删除该订单',
'table.purchase.xiangmuyusuan': '项目预算',
'table.purchase.shiyongdizhi': '适用地址',
......
import React from 'react'
import { getIntl, history } from 'umi'
import { Card, Button, Space, message } from 'antd'
import { Card, Button, Space, message, Modal } from 'antd'
import StandardTable from '@/components/StandardTable';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PlusCircleOutlined } from '@ant-design/icons'
......@@ -13,6 +13,8 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import '../../constants/index.less'
import { postPurchaseInviteTenderApplyCheckInviteTender, postPurchaseInviteTenderDeleteInviteTender, postPurchaseInviteTenderGetAddInviteTenderList } from '@/services/PurchaseV2Api'
import { postTemplateWebMemberPurchaseWebExitMemberPurchase } from '@/services/TemplateV2Api'
import { getAuth } from '@/utils/auth';
const intl = getIntl();
// 待新增招标
......@@ -26,6 +28,7 @@ const fetchTableData = async (params) => {
}
const ReadyAddBid:React.FC<ReadyAddBidProps> = (props) => {
const { memberId, memberRoleId } = getAuth();
// 删除api
const { run: deleteRun } = useHttpRequest(postPurchaseInviteTenderDeleteInviteTender)
// 提交审核api
......@@ -82,6 +85,21 @@ const ReadyAddBid:React.FC<ReadyAddBidProps> = (props) => {
// }
}
const clickAdd = () => {
postTemplateWebMemberPurchaseWebExitMemberPurchase({memberId, memberRoleId}, {ctlType: 'none'}).then(({code, data}) => {
if(code === 1000) {
if(data) {
history.push('/memberCenter/procurementAbility/callForBids/readyAddBid/add')
} else {
Modal.confirm({
title: intl.formatMessage({ id: 'table.purchase.qingchuangjiancaigoumenhu'}),
onOk: () => history.push('/memberCenter/procurementAbility/purchasDoor/purchasInfo')
})
}
}
})
}
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -119,7 +137,7 @@ const ReadyAddBid:React.FC<ReadyAddBidProps> = (props) => {
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={() => history.push('/memberCenter/procurementAbility/callForBids/readyAddBid/add')}
onClick={clickAdd}
>
{intl.formatMessage({ id: 'table.purchase.added' })}
</Button>
......
......@@ -8,7 +8,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { getOrderVendorValidateVerifyPage } from '@/services/OrderNewV2Api/id12133';
import { getOrderVendorValidateVerifyPage } from '@/services/OrderNewV2Api';
import '../index.less'
// 待核销自提订单
......
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