Commit ef728705 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加 会员管理 -> 待审核入库(一级)CN国际化

parent bd675440
......@@ -202,7 +202,6 @@ export default {
'member.management.memberPrComingClassify.drawer.form.classify.paymentDay.rules-legal': '请输入0 或 正整数,最多8位数',
'member.management.memberPrComingClassify.drawer.form.classify.invoiceTypeName': '发票类型',
'member.management.memberPrComingClassify.drawer.form.classify.taxPoint': '税点',
'member.management.memberPrComingClassify.drawer.form.verify': '单据审核',
'member.management.memberPrComingClassify.drawer.form.verify.agree': '是否通过',
'member.management.memberPrComingClassify.drawer.form.verify.agree.pass': '审核通过',
......@@ -210,6 +209,9 @@ export default {
'member.management.memberPrComingClassify.drawer.form.verify.reason': '不通过原因',
'member.management.memberPrComingClassify.drawer.form.verify.placeholder': '在此输入你的内容,最长120个字符,60个汉字',
// 待审核入库(一级)
'member.management.memberPrVerifyComing1.query.verify-tip': '确定要审核通过选中的会员吗?',
// 会员状态
'member.status.notAaudit': '待审核',
......@@ -265,6 +267,14 @@ export default {
'member.constants.MEMBER_TAX_POINT_4': '3%',
'member.constants.MEMBER_TAX_POINT_5': '0%',
// 业务组件
'member.components.VerifyModal.title': '单据审核',
'member.components.VerifyModal.agree.pass': '审核通过',
'member.components.VerifyModal.agree.noPass': '审核不通过',
'member.components.VerifyModal.reason.noPass': '不通过原因',
'member.components.VerifyModal.reason.pass': '通过原因',
'member.components.VerifyModal.reason.placeholder': '在此输入你的内容,最长120个字符,60个汉字',
// 会员考察/考评/整改/预警、投诉建议、会员整改管理、考评结果查询、投诉建议管理
'member.memberInspection.add.modifyInvestigate': '修改会员考察',
'member.memberInspection.add.back': '返回',
......
......@@ -7,6 +7,7 @@
*/
import React from 'react';
import { Modal } from 'antd';
import { useIntl } from 'umi';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import schema from './schema';
......@@ -54,6 +55,8 @@ const VerifyModal: React.FC<IProps> = (props: IProps) => {
submitLoading,
} = props;
const intl = useIntl();
const handleClose = () => {
if (onClose) {
onClose();
......@@ -68,7 +71,7 @@ const VerifyModal: React.FC<IProps> = (props: IProps) => {
return (
<Modal
title="单据审核"
title={intl.formatMessage({ id: 'member.components.VerifyModal.title' })}
visible={visible}
confirmLoading={submitLoading}
onOk={() => formActions.submit()}
......@@ -79,7 +82,7 @@ const VerifyModal: 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.components.VerifyModal.reason.noPass' }) : intl.formatMessage({ id: 'member.components.VerifyModal.reason.pass' });
state.required = fieldState.value === 0;
setTimeout(() => {
formActions.validate('reason');
......
......@@ -2,11 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 11:50:00
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 11:50:00
* @LastEditTime: 2021-12-03 18:21:06
* @Description:
*/
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
const intl = getIntl();
const schema: ISchema = {
type: 'object',
properties: {
......@@ -21,19 +24,19 @@ const schema: ISchema = {
type: 'string',
default: 1,
enum: [
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 },
{ label: intl.formatMessage({ id: 'member.components.VerifyModal.agree.pass' }), value: 1 },
{ label: intl.formatMessage({ id: 'member.components.VerifyModal.agree.noPass' }), value: 0 },
],
'x-component': 'radio',
'x-component-props': {},
},
reason: {
type: 'string',
title: '不通过原因',
title: intl.formatMessage({ id: 'member.components.VerifyModal.reason.noPass' }),
'x-component': 'textarea',
required: true,
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
placeholder: intl.formatMessage({ id: 'member.components.VerifyModal.reason.placeholder' }),
rows: 5,
},
'x-rules': [
......
......@@ -2,11 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 18:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:09:28
* @LastEditTime: 2021-12-03 18:19:06
* @Description: 待审核入库(一级)
*/
import React, { useState, useRef } from 'react';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { Card, Space, Button, Modal, message } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
......@@ -30,20 +30,22 @@ const MemberPrVerifyComing1: React.FC<{}> = props => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<number[]>([]);
const intl = useIntl();
const handleJumpAudit = record => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyComing1/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyComing1/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>
),
},
......@@ -79,13 +81,13 @@ const MemberPrVerifyComing1: React.FC<{}> = props => {
const handleBatch = () => {
if (!selectedRowKeys.length) {
message.warning('未选择任何会员');
message.warning(intl.formatMessage({ id: 'member.actions.batch.nothing' }));
return;
}
confirm({
title: '提示',
title: intl.formatMessage({ id: 'member.actions.verify-tip' }),
icon: <QuestionCircleOutlined />,
content: '确定要审核通过选中的会员吗?',
content: intl.formatMessage({ id: 'member.management.memberPrVerifyComing1.query.verify-tip' }),
onOk() {
return new Promise<void>((resolve, reject) => {
postMemberDepositGradeOneBatch({
......@@ -131,7 +133,7 @@ const MemberPrVerifyComing1: React.FC<{}> = props => {
const ControllerBtns = () => (
<Space>
<Button onClick={handleBatch}>
批量审核通过
{intl.formatMessage({ id: 'member.actions.verify-batch' })}
</Button>
</Space>
);
......
......@@ -10,7 +10,7 @@ import { Button } from 'antd';
import {
CheckCircleOutlined,
} from '@ant-design/icons';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { postMemberDepositGradeOne, getMemberDepositGradeOneDetail } from '@/services/MemberV2Api';
import fetchDetailHoc from '../common/hoc/fetchDetailHoc';
......@@ -22,6 +22,8 @@ const MemberPrVerifyComing1Verify: React.FC<{}> = () => {
const [visibleVerifyModal, setVisibleVerifyModal] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const intl = useIntl();
const handleVisibleVerifyModal = (flag?) => {
setVisibleVerifyModal(!!flag);
};
......@@ -62,7 +64,7 @@ const MemberPrVerifyComing1Verify: React.FC<{}> = () => {
icon={<CheckCircleOutlined />}
onClick={() => handleVisibleVerifyModal(true)}
>
单据审核
{intl.formatMessage({ id: 'member.actions.apply.verify' })}
</Button>
<VerifyModal
......
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