Commit 9df43840 authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent 7f845688
......@@ -268,6 +268,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
});
});
setFieldState('quotaSlide', fileState => {
fileState.value = maxQuota;
fileState.props['x-component-props'].max = maxQuota;
fileState.props['x-component-props'].marks = {
0: {
......
......@@ -262,6 +262,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
});
});
setFieldState('quotaSlide', fileState => {
fileState.value = verify?.maxApplyQuota;
fileState.props['x-component-props'].max = verify?.maxApplyQuota;
fileState.props['x-component-props'].marks = {
0: {
......
......@@ -378,6 +378,7 @@ const Analysis: React.FC<AnalysisProps> = ({
onEdit={handleEditSent}
opposite={false}
editable={true}
searchTip="被评价方"
/>
</TabPane>
</Tabs>
......
import React, { useState, useEffect } from 'react';
import { Button, Rate, Spin, Pagination } from 'antd';
import { createFormActions } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import moment from 'moment';
import NiceForm from '@/components/NiceForm';
import { checkMore } from '@/utils';
......@@ -8,6 +8,9 @@ import { searchSchema } from './schema';
import styles from './index.less';
const formActions = createFormActions();
const {
onFormInit$,
} = FormEffectHooks;
const PAGE_SIZE = 10;
......@@ -103,6 +106,9 @@ interface RecordListProps {
onCheck: (record: RecordItem) => void;
onEdit?: (record: RecordItem) => void;
// 搜索框提示语
searchTip?: string;
};
interface RecordListState {
......@@ -245,6 +251,7 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
searchable = true,
opposite = true,
editable = false,
searchTip = '评价方',
} = this.props;
const { page, size, loading, receivedList, hasMore } = this.state;
......@@ -255,7 +262,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
actions={formActions}
onSubmit={this.handleSearch}
effects={($, actions) => {
const { setFieldState } = actions;
onFormInit$().subscribe(fieldState => {
setFieldState('memberName', state => {
state.props['x-component-props'].tip = searchTip;
});
});
}}
schema={searchSchema}
/>
......
......@@ -10,6 +10,7 @@ import {
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 { PublicApi } from '@/services/api';
......@@ -156,7 +157,9 @@ const ReceivedDetail: React.FC = () => {
}}
>
<Descriptions.Item label="供应会员">{orderInfo?.supplyMembersName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>
{orderInfo && orderInfo.createTime ? moment(orderInfo.createTime).format('YYYY-MM-DD HH:mm:ss') : ''}
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-10-19 16:02:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-27 17:00:44
* @LastEditTime: 2020-11-13 09:55:56
* @Description:
*/
......@@ -34,7 +34,7 @@ export const normalizeUnevaluatedList = (arr: {[key: string]: any}[]) => {
star: 5, // 评分星星
comment: '', // 评价
picture: [],
smile: 1, // 笑脸
smile: 5, // 笑脸
};
ret.push(atom);
});
......
......@@ -378,6 +378,7 @@ const Analysis: React.FC<AnalysisProps> = ({
onEdit={handleEditSent}
opposite={false}
editable={true}
searchTip="被评价方"
/>
</TabPane>
</Tabs>
......
import React, { useState, useEffect } from 'react';
import { Button, Rate, Spin, Pagination } from 'antd';
import { createFormActions } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import moment from 'moment';
import NiceForm from '@/components/NiceForm';
import { checkMore } from '@/utils';
......@@ -8,6 +8,9 @@ import { searchSchema } from './schema';
import styles from './index.less';
const formActions = createFormActions();
const {
onFormInit$,
} = FormEffectHooks;
const PAGE_SIZE = 10;
......@@ -103,6 +106,9 @@ interface RecordListProps {
onCheck: (record: RecordItem) => void;
onEdit?: (record: RecordItem) => void;
// 搜索框提示语
searchTip?: string;
};
interface RecordListState {
......@@ -245,6 +251,7 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
searchable = true,
opposite = true,
editable = false,
searchTip = '评价方',
} = this.props;
const { page, size, loading, receivedList, hasMore } = this.state;
......@@ -255,7 +262,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
actions={formActions}
onSubmit={this.handleSearch}
effects={($, actions) => {
const { setFieldState } = actions;
onFormInit$().subscribe(fieldState => {
setFieldState('memberName', state => {
state.props['x-component-props'].tip = searchTip;
});
});
}}
schema={searchSchema}
/>
......
......@@ -67,7 +67,8 @@ export const searchSchema: ISchema = {
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
advanced: false,
advanced: false,
tip: '',
},
},
},
......
......@@ -10,6 +10,7 @@ import {
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 { PublicApi } from '@/services/api';
......@@ -156,7 +157,9 @@ const ReceivedDetail: React.FC = () => {
}}
>
<Descriptions.Item label="采购会员">{orderInfo?.createMemberName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>
{orderInfo && orderInfo.createTime ? moment(orderInfo.createTime).format('YYYY-MM-DD HH:mm:ss') : ''}
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
......
......@@ -34,7 +34,7 @@ export const normalizeUnevaluatedList = (arr: {[key: string]: any}[]) => {
star: 5, // 评分星星
comment: '', // 评价
picture: [],
smile: 1, // 笑脸
smile: 5, // 笑脸
};
ret.push(atom);
});
......
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