Commit d89178ae authored by XieZhiXiong's avatar XieZhiXiong

chore: 完善展示

parent 3ba086a5
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-02 16:56:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 09:48:34
* @LastEditTime: 2021-09-23 16:40:12
* @Description: 适用用户
*/
import React, { useMemo } from 'react';
......@@ -17,6 +17,16 @@ import { OptionItemType as MemberOptionItemType } from '../MemberCheckboxGroup';
import ApplicableList from '../FormilyFieldItem/ApplicableList';
export type ApplicationMemberLevelType = Omit<MemberOptionItemType, 'value'> & { id: string }
export type SuitableMemberType = {
/**
* 值
*/
value: number,
/**
* 名称
*/
name: string,
}
interface IProps extends MellowCardProps {
/**
......@@ -26,7 +36,7 @@ interface IProps extends MellowCardProps {
/**
* 适用用户
*/
suitableMemberTypes: {}[],
suitableMemberTypes: SuitableMemberType[],
/**
* 适用用户列表
*/
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-25 17:23:30
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-17 14:33:06
* @LastEditTime: 2021-09-23 16:41:28
* @Description: 商家优惠券页面详情组件
*/
import React, { useMemo } from 'react';
......@@ -34,9 +34,11 @@ import ApplicableGoods, { ListItemDataType } from '../ApplicableGoods';
import ApplicableShopList from '../ApplicableShopList';
import ApplicableCategories from '../ApplicableCategories';
import ApplicableBrands from '../ApplicableBrands';
import ApplicableMember, { ApplicationMemberLevelType } from '../ApplicableMember';
import ApplicableMember, { ApplicationMemberLevelType, SuitableMemberType } from '../ApplicableMember';
import InnerFlowRecords from '../InnerFlowRecords';
export type SuitableMemberLevelType = Omit<ApplicationMemberLevelType, 'roleName' | 'levelTypeName'> & { roleTypeName: string, memberLevelTypeName: string }
export type DetailType = BacisInfoPropsType['dataSource'] & CouponRulesPropsType['dataSource'] & {
/**
* 优惠券名称
......@@ -127,7 +129,11 @@ export type DetailType = BacisInfoPropsType['dataSource'] & CouponRulesPropsType
/**
* 适用会员
*/
suitableMemberLevelTypes?: ApplicationMemberLevelType[],
suitableMemberLevelTypes?: SuitableMemberLevelType[],
/**
* 适用用户
*/
suitableMemberTypes: SuitableMemberType[],
};
interface IProps {
......@@ -263,6 +269,8 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
invalidDay: dataSource?.invalidDay,
useConditionMoney: dataSource?.useConditionMoney,
useConditionDesc: dataSource?.useConditionDesc,
conditionGetDay: dataSource?.conditionGetDay as number,
conditionGetTotal: dataSource?.conditionGetTotal as number,
}}
id="couponRules"
/>
......@@ -284,7 +292,7 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
? (
<Col span={24}>
<ApplicableGoods
dataSource={dataSource?.suitableCommoditySkuList}
dataSource={dataSource?.suitableCommoditySkuList!}
id="applicableGoods"
/>
</Col>
......@@ -329,8 +337,8 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
<Col span={24}>
<ApplicableMember
applicableMember={{
suitableMemberTypes: [],
applicationMemberLevel: dataSource?.suitableMemberLevelTypes,
suitableMemberTypes: dataSource?.suitableMemberTypes,
applicationMemberLevel: dataSource?.suitableMemberLevelTypes!.map(({ roleTypeName, memberLevelTypeName, ...rest }) => ({ roleName: roleTypeName, levelTypeName: memberLevelTypeName, ...rest })),
}}
id="applicableMember"
/>
......
......@@ -48,6 +48,14 @@ export type PropsType = Omit<CustomizeColumnProps, 'data' | 'column'> & {
* 使用条件说明
*/
useConditionDesc: string,
/**
* 每日可领取
*/
conditionGetDay: number,
/**
* 每会员ID总共可领取
*/
conditionGetTotal: number,
},
}
......@@ -80,7 +88,7 @@ const CouponRules: React.FC<PropsType> = (props: PropsType) => {
},
{
title: '领取条件',
value: '每会员ID总共可领取 3 张,每日 1 张',
value: `每会员ID总共可领取 ${dataSource.conditionGetTotal} 张,每日 ${dataSource.conditionGetDay} 张`,
},
{
title: '有效期结束时间',
......
@import '~antd/es/style/themes/default.less';
.tofuCheckbox-list {
margin-bottom: -@margin-md;
&-item {
display: inline-flex;
align-items: center;
padding: @padding-sm - 2 @padding-md;
margin-right: @margin-md;
margin-bottom: @margin-md;
position: relative;
background-color: @background-color-base;
border: 1px solid @border-color-base;
......
......@@ -142,6 +142,8 @@ const PlatformCouponAnalysisDeliver: React.FC<{}> = () => {
invalidDay: couponInfo?.invalidDay as number,
useConditionMoney: couponInfo?.useConditionMoney as number,
useConditionDesc: couponInfo?.useConditionDesc as string,
conditionGetDay: couponInfo?.conditionGetDay as number,
conditionGetTotal: couponInfo?.conditionGetTotal as number,
}}
id="couponRules"
/>
......
......@@ -115,6 +115,8 @@ const PlatformCouponAnalysisDetail: React.FC<{}> = () => {
invalidDay: couponInfo?.invalidDay as number,
useConditionMoney: couponInfo?.useConditionMoney as number,
useConditionDesc: couponInfo?.useConditionDesc as string,
conditionGetDay: couponInfo?.conditionGetDay as number,
conditionGetTotal: couponInfo?.conditionGetTotal as number,
}}
id="couponRules"
/>
......
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