Commit 66127fc0 authored by XieZhiXiong's avatar XieZhiXiong

chore: 替换 锚点项 组件

parent 4a0ad4b5
......@@ -6,12 +6,12 @@
* @Description: 适用品牌列表
*/
import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../../../components/ApplicableList';
import { useIntl} from 'umi'
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {}
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableCategories: React.FC<IProps> = (props) => {
const intl = useIntl();
......
......@@ -6,11 +6,11 @@
* @Description: 适用品类列表
*/
import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../../../components/ApplicableList';
import { useIntl} from 'umi'
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {}
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableCategories: React.FC<IProps> = (props) => {
const intl = useIntl();
......
......@@ -6,7 +6,7 @@
* @Description: 适用商品
*/
import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
import { normalizeUnitPrice } from '../../utils';
......@@ -51,7 +51,7 @@ export type ListItemDataType = {
},
}
interface IProps extends MellowCardProps {
interface IProps {
/**
* 数据
*/
......
......@@ -10,7 +10,7 @@ import {
SchemaForm,
SchemaMarkupField as Field,
} from '@formily/antd';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import TofuCheckGroup from '../../../components/FormilyFieldItem/TofuCheckGroup';
import MemberCheckboxGroup from '../../../components/FormilyFieldItem/MemberCheckboxGroup';
import { OptionItemType as MemberOptionItemType } from '../../../components/MemberCheckboxGroup';
......@@ -29,7 +29,7 @@ export type SuitableMemberType = {
name: string,
}
interface IProps extends MellowCardProps {
interface IProps {
/**
* 适用会员信息
*/
......
......@@ -6,11 +6,11 @@
* @Description: 适用商城列表
*/
import React from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import ApplicableList, { ApplicableListProps } from '../../../components/ApplicableList';
import { useIntl} from 'umi'
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'>, MellowCardProps {}
export interface IProps extends Pick<ApplicableListProps, 'options' | 'value'> {}
const ApplicableShopList: React.FC<IProps> = (props) => {
const intl = useIntl();
......
......@@ -230,60 +230,64 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
<Row gutter={[16, 16]}>
{/* 流转记录 */}
<Col span={24}>
<AuditProcess
innerVerifySteps={dataSource?.taskSteps.map((item) => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
}))}
innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)}
id="verifySteps"
/>
<AnchorPage.Item itemKey="verifySteps">
<AuditProcess
innerVerifySteps={dataSource?.taskSteps.map((item) => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
}))}
innerVerifyCurrent={findLastIndexFlowState(dataSource?.taskSteps)}
/>
</AnchorPage.Item>
</Col>
{/* 基本信息 */}
<Col span={24}>
<BacisInfo
dataSource={{
id: dataSource?.id,
type: dataSource?.type,
typeName: dataSource?.typeName,
releaseTimeStart: dataSource?.releaseTimeStart,
releaseTimeEnd: dataSource?.releaseTimeEnd,
name: dataSource?.name,
denomination: dataSource?.denomination,
statusName: dataSource?.statusName,
quantity: dataSource?.quantity,
}}
id="basicInfo"
/>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo
dataSource={{
id: dataSource?.id,
type: dataSource?.type,
typeName: dataSource?.typeName,
releaseTimeStart: dataSource?.releaseTimeStart,
releaseTimeEnd: dataSource?.releaseTimeEnd,
name: dataSource?.name,
denomination: dataSource?.denomination,
statusName: dataSource?.statusName,
quantity: dataSource?.quantity,
}}
/>
</AnchorPage.Item>
</Col>
{/* 优惠券规则 */}
<Col span={24}>
<CouponRules
dataSource={{
getWay: dataSource?.getWay,
getWayName: dataSource?.getWayName,
effectiveTimeStart: dataSource?.effectiveTimeStart,
effectiveTimeEnd: dataSource?.effectiveTimeEnd,
invalidDay: dataSource?.invalidDay,
useConditionMoney: dataSource?.useConditionMoney,
useConditionDesc: dataSource?.useConditionDesc,
conditionGetDay: dataSource?.conditionGetDay,
conditionGetTotal: dataSource?.conditionGetTotal,
}}
id="couponRules"
/>
<AnchorPage.Item itemKey="couponRules">
<CouponRules
dataSource={{
getWay: dataSource?.getWay,
getWayName: dataSource?.getWayName,
effectiveTimeStart: dataSource?.effectiveTimeStart,
effectiveTimeEnd: dataSource?.effectiveTimeEnd,
invalidDay: dataSource?.invalidDay,
useConditionMoney: dataSource?.useConditionMoney,
useConditionDesc: dataSource?.useConditionDesc,
conditionGetDay: dataSource?.conditionGetDay,
conditionGetTotal: dataSource?.conditionGetTotal,
}}
/>
</AnchorPage.Item>
</Col>
{/* 适用商城 */}
<Col span={24}>
<ApplicableShopList
options={shopList}
id="applicableShopList"
/>
<AnchorPage.Item itemKey="applicableShopList">
<ApplicableShopList
options={shopList}
/>
</AnchorPage.Item>
</Col>
{/* 适用商品 */}
......@@ -293,10 +297,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
|| dataSource?.type === MERCHANT_COUPON_TYPE_VOUCHER
? (
<Col span={24}>
<ApplicableGoods
dataSource={dataSource?.suitableCommoditySkuList}
id="applicableGoods"
/>
<AnchorPage.Item itemKey="applicableGoods">
<ApplicableGoods
dataSource={dataSource?.suitableCommoditySkuList}
/>
</AnchorPage.Item>
</Col>
)
: null
......@@ -309,10 +314,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
dataSource?.type === MERCHANT_COUPON_TYPE_CATEGORY
? (
<Col span={24}>
<ApplicableCategories
options={categories}
id="applicableCategories"
/>
<AnchorPage.Item itemKey="applicableCategories">
<ApplicableCategories
options={categories}
/>
</AnchorPage.Item>
</Col>
)
: null
......@@ -325,10 +331,11 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
dataSource?.type === MERCHANT_COUPON_TYPE_BRAND
? (
<Col span={24}>
<ApplicableBrands
options={brandList}
id="applicableBrands"
/>
<AnchorPage.Item itemKey="applicableBrands">
<ApplicableBrands
options={brandList}
/>
</AnchorPage.Item>
</Col>
)
: null
......@@ -337,21 +344,23 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
{/* 适用用户 */}
<Col span={24}>
<ApplicableMember
applicableMember={{
suitableMemberTypes: dataSource?.suitableMemberTypes,
applicationMemberLevel: dataSource?.suitableMemberLevelTypes.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })),
}}
id="applicableMember"
/>
<AnchorPage.Item itemKey="applicableMember">
<ApplicableMember
applicableMember={{
suitableMemberTypes: dataSource?.suitableMemberTypes,
applicationMemberLevel: dataSource?.suitableMemberLevelTypes.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })),
}}
/>
</AnchorPage.Item>
</Col>
{/* 流转记录 */}
<Col span={24}>
<InnerFlowRecords
dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))}
id="innerFlowRecords"
/>
<AnchorPage.Item itemKey="innerFlowRecords">
<InnerFlowRecords
dataSource={dataSource?.history.map((item, index) => ({ ...item, id: index }))}
/>
</AnchorPage.Item>
</Col>
</Row>
</AnchorPage>
......
......@@ -21,7 +21,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import PolymericTable, { FetchParamsType } from '@/components/PolymericTable';
import { querySchema, drawerSchema } from './schema';
import { postMemberManageMarketingSuitablePage, postMemberManageMarketingSuitablePageItems } from '@/services/MemberV2Api';
......@@ -85,7 +85,7 @@ type MemberListItemType = {
roleId: number,
}
interface IProps extends Omit<MellowCardProps, 'onChange'> {
interface IProps {
/**
* 适用会员等级类型
*/
......
......@@ -56,10 +56,6 @@ export interface IProps {
* 数据源
*/
dataSource: FlowItem[],
/**
* id
*/
id: any,
}
const InnerFlowRecords: React.FC<IProps> = (props) => {
......
......@@ -15,7 +15,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import NiceForm from '@/components/NiceForm';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import MellowCard from '@/components/MellowCard';
import { querySchema } from './schema';
import { getMarketingCouponWaiteExecuteDetailPage, getMarketingCouponWaiteExecuteDetailPageCondition } from '@/services/MarketingV2Api';
import { useIntl} from 'umi'
......@@ -111,7 +111,7 @@ export type FetchExtraParams = {
shopId: number,
}
interface IProps extends MellowCardProps {
interface IProps {
/**
* 优惠券id
*/
......
......@@ -114,48 +114,51 @@ const MerchantCouponAnalysisDeliver: React.FC<{}> = () => {
<Row gutter={[16, 16]}>
{/* 基本信息 */}
<Col span={24}>
<BacisInfo
dataSource={{
id: couponInfo?.id,
type: couponInfo?.type,
typeName: couponInfo?.typeName,
releaseTimeStart: couponInfo?.releaseTimeStart,
releaseTimeEnd: couponInfo?.releaseTimeEnd,
name: couponInfo?.name,
denomination: couponInfo?.denomination,
statusName: couponInfo?.statusName,
quantity: couponInfo?.quantity,
}}
id="basicInfo"
/>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo
dataSource={{
id: couponInfo?.id,
type: couponInfo?.type,
typeName: couponInfo?.typeName,
releaseTimeStart: couponInfo?.releaseTimeStart,
releaseTimeEnd: couponInfo?.releaseTimeEnd,
name: couponInfo?.name,
denomination: couponInfo?.denomination,
statusName: couponInfo?.statusName,
quantity: couponInfo?.quantity,
}}
/>
</AnchorPage.Item>
</Col>
{/* 优惠券规则 */}
<Col span={24}>
<CouponRules
dataSource={{
getWay: couponInfo?.getWay,
getWayName: couponInfo?.getWayName,
effectiveTimeStart: couponInfo?.effectiveTimeStart,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd,
invalidDay: couponInfo?.invalidDay,
useConditionMoney: couponInfo?.useConditionMoney,
useConditionDesc: couponInfo?.useConditionDesc,
conditionGetDay: couponInfo?.conditionGetDay,
conditionGetTotal: couponInfo?.conditionGetTotal,
}}
id="couponRules"
/>
<AnchorPage.Item itemKey="couponRules">
<CouponRules
dataSource={{
getWay: couponInfo?.getWay,
getWayName: couponInfo?.getWayName,
effectiveTimeStart: couponInfo?.effectiveTimeStart,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd,
invalidDay: couponInfo?.invalidDay,
useConditionMoney: couponInfo?.useConditionMoney,
useConditionDesc: couponInfo?.useConditionDesc,
conditionGetDay: couponInfo?.conditionGetDay,
conditionGetTotal: couponInfo?.conditionGetTotal,
}}
/>
</AnchorPage.Item>
</Col>
{/* 发券明细 */}
<Col span={24}>
<DeliverCoupon
memberList={couponInfo?.memberList}
suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes}
onChange={handleDeliverChange}
id="deliverCoupon"
/>
<AnchorPage.Item itemKey="deliverCoupon">
<DeliverCoupon
memberList={couponInfo?.memberList}
suitableMemberLevelTypes={couponInfo?.suitableMemberLevelTypes}
onChange={handleDeliverChange}
/>
</AnchorPage.Item>
</Col>
</Row>
</AnchorPage>
......
......@@ -76,60 +76,65 @@ const MerchantCouponAnalysisDetail: React.FC<{}> = () => {
<Row gutter={[16, 16]}>
{/* 流转记录 */}
<Col span={24}>
<AuditProcess
innerVerifySteps={couponInfo?.taskSteps.map((item) => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
}))}
innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps)}
id="verifySteps"
/>
<AnchorPage.Item itemKey="verifySteps">
<AuditProcess
innerVerifySteps={couponInfo?.taskSteps.map((item) => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
}))}
innerVerifyCurrent={findLastIndexFlowState(couponInfo?.taskSteps)}
id="verifySteps"
/>
</AnchorPage.Item>
</Col>
{/* 基本信息 */}
<Col span={24}>
<BacisInfo
dataSource={{
id: couponInfo?.id,
type: couponInfo?.type,
typeName: couponInfo?.typeName,
releaseTimeStart: couponInfo?.releaseTimeStart,
releaseTimeEnd: couponInfo?.releaseTimeEnd,
name: couponInfo?.name,
denomination: couponInfo?.denomination,
statusName: couponInfo?.statusName,
quantity: couponInfo?.quantity,
}}
id="basicInfo"
/>
<AnchorPage.Item itemKey="basicInfo">
<BacisInfo
dataSource={{
id: couponInfo?.id,
type: couponInfo?.type,
typeName: couponInfo?.typeName,
releaseTimeStart: couponInfo?.releaseTimeStart,
releaseTimeEnd: couponInfo?.releaseTimeEnd,
name: couponInfo?.name,
denomination: couponInfo?.denomination,
statusName: couponInfo?.statusName,
quantity: couponInfo?.quantity,
}}
/>
</AnchorPage.Item>
</Col>
{/* 优惠券规则 */}
<Col span={24}>
<CouponRules
dataSource={{
getWay: couponInfo?.getWay,
getWayName: couponInfo?.getWayName,
effectiveTimeStart: couponInfo?.effectiveTimeStart,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd,
invalidDay: couponInfo?.invalidDay,
useConditionMoney: couponInfo?.useConditionMoney,
useConditionDesc: couponInfo?.useConditionDesc,
conditionGetDay: couponInfo?.conditionGetDay,
conditionGetTotal: couponInfo?.conditionGetTotal,
}}
id="couponRules"
/>
<AnchorPage.Item itemKey="couponRules">
<CouponRules
dataSource={{
getWay: couponInfo?.getWay,
getWayName: couponInfo?.getWayName,
effectiveTimeStart: couponInfo?.effectiveTimeStart,
effectiveTimeEnd: couponInfo?.effectiveTimeEnd,
invalidDay: couponInfo?.invalidDay,
useConditionMoney: couponInfo?.useConditionMoney,
useConditionDesc: couponInfo?.useConditionDesc,
conditionGetDay: couponInfo?.conditionGetDay,
conditionGetTotal: couponInfo?.conditionGetTotal,
}}
/>
</AnchorPage.Item>
</Col>
{/* 优惠券规则 */}
<Col span={24}>
<RunningInfo
couponId={+id}
id="runningInfo"
/>
<AnchorPage.Item itemKey="runningInfo">
<RunningInfo
couponId={+id}
/>
</AnchorPage.Item>
</Col>
</Row>
</AnchorPage>
......
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