Commit 81c8a0ce authored by XieZhiXiong's avatar XieZhiXiong

chore: 替换 锚点项 组件

parent dacd052c
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @Description: 适用品牌列表 * @Description: 适用品牌列表
*/ */
import React from 'react'; import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../ApplicableList'; import ApplicableList, { ApplicableListProps } from '../ApplicableList';
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {} export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableCategories: React.FC<IProps> = (props) => { const ApplicableCategories: React.FC<IProps> = (props) => {
const { const {
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @Description: 适用品类列表 * @Description: 适用品类列表
*/ */
import React from 'react'; import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../ApplicableList'; import ApplicableList, { ApplicableListProps } from '../ApplicableList';
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {} export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableCategories: React.FC<IProps> = (props) => { const ApplicableCategories: React.FC<IProps> = (props) => {
const { const {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @Description: 适用商品 * @Description: 适用商品
*/ */
import React from 'react'; import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable'; import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface'; import { EditableColumns } from '@/components/PolymericTable/interface';
import { normalizeUnitPrice } from '../../utils'; import { normalizeUnitPrice } from '../../utils';
...@@ -49,7 +49,7 @@ export type ListItemDataType = { ...@@ -49,7 +49,7 @@ export type ListItemDataType = {
}, },
} }
interface IProps extends MellowCardProps { interface IProps {
/** /**
* 数据 * 数据
*/ */
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
SchemaForm, SchemaForm,
SchemaMarkupField as Field, SchemaMarkupField as Field,
} from '@formily/antd'; } from '@formily/antd';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import TofuCheckGroup from '../FormilyFieldItem/TofuCheckGroup'; import TofuCheckGroup from '../FormilyFieldItem/TofuCheckGroup';
import MemberCheckboxGroup from '../FormilyFieldItem/MemberCheckboxGroup'; import MemberCheckboxGroup from '../FormilyFieldItem/MemberCheckboxGroup';
import { OptionItemType as MemberOptionItemType } from '../MemberCheckboxGroup'; import { OptionItemType as MemberOptionItemType } from '../MemberCheckboxGroup';
...@@ -28,7 +28,7 @@ export type SuitableMemberType = { ...@@ -28,7 +28,7 @@ export type SuitableMemberType = {
name: string, name: string,
} }
interface IProps extends MellowCardProps { interface IProps {
/** /**
* 适用会员信息 * 适用会员信息
*/ */
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @Description: 适用商城列表 * @Description: 适用商城列表
*/ */
import React from 'react'; import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../ApplicableList'; import ApplicableList, { ApplicableListProps } from '../ApplicableList';
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {} export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableShopList: React.FC<IProps> = (props) => { const ApplicableShopList: React.FC<IProps> = (props) => {
const { const {
......
...@@ -208,7 +208,7 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -208,7 +208,7 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
key: 'innerFlowRecords', key: 'innerFlowRecords',
name: '单据流转记录', name: '单据流转记录',
}, },
].filter(Boolean); ].filter(Boolean) as any;
const categories = useMemo(() => { const categories = useMemo(() => {
return normalizeCategoryList(dataSource?.suitableCategoryList!); return normalizeCategoryList(dataSource?.suitableCategoryList!);
...@@ -232,6 +232,7 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -232,6 +232,7 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="verifySteps">
<AuditProcess <AuditProcess
innerVerifySteps={dataSource?.taskSteps.map((item) => ({ innerVerifySteps={dataSource?.taskSteps.map((item) => ({
step: item.step, step: item.step,
...@@ -240,12 +241,13 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -240,12 +241,13 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
status: item.isExecute ? 'finish' : 'wait', status: item.isExecute ? 'finish' : 'wait',
}))} }))}
innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)} innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)}
id="verifySteps"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo <BacisInfo
dataSource={{ dataSource={{
id: dataSource?.id, id: dataSource?.id,
...@@ -258,12 +260,13 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -258,12 +260,13 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
statusName: dataSource?.statusName, statusName: dataSource?.statusName,
quantity: dataSource?.quantity, quantity: dataSource?.quantity,
}} }}
id="basicInfo"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="couponRules">
<CouponRules <CouponRules
dataSource={{ dataSource={{
getWay: dataSource?.getWay, getWay: dataSource?.getWay,
...@@ -276,16 +279,17 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -276,16 +279,17 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
conditionGetDay: dataSource?.conditionGetDay as number, conditionGetDay: dataSource?.conditionGetDay as number,
conditionGetTotal: dataSource?.conditionGetTotal as number, conditionGetTotal: dataSource?.conditionGetTotal as number,
}} }}
id="couponRules"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 适用商城 */} {/* 适用商城 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="applicableShopList">
<ApplicableShopList <ApplicableShopList
options={shopList} options={shopList}
id="applicableShopList"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 适用商品 */} {/* 适用商品 */}
...@@ -295,10 +299,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -295,10 +299,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
|| dataSource?.type === MERCHANT_COUPON_TYPE_VOUCHER || dataSource?.type === MERCHANT_COUPON_TYPE_VOUCHER
? ( ? (
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="applicableGoods">
<ApplicableGoods <ApplicableGoods
dataSource={dataSource?.suitableCommoditySkuList!} dataSource={dataSource?.suitableCommoditySkuList!}
id="applicableGoods"
/> />
</AnchorPage.Item>
</Col> </Col>
) )
: null : null
...@@ -311,10 +316,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -311,10 +316,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
dataSource?.type === MERCHANT_COUPON_TYPE_CATEGORY dataSource?.type === MERCHANT_COUPON_TYPE_CATEGORY
? ( ? (
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="applicableCategories">
<ApplicableCategories <ApplicableCategories
options={categories} options={categories}
id="applicableCategories"
/> />
</AnchorPage.Item>
</Col> </Col>
) )
: null : null
...@@ -327,10 +333,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -327,10 +333,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
dataSource?.type === MERCHANT_COUPON_TYPE_BRAND dataSource?.type === MERCHANT_COUPON_TYPE_BRAND
? ( ? (
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="applicableBrands">
<ApplicableBrands <ApplicableBrands
options={brandList} options={brandList}
id="applicableBrands"
/> />
</AnchorPage.Item>
</Col> </Col>
) )
: null : null
...@@ -339,22 +346,24 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -339,22 +346,24 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
{/* 适用用户 */} {/* 适用用户 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="applicableMember">
<ApplicableMember <ApplicableMember
applicableMember={{ applicableMember={{
suitableMemberTypes: dataSource?.suitableMemberTypes, suitableMemberTypes: dataSource?.suitableMemberTypes,
memberTypes: dataSource?.memberTypes, memberTypes: dataSource?.memberTypes,
applicationMemberLevel: dataSource?.suitableMemberLevelTypes!.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })), applicationMemberLevel: dataSource?.suitableMemberLevelTypes!.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })),
}} }}
id="applicableMember"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="innerFlowRecords">
<InnerFlowRecords <InnerFlowRecords
dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))} dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))}
id="innerFlowRecords"
/> />
</AnchorPage.Item>
</Col> </Col>
</Row> </Row>
</AnchorPage> </AnchorPage>
......
...@@ -21,7 +21,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte ...@@ -21,7 +21,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'; import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import PolymericTable, { FetchParamsType } from '@/components/PolymericTable'; import PolymericTable, { FetchParamsType } from '@/components/PolymericTable';
import { querySchema, drawerSchema } from './schema'; import { querySchema, drawerSchema } from './schema';
import { postMemberManagePlatformMarketingSuitablePage, postMemberManagePlatformMarketingSuitablePageItems } from '@/services/MemberV2Api'; import { postMemberManagePlatformMarketingSuitablePage, postMemberManagePlatformMarketingSuitablePageItems } from '@/services/MemberV2Api';
...@@ -84,7 +84,7 @@ type MemberListItemType = { ...@@ -84,7 +84,7 @@ type MemberListItemType = {
roleId: number, roleId: number,
} }
interface IProps extends Omit<MellowCardProps, 'onChange'> { interface IProps {
/** /**
* 适用会员等级类型 * 适用会员等级类型
*/ */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @LastEditTime: 2021-09-26 14:54:19 * @LastEditTime: 2021-09-26 14:54:19
* @Description: 内部流转记录 * @Description: 内部流转记录
*/ */
import React, { HTMLAttributes } from 'react'; import React from 'react';
import { Badge } from 'antd'; import { Badge } from 'antd';
import moment from 'moment'; import moment from 'moment';
import FlowRecords from '@/components/FlowRecords'; import FlowRecords from '@/components/FlowRecords';
...@@ -50,7 +50,7 @@ export type FlowItem = { ...@@ -50,7 +50,7 @@ export type FlowItem = {
remark: string remark: string
} }
export interface IProps extends HTMLAttributes<HTMLDivElement> { export interface IProps {
/** /**
* 数据源 * 数据源
*/ */
......
...@@ -14,7 +14,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte ...@@ -14,7 +14,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'; import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import { querySchema } from './schema'; import { querySchema } from './schema';
import moment from 'moment'; import moment from 'moment';
import { import {
...@@ -113,7 +113,7 @@ export type FetchExtraParams = { ...@@ -113,7 +113,7 @@ export type FetchExtraParams = {
shopId: number, shopId: number,
} }
interface IProps extends MellowCardProps { interface IProps {
/** /**
* 优惠券id * 优惠券id
*/ */
......
...@@ -114,6 +114,7 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => { ...@@ -114,6 +114,7 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo <BacisInfo
dataSource={{ dataSource={{
id: couponInfo?.id as number, id: couponInfo?.id as number,
...@@ -126,12 +127,13 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => { ...@@ -126,12 +127,13 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => {
statusName: couponInfo?.statusName as string, statusName: couponInfo?.statusName as string,
quantity: couponInfo?.quantity as number, quantity: couponInfo?.quantity as number,
}} }}
id="basicInfo"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="couponRules">
<CouponRules <CouponRules
dataSource={{ dataSource={{
getWay: couponInfo?.getWay as number, getWay: couponInfo?.getWay as number,
...@@ -144,18 +146,19 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => { ...@@ -144,18 +146,19 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => {
conditionGetDay: couponInfo?.conditionGetDay as number, conditionGetDay: couponInfo?.conditionGetDay as number,
conditionGetTotal: couponInfo?.conditionGetTotal as number, conditionGetTotal: couponInfo?.conditionGetTotal as number,
}} }}
id="couponRules"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 发券明细 */} {/* 发券明细 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="deliverCoupon">
<DeliverCoupon <DeliverCoupon
memberList={couponInfo?.memberList as []} memberList={couponInfo?.memberList as []}
suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes as []} suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes as []}
onChange={handleDeliverChange} onChange={handleDeliverChange}
id="deliverCoupon"
/> />
</AnchorPage.Item>
</Col> </Col>
</Row> </Row>
</AnchorPage> </AnchorPage>
......
...@@ -73,6 +73,7 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => { ...@@ -73,6 +73,7 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="verifySteps">
<AuditProcess <AuditProcess
innerVerifySteps={couponInfo?.taskSteps.map((item) => ({ innerVerifySteps={couponInfo?.taskSteps.map((item) => ({
step: item.step, step: item.step,
...@@ -81,12 +82,13 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => { ...@@ -81,12 +82,13 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
status: item.isExecute ? 'finish' : 'wait', status: item.isExecute ? 'finish' : 'wait',
}))} }))}
innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps as [])} innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps as [])}
id="verifySteps"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo <BacisInfo
dataSource={{ dataSource={{
id: couponInfo?.id as number, id: couponInfo?.id as number,
...@@ -99,12 +101,13 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => { ...@@ -99,12 +101,13 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
statusName: couponInfo?.statusName as string, statusName: couponInfo?.statusName as string,
quantity: couponInfo?.quantity as number, quantity: couponInfo?.quantity as number,
}} }}
id="basicInfo"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="couponRules">
<CouponRules <CouponRules
dataSource={{ dataSource={{
getWay: couponInfo?.getWay as number, getWay: couponInfo?.getWay as number,
...@@ -117,16 +120,17 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => { ...@@ -117,16 +120,17 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
conditionGetDay: couponInfo?.conditionGetDay as number, conditionGetDay: couponInfo?.conditionGetDay as number,
conditionGetTotal: couponInfo?.conditionGetTotal as number, conditionGetTotal: couponInfo?.conditionGetTotal as number,
}} }}
id="couponRules"
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<AnchorPage.Item itemKey="runningInfo">
<RunningInfo <RunningInfo
couponId={+id} couponId={+id}
id="runningInfo"
/> />
</AnchorPage.Item>
</Col> </Col>
</Row> </Row>
</AnchorPage> </AnchorPage>
......
...@@ -240,7 +240,7 @@ const CouponForm: React.FC<IProps> = (props) => { ...@@ -240,7 +240,7 @@ const CouponForm: React.FC<IProps> = (props) => {
key: 'applicableMember', key: 'applicableMember',
name: '适用用户', name: '适用用户',
}, },
].filter(Boolean); ].filter(Boolean) as any;
// 删除商品项 // 删除商品项
const handleRemoveItem = (index: number) => { const handleRemoveItem = (index: number) => {
......
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