Commit 86059581 authored by 卢均锐's avatar 卢均锐

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

* 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: feat: 添加 修改入库分类信息 相关 chore: 修改样式 chore: 增加颜色 chore: 删除过滤 fix: 修复百分比不对的问题 chore: 修改路径 chore: 删除过滤 chore: 预渲染内容 fix: 修复注册信息不展示的问题 chore: 移动到上级 chore: 颜色继承 chore: 去掉过滤 chore: 修改 columns feat: 添加修改渠道信息相关 fix: 修复 区域信息没有展示的问题
parents b54478b2 8ec4f895
......@@ -11,7 +11,7 @@
padding-bottom: 0;
font-size: 14px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
color: inherit;
}
}
......
......@@ -129,7 +129,14 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
<div className={styles.renderFileItem} >
<div className={styles['fileItem-left']}>
<img className={styles.img} src={pdf_icon} />
<a className={cx({ [styles.error]: _item.status === 'error' || !_item.url })} href={_item.url} target="_blank">{_item.name}</a>
<a
className={cx({ [styles.error]: _item.status === 'error' || !_item.url })}
href={_item.url}
target="_blank"
title={_item.name}
>
{_item.name}
</a>
</div>
{
!disable && (
......
......@@ -39,13 +39,11 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
},
{
title: '会员类型',
filters: [],
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
filters: [],
dataIndex: 'roleName',
align: 'center',
},
......
......@@ -40,13 +40,11 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
},
{
title: '会员类型',
filters: [],
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
filters: [],
dataIndex: 'roleName',
align: 'center',
},
......
......@@ -2,13 +2,16 @@
* @Author: XieZhiXiong
* @Date: 2021-05-18 17:26:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-18 17:59:46
* @LastEditTime: 2021-07-07 15:12:56
* @Description: 会员渠道信息
*/
import React from 'react';
import { Row, Col, Descriptions } from 'antd';
import React, { useState } from 'react';
import { Row, Col, Descriptions, Button, message } from 'antd';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailBasicChannelResponse } from '@/services/MemberV2Api';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import ModifyChannelDrawer, { ValueType } from '../ModifyChannelDrawer';
import styles from './index.less';
interface IProps extends MellowCardProps {
......@@ -33,16 +36,88 @@ interface IProps extends MellowCardProps {
*/
desc: string,
},
/**
* 审核id
*/
validateId?: string,
/**
* 修改渠道信息之后触发事件
*/
onModifyAfter?: () => void,
}
const MemberChannelInfo: React.FC<IProps> = (props: IProps) => {
const { dataSource, ...rest } = props;
const { dataSource, validateId, onModifyAfter, ...rest } = props;
const [visibleDrawer, setVisibleDrawer] = useState(false);
const [channelInfo, setChannerlInfo] = useState<GetMemberAbilityMaintenanceDetailBasicChannelResponse>();
const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const handleVisibleDrawer = (flag?) => {
setVisibleDrawer(!!flag);
};
const handleModifyChannelInfo = () => {
if (!validateId) {
return;
}
setInfoLoading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasicChannel({
validateId,
}).then(res => {
if (res.code === 1000) {
setChannerlInfo(res.data);
handleVisibleDrawer(true);
}
}).finally(() => {
setInfoLoading(false);
});
};
const handleSubmit = (value: ValueType) => {
const { areaCodes, ...rest } = value;
setSubmitLoading(true);
const payload = {
validateId: +validateId,
areas: areaCodes,
...rest,
};
const msg = message.loading({
content: '正在提交,请稍候...',
duration: 0,
});
PublicApi.postMemberAbilityMaintenanceDetailBasicChannelUpdate(payload, {
timeout: 0,
}).then(res => {
if (res.code !== 1000) {
return;
}
handleVisibleDrawer(false);
onModifyAfter?.();
}).finally(() => {
msg();
setSubmitLoading(false);
});
};
return (
<MellowCard
title="渠道信息"
{...rest}
className={styles['channel-info']}
extra={(
<>
{validateId && (
<Button
type="link"
loading={infoLoading}
onClick={handleModifyChannelInfo}
>
修改
</Button>
)}
</>
)}
>
<Row gutter={16}>
<Col span={8}>
......@@ -74,6 +149,24 @@ const MemberChannelInfo: React.FC<IProps> = (props: IProps) => {
</Descriptions>
</Col>
</Row>
<ModifyChannelDrawer
visible={visibleDrawer}
onClose={() => handleVisibleDrawer(false)}
onSubmit={handleSubmit}
submitLoading={submitLoading}
channelInfo={{
upperMembers: channelInfo?.upperMembers,
channelTypes: channelInfo?.channelTypes,
}}
channelValue={{
upperRelationId: channelInfo?.upperRelationId,
channelTypeId: channelInfo?.channelTypeId,
channelLevel: channelInfo?.channelLevelTag,
areaCodes: channelInfo?.areaCodes,
remark: channelInfo?.remark,
}}
/>
</MellowCard>
);
};
......
......@@ -2,14 +2,19 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 16:10:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-11 15:56:24
* @LastEditTime: 2021-07-07 16:49:23
* @Description: 会员分类信息
*/
import React from 'react';
import React, { useState } from 'react';
import {
Descriptions,
Button,
message,
} from 'antd';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailRecordClassifyResponse } from '@/services/MemberV2Api';
import CustomizeColumn, { IProps as CustomizeColumnProps } from '@/components/CustomizeColumn';
import ModifyClassifyDrawer, { ValueType, FormValueType, PartnerTypesItem } from '../ModifyClassifyDrawer';
import styles from './index.less';
interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
......@@ -58,14 +63,86 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
*/
taxPoint: string,
}[],
}
},
/**
* 审核id
*/
validateId?: string,
/**
* 修改渠道信息之后触发事件
*/
onModifyAfter?: () => void,
}
const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
const {
dataSource,
validateId,
onModifyAfter,
...rest
} = props;
const [visibleDrawer, setVisibleDrawer] = useState(false);
const [classifyInfo, setClassifyInfo] = useState<FormValueType & { partnerTypes: PartnerTypesItem[] }>();
const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const handleVisibleDrawer = (flag?) => {
setVisibleDrawer(!!flag);
};
const handleModifyClassify = () => {
if (!validateId) {
return;
}
setInfoLoading(true);
PublicApi.getMemberAbilityMaintenanceDetailRecordClassify({
validateId,
}).then(res => {
if (res.code === 1000) {
setClassifyInfo({
code: res.data.code,
partnerType: res.data.partnerType,
maxAmount: res.data.maxAmount,
areaCodes: res.data.areaCodes,
categories: res.data.categories.map(({ names, paymentDay, taxPoint, ...rest }) => ({
category: names,
paymentDay: `${paymentDay}`,
taxPoint: +taxPoint,
...rest
})),
partnerTypes: res.data.partnerTypes,
});
handleVisibleDrawer(true);
}
}).finally(() => {
setInfoLoading(false);
});
};
const handleSubmit = (value: ValueType) => {
setSubmitLoading(true);
const payload = {
validateId: +validateId,
...value,
};
const msg = message.loading({
content: '正在提交,请稍候...',
duration: 0,
});
PublicApi.postMemberAbilityMaintenanceDetailRecordClassifyUpdate(payload, {
timeout: 0,
}).then(res => {
if (res.code !== 1000) {
return;
}
handleVisibleDrawer(false);
onModifyAfter?.();
}).finally(() => {
msg();
setSubmitLoading(false);
});
};
const data = [
{
......@@ -108,12 +185,37 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
},
},
];
return (
<CustomizeColumn
title="分类信息"
data={data}
{...rest}
/>
<>
<CustomizeColumn
title="分类信息"
data={data}
{...rest}
extra={(
<>
{validateId && (
<Button
type="link"
loading={infoLoading}
onClick={handleModifyClassify}
>
修改
</Button>
)}
</>
)}
/>
<ModifyClassifyDrawer
visible={visibleDrawer}
onClose={() => handleVisibleDrawer(false)}
onSubmit={handleSubmit}
submitLoading={submitLoading}
partnerTypes={classifyInfo?.partnerTypes}
value={classifyInfo}
/>
</>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 14:59:38
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-03 11:09:46
* @LastEditTime: 2021-07-07 18:05:05
* @Description: 会员考察信息
*/
import React from 'react';
......@@ -96,7 +96,7 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => {
<div className={styles['investigate-info-progress']}>
<Progress
type="dashboard"
percent={100}
percent={+dataSource?.score}
gapDegree={150}
strokeColor={strokeColor(dataSource?.score)}
width={80}
......@@ -122,7 +122,11 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => {
</Col>
<Col span={8}>
<Descriptions column={1}>
<Descriptions.Item label="考察报告" labelStyle={{ width: 106 }}>
<Descriptions.Item
label="考察报告"
labelStyle={{ width: 106 }}
contentStyle={{ display: 'block', overflow: 'hidden' }}
>
<UploadFiles
fileList={dataSource && dataSource.reports ? dataSource.reports.map((item) => normalizeFiledata(item.url)) : []}
disable
......
/*
* @Author: XieZhiXiong
* @Date: 2021-07-07 13:47:02
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 15:16:50
* @Description: 修改渠道信息 抽屉
*/
import React, { useEffect } from 'react';
import {
Drawer,
Button,
} from 'antd';
import { DatePicker } from '@formily/antd-components';
import {
createFormActions,
createAsyncFormActions,
FormEffectHooks,
FormPath,
} from '@formily/antd';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { PublicApi } from '@/services/api';
import NiceForm from '@/components/NiceForm';
import { schema } from './schema';
export type AreaCodesType = {
/**
* 省编码
*/
provinceCode: string,
/**
* 市编码
*/
cityCode: string,
}
export type ValueType = {
/**
* 渠道类型Id,当会员是渠道会员时必填
*/
channelTypeId: number,
/**
* 上级会员Id,当会员是渠道会员时要大于等于0
*/
upperRelationId: number,
/**
* 上级会员Id,当会员是渠道会员时要大于等于0
*/
areaCodes: AreaCodesType[],
/**
* 渠道描述
*/
remark: string,
}
interface IProps {
/**
* 是否可见
*/
visible: boolean,
/**
* Form 确认事件
*/
onSubmit: (values: ValueType) => void,
/**
* 抽屉关闭事件
*/
onClose: () => void,
/**
* 渠道信息
*/
channelInfo: {
/**
* 上级会员列表
*/
upperMembers: {
/**
* 上级会员关系Id
*/
upperRelationId: number,
/**
* 上级会员公司名称+角色名称
*/
name: string,
}[],
/**
* 渠道类型
*/
channelTypes: {
/**
* 渠道类型Id
*/
channelTypeId: number,
/**
* 渠道类型名称
*/
channelTypeName: string,
}[],
},
/**
* 渠道信息值
*/
channelValue: {
/**
* 已经选择的上级会员关系Id
*/
upperRelationId: number,
/**
* 渠道类型
*/
channelTypeId: number,
/**
* 渠道信息-渠道级别
*/
channelLevel: string,
/**
* 代理城市编码列表
*/
areaCodes: AreaCodesType[],
/**
* 渠道信息-渠道描述
*/
remark: string,
},
/**
* 确认按钮 loading
*/
submitLoading: boolean,
}
const formActions = createAsyncFormActions();
const {
onFieldValueChange$,
onFieldInputChange$,
onFormInputChange$,
} = FormEffectHooks;
const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
const {
visible,
onSubmit,
onClose,
channelInfo,
channelValue,
submitLoading,
} = props;
useEffect(() => {
if (!channelInfo) {
return;
}
let {
upperMembers,
channelTypes,
} = channelInfo;
upperMembers = upperMembers || [];
channelTypes = channelTypes || [];
const channelType = channelTypes.map(item => ({ label: item.channelTypeName, value: item.channelTypeId }));
// 渠道上级id,如果没有也是返回只有一项的数组
if (upperMembers.length === 1 && !upperMembers[0].upperRelationId) {
formActions.setFieldState('upperRelationId', state => {
FormPath.setIn(state, 'visible', false);
});
} else {
const upperMembersOptions = upperMembers.map(item => ({ label: item.name, value: item.upperRelationId }));
formActions.setFieldState('upperRelationId', state => {
FormPath.setIn(state, 'props.enum', upperMembersOptions);
});
}
formActions.setFieldState('channelTypeId', state => {
FormPath.setIn(state, 'props.enum', channelType);
});
}, [channelInfo]);
const handleClose = () => {
if (onClose) {
onClose();
}
};
const handleSubmit = (values: ValueType) => {
if (onSubmit) {
const { upperRelationId, ...rest } = values;
onSubmit({ upperRelationId: upperRelationId || 0, ...rest });
}
};
const useBusinessEffects = () => {
const linkage = useLinkageUtils();
// 渠道上级改变时,请求出对应的省级数据
onFieldInputChange$('upperRelationId').subscribe(fieldState => {
// 清空渠道原来数据
linkage.value('areaCodes', []);
});
// 渠道上级改变时,请求出对应的省级数据
onFieldValueChange$('upperRelationId').subscribe(fieldState => {
if (fieldState.value === undefined) {
return;
}
PublicApi.getMemberAbilityMaintenanceDetailBasicChannelProvince({
upperRelationId: fieldState.value,
}).then(res => {
if (res.code === 1000) {
const { data = [] } = res;
const options = data.map(item => ({ label: item.name, value: item.code }));
formActions.setFieldState('areaCodes.*.provinceCode', state => {
FormPath.setIn(state, 'props.enum', options);
});
}
});
});
// 省级改变时,,请求出对应的市级数据
onFieldInputChange$('areaCodes.*.provinceCode').subscribe(fieldState => {
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'value', undefined);
}
);
});
// 省级改变时,,请求出对应的市级数据
onFieldValueChange$('areaCodes.*.provinceCode').subscribe(async (fieldState) => {
if (fieldState.value === undefined) {
return;
}
const upperRelationValue = await formActions.getFieldValue('upperRelationId');
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'props.x-props.hasFeedback', true);
FormPath.setIn(state, 'loading', true);
}
);
PublicApi.getMemberAbilityMaintenanceDetailBasicChannelCity({
upperRelationId: upperRelationValue,
provinceCode: fieldState.value,
}).then(res => {
if (res.code === 1000) {
const { data = [] } = res;
const options = data.map(item => ({ label: item.name, value: item.code }));
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'props.enum', options);
FormPath.setIn(state, 'loading', false);
}
);
}
});
});
}
return (
<Drawer
title="修改渠道信息"
width={600}
onClose={handleClose}
visible={visible}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={handleClose} style={{ marginRight: 16 }}>
取 消
</Button>
<Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
确 定
</Button>
</div>
}
>
<NiceForm
previewPlaceholder="' '"
initialValues={channelValue}
components={{
DatePicker,
}}
effects={($, { setFieldState }) => {
useBusinessEffects();
}}
actions={formActions}
schema={schema}
onSubmit={values => handleSubmit(values)}
/>
</Drawer>
);
};
export default VerifyComingDataDrawer;
/*
* @Author: XieZhiXiong
* @Date: 2021-07-07 13:48:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 13:48:36
* @Description:
*/
import { ISchema } from '@formily/antd';
export const schema: ISchema = {
type: 'object',
properties: {
INVESTIGATE_INFO: {
type: 'object',
'x-component': 'FlagBox',
'x-component-props': {
title: '渠道信息',
},
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 20,
labelAlign: 'left',
},
properties: {
upperRelationId: {
type: 'string',
enum: [],
title: '上级渠道',
required: true,
'x-component-props': {
},
},
channelLevel: {
type: 'text',
title: '渠道级别',
},
channelTypeId: {
type: 'string',
enum: [],
title: '渠道类型',
required: true,
'x-component-props': {
},
},
areaCodes: {
type: 'array',
title: '代理城市',
'x-component': 'CustomAddArray',
default: [],
items: {
type: 'object',
properties: {
provinceCode: {
type: 'string',
enum: [],
'x-component-props': {
allowClear: true,
},
},
cityCode: {
type: 'string',
enum: [],
'x-component-props': {
allowClear: true,
},
}
}
}
},
remark: {
type: 'string',
title: '渠道描述',
required: true,
'x-component': 'TextArea',
'x-component-props': {
rows: 4,
placeholder: '最大200个字符,100个汉字',
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
},
},
},
},
},
};
\ No newline at end of file
@import '~antd/es/style/themes/default.less';
.description {
color: @text-color-secondary;
}
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-07-07 15:21:00
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 18:12:33
* @Description: 修改入库分类信息 抽屉
*/
import React, { useEffect } from 'react';
import {
Drawer,
Button,
} from 'antd';
import NiceForm from '@/components/NiceForm';
import {
createFormActions,
createAsyncFormActions,
FormEffectHooks,
FormPath,
} from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { ArrayCards } from '@formily/antd-components';
import { schema } from './schema';
import CascaderFormItem from '../CascaderFormItem';
import styles from './index.less';
type CategoriesType = {
/**
* 品类名称
*/
names: string[],
/**
* 付款周期(天)
*/
paymentDay: number,
/**
* 发票类型名称
*/
invoiceTypeName: string,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint: number,
}
export type ValueType = {
/**
* 会员编码
*/
code: string,
/**
* 合作关系类型枚举
*/
partnerType: number,
/**
* 单次合作金额
*/
maxAmount: number,
/**
* 适用区域编码列表
*/
areaCodes: {
/**
* 省编码
*/
provinceCode: string,
/**
* 市编码
*/
cityCode: string,
}[],
/**
* 主营品类列表
*/
categories: CategoriesType[],
}
export interface FormValueType extends Omit<ValueType, ('maxAmount' | 'categories')> {
/**
* 单次合作金额
*/
maxAmount: string,
/**
* 主营品类列表
*/
categories: {
/**
* 已选品类
*/
category: string[],
/**
* 付款周期(天)
*/
paymentDay: string,
/**
* 发票类型名称
*/
invoiceTypeName: string,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint: number,
}[],
}
interface CategoryItem {
/**
* 数据id
*/
id: string,
/**
* 父级id
*/
parentId: string,
/**
* 标题
*/
title: string,
/**
* 是否选中
*/
checked: boolean,
/**
* 图片url路径
*/
imageUrl: string,
/**
* 子元素
*/
children: CategoryItem[],
}
type CategoryType = {
/**
* label
*/
label: string,
/**
* 值
*/
value: string,
/**
* 子元素
*/
children: CategoryType[],
}
export type PartnerTypesItem = {
/**
* label
*/
label: string,
/**
* value
*/
value: number,
}
interface IProps {
/**
* 是否可见
*/
visible: boolean,
/**
* Form 确认事件
*/
onSubmit: (values: ValueType) => void,
/**
* 抽屉关闭事件
*/
onClose: () => void,
/**
* 合作关系
*/
partnerTypes: PartnerTypesItem[],
value: FormValueType,
/**
* 确认按钮 loading
*/
submitLoading: boolean,
}
const formActions = createAsyncFormActions();
const {
onFormInit$,
onFieldValueChange$,
onFieldInputChange$,
} = FormEffectHooks;
const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
const {
visible,
onSubmit,
onClose,
partnerTypes,
submitLoading,
} = props;
useEffect(() => {
if (partnerTypes && partnerTypes.length) {
formActions.setFieldState('partnerType', state => {
FormPath.setIn(state, 'props.enum', partnerTypes);
});
}
}, [partnerTypes]);
const handleClose = () => {
if (onClose) {
onClose();
}
};
const handleSubmit = (values: FormValueType) => {
if (onSubmit) {
const { maxAmount, categories, ...rest } = values;
const formated = categories.map((item) => ({
names: item.category,
paymentDay: +item.paymentDay,
invoiceTypeName: item.invoiceTypeName,
taxPoint: +item.taxPoint,
}));
onSubmit({
maxAmount: +maxAmount,
categories: formated,
...rest,
});
}
};
const MemberCodeDescription = (
<div className={styles.description}>
<div>长度最多10位,不可重复</div>
<div>不支持特殊符号(除英文"_-";下划线和中划线)</div>
</div>
);
const MemberCypher = (
<div className={styles.description}>
<div>允许单次采购最大金额</div>
</div>
);
const useBusinessEffects = () => {
// 省级改变时,,请求出对应的市级数据
onFieldInputChange$('areaCodes.*.provinceCode').subscribe(fieldState => {
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'value', undefined);
}
);
});
// 省级改变时,,请求出对应的市级数据
onFieldValueChange$('areaCodes.*.provinceCode').subscribe((fieldState) => {
if (fieldState.value === undefined) {
return;
}
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'props.x-props.hasFeedback', true);
FormPath.setIn(state, 'loading', true);
}
);
PublicApi.getMemberAbilityMaintenanceDetailRecordClassifyCity({
provinceCode: fieldState.value,
}).then(res => {
if (res.code === 1000) {
const { data = [] } = res;
const options = data.map(item => ({ label: item.name, value: item.code }));
formActions.setFieldState(
FormPath.transform(fieldState.name, /\d/, $1 => `areaCodes.${$1}.cityCode`),
state => {
FormPath.setIn(state, 'props.enum', options);
FormPath.setIn(state, 'loading', false);
}
);
}
});
});
}
return (
<Drawer
title="入库分类信息"
width={620}
onClose={handleClose}
visible={visible}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={handleClose} style={{ marginRight: 16 }}>
取 消
</Button>
<Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
确 定
</Button>
</div>
}
>
<NiceForm
previewPlaceholder="' '"
components={{
ArrayCards,
CascaderFormItem,
}}
expressionScope={{
MemberCodeDescription,
MemberCypher,
}}
effects={($, { setFieldState }) => {
useBusinessEffects();
onFormInit$().subscribe(() => {
// 请求省级数据
PublicApi.getMemberAbilityMaintenanceDetailRecordClassifyProvince().then(res => {
if (res.code === 1000) {
const { data = [] } = res;
const options = data.map(item => ({ label: item.name, value: item.code }));
formActions.setFieldState('areaCodes.*.provinceCode', state => {
FormPath.setIn(state, 'props.enum', options);
});
}
});
// 请求会员品类数据
PublicApi.getProductCustomerGetCustomerCategoryTree().then(res => {
if (res.code === 1000) {
const { data = [] } = res;
formActions.setFieldState('categories.*.category', state => {
FormPath.setIn(state, 'props.x-component-props.options', data);
});
}
});
});
}}
actions={formActions}
schema={schema}
onSubmit={values => handleSubmit(values)}
/>
</Drawer>
);
};
export default ComingClassifyDrawer;
/*
* @Author: XieZhiXiong
* @Date: 2021-07-07 15:23:11
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 15:23:11
* @Description:
*/
import { ISchema } from '@formily/antd';
import {
MEMBER_INVOICE_TYPE_1,
MEMBER_INVOICE_TYPE_2,
MEMBER_INVOICE_TYPE_3,
MEMBER_INVOICE_TYPE_4,
MEMBER_INVOICE_TYPE_5,
MEMBER_INVOICE_TYPE,
MEMBER_TAX_POINT_1,
MEMBER_TAX_POINT_2,
MEMBER_TAX_POINT_3,
MEMBER_TAX_POINT_4,
MEMBER_TAX_POINT_5,
MEMBER_TAX_POINT,
} from '@/constants/member';
import { PATTERN_MAPS } from '@/constants/regExp';
export const schema: ISchema = {
type: 'object',
properties: {
INVESTIGATE_INFO: {
type: 'object',
'x-component': 'FlagBox',
'x-component-props': {
title: '入库分类信息',
},
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 20,
labelAlign: 'left',
},
properties: {
code: {
type: 'string',
title: '会员编码',
required: true,
description: '{{MemberCodeDescription}}',
'x-rules': [
{
pattern: /^[a-zA-Z0-9_-]{1,10}$/,
message: '请输入数字、英文、_-,最多支持10个字符',
},
],
},
partnerType: {
type: 'string',
enum: [],
title: '合作关系',
'x-component-props': {
placeholder: '请选择',
},
required: true,
},
maxAmount: {
type: 'string',
title: '单次合作金额',
required: true,
'x-component-props': {
addonBefore: '¥',
},
description: '{{MemberCypher}}',
'x-rules': [
{
pattern: PATTERN_MAPS.money,
message: '请输入数值,最多支持小数点后两位',
},
],
},
areaCodes: {
type: 'array',
title: '适用区域',
required: true,
'x-component': 'CustomAddArray',
default: [],
items: {
type: 'object',
properties: {
provinceCode: {
type: 'string',
enum: [],
'x-component-props': {
allowClear: true,
},
},
cityCode: {
type: 'string',
enum: [],
'x-component-props': {
allowClear: true,
},
}
}
}
},
categories: {
type: 'array',
title: '主营品类',
required: true,
'x-component': 'ArrayCards',
'x-component-props': {
title: ' ',
renderMoveDown: () => null,
renderMoveUp: () => null,
},
items: {
type: 'object',
'x-mega-props': {
labelCol: 5,
wrapperCol: 19,
},
properties: {
category: {
type: 'string',
title: '品类',
'x-component': 'CascaderFormItem',
'x-component-props': {
fieldNames: { label: 'title', value: 'title', children: 'children' },
},
required: true,
},
// CATEGORY_LAYOUT: {
// type: 'object',
// 'x-component': 'Mega-Layout',
// 'x-component-props': {
// grid: true,
// full: true,
// autoRow: true,
// columns: 3,
// label: '品类',
// },
// properties: {
// aaa: {
// type: 'string',
// 'x-component': 'CascaderFormItem',
// 'x-component-props': {
// },
// },
// provinceId: {
// type: 'string',
// enum: [],
// 'x-component-props': {
// placeholder: '请选择',
// },
// required: true,
// },
// cityId: {
// type: 'string',
// enum: [],
// 'x-component-props': {
// placeholder: '请选择',
// },
// required: true,
// },
// areaId: {
// type: 'string',
// enum: [],
// 'x-component-props': {
// placeholder: '请选择',
// },
// required: true,
// },
// },
// },
paymentDay: {
type: 'string',
title: '付款周期(天)',
required: true,
'x-rules': [
{
pattern: /^([0]|[1-9][0-9]*)$/,
message: '请输入0 或 正整数',
},
],
},
invoiceTypeName: {
type: 'string',
enum: [
{
label: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_1],
value: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_1],
},
{
label: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_2],
value: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_2],
},
{
label: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_3],
value: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_3],
},
{
label: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_4],
value: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_4],
},
{
label: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_5],
value: MEMBER_INVOICE_TYPE[MEMBER_INVOICE_TYPE_5],
},
],
title: '发票类型',
required: true,
},
taxPoint: {
type: 'string',
title: '税点',
enum: [
{
label: MEMBER_TAX_POINT[MEMBER_TAX_POINT_1],
value: MEMBER_TAX_POINT_1,
},
{
label: MEMBER_TAX_POINT[MEMBER_TAX_POINT_2],
value: MEMBER_TAX_POINT_2,
},
{
label: MEMBER_TAX_POINT[MEMBER_TAX_POINT_3],
value: MEMBER_TAX_POINT_3,
},
{
label: MEMBER_TAX_POINT[MEMBER_TAX_POINT_4],
value: MEMBER_TAX_POINT_4,
},
{
label: MEMBER_TAX_POINT[MEMBER_TAX_POINT_5],
value: MEMBER_TAX_POINT_5,
},
],
required: true,
},
},
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -248,6 +248,10 @@ const MemberArchiveInfo = () => {
getArchiveInfo();
}, []);
const handleModifyAfter = () => {
getArchiveInfo();
};
return (
<Spin spinning={loading}>
<Row gutter={[16, 16]}>
......@@ -255,6 +259,8 @@ const MemberArchiveInfo = () => {
<Col span={24}>
<MemberDocCategory
dataSource={archiveInfo?.classification}
validateId={validateId}
onModifyAfter={handleModifyAfter}
id="categoryInfo"
/>
</Col>
......
......@@ -2,16 +2,19 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-20 14:28:31
* @LastEditTime: 2021-07-07 15:17:21
* @Description: 会员基础信息详情
*/
import React from 'react';
import React, { useState } from 'react';
import {
Row,
Col,
Spin,
} from 'antd';
import { observer, inject } from 'mobx-react';
import { IMemberModule } from '@/module/memberModule';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import {
MEMBER_TYPE_CHANNEL_CORPORATE,
MEMBER_TYPE_CHANNEL_INDIVIDUAL,
......@@ -35,100 +38,128 @@ const MemberBasicInfo: React.FC<MemberBasicInfoProps> = ({
MemberStore,
}) => {
const { memberInfo } = MemberStore;
return (
<Row gutter={[16, 16]}>
{/* 会员审核流程 */}
<Col span={24}>
<AuditProcess
outerVerifySteps={memberInfo?.outerVerifySteps}
outerVerifyCurrent={memberInfo?.currentOuterStep}
innerVerifySteps={memberInfo?.innerVerifySteps}
innerVerifyCurrent={memberInfo?.currentInnerStep}
id="verifySteps"
/>
</Col>
{/* 基本信息 */}
<Col span={24}>
<BasicInfo
dataSource={{
memberId: memberInfo?.memberId,
memberTypeName: memberInfo?.memberTypeName,
account: memberInfo?.account,
name: memberInfo?.name,
roleName: memberInfo?.roleName,
phone: memberInfo?.phone,
outerStatus: memberInfo?.outerStatus,
outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag,
email: memberInfo?.email,
createTime: memberInfo?.createTime,
}}
id="basicInfo"
/>
</Col>
{/* 渠道信息 */}
{
memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_CORPORATE
|| memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_INDIVIDUAL
? (
<Col span={24}>
<MemberChannelInfo
dataSource={{
level: memberInfo?.channelLevelTag,
type: memberInfo?.channelTypeName,
areas: memberInfo?.areas,
desc: memberInfo?.remark,
}}
id="channelInfo"
/>
</Col>
)
: null
}
const { id, validateId } = usePageStatus();
const [infoLoading, setInfoLoading] = useState(false);
{/* 其他注册信息 */}
{
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => (
<Col span={24} key={`group${index}`}>
<CustomizeColumn
title={item.groupName}
data={(
item.elements.map((ele) => ({
title: ele.fieldLocalName,
value: (
ele.fieldType !== 'upload'
? ele.fieldValue
: (
<PicWrap
pics={[ele.fieldValue]}
/>
)
),
}))
)}
id={`group${index}`}
/>
</Col>
))
: null
const getBasicInfo = () => {
if (!validateId) {
return;
}
setInfoLoading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({
validateId,
}).then(res => {
if (res.code !== 1000) {
return;
}
MemberStore.setMemberInfo(res.data);
}).finally(() => {
setInfoLoading(false);
});
};
const handleModifyAfter = () => {
getBasicInfo();
};
return (
<Spin spinning={infoLoading}>
<Row gutter={[16, 16]}>
{/* 会员审核流程 */}
<Col span={24}>
<AuditProcess
outerVerifySteps={memberInfo?.outerVerifySteps}
outerVerifyCurrent={memberInfo?.currentOuterStep}
innerVerifySteps={memberInfo?.innerVerifySteps}
innerVerifyCurrent={memberInfo?.currentInnerStep}
id="verifySteps"
/>
</Col>
{/* 基本信息 */}
<Col span={24}>
<BasicInfo
dataSource={{
memberId: memberInfo?.memberId,
memberTypeName: memberInfo?.memberTypeName,
account: memberInfo?.account,
name: memberInfo?.name,
roleName: memberInfo?.roleName,
phone: memberInfo?.phone,
outerStatus: memberInfo?.outerStatus,
outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag,
email: memberInfo?.email,
createTime: memberInfo?.createTime,
}}
id="basicInfo"
/>
</Col>
{/* 渠道信息 */}
{
memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_CORPORATE
|| memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_INDIVIDUAL
? (
<Col span={24}>
<MemberChannelInfo
dataSource={{
level: memberInfo?.channelLevelTag,
type: memberInfo?.channelTypeName,
areas: memberInfo?.areas,
desc: memberInfo?.remark,
}}
validateId={memberInfo?.validateId}
onModifyAfter={handleModifyAfter}
id="channelInfo"
/>
</Col>
)
: null
}
{/* 其他注册信息 */}
{
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => (
<Col span={24} key={`group${index}`}>
<CustomizeColumn
title={item.groupName}
data={(
item.elements.map((ele) => ({
title: ele.fieldLocalName,
value: (
ele.fieldType !== 'upload'
? ele.fieldValue
: (
<PicWrap
pics={[ele.fieldValue]}
/>
)
),
}))
)}
id={`group${index}`}
/>
</Col>
))
: null
}
{/* 流转记录 */}
<Col span={24}>
<FlowRecords
outerColumns={MEMBER_OUTER_COLUMNS}
innerColumns={MEMBER_INNER_COLUMNS}
outerRowkey="id"
innerRowkey="id"
outerDataSource={memberInfo?.outerHistory}
innerDataSource={memberInfo?.innerHistory}
id="flowRecords"
/>
</Col>
</Row>
{/* 流转记录 */}
<Col span={24}>
<FlowRecords
outerColumns={MEMBER_OUTER_COLUMNS}
innerColumns={MEMBER_INNER_COLUMNS}
outerRowkey="id"
innerRowkey="id"
outerDataSource={memberInfo?.outerHistory}
innerDataSource={memberInfo?.innerHistory}
id="flowRecords"
/>
</Col>
</Row>
</Spin>
);
};
......
@import '~antd/es/style/themes/default.less';
.description {
margin-bottom: @margin-md;
color: @text-color-secondary;
}
\ No newline at end of file
......@@ -21,7 +21,7 @@ import { PublicApi } from '@/services/api';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { ArrayCards } from '@formily/antd-components';
import { schema } from './schema';
import CascaderFormItem from '../CascaderFormItem';
import CascaderFormItem from '../../../components/CascaderFormItem';
import styles from './index.less';
type CategoriesType = {
......
......@@ -79,21 +79,6 @@ const MemberPrComingClassify: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -79,21 +79,6 @@ const MemberPrComingInvestigate: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 10:26:20
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-04 14:21:24
* @LastEditTime: 2021-07-07 17:28:10
* @Description: 待审核会员变更(一级)
*/
import React, { useState, useRef } from 'react';
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChange1: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChange1/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange1/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange1/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChange1: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChange2: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChange2/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange2/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange2/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChange2: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChangeConfrim: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChangeConfrim: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -120,21 +120,6 @@ const MemberPrVerifyComing1: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -120,21 +120,6 @@ const MemberPrVerifyComing2: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -120,21 +120,6 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -2,10 +2,10 @@
* @Author: XieZhiXiong
* @Date: 2021-06-01 18:15:20
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-05 15:40:34
* @LastEditTime: 2021-07-07 17:30:27
* @Description: 修改入库资料抽屉
*/
import React, { useEffect, useImperativeHandle } from 'react';
import React, { useImperativeHandle } from 'react';
import {
Drawer,
Button,
......@@ -88,6 +88,7 @@ const ChangeComingDataDrawer: React.ForwardRefRenderFunction<RefHandle, IProps>
</Button>
</div>
}
forceRender
>
<NiceForm
previewPlaceholder="' '"
......
......@@ -187,11 +187,14 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
}
const {
channelLevel,
channelTypeId,
} = channelValue;
formActions.setFieldState('INVESTIGATE_INFO', state => {
FormPath.setIn(state, 'visible', !!channelLevel);
});
if (channelTypeId && !channelLevel) {
formActions.setFieldState('INVESTIGATE_INFO', state => {
FormPath.setIn(state, 'visible', false);
});
}
}, [channelValue]);
const handleClose = () => {
......
......@@ -50,7 +50,7 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
},
]);
const [columns, columnsHandle] = useSpliceArray<ColumnType<any>>(defaultColumns);
const [columns] = useSpliceArray<ColumnType<any>>(defaultColumns);
const rowSelection = {
onChange: (keys: number[]) => {
......@@ -120,21 +120,6 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -120,21 +120,6 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => {
sources = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 15:59:34
* @LastEditTime: 2021-07-07 17:06:17
* @Description: 会员基础信息详情
*/
import React from 'react';
......@@ -90,8 +90,8 @@ const MemberBasicInfo: React.FC<MemberBasicInfoProps> = ({
{/* 其他注册信息 */}
{
memberInfo && memberInfo.registerDetails
? memberInfo.registerDetails.map((item, index) => (
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => (
<Col span={24} key={`group${index}`}>
<CustomizeColumn
title={item.groupName}
......
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