Commit 491920ff authored by 卢均锐's avatar 卢均锐

chore: 修改采购竞价接口引入方式

parent 1692708f
......@@ -5,7 +5,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
import isEmpty from 'lodash/isEmpty'
import { observer } from 'mobx-react'
import { PublicApi } from '@/services/api';
import { getPurchaseOnlineBiddingBiddingDetails } from '@/services/PurchaseV2Api';
import { priceFormat } from '@/utils/numberFomat';
import { formatTimeString } from '@/utils';
import { toChatRoom } from '@/utils/im';
......@@ -56,7 +56,7 @@ const Detail = () => {
current: '1',
pageSize: '1'
}
await PublicApi.getPurchaseOnlineBiddingBiddingDetails({ ...params }).then(res => {
await getPurchaseOnlineBiddingBiddingDetails({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......
......@@ -7,7 +7,7 @@ import { ENTERPRISE_CENTER_URL } from '@/constants'
import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { getPurchaseOnlineBiddingStayExamineBiddingSignup } from '@/services/PurchaseV2Api';
import Table from '../../components/table'
......@@ -91,7 +91,7 @@ const ReadySignUp = () => {
schemaType="ONLINEBIDREADYSIGN_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseOnlineBiddingStayExamineBiddingSignup}
fetch={getPurchaseOnlineBiddingStayExamineBiddingSignup}
reload={ref}
/>
)
......
......@@ -7,7 +7,8 @@ import { SaveOutlined } from '@ant-design/icons'
import { ArrayTable } from '@formily/antd-components'
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { PublicApi } from '@/services/api'
import { getManageCountryAreaGetTelCode } from '@/services/ManageV2Api'
import { postPurchaseOnlineBiddingOnlineSignup, getPurchaseOnlineBiddingDetails } from '@/services/PurchaseV2Api'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import NiceForm from '@/components/NiceForm'
import ReutrnEle from '@/components/ReturnEle';
......@@ -36,7 +37,7 @@ const SignUpForm = () => {
const getCountryCodeId = async () => {
const res = await PublicApi.getManageCountryAreaGetTelCode()
const res = await getManageCountryAreaGetTelCode()
if (res.code === 1000) {
let _value = ''
for (let i = 0; i < res.data.length; i++) {
......@@ -66,7 +67,7 @@ const SignUpForm = () => {
console.log(_params)
setBtnLoading(true);
setRefundDisabled(true);
PublicApi.postPurchaseOnlineBiddingOnlineSignup(_params).then(res => {
postPurchaseOnlineBiddingOnlineSignup(_params).then(res => {
if (res.code === 1000) {
history.goBack()
} else {
......@@ -97,7 +98,7 @@ const SignUpForm = () => {
pageSize: '1'
}
setFormLoading(true)
await PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
await getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
setFormLoading(false)
if (res.code !== 1000) {
history.goBack();
......
......@@ -6,7 +6,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { getPurchaseOnlineBiddingList, getPurchaseOnlineBiddingExternalStatus, getPurchaseOnlineBiddingInteriorStatus } from '@/services/PurchaseV2Api';
import Table from '../../components/table'
......@@ -30,7 +30,7 @@ const Search = () => {
key: 'biddingNo',
dataIndex: 'biddingNo',
render: (text: any, record: any) => (
<Space direction='vertical' style={{width: 300}}>
<Space direction='vertical' style={{ width: 300 }}>
<EyePreview
url={`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text>
......@@ -83,9 +83,9 @@ const Search = () => {
schemaType="ONLINEBIDORDER_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseOnlineBiddingList}
externalStatusFetch={PublicApi.getPurchaseOnlineBiddingExternalStatus}
interiorStatusFetch={PublicApi.getPurchaseOnlineBiddingInteriorStatus}
fetch={getPurchaseOnlineBiddingList}
externalStatusFetch={getPurchaseOnlineBiddingExternalStatus}
interiorStatusFetch={getPurchaseOnlineBiddingInteriorStatus}
reload={ref}
/>
)
......
......@@ -3,7 +3,7 @@ import { Badge, Popconfirm, Button } from 'antd';
import { history } from 'umi';
import { CheckCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { getPurchaseBiddingStaySubmitDetails, getPurchaseBiddingDetails, postPurchaseBiddingExamine, postPurchaseBiddingExamine1, postPurchaseBiddingExamine2, postPurchaseBiddingSubmit, postPurchaseBiddingExaminBiddingSignup, postPurchaseBiddingSubmitBidding1, postPurchaseBiddingSubmitBidding2, getPurchaseBiddingMaterielPage, getPurchaseBiddingMemberPage, postPurchaseBiddingUpdateBiddingReturn, postPurchaseBiddingSubmitExamineBiddingReturn, postPurchaseBiddingStayConfirmBidding, getPurchaseBiddingQuotedPriceDetaild } from '@/services/PurchaseV2Api';
import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
......@@ -243,7 +243,7 @@ const SearchDetail = () => {
pageSize: '1'
}
const _fetch = pathPci === 'readySubmitExamineResult' ? PublicApi.getPurchaseBiddingStaySubmitDetails : PublicApi.getPurchaseBiddingDetails
const _fetch = pathPci === 'readySubmitExamineResult' ? getPurchaseBiddingStaySubmitDetails : getPurchaseBiddingDetails
await _fetch({ ...params }).then(res => {
if (res.code !== 1000) {
......@@ -274,7 +274,7 @@ const SearchDetail = () => {
/** 提交 */
const fetchSubmitBatch = async () => {
let res = null;
res = await PublicApi.postPurchaseBiddingExamine({ id });
res = await postPurchaseBiddingExamine({ id });
if (res.code === 1000) {
history.goBack();
}
......@@ -321,7 +321,7 @@ const SearchDetail = () => {
default:
return null
}
}else{
} else {
return null
}
}
......@@ -330,22 +330,22 @@ const SearchDetail = () => {
let fetchSoure: any = null;
switch (pathPci) {
case 'readyExamineOne':
fetchSoure = PublicApi.postPurchaseBiddingExamine1
fetchSoure = postPurchaseBiddingExamine1
break;
case 'readyExamineTwo':
fetchSoure = PublicApi.postPurchaseBiddingExamine2
fetchSoure = postPurchaseBiddingExamine2
break;
case 'readySubmit':
fetchSoure = PublicApi.postPurchaseBiddingSubmit
fetchSoure = postPurchaseBiddingSubmit
break;
case 'readyExamineSignUp':
fetchSoure = PublicApi.postPurchaseBiddingExaminBiddingSignup
fetchSoure = postPurchaseBiddingExaminBiddingSignup
break;
case 'readyExamineResultOne':
fetchSoure = PublicApi.postPurchaseBiddingSubmitBidding1
fetchSoure = postPurchaseBiddingSubmitBidding1
break;
case 'readyExamineResultTwo':
fetchSoure = PublicApi.postPurchaseBiddingSubmitBidding2
fetchSoure = postPurchaseBiddingSubmitBidding2
break;
}
return fetchSoure
......@@ -380,7 +380,7 @@ const SearchDetail = () => {
<MaterialLayout
id={id}
number={number}
fetch={PublicApi.getPurchaseBiddingMaterielPage}
fetch={getPurchaseBiddingMaterielPage}
layoutTitle='采购物料'
/>
)
......@@ -530,7 +530,7 @@ const SearchDetail = () => {
<DemandLayout
bidId={id}
number={number}
fetch={PublicApi.getPurchaseBiddingMemberPage}
fetch={getPurchaseBiddingMemberPage}
storeList={storeList}
title='对接方式' />
)
......@@ -576,7 +576,7 @@ const SearchDetail = () => {
signUpIdea,
urls
}
const _fetch = button === 1 ? PublicApi.postPurchaseBiddingUpdateBiddingReturn : PublicApi.postPurchaseBiddingSubmitExamineBiddingReturn;
const _fetch = button === 1 ? postPurchaseBiddingUpdateBiddingReturn : postPurchaseBiddingSubmitExamineBiddingReturn;
setConfirmLoading(true)
_fetch(_params).then(res => {
if (res.code === 1000) {
......@@ -622,7 +622,7 @@ const SearchDetail = () => {
record={{ ...dataSource, memberName: memberName }}
visible={confirmBidResultVisible}
onCancel={() => setConfirmBidResultVisible(false)}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
fetch={postPurchaseBiddingStayConfirmBidding}
onOk={() => { history.goBack() }}
/>
<SubmitResultModal
......@@ -633,7 +633,7 @@ const SearchDetail = () => {
confirmLoading={confirmLoading}
/>
<QuotationDetailsDrawer
fetch={PublicApi.getPurchaseBiddingQuotedPriceDetaild}
fetch={getPurchaseBiddingQuotedPriceDetaild}
quotationDetailsId={quotationDetailsId}
number={number}
effects='id'
......
......@@ -5,7 +5,7 @@ import { SaveOutlined } from '@ant-design/icons';
import { Tabs, Card, Button, Badge } from 'antd';
import ReutrnEle from '@/components/ReturnEle';
import { PublicApi } from '@/services/api';
import { postPurchaseBiddingUpdate, postPurchaseBiddingAdd, getPurchaseBiddingDetails } from '@/services/PurchaseV2Api';
import { getAuth } from '@/utils/auth';
import Material from '../../purchaseInquiry/addInquiry/components/material';
......@@ -96,9 +96,9 @@ const AddForm = () => {
time: number,
} = null;
if (id) {
res = await PublicApi.postPurchaseBiddingUpdate({ id, ...params })
res = await postPurchaseBiddingUpdate({ id, ...params })
} else {
res = await PublicApi.postPurchaseBiddingAdd({ ...params });
res = await postPurchaseBiddingAdd({ ...params });
}
if (res.code !== 1000) {
setLoading(false);
......@@ -128,7 +128,7 @@ const AddForm = () => {
current: '1',
pageSize: '1',
}
PublicApi.getPurchaseBiddingDetails(parmas).then((res: any) => {
getPurchaseBiddingDetails(parmas).then((res: any) => {
if (res.code === 1000) {
const params = res.data;
const basicInfo = { ...basic };
......
......@@ -12,7 +12,7 @@ import {
} from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { getManageAreaAll, getManageAreaByPcodeAll } from '@/services/ManageV2Api';
import { formatTimeString } from '@/utils'
import { validatorByte } from '../../validator';
......@@ -54,7 +54,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
/** 获取所有地区 */
const manageProvince = () => {
return new Promise(resolve => {
PublicApi.getManageAreaAll().then(res => {
getManageAreaAll().then(res => {
if (res.code === 1000) {
resolve(res.data);
}
......@@ -74,7 +74,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
if (num === 1) {
await province.forEach(item => {
if (item.code === val) {
PublicApi.getManageAreaByPcodeAll({ pcode: val }).then((res: any) => {
getManageAreaByPcodeAll({ pcode: val }).then((res: any) => {
if (res.code === 1000) {
result[idx].provinceCode = val;
result[idx].province = item.name;
......@@ -162,7 +162,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
if (Object.keys(fetchdata).length > 0) {
setrequisitionFormAddress([...fetchdata.areas]);
fetchdata.areas.forEach((item: any, index: number) => {
PublicApi.getManageAreaByPcodeAll({ pcode: item.provinceCode }).then((res: any) => {
getManageAreaByPcodeAll({ pcode: item.provinceCode }).then((res: any) => {
if (res.code === 1000) {
const citydata = {
citydata: res.data
......
......@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import { Form, Input, DatePicker, Select } from 'antd';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { getLogisticsSelectListReceiverAddress } from '@/services/LogisticsV2Api';
import { validatorByte } from '../../validator';
......@@ -39,7 +39,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
const [selAddress, setSelAddress] = useState<ADDRESS_TYPE>();
/** 获取交付地址 */
const handleGetLogistics = async () => {
const service = PublicApi.getLogisticsSelectListReceiverAddress;
const service = getLogisticsSelectListReceiverAddress;
const res = await service();
if (res.code === 1000) {
setAddress(res.data);
......
......@@ -7,7 +7,7 @@ import { PlusOutlined, PlayCircleOutlined, PoweroffOutlined, CaretDownOutlined }
import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { postPurchaseBiddingExamine, postPurchaseBiddingExamineBatch, postPurchaseBiddingDelete, postPurchaseBiddingDeleteBatch, getPurchaseBiddingAwaitNewList } from '@/services/PurchaseV2Api';
import Table from '../../components/table'
......@@ -28,7 +28,7 @@ const ReadyAdd = () => {
key: 'biddingNo',
dataIndex: 'biddingNo',
render: (text: any, record: any) => (
<Space direction='vertical' style={{width: 300}}>
<Space direction='vertical' style={{ width: 300 }}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyAdd/detail?id=${record.id}&number=${text}&button=${record.button}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
......@@ -91,9 +91,9 @@ const ReadyAdd = () => {
const fetchSubmitBatch = async (id?: number) => {
let res = null;
if (id) {
res = await PublicApi.postPurchaseBiddingExamine({ id });
res = await postPurchaseBiddingExamine({ id });
} else {
res = await PublicApi.postPurchaseBiddingExamineBatch({ ids: rowkeys });
res = await postPurchaseBiddingExamineBatch({ ids: rowkeys });
}
if (res.code === 1000) {
ref.current.reload();
......@@ -108,9 +108,9 @@ const ReadyAdd = () => {
const fetchDeleteBatch = async (id?: number) => {
let res = null;
if (id) {
res = await PublicApi.postPurchaseBiddingDelete({ id });
res = await postPurchaseBiddingDelete({ id });
} else {
res = await PublicApi.postPurchaseBiddingDeleteBatch({ ids: rowkeys });
res = await postPurchaseBiddingDeleteBatch({ ids: rowkeys });
}
if (res.code === 1000) {
ref.current.reload();
......@@ -126,7 +126,7 @@ const ReadyAdd = () => {
schemaType="PURCHASEBIDREADYADD_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseBiddingAwaitNewList}
fetch={getPurchaseBiddingAwaitNewList}
controllerBtns={
<Row>
<Col span={24}>
......
......@@ -6,7 +6,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { getPurchaseBiddingStayBiddingList } from '@/services/PurchaseV2Api';
import { formatTimeString } from '@/utils'
import Table from '../../components/table'
......@@ -76,7 +76,7 @@ const ReadyBid = () => {
schemaType="PURCHASEBIDOSIGNUP_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseBiddingStayBiddingList}
fetch={getPurchaseBiddingStayBiddingList}
/>
)
}
......
......@@ -3,7 +3,7 @@ import { Row, Col, Input, Drawer, Table, Space, Typography, message, Form } from
import { ColumnType } from 'antd/lib/table/interface';
import { priceFormat } from '@/utils/numberFomat';
import { PublicApi } from '@/services/api';
import { postPurchaseOnlineBiddingSubmitReportPrice } from '@/services/PurchaseV2Api';
import BtnItem from '../../../../../../components/detail/components/bidDetailBtnItem';
......@@ -164,7 +164,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
materiels: _dataSource2,
}
setBtnLoading(true);
PublicApi.postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => {
postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => {
if (res.code === 1000) {
onClose && onClose();
}
......
......@@ -5,7 +5,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
import isEmpty from 'lodash/isEmpty'
import { observer } from 'mobx-react'
import { PublicApi } from '@/services/api';
import { postPurchaseBiddingManageBidding, getPurchaseBiddingDynamicBidding, getPurchaseBiddingRankingBidding, getPurchaseBiddingSignupMember, getPurchaseBiddingBiddingMateriel } from '@/services/PurchaseV2Api';
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import { usePurchaseBidStore } from '@/store/purchaseBid';
......@@ -73,7 +73,7 @@ const Management = () => {
pageSize: '1'
}
PublicApi.postPurchaseBiddingManageBidding({ ...params }).then(res => {
postPurchaseBiddingManageBidding({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -81,7 +81,7 @@ const Management = () => {
const { data } = res;
setDataSource(data);
})
PublicApi.getPurchaseBiddingDynamicBidding({ ..._params }).then(res => {
getPurchaseBiddingDynamicBidding({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -89,7 +89,7 @@ const Management = () => {
const { data } = res;
setDynamic(data);
})
PublicApi.getPurchaseBiddingRankingBidding({ ..._params }).then(res => {
getPurchaseBiddingRankingBidding({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -97,7 +97,7 @@ const Management = () => {
const { data } = res;
setQueryPriceDynamics(data);
})
PublicApi.getPurchaseBiddingSignupMember({ ..._params }).then(res => {
getPurchaseBiddingSignupMember({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -105,7 +105,7 @@ const Management = () => {
const { data } = res;
setSignupMembers(data);
})
PublicApi.getPurchaseBiddingBiddingMateriel({ ..._params }).then(res => {
getPurchaseBiddingBiddingMateriel({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -128,7 +128,7 @@ const Management = () => {
pageSize: '1'
}
if (key === '1') {
PublicApi.getPurchaseBiddingRankingBidding({ ..._params }).then(res => {
getPurchaseBiddingRankingBidding({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -137,7 +137,7 @@ const Management = () => {
setQueryPriceDynamics(data);
})
} else {
PublicApi.getPurchaseBiddingSignupMember({ ..._params }).then(res => {
getPurchaseBiddingSignupMember({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......
......@@ -6,7 +6,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import { ENTERPRISE_CENTER_URL } from '@/constants'
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { getPurchaseBiddingStayConfirmBiddingList, postPurchaseBiddingStayConfirmBidding } from '@/services/PurchaseV2Api';
import { formatTimeString } from '@/utils'
import ConfirmBidResultModal from '../components/confirmBidResultModal';
......@@ -99,13 +99,13 @@ const ReadyConfirm = () => {
schemaType="PURCHASEBIDOSIGNUP_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseBiddingStayConfirmBiddingList}
fetch={getPurchaseBiddingStayConfirmBiddingList}
/>
<ConfirmBidResultModal
record={confirmRecord}
title="确认竞价结果"
visible={confirmBidResultVisible}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
fetch={postPurchaseBiddingStayConfirmBidding}
onCancel={() => setConfirmBidResultVisible(false)}
onOk={handleOnOk}
/>
......
......@@ -6,7 +6,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { postPurchaseBiddingExamine1, postPurchaseBiddingExamine1Batch, getPurchaseBiddingStayExamineList1 } from '@/services/PurchaseV2Api';
import { formatTimeString } from '@/utils'
import ModalOperate from '../../components/modalOperate';
......@@ -74,9 +74,9 @@ const ReadyExamineOne = () => {
const fetchSubmitBatch = async (id?: number) => {
let res = null;
if (id) {
res = await PublicApi.postPurchaseBiddingExamine1({ id, state: 1 });
res = await postPurchaseBiddingExamine1({ id, state: 1 });
} else {
res = await PublicApi.postPurchaseBiddingExamine1Batch({ ids: rowkeys });
res = await postPurchaseBiddingExamine1Batch({ ids: rowkeys });
}
if (res.code === 1000) {
ref.current.reload();
......@@ -104,7 +104,7 @@ const ReadyExamineOne = () => {
schemaType="PURCHASEBIDREADYADD_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getPurchaseBiddingStayExamineList1}
fetch={getPurchaseBiddingStayExamineList1}
controllerBtns={
<Row>
<Col span={24}>
......@@ -125,7 +125,7 @@ const ReadyExamineOne = () => {
title="单据审核"
modalType="audit"
visible={visible}
fetch={PublicApi.postPurchaseBiddingExamine1}
fetch={postPurchaseBiddingExamine1}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
/>
......
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