Commit b7c021d2 authored by Bill's avatar Bill

Merge branch 'v2' of 10.0.0.22:lingxi/lingxi-business-system into v2

parents b1b5a7af 2e9656b1
......@@ -142,6 +142,37 @@ const router = {
component: '@/pages/ruleSettingManage/platformSettlementStrategy/info',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 列表
{
path: '/ruleSettingManager/mallRules',
name: 'mallRulesList',
component: '@/pages/ruleSettingManage/mallRules'
},
// 商城规则配置 - 新增
{
path: '/ruleSettingManager/mallRules/add',
name: 'mallRulesAdd',
component: '@/pages/ruleSettingManage/mallRules/detail',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 查看
{
path: '/ruleSettingManager/mallRules/preview',
name: 'mallRulesDetail',
component: '@/pages/ruleSettingManage/mallRules/preview',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 编辑
{
path: '/ruleSettingManager/mallRules/edit',
name: 'mallRulesEdit',
component: '@/pages/ruleSettingManage/mallRules/detail',
hidePageHeader: true,
hideInMenu: true
}
]
}
......
......@@ -140,4 +140,27 @@ module.exports = {
forcePasv: true
})
},
v2Test: {
SITE_ID: '1',
BACK_GATEWAY: 'http://lx-pre-gateway.shushangyun.com',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://lx-pre-gateway.shushangyun.com',
ssh: JSON.stringify({
user: "www",
// Password optional, prompted if none given
password: "Shushangyun520",
host: "120.24.6.245",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/usr/local/nginx/html/admin/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
}
......@@ -9,6 +9,7 @@
"upload:v2": "cross-env local=v2 taskName=upload yarn scripts:build",
"upload:v2Preview": "cross-env local=v2Preview taskName=upload yarn scripts:build",
"upload:study": "cross-env local=study taskName=upload yarn scripts:build",
"upload:v2Test": "cross-env local=v2Test taskName=upload yarn scripts:build",
"api": "god-ytt",
"start:analyze": "ANALYZE=1 umi dev",
"scripts:build": "node scripts/run",
......@@ -27,6 +28,7 @@
"build:v2Preview": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 SOCKET_URL=ws://10.0.1.220:9400 yarn build",
"build:25": "cross-env SITE_ID=352 BACK_GATEWAY=http://10.0.0.25:8100 SOCKET_URL=ws://10.0.0.25:9400 yarn build",
"build:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 SOCKET_URL=ws://10.0.1.207:9400 yarn build",
"build:v2Test": "cross-env SITE_ID=1 BACK_GATEWAY=http://lx-pre-gateway.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lx-pre-gateway.shushangyun.com yarn build",
"postinstall": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test",
......@@ -55,8 +57,8 @@
"@antv/data-set": "^0.11.5",
"@formily/antd": "^1.2.11",
"@formily/antd-components": "^1.2.11",
"@lingxi-disign/core": "^1.0.4",
"@lingxi-disign/react": "^1.0.4",
"@lingxi-disign/core": "^1.0.5",
"@lingxi-disign/react": "^1.0.5",
"@lingxi-disign/react-web": "^1.0.2",
"@lingxi-disign/ui": "^1.0.4",
"@types/crypto-js": "^4.0.1",
......
......@@ -7,7 +7,7 @@ export interface ShopInfo {
describe: string;
state: number;
url: string;
isDefault: number;
isDefault?: any;
}
export interface OrderMode {
......@@ -28,7 +28,7 @@ export interface SiteInfo {
name: string;
logo: string;
siteUrl: string;
symbol: string;
symbol?: any;
}
export interface Site {
......
......@@ -11,7 +11,6 @@ import { useTreeTabs } from '@/hooks/useTreeTabs';
import NiceForm from '@/components/NiceForm';
import { GetManageContentCategoryAllResponse } from '@/services/PlatformApi/id8545';
import styles from './index.less';
import Form from '@/pages/pageCustomized/configs/componentConfigs/Ant/Form';
import { BorderOuterOutlined, QuestionCircleOutlined } from '@ant-design/icons';
const { ON_FORM_INPUT_CHANGE } = LifeCycleTypes
......
......@@ -15,6 +15,7 @@ const { onFormMount$ } = FormEffectHooks;
const WaitAuditMerchantMarketing = () => {
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false);
const useStateEffects = () => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
......@@ -28,11 +29,26 @@ const WaitAuditMerchantMarketing = () => {
})
}
const fetchSubmitBatch = async () => {
const res = await PublicApi.postMarketingPlatformMerchantActivityExamineBatch({ ids: rowkeys });
setSubmitLoading(true)
if (res.code !== 1000) {
setSubmitLoading(false)
return
}
setSubmitLoading(false)
ref.current.reload();
setRowKeys([])
}
/* 操作按钮 */
const controllerBtns = (
<Row>
<Col span={6}>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>
批量提交审核
</Button>
......@@ -98,6 +114,7 @@ const WaitAuditMerchantMarketing = () => {
effects="id"
fetch={PublicApi.getMarketingPlatformMerchantActivityPageTobeExam}
fetchRowkeys={(e) => setRowKeys(e)}
controllerBtns={controllerBtns}
schema={{
type: 'object',
properties: {
......@@ -109,11 +126,8 @@ const WaitAuditMerchantMarketing = () => {
},
properties: {
ctl: {
type: 'object',
"x-component": "Children",
"x-component-props": {
children: controllerBtns
}
type: "object",
"x-component": "controllerBtns",
},
id: {
type: 'string',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-22 17:12:38
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-13 15:44:43
* @LastEditTime: 2021-09-24 14:03:18
* @Description: 适用商品
*/
import React from 'react';
......@@ -97,7 +97,7 @@ const ApplicableGoods: React.FC<IProps> = (props) => {
render: (text) => {
const unitPrice = normalizeUnitPrice(text);
const start = unitPrice[0]?.price;
const end = unitPrice[unitPrice.length - 1].price;
const end = unitPrice[unitPrice.length - 1]?.price;
return start !== end ? ${start}~${end}` : ${start}`;
},
},
......
......@@ -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"
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-22 09:49:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 18:21:20
* @LastEditTime: 2021-09-22 14:09:45
* @Description: 商家优惠劵查询
*/
import React, { useRef, useState } from 'react';
......@@ -254,6 +254,27 @@ const PlatformCouponQuery: React.FC = () => {
break;
}
};
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getMarketingCouponPlatformPageCondition();
if (res.code === 1000) {
const { data } = res;
const {
typeList = [],
getWayList = [],
statusList = [],
} = data;
return {
type: typeList.map(item => ({ label: item.name, value: item.value })).filter(item => item.value),
getWay: getWayList.map(item => ({ label: item.name, value: item.value })).filter(item => item.value),
status: statusList.map(item => ({ label: item.name, value: item.value })).filter(item => item.value),
};
}
return {};
};
return (
<Card>
......@@ -278,6 +299,10 @@ const PlatformCouponQuery: React.FC = () => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['type', 'getWay', 'status'],
fetchSearchItems,
);
}}
schema={querySchema}
/>
......
......@@ -70,7 +70,7 @@ const ApplicableGoodsFormItem = (props) => {
render: (text) => {
const unitPrice = normalizeUnitPrice(text);
const start = unitPrice[0]?.price;
const end = unitPrice[unitPrice.length - 1].price;
const end = unitPrice[unitPrice.length - 1]?.price;
return start !== end ? ${start}~${end}` : ${start}`;
},
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:03:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 15:52:33
* @LastEditTime: 2021-09-23 16:17:02
* @Description:
*/
import { FormPath, FormEffectHooks } from '@formily/antd';
......@@ -88,8 +88,24 @@ const fetchSuitableUser = async () => {
};
};
// 初始化 适用会员类型
const fetchMemberTypes = async () => {
const res = await PublicApi.getMarketingCouponPlatformMemberTypeList();
if (res.code === 1000) {
const { data = [] } = res;
return {
memberTypes: data.map(item => ({ label: item.name, value: item.value })),
};
}
return {
data: [],
totalCount: 0,
};
};
// 获取 实用会员选项
const fetchMemberOptions: (params: { current: string, pageSize: string, levelConfigIds: string, roleIds: string }) => Promise<ResponseType> = async (params) => {
const fetchMemberOptions: (params: { current: string, pageSize: string, levelConfigIds: string, roleIds: string, memberTypes: string }) => Promise<ResponseType> = async (params) => {
const res = await PublicApi.getMemberManageMarketingSuitableLevelConfigPage(params);
if (res.code === 1000) {
const options = res.data.data.map(item => ({
......@@ -124,6 +140,8 @@ export const createEffects = (context, actions) => {
useAsyncInitSelect(['suitableMemberTypes'], fetchSuitableUser);
useAsyncInitSelect(['memberTypes'], fetchMemberTypes);
// 初始化 适用商城数据
onFieldMount$('suitableMallTypes').subscribe(() => {
PublicApi.getManageShopAllByShopType({
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-30 17:48:32
* @LastEditTime: 2021-09-24 10:59:06
* @Description:
*/
import { FormEffectHooks, FormPath, IFormActions } from '@formily/antd';
......@@ -19,8 +19,6 @@ import {
MERCHANT_COUPON_RECEIVE_OPERATE,
SUITABLE_TYPE_NEW_USER,
SUITABLE_TYPE_OLD_USER,
SUITABLE_TYPE_NEW_MEMBER,
SUITABLE_TYPE_OLD_MEMBER,
} from '@/constants/const/marketing';
const {
......@@ -178,37 +176,6 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
}
});
});
// 领券方式
onFieldValueChange$('getWay').subscribe(state => {
const { value } = state;
const suitableMemberTypesEnum = [...getFieldState('suitableMemberTypes', state => state.props.enum)];
const newData = suitableMemberTypesEnum.map((item) => {
const newItem = {...item};
newItem.disabled = false;
if (
(
value === MERCHANT_COUPON_RECEIVE_DESIGNATED
|| value === MERCHANT_COUPON_RECEIVE_OPERATE
) && (
newItem.value === SUITABLE_TYPE_NEW_USER
|| newItem.value === SUITABLE_TYPE_OLD_USER
)
) {
newItem.disabled = true;
}
return newItem;
});
const showReceiveCondition = value === MERCHANT_COUPON_RECEIVE_FRONT;
setFieldState('suitableMemberTypes', state => {
FormPath.setIn(state, 'props.enum', newData);
});
setFieldState('receiveCondition', state => {
FormPath.setIn(state, 'visible', showReceiveCondition);
});
});
// 适用用户角色
onFieldInputChange$('applicationUserRole').subscribe(state => {
......@@ -232,18 +199,6 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
});
});
// 适用用户
onFieldValueChange$('suitableMemberTypes').subscribe(state => {
const { value } = state;
// 包含新会员(仅会员用户) 或者 老会员(仅会员用户),展示 适用用户角色 与 会员等级列表
if (value && (value.includes(SUITABLE_TYPE_NEW_MEMBER) || value.includes(SUITABLE_TYPE_OLD_MEMBER))) {
linkage.show('*(applicationUserRole,applicationMemberLevel)');
} else {
linkage.hide('*(applicationUserRole,applicationMemberLevel)');
}
});
// 券有效期类型,展示对应的 FieldItem
onFieldValueChange$('effectiveType').subscribe(state => {
const { value } = state;
......@@ -255,4 +210,30 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
linkage.show('invalidDay');
}
});
// 每日可领取量
onFieldInputChange$('receiveCondition.conditionGetDay').subscribe(state => {
const { value } = state;
const conditionGetTotalValue = getFieldValue('receiveCondition.conditionGetTotal'); // 每会员ID总共可领取;
if (+value > +conditionGetTotalValue) {
setFieldState('receiveCondition.conditionGetDay', fieldState => {
FormPath.setIn(fieldState, 'errors', '每日可领取必须小于或等于总可领取量');
});
} else {
actions.clearErrors('receiveCondition.conditionGetDay');
}
});
// 每会员ID总共可领取
onFieldInputChange$('receiveCondition.conditionGetTotal').subscribe(state => {
const { value } = state;
const conditionGetDayValue = getFieldValue('receiveCondition.conditionGetDay'); // 每会员ID总共可领取;
if (+value < +conditionGetDayValue) {
setFieldState('receiveCondition.conditionGetTotal', fieldState => {
FormPath.setIn(fieldState, 'errors', '每会员ID总共可领取必须大于每日可领取');
});
} else {
actions.clearErrors('receiveCondition.conditionGetTotal');
}
});
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 13:47:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-13 15:14:24
* @LastEditTime: 2021-09-23 16:55:22
* @Description: 新增/修改 优惠券表单
*/
import React, { useState, useMemo, useEffect } from 'react';
......@@ -122,6 +122,10 @@ export type SubmitValueType = {
* 适用商城
*/
suitableMallTypes: number[],
/**
* 实用会员类型
*/
memberTypes: number[],
}
export type CouponInfoType = SubmitValueType & {}
......@@ -188,7 +192,7 @@ const CouponForm: React.FC<IProps> = (props) => {
goodsList: suitableCommoditySkuList as any,
applicationUserRole,
applicationMemberLevel: suitableMemberLevelTypes?.map((item) => item.id),
suitableMemberTypes: suitableMemberTypes?.map((item) => item.value),
suitableMemberTypes: suitableMemberTypes,
suitableMallTypes: suitableMallTypes?.map((item) => item.id),
denomination: `${denomination}`,
quantity: `${quantity}`,
......@@ -355,7 +359,7 @@ const CouponForm: React.FC<IProps> = (props) => {
return (
<Spin spinning={infoLoading}>
<AnchorPage
title="新增平台优惠券"
title={`${!id ? '新增' : '编辑'}平台优惠券`}
anchors={anchorsArr}
extra={[
<Button
......
......@@ -2,13 +2,22 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-02 17:38:26
* @LastEditTime: 2021-09-24 13:50:18
* @Description:
*/
import { ISchema } from '@formily/antd';
import moment from 'moment';
import themeConfig from '@/../config/theme.config';
import { PATTERN_MAPS } from '@/constants/regExp';
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
const schema: ISchema = {
type: 'object',
properties: {
......@@ -51,6 +60,12 @@ const schema: ISchema = {
'x-component-props': {
allowClear: false,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 60,
}
],
},
denomination: {
title: '券面额',
......@@ -89,6 +104,17 @@ const schema: ISchema = {
'x-component-props': {
placeholder: ['领(发)劵起始时间', '领(发)劵截止时间'],
showTime: true,
disabledDate: (current) => current && current < moment().startOf('day'),
disabledTime: (_, type) => {
if (type === 'start') {
return {
disabledHours: () => range(0, 24).splice(0, moment().get('hour')),
disabledMinutes: () => range(0, 60).splice(0, moment().get('minute')),
disabledSeconds: () => range(0, 60).splice(0, moment().get('second')),
};
}
return {};
},
},
},
},
......@@ -140,7 +166,7 @@ const schema: ISchema = {
'x-component-props': {
grid: true,
full: true,
columns: 2,
columns: 1,
autoRow: true,
},
properties: {
......@@ -276,6 +302,17 @@ const schema: ISchema = {
'x-component-props': {
placeholder: ['劵有效期起始时间', '劵有效期截止时间'],
showTime: true,
disabledDate: (current) => current && current < moment().startOf('day'),
disabledTime: (_, type) => {
if (type === 'start') {
return {
disabledHours: () => range(0, 24).splice(0, moment().get('hour')),
disabledMinutes: () => range(0, 60).splice(0, moment().get('minute')),
disabledSeconds: () => range(0, 60).splice(0, moment().get('second')),
};
}
return {};
},
},
},
invalidDay: {
......@@ -388,6 +425,16 @@ const schema: ISchema = {
'x-component-props': {
},
},
memberTypes: {
title: '适用会员类型',
type: 'string',
enum: [],
default: [],
required: true,
'x-component': 'TofuCheckGroup',
'x-component-props': {
},
},
applicationUserRole: {
title: '适用用户角色',
type: 'string',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-13 15:39:44
* @LastEditTime: 2021-09-24 14:12:08
* @Description: 商品选择抽屉
*/
import React, { useEffect } from 'react';
......@@ -112,6 +112,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
const fetchData = async (params: ExtraFetchType) => {
const res = await PublicApi.postProductCommodityCommonGetCommodityListByPlatform({
priceTypeList: [1],
...params,
}, {
ctlType: 'none',
......@@ -167,7 +168,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
render: (text) => {
const unitPrice = normalizeUnitPrice(text);
const start = unitPrice[0]?.price;
const end = unitPrice[unitPrice.length - 1].price;
const end = unitPrice[unitPrice.length - 1]?.price;
return start !== end ? ${start}~${end}` : ${start}`;
},
},
......
......@@ -609,7 +609,7 @@ const getInformationByIds = (idList: number[]) => {
"componentName": "PlatformPurchase.Banner",
"componentType": PROPS_SETTING_TYPES.platformPurchaseAdvert,
"props": {
advertList: []
advertList: flowItem.content || []
},
}
});
......
import React, { Fragment, useEffect, useState } from 'react'
import { Form, Radio, Table, Button } from 'antd';
import { ColumnType } from 'antd/lib/table';
import ModalTable from '@/components/ModalTable'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { PlusOutlined } from '@ant-design/icons';
import LevelBrand from '@/components/LevelBrand';
import StatusSwitch from '@/components/StatusSwitch'
interface Iprops {
rowCtl: (key: string, e) => void,
/** ID */
id?: number
}
const MemberInfo: React.FC<Iprops> = (props: any) => {
const { rowCtl, id } = props;
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' })
const [dataSource, setDataSource] = useState<any>([])
const columns: ColumnType<any>[] = [
{
title: '商城ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '商城名称',
key: 'name',
dataIndex: 'name'
},
{
title: '商城LOGO',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '商城环境',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '商城属性',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '商城地址',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '商城描述',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => handleModify(record)}
record={record}
/>
)
},
{
title: '是否默认',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_text, record) => {
return (
<>
<Button type='link' onClick={() => handleDelect(record.memberId)}>修改</Button>
<Button type='link' onClick={() => handleDelect(record.memberId)}>删除</Button>
</>
)
}
}
]
const columnsSetProduct: any[] = [
{
dataIndex: 'memberId',
title: '商城ID',
key: 'memberId'
},
{
dataIndex: 'name',
title: '商城名称',
key: 'name'
},
{
dataIndex: 'memberTypeName',
title: '商城属性',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '商城环境',
key: 'roleName'
},
{
dataIndex: 'levelTag',
title: '商城域名',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
{
dataIndex: 'roleName',
title: '商城描述',
key: 'roleName'
},
]
const formMember: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商城名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员类型',
}
},
roleId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员角色',
}
},
level: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员等级',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
const handleModify = async (record: any) => {
// await PublicApi.postOrderPlatformPaymentStatus({
// paymentId: record.paymentId,
// status: record.status === 1 ? 0 : 1
// })
// ref.current.reload()
}
/** 删除会员 */
const handleDelect = (id) => {
const data = [...dataSource];
const source = data.filter(item => item.memberId !== id);
setDataSource(source);
rowCtl('malls', source)
}
// 会员弹框筛选select值
const fetchSelectOptions = async () => {
const res = await PublicApi.getMemberManagePageitems({ roleTypeEnum: '1' })
if (res.code === 1000) {
const { data = {} }: any = res
const {
memberTypes = [],
roles = [],
levels = [],
} = data
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
return {}
}
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
const handleCancelAddMember = () => {
setVisibleChannelRroduct(false)
}
const handleOkAddMember = () => {
setVisibleChannelRroduct(false)
setDataSource(memberRowCtl.selectRow)
rowCtl('malls', memberRowCtl.selectRow.map(item => {
return {
memberId: item.memberId,
roleId: item.roleId,
}
}))
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, pageSize: '999', current: '1', name: '' }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res.data;
memberRowCtl.setSelectedRowKeys(data.map(v => v.memberId))
memberRowCtl.setSelectRow(data);
rowCtl('malls', data)
setDataSource(data)
})
}
}, [id])
return (
<Fragment>
<Form.Item name='malls' wrapperCol={{ span: 24 }}>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
onClick={() => setVisibleChannelRroduct(true)}
>
选择商城
</Button>
<Table
pagination={{
size: 'small'
}}
rowKey={record => record.memberId}
columns={columns}
dataSource={dataSource}
/>
</Form.Item>
<ModalTable
modalTitle='选择适用商城'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelRroduct}
columns={columnsSetProduct}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMembersList(params)}
formilyProps={
{
ctx: {
schema: formMember,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'level'],
fetchSelectOptions,
);
}
}
}
}
tableProps={{
rowKey: 'id'
}}
/>
</Fragment>
)
}
export default MemberInfo;
import React, { Fragment, useEffect, useState } from 'react'
import { Form, Radio, Table, Button } from 'antd';
import { ColumnType } from 'antd/lib/table';
import ModalTable from '@/components/ModalTable'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { PlusOutlined } from '@ant-design/icons';
import LevelBrand from '@/components/LevelBrand';
interface Iprops {
rowCtl: (key: string, e) => void,
/** ID */
id?: number
}
const MemberInfo: React.FC<Iprops> = (props: any) => {
const { rowCtl, id } = props;
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio' })
const [dataSource, setDataSource] = useState<any>([])
const columns: ColumnType<any>[] = [
{
title: 'ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '会员名称',
key: 'name',
dataIndex: 'name'
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_text, record) => <Button type='link' onClick={() => handleDelect(record.memberId)}>删除</Button>
}
]
const columnsSetProduct: any[] = [
{
dataIndex: 'memberRoleId',
title: 'MRID',
key: 'memberRoleId',
className: 'commonHide'
},
{
dataIndex: 'memberId',
title: 'ID',
key: 'memberId'
},
{
dataIndex: 'name',
title: '会员名称',
key: 'name'
},
{
dataIndex: 'memberTypeName',
title: '会员类型',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '会员角色',
key: 'roleName'
},
{
dataIndex: 'levelTag',
title: '会员等级',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
]
const formMember: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入会员名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员类型',
}
},
roleId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员角色',
}
},
level: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员等级',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
/** 删除会员 */
const handleDelect = (id) => {
const data = [...dataSource];
const source = data.filter(item => item.memberId !== id);
setDataSource(source);
rowCtl('members', source)
}
// 会员弹框筛选select值
const fetchSelectOptions = async () => {
const res = await PublicApi.getMemberManagePageitems({ roleTypeEnum: '1' })
if (res.code === 1000) {
const { data = {} }: any = res
const {
memberTypes = [],
roles = [],
levels = [],
} = data
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
return {}
}
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
const handleCancelAddMember = () => {
setVisibleChannelRroduct(false)
}
const handleOkAddMember = () => {
setVisibleChannelRroduct(false)
setDataSource(memberRowCtl.selectRow)
rowCtl('members', memberRowCtl.selectRow.map(item => {
return {
memberId: item.memberId,
roleId: item.roleId,
}
}))
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, pageSize: '999', current: '1', name: '' }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res.data;
memberRowCtl.setSelectedRowKeys(data.map(v => v.memberId))
memberRowCtl.setSelectRow(data);
rowCtl('members', data)
setDataSource(data)
})
}
}, [id])
return (
<Fragment>
<Form.Item name='members' wrapperCol={{ span: 24 }}>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
onClick={() => setVisibleChannelRroduct(true)}
>
选择会员
</Button>
<Table
pagination={{
size: 'small'
}}
rowKey={record => record.memberId}
columns={columns}
dataSource={dataSource}
/>
</Form.Item>
<ModalTable
modalTitle='选择适用会员'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelRroduct}
columns={columnsSetProduct}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMembersList(params)}
formilyProps={
{
ctx: {
schema: formMember,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'level'],
fetchSelectOptions,
);
}
}
}
}
tableProps={{
rowKey: 'id'
}}
/>
</Fragment>
)
}
export default MemberInfo;
import React, { useEffect, useState } from 'react';
import { Card, Tabs, Form, Button } from 'antd';
import { history, Prompt } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import Mall from './components/mall';
import Member from './components/member';
import { SaveOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
const layout: any = {
colon: false,
labelCol: { style: { width: "144px" } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const { TabPane } = Tabs;
const PaymentConfigLayout = () => {
const {
query: {
id,
},
pathname,
}: any = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [loading, setLoading] = useState<boolean>(false)
const [unsaved, setUnsaved] = useState<boolean>(false);
const [form] = Form.useForm();
const handleSubmit = () => {
form.validateFields().then(res => {
console.log(`res`, res)
const params: any = {
name: res.name,
}
if (res.members) {
params.members = res.members
}
id && (params.paymentId = id);
return
const fetchApi = id ? PublicApi.postOrderPlatformPaymentUpdate : PublicApi.postOrderPlatformPaymentCreate;
setLoading(true)
fetchApi(params).then(res => {
if (res.code !== 1000) {
setLoading(false);
return
}
setUnsaved(false)
setLoading(false);
history.goBack();
})
})
}
const rowCtl = (key, ctl) => {
form.setFieldsValue({
[key]: ctl
})
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentDetail({ paymentId: id }).then(res => {
if (res.code !== 1000) {
return
}
form.setFieldsValue({
...res.data,
})
})
}
}, [])
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button
loading={loading}
type="primary"
onClick={handleSubmit} icon={<SaveOutlined />}
>
保存
</Button>
}
>
<Card>
<Form
form={form}
{...layout}
onValuesChange={() => {
if (!unsaved) {
setUnsaved(true)
}
}}
>
<Tabs>
<TabPane tab='适用会员' key={1} forceRender>
<Member id={id} rowCtl={rowCtl} />
</TabPane>
<TabPane tab='适用商城' key={2} forceRender>
<Mall id={id} rowCtl={rowCtl} />
</TabPane>
</Tabs>
</Form>
</Card>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
</PageHeaderWrapper>
)
}
export default PaymentConfigLayout;
import React, { useRef, Fragment } from 'react';
import { Card, Button, Popconfirm } from 'antd'
import { history } from 'umi'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import EyePreview from '@/components/EyePreview'
import StatusSwitch from '@/components/StatusSwitch'
import { PlusOutlined } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import LevelBrand from '@/pages/member/components/LevelBrand'
const List: React.FC<{}> = () => {
const ref = useRef<any>({})
const columns: ColumnType<any>[] = [
{
title: '会员ID',
dataIndex: 'paymentId',
key: 'paymentId',
},
{
title: '会员名称',
dataIndex: 'name',
key: 'name',
render: (text: any, record: any) => (
<EyePreview url={`/ruleSettingManager/mallRules/preview?id=${record.paymentId}`}>
{text}
</EyePreview>
)
},
{
title: '会员类型',
align: 'center',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
// render: (data) => findArrayItem(MEMBER_TYPE_LISTS, data).label
},
{
title: '会员角色',
align: 'center',
dataIndex: 'roleTypeName',
key: 'roleTypeName',
// render: (data) => findArrayItem(MEMBER_ROLE_LISTS, data).label
},
{
title: '会员等级',
align: 'center',
dataIndex: 'levelTag',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => handleModify(record)}
record={record}
/>
)
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_, record) => !record.status && (
<Fragment>
<Button type='link' onClick={() => history.push(`/ruleSettingManager/mallRules/edit?id=${record.paymentId}`)}>修改</Button>
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleDelete(record.paymentId)}
>
<Button type='link'>删除</Button>
</Popconfirm>
</Fragment>
)
}
]
const handleModify = async (record: any) => {
await PublicApi.postOrderPlatformPaymentStatus({
paymentId: record.paymentId,
status: record.status === 1 ? 0 : 1
})
ref.current.reload()
}
//删除
const handleDelete = async (paymentId) => {
await PublicApi.postOrderPlatformPaymentDelete({ paymentId })
ref.current.reload()
}
const handleToAdd = () => {
history.push('/ruleSettingManager/mallRules/add')
}
const fetchData = (params: any) => {
return new Promise((resolve) => {
PublicApi.getOrderPlatformPaymentPage({ ...params }).then(res => {
resolve(res.data)
})
})
}
return (
<Card>
<StandardTable
currentRef={ref}
tableProps={{ rowKey: 'paymentId' }}
columns={columns}
fetchTableData={(params: any) => fetchData(params)}
formilyLayouts={{
justify: "space-between"
}}
formilyChilds={{
layouts: {
order: 2
},
children:
<Button
style={{ marginBottom: '24px' }}
type="primary"
onClick={handleToAdd}
icon={<PlusOutlined />}
>
新建
</Button>
}}
formilyProps={{
layouts: {
order: 3
},
ctx: {
schema: {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'search',
"x-component-props": {
placeholder: '输入会员名称'
}
}
}
}
}
}}
/>
</Card>
)
}
export default List
import React, { Fragment, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Tabs, Form, Typography, Space } from 'antd';
import { history } from 'umi'
import { PublicApi } from '@/services/api';
import ReutrnEle from '@/components/ReturnEle';
import style from './components/index.less';
import ListLayout from '@/components/DetailLayout/components/listLayout';
import { ColumnType } from 'rc-table/lib/interface';
import { StandardTable } from 'god';
import { isEmpty } from '@formily/shared';
const layout: any = {
colon: false,
labelCol: { style: { width: "144px" } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const { TabPane } = Tabs;
type GetOrderPlatformPaymentDetailResponse = {
/**
* 支付策略Id
*/
paymentId: number
/**
* 指定会员
*/
allMembers?: boolean,
/**
* 支付策略名称
*/
name: string
/**
* 支付方式与支付渠道列表 ,PlatformPaymentPayTypeDetailVO
*/
payTypes: {
/**
* 支付方式枚举
*/
payType: number
/**
* 支付方式名称
*/
payTypeName: string
/**
* 资金归集模式列表 ,PlatformPaymentFundModeVO
*/
fundModes: {
/**
* 资金归集模式枚举
*/
fundMode?: number
/**
* 资金归集模式名称
*/
fundModeName?: string
}[]
/**
* 已选择的资金归集模式枚举值
*/
fundMode: number
/**
* 支付渠道列表 ,PlatformPaymentPayChannelVO
*/
channels: {
/**
* 支付渠道类型枚举
*/
payChannel?: number
/**
* 支付渠道类型名称
*/
payChannelName?: string
}[]
/**
* 已选择的支付渠道枚举值列表 ,Integer
*/
payChannels: number[]
}[]
}
const Preview = () => {
const {
query: {
id,
},
}: any = history.location;
const [data, setData] = useState<GetOrderPlatformPaymentDetailResponse>();
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentDetail({ paymentId: id }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res;
setData(data)
})
}
}, [])
const columns: any[] = [
{
title: 'ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '会员名称',
key: 'name',
dataIndex: 'name'
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag'
},
]
const fetchTableData = (params) => {
return new Promise(resolve => {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, ...params }).then(res => {
if (res.code !== 1000) {
return
}
resolve(res.data);
})
})
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
>
<Card>
<Form
{...layout}
>
<Tabs>
<TabPane tab='适用会员' key={1} forceRender>
<StandardTable
columns={columns}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchTableData(params)}
/>
</TabPane>
<TabPane tab='适用商城' key={2} forceRender>
<StandardTable
columns={columns}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchTableData(params)}
/>
</TabPane>
</Tabs>
</Form>
</Card>
</PageHeaderWrapper>
)
}
export default Preview;
......@@ -2825,6 +2825,16 @@
lodash "^4.17.15"
redux "^4.0.5"
"@lingxi-disign/core@^1.0.5":
version "1.0.5"
resolved "http://10.0.0.19:4873/@lingxi-disign%2fcore/-/core-1.0.5.tgz#a3c5011283c87bb26ef1b776838db88e56cdacb0"
integrity sha512-NHQe4OkbBEoP0Uv29PuSyf5dzjhaNunshVsgqfyD3Hc47eAyw69i8xtpgg4MGddX95wJRDFirXHegkwWx7Um4Q==
dependencies:
"@lingxi-disign/utils" "^1.0.0"
immer "^6.0.5"
lodash "^4.17.15"
redux "^4.0.5"
"@lingxi-disign/hooks@^1.0.0", "@lingxi-disign/hooks@^1.0.0-alpha.16":
version "1.0.0"
resolved "http://10.0.0.19:4873/@lingxi-disign%2fhooks/-/hooks-1.0.0.tgz#5a273ac4014a8019ceeb4ef8829fa36f23934510"
......@@ -2865,12 +2875,12 @@
react-dom "^17.0.2"
sortablejs "^1.10.2"
"@lingxi-disign/react@^1.0.4":
version "1.0.4"
resolved "http://10.0.0.19:4873/@lingxi-disign%2freact/-/react-1.0.4.tgz#31b5fe11e4964a5390e6814da3ae83bda0e92d5b"
integrity sha512-lEZR0kzcWnp0rYwHAX0h2x9lW5cPBz7VzgKQWVA7kfY51uSspOiWqAiB8zBsLH5idQU/AV6+9K78TenrHuOKwg==
"@lingxi-disign/react@^1.0.5":
version "1.0.5"
resolved "http://10.0.0.19:4873/@lingxi-disign%2freact/-/react-1.0.5.tgz#0963c072f367ccd35853968d326c58ad1cef289a"
integrity sha512-PLrSiRfqQ5z32McL5naiK32XRd2qBGSNgmyQ6xCxSRGOsHYG9gpwchBJz3kuPetYwp4Pg0uTOnHBl+hC0tZOxQ==
dependencies:
"@lingxi-disign/core" "^1.0.1"
"@lingxi-disign/core" "^1.0.4"
"@lingxi-disign/hooks" "^1.0.0"
"@lingxi-disign/utils" "^1.0.0"
html2canvas "^1.0.0-rc.7"
......
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