Commit 9a3e4316 authored by XieZhiXiong's avatar XieZhiXiong

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

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