Commit e8975995 authored by XieZhiXiong's avatar XieZhiXiong

对接完毕评论相关

parent 058b3fd3
......@@ -509,6 +509,27 @@ const TranactionRoute: RouterChild = {
name: 'analysis',
component: '@/pages/transaction/supplierEvaluation/analysis',
},
// 收到的评价-详情
{
path: '/memberCenter/tranactionAbility/supplierEvaluation/received/detail',
name: 'receivedDetail',
component: '@/pages/transaction/supplierEvaluation/received/detail/index',
hideInMenu: true,
},
// 发出的评价-详情
{
path: '/memberCenter/tranactionAbility/supplierEvaluation/sent/detail',
name: 'sentDetail',
component: '@/pages/transaction/supplierEvaluation/sent/detail/index',
hideInMenu: true,
},
// 发出的评价-编辑
{
path: '/memberCenter/tranactionAbility/supplierEvaluation/sent/edit',
name: 'editSent',
component: '@/pages/transaction/supplierEvaluation/sent/detail/index',
hideInMenu: true,
},
// 收到的评价(UI合并到评价统计了,暂时不需要)
// {
// path: '/memberCenter/tranactionAbility/supplierEvaluation/received',
......@@ -548,6 +569,27 @@ const TranactionRoute: RouterChild = {
name: 'analysis',
component: '@/pages/transaction/purchaserEvaluation/analysis',
},
// 收到的评价-详情
{
path: '/memberCenter/tranactionAbility/purchaserEvaluation/received/detail',
name: 'receivedDetail',
component: '@/pages/transaction/purchaserEvaluation/received/detail/index',
hideInMenu: true,
},
// 发出的评价-详情
{
path: '/memberCenter/tranactionAbility/purchaserEvaluation/sent/detail',
name: 'sentDetail',
component: '@/pages/transaction/purchaserEvaluation/sent/detail/index',
hideInMenu: true,
},
// 发出的评价-编辑
{
path: '/memberCenter/tranactionAbility/purchaserEvaluation/sent/edit',
name: 'editSent',
component: '@/pages/transaction/purchaserEvaluation/sent/detail/index',
hideInMenu: true,
},
// 收到的评价(UI合并到评价统计了,暂时不需要)
// {
// path: '/memberCenter/tranactionAbility/purchaserEvaluation/received',
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-20 19:48:59
* @LastEditTime: 2020-10-21 11:43:49
*/
export default {
......@@ -282,6 +282,9 @@ export default {
'menu.tranactionAbility.supplierEvaluation.evaluate': '评价',
'menu.tranactionAbility.supplierEvaluation.analysis': '评价统计',
'menu.tranactionAbility.supplierEvaluation.received': '收到的评价',
'menu.tranactionAbility.supplierEvaluation.receivedDetail': '查看收到的评价',
'menu.tranactionAbility.supplierEvaluation.sentDetail': '查看发出的评价',
'menu.tranactionAbility.supplierEvaluation.editSent': '编辑发出的评价',
'menu.tranactionAbility.supplierEvaluation.sent': '发出的评价',
// 采购商评价
......@@ -290,6 +293,9 @@ export default {
'menu.tranactionAbility.purchaserEvaluation.evaluate': '评价',
'menu.tranactionAbility.purchaserEvaluation.analysis': '评价统计',
'menu.tranactionAbility.purchaserEvaluation.received': '收到的评价',
'menu.tranactionAbility.purchaserEvaluation.receivedDetail': '查看收到的评价',
'menu.tranactionAbility.purchaserEvaluation.sentDetail': '查看发出的评价',
'menu.tranactionAbility.purchaserEvaluation.editSent': '编辑发出的评价',
'menu.tranactionAbility.purchaserEvaluation.sent': '发出的评价',
// 物流能力
......
import React, { useEffect, useState } from 'react';
import { Tabs, Row, Col, Button } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api';
import { isJSONStr } from '@/utils';
......@@ -169,6 +170,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -176,6 +178,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.createTime,
target: item.byMemberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -200,6 +203,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -207,6 +211,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.dealTime as string,
target: item.memberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -233,6 +238,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -240,6 +246,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.dealTime as string,
target: item.subMemberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -284,6 +291,18 @@ const Analysis: React.FC = () => {
getTradeSummary();
}, []);
const handleJumpReceived = record => {
history.push(`/memberCenter/tranactionAbility/purchaserEvaluation/received/detail?orderId=${record.orderId}&id=${record.id}&preview=1`);
};
const handleEditSent = record => {
history.push(`/memberCenter/tranactionAbility/purchaserEvaluation/sent/edit?orderId=${record.orderId}&id=${record.id}&preview=0`);
};
const handleJumpSent = record => {
history.push(`/memberCenter/tranactionAbility/purchaserEvaluation/sent/detail?orderId=${record.orderId}&id=${record.id}&preview=1`);
};
return (
<PageHeaderWrapper>
<MellowCard
......@@ -324,16 +343,30 @@ const Analysis: React.FC = () => {
</Shelves>
<Shelves title="评价记录">
<RecordList fetchList={getTradeHistory} paginationType="button" searchable={false} />
<RecordList
fetchList={getTradeHistory}
paginationType="button"
searchable={false}
onCheck={handleJumpReceived}
/>
</Shelves>
</TabPane>
<TabPane tab="收到的评价" key="2">
<RecordList fetchList={getReceivedList} />
<RecordList
fetchList={getReceivedList}
onCheck={handleJumpReceived}
/>
</TabPane>
<TabPane tab="发出的评价" key="3">
<RecordList fetchList={getSentList} />
<RecordList
fetchList={getSentList}
onCheck={handleJumpSent}
onEdit={handleEditSent}
opposite={false}
editable={true}
/>
</TabPane>
</Tabs>
</MellowCard>
......
......@@ -74,6 +74,10 @@ export interface RecordItem {
* 评价方/被评价方
*/
target: string
/**
* 订单id
*/
orderId: string
};
export interface RecordRes {
......@@ -91,7 +95,14 @@ interface RecordListProps {
// 是否是查看收到的品论
opposite?: boolean;
// 是否可编辑的
editable?: boolean;
fetchList: (params: ListParams) => Promise<RecordRes>;
onCheck: (record: RecordItem) => void;
onEdit?: (record: RecordItem) => void;
};
interface RecordListState {
......@@ -140,8 +151,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
this.setState({ loading: true });
return new Promise((resolve, reject) => {
const { searchVal, page, size } = this.state;
const { dealTimeStart, dealTimeEnd } = searchVal;
fetchList({
...searchVal,
dealTimeStart: dealTimeStart ? moment(+dealTimeStart).format('YYYY-MM-DD HH:mm:ss') : null,
dealTimeEnd: dealTimeEnd ? moment(+dealTimeEnd).format('YYYY-MM-DD HH:mm:ss') : null,
current: `${page}`,
pageSize: `${size}`,
}).then(res => {
......@@ -210,11 +225,26 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
});
};
handleCheck = record => {
const { onCheck } = this.props;
if (onCheck) {
onCheck(record);
}
};
handleEdit = record => {
const { onEdit } = this.props;
if (onEdit) {
onEdit(record);
}
};
render() {
const {
paginationType = 'pagination',
searchable = true,
opposite = true,
editable = false,
} = this.props;
const { page, size, loading, receivedList, hasMore } = this.state;
......@@ -232,7 +262,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
)}
<Spin spinning={paginationType === 'pagination' && loading}>
<ul className={styles.record}>
<ul
className={styles.record}
style={{
minHeight: loading ? 69 : 'auto',
}}
>
{receivedList.data.map((item, index) => (
<li className={styles['record-item']} key={index}>
<div className={styles['record-item-good']}>
......@@ -272,7 +307,10 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
</div>
<div className={styles['record-item-actions']}>
<Button type="link">查看</Button>
{editable && (
<Button type="link" onClick={() => this.handleEdit(item)}>编辑</Button>
)}
<Button type="link" onClick={() => this.handleCheck(item)}>查看</Button>
</div>
</li>
))}
......
......@@ -19,7 +19,28 @@ export const searchSchema: ISchema = {
properties: {
star: {
type: 'string',
enum: [],
enum: [
{
label: '一星',
value: 1,
},
{
label: '二星',
value: 2,
},
{
label: '三星',
value: 3,
},
{
label: '四星',
value: 4,
},
{
label: '五星',
value: 5,
},
],
'x-component-props': {
placeholder: '评论星级',
allowClear: true,
......
import { useBusinessEffects } from './useBusinessEffects';
export const createEffects = (context, actions) => {
useBusinessEffects(context, actions);
};
\ No newline at end of file
import { FormEffectHooks, FormPath } from '@formily/antd';
const {
onFieldInputChange$,
onFieldValueChange$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions) => {
const {
setFieldState,
} = actions;
// 评论图片限制 4 张
onFieldInputChange$('comments.*.picture').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.picture`
}),
state => {
state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$('comments.*.star').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.smile`
}),
state => {
state.value = value;
}
);
});
}
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
} 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 { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, 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();
interface Unevaluated {
good: {
pic: string,
productName: string,
price: string,
purchaseCount: string,
};
star: number;
comment: string;
picture: string[];
smile: number;
};
const ReceivedDetail: React.FC = () => {
const { orderId, id, pageStatus } = usePageStatus();
const [orderInfo, setOrderInfo] = useState<GetOrderPurchaseOrderDetailsResponse>(null);
const [orderInfoLoading, setOrderInfoLoading] = useState(false);
const [evaluationInfo, setEvaluationInfo] = useState<Unevaluated>(null);
const [evaluationInfoLoading, setEvaluationInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getOrderInfo = () => {
if (!orderId) {
return;
}
setOrderInfoLoading(true);
PublicApi.getOrderProcurementOrderDetails({
id: orderId,
}).then(res => {
if (res.code === 1000) {
setOrderInfo(res.data);
}
}).finally(() => {
setOrderInfoLoading(false);
});
};
const getEvaluationInfo = () => {
if (!id) {
return;
}
setEvaluationInfoLoading(true);
PublicApi.getMemberCommentConsumerReceiveTradeHistoryGet({
id,
}).then(res => {
if (res.code === 1000) {
const { product } = res.data;
const productObj = isJSONStr(product) || {};
setEvaluationInfo({
good: {
pic: productObj.pic,
productName: productObj.productName,
price: productObj.price,
purchaseCount: productObj.purchaseCount,
},
star: res.data.star,
comment: res.data.comment,
picture: res.data.pics ? res.data.pics.map(item => normalizeFiledata(item)) : [],
smile: res.data.star,
});
}
}).finally(() => {
setEvaluationInfoLoading(false);
});
};
useEffect(() => {
getOrderInfo();
getEvaluationInfo();
}, []);
const handleSubmit = values => {
};
const beforeUpload = file => {
if (file.size / 1024 < 10) {
message.warning('图片大小超过10M');
return Promise.reject();
}
};
const UploadTip = (
<span
style={{
lineHeight: '24px',
color: '#909399',
fontWeight: 400,
wordBreak: 'break-all',
position: 'relative',
top: '34px',
}}
>
支持JPG/PNG/JPEG <br />每张最大不超过 10M,尺寸不限 <br />最大数量限制 4张
</span>
);
return (
<Spin spinning={orderInfoLoading || evaluationInfoLoading}>
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: orderInfo?.orderNo,
}}
/>
}
extra={(
<>
{
pageStatus === PageStatus.EDIT && (
<Button
type="primary"
icon={<FormOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
修改
</Button>
)
}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="供应会员">{orderInfo?.supplyMembersName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<NiceForm
actions={formActions}
initialValues={{
comments: [evaluationInfo],
}}
editable={pageStatus === PageStatus.EDIT}
expressionScope={{
UploadTip: pageStatus === PageStatus.EDIT ? UploadTip : null,
beforeUpload,
}}
onSubmit={handleSubmit}
components={{
EvaluationList,
}}
effects={($, actions) => {
createEffects($, actions);
}}
schema={evaluateSchema}
/>
</PageHeaderWrapper>
</Spin>
);
};
export default ReceivedDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 13:47:51
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const evaluateSchema: ISchema = {
type: 'object',
properties: {
comments: {
type: 'array',
'x-component': 'EvaluationList',
default: [],
items: {
type: 'object',
properties: {
LEFT_RIGHT: {
type: 'object',
'x-component': 'LeftRightLayout',
'x-component-props': {
rightProps: {
span: 2,
offset: 4,
},
},
properties: {
MEGA_LADYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 6,
labelAlign: 'left',
position: 'left',
},
properties: {
star: {
title: '满意程度',
required: true,
'x-component': 'Rating',
'x-component-props': {
allowHalf: false,
},
'x-rules': [
{
required: true,
message: '请选择满意程度',
},
],
},
comment: {
type: 'string',
title: '评价',
'x-component': 'TextArea',
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
title: '图片',
'x-component': 'Upload',
'x-component-props': {
listType: 'card',
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/purchaserEvaluation/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
addonAfter: '{{UploadTip}}',
},
},
},
},
smile: {
type: 'object',
default: 1,
'x-component': 'SmilingFace',
'x-component-props': {
position: 'right',
},
},
},
},
},
},
},
},
};
\ No newline at end of file
import { useBusinessEffects } from './useBusinessEffects';
export const createEffects = (context, actions) => {
useBusinessEffects(context, actions);
};
\ No newline at end of file
import { FormEffectHooks, FormPath } from '@formily/antd';
const {
onFieldInputChange$,
onFieldValueChange$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions) => {
const {
setFieldState,
} = actions;
// 评论图片限制 4 张
onFieldInputChange$('comments.*.picture').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.picture`
}),
state => {
state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$('comments.*.star').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.smile`
}),
state => {
state.value = value;
}
);
});
}
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
} 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 { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, 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();
const {
onFormInit$,
} = FormEffectHooks;
interface Unevaluated {
good: {
pic: string,
productName: string,
price: string,
purchaseCount: string,
};
star: number;
comment: string;
picture: string[];
smile: number;
};
const SentDetail: React.FC = () => {
const { orderId, id, pageStatus } = usePageStatus();
const [orderInfo, setOrderInfo] = useState<GetOrderPurchaseOrderDetailsResponse>(null);
const [orderInfoLoading, setOrderInfoLoading] = useState(false);
const [evaluationInfo, setEvaluationInfo] = useState<Unevaluated>(null);
const [evaluationInfoLoading, setEvaluationInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getOrderInfo = () => {
if (!orderId) {
return;
}
setOrderInfoLoading(true);
PublicApi.getOrderProcurementOrderDetails({
id: orderId,
}).then(res => {
if (res.code === 1000) {
setOrderInfo(res.data);
}
}).finally(() => {
setOrderInfoLoading(false);
});
};
const getEvaluationInfo = () => {
if (!id) {
return;
}
setEvaluationInfoLoading(true);
PublicApi.getMemberCommentConsumerSendTradeHistoryGet({
id,
}).then(res => {
if (res.code === 1000) {
const { product } = res.data;
const productObj = isJSONStr(product) || {};
setEvaluationInfo({
good: {
pic: productObj.pic,
productName: productObj.productName,
price: productObj.price,
purchaseCount: productObj.purchaseCount,
},
star: res.data.star,
comment: res.data.comment,
picture: res.data.pics ? res.data.pics.map(item => normalizeFiledata(item)) : [],
smile: res.data.star,
});
}
}).finally(() => {
setEvaluationInfoLoading(false);
});
};
useEffect(() => {
getOrderInfo();
getEvaluationInfo();
}, []);
const handleSubmit = values => {
setSubmitLoading(true);
const payload = values.comments.map(item => {
const {
comment,
good,
picture,
star,
} = item;
return {
id,
star,
comment,
};
});
if (!payload.length) {
return;
}
PublicApi.postMemberCommentConsumerSendTradeHistoryUpdate(payload[0])
.then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
}, 800);
}
})
.finally(() => {
setSubmitLoading(false);
});
};
const beforeUpload = file => {
if (file.size / 1024 < 10) {
message.warning('图片大小超过10M');
return Promise.reject();
}
};
const UploadTip = (
<span
style={{
lineHeight: '24px',
color: '#909399',
fontWeight: 400,
wordBreak: 'break-all',
position: 'relative',
top: '34px',
}}
>
支持JPG/PNG/JPEG <br />每张最大不超过 10M,尺寸不限 <br />最大数量限制 4张
</span>
);
return (
<Spin spinning={orderInfoLoading || evaluationInfoLoading}>
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: orderInfo?.orderNo,
}}
/>
}
extra={(
<>
{
pageStatus === PageStatus.EDIT && (
<Button
type="primary"
icon={<FormOutlined />}
disabled={!id}
loading={submitLoading}
onClick={() => formActions.submit()}
>
修改
</Button>
)
}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="供应会员">{orderInfo?.supplyMembersName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<NiceForm
actions={formActions}
initialValues={{
comments: [evaluationInfo],
}}
editable={pageStatus === PageStatus.EDIT}
expressionScope={{
UploadTip: pageStatus === PageStatus.EDIT ? UploadTip : null,
beforeUpload,
}}
onSubmit={handleSubmit}
components={{
EvaluationList,
}}
effects={($, actions) => {
createEffects($, actions);
onFormInit$().subscribe(() => {
if (pageStatus === PageStatus.EDIT) {
actions.setFieldState(
'comments.*.picture',
state => {
state.visible = false;
}
);
}
});
}}
schema={evaluateSchema}
/>
</PageHeaderWrapper>
</Spin>
);
};
export default SentDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-19 16:23:24
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const evaluateSchema: ISchema = {
type: 'object',
properties: {
comments: {
type: 'array',
'x-component': 'EvaluationList',
default: [],
items: {
type: 'object',
properties: {
LEFT_RIGHT: {
type: 'object',
'x-component': 'LeftRightLayout',
'x-component-props': {
rightProps: {
span: 2,
offset: 4,
},
},
properties: {
MEGA_LADYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 6,
labelAlign: 'left',
position: 'left',
},
properties: {
star: {
title: '满意程度',
required: true,
'x-component': 'Rating',
'x-component-props': {
allowHalf: false,
},
'x-rules': [
{
required: true,
message: '请选择满意程度',
},
],
},
comment: {
type: 'string',
title: '评价',
'x-component': 'TextArea',
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
title: '图片',
'x-component': 'Upload',
'x-component-props': {
listType: 'card',
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/purchaserEvaluation/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
addonAfter: '{{UploadTip}}',
},
},
},
},
smile: {
type: 'object',
default: 1,
'x-component': 'SmilingFace',
'x-component-props': {
position: 'right',
},
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -58,6 +58,9 @@ export const evaluateSchema: ISchema = {
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
......@@ -68,7 +71,7 @@ export const evaluateSchema: ISchema = {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/supplierEvaluation/',
prefix: '/purchaserEvaluation/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
......
import React, { useEffect, useState } from 'react';
import { Tabs, Row, Col, Button } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api';
import { isJSONStr } from '@/utils';
......@@ -169,6 +170,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -176,6 +178,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.createTime,
target: item.byMemberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -200,6 +203,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -207,6 +211,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.dealTime as string,
target: item.memberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -233,6 +238,7 @@ const Analysis: React.FC = () => {
data: data.map(item => {
const product = isJSONStr(item.product) || {};
return {
id: item.id,
star: item.star,
comment: item.comment,
productName: product.productName || '',
......@@ -240,6 +246,7 @@ const Analysis: React.FC = () => {
quantity: product.purchaseCount,
created: item.dealTime as string,
target: item.subMemberName,
orderId: product.orderId,
};
}),
totalCount,
......@@ -284,6 +291,18 @@ const Analysis: React.FC = () => {
getTradeSummary();
}, []);
const handleJumpReceived = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/received/detail?orderId=${record.orderId}&id=${record.id}&preview=1`);
};
const handleEditSent = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/sent/edit?orderId=${record.orderId}&id=${record.id}&preview=0`);
};
const handleJumpSent = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/sent/detail?orderId=${record.orderId}&id=${record.id}&preview=1`);
};
return (
<PageHeaderWrapper>
<MellowCard
......@@ -324,16 +343,30 @@ const Analysis: React.FC = () => {
</Shelves>
<Shelves title="评价记录">
<RecordList fetchList={getTradeHistory} paginationType="button" searchable={false} />
<RecordList
fetchList={getTradeHistory}
paginationType="button"
searchable={false}
onCheck={handleJumpReceived}
/>
</Shelves>
</TabPane>
<TabPane tab="收到的评价" key="2">
<RecordList fetchList={getReceivedList} />
<RecordList
fetchList={getReceivedList}
onCheck={handleJumpReceived}
/>
</TabPane>
<TabPane tab="发出的评价" key="3">
<RecordList fetchList={getSentList} />
<RecordList
fetchList={getSentList}
onCheck={handleJumpSent}
onEdit={handleEditSent}
opposite={false}
editable={true}
/>
</TabPane>
</Tabs>
</MellowCard>
......
......@@ -74,6 +74,10 @@ export interface RecordItem {
* 评价方/被评价方
*/
target: string
/**
* 订单id
*/
orderId: string
};
export interface RecordRes {
......@@ -91,7 +95,14 @@ interface RecordListProps {
// 是否是查看收到的品论
opposite?: boolean;
// 是否可编辑的
editable?: boolean;
fetchList: (params: ListParams) => Promise<RecordRes>;
onCheck: (record: RecordItem) => void;
onEdit?: (record: RecordItem) => void;
};
interface RecordListState {
......@@ -140,8 +151,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
this.setState({ loading: true });
return new Promise((resolve, reject) => {
const { searchVal, page, size } = this.state;
const { dealTimeStart, dealTimeEnd } = searchVal;
fetchList({
...searchVal,
dealTimeStart: dealTimeStart ? moment(+dealTimeStart).format('YYYY-MM-DD HH:mm:ss') : null,
dealTimeEnd: dealTimeEnd ? moment(+dealTimeEnd).format('YYYY-MM-DD HH:mm:ss') : null,
current: `${page}`,
pageSize: `${size}`,
}).then(res => {
......@@ -210,11 +225,26 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
});
};
handleCheck = record => {
const { onCheck } = this.props;
if (onCheck) {
onCheck(record);
}
};
handleEdit = record => {
const { onEdit } = this.props;
if (onEdit) {
onEdit(record);
}
};
render() {
const {
paginationType = 'pagination',
searchable = true,
opposite = true,
editable = false,
} = this.props;
const { page, size, loading, receivedList, hasMore } = this.state;
......@@ -232,7 +262,12 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
)}
<Spin spinning={paginationType === 'pagination' && loading}>
<ul className={styles.record}>
<ul
className={styles.record}
style={{
minHeight: loading ? 69 : 'auto',
}}
>
{receivedList.data.map((item, index) => (
<li className={styles['record-item']} key={index}>
<div className={styles['record-item-good']}>
......@@ -272,7 +307,10 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
</div>
<div className={styles['record-item-actions']}>
<Button type="link">查看</Button>
{editable && (
<Button type="link" onClick={() => this.handleEdit(item)}>编辑</Button>
)}
<Button type="link" onClick={() => this.handleCheck(item)}>查看</Button>
</div>
</li>
))}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-10-19 18:08:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-19 18:09:31
* @LastEditTime: 2020-10-21 13:58:50
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -19,7 +19,28 @@ export const searchSchema: ISchema = {
properties: {
star: {
type: 'string',
enum: [],
enum: [
{
label: '一星',
value: 1,
},
{
label: '二星',
value: 2,
},
{
label: '三星',
value: 3,
},
{
label: '四星',
value: 4,
},
{
label: '五星',
value: 5,
},
],
'x-component-props': {
placeholder: '评论星级',
allowClear: true,
......
import { useBusinessEffects } from './useBusinessEffects';
export const createEffects = (context, actions) => {
useBusinessEffects(context, actions);
};
\ No newline at end of file
import { FormEffectHooks, FormPath } from '@formily/antd';
const {
onFieldInputChange$,
onFieldValueChange$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions) => {
const {
setFieldState,
} = actions;
// 评论图片限制 4 张
onFieldInputChange$('comments.*.picture').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.picture`
}),
state => {
state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$('comments.*.star').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.smile`
}),
state => {
state.value = value;
}
);
});
}
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
} 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 { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, 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();
interface Unevaluated {
good: {
pic: string,
productName: string,
price: string,
purchaseCount: string,
};
star: number;
comment: string;
picture: string[];
smile: number;
};
const ReceivedDetail: React.FC = () => {
const { orderId, id, pageStatus } = usePageStatus();
const [orderInfo, setOrderInfo] = useState<GetOrderPurchaseOrderDetailsResponse>(null);
const [orderInfoLoading, setOrderInfoLoading] = useState(false);
const [evaluationInfo, setEvaluationInfo] = useState<Unevaluated>(null);
const [evaluationInfoLoading, setEvaluationInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getOrderInfo = () => {
if (!orderId) {
return;
}
setOrderInfoLoading(true);
PublicApi.getOrderPurchaseOrderDetails({
id: orderId,
}).then(res => {
if (res.code === 1000) {
setOrderInfo(res.data);
}
}).finally(() => {
setOrderInfoLoading(false);
});
};
const getEvaluationInfo = () => {
if (!id) {
return;
}
setEvaluationInfoLoading(true);
PublicApi.getMemberCommentSupplySupplyTradeHistoryGet({
id,
}).then(res => {
if (res.code === 1000) {
const { product } = res.data;
const productObj = isJSONStr(product) || {};
setEvaluationInfo({
good: {
pic: productObj.pic,
productName: productObj.productName,
price: productObj.price,
purchaseCount: productObj.purchaseCount,
},
star: res.data.star,
comment: res.data.comment,
picture: res.data.pics ? res.data.pics.map(item => normalizeFiledata(item)) : [],
smile: res.data.star,
});
}
}).finally(() => {
setEvaluationInfoLoading(false);
});
};
useEffect(() => {
getOrderInfo();
getEvaluationInfo();
}, []);
const handleSubmit = values => {
};
const beforeUpload = file => {
if (file.size / 1024 < 10) {
message.warning('图片大小超过10M');
return Promise.reject();
}
};
const UploadTip = (
<span
style={{
lineHeight: '24px',
color: '#909399',
fontWeight: 400,
wordBreak: 'break-all',
position: 'relative',
top: '34px',
}}
>
支持JPG/PNG/JPEG <br />每张最大不超过 10M,尺寸不限 <br />最大数量限制 4张
</span>
);
return (
<Spin spinning={orderInfoLoading || evaluationInfoLoading}>
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: orderInfo?.orderNo,
}}
/>
}
extra={(
<>
{
pageStatus === PageStatus.EDIT && (
<Button
type="primary"
icon={<FormOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
修改
</Button>
)
}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="采购会员">{orderInfo?.createMemberName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<NiceForm
actions={formActions}
initialValues={{
comments: [evaluationInfo],
}}
editable={pageStatus === PageStatus.EDIT}
expressionScope={{
UploadTip: pageStatus === PageStatus.EDIT ? UploadTip : null,
beforeUpload,
}}
onSubmit={handleSubmit}
components={{
EvaluationList,
}}
effects={($, actions) => {
createEffects($, actions);
}}
schema={evaluateSchema}
/>
</PageHeaderWrapper>
</Spin>
);
};
export default ReceivedDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 13:46:22
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const evaluateSchema: ISchema = {
type: 'object',
properties: {
comments: {
type: 'array',
'x-component': 'EvaluationList',
default: [],
items: {
type: 'object',
properties: {
LEFT_RIGHT: {
type: 'object',
'x-component': 'LeftRightLayout',
'x-component-props': {
rightProps: {
span: 2,
offset: 4,
},
},
properties: {
MEGA_LADYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 6,
labelAlign: 'left',
position: 'left',
},
properties: {
star: {
title: '满意程度',
required: true,
'x-component': 'Rating',
'x-component-props': {
allowHalf: false,
},
'x-rules': [
{
required: true,
message: '请选择满意程度',
},
],
},
comment: {
type: 'string',
title: '评价',
'x-component': 'TextArea',
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
title: '图片',
'x-component': 'Upload',
'x-component-props': {
listType: 'card',
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/supplierEvaluation/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
addonAfter: '{{UploadTip}}',
},
},
},
},
smile: {
type: 'object',
default: 1,
'x-component': 'SmilingFace',
'x-component-props': {
position: 'right',
},
},
},
},
},
},
},
},
};
\ No newline at end of file
import { useBusinessEffects } from './useBusinessEffects';
export const createEffects = (context, actions) => {
useBusinessEffects(context, actions);
};
\ No newline at end of file
import { FormEffectHooks, FormPath } from '@formily/antd';
const {
onFieldInputChange$,
onFieldValueChange$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions) => {
const {
setFieldState,
} = actions;
// 评论图片限制 4 张
onFieldInputChange$('comments.*.picture').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.picture`
}),
state => {
state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$('comments.*.star').subscribe(fieldState => {
const { name, value } = fieldState;
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `comments.${$1}.smile`
}),
state => {
state.value = value;
}
);
});
}
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
message,
} 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 { PublicApi } from '@/services/api';
import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import { normalizeFiledata, 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();
const {
onFormInit$,
} = FormEffectHooks;
interface Unevaluated {
good: {
pic: string,
productName: string,
price: string,
purchaseCount: string,
};
star: number;
comment: string;
picture: string[];
smile: number;
};
const SentDetail: React.FC = () => {
const { orderId, id, pageStatus } = usePageStatus();
const [orderInfo, setOrderInfo] = useState<GetOrderPurchaseOrderDetailsResponse>(null);
const [orderInfoLoading, setOrderInfoLoading] = useState(false);
const [evaluationInfo, setEvaluationInfo] = useState<Unevaluated>(null);
const [evaluationInfoLoading, setEvaluationInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getOrderInfo = () => {
if (!orderId) {
return;
}
setOrderInfoLoading(true);
PublicApi.getOrderPurchaseOrderDetails({
id: orderId,
}).then(res => {
if (res.code === 1000) {
setOrderInfo(res.data);
}
}).finally(() => {
setOrderInfoLoading(false);
});
};
const getEvaluationInfo = () => {
if (!id) {
return;
}
setEvaluationInfoLoading(true);
PublicApi.getMemberCommentSupplySendTradeHistoryGet({
id,
}).then(res => {
if (res.code === 1000) {
const { product } = res.data;
const productObj = isJSONStr(product) || {};
setEvaluationInfo({
good: {
pic: productObj.pic,
productName: productObj.productName,
price: productObj.price,
purchaseCount: productObj.purchaseCount,
},
star: res.data.star,
comment: res.data.comment,
picture: res.data.pics ? res.data.pics.map(item => normalizeFiledata(item)) : [],
smile: res.data.star,
});
}
}).finally(() => {
setEvaluationInfoLoading(false);
});
};
useEffect(() => {
getOrderInfo();
getEvaluationInfo();
}, []);
const handleSubmit = values => {
setSubmitLoading(true);
const payload = values.comments.map(item => {
const {
comment,
good,
picture,
star,
} = item;
return {
id,
star,
comment,
};
});
if (!payload.length) {
return;
}
PublicApi.postMemberCommentSupplySendTradeHistoryUpdate(payload[0])
.then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
}, 800);
}
})
.finally(() => {
setSubmitLoading(false);
});
};
const beforeUpload = file => {
if (file.size / 1024 < 10) {
message.warning('图片大小超过10M');
return Promise.reject();
}
};
const UploadTip = (
<span
style={{
lineHeight: '24px',
color: '#909399',
fontWeight: 400,
wordBreak: 'break-all',
position: 'relative',
top: '34px',
}}
>
支持JPG/PNG/JPEG <br />每张最大不超过 10M,尺寸不限 <br />最大数量限制 4张
</span>
);
return (
<Spin spinning={orderInfoLoading || evaluationInfoLoading}>
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: orderInfo?.orderNo,
}}
/>
}
extra={(
<>
{
pageStatus === PageStatus.EDIT && (
<Button
type="primary"
icon={<FormOutlined />}
disabled={!id}
loading={submitLoading}
onClick={() => formActions.submit()}
>
修改
</Button>
)
}
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="采购会员">{orderInfo?.createMemberName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>{orderInfo?.createTime}</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<NiceForm
actions={formActions}
initialValues={{
comments: [evaluationInfo],
}}
editable={pageStatus === PageStatus.EDIT}
expressionScope={{
UploadTip: pageStatus === PageStatus.EDIT ? UploadTip : null,
beforeUpload,
}}
onSubmit={handleSubmit}
components={{
EvaluationList,
}}
effects={($, actions) => {
createEffects($, actions);
onFormInit$().subscribe(() => {
if (pageStatus === PageStatus.EDIT) {
actions.setFieldState(
'comments.*.picture',
state => {
state.visible = false;
}
);
}
});
}}
schema={evaluateSchema}
/>
</PageHeaderWrapper>
</Spin>
);
};
export default SentDetail;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-19 16:23:24
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const evaluateSchema: ISchema = {
type: 'object',
properties: {
comments: {
type: 'array',
'x-component': 'EvaluationList',
default: [],
items: {
type: 'object',
properties: {
LEFT_RIGHT: {
type: 'object',
'x-component': 'LeftRightLayout',
'x-component-props': {
rightProps: {
span: 2,
offset: 4,
},
},
properties: {
MEGA_LADYOUT: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
labelCol: 6,
labelAlign: 'left',
position: 'left',
},
properties: {
star: {
title: '满意程度',
required: true,
'x-component': 'Rating',
'x-component-props': {
allowHalf: false,
},
'x-rules': [
{
required: true,
message: '请选择满意程度',
},
],
},
comment: {
type: 'string',
title: '评价',
'x-component': 'TextArea',
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
title: '图片',
'x-component': 'Upload',
'x-component-props': {
listType: 'card',
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/supplierEvaluation/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
addonAfter: '{{UploadTip}}',
},
},
},
},
smile: {
type: 'object',
default: 1,
'x-component': 'SmilingFace',
'x-component-props': {
position: 'right',
},
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -43,18 +43,18 @@ interface OrderInfo extends GetOrderPurchaseOrderDetailsResponse {
};
const EvaluateOrder: React.FC = () => {
const { id } = usePageStatus();
const { orderId } = usePageStatus();
const [orderInfo, setOrderInfo] = useState<OrderInfo>(null);
const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getOrderInfo = () => {
if (!id) {
if (!orderId) {
return;
}
setInfoLoading(true);
PublicApi.getOrderPurchaseOrderDetails({
id,
id: orderId,
}).then(res => {
if (res.code === 1000) {
const { orderProductRequests } = res.data;
......
......@@ -58,6 +58,9 @@ export const evaluateSchema: ISchema = {
'x-component-props': {
rows: 4,
},
'x-rules': {
max: 200,
},
},
picture: {
type: 'string',
......
......@@ -84,7 +84,7 @@ const Unevaluated: React.FC = () => {
align: 'center',
render: (text, record) => (
<>
<Link to={`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated/evaluate?id=${record.id}`}>
<Link to={`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated/evaluate?orderId=${record.id}`}>
<Button
type="link"
>
......
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