Commit 9a3e4316 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加 会员管理 -> 待审核入库考察CN国际化

parent 906a3dee
......@@ -163,6 +163,24 @@ export default {
'member.management.memberPrVerifyComingData.verify.qualities.required': '请填写必要的资质证明',
'member.management.memberPrVerifyComingData.verify.upperMember.null': '无',
// 待审核入库考察
'member.management.memberPrComingInvestigate.drawer.title': '入库考察审核',
'member.management.memberPrComingInvestigate.drawer.form.select.placeholder': '请选择',
'member.management.memberPrComingInvestigate.drawer.form.inspect': '考察信息',
'member.management.memberPrComingInvestigate.drawer.form.inspect.date': '考察日期',
'member.management.memberPrComingInvestigate.drawer.form.inspect.score': '考察评分',
'member.management.memberPrComingInvestigate.drawer.form.inspect.score.rules-money': '请输入两位小数',
'member.management.memberPrComingInvestigate.drawer.form.inspect.result': '考察结果',
'member.management.memberPrComingInvestigate.drawer.form.inspect.result-placeholder': '在此输入你的内容,最长60个字符,30个汉字',
'member.management.memberPrComingInvestigate.drawer.form.inspect.reports': '考察报告',
'member.management.memberPrComingInvestigate.drawer.form.inspect.reports.rules-required': '请上传考察报告',
'member.management.memberPrComingInvestigate.drawer.form.verify': '单据审核',
'member.management.memberPrComingInvestigate.drawer.form.verify.agree': '是否通过',
'member.management.memberPrComingInvestigate.drawer.form.verify.agree.pass': '审核通过',
'member.management.memberPrComingInvestigate.drawer.form.verify.agree.noPass': '审核不通过',
'member.management.memberPrComingInvestigate.drawer.form.verify.reason': '不通过原因',
'member.management.memberPrComingInvestigate.drawer.form.verify.placeholder': '在此输入你的内容,最长120个字符,60个汉字',
// 会员状态
'member.status.notAaudit': '待审核',
......@@ -195,4 +213,5 @@ export default {
'member.management.common.schames.query': '查询',
'member.management.common.form.reason.pass': '通过原因',
'member.management.common.form.reason.noPass': '不通过原因',
'member.management.common.commiting': '正在提交,请稍候...',
};
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-09 18:01:32
* @LastEditTime: 2021-12-03 16:08:38
* @Description: 审核Form抽屉
*/
import React from 'react';
......@@ -10,6 +10,7 @@ import {
Drawer,
Button,
} from 'antd';
import { useIntl } from 'umi';
import { DatePicker } from '@formily/antd-components';
import NiceForm from '@/components/NiceForm';
import {
......@@ -100,6 +101,8 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
submitLoading,
} = props;
const intl = useIntl();
const handleClose = () => {
if (onClose) {
onClose();
......@@ -115,7 +118,7 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
return (
<Drawer
title="入库考察审核"
title={intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.title' })}
width={600}
onClose={handleClose}
visible={visible}
......@@ -126,14 +129,14 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
}}
>
<Button onClick={handleClose} style={{ marginRight: 16 }}>
取 消
{intl.formatMessage({ id: 'member.actions.cancel' })}
</Button>
<Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
确 定
{intl.formatMessage({ id: 'member.actions.confirm' })}
</Button>
</div>
}
......@@ -146,7 +149,7 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
effects={($, { setFieldState }) => {
onFieldValueChange$('agree').subscribe(fieldState => {
setFieldState('reason', state => {
state.title = fieldState.value === 0 ? '不通过原因' : '通过原因';
state.title = fieldState.value === 0 ? intl.formatMessage({ id: 'member.management.common.form.reason.noPass' }) : intl.formatMessage({ id: 'member.management.common.form.reason.pass' });
state.required = fieldState.value === 0;
setTimeout(() => {
formActions.validate('reason');
......
......@@ -2,15 +2,18 @@
* @Author: XieZhiXiong
* @Date: 2021-06-02 20:10:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-09 17:44:34
* @LastEditTime: 2021-12-03 16:05:47
* @Description:
*/
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import {
UPLOAD_TYPE,
} from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp';
const intl = getIntl();
export const schema: ISchema = {
type: 'object',
properties: {
......@@ -18,7 +21,7 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'FlagBox',
'x-component-props': {
title: '考察信息',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect' }),
},
properties: {
MEGA_LAYOUT: {
......@@ -32,10 +35,10 @@ export const schema: ISchema = {
properties: {
inspectDay: {
type: 'string',
title: '考察日期',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.date' }),
'x-component': 'DatePicker',
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.select.placeholder' }),
style: {
width: '100%',
},
......@@ -44,9 +47,9 @@ export const schema: ISchema = {
},
score: {
type: 'string',
title: '考察评分',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.score' }),
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.select.placeholder' }),
style: {
width: '100%',
},
......@@ -54,17 +57,17 @@ export const schema: ISchema = {
'x-rules': [
{
pattern: PATTERN_MAPS.money,
message: '请输入两位小数',
message: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.score.rules-money' }),
},
],
required: true,
},
result: {
type: 'string',
title: '考察结果',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.result' }),
'x-component': 'Textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长60个字符,30个汉字',
placeholder: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.result-placeholder' }),
rows: 5,
},
'x-rules': [
......@@ -77,7 +80,7 @@ export const schema: ISchema = {
},
reports: {
type: 'string',
title: '考察报告',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.reports' }),
'x-component': 'FixUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
......@@ -90,7 +93,7 @@ export const schema: ISchema = {
'x-rules': [
{
required: true,
message: '请上传考察报告',
message: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.inspect.reports.rules-required' }),
},
],
},
......@@ -102,7 +105,7 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'FlagBox',
'x-component-props': {
title: '单据审核',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify' }),
},
properties: {
MEGA_LAYOUT: {
......@@ -116,23 +119,23 @@ export const schema: ISchema = {
properties: {
agree: {
type: 'string',
title: '是否通过',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify.agree' }),
default: 1,
'x-component': 'Radio',
required: true,
enum: [
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 },
{ label: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify.agree.pass' }), value: 1 },
{ label: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify.agree.noPass' }), value: 0 },
],
'x-component-props': {},
},
reason: {
type: 'string',
title: '不通过原因',
title: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify.reason' }),
'x-component': 'Textarea',
required: true,
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
placeholder: intl.formatMessage({ id: 'member.management.memberPrComingInvestigate.drawer.form.verify.placeholder' }),
rows: 5,
},
'x-rules': [
......
......@@ -6,7 +6,7 @@
* @Description: 待审核入库考察
*/
import React, { useRef } from 'react';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { Card, Button } from 'antd';
import { StandardTable } from 'god';
import moment from 'moment';
......@@ -26,20 +26,22 @@ const formActions = createFormActions();
const MemberPrComingInvestigate: React.FC<{}> = props => {
const ref = useRef<any>({});
const intl = useIntl();
const handleJumpAudit = record => {
history.push(`/memberCenter/memberAbility/manage/memberPrComingInvestigate/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrComingInvestigate/detail').concat([
{
title: '操作',
title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option',
render: (_, record) => (
<Button
type="link"
onClick={() => handleJumpAudit(record)}
>
审核
{intl.formatMessage({ id: 'member.actions.verify' })}
</Button>
),
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 14:03:05
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:07:05
* @LastEditTime: 2021-12-03 15:52:14
* @Description:
*/
import React, { useState } from 'react';
......@@ -10,7 +10,7 @@ import { Button, message } from 'antd';
import {
CheckCircleOutlined,
} from '@ant-design/icons';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { getMemberDepositInspectDetail, postMemberDepositInspect } from '@/services/MemberV2Api';
import fetchDetailHoc from '../common/hoc/fetchDetailHoc';
......@@ -22,6 +22,8 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
const [visibleVerifyDrawer, setVisibleVerifyDrawer] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const intl = useIntl();
const handleVisibleVerifyDrawer = (flag?) => {
setVisibleVerifyDrawer(!!flag);
};
......@@ -37,7 +39,7 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
})),
};
const msg = message.loading({
content: '正在提交,请稍候...',
content: intl.formatMessage({ id: 'member.management.common.commiting' }),
duration: 0,
});
postMemberDepositInspect(payload, {
......@@ -71,7 +73,7 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
icon={<CheckCircleOutlined />}
onClick={() => handleVisibleVerifyDrawer(true)}
>
单据审核
{intl.formatMessage({ id: 'member.actions.apply.verify' })}
</Button>
<VerifyComingInvestigateDrawer
......
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