Commit 8dd552f1 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理同步平台后台对接接口异常

parent f0f18294
......@@ -10,7 +10,7 @@ import { createFormActions, LifeCycleTypes, FormButtonGroup } from '@formily/ant
import { classSchema } from './schema'
import { useTreeTabs } from '@/hooks/useTreeTabs';
import NiceForm from '@/components/NiceForm';
import { getProductCustomerGetCustomerCategory, getProductCustomerGetCustomerCategoryTree, getProductPlatformGetCategoryTree, postProductCustomerDeleteCustomerCategory, postProductCustomerSaveOrUpdateCustomerCategory } from '@/services/ProductV2Api';
import { getProductCustomerGetCustomerCategory, getProductCustomerGetCustomerCategoryTree, getProductPlatformGetCategoryTree, postProductCustomerDeleteCustomerCategory, postProductCustomerSaveOrUpdateCustomerCategory, postProductCustomerSyncCategory } from '@/services/ProductV2Api';
const { ON_FORM_INPUT_CHANGE } = LifeCycleTypes
......@@ -157,7 +157,6 @@ const ClassProperty: React.FC<{}> = () => {
setSyncLoading(true)
const syncIds = syncTreeActions.getSelectKeys()
if(syncIds.length) {
// @ts-ignore
postProductCustomerSyncCategory({idList: Array.from(new Set([...syncIds, ...syncTreeActions.getExpandedKeys()]))}).then(res => {
resetMenu()
syncTreeActions.setSelectKeys([])
......
......@@ -7,6 +7,8 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { useLinkEnumEffect } from '@/components/NiceForm/linkages/linkEnum'
import { getManageCountryAreaGetTelCode } from '@/services/ManageV2Api'
import { postLogisticsReceiverAddressAgentAdd, postLogisticsReceiverAddressAgentUpdate } from '@/services/LogisticsV2Api'
import { getManageAreaAll } from '@/services/ManageV2Api/id8689'
import { message } from 'antd'
export interface AddressModalProps {
mode: 'add' | 'edit' | 'preview' | 'default',
......@@ -67,20 +69,24 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
const roleId = ctx.getFieldValue('buyerRoleId')
const memberId = ctx.getFieldValue('buyerMemberId')
const params = {
...value,
isDefault: Number(!!value.isDefault),
provinceName,
cityName,
districtName,
roleId,
memberId
if(roleId && memberId) {
const params = {
...value,
isDefault: Number(!!value.isDefault),
provinceName,
cityName,
districtName,
roleId,
memberId
}
const fn = mode === 'edit' ? postLogisticsReceiverAddressAgentUpdate : postLogisticsReceiverAddressAgentAdd
await fn(params)
resetForm()
props.currentRef.current.setVisible(false)
props.reloadAddress && props.reloadAddress()
} else {
message.error('请先选择采购会员')
}
const fn = mode === 'edit' ? postLogisticsReceiverAddressAgentUpdate : postLogisticsReceiverAddressAgentAdd
await fn(params)
resetForm()
props.currentRef.current.setVisible(false)
props.reloadAddress && props.reloadAddress()
}
return (
<ModalForm
......
......@@ -30,7 +30,7 @@ import FormDetailWrapper from '@/components/FormDetailWrapper'
import { useFormDetail } from '@/formSchema/effects/useFormDetail'
import moment from 'moment'
import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress, postLogisticsFreightTemplateCalFreightPrice } from '@/services/LogisticsV2Api'
import { getOrderBuyerCreateDetail, postOrderVendorCreateAgentOrder } from '@/services/OrderNewV2Api'
import { getOrderBuyerCreateDetail, postOrderBuyerValidateSubmitBatch, postOrderVendorCreateAgentOrder } from '@/services/OrderNewV2Api'
export interface AgentOrderDetailProps {}
......@@ -304,7 +304,7 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
params.shopName = shop['label']
if(id) {
// fnResult = await postOrderBuyerCreateB2bUpdate({..._params, orderId: id})
// fnResult = await postOrderBuyerCreateAgentOrderUpdate({..._params, orderId: id})
} else {
fnResult = await postOrderVendorCreateAgentOrder(_params)
}
......
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