Commit e17c41d4 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

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

parents 41342ba9 3ed9ad5c
......@@ -581,6 +581,12 @@ const MemberRoute: RouterChild = {
hideInMenu: true,
},
{
path: '/memberCenter/memberAbility/memberEvaluate/createEvaluate/view',
name: '修改考评单',
component: '@/pages/member/memberEvaluate/createEvaluate/add',
hideInMenu: true,
},
{
path: '/memberCenter/memberAbility/memberEvaluate/createEvaluate/edit',
name: '修改考评单',
component: '@/pages/member/memberEvaluate/createEvaluate/add',
......
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 => {
......
......@@ -23,10 +23,9 @@ const Voucher: React.FC<Iprops> = (props) => {
return (
<>
{
files.map((item: VoucherFileProps, key: number) => {
files?.map((item: VoucherFileProps, key: number) => {
return (
<div className={styles.container} key={key}>
{/* <div></div>/ */}
<div className={styles.image}>
<img src={image_icon} className={styles.icon} />
</div>
......
......@@ -220,8 +220,11 @@ function useFetchColumns(mode: 'payable' | 'receiveable') {
render: (text: string, record: any) => {
if (mode === 'payable') {
// 待对账的时候可以手动结算
if (record.status === TO_BE_RECONCILED && record.orderType !== CONTRACT_FUND_BILL) {
return <a onClick={() => handleManualsettlement(record.id)}>手动结算</a>
if (record.status === TO_BE_RECONCILED) {
if (record.orderType !== CONTRACT_FUND_BILL) {
return <a onClick={() => handleManualsettlement(record.id)}>手动结算</a>
}
return null
}
if (record.status === TO_BE_PAY) {
return <a onClick={() => handlePay({id: record.id, settlementId: record.memberId, roleId: record.roleId})}>付款</a>
......
......@@ -276,6 +276,7 @@ const table = (props: any) => {
currentRef.current = {
get: () => new Promise((resolve: any) => {
let data = [];
console.log(PlanList)
PlanList.map((item: any) => {
data.push(
{
......@@ -300,7 +301,7 @@ const table = (props: any) => {
PlanList.map((item) => {
item.applyNo = item.orderNO;
item.outerStatusName = item.orderStatusName;
item.isHasTax = item.isHasTax == '是' ? 1 : 0;
// item.isHasTax = item.isHasTax == '是' ? 1 : 0;
})
setPlanList(PlanList)
}
......@@ -337,10 +338,10 @@ const table = (props: any) => {
>
<Button onClick={() => setvisible(!visible)} style={{ marginRight: 8 }}>
取消
</Button>
</Button>
<Button type="primary" onClick={() => Confirm()} >
确定
</Button>
</Button>
</div>
}
destroyOnClose
......
......@@ -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 },
]
......
......@@ -3,7 +3,7 @@ import { Card, Space, Button } from 'antd'
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import useEvaluateColumn, { setColumnsByLinks } from '../hooks/useEvaluateColumn';
import { evaluationListSchema } from '../schema';
import { querySchema } from './schema';
import useFetchList from '../hooks/useFetchList';
import { createFormActions } from '@formily/antd';
import { PlusOutlined } from '@ant-design/icons';
......@@ -24,7 +24,12 @@ interface Iprops {};
const List: React.FC<Iprops> = (props: Iprops) => {
const { fetchListData } = useFetchList();
const { columns, fetchStatusOptions } = useEvaluateColumn<GetMemberAppraisalSummaryPageResponseDetail>(defaultColumns, [])
const { columns, fetchStatusOptions } = useEvaluateColumn<GetMemberAppraisalSummaryPageResponseDetail>(defaultColumns, [
{
title: "考评最终分",
dataIndex: "totalScore"
}
])
const controllerBtns = (
<div>
......@@ -45,7 +50,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
<Card>
<CustomizeQueryList
columns={columns}
schema={evaluationListSchema}
schema={querySchema}
fetchListData={handleFetch}
expressionScope={{
controllerBtns,
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 会员考评页scheam
*/
export const querySchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索会员名称',
align: 'flex-left',
tip: '输入会员名称进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
subject: {
type: 'string',
'x-component-props': {
placeholder: '考评主题',
allowClear: true,
style: {
width: 145,
},
},
},
'[appraisalDayStart,appraisalDayEnd]': {
type: 'daterange',
'x-component-props': {
placeholder: ['考评范围开始时间', '考评范围结束时间'],
allowClear: true,
style: {
width: 260,
},
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
export const scoringSchema: ISchema = {
type: 'object',
properties: {
items: {
"type": "array",
"x-component": "arraytable",
"x-component-props": {
// operations: false,
renderAddition: () => null,
renderRemove: () => null,
renderMoveDown: () => null,
renderMoveUp: () => null,
operations: false,
},
items: {
type: "object",
properties: {
id: {
title: "序号",
editable: false,
type: 'string',
"x-props": {
width: 65,
},
},
name: {
title: '考评项目',
type: 'string',
"x-component-props": {},
editable: false,
"x-props": {
width: 160,
}
},
content: {
title: '考评内容',
type: 'textarea',
editable: false,
'x-props': {
width: 424,
},
'x-component-props': {
row: 1,
style: {
height: 32,
}
}
},
'userName': {
title: "考评人",
type: 'string',
editable: false,
'x-props': {
width: 128,
},
// "x-component": "FormilySelectMember",
// "x-component-props": {
// children: '选择考评人'
// }
},
templates: {
title: '考评模板',
type: "object",
'x-component': 'FormilyUploadFiles',
'x-component-props': {
mode: 'link',
buttonText: '上传',
fileContainerClassName: 'customizeFileContainer'
},
editable: false,
"x-props": {
width: 180,
}
},
reports: {
title: '考评报告',
type: "object",
'x-component': 'FormilyUploadFiles',
'x-component-props': {
mode: 'link',
buttonText: '上传',
fileContainerClassName: 'customizeFileContainer'
},
"x-props": {
width: 180,
}
},
scoring: {
title: '考评计分',
type: 'string',
"x-props": {
width: 95,
},
'x-rules': [
{
required: true,
message: '请填写考评计分'
},
{
pattern: /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/,
message: '请填写数字,可保留两位小数'
}
],
"x-component-props": {}
},
}
}
}
}
}
......@@ -10,6 +10,7 @@ interface Iprops {
// handleFetch
// onOk: (selectRowKeys: string[] | number[], selectRowRecord: any[]) => void;
// fetchData: (params: any) => Promise<any>,
editable: boolean,
mutators: {
change: (params: any[]) => void
},
......@@ -21,7 +22,7 @@ const DEFAULT_RETURN_DATA = {
}
const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops) => {
const { value, mutators } = props;
const { value, mutators, editable } = props;
const { visible, toggle } = useModal();
const columns = useMemo(() => [
......@@ -46,7 +47,7 @@ const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索评估项目',
tip: '输入 评估项目 进行搜索',
advanced: false,
},
......@@ -89,16 +90,17 @@ const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props
mode={"checkbox"}
value={value}
/>
<div
style={{
display: editable ? 'flex' : 'none',
cursor: 'pointer',
width: '100%',
background: '#fbfbfb',
padding: '8px 0px',
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center"
alignItems: "center",
}}
onClick={() => toggle(true)}
>
......
......@@ -12,9 +12,9 @@ const memberSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索姓名',
align: 'flex-left',
tip: '输入用户名进行搜索',
tip: '输入名进行搜索',
},
},
[FORM_FILTER_PATH]: {
......@@ -24,7 +24,7 @@ const memberSchema: ISchema = {
grid: true,
full: true,
autoRow: true,
columns: 3,
columns: 4,
},
properties: {
orgName: {
......
......@@ -83,11 +83,14 @@ type SubmitDataType = {
}[],
}
const EvaluateAdd = () => {
const EvaluateAdd = (props) => {
const { location } = props;
const { visible, toggle } = useModal()
const { id } = usePageStatus();
const isEdit = useMemo(() => id && typeof id === 'string', [id]);
const params = useMemo(() => { return id ? { id: id.toString() } : null }, [id]);
const isPreview = location.pathname.includes('/memberCenter/memberAbility/memberEvaluate/createEvaluate/view');
const { loading, initialValue }= useInitialValue<GetMemberAppraisalWaitPublishGetResponse, { id: string }>(PublicApi.getMemberAppraisalWaitPublishGet, params)
const [ submibtloading, setSubmibtloading] = useState<boolean>(false);
const { memberColumns, memberSchema, handleFetchData } = useGetCommonSubMember(PublicApi.getMemberInspectMembers)
......@@ -95,8 +98,6 @@ const EvaluateAdd = () => {
const onSubmit = async (values: SubmitDataType) => {
const { items, appraisalDayStart, appraisalDayEnd, attachments, selectedProject, verifySteps, history: anyHistory, currentStep, ...rest } = values
// console.log(values);
// return ;
const projectList = items.map((_item) => {
const { sendAppraisal, memberName, score, templates, reports, type, ...otherProps } = _item;
return {
......@@ -279,13 +280,23 @@ const EvaluateAdd = () => {
}
}, [initialValue])
const titleRender = () => {
if (isPreview) {
return "查看考评单单"
}
if(isEdit) {
return "修改考评单"
}
return "新增考评单"
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title={isEdit ? "修改整改通知单" : "新建整改通知单"}
title={titleRender()}
extra={
(
!isPreview && (
<Button
type="primary"
icon={<SaveOutlined />}
......@@ -299,7 +310,7 @@ const EvaluateAdd = () => {
>
<Card className={styles.card}>
<NiceForm
editable={true}
editable={!isPreview}
onSubmit={onSubmit}
initialValues={formatedInitialValue}
schema={evaluateAddSchema}
......@@ -314,12 +325,12 @@ const EvaluateAdd = () => {
}}
expressionScope={{
renderAddition: renderAddition,
connectMember: (
connectMember: !isPreview ? (
<div onClick={() => toggle(true)}>
<LinkOutlined />
<span style={{marginLeft: 4}}>选择</span>
</div>
),
) : null,
renderListTableRemove,
fetchUserData: fetchUserData
}}
......
......@@ -12,11 +12,13 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { PublicApi } from '@/services/api';
import CustomizeQueryList from '../../components/CustomizeQueryList';
import { Link } from 'react-router-dom';
import { GetMemberAppraisalWaitPublishPageRequest, GetMemberAppraisalWaitPublishPageResponse, GetMemberAppraisalWaitPublishPageResponseDetail } from '@/services/MemberV2Api/id9028';
import { GetMemberAppraisalWaitPublishPageRequest, GetMemberAppraisalWaitPublishPageResponse, GetMemberAppraisalWaitPublishPageResponseDetail } from '@/services/MemberV2Api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
const defaultColumns = setColumnsByLinks();
const defaultColumns = setColumnsByLinks({
detail: "/memberCenter/memberAbility/memberEvaluate/createEvaluate/view"
});
interface Iprops {};
const List: React.FC<Iprops> = (props: Iprops) => {
......
......@@ -63,7 +63,7 @@ export const setColumnsByLinks = (link?: { [key: string]: string }) => {
<div style={{ display: 'flex', flexDirection: 'column', }}>
{
link?.['detail'] && (
<Link to={`${link?.['detail']}?id=${record.id}`}>{record.id}</Link>
<Link to={`${link?.['detail']}?id=${record.id}`}>{record.appraisalNo}</Link>
) || (
<span>{record.id}</span>
)
......@@ -83,9 +83,9 @@ function useEvaluateColumn<T extends { [key: string]: any } = any>(defaultColumn
const [statusOptions, setStatusOptions] = useState<OptionType[]>([]);
const fetchStatusOptions = useCallback(async () => {
const { code, data } = await PublicApi.getMemberInspectTypes();
const { code, data } = await PublicApi.getMemberAppraisalStatusList();
if (code === 1000) {
const formatedData = data.map((_item) => ({label: _item.text, value: _item.id}));
const formatedData = data.map((_item) => ({label: _item.message, value: _item.code}));
setStatusOptions(formatedData)
return formatedData
}
......
......@@ -42,7 +42,7 @@ function useGetDetailCommon(options: Options) {
return [
{
title: '考评单号',
value: initialValue?.id,
value: initialValue?.appraisalNo,
},
{
title: '会员名称',
......@@ -78,9 +78,7 @@ function useGetDetailCommon(options: Options) {
},
{
title: "内部状态",
value: <div>
一通报考评结果
</div>
value: initialValue?.statusName
},
{
title: "考评完成时间",
......
......@@ -125,6 +125,12 @@ export const evaluateAddSchema: ISchema = {
title: '操作'
},
},
"x-rules": [
{
required: true,
message: '请填写考评项目'
}
],
items: {
type: "object",
properties: {
......
......@@ -31,7 +31,7 @@ export const evaluationListSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索会员名称',
tip: '输入 会员名称 进行搜索',
},
},
......@@ -59,25 +59,25 @@ export const evaluationListSchema: ISchema = {
'[appraisalDayStart,appraisalDayEnd]': {
type: 'daterange',
'x-component-props': {
placeholder: ['考评开始时间', '考评完成时间'],
placeholder: ['考评范围开始时间', '考评范围结束时间'],
allowClear: true,
style: {
width: 240,
},
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
style: {
width: 160,
width: 260,
},
},
},
// status: {
// type: 'string',
// default: undefined,
// enum: [],
// 'x-component-props': {
// placeholder: '内部状态(全部)',
// allowClear: true,
// style: {
// width: 160,
// },
// },
// },
submit: {
'x-component': 'Submit',
......
......@@ -43,10 +43,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
'[appraisalDayStart,appraisalDayEnd]': {
type: 'daterange',
'x-component-props': {
placeholder: ['考评开始时间', '考评完成时间'],
placeholder: ['考评范围开始时间', '考评范围结束时间'],
allowClear: true,
style: {
width: 240,
width: 260,
},
},
},
......
......@@ -137,10 +137,10 @@ const TobeEvaluateDetail = () => {
templates: _row.templates,
reports: _row.appraisalReport
})),
resultAttachments: value.resultAttachments.map((_item) => ({
resultAttachments: value.resultAttachments?.map((_item) => ({
name: _item.name,
url: _item.url
}))
})) || []
}
const { code, data } = await PublicApi.postMemberAppraisalWaitSubmitSubmit(postData as any);
setSubmitLoading(false)
......@@ -237,7 +237,9 @@ const TobeEvaluateDetail = () => {
>
<NiceForm
onSubmit={resultOnSubmit}
// initialValues={initialValue}
initialValues={{
notifyMember: 1
}}
expressionScope={createRichTextUtils()}
schema={evaluateScoreRes}
actions={resultForm}
......
......@@ -25,13 +25,12 @@ const List: React.FC<Iprops> = (props: Iprops) => {
{
title: '操作',
render: (_text, _record) => (
<Space>
{
_record.submit && (
<Link to={`/memberCenter/memberAbility/memberEvaluate/tobeSubmitSummary/detail?id=${_record.id}`}>提交</Link>
)
}
</Space>
_record.submitOrUpdate && (
<Space>
<Link to={`/memberCenter/memberAbility/memberEvaluate/tobeSubmitSummary/detail?id=${_record.id}`}>提交</Link>
<Link to={`/memberCenter/memberAbility/memberEvaluate/tobeSubmitSummary/detail?id=${_record.id}`}>修改</Link>
</Space>
)
)
}
])
......
......@@ -73,7 +73,7 @@ export const modifyEvaluateScore: ISchema = {
* 考评结果
*/
export const evaluateScoreRes = {
export const evaluateScoreRes: ISchema = {
type: 'object',
properties: {
layout: {
......@@ -88,18 +88,28 @@ export const evaluateScoreRes = {
totalScore: {
title: '考评最终分',
type: 'string',
require: true,
// require: true,
'x-rules': [
{
required: true,
message: "请填写考评最终分",
}
]
},
result: {
title: '考评结果',
type: 'textarea',
require: true,
'x-rules': [
{
required: true,
message: "请填写考评结果",
}
]
},
notifyMember: {
title: "{{ text('通知考评结果',help('将考评结果通知给考察对象')) }}",
type: "string",
'x-component': 'FormilyCheckbox',
require: true,
},
resultAttachments: {
title: '考评模板',
......
......@@ -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"
......
......@@ -169,7 +169,6 @@ const InspectionAdd = () => {
}
}, [initialValue])
console.log(memberModalValue);
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -227,7 +226,7 @@ const InspectionAdd = () => {
mode={"radio"}
value={memberModalValue}
/>
<TableModal
<TableModal
visible={userModalVisible}
onClose={() => userModalToggle(false)}
title={"选择用户"}
......
......@@ -36,7 +36,7 @@ const columns: ColumnsType<GetMemberInspectPageResponseDetail> = [
sorter: (_a, _b) => +_a.score - +_b.score,
},
{
title: '内部状态',
title: '考察结果',
dataIndex: 'status',
render: (text, record) => {
const isFail = +record.score < 60
......
......@@ -2,11 +2,11 @@ import { ColumnsType } from 'antd/es/table';
export const userColumns: ColumnsType<any> = [
{
title: '用户id',
title: '序号',
dataIndex: 'userId',
},
{
title: '会员名称',
title: '姓名',
dataIndex: 'name',
},
{
......
......@@ -96,7 +96,7 @@ export const InspectionAddSchema: ISchema = {
],
},
userName: {
title: '会员代表',
title: '考察代表',
type: 'string',
"x-component-props": {
// disabled: true,
......@@ -162,7 +162,7 @@ export const InspectionAddSchema: ISchema = {
],
},
reports: {
title: <div>考察要求附件 <span style={{color: "#ff4d4f"}}>*</span></div>,
title: <div>考察报告 <span style={{color: "#ff4d4f"}}>*</span></div>,
type: 'object',
required: true,
'x-component': 'FormilyUploadFiles',
......@@ -194,7 +194,7 @@ export const memberSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索会员名称',
tip: '输入 会员名称 进行搜索',
advanced: false,
},
......
......@@ -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) {
......
import StatusTag from "@/components/StatusTag"
import moment from "moment"
import React from "react"
import { Link } from 'umi'
const OuterStatusType = ['success', 'warning', 'default', 'danger', 'primary', 'nobility'];
export const commonColumns = [
{
title: '考评单号/主题',
title: '整改单号/主题',
dataIndex: 'id',
render: (text, record) => {
......@@ -17,7 +20,7 @@ export const commonColumns = [
}
},
{
title: '会员名称',
title: '上级会员名称',
dataIndex: 'upperMemberName',
},
{
......@@ -35,5 +38,16 @@ export const commonColumns = [
{
title: '整改结果',
dataIndex: 'agreeResultName',
render: (text, record) => {
return record.agreeResult ? record.agreeResultName : '';
}
},
{
title: '外部状态',
dataIndex: 'outerStatus',
render: (text, record) => {
const offset = record.outerStatus % OuterStatusType.length;
return <StatusTag type={OuterStatusType[offset] as 'success'} title={record.outerStatusName} />
}
}
]
......@@ -43,7 +43,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
}
}
], { fetchStatusListApi: PublicApi.getMemberRectifyManageStatusList })
], { fetchStatusListApi: PublicApi.getMemberRectifyManageStatusList, key: 'outerStatus' })
const handleFetch = async (params) => {
const result = fetchListData(PublicApi.getMemberRectifyManagePage, params);
......@@ -70,7 +70,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
fetchListData={handleFetch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions,'name', FORM_FILTER_PATH,);
useAsyncSelect('status', fetchStatusOptions);
useAsyncSelect('outerStatus', fetchStatusOptions);
}}
/>
</Card>
......
......@@ -25,13 +25,13 @@ export const querySchema: ISchema = {
grid: true,
full: true,
autoRow: true,
columns: 3,
columns: 6,
},
properties: {
subject: {
type: 'string',
'x-component-props': {
placeholder: '考评主题',
placeholder: '整改主题',
allowClear: true,
style: {
width: 160,
......@@ -41,14 +41,14 @@ export const querySchema: ISchema = {
'[rectifyDayStart,rectifyDayEnd]': {
type: 'daterange',
'x-component-props': {
placeholder: ['考评开始时间', '考评完成时间'],
placeholder: ['整改开始时间', '整改完成时间'],
allowClear: true,
style: {
width: 240,
},
},
},
status: {
outerStatus: {
type: 'string',
enum: [],
'x-component-props': {
......
......@@ -46,7 +46,7 @@ export const innerColumns: ColumnsType<any> = [
},
{
title: '状态',
dataIndex: 'innerStatusName '
dataIndex: 'innerStatusName'
},
{
title: '操作',
......
......@@ -2,13 +2,16 @@ import React from 'react';
import { ColumnsType } from 'antd/es/table';
import { Link } from 'umi';
import StatusTag from '@/components/StatusTag';
import { GetMemberRectifySummaryPageResponseDetail } from '@/services/MemberV2Api';
import moment from 'moment';
/**
* 列表页column
*/
const OuterStatusType = ['success', 'warning', 'default', 'danger', 'primary', 'nobility'];
const format = 'YYYY-MM-DD'
const listColumns: ColumnsType<any> = [
const listColumns: ColumnsType<GetMemberRectifySummaryPageResponseDetail> = [
{
title: '会员名称',
......@@ -17,28 +20,31 @@ const listColumns: ColumnsType<any> = [
{
title: '整改期限开始日期',
dataIndex: 'rectifyDayStart',
sorter: (a, b) => a.rectifyDayStart - b.rectifyDayStart,
sorter: (a, b) => moment(a.rectifyDayStart, format).valueOf() - moment(b.rectifyDayStart, format).valueOf(),
},
{
title: '整改期限截止日期',
dataIndex: 'rectifyDayEnd',
sorter: (a, b) => a.rectifyDayEnd - b.rectifyDayEnd,
sorter: (a, b) => moment(a.rectifyDayEnd, format).valueOf() - moment(b.rectifyDayEnd, format).valueOf(),
},
{
title: '整改结果',
dataIndex: 'agreeResultName',
render: (text, record) => {
return record.agreeResult ? record.agreeResultName : '';
}
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
dataIndex: 'outerStatus',
render: (text, record) => {
const offset = record.status % OuterStatusType.length;
const offset = record.outerStatus % OuterStatusType.length;
return <StatusTag type={OuterStatusType[offset] as 'success'} title={record.outerStatusName} />
}
}
]
export const setColumnsByLinks = (link?: { [key: string]: string }) => {
export const setColumnsByLinks = (link?: { [key: string]: string }, blackList?: string[]) => {
const linksColumns: ColumnsType<any> = [
{
title: '整改单号/主题',
......@@ -60,6 +66,7 @@ export const setColumnsByLinks = (link?: { [key: string]: string }) => {
}
},
]
return linksColumns.concat(listColumns);
const filteredColumns = blackList && blackList.length > 0 ? listColumns.filter((_item) => !blackList.includes((_item as any).dataIndex)) : listColumns
return linksColumns.concat(filteredColumns);
}
// export default listColumns;
......@@ -8,7 +8,8 @@ type OptionType = {
}
type Options = {
fetchStatusListApi: () => Promise<any>
fetchStatusListApi?: () => Promise<any>,
key?: string
}
/**
......@@ -53,11 +54,11 @@ export default function useColumns<T>(columnsList: ColumnsType<T>, actionColumn?
return ;
}
const mapKeys = {
status: statusOptions,
[defaultOptions?.key || 'status']: statusOptions,
}
const keys = Object.keys(mapKeys) || []
const map = {};
keys.forEach((_item: "status") => {
keys.forEach((_item: keyof typeof mapKeys) => {
map[_item] = mapKeys[_item].map((_row) => ({ text: _row.label, ..._row }))
})
setColumnsWithFilterOption(map)
......
......@@ -17,10 +17,10 @@ function useGetDetailCommon({ initialValue }: { initialValue: GetMemberRectifyWa
return [
{
title: '整改单号',
value: initialValue?.id
value: initialValue?.rectifyNo
},
{
title: "会员名称",
title: initialValue && typeof (initialValue as any).upperMemberName !== 'undefined' ? "上级会员名称" : '会员名称',
value: initialValue?.name || (initialValue as any)?.upperMemberName
},
{
......@@ -58,7 +58,7 @@ function useGetDetailCommon({ initialValue }: { initialValue: GetMemberRectifyWa
value: (
<div>
{
initialValue && initialValue?.outerVerifySteps?.[initialValue.currentOuterStep]?.['stepName']
initialValue && initialValue?.outerStatusName
}
</div>
)
......
......@@ -29,7 +29,7 @@ export const rectificationListSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索会员名称',
tip: '输入 会员名称 进行搜索',
},
},
......@@ -47,7 +47,7 @@ export const rectificationListSchema: ISchema = {
subject: {
type: 'string',
'x-component-props': {
placeholder: '改主题',
placeholder: '改主题',
allowClear: true,
style: {
width: 160,
......@@ -58,10 +58,10 @@ export const rectificationListSchema: ISchema = {
type: 'daterange',
default: undefined,
'x-component-props': {
placeholder: '会员等级(全部)',
placeholder: ["整改开始时间", "整改结束时间"],
allowClear: true,
style: {
width: 160,
width: 240,
},
},
},
......
......@@ -122,7 +122,7 @@ const InspectionAdd = (props) => {
if(isEdit) {
return "修改整改通知单"
}
return "新增整改通知到哪"
return "新增整改通知"
}
return (
......
......@@ -14,9 +14,12 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
interface Iprops {};
const queryColumns = setColumnsByLinks({
detail: '/memberCenter/memberAbility/memberRectification/rectificationAdd/view'
})
const queryColumns = setColumnsByLinks(
{
detail: '/memberCenter/memberAbility/memberRectification/rectificationAdd/view'
},
["agreeResultName"]
)
const List: React.FC<Iprops> = (props: Iprops) => {
const { fetchListData } = useFetchList();
......@@ -41,7 +44,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
}
}
])
], { key: 'outerStatus' })
const controllerBtns = (
<div>
......@@ -54,16 +57,14 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
const handleSendNotice = useCallback(async(id: number, type: "send" | 'remove') => {
const newList = [...currentIdIsInLoading];
newList.push(id);
setCurrentIdIsInLoading(newList)
setCurrentIdIsInLoading((prev) => prev.concat(id))
const service = type === 'send' ? PublicApi.postMemberRectifyWaitAddSend : PublicApi.postMemberRectifyWaitAddDelete
const { data, code } = await service({id: id});
setCurrentIdIsInLoading((prev) => prev.filter((_item) => _item !== id));
if (code === 1000) {
ref.current?.submit();
}
}, [currentIdIsInLoading])
}, [])
const handleFetch = async (params) => {
const result = fetchListData(PublicApi.getMemberRectifyWaitAddPage, params);
......@@ -82,7 +83,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', FORM_FILTER_PATH);
useAsyncSelect('status', fetchStatusOptions);
useAsyncSelect('outerStatus', fetchStatusOptions);
}}
/>
</Card>
......
......@@ -29,7 +29,7 @@ const rectificationAddDetail = () => {
step: item.step,
stepName: item.stepName,
roleName: item.roleName,
status: (initialValue?.currentOuterStep > item.step ? 'finish' : 'wait') as 'finish' | 'wait',
status: (initialValue?.currentOuterStep >= item.step ? 'finish' : 'wait') as 'finish' | 'wait',
}))
}, [initialValue])
......
......@@ -11,6 +11,7 @@ import CustomizeQueryList from '../../components/CustomizeQueryList';
import { Link } from 'umi';
import useColumns from '../common/hooks/useColumns';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { GetMemberRectifySummaryPageRequest } from '@/services/MemberV2Api';
interface Iprops {};
......@@ -20,7 +21,7 @@ const queryColumns = setColumnsByLinks({
const List: React.FC<Iprops> = (props: Iprops) => {
const { fetchListData } = useFetchList();
const { columns, fetchStatusOptions } = useColumns(queryColumns)
const { columns, fetchStatusOptions } = useColumns(queryColumns, [], { key: 'outerStatus' })
const controllerBtns = (
<div>
......@@ -30,7 +31,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
</div>
)
const handleFetch = async (params) => {
const handleFetch = async (params: GetMemberRectifySummaryPageRequest) => {
const result = fetchListData(PublicApi.getMemberRectifySummaryPage, params);
return result
}
......@@ -46,7 +47,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions,'name', FORM_FILTER_PATH,);
useAsyncSelect('status', fetchStatusOptions);
useAsyncSelect('outerStatus', fetchStatusOptions);
}}
/>
</Card>
......
......@@ -14,9 +14,12 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
interface Iprops {};
const queryColumns = setColumnsByLinks({
detail: '/memberCenter/memberAbility/memberRectification/tobeConfirmRectification/detail'
})
const queryColumns = setColumnsByLinks(
{
detail: '/memberCenter/memberAbility/memberRectification/tobeConfirmRectification/detail'
},
["agreeResultName"]
)
const List: React.FC<Iprops> = (props: Iprops) => {
const { fetchListData } = useFetchList();
......@@ -35,7 +38,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
}
}
])
], { key: 'outerStatus' })
const handleFetch = async (params) => {
const result = fetchListData(PublicApi.getMemberRectifyWaitConfirmPage, params);
......@@ -50,7 +53,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
fetchListData={handleFetch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions,'name', FORM_FILTER_PATH,);
useAsyncSelect('status', fetchStatusOptions);
useAsyncSelect('outerStatus', fetchStatusOptions);
}}
/>
</Card>
......
......@@ -51,9 +51,9 @@ export const querySchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索通知单号',
placeholder: '搜索会员名称',
align: 'flex-left',
tip: '输入通知单号进行搜索',
tip: '输入会员名称进行搜索',
},
},
[FORM_FILTER_PATH]: {
......@@ -69,33 +69,32 @@ export const querySchema: ISchema = {
subject: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
placeholder: '整改主题',
allowClear: true,
style: {
width: 160,
},
},
},
processName: {
type: 'string',
'[rectifyDayStart,rectifyDayEnd]': {
type: 'daterange',
'x-component-props': {
placeholder: '加工企业名',
placeholder: ['整改开始时间', '整改完成时间'],
allowClear: true,
style: {
width: 240,
},
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
placeholder: '外部状态',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -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 => {
......
......@@ -63,7 +63,7 @@ const InquirySearch = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button disabled={record.isQuoted === 1} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote?id=${record.id}`)} type='link'>报价</Button>
render: (text: any, record: any) => <Button disabled={record.isQuoted === 1} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`)} type='link'>报价</Button>
}
];
......
......@@ -83,7 +83,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
key: 'costPrice',
dataIndex: 'costPrice',
render: (text: any) => (
<Typography.Text>{text ?`¥${text.toFixed(2)}` : `¥0`}</Typography.Text>
<Typography.Text>{text ? `¥${text.toFixed(2)}` : `¥0`}</Typography.Text>
)
},
{
......@@ -150,19 +150,20 @@ const Material: React.FC<Materialprops> = (props: any) => {
message.warning('请选择货品')
return
}
console.log(e, 10086)
setDataSource(e.selectRow.map((item: any) => {
return {
id: item.id,
productId: item.id,
number: item.code,
name: item.name,
model: item.type,
category: !isEmpty(item.customerCategory) && item.customerCategory.name,
brand: !isEmpty(item.brand) && item.brand.name,
unit: item.unitName,
needCount: null,
needCount: item.needCount ? item.needCount : null,
costPrice: item.costPrice,
needPrice: null,
arriveTime: null,
needPrice: item.needPrice ? item.needPrice : null,
arriveTime: item.arriveTime ? item.arriveTime : null,
}
}))
setVisible(false)
......@@ -179,6 +180,12 @@ const Material: React.FC<Materialprops> = (props: any) => {
const data = [...dataSource];
data.splice(index, 1);
message.success('删除成功')
data.forEach((item, index) => {
form.setFieldsValue({
[`needCount${index}`]: item.needCount ? item.needCount : undefined,
[`arriveTime${index}`]: item.arriveTime ? moment(item.arriveTime) : undefined,
})
})
setDataSource(data)
}
......@@ -244,6 +251,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
visible={visible}
onclose={() => setVisible(false)}
confirm={handleConfirm}
rowCtlData={dataSource}
/>
</Form>
)
......
import React, { useRef } from 'react';
import React, { useEffect, useRef } from 'react';
import {
Drawer,
Button
......@@ -19,14 +19,19 @@ import {
const formActions = createFormActions();
interface Iprops {
/** 显示隐藏 */
visible: boolean,
/** 关闭 */
onclose?(),
/** 确认 */
confirm?(e:any),
/** 回显时选中的勾选 */
rowCtlData?: Array<any>[],
}
const SelectProduct: React.FC<Iprops> = (props: any) => {
const ref = useRef({});
const { visible, onclose, confirm } = props;
const ref = useRef<any>({});
const { visible, onclose, confirm, rowCtlData } = props;
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id' });
const columns: ColumnType<any>[] = [
{
......@@ -71,6 +76,31 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
})
}
useEffect(() => {
if (rowCtlData) {
RowCtl.setSelectRow(rowCtlData.map((item:any) => {
return {
id: item.productId,
code: item.number,
name: item.name,
type: item.model,
customerCategory: { name: item.category },
brand: { name: item.brand },
unitName: item.unit,
costPrice: item.costPrice,
needCount: item.needCount,
needPrice: item.needPrice,
arriveTime: item.arriveTime,
}
}))
RowCtl.setSelectedRowKeys(rowCtlData.map(v => v.productId))
}
}, [rowCtlData])
const search = (values: any) => {
ref.current.reload(values)
}
return (
<Drawer
visible={visible}
......@@ -101,6 +131,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
......
......@@ -80,8 +80,8 @@ const DemandDetailed = () => {
{
label: '适用地市', extra: (
<div>
{areas.map((item: any, index: number) => (
<p key={`areas${index + 1}`}>{item}</p>
{data.areas.map((it: any, idx: number) => (
<p key={`areas${idx + 1}`}>{`${it.province}/${it.city}`}</p>
))}
</div>
)
......
......@@ -78,7 +78,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
const fetchAllShop = () => {
const param: any = {
siteId,
type: 1
type: 3
}
PublicApi.getManageShopFindShopsBySiteId(param).then(res => {
if (res.code === 1000) {
......
......@@ -407,16 +407,27 @@ export const SelectProductSchema: ISchema = {
placeholder: '货号'
}
},
customerCategory: {
customerCategoryId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '品类'
placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: 160
}
}
},
brand: {
brandId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '品牌'
placeholder: '请选择品牌',
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
style: {
width: 160
}
}
},
type: {
......@@ -425,7 +436,6 @@ export const SelectProductSchema: ISchema = {
placeholder: '规格型号'
}
},
}
},
sumbit: {
......
......@@ -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