Commit 151286eb authored by XieZhiXiong's avatar XieZhiXiong

chore: 完善代码逻辑

parent 0957b219
...@@ -73,7 +73,7 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det ...@@ -73,7 +73,7 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
title: '内部状态', title: '内部状态',
dataIndex: 'innerStatusName', dataIndex: 'innerStatusName',
align: 'center', align: 'center',
render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus]} text={text} />, render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus] || '#606266'} text={text} />,
}, },
]); ]);
......
...@@ -24,10 +24,7 @@ const verifyComingSchema: ISchema = { ...@@ -24,10 +24,7 @@ const verifyComingSchema: ISchema = {
properties: { properties: {
ctl: { ctl: {
type: 'object', type: 'object',
'x-component': 'Children', 'x-component': 'ControllerBtns',
'x-component-props': {
children: '{{controllerBtns}}',
},
}, },
name: { name: {
type: 'string', type: 'string',
......
...@@ -12,29 +12,77 @@ import { ...@@ -12,29 +12,77 @@ import {
import CustomizeColumn, { IProps as CustomizeColumnProps } from '@/components/CustomizeColumn'; import CustomizeColumn, { IProps as CustomizeColumnProps } from '@/components/CustomizeColumn';
import styles from './index.less'; import styles from './index.less';
interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {} interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
/**
* 数据源
*/
dataSource: {
/**
* 会员编码
*/
code: string,
/**
* 合作关系名称
*/
partnerTypeName: string,
/**
* 单次合作金额
*/
maxAmount: string,
/**
* 适用区域
*/
classifyAreas: string[],
/**
* 主营品类
*/
categories: {
/**
* 数据id
*/
id: number,
/**
* 品类名称
*/
name: string,
/**
* 付款周期(天)
*/
paymentDay: number,
/**
* 发票类型名称
*/
invoiceTypeName: string,
/**
* 税点,百分比的分子部分
*/
taxPoint: string,
}[],
}
}
const MemberDocCategory: React.FC<IProps> = (props: IProps) => { const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
const { const {
dataSource,
...rest ...rest
} = props; } = props;
const data = [ const data = [
{ {
title: '会员编号', title: '会员编号',
value: 'GD00001', value: dataSource?.code || '',
}, },
{ {
title: '单次合作金额', title: '单次合作金额',
value: '¥ 900,000.00', value: dataSource && dataSource.maxAmount ? ${dataSource.maxAmount}` : '',
}, },
{ {
title: '适用区域', title: '适用区域',
value: '广东省/广州市;江西省', value: dataSource && dataSource.classifyAreas ? dataSource.classifyAreas.join(';') : '',
}, },
{ {
title: '会员关系', title: '会员关系',
value: '战略型', value: dataSource?.partnerTypeName || '',
columnProps: { columnProps: {
span: 3, span: 3,
}, },
...@@ -43,22 +91,16 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => { ...@@ -43,22 +91,16 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
title: '主营品类', title: '主营品类',
value: ( value: (
<ul className={styles['category-list']}> <ul className={styles['category-list']}>
<li className={styles['category-list-item']}> {dataSource?.categories.map((item) => (
<Descriptions column={1}> <li className={styles['category-list-item']} key={item.id}>
<Descriptions.Item label="品类">广告行业</Descriptions.Item> <Descriptions column={1}>
<Descriptions.Item label="付款周期(天)">30</Descriptions.Item> <Descriptions.Item label="品类">{item.name}</Descriptions.Item>
<Descriptions.Item label="发票类型">增值税专用发票</Descriptions.Item> <Descriptions.Item label="付款周期(天)">{item.paymentDay}</Descriptions.Item>
<Descriptions.Item label="税点">30%</Descriptions.Item> <Descriptions.Item label="发票类型">{item.invoiceTypeName}</Descriptions.Item>
</Descriptions> <Descriptions.Item label="税点">{item.taxPoint}%</Descriptions.Item>
</li> </Descriptions>
<li className={styles['category-list-item']}> </li>
<Descriptions column={1}> ))}
<Descriptions.Item label="品类">广告行业</Descriptions.Item>
<Descriptions.Item label="付款周期(天)">30</Descriptions.Item>
<Descriptions.Item label="发票类型">增值税专用发票</Descriptions.Item>
<Descriptions.Item label="税点">30%</Descriptions.Item>
</Descriptions>
</li>
</ul> </ul>
), ),
columnProps: { columnProps: {
......
...@@ -2,104 +2,73 @@ ...@@ -2,104 +2,73 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-21 17:14:39 * @Date: 2021-05-21 17:14:39
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 11:19:51 * @LastEditTime: 2021-06-03 10:34:49
* @Description: 会员入库信息 * @Description: 会员入库信息
*/ */
import React from 'react'; import React from 'react';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import CustomizeColumn, { IProps as CustomizeColumnProps } from '@/components/CustomizeColumn'; import CustomizeColumn, { IProps as CustomizeColumnProps, DataItem } from '@/components/CustomizeColumn';
import styles from './index.less'; import styles from './index.less';
interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {} interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
/**
* 数据
*/
dataSource: {
/**
* 分组名
*/
groupName: string,
/**
*
*/
elements: {
/**
* 分组内的字段顺序
*/
fieldOrder?: number,
/**
* 字段中文名称
*/
fieldLocalName?: string,
/**
* 字段值
*/
fieldValue?: string,
/**
* 修改之前的值,如果没有为空字符串
*/
lastValue?: string,
}[],
}[],
}
const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => { const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
const { const {
dataSource = [],
...rest ...rest
} = props; } = props;
const data = [ const data: DataItem[] = [];
{
title: '商业模式', dataSource.forEach((item) => {
value: ( item.elements.forEach((ele) => {
<div className={styles.changed}> data.push({
生产商 title: ele.fieldLocalName,
<Tooltip title={`变更前:${'加工商'}`}> value: (
<span className={styles.new}>NEW</span> <div className={styles.changed}>
</Tooltip> {ele.fieldValue}
</div> {ele.lastValue && (
), <Tooltip title={`变更前:${ele.lastValue}`}>
}, <span className={styles.new}>NEW</span>
{ </Tooltip>
title: '工厂数量', )}
value: ( </div>
<div className={styles.changed}> ),
3 });
<Tooltip title={`变更前:${'加工商'}`}> });
<span className={styles.new}>NEW</span> });
</Tooltip>
</div>
),
},
{
title: '主要合作伙伴',
value: (
<div className={styles.changed}>
安踏
<Tooltip title={`变更前:${'Nike'}`}>
<span className={styles.new}>NEW</span>
</Tooltip>
</div>
),
},
{
title: '主营行业',
value: '制造行业;批发和零售业',
},
{
title: '生产厂地',
value: '中国浙江省温州市',
},
{
title: '代表性合作项目',
value: '安踏',
},
{
title: '主营品类',
value: '服装鞋帽;纸质批发;农副产品',
},
{
title: '设备数量',
value: '100',
},
{
title: '代理品牌',
value: '安踏',
},
{
title: '公司规模',
value: '中小企业',
},
{
title: '是否一般纳税人',
value: '是',
},
{
title: '优势资源',
value: '安踏',
},
{
title: '工厂面积',
value: '500平方米',
},
{
title: '公司简介',
value: '一家集研发、生产、销售和服务于一体的专业标牌生产厂家。注册资金…',
},
{
title: '其他',
value: '安踏',
},
];
return ( return (
<CustomizeColumn <CustomizeColumn
title="入库信息" title="入库信息"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
transform: translate(-50%, 0); transform: translate(-50%, 0);
color: @text-color-secondary; color: @text-color-secondary;
font-size: @font-size-sm; font-size: @font-size-sm;
white-space: nowrap;
> span { > span {
color: @text-color; color: @text-color;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 14:59:38 * @Date: 2021-05-25 14:59:38
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 15:38:37 * @LastEditTime: 2021-06-03 11:09:46
* @Description: 会员考察信息 * @Description: 会员考察信息
*/ */
import React from 'react'; import React from 'react';
...@@ -13,16 +13,76 @@ import { ...@@ -13,16 +13,76 @@ import {
Progress, Progress,
Upload, Upload,
} from 'antd'; } from 'antd';
import { normalizeFiledata } from '@/utils';
import MellowCard, { MellowCardProps } from '@/components/MellowCard'; import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import UploadFiles from '@/components/UploadFiles/UploadFiles';
import styles from './index.less'; import styles from './index.less';
interface IProps extends MellowCardProps {} interface IProps extends MellowCardProps {
/**
* 数据
*/
dataSource: {
/**
* 考察日期
*/
inspectDay: string,
/**
* 考察评分
*/
score: string,
/**
* 考察结果
*/
result: string,
/**
* 考察结果
*/
reports: {
/**
* 文件名
*/
name: string,
/**
* 文件Url
*/
url: string,
}[],
},
}
const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => { const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => {
const { const {
dataSource,
...rest ...rest
} = props; } = props;
const strokeColor = (score: string) => {
const numScore = +score;
if (numScore >= 0 && numScore <= 39) {
return {
'0%': '#D32F2F',
'100%': '#F18E8E',
};
}
if (40 >= 0 && numScore <= 59) {
return {
'0%': '#EA8000',
'100%': '#EBBD86',
};
}
if (60 >= 0 && numScore <= 79) {
return {
'0%': '#2266EE',
'100%': '#83A5E8',
};
}
return {
'0%': '#00B37A',
'100%': '#82DFC1',
};
};
return ( return (
<MellowCard <MellowCard
title="考察信息" title="考察信息"
...@@ -38,15 +98,12 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => { ...@@ -38,15 +98,12 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => {
type="dashboard" type="dashboard"
percent={100} percent={100}
gapDegree={150} gapDegree={150}
strokeColor={{ strokeColor={strokeColor(dataSource?.score)}
'0%': '#00B37A',
'100%': '#82DFC1',
}}
width={80} width={80}
showInfo={false} showInfo={false}
/> />
<div className={styles['investigate-info-progress-text']}> <div className={styles['investigate-info-progress-text']}>
<span>80</span> <span>{dataSource?.score}</span>
</div> </div>
</div> </div>
...@@ -56,17 +113,20 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => { ...@@ -56,17 +113,20 @@ const MemberInvestigateInfo: React.FC<IProps> = (props: IProps) => {
<Col span={8}> <Col span={8}>
<Descriptions column={1}> <Descriptions column={1}>
<Descriptions.Item label="考察日期" labelStyle={{ width: 106 }}> <Descriptions.Item label="考察日期" labelStyle={{ width: 106 }}>
2020-02-19 {dataSource?.inspectDay}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="考察结果" labelStyle={{ width: 106 }} style={{ paddingBottom: 0 }}> <Descriptions.Item label="考察结果" labelStyle={{ width: 106 }} style={{ paddingBottom: 0 }}>
入库考察合格 {dataSource?.result}
</Descriptions.Item> </Descriptions.Item>
</Descriptions> </Descriptions>
</Col> </Col>
<Col span={8}> <Col span={8}>
<Descriptions column={1}> <Descriptions column={1}>
<Descriptions.Item label="考察报告" labelStyle={{ width: 106 }}> <Descriptions.Item label="考察报告" labelStyle={{ width: 106 }}>
<Upload fileList={[]} /> <UploadFiles
fileList={dataSource && dataSource.reports ? dataSource.reports.map((item) => normalizeFiledata(item.url)) : []}
disable
/>
</Descriptions.Item> </Descriptions.Item>
</Descriptions> </Descriptions>
</Col> </Col>
......
...@@ -93,7 +93,6 @@ const MemberRoleFormItem = (props) => { ...@@ -93,7 +93,6 @@ const MemberRoleFormItem = (props) => {
}; };
const handleConfirm = () => { const handleConfirm = () => {
console.log('RowCtlRowCtlRowCtl', RowCtl);
if (!RowCtl.selectRow.length) { if (!RowCtl.selectRow.length) {
message.warning('请选择会员角色'); message.warning('请选择会员角色');
} }
......
...@@ -248,7 +248,7 @@ const MemberMaintain: React.FC<[]> = () => { ...@@ -248,7 +248,7 @@ const MemberMaintain: React.FC<[]> = () => {
return {}; return {};
}; };
const controllerBtns = ( const ControllerBtns = () => (
<> <>
{/* {(userInfo && userInfo.memberRoleType === MEMBER_ROLE_TYPE_SERVICE_PROVIDER) && ( {/* {(userInfo && userInfo.memberRoleType === MEMBER_ROLE_TYPE_SERVICE_PROVIDER) && (
<Space> <Space>
...@@ -306,8 +306,8 @@ const MemberMaintain: React.FC<[]> = () => { ...@@ -306,8 +306,8 @@ const MemberMaintain: React.FC<[]> = () => {
<NiceForm <NiceForm
actions={formActions} actions={formActions}
onSubmit={values => ref.current.reload(values)} onSubmit={values => ref.current.reload(values)}
expressionScope={{ components={{
controllerBtns, ControllerBtns,
}} }}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
......
...@@ -17,10 +17,7 @@ export const importSchema: ISchema = { ...@@ -17,10 +17,7 @@ export const importSchema: ISchema = {
properties: { properties: {
ctl: { ctl: {
type: 'object', type: 'object',
'x-component': 'Children', 'x-component': 'ControllerBtns',
'x-component-props': {
children: '{{controllerBtns}}',
},
}, },
name: { name: {
type: 'string', type: 'string',
......
/*
* @Author: XieZhiXiong
* @Date: 2021-06-03 14:43:56
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-03 15:02:18
* @Description: 级联选择器
*/
import React from 'react';
import { Cascader } from 'antd';
import { CascaderValueType } from 'antd/lib/cascader';
const CascaderFormItem = (props) => {
const {
value,
mutators,
editable,
} = props;
const handleChange = (next: CascaderValueType) => {
mutators.change(next);
};
return (
<Cascader
disabled={!editable}
{...(props.props['x-component-props'] || {})}
value={value}
onChange={handleChange}
/>
);
};
CascaderFormItem.isFieldComponent = true;
export default CascaderFormItem;
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32 * @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 10:06:37 * @LastEditTime: 2021-06-03 16:31:52
* @Description: 审核Form抽屉 * @Description: 审核Form抽屉
*/ */
import React from 'react'; import React, { useEffect } from 'react';
import { import {
Drawer, Drawer,
Button, Button,
...@@ -13,13 +13,151 @@ import { ...@@ -13,13 +13,151 @@ import {
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { import {
createFormActions, createFormActions,
createAsyncFormActions,
FormEffectHooks,
FormPath,
} from '@formily/antd'; } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { ArrayCards } from '@formily/antd-components'; import { ArrayCards } from '@formily/antd-components';
import { import { schema } from './schema';
schema, import CascaderFormItem from '../CascaderFormItem';
} from './schema';
import styles from './index.less'; import styles from './index.less';
type CategoriesType = {
/**
* 品类名称
*/
name: string,
/**
* 付款周期(天)
*/
paymentDay: number,
/**
* 发票类型名称
*/
invoiceTypeName: string,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint: number,
}
export type ValueType = {
/**
* 合作关系类型枚举
*/
partnerType: number,
/**
* 单次合作金额
*/
maxAmount: number,
/**
* 适用区域编码列表
*/
areaCodes: {
/**
* 省编码
*/
provinceCode: string,
/**
* 市编码
*/
cityCode: string,
}[],
/**
* 主营品类列表
*/
categories: CategoriesType[],
}
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[],
}
function recursionCategoryData(dataSource: CategoryItem[]): CategoryType[] {
const ret: CategoryType[] = [];
dataSource.forEach((item) => {
const ele: CategoryType = {
label: item.title,
value: item.id,
children: null,
};
if (item.children && item.children.length) {
ele.children = recursionCategoryData(item.children);
}
ret.push(ele);
});
return ret;
};
interface IProps { interface IProps {
/** /**
* 是否可见 * 是否可见
...@@ -28,31 +166,74 @@ interface IProps { ...@@ -28,31 +166,74 @@ interface IProps {
/** /**
* Form 确认事件 * Form 确认事件
*/ */
onSubmit: (values: any) => void, onSubmit: (values: ValueType) => void,
/** /**
* 抽屉关闭事件 * 抽屉关闭事件
*/ */
onClose: () => void, onClose: () => void,
/**
* 合作关系
*/
partnerTypes: {
/**
* label
*/
label: string,
/**
* value
*/
value: number,
}[],
/**
* 确认按钮 loading
*/
submitLoading: boolean,
} }
const formActions = createFormActions(); const formActions = createAsyncFormActions();
const {
onFormInit$,
onFieldValueChange$,
onFieldInputChange$,
} = FormEffectHooks;
const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
const { const {
visible, visible,
onSubmit, onSubmit,
onClose, onClose,
partnerTypes,
submitLoading,
} = props; } = props;
useEffect(() => {
if (partnerTypes && partnerTypes.length) {
formActions.setFieldState('partnerType', state => {
FormPath.setIn(state, 'props.enum', partnerTypes);
});
}
}, [partnerTypes]);
const handleClose = () => { const handleClose = () => {
if (onClose) { if (onClose) {
onClose(); onClose();
} }
}; };
const handleSubmit = (values: any) => { const handleSubmit = (values: FormValueType) => {
if (onSubmit) { if (onSubmit) {
onSubmit(values); const { maxAmount, categories, ...rest } = values;
const formated = categories.map((item) => ({
name: item.category.join('-'),
paymentDay: +item.paymentDay,
invoiceTypeName: item.invoiceTypeName,
taxPoint: +item.taxPoint,
}));
onSubmit({
maxAmount: +maxAmount,
categories: formated,
...rest,
});
} }
}; };
...@@ -69,6 +250,49 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { ...@@ -69,6 +250,49 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
</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.getMemberDepositClassifyCity({
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 ( return (
<Drawer <Drawer
title="入库分类信息" title="入库分类信息"
...@@ -84,7 +308,11 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { ...@@ -84,7 +308,11 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
<Button onClick={handleClose} style={{ marginRight: 16 }}> <Button onClick={handleClose} style={{ marginRight: 16 }}>
取 消 取 消
</Button> </Button>
<Button onClick={() => formActions.submit()} type="primary"> <Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
确 定 确 定
</Button> </Button>
</div> </div>
...@@ -94,13 +322,48 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => { ...@@ -94,13 +322,48 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
previewPlaceholder="' '" previewPlaceholder="' '"
components={{ components={{
ArrayCards, ArrayCards,
CascaderFormItem,
}} }}
expressionScope={{ expressionScope={{
MemberCodeDescription, MemberCodeDescription,
MemberCypher, MemberCypher,
}} }}
effects={() => { effects={($, { setFieldState }) => {
useBusinessEffects();
onFormInit$().subscribe(() => {
// 请求省级数据
PublicApi.getMemberDepositClassifyProvince().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);
});
}
});
});
onFieldValueChange$('agree').subscribe(fieldState => {
setFieldState('reason', state => {
state.title = fieldState.value === 0 ? '不通过原因' : '通过原因';
state.rules = fieldState.value === 0 ? [...state.rules, { required: true }] : [];
state.required = fieldState.value === 0;
setTimeout(() => {
formActions.validate('reason');
}, 0);
});
});
}} }}
actions={formActions} actions={formActions}
schema={schema} schema={schema}
......
...@@ -2,10 +2,24 @@ ...@@ -2,10 +2,24 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-24 18:00:52 * @Date: 2021-05-24 18:00:52
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 17:36:13 * @LastEditTime: 2021-06-03 16:49:52
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; 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';
export const schema: ISchema = { export const schema: ISchema = {
type: 'object', type: 'object',
...@@ -26,19 +40,22 @@ export const schema: ISchema = { ...@@ -26,19 +40,22 @@ export const schema: ISchema = {
labelAlign: 'left', labelAlign: 'left',
}, },
properties: { properties: {
channelLevel: { code: {
type: 'string', type: 'string',
title: '会员编码', title: '会员编码',
required: true, required: true,
description: '{{MemberCodeDescription}}', description: '{{MemberCodeDescription}}',
}, },
channelTypeId: { partnerType: {
type: 'string', type: 'string',
enum: [], enum: [],
title: '合作关系', title: '合作关系',
'x-component-props': {
placeholder: '请选择',
},
required: true, required: true,
}, },
channelLevel2: { maxAmount: {
type: 'string', type: 'string',
title: '单次合作金额', title: '单次合作金额',
required: true, required: true,
...@@ -47,7 +64,7 @@ export const schema: ISchema = { ...@@ -47,7 +64,7 @@ export const schema: ISchema = {
}, },
description: '{{MemberCypher}}', description: '{{MemberCypher}}',
}, },
areas: { areaCodes: {
type: 'array', type: 'array',
title: '适用区域', title: '适用区域',
required: true, required: true,
...@@ -56,14 +73,14 @@ export const schema: ISchema = { ...@@ -56,14 +73,14 @@ export const schema: ISchema = {
items: { items: {
type: 'object', type: 'object',
properties: { properties: {
pcode: { provinceCode: {
type: 'string', type: 'string',
enum: [], enum: [],
'x-component-props': { 'x-component-props': {
allowClear: true, allowClear: true,
}, },
}, },
ccode: { cityCode: {
type: 'string', type: 'string',
enum: [], enum: [],
'x-component-props': { 'x-component-props': {
...@@ -73,7 +90,7 @@ export const schema: ISchema = { ...@@ -73,7 +90,7 @@ export const schema: ISchema = {
} }
} }
}, },
managementCategory: { categories: {
type: 'array', type: 'array',
title: '主营品类', title: '主营品类',
required: true, required: true,
...@@ -90,58 +107,116 @@ export const schema: ISchema = { ...@@ -90,58 +107,116 @@ export const schema: ISchema = {
wrapperCol: 19, wrapperCol: 19,
}, },
properties: { properties: {
CATEGORY_LAYOUT: { category: {
type: 'object', type: 'string',
'x-component': 'Mega-Layout', title: '品类',
'x-component': 'CascaderFormItem',
'x-component-props': { 'x-component-props': {
grid: true, fieldNames: { label: 'title', value: 'title', children: 'children' },
full: true,
autoRow: true,
columns: 3,
label: '品类',
},
properties: {
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,
},
}, },
required: true,
}, },
cycle: { // 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', type: 'string',
enum: [],
title: '付款周期(天)', title: '付款周期(天)',
required: true, required: true,
}, },
invoiceType: { invoiceTypeName: {
type: 'string', type: 'string',
enum: [], 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: '发票类型', title: '发票类型',
required: true, required: true,
}, },
taxPoint: { taxPoint: {
type: 'string', type: 'string',
title: '税点', 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, required: true,
}, },
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 14:35:56 * @Date: 2021-05-25 14:35:56
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 15:55:52 * @LastEditTime: 2021-06-03 10:52:22
* @Description: 待入库分类详情 * @Description: 待入库分类详情
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
} from 'antd'; } from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailBasicResponse } from '@/services/MemberApi'; import { GetMemberDepositClassifyDetailResponse } from '@/services/MemberV2Api';
import { import {
MEMBER_TYPE_CHANNEL_CORPORATE, MEMBER_TYPE_CHANNEL_CORPORATE,
MEMBER_TYPE_CHANNEL_INDIVIDUAL, MEMBER_TYPE_CHANNEL_INDIVIDUAL,
...@@ -35,17 +35,16 @@ import MemberInvestigateInfo from '../components/MemberInvestigateInfo'; ...@@ -35,17 +35,16 @@ import MemberInvestigateInfo from '../components/MemberInvestigateInfo';
import PicWrap from '../components/PicWrap'; import PicWrap from '../components/PicWrap';
const MemberPrComingClassify: React.FC<{}> = () => { const MemberPrComingClassify: React.FC<{}> = () => {
const { id, validateId } = usePageStatus(); const { validateId } = usePageStatus();
const [memberInfo, setMemberInfo] = useState<GetMemberAbilityMaintenanceDetailBasicResponse>(null); const [memberInfo, setMemberInfo] = useState<GetMemberDepositClassifyDetailResponse>(null);
const [infoLoading, setInfoLoaading] = useState(false); const [infoLoading, setInfoLoaading] = useState(false);
const getBasicInfo = () => { const getBasicInfo = () => {
if (!id || !validateId) { if (!validateId) {
return; return;
} }
setInfoLoaading(true); setInfoLoaading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({ PublicApi.getMemberDepositClassifyDetail({
memberId: id,
validateId, validateId,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
...@@ -79,8 +78,8 @@ const MemberPrComingClassify: React.FC<{}> = () => { ...@@ -79,8 +78,8 @@ const MemberPrComingClassify: React.FC<{}> = () => {
: null : null
), ),
...( ...(
memberInfo && memberInfo.groups memberInfo && memberInfo.registerDetails
? memberInfo.groups.map((item, index) => ({ ? memberInfo.registerDetails.map((item, index) => ({
key: `group${index}`, key: `group${index}`,
name: item.groupName, name: item.groupName,
})) }))
...@@ -141,7 +140,7 @@ const MemberPrComingClassify: React.FC<{}> = () => { ...@@ -141,7 +140,7 @@ const MemberPrComingClassify: React.FC<{}> = () => {
outerStatusName: memberInfo?.outerStatusName, outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag, levelTag: memberInfo?.levelTag,
email: memberInfo?.email, email: memberInfo?.email,
createTime: memberInfo?.createTime, createTime: memberInfo?.registerTime,
}} }}
id="basicInfo" id="basicInfo"
/> />
...@@ -169,14 +168,14 @@ const MemberPrComingClassify: React.FC<{}> = () => { ...@@ -169,14 +168,14 @@ const MemberPrComingClassify: React.FC<{}> = () => {
{/* 其他注册信息 */} {/* 其他注册信息 */}
{ {
memberInfo && memberInfo.groups memberInfo && memberInfo.registerDetails
? memberInfo.groups.map((item, index) => ( ? memberInfo.registerDetails.map((item, index) => (
<Col span={24} key={`group${index}`}> <Col span={24} key={`group${index}`}>
<CustomizeColumn <CustomizeColumn
title={item.groupName} title={item.groupName}
data={( data={(
item.elements.map((ele) => ({ item.elements.map((ele) => ({
title: ele.fieldCNName, title: ele.fieldLocalName,
value: ( value: (
ele.fieldType !== 'upload' ele.fieldType !== 'upload'
? ele.fieldValue ? ele.fieldValue
...@@ -198,6 +197,7 @@ const MemberPrComingClassify: React.FC<{}> = () => { ...@@ -198,6 +197,7 @@ const MemberPrComingClassify: React.FC<{}> = () => {
{/* 入库信息 */} {/* 入库信息 */}
<Col span={24}> <Col span={24}>
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
/> />
</Col> </Col>
...@@ -205,6 +205,7 @@ const MemberPrComingClassify: React.FC<{}> = () => { ...@@ -205,6 +205,7 @@ const MemberPrComingClassify: React.FC<{}> = () => {
{/* 考察信息 */} {/* 考察信息 */}
<Col span={24}> <Col span={24}>
<MemberInvestigateInfo <MemberInvestigateInfo
dataSource={memberInfo?.inspection}
id="investigateInfo" id="investigateInfo"
/> />
</Col> </Col>
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 14:34:56 * @Date: 2021-05-25 14:34:56
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 18:05:07 * @LastEditTime: 2021-06-03 10:05:21
* @Description: 待入库分类 * @Description: 待入库分类
*/ */
import React, { useState, useRef } from 'react'; import React, { useRef } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Card, Space, Button, Modal, message } from 'antd'; import { Card, Button } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import moment from 'moment'; import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -22,15 +21,13 @@ import useSpliceArray from '@/hooks/useSpliceArray'; ...@@ -22,15 +21,13 @@ import useSpliceArray from '@/hooks/useSpliceArray';
import comingSchema from '../common/schames/comingSchema'; import comingSchema from '../common/schames/comingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn'; import verifyComingColumn from '../common/columns/verifyComingColumn';
const { confirm } = Modal;
const formActions = createFormActions(); const formActions = createFormActions();
const MemberPrComingClassify: React.FC<{}> = props => { const MemberPrComingClassify: React.FC<{}> = props => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const handleJumpAudit = record => { const handleJumpAudit = record => {
history.push(`/memberCenter/memberAbility/manage/memberPrComingClassify/verify?id=${record.memberId}&validateId=${record.validateId}`); history.push(`/memberCenter/memberAbility/manage/memberPrComingClassify/verify?validateId=${record.validateId}`);
}; };
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrComingClassify/detail').concat([ const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrComingClassify/detail').concat([
...@@ -62,7 +59,7 @@ const MemberPrComingClassify: React.FC<{}> = props => { ...@@ -62,7 +59,7 @@ const MemberPrComingClassify: React.FC<{}> = props => {
payload.endDate = moment(+endDate).format('YYYY-MM-DD'); payload.endDate = moment(+endDate).format('YYYY-MM-DD');
} }
const res = await PublicApi.getMemberAbilityMaintenancePage(payload); const res = await PublicApi.getMemberDepositClassifyPage(payload);
if (res.code === 1000) { if (res.code === 1000) {
return res.data; return res.data;
...@@ -72,7 +69,7 @@ const MemberPrComingClassify: React.FC<{}> = props => { ...@@ -72,7 +69,7 @@ const MemberPrComingClassify: React.FC<{}> = props => {
// 初始化高级筛选选项 // 初始化高级筛选选项
const fetchSearchItems = async () => { const fetchSearchItems = async () => {
const res = await PublicApi.getMemberAbilityValidateCommitPageitems(); const res = await PublicApi.getMemberDepositPageConditions();
if (res.code === 1000) { if (res.code === 1000) {
const { data = {} }: any = res; const { data = {} }: any = res;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 14:36:14 * @Date: 2021-05-25 14:36:14
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 19:44:28 * @LastEditTime: 2021-06-03 17:07:31
* @Description: 入库分类 * @Description: 入库分类
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -11,13 +11,15 @@ import { ...@@ -11,13 +11,15 @@ import {
Col, Col,
Spin, Spin,
Button, Button,
message,
} from 'antd'; } from 'antd';
import { import {
CheckCircleOutlined, CheckCircleOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { history } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailBasicResponse } from '@/services/MemberApi'; import { GetMemberDepositClassifyDetailResponse } from '@/services/MemberV2Api';
import { import {
MEMBER_TYPE_CHANNEL_CORPORATE, MEMBER_TYPE_CHANNEL_CORPORATE,
MEMBER_TYPE_CHANNEL_INDIVIDUAL, MEMBER_TYPE_CHANNEL_INDIVIDUAL,
...@@ -37,21 +39,21 @@ import MemberChannelInfo from '../components/MemberChannelInfo'; ...@@ -37,21 +39,21 @@ import MemberChannelInfo from '../components/MemberChannelInfo';
import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo'; import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import MemberInvestigateInfo from '../components/MemberInvestigateInfo'; import MemberInvestigateInfo from '../components/MemberInvestigateInfo';
import PicWrap from '../components/PicWrap'; import PicWrap from '../components/PicWrap';
import ComingClassifyDrawer from './components/ComingClassifyDrawer'; import ComingClassifyDrawer, { ValueType } from './components/ComingClassifyDrawer';
const MemberPrComingClassifyVerify: React.FC<{}> = () => { const MemberPrComingClassifyVerify: React.FC<{}> = () => {
const { id, validateId } = usePageStatus(); const { validateId } = usePageStatus();
const [memberInfo, setMemberInfo] = useState<GetMemberAbilityMaintenanceDetailBasicResponse>(null); const [memberInfo, setMemberInfo] = useState<GetMemberDepositClassifyDetailResponse>(null);
const [infoLoading, setInfoLoaading] = useState(false); const [infoLoading, setInfoLoaading] = useState(false);
const [visibleVerifyDrawer, setVisibleVerifyDrawer] = useState(false); const [visibleVerifyDrawer, setVisibleVerifyDrawer] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getBasicInfo = () => { const getBasicInfo = () => {
if (!id || !validateId) { if (!validateId) {
return; return;
} }
setInfoLoaading(true); setInfoLoaading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({ PublicApi.getMemberDepositClassifyDetail({
memberId: id,
validateId, validateId,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
...@@ -70,11 +72,32 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -70,11 +72,32 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
setVisibleVerifyDrawer(!!flag); setVisibleVerifyDrawer(!!flag);
}; };
const handleSubmit = () => { const handleSubmit = (value: ValueType) => {
console.log('表单提交') setSubmitLoading(true);
const payload = {
validateId,
...value,
};
const msg = message.loading({
content: '正在提交,请稍候...',
duration: 0,
});
PublicApi.postMemberDepositClassify(payload, {
timeout: 0,
}).then(res => {
if (res.code !== 1000) {
return;
}
handleVisibleVerifyDrawer(false);
setTimeout(() => {
history.goBack();
}, 800);
}).finally(() => {
msg();
setSubmitLoading(false);
});
}; };
const anchorsArr = [ const anchorsArr = [
{ {
key: 'verifySteps', key: 'verifySteps',
...@@ -94,8 +117,8 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -94,8 +117,8 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
: null : null
), ),
...( ...(
memberInfo && memberInfo.groups memberInfo && memberInfo.registerDetails
? memberInfo.groups.map((item, index) => ({ ? memberInfo.registerDetails.map((item, index) => ({
key: `group${index}`, key: `group${index}`,
name: item.groupName, name: item.groupName,
})) }))
...@@ -165,7 +188,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -165,7 +188,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
outerStatusName: memberInfo?.outerStatusName, outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag, levelTag: memberInfo?.levelTag,
email: memberInfo?.email, email: memberInfo?.email,
createTime: memberInfo?.createTime, createTime: memberInfo?.registerTime,
}} }}
id="basicInfo" id="basicInfo"
/> />
...@@ -193,14 +216,14 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -193,14 +216,14 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
{/* 其他注册信息 */} {/* 其他注册信息 */}
{ {
memberInfo && memberInfo.groups memberInfo && memberInfo.registerDetails
? memberInfo.groups.map((item, index) => ( ? memberInfo.registerDetails.map((item, index) => (
<Col span={24} key={`group${index}`}> <Col span={24} key={`group${index}`}>
<CustomizeColumn <CustomizeColumn
title={item.groupName} title={item.groupName}
data={( data={(
item.elements.map((ele) => ({ item.elements.map((ele) => ({
title: ele.fieldCNName, title: ele.fieldLocalName,
value: ( value: (
ele.fieldType !== 'upload' ele.fieldType !== 'upload'
? ele.fieldValue ? ele.fieldValue
...@@ -222,6 +245,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -222,6 +245,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
{/* 入库信息 */} {/* 入库信息 */}
<Col span={24}> <Col span={24}>
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
/> />
</Col> </Col>
...@@ -229,6 +253,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -229,6 +253,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
{/* 考察信息 */} {/* 考察信息 */}
<Col span={24}> <Col span={24}>
<MemberInvestigateInfo <MemberInvestigateInfo
dataSource={memberInfo?.inspection}
id="investigateInfo" id="investigateInfo"
/> />
</Col> </Col>
...@@ -249,7 +274,14 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => { ...@@ -249,7 +274,14 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
<ComingClassifyDrawer <ComingClassifyDrawer
visible={visibleVerifyDrawer} visible={visibleVerifyDrawer}
partnerTypes={(
memberInfo
&& memberInfo.partnerTypes
? memberInfo.partnerTypes.map((item) => ({ label: item.text, value: item.id })).filter((item) => item.value)
: []
)}
onClose={() => handleVisibleVerifyDrawer(false)} onClose={() => handleVisibleVerifyDrawer(false)}
submitLoading={submitLoading}
onSubmit={handleSubmit} onSubmit={handleSubmit}
/> />
</Spin> </Spin>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-06-02 20:10:47 * @Date: 2021-06-02 20:10:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 20:28:11 * @LastEditTime: 2021-06-03 10:38:03
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -53,14 +53,11 @@ export const schema: ISchema = { ...@@ -53,14 +53,11 @@ export const schema: ISchema = {
}, },
'x-rules': [ 'x-rules': [
{ {
required: true,
message: '请输入考察评分',
},
{
pattern: PATTERN_MAPS.money, pattern: PATTERN_MAPS.money,
message: '请输入两位小数', message: '请输入两位小数',
}, },
], ],
required: true,
}, },
result: { result: {
type: 'string', type: 'string',
...@@ -76,6 +73,7 @@ export const schema: ISchema = { ...@@ -76,6 +73,7 @@ export const schema: ISchema = {
maxByte: 120, maxByte: 120,
} }
], ],
required: true,
}, },
reports: { reports: {
type: 'string', type: 'string',
......
...@@ -30,6 +30,7 @@ import { ...@@ -30,6 +30,7 @@ import {
} from '../constant'; } from '../constant';
import MemberBasicInfo from '../components/MemberBasicInfo'; import MemberBasicInfo from '../components/MemberBasicInfo';
import MemberChannelInfo from '../components/MemberChannelInfo'; import MemberChannelInfo from '../components/MemberChannelInfo';
import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import PicWrap from '../components/PicWrap'; import PicWrap from '../components/PicWrap';
const MemberPrComingInvestigate: React.FC<{}> = () => { const MemberPrComingInvestigate: React.FC<{}> = () => {
...@@ -84,6 +85,10 @@ const MemberPrComingInvestigate: React.FC<{}> = () => { ...@@ -84,6 +85,10 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
: [] : []
), ),
{ {
key: 'incomingInfo',
name: '入库信息',
},
{
key: 'flowRecords', key: 'flowRecords',
name: '流转记录', name: '流转记录',
}, },
...@@ -184,6 +189,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => { ...@@ -184,6 +189,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
: null : null
} }
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<FlowRecords <FlowRecords
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 10:12:48 * @Date: 2021-05-25 10:12:48
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 14:23:36 * @LastEditTime: 2021-06-03 20:46:28
* @Description: 待审核入库考察 * @Description: 待审核入库考察
*/ */
import React, { useState, useRef } from 'react'; import React, { useRef } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Card, Space, Button, Modal, message } from 'antd'; import { Card, Button } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import moment from 'moment'; import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -22,8 +21,6 @@ import useSpliceArray from '@/hooks/useSpliceArray'; ...@@ -22,8 +21,6 @@ import useSpliceArray from '@/hooks/useSpliceArray';
import comingSchema from '../common/schames/comingSchema'; import comingSchema from '../common/schames/comingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn'; import verifyComingColumn from '../common/columns/verifyComingColumn';
const { confirm } = Modal;
const formActions = createFormActions(); const formActions = createFormActions();
const MemberPrComingInvestigate: React.FC<{}> = props => { const MemberPrComingInvestigate: React.FC<{}> = props => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 14:03:05 * @Date: 2021-05-25 14:03:05
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 20:21:48 * @LastEditTime: 2021-06-03 10:32:00
* @Description: * @Description:
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -31,8 +31,9 @@ import { ...@@ -31,8 +31,9 @@ import {
MEMBER_INNER_COLUMNS, MEMBER_INNER_COLUMNS,
} from '../constant'; } from '../constant';
import MemberBasicInfo from '../components/MemberBasicInfo'; import MemberBasicInfo from '../components/MemberBasicInfo';
import PicWrap from '../components/PicWrap'; import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import VerifyComingInvestigateDrawer, { ValueType } from './components/VerifyComingInvestigateDrawer'; import VerifyComingInvestigateDrawer, { ValueType } from './components/VerifyComingInvestigateDrawer';
import PicWrap from '../components/PicWrap';
const MemberPrComingInvestigate: React.FC<{}> = () => { const MemberPrComingInvestigate: React.FC<{}> = () => {
const { validateId } = usePageStatus(); const { validateId } = usePageStatus();
...@@ -113,6 +114,10 @@ const MemberPrComingInvestigate: React.FC<{}> = () => { ...@@ -113,6 +114,10 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
: [] : []
), ),
{ {
key: 'incomingInfo',
name: '入库信息',
},
{
key: 'flowRecords', key: 'flowRecords',
name: '流转记录', name: '流转记录',
}, },
...@@ -202,6 +207,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => { ...@@ -202,6 +207,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
: null : null
} }
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<FlowRecords <FlowRecords
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-24 10:27:36 * @Date: 2021-05-24 10:27:36
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 18:05:58 * @LastEditTime: 2021-06-03 20:42:19
* @Description: 待审核入库资料 * @Description: 待审核入库资料
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -145,7 +145,7 @@ const MemberPrVerifyComingData: React.FC<{}> = props => { ...@@ -145,7 +145,7 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
return {}; return {};
}; };
const controllerBtns = ( const ControllerBtns = () => (
<Space> <Space>
<Button onClick={handleBatch}> <Button onClick={handleBatch}>
批量审核通过 批量审核通过
...@@ -167,8 +167,8 @@ const MemberPrVerifyComingData: React.FC<{}> = props => { ...@@ -167,8 +167,8 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
<NiceForm <NiceForm
actions={formActions} actions={formActions}
onSubmit={values => ref.current.reload(values)} onSubmit={values => ref.current.reload(values)}
expressionScope={{ components={{
controllerBtns, ControllerBtns,
}} }}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
......
...@@ -30,6 +30,7 @@ import { ...@@ -30,6 +30,7 @@ import {
} from '../constant'; } from '../constant';
import MemberBasicInfo from '../components/MemberBasicInfo'; import MemberBasicInfo from '../components/MemberBasicInfo';
import MemberChannelInfo from '../components/MemberChannelInfo'; import MemberChannelInfo from '../components/MemberChannelInfo';
import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import PicWrap from '../components/PicWrap'; import PicWrap from '../components/PicWrap';
const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => { const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => {
...@@ -84,6 +85,10 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => { ...@@ -84,6 +85,10 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => {
: [] : []
), ),
{ {
key: 'incomingInfo',
name: '入库信息',
},
{
key: 'flowRecords', key: 'flowRecords',
name: '流转记录', name: '流转记录',
}, },
...@@ -184,6 +189,14 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => { ...@@ -184,6 +189,14 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => {
: null : null
} }
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
<FlowRecords <FlowRecords
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 10:11:54 * @Date: 2021-05-25 10:11:54
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 18:25:48 * @LastEditTime: 2021-06-03 20:42:47
* @Description: 待审核入库资质 * @Description: 待审核入库资质
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -145,7 +145,7 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => { ...@@ -145,7 +145,7 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => {
return {}; return {};
}; };
const controllerBtns = ( const ControllerBtns = () => (
<Space> <Space>
<Button onClick={handleBatch}> <Button onClick={handleBatch}>
批量审核通过 批量审核通过
...@@ -167,8 +167,8 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => { ...@@ -167,8 +167,8 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => {
<NiceForm <NiceForm
actions={formActions} actions={formActions}
onSubmit={values => ref.current.reload(values)} onSubmit={values => ref.current.reload(values)}
expressionScope={{ components={{
controllerBtns, ControllerBtns,
}} }}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-25 11:40:27 * @Date: 2021-05-25 11:40:27
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 18:33:14 * @LastEditTime: 2021-06-03 10:32:53
* @Description: 审核入库资质 * @Description: 审核入库资质
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -35,6 +35,7 @@ import { ...@@ -35,6 +35,7 @@ import {
} from '../constant'; } from '../constant';
import MemberBasicInfo from '../components/MemberBasicInfo'; import MemberBasicInfo from '../components/MemberBasicInfo';
import MemberChannelInfo from '../components/MemberChannelInfo'; import MemberChannelInfo from '../components/MemberChannelInfo';
import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import PicWrap from '../components/PicWrap'; import PicWrap from '../components/PicWrap';
import VerifyModal, { ValueType as VerifyData } from '../components/VerifyModal'; import VerifyModal, { ValueType as VerifyData } from '../components/VerifyModal';
...@@ -117,6 +118,10 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => { ...@@ -117,6 +118,10 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => {
: [] : []
), ),
{ {
key: 'incomingInfo',
name: '入库信息',
},
{
key: 'flowRecords', key: 'flowRecords',
name: '流转记录', name: '流转记录',
}, },
...@@ -225,6 +230,14 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => { ...@@ -225,6 +230,14 @@ const MemberPrVerifyComingQualificationsDetail: React.FC<{}> = () => {
)) ))
: null : null
} }
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
{/* 流转记录 */} {/* 流转记录 */}
<Col span={24}> <Col span={24}>
......
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