Commit 5bf0a9d0 authored by Bill's avatar Bill

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

parents c34a51b9 8b6ed132
import React, { useState, useEffect, useMemo } from 'react';
import { Button, Card, Spin, Badge, message } from 'antd';
import { Button, Card, Spin, Badge, message, Upload } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { ArrayTable } from '@formily/antd-components';
import { history, Link, Prompt } from 'umi';
......@@ -554,8 +554,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) {
message.warning('图片大小超过20M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleGoodsConfirm = values => {
......
import React, { useState, useEffect, useMemo } from 'react';
import { Button, Card, Spin, Badge, message } from 'antd';
import { Button, Card, Spin, Badge, message, Upload } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { DeleteOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-components';
......@@ -483,8 +483,9 @@ const RepairForm: React.FC<BillsFormProps> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) {
message.warning('图片大小超过20M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleGoodsConfirm = values => {
......
import React, { useState, useEffect, useMemo } from 'react';
import { Button, Card, Spin, Badge, message } from 'antd';
import { Button, Card, Spin, Badge, message, Upload } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { ArrayTable } from '@formily/antd-components';
import { history, Prompt, Link } from 'umi';
......@@ -573,8 +573,9 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) {
message.warning('图片大小超过20M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleGoodsConfirm = values => {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-04 17:26:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-07 16:20:40
* @LastEditTime: 2021-06-17 10:37:59
* @Description: 资质上传组件
*/
import React, { useState } from 'react';
......@@ -22,7 +22,7 @@ const QualitiesUpload = (props) => {
} = props;
const [loading, setLoading] = useState(false);
const arrValue = value ? [value] : [];
const arrValue = value || [];
const handleChange = (info: UploadChangeParam) => {
const { file } = info;
......@@ -33,10 +33,12 @@ const QualitiesUpload = (props) => {
if (file.status === 'done' || file.status === 'error') {
setLoading(false);
}
mutators.change({
...rest,
...(response.data || {}),
});
mutators.change([
{
...rest,
...(response.data || {}),
}
]);
};
const uploadButton = (
......@@ -47,7 +49,7 @@ const QualitiesUpload = (props) => {
);
const renderFile = () => {
const url = value?.url || '';
const url = value[0]?.url || '';
const imgReg = /\.(png|jpg|gif|jpeg|webp)$/;
const isImg = imgReg.test(url);
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-01 16:13:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-15 11:53:20
* @LastEditTime: 2021-06-17 10:50:41
* @Description: 资质证明上传组件
*/
import React from 'react';
......@@ -70,6 +70,7 @@ const schema = new Schema({
type: 'string',
title: '有效期',
'x-component': 'CheckboxGroup',
default: [1],
enum: [
{ label: '长期有效', value: 1 },
]
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-27 16:01:23
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-08 17:13:57
* @LastEditTime: 2021-06-17 09:59:49
* @Description: 会员管理流程规则配置
*/
import React, { useState, useRef } from 'react';
......@@ -89,6 +89,7 @@ const MemberFlowRule: React.FC<[]> = () => {
{
title: 'ID',
dataIndex: 'id',
align: 'center',
},
{
title: '流程规则名称',
......@@ -106,18 +107,22 @@ const MemberFlowRule: React.FC<[]> = () => {
{
title: '会员角色',
dataIndex: 'roleName',
align: 'center',
},
{
title: '角色类型',
dataIndex: 'roleTypeName',
align: 'center',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '业务类型',
dataIndex: 'businessTypeName',
align: 'center',
},
{
title: '操作时间',
......@@ -127,6 +132,7 @@ const MemberFlowRule: React.FC<[]> = () => {
title: '状态',
dataIndex: 'status',
filters: [],
align: 'center',
render: (_, record) => (
<StatusSwitch
fieldNames="status"
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-10 16:09:07
* @LastEditTime: 2021-06-17 10:43:24
* @Description: 审核入库资料
*/
import React, { useState, useEffect } from 'react';
......@@ -88,10 +88,10 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
...value,
depositDetails: comingData,
qualities: qualifications.map((item) => ({
url: item.file[0] ? item.file[0].url : '',
name: item.file[0] ? item.file[0].name : '',
expireDay: item.expireDay,
permanent: item.permanent[0] ? item.permanent[0] : 0,
url: item.file && item.file[0] ? item.file[0].url : '',
name: item.file && item.file[0] ? item.file[0].name : '',
expireDay: item.expireDay || '',
permanent: item.permanent && item.permanent[0] ? item.permanent[0] : 0,
})),
};
const msg = message.loading({
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-10 16:06:51
* @LastEditTime: 2021-06-17 10:46:31
* @Description: 申请会员
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -184,10 +184,10 @@ const MemberQueryApplyMember: React.FC = () => {
upperRoleId,
depositDetails: step3,
qualities: qualities.map((item) => ({
expireDay: item.expireDay,
permanent: item.permanent[0] || 0,
url: item.file.url,
name: item.file.name,
expireDay: item.expireDay || '',
permanent: item.permanent && item.permanent[0] || 0,
url: item.file && item.file[0] ? item.file[0].url : '',
name: item.file && item.file[0] ? item.file[0].name : '',
})),
}).then(res => {
if (res.code !== 1000) {
......@@ -204,10 +204,10 @@ const MemberQueryApplyMember: React.FC = () => {
validateId,
detail: step3,
qualities: qualities.map((item) => ({
expireDay: item.expireDay,
permanent: item.permanent[0] || 0,
url: item.file.url,
name: item.file.name,
expireDay: item.expireDay || '',
permanent: item.permanent && item.permanent[0] || 0,
url: item.file && item.file[0] ? item.file[0].url : '',
name: item.file && item.file[0] ? item.file[0].name : '',
})),
}).then(res => {
if (res.code !== 1000) {
......
......@@ -121,8 +121,9 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) {
message.warning('图片大小超过20M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
return (
......
......@@ -2,11 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2021-01-13 13:46:08
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 15:24:39
* @LastEditTime: 2021-06-17 10:22:59
* @Description: 上传凭证弹窗
*/
import React, { useState, useEffect } from 'react';
import { Modal, message } from 'antd';
import { Modal, message, Upload } from 'antd';
import styled from 'styled-components';
import { createFormActions } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
......@@ -101,8 +101,9 @@ const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVouc
const beforeUploadVoucher = file => {
if (file.size / 1024 > 200) {
message.warning('图片大小超过200K');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleUploadVoucherSubmit = values => {
......
......@@ -2,27 +2,21 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import moment from 'moment';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { createFormActions } from '@formily/antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
import { normalizeFiledata, FileData } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
......@@ -97,8 +91,9 @@ const ReceivedDetail: React.FC = () => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
......@@ -2,26 +2,22 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
import { normalizeFiledata, FileData } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
const {
......@@ -143,8 +139,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
......@@ -2,27 +2,25 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, Prompt } from 'umi';
import moment from 'moment';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
const {
......@@ -129,8 +127,9 @@ const EvaluateOrder: React.FC = () => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
......@@ -2,27 +2,21 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import moment from 'moment';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { createFormActions } from '@formily/antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
......@@ -100,8 +94,9 @@ const ReceivedDetail: React.FC = () => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
......@@ -2,25 +2,22 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
import { normalizeFiledata, FileData } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
const {
......@@ -142,8 +139,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
......@@ -2,27 +2,25 @@ import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
message,
Upload,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, Prompt } from 'umi';
import moment from 'moment';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import NiceForm from '@/components/NiceForm';
import { normalizeUnevaluatedList } from '../../utils';
import { evaluateSchema } from './schema';
import { createEffects } from './effects';
import EvaluationList from '../../components/EvaluationList';
import styles from './index.less';
const formActions = createFormActions();
const {
......@@ -129,8 +127,9 @@ const EvaluateOrder: React.FC = () => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
return Promise.reject();
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const UploadTip = (
......
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