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,60 +232,64 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => { ...@@ -232,60 +232,64 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<AuditProcess <AnchorPage.Item itemKey="verifySteps">
innerVerifySteps={dataSource?.taskSteps.map((item) => ({ <AuditProcess
step: item.step, innerVerifySteps={dataSource?.taskSteps.map((item) => ({
stepName: item.taskName, step: item.step,
roleName: item.roleName, stepName: item.taskName,
status: item.isExecute ? 'finish' : 'wait', roleName: item.roleName,
}))} status: item.isExecute ? 'finish' : 'wait',
innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)} }))}
id="verifySteps" innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<BacisInfo <AnchorPage.Item itemKey="basicInfo">
dataSource={{ <BacisInfo
id: dataSource?.id, dataSource={{
type: dataSource?.type, id: dataSource?.id,
typeName: dataSource?.typeName, type: dataSource?.type,
releaseTimeStart: dataSource?.releaseTimeStart, typeName: dataSource?.typeName,
releaseTimeEnd: dataSource?.releaseTimeEnd, releaseTimeStart: dataSource?.releaseTimeStart,
name: dataSource?.name, releaseTimeEnd: dataSource?.releaseTimeEnd,
denomination: dataSource?.denomination, name: dataSource?.name,
statusName: dataSource?.statusName, denomination: dataSource?.denomination,
quantity: dataSource?.quantity, statusName: dataSource?.statusName,
}} quantity: dataSource?.quantity,
id="basicInfo" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<CouponRules <AnchorPage.Item itemKey="couponRules">
dataSource={{ <CouponRules
getWay: dataSource?.getWay, dataSource={{
getWayName: dataSource?.getWayName, getWay: dataSource?.getWay,
effectiveTimeStart: dataSource?.effectiveTimeStart, getWayName: dataSource?.getWayName,
effectiveTimeEnd: dataSource?.effectiveTimeEnd, effectiveTimeStart: dataSource?.effectiveTimeStart,
invalidDay: dataSource?.invalidDay, effectiveTimeEnd: dataSource?.effectiveTimeEnd,
useConditionMoney: dataSource?.useConditionMoney, invalidDay: dataSource?.invalidDay,
useConditionDesc: dataSource?.useConditionDesc, useConditionMoney: dataSource?.useConditionMoney,
conditionGetDay: dataSource?.conditionGetDay as number, useConditionDesc: dataSource?.useConditionDesc,
conditionGetTotal: dataSource?.conditionGetTotal as number, conditionGetDay: dataSource?.conditionGetDay as number,
}} conditionGetTotal: dataSource?.conditionGetTotal as number,
id="couponRules" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 适用商城 */} {/* 适用商城 */}
<Col span={24}> <Col span={24}>
<ApplicableShopList <AnchorPage.Item itemKey="applicableShopList">
options={shopList} <ApplicableShopList
id="applicableShopList" options={shopList}
/> />
</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}>
<ApplicableGoods <AnchorPage.Item itemKey="applicableGoods">
dataSource={dataSource?.suitableCommoditySkuList!} <ApplicableGoods
id="applicableGoods" dataSource={dataSource?.suitableCommoditySkuList!}
/> />
</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}>
<ApplicableCategories <AnchorPage.Item itemKey="applicableCategories">
options={categories} <ApplicableCategories
id="applicableCategories" options={categories}
/> />
</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}>
<ApplicableBrands <AnchorPage.Item itemKey="applicableBrands">
options={brandList} <ApplicableBrands
id="applicableBrands" options={brandList}
/> />
</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}>
<ApplicableMember <AnchorPage.Item itemKey="applicableMember">
applicableMember={{ <ApplicableMember
suitableMemberTypes: dataSource?.suitableMemberTypes, applicableMember={{
memberTypes: dataSource?.memberTypes, suitableMemberTypes: dataSource?.suitableMemberTypes,
applicationMemberLevel: dataSource?.suitableMemberLevelTypes!.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })), memberTypes: dataSource?.memberTypes,
}} applicationMemberLevel: dataSource?.suitableMemberLevelTypes!.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })),
id="applicableMember" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<InnerFlowRecords <AnchorPage.Item itemKey="innerFlowRecords">
dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))} <InnerFlowRecords
id="innerFlowRecords" dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))}
/> />
</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,48 +114,51 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => { ...@@ -114,48 +114,51 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<BacisInfo <AnchorPage.Item itemKey="basicInfo">
dataSource={{ <BacisInfo
id: couponInfo?.id as number, dataSource={{
type: couponInfo?.type as number, id: couponInfo?.id as number,
typeName: couponInfo?.typeName as string, type: couponInfo?.type as number,
releaseTimeStart: couponInfo?.releaseTimeStart as number, typeName: couponInfo?.typeName as string,
releaseTimeEnd: couponInfo?.releaseTimeEnd as number, releaseTimeStart: couponInfo?.releaseTimeStart as number,
name: couponInfo?.name as string, releaseTimeEnd: couponInfo?.releaseTimeEnd as number,
denomination: couponInfo?.denomination as number, name: couponInfo?.name as string,
statusName: couponInfo?.statusName as string, denomination: couponInfo?.denomination as number,
quantity: couponInfo?.quantity as number, statusName: couponInfo?.statusName as string,
}} quantity: couponInfo?.quantity as number,
id="basicInfo" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<CouponRules <AnchorPage.Item itemKey="couponRules">
dataSource={{ <CouponRules
getWay: couponInfo?.getWay as number, dataSource={{
getWayName: couponInfo?.getWayName as string, getWay: couponInfo?.getWay as number,
effectiveTimeStart: couponInfo?.effectiveTimeStart as number, getWayName: couponInfo?.getWayName as string,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd as number, effectiveTimeStart: couponInfo?.effectiveTimeStart as number,
invalidDay: couponInfo?.invalidDay as number, effectiveTimeEnd: couponInfo?.effectiveTimeEnd as number,
useConditionMoney: couponInfo?.useConditionMoney as number, invalidDay: couponInfo?.invalidDay as number,
useConditionDesc: couponInfo?.useConditionDesc as string, useConditionMoney: couponInfo?.useConditionMoney as number,
conditionGetDay: couponInfo?.conditionGetDay as number, useConditionDesc: couponInfo?.useConditionDesc as string,
conditionGetTotal: couponInfo?.conditionGetTotal as number, conditionGetDay: couponInfo?.conditionGetDay as number,
}} conditionGetTotal: couponInfo?.conditionGetTotal as number,
id="couponRules" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 发券明细 */} {/* 发券明细 */}
<Col span={24}> <Col span={24}>
<DeliverCoupon <AnchorPage.Item itemKey="deliverCoupon">
memberList={couponInfo?.memberList as []} <DeliverCoupon
suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes as []} memberList={couponInfo?.memberList as []}
onChange={handleDeliverChange} suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes as []}
id="deliverCoupon" onChange={handleDeliverChange}
/> />
</AnchorPage.Item>
</Col> </Col>
</Row> </Row>
</AnchorPage> </AnchorPage>
......
...@@ -73,60 +73,64 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => { ...@@ -73,60 +73,64 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<AuditProcess <AnchorPage.Item itemKey="verifySteps">
innerVerifySteps={couponInfo?.taskSteps.map((item) => ({ <AuditProcess
step: item.step, innerVerifySteps={couponInfo?.taskSteps.map((item) => ({
stepName: item.taskName, step: item.step,
roleName: item.roleName, stepName: item.taskName,
status: item.isExecute ? 'finish' : 'wait', roleName: item.roleName,
}))} status: item.isExecute ? 'finish' : 'wait',
innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps as [])} }))}
id="verifySteps" innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps as [])}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 基本信息 */} {/* 基本信息 */}
<Col span={24}> <Col span={24}>
<BacisInfo <AnchorPage.Item itemKey="basicInfo">
dataSource={{ <BacisInfo
id: couponInfo?.id as number, dataSource={{
type: couponInfo?.type as number, id: couponInfo?.id as number,
typeName: couponInfo?.typeName as string, type: couponInfo?.type as number,
releaseTimeStart: couponInfo?.releaseTimeStart as number, typeName: couponInfo?.typeName as string,
releaseTimeEnd: couponInfo?.releaseTimeEnd as number, releaseTimeStart: couponInfo?.releaseTimeStart as number,
name: couponInfo?.name as string, releaseTimeEnd: couponInfo?.releaseTimeEnd as number,
denomination: couponInfo?.denomination as number, name: couponInfo?.name as string,
statusName: couponInfo?.statusName as string, denomination: couponInfo?.denomination as number,
quantity: couponInfo?.quantity as number, statusName: couponInfo?.statusName as string,
}} quantity: couponInfo?.quantity as number,
id="basicInfo" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<CouponRules <AnchorPage.Item itemKey="couponRules">
dataSource={{ <CouponRules
getWay: couponInfo?.getWay as number, dataSource={{
getWayName: couponInfo?.getWayName as string, getWay: couponInfo?.getWay as number,
effectiveTimeStart: couponInfo?.effectiveTimeStart as number, getWayName: couponInfo?.getWayName as string,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd as number, effectiveTimeStart: couponInfo?.effectiveTimeStart as number,
invalidDay: couponInfo?.invalidDay as number, effectiveTimeEnd: couponInfo?.effectiveTimeEnd as number,
useConditionMoney: couponInfo?.useConditionMoney as number, invalidDay: couponInfo?.invalidDay as number,
useConditionDesc: couponInfo?.useConditionDesc as string, useConditionMoney: couponInfo?.useConditionMoney as number,
conditionGetDay: couponInfo?.conditionGetDay as number, useConditionDesc: couponInfo?.useConditionDesc as string,
conditionGetTotal: couponInfo?.conditionGetTotal as number, conditionGetDay: couponInfo?.conditionGetDay as number,
}} conditionGetTotal: couponInfo?.conditionGetTotal as number,
id="couponRules" }}
/> />
</AnchorPage.Item>
</Col> </Col>
{/* 优惠券规则 */} {/* 优惠券规则 */}
<Col span={24}> <Col span={24}>
<RunningInfo <AnchorPage.Item itemKey="runningInfo">
couponId={+id} <RunningInfo
id="runningInfo" couponId={+id}
/> />
</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