Commit 1340a815 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents a18ff28e b60655b3
......@@ -2,19 +2,30 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 10:28:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-17 15:48:16
* @LastEditTime: 2021-11-18 11:14:29
* @Description: 地址选择 FormItem
*/
import React, { useState, useEffect, useMemo, useRef } from 'react';
import { Select, Button, Drawer, Divider, message } from 'antd';
import { PublicApi } from '@/services/api';
import { GetLogisticsShipperAddressGetResponse, GetLogisticsReceiverAddressGetResponse } from '@/services/LogisticsApi';
import {
createFormActions,
FormEffectHooks,
FormPath,
} from '@formily/antd';
import { IRequestSuccess } from '@/index';
import {
getLogisticsReceiverAddressGet,
GetLogisticsReceiverAddressGetResponse,
getLogisticsSelectListReceiverAddress,
getLogisticsSelectListShipperAddress,
getLogisticsShipperAddressGet,
GetLogisticsShipperAddressGetResponse,
postLogisticsReceiverAddressAdd,
postLogisticsReceiverAddressUpdate,
postLogisticsShipperAddressAdd,
postLogisticsShipperAddressUpdate,
} from '@/services/LogisticsV2Api';
import { getManageCountryAreaGetTelCode, getManageAreaAll } from '@/services/ManageV2Api';
import { useLinkEnumEffect } from '@/components/NiceForm/linkages/linkEnum';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import NiceForm from '@/components/NiceForm';
......@@ -24,6 +35,7 @@ import { AddressItemType, AddressValueType } from './components/AddressRadioGrou
import AddressRadioGroup from './components/AddressRadioGroupFormilyItem';
import styles from './index.less';
const formActions = createFormActions();
const {
onFormInit$,
......@@ -140,7 +152,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
};
const getAddressList = () => {
const fetchAction = addressType === 2 ? PublicApi.getLogisticsSelectListShipperAddress() : PublicApi.getLogisticsSelectListReceiverAddress();
const fetchAction = addressType === 2 ? getLogisticsSelectListShipperAddress() : getLogisticsSelectListReceiverAddress();
fetchAction.then((res: IRequestSuccess<AddressItemType[]>) => {
if (res.code === 1000) {
......@@ -186,7 +198,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
// 获取手机code
const fetchTelCode = async () => {
const { data, code } = await PublicApi.getManageCountryAreaGetTelCode();
const { data, code } = await getManageCountryAreaGetTelCode();
if (code === 1000) {
return data;
}
......@@ -255,11 +267,11 @@ const AddressSelect: React.FC<IProps> = (props) => {
try {
setSubmitLoading(true);
const addRes = addressType === 2
? await PublicApi.postLogisticsShipperAddressAdd({
? await postLogisticsShipperAddressAdd({
...commonPayload,
shipperName: name,
})
: await PublicApi.postLogisticsReceiverAddressAdd({
: await postLogisticsReceiverAddressAdd({
...commonPayload,
receiverName: name,
});
......@@ -300,12 +312,12 @@ const AddressSelect: React.FC<IProps> = (props) => {
try {
setSubmitLoading(true);
const addRes = addressType === 2
? await PublicApi.postLogisticsShipperAddressUpdate({
? await postLogisticsShipperAddressUpdate({
...commonPayload,
id: editAddressId.current,
shipperName: name,
})
: await PublicApi.postLogisticsReceiverAddressUpdate({
: await postLogisticsReceiverAddressUpdate({
...commonPayload,
id: editAddressId.current,
receiverName: name,
......@@ -383,7 +395,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
FormPath.setIn(targetState, 'props.x-props.hasFeedback', true);
FormPath.setIn(targetState, 'loading', true);
});
const areaRes = await PublicApi.getManageAreaAll();
const areaRes = await getManageAreaAll();
formActions.setFieldState('provinceCode', targetState => {
FormPath.setIn(targetState, 'loading', false);
......@@ -424,7 +436,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
FormPath.setIn(targetState, 'props.x-props.hasFeedback', true);
FormPath.setIn(targetState, 'loading', true);
});
const areaRes = await PublicApi.getManageAreaAll();
const areaRes = await getManageAreaAll();
formActions.setFieldState('provinceCode', targetState => {
FormPath.setIn(targetState, 'loading', false);
......@@ -442,7 +454,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
value: v.code,
})));
});
const res = addressType === 2 ? await PublicApi.getLogisticsShipperAddressGet({ id: `${id}` }) : await PublicApi.getLogisticsReceiverAddressGet({ id: `${id}` });
const res = addressType === 2 ? await getLogisticsShipperAddressGet({ id: `${id}` }) : await getLogisticsReceiverAddressGet({ id: `${id}` });
if (res.code === 1000) {
formActions.setFieldValue('name', addressType === 2 ? (res.data as GetLogisticsShipperAddressGetResponse).shipperName : (res.data as GetLogisticsReceiverAddressGetResponse).receiverName);
formActions.setFieldValue('provinceCode', res.data.provinceCode, true);
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:05:46
* @LastEditTime: 2021-11-18 11:07:50
* @Description: 审核Form抽屉
*/
import React, { useEffect } from 'react';
......@@ -18,12 +18,12 @@ import {
FormPath,
} from '@formily/antd';
import { getMemberDepositClassifyCity, getMemberDepositClassifyProvince } from '@/services/MemberV2Api';
import { getProductCustomerGetCustomerCategoryTree } from '@/services/ProductV2Api';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { ArrayCards } from '@formily/antd-components';
import { schema } from './schema';
import CascaderFormItem from '../../../components/CascaderFormItem';
import styles from './index.less';
// import { getProductCustomerGetCustomerCategoryTree } from '@/services/ProductApi';
type CategoriesType = {
/**
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:15:51
* @LastEditTime: 2021-11-18 11:09:06
* @Description: 申请会员
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -22,7 +22,12 @@ import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm';
import MellowCard from '@/components/MellowCard';
import NoData from '@/components/NoData';
import { getMemberAbilityInfoApplyDepositDetail, getMemberAbilityInfoDepositDetail, postMemberAbilityInfoApply, postMemberAbilityInfoDepositDetailUpdate } from '@/services/MemberV2Api';
import {
getMemberAbilityInfoApplyDepositDetail,
getMemberAbilityInfoDepositDetail,
postMemberAbilityInfoApply,
postMemberAbilityInfoDepositDetailUpdate,
} from '@/services/MemberV2Api';
import { getManageContentNoticeFindAllByColumnType } from '@/services/ManageV2Api';
import { normalizeFiledata, FileData } from '@/utils';
import schema, { GroupItem } from './schema';
......@@ -244,7 +249,6 @@ const MemberQueryApplyMember: React.FC<RouteComponentProps> = (props: any) => {
} else {
postMemberAbilityInfoDepositDetailUpdate({
validateId: validateId as number,
validateId: validateId as number,
detail: step3,
...commonPayload,
}).then(res => {
......
......@@ -119,13 +119,13 @@ export const GeneralEffect = (int, data) => {
{data.ladderList.map(item => (<div>{`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>}
{(int === 4 && data.type === 2) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value} 折`}</div>))}
{data.ladderList.map(item => (<div>{`满 ${item.key} 个, 打 ${item.value / 10} 折`}</div>))}
</Space>}
{(int === 5 && data.type === 1) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`}</div>))}
</Space>}
{(int === 5 && data.type === 2) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value} 折`}</div>))}
{data.ladderList.map(item => (<div>{`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value / 10} 折`}</div>))}
</Space>}
</>
},
......@@ -191,7 +191,7 @@ export const GeneralEffect = (int, data) => {
col: [
{
label: '优惠规则', extra: <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`满 ${item.discount} 件, 打 ${item.num} 折`}</div>))}
{data.ladderList.map(item => (<div>{`满 ${item.discount} 件, 打 ${item.num / 10} 折`}</div>))}
</Space>
},
{
......
......@@ -15,7 +15,7 @@ import DemandLayout from '../../components/demandLayout';
import { isEmpty } from 'lodash';
import { SaveOutlined } from '@ant-design/icons';
import ProductListLayout from '../../components/productListLayout';
import { getMarketingPlatformActivitySignupDetail, postMarketingPlatformActivitySignupGetFilterSkuId, postMarketingPlatformActivitySignupSave, postMarketingPlatformActivitySignupUpdate } from '@/services/MarketingV2Api';
import { getMarketingPlatformActivitySignupDetail, getMarketingPlatformActivitySignupDetailGoodsPage, postMarketingPlatformActivitySignupGetFilterSkuId, postMarketingPlatformActivitySignupSave, postMarketingPlatformActivitySignupUpdate } from '@/services/MarketingV2Api';
const TABLINK = [
{ id: 'progressLayout', title: '流转进度' },
......
......@@ -21,7 +21,7 @@ import ListModalLayout from '../../components/listModalLayout';
import CouponsListLayout from '../../components/couponsListLayout';
import { remindLayout, RemindLayoutProps } from '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/components/productListLayout/remind';
import PrizeList from './prizeList';
import { getMarketingMerchantActivityDetail, postMarketingMerchantActivityExamineStep1, postMarketingMerchantActivityExamineStep2 } from '@/services/MarketingV2Api';
import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, postMarketingMerchantActivityExamineStep1, postMarketingMerchantActivityExamineStep2 } from '@/services/MarketingV2Api';
const DetialLayout = () => {
const { query: { id }, pathname } = history.location;
......
......@@ -11,7 +11,7 @@ import ProductListLayout from '../../components/productListLayout';
import PartakeUserLayout from './components/partakeUserLayout';
import PrizeListLayout from './components/prizeListLayout';
import moment from 'moment';
import { getMarketingMerchantActivityDetail, postMarketingMerchantActivityGetFilterSkuId, postMarketingMerchantActivitySave, postMarketingMerchantActivityUpdate } from '@/services/MarketingV2Api';
import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, postMarketingMerchantActivityGetFilterSkuId, postMarketingMerchantActivitySave, postMarketingMerchantActivityUpdate } from '@/services/MarketingV2Api';
const layout: any = {
colon: 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