Commit 45580020 authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

Merge branch 'v2-220418' into 20418order

parents 192106ee 05aac1d5
...@@ -975,4 +975,64 @@ export default { ...@@ -975,4 +975,64 @@ export default {
'member.management.assigned.query.batchReceive': 'Batch Receive', 'member.management.assigned.query.batchReceive': 'Batch Receive',
'member.memberQuery.suggest.common.schema.eventTime.required': 'Please fill in the event time', 'member.memberQuery.suggest.common.schema.eventTime.required': 'Please fill in the event time',
// 会员等级管理
'member.memberLevel.levelId': 'LevelId',
'member.memberLevel.level': 'Level',
'member.memberLevel.level.placeholder': 'Please choose',
'member.memberLevel.levelTag': 'Level Tag',
'member.memberLevel.levelTag.placeholder': 'Search',
'member.memberLevel.levelTag.tip': 'Enter level tag to search',
'member.memberLevel.levelTag.tip2': 'Please input, up to 16 characters, 8 Chinese characters',
'member.memberLevel.levelTag.required': 'Please enter level tag',
'member.memberLevel.levelTypeName': 'Level Type',
'member.memberLevel.levelTypeName.placeholder': 'Please choose',
'member.memberLevel.scoreTag': 'Score Tag',
'member.memberLevel.scoreTag.placeholder': 'Please input, up to 16 characters, 8 Chinese characters',
'member.memberLevel.scoreTag.required': 'Please enter an upgrade point label',
'member.memberLevel.roleName': 'Role Name',
'member.memberLevel.roleName.placeholder': 'Role Name',
'member.memberLevel.roleTypeName': 'Role Type',
'member.memberLevel.memberTypeName': 'Member Type',
'member.memberLevel.point': 'Upgrade Point',
'member.memberLevel.point.required': 'Please enter the upgrade point',
'member.memberLevel.point.legal': 'Please enter an integer',
'member.memberLevel.status': 'Status',
'member.memberLevel.status.changing': 'Changing, Please wait...',
'member.memberLevel.add': 'Add',
'member.memberLevel.add.adding': 'Adding, please wait...',
'member.memberLevel.modify': 'Modify',
'member.memberLevel.modify.modifying': 'Editing, please wait...',
'member.memberLevel.delete': 'Delete',
'member.memberLevel.delete.deleting': 'Deleting, Please wait...',
'member.memberLevel.delete.confirm.title': 'Are you sure you want to delete this level?',
'member.memberLevel.setRights': 'Set up rights and upgrade point',
'member.memberLevel.rebuild': 'Initialize level and rights',
'member.memberLevel.rebuild.confirm.title': 'Tip',
'member.memberLevel.rebuild.confirm.content': 'Clicking "OK" will initialize the membership level of all platform members to the initial level, and enjoy all the rights and interests of this level!',
'member.memberLevel.basic': 'Basic Information',
'member.memberLevel.applicableMemberRoles': 'Applicable member roles',
'member.memberLevel.remark': 'Level description',
'member.memberLevel.remark.placeholder': 'Enter your content here, up to 80 characters, 40 Chinese characters',
'member.memberLevel.add.level': 'Add level',
'member.memberLevel.modify.level': 'Edit Level',
'member.memberLevel.roleId': 'Role ID',
'member.memberLevel.role.choose': 'Choose Roles',
'member.memberLevel.role.required': 'Please select roles',
'member.memberLevel.rightsSetting': 'Membership rights setting',
'member.memberLevel.levelInfo': 'Level Information',
'member.memberLevel.rightId': 'Right Id',
'member.memberLevel.rightName': 'Right Name',
'member.memberLevel.rightRemark': 'Right Description',
'member.memberLevel.acquireWayName': 'Acquire Way Name',
'member.memberLevel.paramWayName': 'Param Way Name',
'member.memberLevel.rights': 'Select Rights',
'member.memberLevel.rights.required': 'Please select rights',
'member.memberLevel.parameter': 'parameter',
'member.memberLevel.parameter.required': 'Please enter parameter',
'member.memberLevel.parameter.legal': 'Please enter a whole number or a decimal with no more than two decimal places',
'member.memberLevel.disabled': 'Disable',
'member.memberLevel.enable': 'Enable',
'member.memberLevel.parameter.edit': 'Change parameters',
} }
...@@ -969,4 +969,64 @@ export default { ...@@ -969,4 +969,64 @@ export default {
'member.management.assigned.query.batchReceive': '일괄 수신', 'member.management.assigned.query.batchReceive': '일괄 수신',
'member.memberQuery.suggest.common.schema.eventTime.required': '이벤트 시간을 입력하십시오.', 'member.memberQuery.suggest.common.schema.eventTime.required': '이벤트 시간을 입력하십시오.',
// 会员等级管理
'member.memberLevel.levelId': '회원 등급 ID',
'member.memberLevel.level': '회원 등급',
'member.memberLevel.level.placeholder': '선택해주세요',
'member.memberLevel.levelTag': '회원 등급 라벨',
'member.memberLevel.levelTag.placeholder': '검색',
'member.memberLevel.levelTag.tip': '검색할 회원등급 태그를 입력하세요.',
'member.memberLevel.levelTag.tip2': '최대 16자, 한자 8자까지 입력하세요.',
'member.memberLevel.levelTag.required': '멤버십 등급 태그를 입력하세요.',
'member.memberLevel.levelTypeName': '회원 등급 유형',
'member.memberLevel.levelTypeName.placeholder': '선택해주세요',
'member.memberLevel.scoreTag': '업그레이드 포인트 라벨',
'member.memberLevel.scoreTag.placeholder': '최대 16자, 한자 8자까지 입력하세요.',
'member.memberLevel.scoreTag.required': '업그레이드 포인트 라벨을 입력하세요',
'member.memberLevel.roleName': '구성원 역할 이름',
'member.memberLevel.roleName.placeholder': '구성원 역할 이름',
'member.memberLevel.roleTypeName': '역할 유형',
'member.memberLevel.memberTypeName': '회원 유형',
'member.memberLevel.point': '업그레이드 임계값',
'member.memberLevel.point.required': '업그레이드 임계값을 입력하세요.',
'member.memberLevel.point.legal': '정수를 입력하세요',
'member.memberLevel.status': '상태',
'member.memberLevel.status.changing': '변경 중입니다. 잠시만 기다려 주십시오.',
'member.memberLevel.add': '새로운',
'member.memberLevel.add.adding': '추가 중입니다. 잠시만 기다려 주십시오.',
'member.memberLevel.modify': '편집하다',
'member.memberLevel.modify.modifying': '편집 중입니다. 잠시만 기다려 주십시오.',
'member.memberLevel.delete': '삭제',
'member.memberLevel.delete.deleting': '삭제 중입니다. 잠시만 기다려 주십시오.',
'member.memberLevel.delete.confirm.title': '이 멤버십 등급을 삭제하시겠습니까?',
'member.memberLevel.setRights': '혜택 및 업그레이드 임계값 설정',
'member.memberLevel.rebuild': '회원등급 및 혜택 초기화',
'member.memberLevel.rebuild.confirm.title': '힌트',
'member.memberLevel.rebuild.confirm.content': '"확인"을 클릭하면 모든 플랫폼 구성원의 멤버십 등급이 초기 등급으로 초기화되고 이 등급의 모든 권리와 이익을 향유하게 됩니다!',
'member.memberLevel.basic': '기본 정보',
'member.memberLevel.applicableMemberRoles': '적용 가능한 구성원 역할',
'member.memberLevel.remark': '회원 등급 설명',
'member.memberLevel.remark.placeholder': '여기에 내용을 입력하십시오. 최대 80자, 한자 40자',
'member.memberLevel.add.level': '회원 등급 추가',
'member.memberLevel.modify.level': '회원 등급 수정',
'member.memberLevel.roleId': '회원 역할 ID',
'member.memberLevel.role.choose': '멤버십 역할 선택',
'member.memberLevel.role.required': '회원 역할을 선택하십시오',
'member.memberLevel.rightsSetting': '멤버십 혜택 설정',
'member.memberLevel.levelInfo': '회원 등급 정보',
'member.memberLevel.rightId': '멤버십 혜택 ID',
'member.memberLevel.rightName': '멤버십 혜택 이름',
'member.memberLevel.rightRemark': '멤버십 혜택',
'member.memberLevel.acquireWayName': '권리를 얻는 방법',
'member.memberLevel.paramWayName': '파라미터 설정 방법',
'member.memberLevel.rights': '멤버십 혜택 선택',
'member.memberLevel.rights.required': '멤버십 혜택을 선택하세요.',
'member.memberLevel.parameter': '매개변수',
'member.memberLevel.parameter.required': '매개변수를 입력하세요.',
'member.memberLevel.parameter.legal': '정수 또는 소수점 이하 두 자리 이하의 소수를 입력하세요.',
'member.memberLevel.disabled': '장애를 입히다',
'member.memberLevel.enable': '활성화',
'member.memberLevel.parameter.edit': '매개변수 변경',
} }
...@@ -973,4 +973,64 @@ export default { ...@@ -973,4 +973,64 @@ export default {
'member.management.assigned.query.bind.suc': '会员领取成功!', 'member.management.assigned.query.bind.suc': '会员领取成功!',
'member.memberQuery.suggest.common.schema.eventTime.required': '请填写事件时间', 'member.memberQuery.suggest.common.schema.eventTime.required': '请填写事件时间',
// 会员等级管理
'member.memberLevel.levelId': '会员等级ID',
'member.memberLevel.level': '会员等级',
'member.memberLevel.level.placeholder': '请选择',
'member.memberLevel.levelTag': '会员等级标签',
'member.memberLevel.levelTag.placeholder': '搜索',
'member.memberLevel.levelTag.tip': '输入 会员等级标签 进行搜索',
'member.memberLevel.levelTag.tip2': '请输入,最长16个字符,8个汉字',
'member.memberLevel.levelTag.required': '请输入会员等级标签',
'member.memberLevel.levelTypeName': '会员等级类型',
'member.memberLevel.levelTypeName.placeholder': '请选择',
'member.memberLevel.scoreTag': '升级分值标签',
'member.memberLevel.scoreTag.placeholder': '请输入,最长16个字符,8个汉字',
'member.memberLevel.scoreTag.required': '请输入升级分值标签',
'member.memberLevel.roleName': '会员角色',
'member.memberLevel.roleName.placeholder': '会员角色名称',
'member.memberLevel.roleTypeName': '角色类型',
'member.memberLevel.memberTypeName': '会员类型',
'member.memberLevel.point': '升级阀值',
'member.memberLevel.point.required': '업그레이드 임계값을 입력하세요.',
'member.memberLevel.point.legal': '请输入整数',
'member.memberLevel.status': '状态',
'member.memberLevel.status.changing': '正在更改,请稍候...',
'member.memberLevel.add': '新增',
'member.memberLevel.add.adding': '正在添加,请稍候...',
'member.memberLevel.modify': '编辑',
'member.memberLevel.modify.modifying': '正在修改,请稍候...',
'member.memberLevel.delete': '删除',
'member.memberLevel.delete.deleting': '正在删除,请稍候...',
'member.memberLevel.delete.confirm.title': '是否确认删除该会员等级?',
'member.memberLevel.setRights': '设置权益与升级阀值',
'member.memberLevel.rebuild': '初始化会员等级与权益',
'member.memberLevel.rebuild.confirm.title': '提示',
'member.memberLevel.rebuild.confirm.content': '点击“确定”,会将所有平台会员的会员等级初始化为初始等级,并享有该等级的所有权益!',
'member.memberLevel.basic': '基本信息',
'member.memberLevel.applicableMemberRoles': '适用会员角色',
'member.memberLevel.remark': '会员等级说明',
'member.memberLevel.remark.placeholder': '在此输入你的内容,最长80个字符,40个汉字',
'member.memberLevel.add.level': '新增会员等级',
'member.memberLevel.modify.level': '编辑会员等级',
'member.memberLevel.roleId': '会员角色ID',
'member.memberLevel.role.choose': '选择会员角色',
'member.memberLevel.role.required': '请选择会员角色',
'member.memberLevel.rightsSetting': '会员权益设置',
'member.memberLevel.levelInfo': '会员等级信息',
'member.memberLevel.rightId': '会员权益ID',
'member.memberLevel.rightName': '会员权益名称',
'member.memberLevel.rightRemark': '会员权益说明',
'member.memberLevel.acquireWayName': '权益获取方式',
'member.memberLevel.paramWayName': '参数设置方式',
'member.memberLevel.rights': '选择会员权益',
'member.memberLevel.rights.required': '请选择会员权益',
'member.memberLevel.parameter': '参数',
'member.memberLevel.parameter.required': '请输入参数',
'member.memberLevel.parameter.legal': '请输入整数或小数位不超过两位的小数',
'member.memberLevel.disabled': '停用',
'member.memberLevel.enable': '启用',
'member.memberLevel.parameter.edit': '修改参数',
} }
...@@ -3,16 +3,18 @@ ...@@ -3,16 +3,18 @@
*/ */
import React from 'react'; import React from 'react';
import { message } from 'antd'; import { message } from 'antd';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { postMemberAbilityLevelCreate } from '@/services/MemberV2Api'; import { postMemberAbilityLevelCreate } from '@/services/MemberV2Api';
import MemberLevelForm, { SubmitValue } from './components/MemberLevelForm'; import MemberLevelForm, { SubmitValue } from './components/MemberLevelForm';
const AddMemberLevel: React.FC<{}> = (props) => { const AddMemberLevel: React.FC<{}> = (props) => {
const intl = useIntl();
const handleRoleRuleConfigFormSubmit = (value: SubmitValue): Promise<void> => ( const handleRoleRuleConfigFormSubmit = (value: SubmitValue): Promise<void> => (
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const msg = message.loading({ const msg = message.loading({
content: '正在添加,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.add.adding' }, { default: '正在添加,请稍候...' }),
duration: 0, duration: 0,
}); });
const { memberApplicableRole, ...rest } = value; const { memberApplicableRole, ...rest } = value;
...@@ -36,7 +38,7 @@ const AddMemberLevel: React.FC<{}> = (props) => { ...@@ -36,7 +38,7 @@ const AddMemberLevel: React.FC<{}> = (props) => {
return ( return (
<MemberLevelForm <MemberLevelForm
title='新增会员等级' title={intl.formatMessage({ id: 'member.memberLevel.add.level' }, { default: '新增会员等级' })}
onSubmit={handleRoleRuleConfigFormSubmit} onSubmit={handleRoleRuleConfigFormSubmit}
/> />
); );
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @Description: 平台会员等级 - 适用会员角色FormField * @Description: 平台会员等级 - 适用会员角色FormField
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { useIntl, getIntl } from 'umi';
import { Button } from 'antd'; import { Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -9,6 +10,8 @@ import themeConfig from '@/../config/lingxi.theme.config'; ...@@ -9,6 +10,8 @@ import themeConfig from '@/../config/lingxi.theme.config';
import PolymericTable from '@/components/PolymericTable'; import PolymericTable from '@/components/PolymericTable';
import MemberRoleDrawer, { MemberRoleDrawerSubmitValue, MemberRoleDrawerProps } from '../MemberRoleDrawer'; import MemberRoleDrawer, { MemberRoleDrawerSubmitValue, MemberRoleDrawerProps } from '../MemberRoleDrawer';
const intlShape = getIntl();
export type MemberApplicableRoleType = MemberRoleDrawerSubmitValue[0] & {} export type MemberApplicableRoleType = MemberRoleDrawerSubmitValue[0] & {}
export interface MemberApplicableRoleProps { export interface MemberApplicableRoleProps {
...@@ -20,19 +23,19 @@ export interface MemberApplicableRoleProps { ...@@ -20,19 +23,19 @@ export interface MemberApplicableRoleProps {
const normalColumns: ColumnType<MemberApplicableRoleType>[] = [ const normalColumns: ColumnType<MemberApplicableRoleType>[] = [
{ {
title: '会员角色ID', title: intlShape.formatMessage({ id: 'member.memberLevel.roleId' }, { default: '会员角色ID' }),
dataIndex: 'roleId', dataIndex: 'roleId',
}, },
{ {
title: '会员角色', title: intlShape.formatMessage({ id: 'member.memberLevel.roleName' }, { default: '会员角色' }),
dataIndex: 'roleName', dataIndex: 'roleName',
}, },
{ {
title: '角色类型', title: intlShape.formatMessage({ id: 'member.memberLevel.roleTypeName' }, { default: '角色类型' }),
dataIndex: 'roleTypeName', dataIndex: 'roleTypeName',
}, },
{ {
title: '会员类型', title: intlShape.formatMessage({ id: 'member.memberLevel.memberTypeName' }, { default: '会员类型' }),
dataIndex: 'memberTypeName', dataIndex: 'memberTypeName',
}, },
]; ];
...@@ -43,6 +46,8 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => { ...@@ -43,6 +46,8 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => {
const [innerValue, setInnerValue] = useState<MemberApplicableRoleType[]>([]); const [innerValue, setInnerValue] = useState<MemberApplicableRoleType[]>([]);
const [visibleDrawer, setVisibleDrawer] = useState(false); const [visibleDrawer, setVisibleDrawer] = useState(false);
const intl = useIntl();
useEffect(() => { useEffect(() => {
if ('value' in props) { if ('value' in props) {
setInnerValue(value!); setInnerValue(value!);
...@@ -69,7 +74,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => { ...@@ -69,7 +74,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => {
const columns: ColumnType<MemberApplicableRoleType>[] = [ const columns: ColumnType<MemberApplicableRoleType>[] = [
...normalColumns, ...normalColumns,
editable ? { editable ? {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }, { default: '操作' }),
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (_, record) => ( render: (_, record) => (
...@@ -77,7 +82,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => { ...@@ -77,7 +82,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => {
type="link" type="link"
onClick={() => handleRemoveItem(record)} onClick={() => handleRemoveItem(record)}
> >
删除 {intl.formatMessage({ id: 'member.memberLevel.delete' }, { default: '删除' })}
</Button> </Button>
), ),
} : null, } : null,
...@@ -106,7 +111,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => { ...@@ -106,7 +111,7 @@ const MemberApplicableRole = (props: MemberApplicableRoleProps) => {
}} }}
block block
> >
选择会员角色 {intl.formatMessage({ id: 'member.memberLevel.role.choose' }, { default: '选择会员角色' })}
</Button> </Button>
)} )}
<PolymericTable <PolymericTable
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @Description: 会员角色规则 - 基础信息布局容器组件 * @Description: 会员角色规则 - 基础信息布局容器组件
*/ */
import React from 'react'; import React from 'react';
import { useIntl } from 'umi';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
import MellowCard from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import { PLATFORM_MEMBER_LEVEL } from '../../config'; import { PLATFORM_MEMBER_LEVEL } from '../../config';
...@@ -12,10 +13,13 @@ interface BasicInfoVirtualFieldItemProps { ...@@ -12,10 +13,13 @@ interface BasicInfoVirtualFieldItemProps {
const BasicInfoVirtualFieldItem = (props: BasicInfoVirtualFieldItemProps) => { const BasicInfoVirtualFieldItem = (props: BasicInfoVirtualFieldItemProps) => {
const { children } = props; const { children } = props;
const intl = useIntl();
return ( return (
<AnchorPage.Item itemKey={PLATFORM_MEMBER_LEVEL}> <AnchorPage.Item itemKey={PLATFORM_MEMBER_LEVEL}>
<MellowCard <MellowCard
title="平台会员等级" title={intl.formatMessage({ id: 'member.memberLevel.add.level' }, { default: '新增会员等级' })}
bodyStyle={{ bodyStyle={{
paddingBottom: 0, paddingBottom: 0,
}} }}
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @Description: 平台会员等级 - 会员适用会员角色FormField * @Description: 平台会员等级 - 会员适用会员角色FormField
*/ */
import React from 'react'; import React from 'react';
import { useIntl } from 'umi';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
import MellowCard from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import themeConfig from '@/../config/lingxi.theme.config'; import themeConfig from '@/../config/lingxi.theme.config';
...@@ -12,10 +13,13 @@ export type MemberApplicableRoleValue = MemberApplicableRoleType[] ...@@ -12,10 +13,13 @@ export type MemberApplicableRoleValue = MemberApplicableRoleType[]
const MemberApplicableRoleFormField = (props) => { const MemberApplicableRoleFormField = (props) => {
const componentProps = props.props['x-component-props'] || {}; const componentProps = props.props['x-component-props'] || {};
const intl = useIntl();
return ( return (
<AnchorPage.Item itemKey={MEMBER_APPLICABLE_ROLE}> <AnchorPage.Item itemKey={MEMBER_APPLICABLE_ROLE}>
<MellowCard <MellowCard
title="适用会员角色" title={intl.formatMessage({ id: 'member.memberLevel.applicableMemberRoles' }, { default: '适用会员角色' })}
style={{ style={{
marginTop: themeConfig['@margin-md'], marginTop: themeConfig['@margin-md'],
}} }}
......
import { getIntl } from 'umi';
const intl = getIntl();
export const PLATFORM_MEMBER_LEVEL = 'PLATFORM_MEMBER_LEVEL'; export const PLATFORM_MEMBER_LEVEL = 'PLATFORM_MEMBER_LEVEL';
export const MEMBER_APPLICABLE_ROLE = 'MEMBER_APPLICABLE_ROLE'; export const MEMBER_APPLICABLE_ROLE = 'MEMBER_APPLICABLE_ROLE';
...@@ -5,10 +9,10 @@ export const MEMBER_APPLICABLE_ROLE = 'MEMBER_APPLICABLE_ROLE'; ...@@ -5,10 +9,10 @@ export const MEMBER_APPLICABLE_ROLE = 'MEMBER_APPLICABLE_ROLE';
export const anchorsArr = [ export const anchorsArr = [
{ {
key: PLATFORM_MEMBER_LEVEL, key: PLATFORM_MEMBER_LEVEL,
name: '基本信息', name: intl.formatMessage({ id: 'member.memberLevel.basic' }, { default: '基本信息' }),
}, },
{ {
key: MEMBER_APPLICABLE_ROLE, key: MEMBER_APPLICABLE_ROLE,
name: '适用会员角色', name: intl.formatMessage({ id: 'member.memberLevel.applicableMemberRoles' }, { default: '适用会员角色' }),
}, },
]; ];
\ No newline at end of file
...@@ -6,7 +6,7 @@ import { Button } from 'antd'; ...@@ -6,7 +6,7 @@ import { Button } from 'antd';
import { SaveOutlined } from '@ant-design/icons'; import { SaveOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks } from '@formily/antd';
import { Input } from '@formily/antd-components'; import { Input } from '@formily/antd-components';
import { Prompt } from 'umi'; import { Prompt, useIntl } from 'umi';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { getMemberAbilityLevelRolePage, getMemberAbilityLevelTypes } from '@/services/MemberV2Api'; import { getMemberAbilityLevelRolePage, getMemberAbilityLevelTypes } from '@/services/MemberV2Api';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
...@@ -87,6 +87,8 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => { ...@@ -87,6 +87,8 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => {
const [submitLoading, setSubmitLoading] = useState(false); const [submitLoading, setSubmitLoading] = useState(false);
const [unsaved, setUnsaved] = useState(false); const [unsaved, setUnsaved] = useState(false);
const intl = useIntl();
const fetchMemberApplicableRole = (): MemberApplicableRoleProps['fetchDataSource'] => (async (params) => { const fetchMemberApplicableRole = (): MemberApplicableRoleProps['fetchDataSource'] => (async (params) => {
const res = await getMemberAbilityLevelRolePage({ const res = await getMemberAbilityLevelRolePage({
...params, ...params,
...@@ -124,7 +126,7 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => { ...@@ -124,7 +126,7 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => {
loading={submitLoading} loading={submitLoading}
onClick={() => formActions.submit()} onClick={() => formActions.submit()}
> >
保存 {intl.formatMessage({ id: 'common.button.save' }, { default: '保存' })}
</Button> </Button>
) )
: null : null
...@@ -183,7 +185,7 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => { ...@@ -183,7 +185,7 @@ const MemberLevelForm: React.FC<MemberLevelFormProps> = (props) => {
/> />
</AnchorPage> </AnchorPage>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" /> <Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</div> </div>
); );
}; };
......
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { MEMBER_LEVEL_ENUM } from '@/constants/member'; import { MEMBER_LEVEL_ENUM } from '@/constants/member';
import { getIntl } from 'umi';
const intl = getIntl();
const schema: ISchema = { const schema: ISchema = {
type: 'object', type: 'object',
...@@ -21,24 +24,24 @@ const schema: ISchema = { ...@@ -21,24 +24,24 @@ const schema: ISchema = {
}, },
properties: { properties: {
level: { level: {
title: '会员等级', title: intl.formatMessage({ id: 'member.memberLevel.level' }, { default: '会员等级' }),
type: 'string', type: 'string',
enum: MEMBER_LEVEL_ENUM, enum: MEMBER_LEVEL_ENUM,
required: true, required: true,
'x-component-props': { 'x-component-props': {
placeholder: '请选择', placeholder: intl.formatMessage({ id: 'member.memberLevel.level.placeholder' }, { default: '请选择' }),
}, },
}, },
levelTag: { levelTag: {
title: '会员等级标签', title: intl.formatMessage({ id: 'member.memberLevel.levelTag' }, { default: '会员等级标签' }),
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '请输入,最长16个字符,8个汉字', placeholder: intl.formatMessage({ id: 'member.memberLevel.levelTag.tip2' }, { default: '请输入,最长16个字符,8个汉字' }),
}, },
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请输入会员等级标签', message: intl.formatMessage({ id: 'member.memberLevel.levelTag.required' }, { default: '请输入会员等级标签' }),
}, },
{ {
limitByte: true, // 自定义校验规则 limitByte: true, // 自定义校验规则
...@@ -47,24 +50,24 @@ const schema: ISchema = { ...@@ -47,24 +50,24 @@ const schema: ISchema = {
], ],
}, },
levelType: { levelType: {
title: '会员等级类型', title: intl.formatMessage({ id: 'member.memberLevel.levelTypeName' }, { default: '会员等级类型' }),
type: 'string', type: 'string',
enum: [], enum: [],
required: true, required: true,
'x-component-props': { 'x-component-props': {
placeholder: '请选择', placeholder: intl.formatMessage({ id: 'member.memberLevel.levelTypeName.placeholder' }, { default: '请选择' }),
}, },
}, },
scoreTag: { scoreTag: {
title: '升级分值标签', title: intl.formatMessage({ id: 'member.memberLevel.scoreTag' }, { default: '升级分值标签' }),
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '请输入,最长16个字符,8个汉字', placeholder: intl.formatMessage({ id: 'member.memberLevel.scoreTag.placeholder' }, { default: '请输入,最长16个字符,8个汉字' }),
}, },
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请输入升级分值标签', message: intl.formatMessage({ id: 'member.memberLevel.scoreTag.required' }, { default: '请输入升级分值标签' }),
}, },
{ {
limitByte: true, // 自定义校验规则 limitByte: true, // 自定义校验规则
...@@ -73,11 +76,11 @@ const schema: ISchema = { ...@@ -73,11 +76,11 @@ const schema: ISchema = {
], ],
}, },
remark: { remark: {
title: '会员等级说明', title: intl.formatMessage({ id: 'member.memberLevel.remark' }, { default: '会员等级说明' }),
type: 'string', type: 'string',
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
placeholder: '在此输入你的内容,最长80个字符,40个汉字', placeholder: intl.formatMessage({ id: 'member.memberLevel.remark.placeholder' }, { default: '在此输入你的内容,最长80个字符,40个汉字' }),
rows: 5, rows: 5,
}, },
'x-rules': [ 'x-rules': [
......
...@@ -6,6 +6,7 @@ import { Drawer, Button, message } from 'antd'; ...@@ -6,6 +6,7 @@ import { Drawer, Button, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import PolymericTable, { FetchParamsType, FetchResponse } from '@/components/PolymericTable'; import PolymericTable, { FetchParamsType, FetchResponse } from '@/components/PolymericTable';
import { useIntl } from 'umi';
export type MemberRoleType = { export type MemberRoleType = {
/** /**
...@@ -63,6 +64,8 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => { ...@@ -63,6 +64,8 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => {
} = props; } = props;
const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'roleId' }); const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'roleId' });
const intl = useIntl();
useEffect(() => { useEffect(() => {
if (value) { if (value) {
rowCtl.setSelectRow(value); rowCtl.setSelectRow(value);
...@@ -72,15 +75,15 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => { ...@@ -72,15 +75,15 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => {
const columns: ColumnType<MemberRoleType>[] = [ const columns: ColumnType<MemberRoleType>[] = [
{ {
title: '会员角色名称', title: intl.formatMessage({ id: 'member.memberLevel.roleName.placeholder' }, { default: '会员角色名称' }),
dataIndex: 'roleName', dataIndex: 'roleName',
}, },
{ {
title: '角色类型', title: intl.formatMessage({ id: 'member.memberLevel.roleTypeName' }, { default: '角色类型' }),
dataIndex: 'roleTypeName', dataIndex: 'roleTypeName',
}, },
{ {
title: '会员类型', title: intl.formatMessage({ id: 'member.memberLevel.memberTypeName' }, { default: '会员类型' }),
dataIndex: 'memberTypeName', dataIndex: 'memberTypeName',
}, },
]; ];
...@@ -105,7 +108,7 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => { ...@@ -105,7 +108,7 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => {
const handleConfirm = () => { const handleConfirm = () => {
if (!rowCtl.selectRow.length) { if (!rowCtl.selectRow.length) {
message.warning('请选择会员角色'); message.warning(intl.formatMessage({ id: 'member.memberLevel.role.required' }, { default: '请选择会员角色' }));
return; return;
} }
if (onSubmit) { if (onSubmit) {
...@@ -115,7 +118,7 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => { ...@@ -115,7 +118,7 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => {
return ( return (
<Drawer <Drawer
title="选择会员" title={intl.formatMessage({ id: 'member.memberLevel.role.choose' }, { default: '选择会员' })}
width={1000} width={1000}
onClose={handleClose} onClose={handleClose}
visible={visible} visible={visible}
...@@ -126,10 +129,10 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => { ...@@ -126,10 +129,10 @@ const MemberRoleDrawer = (props: MemberRoleDrawerProps) => {
}} }}
> >
<Button onClick={handleClose} style={{ marginRight: 16 }}> <Button onClick={handleClose} style={{ marginRight: 16 }}>
取消 {intl.formatMessage({ id: 'common.button.cancel' }, { default: '取消' })}
</Button> </Button>
<Button onClick={handleConfirm} type="primary"> <Button onClick={handleConfirm} type="primary">
确 定 {intl.formatMessage({ id: 'common.button.confirm' }, { default: '确定' })}
</Button> </Button>
</div> </div>
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description 会员等级管理 - 列表 * @Description 会员等级管理 - 列表
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { Card, Button, Space, Popconfirm, Modal, message } from 'antd'; import { Card, Button, Space, Popconfirm, Modal, message } from 'antd';
import { PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; import { PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -30,6 +30,8 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -30,6 +30,8 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
const [statusLoadingKey, setStatusLoadingKey] = useState(0); const [statusLoadingKey, setStatusLoadingKey] = useState(0);
const [deleteLoadingKey, setDeleteLoadingKey] = useState(0); const [deleteLoadingKey, setDeleteLoadingKey] = useState(0);
const intl = useIntl();
const polymericRef = useRef<NormalTableRefHandleType | null>(null); const polymericRef = useRef<NormalTableRefHandleType | null>(null);
const handleJumpFormPage = (record?: GetMemberLevelListRequestResponse) => { const handleJumpFormPage = (record?: GetMemberLevelListRequestResponse) => {
...@@ -45,7 +47,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -45,7 +47,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
return; return;
} }
const msg = message.loading({ const msg = message.loading({
content: '正在更改,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.status.changing' }, { default: '正在更改,请稍候...' }),
duration: 0, duration: 0,
}); });
setStatusLoadingKey(record.levelId); setStatusLoadingKey(record.levelId);
...@@ -67,7 +69,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -67,7 +69,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
return; return;
} }
const msg = message.loading({ const msg = message.loading({
content: '正在删除,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.delete.deleting' }, { default: '正在删除,请稍候...' }),
duration: 0, duration: 0,
}); });
setDeleteLoadingKey(record.levelId); setDeleteLoadingKey(record.levelId);
...@@ -85,17 +87,17 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -85,17 +87,17 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
const columns: ColumnType<GetMemberLevelListRequestResponse>[] = [ const columns: ColumnType<GetMemberLevelListRequestResponse>[] = [
{ {
title: '会员等级ID', title: intl.formatMessage({ id: 'member.memberLevel.levelId' }, { default: '会员等级ID' }),
dataIndex: 'levelId', dataIndex: 'levelId',
width: '10%', width: '10%',
}, },
{ {
title: '会员等级', title: intl.formatMessage({ id: 'member.memberLevel.level' }, { default: '会员等级' }),
dataIndex: 'level', dataIndex: 'level',
width: '10%', width: '10%',
}, },
{ {
title: '会员等级标签', title: intl.formatMessage({ id: 'member.memberLevel.levelTag' }, { default: '会员等级标签' }),
dataIndex: 'levelTag', dataIndex: 'levelTag',
render: (text: any, record) => ( render: (text: any, record) => (
<> <>
...@@ -109,37 +111,37 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -109,37 +111,37 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
width: '10%', width: '10%',
}, },
{ {
title: '会员等级类型', title: intl.formatMessage({ id: 'member.memberLevel.levelTypeName' }, { default: '会员等级类型' }),
dataIndex: 'levelTypeName', dataIndex: 'levelTypeName',
width: '10%', width: '10%',
}, },
{ {
title: '升级分值标签', title: intl.formatMessage({ id: 'member.memberLevel.scoreTag' }, { default: '升级分值标签' }),
dataIndex: 'scoreTag', dataIndex: 'scoreTag',
width: '10%', width: '10%',
}, },
{ {
title: '会员角色名称', title: intl.formatMessage({ id: 'member.memberLevel.roleName' }, { default: '会员角色名称' }),
dataIndex: 'roleName', dataIndex: 'roleName',
width: '10%', width: '10%',
}, },
{ {
title: '角色类型', title: intl.formatMessage({ id: 'member.memberLevel.roleTypeName' }, { default: '角色类型' }),
dataIndex: 'roleTypeName', dataIndex: 'roleTypeName',
width: '10%', width: '10%',
}, },
{ {
title: '会员类型', title: intl.formatMessage({ id: 'member.memberLevel.memberTypeName' }, { default: '会员类型' }),
dataIndex: 'memberTypeName', dataIndex: 'memberTypeName',
width: '10%', width: '10%',
}, },
{ {
title: '升级阀值', title: intl.formatMessage({ id: 'member.memberLevel.point' }, { default: '升级阀值' }),
dataIndex: 'point', dataIndex: 'point',
width: '10%', width: '10%',
}, },
{ {
title: '状态', title: intl.formatMessage({ id: 'member.memberLevel.status' }, { default: '状态' }),
dataIndex: 'statusName', dataIndex: 'statusName',
width: '15%', width: '15%',
render: (text, record) => ( render: (text, record) => (
...@@ -150,7 +152,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -150,7 +152,7 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
), ),
}, },
{ {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }, { default: '操作' }),
dataIndex: 'actions', dataIndex: 'actions',
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
...@@ -162,26 +164,26 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -162,26 +164,26 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
onClick={() => handleJumpFormPage(record)} onClick={() => handleJumpFormPage(record)}
disabled={record.status === 1} disabled={record.status === 1}
> >
编辑 {intl.formatMessage({ id: 'member.memberLevel.modify' }, { default: '编辑' })}
</Button> </Button>
<Popconfirm <Popconfirm
title="是否确认删除该会员等级?" title={intl.formatMessage({ id: 'member.memberLevel.delete.confirm.title' }, { default: '是否确认删除该会员等级?' })}
onConfirm={() => handleDeleteMemberLevel(record)} onConfirm={() => handleDeleteMemberLevel(record)}
okText="确认" okText={intl.formatMessage({ id: 'common.button.yes' }, { default: '确认' })}
cancelText="取消" cancelText={intl.formatMessage({ id: 'common.button.no' }, { default: '取消' })}
> >
<Button <Button
type="link" type="link"
loading={record.levelId === deleteLoadingKey} loading={record.levelId === deleteLoadingKey}
> >
删除 {intl.formatMessage({ id: 'member.memberLevel.delete' }, { default: '删除' })}
</Button> </Button>
</Popconfirm> </Popconfirm>
<Button <Button
type="link" type="link"
onClick={() => handleJumpSetMemberLevelRight(record)} onClick={() => handleJumpSetMemberLevelRight(record)}
> >
设置权益与升级阀值 {intl.formatMessage({ id: 'member.memberLevel.setRights' }, { default: '设置权益与升级阀值' })}
</Button> </Button>
</> </>
), ),
...@@ -202,11 +204,11 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -202,11 +204,11 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
const handleInitial = () => { const handleInitial = () => {
confirm({ confirm({
title: '提示', title: intl.formatMessage({ id: 'member.memberLevel.rebuild.confirm.title' }, { default: '提示' }),
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: '点击“确定”,会将所有平台会员的会员等级初始化为初始等级,并享有该等级的所有权益!', content: intl.formatMessage({ id: 'member.memberLevel.rebuild.confirm.content' }, { default: '点击“确定”,会将所有平台会员的会员等级初始化为初始等级,并享有该等级的所有权益!' }),
cancelText: '取消', cancelText: intl.formatMessage({ id: 'common.button.cancel' }, { default: '取消' }),
okText: '确定', okText: intl.formatMessage({ id: 'common.button.confirm' }, { default: '确定' }),
onOk() { onOk() {
return postMemberAbilityLevelRebuild(); return postMemberAbilityLevelRebuild();
}, },
...@@ -223,13 +225,13 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => { ...@@ -223,13 +225,13 @@ const PlatformMemberLevelIndexIndex: React.FC<{}> = props => {
onClick={() => handleJumpFormPage()} onClick={() => handleJumpFormPage()}
icon={<PlusOutlined />} icon={<PlusOutlined />}
> >
新增 {intl.formatMessage({ id: 'member.memberLevel.add' }, { default: '新增' })}
</Button> </Button>
<Button <Button
type="primary" type="primary"
onClick={() => handleInitial()} onClick={() => handleInitial()}
> >
初始化会员等级与权益 {intl.formatMessage({ id: 'member.memberLevel.rebuild' }, { default: '初始化会员等级与权益' })}
</Button> </Button>
</Space> </Space>
); );
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Spin, message } from 'antd'; import { Spin, message } from 'antd';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { getMemberAbilityLevelGet, postMemberAbilityLevelUpdate } from '@/services/MemberV2Api'; import { getMemberAbilityLevelGet, postMemberAbilityLevelUpdate } from '@/services/MemberV2Api';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import MemberLevelForm, { SubmitValue, SubmitValueType } from './components/MemberLevelForm'; import MemberLevelForm, { SubmitValue, SubmitValueType } from './components/MemberLevelForm';
...@@ -13,6 +13,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => { ...@@ -13,6 +13,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => {
const [detailsLoading, setDetailsLoading] = useState(false); const [detailsLoading, setDetailsLoading] = useState(false);
const { id } = usePageStatus(); const { id } = usePageStatus();
const intl = useIntl();
const fetchMemberLevelDetails = () => { const fetchMemberLevelDetails = () => {
setDetailsLoading(true); setDetailsLoading(true);
...@@ -39,7 +40,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => { ...@@ -39,7 +40,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => {
const handleRoleRuleConfigFormSubmit = (value: SubmitValue): Promise<void> => ( const handleRoleRuleConfigFormSubmit = (value: SubmitValue): Promise<void> => (
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const msg = message.loading({ const msg = message.loading({
content: '正在修改,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.modify.modifying' }, { default: '正在修改,请稍候...' }),
duration: 0, duration: 0,
}); });
const { memberApplicableRole, ...rest } = value; const { memberApplicableRole, ...rest } = value;
...@@ -64,7 +65,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => { ...@@ -64,7 +65,7 @@ const ModifyMemberLevel: React.FC<{}> = (props) => {
return ( return (
<Spin spinning={detailsLoading}> <Spin spinning={detailsLoading}>
<MemberLevelForm <MemberLevelForm
title='编辑会员角色' title={intl.formatMessage({ id: 'member.memberLevel.add.level' }, { default: '编辑会员角色' })}
value={memberLevelDetails} value={memberLevelDetails}
onSubmit={handleRoleRuleConfigFormSubmit} onSubmit={handleRoleRuleConfigFormSubmit}
cloudy cloudy
......
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
const intl = getIntl();
export const querySchema: ISchema = { export const querySchema: ISchema = {
type: 'object', type: 'object',
...@@ -19,8 +22,8 @@ export const querySchema: ISchema = { ...@@ -19,8 +22,8 @@ export const querySchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: intl.formatMessage({ id: 'member.memberLevel.levelTag.placeholder' }, { default: '搜索' }),
tip: '输入 会员等级标签 进行搜索', tip: intl.formatMessage({ id: 'member.memberLevel.levelTag.tip' }, { default: '输入 会员等级标签 进行搜索' }),
}, },
}, },
}, },
...@@ -37,7 +40,7 @@ export const querySchema: ISchema = { ...@@ -37,7 +40,7 @@ export const querySchema: ISchema = {
roleName: { roleName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '会员角色名称', placeholder: intl.formatMessage({ id: 'member.memberLevel.roleName' }, { default: '会员角色名称' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -47,7 +50,7 @@ export const querySchema: ISchema = { ...@@ -47,7 +50,7 @@ export const querySchema: ISchema = {
span: 1, span: 1,
}, },
'x-component-props': { 'x-component-props': {
children: '查询', children: intl.formatMessage({ id: 'common.button.search' }, { default: '查询' }),
}, },
}, },
}, },
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @Description: 会员角色规则 - 基础信息布局容器组件 * @Description: 会员角色规则 - 基础信息布局容器组件
*/ */
import React from 'react'; import React from 'react';
import { useIntl } from 'umi';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
import MellowCard from '@/components/MellowCard'; import MellowCard from '@/components/MellowCard';
import { MEMBER_LEVEL_INFO } from '../../config'; import { MEMBER_LEVEL_INFO } from '../../config';
...@@ -12,10 +13,13 @@ interface BasicInfoVirtualFieldItemProps { ...@@ -12,10 +13,13 @@ interface BasicInfoVirtualFieldItemProps {
const BasicInfoVirtualFieldItem = (props: BasicInfoVirtualFieldItemProps) => { const BasicInfoVirtualFieldItem = (props: BasicInfoVirtualFieldItemProps) => {
const { children } = props; const { children } = props;
const intl = useIntl();
return ( return (
<AnchorPage.Item itemKey={MEMBER_LEVEL_INFO}> <AnchorPage.Item itemKey={MEMBER_LEVEL_INFO}>
<MellowCard <MellowCard
title="会员等级信息" title={intl.formatMessage({ id: 'member.memberLevel.levelInfo' }, { default: '会员等级信息' })}
bodyStyle={{ bodyStyle={{
paddingBottom: 0, paddingBottom: 0,
}} }}
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @Description: 会员角色规则 - 适用会员角色FormField * @Description: 会员角色规则 - 适用会员角色FormField
*/ */
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
import { useIntl } from 'umi';
import { Drawer, Button, message } from 'antd'; import { Drawer, Button, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
...@@ -75,6 +76,8 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => { ...@@ -75,6 +76,8 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => {
} = props; } = props;
const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'rightType' }); const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'rightType' });
const intl = useIntl();
useEffect(() => { useEffect(() => {
if (value) { if (value) {
rowCtl.setSelectRow(value); rowCtl.setSelectRow(value);
...@@ -84,24 +87,24 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => { ...@@ -84,24 +87,24 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => {
const columns: ColumnType<MemberRoleType>[] = [ const columns: ColumnType<MemberRoleType>[] = [
{ {
title: '会员权益ID', title: intl.formatMessage({ id: 'member.memberLevel.rightId' }, { default: '会员权益ID' }),
dataIndex: 'rightId', dataIndex: 'rightId',
width: '15%', width: '15%',
}, },
{ {
title: '会员权益名称', title: intl.formatMessage({ id: 'member.memberLevel.rightName' }, { default: '会员权益名称' }),
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '会员权益说明', title: intl.formatMessage({ id: 'member.memberLevel.rightRemark' }, { default: '会员权益说明' }),
dataIndex: 'remark', dataIndex: 'remark',
}, },
{ {
title: '权益获取方式', title: intl.formatMessage({ id: 'member.memberLevel.acquireWayName' }, { default: '权益获取方式' }),
dataIndex: 'acquireWayName', dataIndex: 'acquireWayName',
}, },
{ {
title: '参数设置方式', title: intl.formatMessage({ id: 'member.memberLevel.paramWayName' }, { default: '参数设置方式' }),
dataIndex: 'paramWayName', dataIndex: 'paramWayName',
}, },
]; ];
...@@ -125,7 +128,7 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => { ...@@ -125,7 +128,7 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => {
const handleConfirm = () => { const handleConfirm = () => {
if (!rowCtl.selectRow.length) { if (!rowCtl.selectRow.length) {
message.warning('请选择会员权益'); message.warning(intl.formatMessage({ id: 'member.memberLevel.rights.required' }, { default: '请选择会员权益' }));
return; return;
} }
if (onSubmit) { if (onSubmit) {
...@@ -135,7 +138,7 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => { ...@@ -135,7 +138,7 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => {
return ( return (
<Drawer <Drawer
title="会员权益设置" title={intl.formatMessage({ id: 'member.memberLevel.rightsSetting' }, { default: '会员权益设置' })}
width={1000} width={1000}
onClose={handleClose} onClose={handleClose}
visible={visible} visible={visible}
...@@ -146,10 +149,10 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => { ...@@ -146,10 +149,10 @@ const MemberRightDrawer = (props: MemberRightDrawerProps) => {
}} }}
> >
<Button onClick={handleClose} style={{ marginRight: 16 }}> <Button onClick={handleClose} style={{ marginRight: 16 }}>
取消 {intl.formatMessage({ id: 'common.button.cancel' }, { default: '取消' })}
</Button> </Button>
<Button onClick={handleConfirm} type="primary"> <Button onClick={handleConfirm} type="primary">
确 定 {intl.formatMessage({ id: 'common.button.confirm' }, { default: '确定' })}
</Button> </Button>
</div> </div>
} }
......
...@@ -15,6 +15,7 @@ import themeConfig from '@/../config/lingxi.theme.config'; ...@@ -15,6 +15,7 @@ import themeConfig from '@/../config/lingxi.theme.config';
import { MEMBER_RIGHT_SETTING } from '../../config'; import { MEMBER_RIGHT_SETTING } from '../../config';
import MemberRightDrawer, { MemberRightDrawerSubmitValue, MemberRightDrawerProps } from '../MemberRightDrawer'; import MemberRightDrawer, { MemberRightDrawerSubmitValue, MemberRightDrawerProps } from '../MemberRightDrawer';
import styles from './index.less'; import styles from './index.less';
import { useIntl } from 'umi';
export type MemberRightFormFieldType = MemberRightDrawerSubmitValue[0] & { export type MemberRightFormFieldType = MemberRightDrawerSubmitValue[0] & {
/** /**
...@@ -71,6 +72,8 @@ const MemberRightFormField = (props) => { ...@@ -71,6 +72,8 @@ const MemberRightFormField = (props) => {
const [parameterLoadingKey, setParameterLoadingKey] = useState<number | undefined>(undefined); const [parameterLoadingKey, setParameterLoadingKey] = useState<number | undefined>(undefined);
const [statusLoadingKey, setStatusLoadingKey] = useState<number | undefined>(undefined); const [statusLoadingKey, setStatusLoadingKey] = useState<number | undefined>(undefined);
const intl = useIntl();
useEffect(() => { useEffect(() => {
if ('value' in props) { if ('value' in props) {
setInnerValue(value!); setInnerValue(value!);
...@@ -114,7 +117,7 @@ const MemberRightFormField = (props) => { ...@@ -114,7 +117,7 @@ const MemberRightFormField = (props) => {
const handleChangeRightStatus = (index: number) => { const handleChangeRightStatus = (index: number) => {
if (onStatusChange) { if (onStatusChange) {
const msg = message.loading({ const msg = message.loading({
content: '正在更改,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.status.changing' }, { default: '正在更改,请稍候...' }),
duration: 0, duration: 0,
}); });
setStatusLoadingKey(index); setStatusLoadingKey(index);
...@@ -128,7 +131,7 @@ const MemberRightFormField = (props) => { ...@@ -128,7 +131,7 @@ const MemberRightFormField = (props) => {
const handleChangeParameter = (index: number) => { const handleChangeParameter = (index: number) => {
if (onChangeParameter) { if (onChangeParameter) {
const msg = message.loading({ const msg = message.loading({
content: '正在更改,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.status.changing' }, { default: '正在更改,请稍候...' }),
duration: 0, duration: 0,
}); });
setParameterLoadingKey(index); setParameterLoadingKey(index);
...@@ -141,27 +144,27 @@ const MemberRightFormField = (props) => { ...@@ -141,27 +144,27 @@ const MemberRightFormField = (props) => {
const normalColumns: ColumnType<MemberRightFormFieldType>[] = [ const normalColumns: ColumnType<MemberRightFormFieldType>[] = [
{ {
title: '会员权益ID', title: intl.formatMessage({ id: 'member.memberLevel.rightId' }, { default: '会员权益ID' }),
dataIndex: 'rightId', dataIndex: 'rightId',
}, },
{ {
title: '会员权益名称', title: intl.formatMessage({ id: 'member.memberLevel.rightName' }, { default: '会员权益名称' }),
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '会员权益说明', title: intl.formatMessage({ id: 'member.memberLevel.rightRemark' }, { default: '会员权益说明' }),
dataIndex: 'remark', dataIndex: 'remark',
}, },
{ {
title: '权益获取方式', title: intl.formatMessage({ id: 'member.memberLevel.acquireWayName' }, { default: '权益获取方式' }),
dataIndex: 'acquireWayName', dataIndex: 'acquireWayName',
}, },
{ {
title: '参数设置方式', title: intl.formatMessage({ id: 'member.memberLevel.paramWayName' }, { default: '参数设置方式' }),
dataIndex: 'paramWayName', dataIndex: 'paramWayName',
}, },
{ {
title: '参数', title: intl.formatMessage({ id: 'member.memberLevel.parameter' }, { default: '参数' }),
dataIndex: 'parameter', dataIndex: 'parameter',
width: '15%', width: '15%',
render: (text, record, index) => editable ? ( render: (text, record, index) => editable ? (
...@@ -179,11 +182,11 @@ const MemberRightFormField = (props) => { ...@@ -179,11 +182,11 @@ const MemberRightFormField = (props) => {
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请输入参数', message: intl.formatMessage({ id: 'member.memberLevel.parameter.required' }, { default: '请输入参数' }),
}, },
{ {
pattern: PATTERN_MAPS.money, pattern: PATTERN_MAPS.money,
message: '请输入整数或小数位不超过两位的小数', message: intl.formatMessage({ id: 'member.memberLevel.parameter.legal' }, { default: '请输入整数或小数位不超过两位的小数' }),
}, },
], ],
}, },
...@@ -194,7 +197,7 @@ const MemberRightFormField = (props) => { ...@@ -194,7 +197,7 @@ const MemberRightFormField = (props) => {
) : `${text}%`, ) : `${text}%`,
}, },
{ {
title: '状态', title: intl.formatMessage({ id: 'member.memberLevel.status' }, { default: '状态' }),
dataIndex: 'statusName', dataIndex: 'statusName',
}, },
]; ];
...@@ -202,7 +205,7 @@ const MemberRightFormField = (props) => { ...@@ -202,7 +205,7 @@ const MemberRightFormField = (props) => {
const columns: ColumnType<MemberRightFormFieldType>[] = [ const columns: ColumnType<MemberRightFormFieldType>[] = [
...normalColumns, ...normalColumns,
editable ? { editable ? {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }, { default: '操作' }),
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (_, record, index) => ( render: (_, record, index) => (
...@@ -212,7 +215,7 @@ const MemberRightFormField = (props) => { ...@@ -212,7 +215,7 @@ const MemberRightFormField = (props) => {
onClick={() => handleRemoveItem(record)} onClick={() => handleRemoveItem(record)}
disabled={!editable} disabled={!editable}
> >
删除 {intl.formatMessage({ id: 'member.memberLevel.delete' }, { default: '删除' })}
</Button> </Button>
{!record.fresh ? ( {!record.fresh ? (
<> <>
...@@ -223,7 +226,7 @@ const MemberRightFormField = (props) => { ...@@ -223,7 +226,7 @@ const MemberRightFormField = (props) => {
disabled={!editable} disabled={!editable}
loading={index === statusLoadingKey} loading={index === statusLoadingKey}
> >
{record.status === 1 ? '停用' : '启用'} {record.status === 1 ? intl.formatMessage({ id: 'member.memberLevel.disabled' }, { default: '停用' }) : intl.formatMessage({ id: 'member.memberLevel.enable' }, { default: '启用' })}
</Button> </Button>
) : null} ) : null}
<Button <Button
...@@ -232,7 +235,7 @@ const MemberRightFormField = (props) => { ...@@ -232,7 +235,7 @@ const MemberRightFormField = (props) => {
disabled={!editable} disabled={!editable}
loading={index === parameterLoadingKey} loading={index === parameterLoadingKey}
> >
修改参数 {intl.formatMessage({ id: 'member.memberLevel.parameter.edit' }, { default: '修改参数' })}
</Button> </Button>
</> </>
) : null} ) : null}
...@@ -244,7 +247,7 @@ const MemberRightFormField = (props) => { ...@@ -244,7 +247,7 @@ const MemberRightFormField = (props) => {
return ( return (
<AnchorPage.Item itemKey={MEMBER_RIGHT_SETTING}> <AnchorPage.Item itemKey={MEMBER_RIGHT_SETTING}>
<MellowCard <MellowCard
title="会员权益设置" title={intl.formatMessage({ id: 'member.memberLevel.rightsSetting' }, { default: '会员权益设置' })}
style={{ style={{
marginTop: themeConfig['@margin-md'], marginTop: themeConfig['@margin-md'],
}} }}
...@@ -261,7 +264,7 @@ const MemberRightFormField = (props) => { ...@@ -261,7 +264,7 @@ const MemberRightFormField = (props) => {
}} }}
block block
> >
选择会员权益 {intl.formatMessage({ id: 'member.memberLevel.rights' }, { default: '选择会员权益' })}
</Button> </Button>
)} )}
<PolymericTable <PolymericTable
......
import { getIntl } from 'umi';
const intl = getIntl();
export const MEMBER_LEVEL_INFO = 'MEMBER_LEVEL_INFO'; export const MEMBER_LEVEL_INFO = 'MEMBER_LEVEL_INFO';
export const MEMBER_RIGHT_SETTING = 'MEMBER_RIGHT_SETTING'; export const MEMBER_RIGHT_SETTING = 'MEMBER_RIGHT_SETTING';
...@@ -5,10 +9,10 @@ export const MEMBER_RIGHT_SETTING = 'MEMBER_RIGHT_SETTING'; ...@@ -5,10 +9,10 @@ export const MEMBER_RIGHT_SETTING = 'MEMBER_RIGHT_SETTING';
export const anchorsArr = [ export const anchorsArr = [
{ {
key: MEMBER_LEVEL_INFO, key: MEMBER_LEVEL_INFO,
name: '会员等级信息', name: intl.formatMessage({ id: 'member.memberLevel.levelInfo' }, { default: '会员等级信息' }),
}, },
{ {
key: MEMBER_RIGHT_SETTING, key: MEMBER_RIGHT_SETTING,
name: '会员权益设置', name: intl.formatMessage({ id: 'member.memberLevel.rightsSetting' }, { default: '会员权益设置' }),
}, },
]; ];
\ No newline at end of file
...@@ -5,7 +5,7 @@ import React, { useState, useEffect } from 'react'; ...@@ -5,7 +5,7 @@ import React, { useState, useEffect } from 'react';
import { Spin, message, Button } from 'antd'; import { Spin, message, Button } from 'antd';
import { SaveOutlined } from '@ant-design/icons'; import { SaveOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks } from '@formily/antd';
import { Prompt, history } from 'umi'; import { Prompt, history, useIntl } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { getMemberManageRightDetail, getMemberManageRightFind, postMemberManageRightParameterUpdate, postMemberManageRightStatus, postMemberManageRightUpdate } from '@/services/MemberV2Api'; import { getMemberManageRightDetail, getMemberManageRightFind, postMemberManageRightParameterUpdate, postMemberManageRightStatus, postMemberManageRightUpdate } from '@/services/MemberV2Api';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
...@@ -72,6 +72,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => { ...@@ -72,6 +72,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => {
const [unsaved, setUnsaved] = useState(false); const [unsaved, setUnsaved] = useState(false);
const { id } = usePageStatus(); const { id } = usePageStatus();
const intl = useIntl();
const fetchMemberLevelRightDetails = () => { const fetchMemberLevelRightDetails = () => {
setDetailsLoading(true); setDetailsLoading(true);
...@@ -108,7 +109,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => { ...@@ -108,7 +109,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => {
const handleSubmit = (values: SubmitValueType) => { const handleSubmit = (values: SubmitValueType) => {
const msg = message.loading({ const msg = message.loading({
content: '正在修改,请稍候...', content: intl.formatMessage({ id: 'member.memberLevel.modify.modifying' }, { default: '正在修改,请稍候...' }),
duration: 0, duration: 0,
}); });
const { point, memberRights, ...rest } = values; const { point, memberRights, ...rest } = values;
...@@ -177,7 +178,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => { ...@@ -177,7 +178,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => {
<Spin spinning={detailsLoading}> <Spin spinning={detailsLoading}>
<div className={styles['role-rule-config-form']}> <div className={styles['role-rule-config-form']}>
<AnchorPage <AnchorPage
title="平台会员权益设置" title={intl.formatMessage({ id: 'member.memberLevel.rightsSetting' }, { default: '会员权益设置' })}
anchors={anchorsArr} anchors={anchorsArr}
extra={[ extra={[
<Button <Button
...@@ -187,7 +188,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => { ...@@ -187,7 +188,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => {
loading={submitLoading} loading={submitLoading}
onClick={() => formActions.submit()} onClick={() => formActions.submit()}
> >
保存 {intl.formatMessage({ id: 'common.button.save' }, { default: '保存' })}
</Button>, </Button>,
]} ]}
> >
...@@ -225,7 +226,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => { ...@@ -225,7 +226,7 @@ const SetMemberLevelRight: React.FC<{}> = (props) => {
/> />
</AnchorPage> </AnchorPage>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" /> <Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</div> </div>
</Spin> </Spin>
); );
......
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
const intl = getIntl();
const schema: ISchema = { const schema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
...@@ -20,56 +24,56 @@ const schema: ISchema = { ...@@ -20,56 +24,56 @@ const schema: ISchema = {
}, },
properties: { properties: {
level: { level: {
title: '会员等级', title: intl.formatMessage({ id: 'member.memberLevel.level' }, { default: '会员等级' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
levelTag: { levelTag: {
title: '会员等级标签', title: intl.formatMessage({ id: 'member.memberLevel.levelTag' }, { default: '会员等级标签' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
levelTypeName: { levelTypeName: {
title: '会员等级类型', title: intl.formatMessage({ id: 'member.memberLevel.levelTypeName' }, { default: '会员等级类型' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
scoreTag: { scoreTag: {
title: '升级分值标签', title: intl.formatMessage({ id: 'member.memberLevel.scoreTag' }, { default: '升级分值标签' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
remark: { remark: {
title: '会员等级说明', title: intl.formatMessage({ id: 'member.memberLevel.remark' }, { default: '会员等级说明' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
roleName: { roleName: {
title: '会员角色名称', title: intl.formatMessage({ id: 'member.memberLevel.roleName.placeholder' }, { default: '会员角色名称' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
roleTypeName: { roleTypeName: {
title: '角色类型', title: intl.formatMessage({ id: 'member.memberLevel.roleTypeName' }, { default: '角色类型' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
memberTypeName: { memberTypeName: {
title: '会员类型', title: intl.formatMessage({ id: 'member.memberLevel.memberTypeName' }, { default: '会员类型' }),
type: 'string', type: 'string',
editable: false, editable: false,
}, },
point: { point: {
title: '升级阀值', title: intl.formatMessage({ id: 'member.memberLevel.point' }, { default: '升级阀值' }),
type: 'string', type: 'string',
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请输入升级阀值', message: intl.formatMessage({ id: 'member.memberLevel.point.required' }, { default: '请输入升级阀值' }),
}, },
{ {
pattern: /^[1-9]?[0-9]*$/, pattern: /^[1-9]?[0-9]*$/,
message: '请输入整数', message: intl.formatMessage({ id: 'member.memberLevel.point.legal' }, { default: '请输入整数' }),
}, },
] ]
}, },
......
...@@ -150,6 +150,7 @@ export const transformDataForNiceForm = (value: any, ctx: ISchemaFormActions | I ...@@ -150,6 +150,7 @@ export const transformDataForNiceForm = (value: any, ctx: ISchemaFormActions | I
initValue["commodityMemberLevelList"] = value.commodityMemberLevelList.map(item => ({ initValue["commodityMemberLevelList"] = value.commodityMemberLevelList.map(item => ({
roleId: item.memberRoleId, roleId: item.memberRoleId,
roleName: item.memberRoleName, roleName: item.memberRoleName,
levelId: item.id,
...item, ...item,
})) }))
initValue["shopId"] = value["shopId"] initValue["shopId"] = value["shopId"]
......
...@@ -25,6 +25,9 @@ export const fileChangeStringArray = (arr) => arr.map(item => { ...@@ -25,6 +25,9 @@ export const fileChangeStringArray = (arr) => arr.map(item => {
}) })
const isAll = (element) => {
return element.some(item => item['provinceCode'] === '0' && item['cityCode'] === '0')
}
/** 传参 数据转换 id:判断是否编辑 */ /** 传参 数据转换 id:判断是否编辑 */
export const paramsConversionFn = (value) => { export const paramsConversionFn = (value) => {
const { pageStatus } = usePageStatus() const { pageStatus } = usePageStatus()
...@@ -81,7 +84,8 @@ export const paramsConversionFn = (value) => { ...@@ -81,7 +84,8 @@ export const paramsConversionFn = (value) => {
}) })
} }
// 增加不限区域和城市字段 // 增加不限区域和城市字段
if (value?.inviteTenderAreaList?.length > 0) { // if (value?.inviteTenderAreaList?.length > 0) {
if (value?.inviteTenderAreaList?.length > 0 && !isAll(value.inviteTenderAreaList)) {
value.isAllArea = false value.isAllArea = false
value['inviteTenderAreaList'] = _value.inviteTenderAreaList.map(item => { value['inviteTenderAreaList'] = _value.inviteTenderAreaList.map(item => {
let param = { let param = {
......
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