Commit b660ccbf authored by XieZhiXiong's avatar XieZhiXiong

静态开发中...

parent 1e22e1bb
import React, { ReactText, useRef, useEffect } from 'react' import React, { ReactText, useRef, useEffect } from 'react'
import {StandardTable} from 'god' import { StandardTable } from 'god'
import NestTable from '@/components/NestTable' import NestTable from '@/components/NestTable'
import { IStandardTableProps } from 'god/dist/src/standard-table' import { IStandardTableProps } from 'god/dist/src/standard-table'
import { Row, Col, Drawer, Button, Input } from 'antd' import { Row, Col, Drawer, Button, Input } from 'antd'
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema,enquirySchema, mergeOrderSchema } from './schema' import {
productModalSchema,
productModalByMemberSchema,
memberModalSchema,
inquirySchema,
demandSchema,
enquirySchema,
mergeOrderSchema,
} from './schema'
import Search from '../NiceForm/components/Search' import Search from '../NiceForm/components/Search'
import SearchSelect from '../NiceForm/components/SearchSelect' import SearchSelect from '../NiceForm/components/SearchSelect'
import Submit from '../NiceForm/components/Submit' import Submit from '../NiceForm/components/Submit'
...@@ -19,7 +27,6 @@ import { ...@@ -19,7 +27,6 @@ import {
import { setup } from '@formily/antd-components'; import { setup } from '@formily/antd-components';
import styles from './index.less' import styles from './index.less'
export interface TableDrawerProps extends IStandardTableProps<any> { export interface TableDrawerProps extends IStandardTableProps<any> {
width?: number, width?: number,
modalTitle?: ReactText, modalTitle?: ReactText,
...@@ -27,7 +34,7 @@ export interface TableDrawerProps extends IStandardTableProps<any> { ...@@ -27,7 +34,7 @@ export interface TableDrawerProps extends IStandardTableProps<any> {
cancel?(), cancel?(),
visible?: boolean, visible?: boolean,
resetModal?: object, resetModal?: object,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'none' , modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'none',
useNestTable?: boolean, // 是否使用嵌套表格 useNestTable?: boolean, // 是否使用嵌套表格
nestColumns?: any[], nestColumns?: any[],
nestTableProps?: any, nestTableProps?: any,
...@@ -53,52 +60,72 @@ const SearchComponent = props => { ...@@ -53,52 +60,72 @@ const SearchComponent = props => {
SearchComponent.isFieldComponent = true; SearchComponent.isFieldComponent = true;
setup(); setup();
const TableDrawer:React.FC<TableDrawerProps> = (props) => { const TableDrawer: React.FC<TableDrawerProps> = (props) => {
const { width = 704, modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', useNestTable = false, nestColumns, nestTableProps, nestPagination, nestForm = false, ...resetTable } = props const {
const selfRef = currentRef || useRef<any>({}) width = 704,
modalTitle,
confirm,
cancel,
visible,
currentRef,
resetModal,
modalType = 'none',
useNestTable = false,
nestColumns,
nestTableProps = {},
nestPagination,
nestForm = false,
...resetTable
} = props;
const selfRef = currentRef || useRef<any>({});
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
// 重新开启时需reload接口 // 重新开启时需reload接口
selfRef.current.reload && selfRef.current.reload() selfRef.current.reload && selfRef.current.reload();
} else { } else {
selfRef.current.resetField && selfRef.current.resetField({ selfRef.current.resetField && selfRef.current.resetField({
validate: false validate: false,
}) });
} }
}, [visible, selfRef.current]) }, [visible, selfRef.current]);
const modelSchemaRender = () => { const modelSchemaRender = () => {
switch (modalType) { switch (modalType) {
case 'productByDefault': { case 'productByDefault': {
return productModalSchema return productModalSchema;
} }
case 'productByMember': { case 'productByMember': {
return productModalByMemberSchema return productModalByMemberSchema;
} }
case 'memberByDefault': { case 'memberByDefault': {
return memberModalSchema return memberModalSchema;
} }
case 'inquiryByDefault': { case 'inquiryByDefault': {
return inquirySchema return inquirySchema;
} }
case 'enquiryModel':{ case 'enquiryModel': {
return enquirySchema return enquirySchema;
} }
case 'demandByDefault': { case 'demandByDefault': {
return demandSchema return demandSchema;
} }
case 'MergeOrderByDefault': { case 'MergeOrderByDefault': {
return mergeOrderSchema return mergeOrderSchema;
} }
case 'none': { case 'none': {
return {} return {};
} }
} }
} };
const defaultSchemaProps = { const defaultSchemaProps = {
inline: true, inline: true,
...@@ -107,7 +134,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => { ...@@ -107,7 +134,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
const handleSubmit = () => { const handleSubmit = () => {
} };
return ( return (
<Drawer <Drawer
...@@ -136,13 +163,19 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => { ...@@ -136,13 +163,19 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
<div className={styles.drawer_wrap}> <div className={styles.drawer_wrap}>
{ {
nestForm && ( nestForm && (
<Row justify='space-between' style={{ marginBottom: 16 }}> <Row justify="space-between" style={{ marginBottom: 16 }}>
<Col span={12} style={{ zIndex: 99 }}> <Col span={12} style={{ zIndex: 99 }}>
<SchemaForm <SchemaForm
className="god-schema-form" className="god-schema-form"
{...defaultSchemaProps} {...defaultSchemaProps}
schema={modelSchemaRender()} schema={modelSchemaRender()}
components={{ Search: SearchComponent, ModalSearch: Search, SearchSelect, Submit, DateSelect }} components={{
Search: SearchComponent,
ModalSearch: Search,
SearchSelect,
Submit,
DateSelect,
}}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
...@@ -150,8 +183,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => { ...@@ -150,8 +183,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
'name', 'name',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
} }}
}
actions={schemaAction} actions={schemaAction}
/> />
</Col> </Col>
...@@ -162,7 +194,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => { ...@@ -162,7 +194,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
<NestTable <NestTable
NestColumns={nestColumns} NestColumns={nestColumns}
className="common_tb" className="common_tb"
rowClassName={(_, index) => (index % 2) === 0 && "tb_bg"} rowClassName={(_, index) => (index % 2) === 0 && 'tb_bg'}
{...nestTableProps} {...nestTableProps}
/> />
</div> </div>
...@@ -174,38 +206,45 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => { ...@@ -174,38 +206,45 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
) )
} }
</div> </div>
) : ( ) : (
<StandardTable <StandardTable
tableType='small' tableType='small'
currentRef={selfRef} currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between'> formRender={(child, ps) => (
<Row justify='space-between'>
<Col span={18} style={{ zIndex: 99 }}>{child}</Col> <Col span={18} style={{ zIndex: 99 }}>{child}</Col>
<Col style={{ marginTop: 4 }}>{ps}</Col> <Col style={{ marginTop: 4 }}>{ps}</Col>
</Row >} </Row >
formilyProps={ )}
modalType === 'none' ? null : { formilyProps={
ctx: { modalType === 'none' ? null : {
schema: modelSchemaRender(), ctx: {
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect }, schema: modelSchemaRender(),
effects: ($, actions) => { components: {
useStateFilterSearchLinkageEffect( ModalSearch: Search,
$, SearchSelect,
actions, Submit,
'name', DateSelect,
FORM_FILTER_PATH, },
); effects: ($, actions) => {
} useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
} }
} }
} }
{...resetTable} }
/> {...resetTable}
) />
)
} }
</Drawer> </Drawer>
) )
} };
TableDrawer.defaultProps = {} TableDrawer.defaultProps = {};
export default TableDrawer export default TableDrawer;
\ No newline at end of file \ No newline at end of file
.goods {
&-head {
}
&-body {
}
&-foot {
}
}
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 16:36:32
* @Description: 维修商品抽屉组件
*/
import React, { useState } from 'react';
import { Drawer, Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { createFormActions } from '@formily/antd';
import { ColumnType } from 'antd/lib/table/interface';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import NiceForm from '@/components/NiceForm';
import NestTable from '@/components/NestTable';
import { listSearchSchema } from './schema';
import styles from './index.less';
const formActions = createFormActions();
const mockData = [
{
id: 1,
orderNo: 'SPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
supplierName: '广州白马皮具交易中心',
createTime: '2020-05-12 08:08',
orderStatus: '已完成',
orderType: '询价采购',
childData: [
{
id: 11,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
},
{
id: 12,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
}
]
},
{
id: 2,
orderNo: 'SPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
supplierName: '广州白马皮具交易中心',
createTime: '2020-05-12 08:08',
orderStatus: '已完成',
orderType: '询价采购',
childData: [
{
id: 23,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
},
{
id: 24,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
}
]
},
{
id: 3,
orderNo: 'SPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
supplierName: '广州白马皮具交易中心',
createTime: '2020-05-12 08:08',
orderStatus: '已完成',
orderType: '询价采购',
childData: [
{
id: 35,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
},
{
id: 36,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
}
]
},
{
id: 4,
orderNo: 'SPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
supplierName: '广州白马皮具交易中心',
createTime: '2020-05-12 08:08',
orderStatus: '已完成',
orderType: '询价采购',
childData: [
{
id: 47,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
},
{
id: 48,
productId: 1110,
productName: '进口头层黄牛皮荔枝纹/红色',
category: '牛皮',
brand: 'PELLE',
unit: '尺',
purchaseCount: 2000,
purchasePrice: 20,
purchaseAmount: 4000,
replaceCount: 1000,
}
]
},
]
interface GoodsDrawer {
// 是否可见的
visible: boolean;
// 关闭事件
onClose: () => void;
};
const GoodsDrawer: React.FC<GoodsDrawer> = ({
visible = false,
onClose,
}) => {
const [selectedRowKeys, setSelectedRowKeys] = useState<any>([])
const [childSelectedRowKeys, setChildSelectedRowKeys] = useState<any>([])
const tableColumn: ColumnType<any>[] = [
{
title: '订单号',
dataIndex: 'orderNo',
align: 'center',
},
{
title: '订单摘要',
dataIndex: 'applyAbstract',
align: 'center',
},
{
title: '供应会员',
dataIndex: 'supplierName',
align: 'center',
},
{
title: '下单时间',
dataIndex: 'createTime',
align: 'center',
},
{
title: '订单状态',
dataIndex: 'orderStatus',
align: 'center',
},
{
title: '订单类型',
dataIndex: 'orderType',
align: 'center',
},
]
const childTableColumn: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'productId',
align: 'center',
},
{
title: '商品名称',
dataIndex: 'productName',
align: 'center',
},
{
title: '品类',
dataIndex: 'category',
align: 'center',
},
{
title: '品牌',
dataIndex: 'brand',
align: 'center',
},
{
title: '单位',
dataIndex: 'unit',
align: 'center',
},
{
title: '订单数量',
dataIndex: 'purchaseCount',
align: 'center',
},
]
const handleClose = () => {
if (onClose) {
onClose();
}
};
// 子表格选中行
const handleChildSelectChange = () => {
};
// 子表格选中所有行
const handleChildSelectAll = () => {
};
// 表格选中行
const handleParentSelectChange = () => {
};
// 表格选中所有行
const hanldeParentSelectAll = () => {
};
return (
<Drawer
title="选择维修商品"
width={1200}
onClose={handleClose}
visible={visible}
bodyStyle={{ paddingBottom: 80 }}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={onClose} style={{ marginRight: 8 }}>
取消
</Button>
<Button onClick={handleClose} type="primary">
确定
</Button>
</div>
}
>
<div className={styles.goods}>
<div className={styles['goods-head']}>
<NiceForm
actions={formActions}
onSubmit={values => {}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
}}
schema={listSearchSchema}
/>
</div>
<div>
<NestTable
NestColumns={[tableColumn, childTableColumn]}
className="common_tb"
rowClassName={(_, index) => (index % 2) === 0 && 'tb_bg'}
rowKey="id"
childrenDataKey="childData"
dataSource={mockData}
childRowSelection={{
selectedRowKeys: childSelectedRowKeys,
onSelect: handleChildSelectChange,
onSelectAll: handleChildSelectAll,
}}
rowSelection={{
selectedRowKeys: selectedRowKeys,
onSelect: handleParentSelectChange,
onSelectAll: hanldeParentSelectAll,
}}
/>
</div>
</div>
</Drawer>
);
};
export default GoodsDrawer;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-02 13:47:58
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
applyNo: {
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: {
abstract: {
type: 'string',
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
supplier: {
type: 'string',
'x-component-props': {
placeholder: '供应会员(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
...@@ -9,6 +9,7 @@ import { createFormActions, FormEffectHooks } from '@formily/antd'; ...@@ -9,6 +9,7 @@ import { createFormActions, FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import GoodsDrawer from '../GoodsDrawer';
import { addBillSchema } from './schema'; import { addBillSchema } from './schema';
import { createEffects } from './effects'; import { createEffects } from './effects';
...@@ -31,6 +32,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -31,6 +32,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
const [unsaved, setUnsaved] = useState(false); const [unsaved, setUnsaved] = useState(false);
const [infoLoading, setInfoLoading] = useState(false); const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false); const [submitLoading, setSubmitLoading] = useState(false);
const [visibleDrawer, setVisibleDrawer] = useState(false);
useEffect(() => { useEffect(() => {
...@@ -46,7 +48,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -46,7 +48,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
style={{ marginBottom: 16 }} style={{ marginBottom: 16 }}
block block
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={handleAdd} onClick={() => setVisibleDrawer(true)}
type="dashed" type="dashed"
> >
选择维修商品 选择维修商品
...@@ -141,6 +143,11 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -141,6 +143,11 @@ const RepairForm: React.FC<BillsFormProps> = ({
/> />
</Card> </Card>
<GoodsDrawer
visible={visibleDrawer}
onClose={() => setVisibleDrawer(false)}
/>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" /> <Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
</PageHeaderWrapper> </PageHeaderWrapper>
</Spin> </Spin>
......
...@@ -9,6 +9,88 @@ import { ...@@ -9,6 +9,88 @@ import {
} from '@/constants'; } from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp'; import { PATTERN_MAPS } from '@/constants/regExp';
// 供应会员列表列
const supplierColumns = [
{
title: '会员ID',
dataIndex: 'memberId',
align: 'center',
},
{
title: '会员名称',
dataIndex: 'memberName',
align: 'center',
},
{
title: '会员类型',
dataIndex: 'memberType',
align: 'center',
},
{
title: '会员角色',
dataIndex: 'memberRole',
align: 'center',
},
{
title: '会员等级',
dataIndex: 'memberLevel',
align: 'center',
},
];
// 获取供应会员
const getSupplier = () => {
return Promise.resolve({
data: [
{
memberId: 1,
memberName: '会员1',
memberType: '企业会员',
memberRole: '青铜会员',
memberLevel: '会员等级',
},
{
memberId: 2,
memberName: '会员2',
memberType: '企业会员',
memberRole: '青铜会员',
memberLevel: '会员等级',
},
{
memberId: 3,
memberName: '会员3',
memberType: '企业会员',
memberRole: '青铜会员',
memberLevel: '会员等级',
},
],
total: 20,
});
};
const supplierSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'Mega-Layout',
properties: {
search: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: '搜索',
align: 'flex-start',
advanced: false,
},
},
},
},
},
};
export const addBillSchema: ISchema = { export const addBillSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
...@@ -58,11 +140,11 @@ export const addBillSchema: ISchema = { ...@@ -58,11 +140,11 @@ export const addBillSchema: ISchema = {
modalProps: { modalProps: {
title: '标题', title: '标题',
}, },
columns: [], columns: supplierColumns,
fetchTableData: undefined, fetchTableData: getSupplier,
formilyProps: { formilyProps: {
ctx: { ctx: {
schema: {}, schema: supplierSchema,
components: { components: {
Search, Search,
Submit, Submit,
...@@ -80,8 +162,8 @@ export const addBillSchema: ISchema = { ...@@ -80,8 +162,8 @@ export const addBillSchema: ISchema = {
} }
}, },
tableProps: { tableProps: {
rowKey: 'orderNo', rowKey: 'memberId',
lableKey: '', lableKey: 'memberName',
}, },
}, },
'x-mega-props': { 'x-mega-props': {
...@@ -114,7 +196,7 @@ export const addBillSchema: ISchema = { ...@@ -114,7 +196,7 @@ export const addBillSchema: ISchema = {
innerStatus: { innerStatus: {
type: 'string', type: 'string',
title: '内部状态', title: '内部状态',
default: '', 'x-component': 'Text',
}, },
}, },
}, },
......
...@@ -87,6 +87,7 @@ const EvaluateOrder: React.FC = () => { ...@@ -87,6 +87,7 @@ const EvaluateOrder: React.FC = () => {
star, star,
} = item; } = item;
// 被评价方是 销售会员(订单提供者数据)
return { return {
memberId: orderInfo.supplyMembersId, memberId: orderInfo.supplyMembersId,
roleId: orderInfo.supplyMembersRoleId, roleId: orderInfo.supplyMembersRoleId,
...@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => { ...@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => {
}; };
}); });
PublicApi.postMemberCommentConsumerOrderTradeSubmit({ PublicApi.postMemberCommentSupplyOrderTradeSubmit({
commentSubmitDetailList: payload, commentSubmitDetailList: payload,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
......
...@@ -86,17 +86,18 @@ const EvaluateOrder: React.FC = () => { ...@@ -86,17 +86,18 @@ const EvaluateOrder: React.FC = () => {
picture, picture,
star, star,
} = item; } = item;
// 被评价方是 采购会员(订单创建者数据)
return { return {
memberId: orderInfo.supplyMembersId, memberId: orderInfo.createMemberId,
roleId: orderInfo.supplyMembersRoleId, roleId: orderInfo.createRoleId,
memberName: orderInfo.supplyMembersName || '', memberName: orderInfo.createMemberName || '',
star, star,
comment, comment,
product: JSON.stringify(good), product: JSON.stringify(good),
remark: orderInfo.orderNo, remark: orderInfo.orderNo,
productId: good.productId, productId: good.productId,
id: orderInfo.id, orderId: orderInfo.id,
productImgUrl: good.pic, productImgUrl: good.pic,
dealTime: orderInfo.createTime, dealTime: orderInfo.createTime,
dealCount: good.purchaseCount, dealCount: good.purchaseCount,
...@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => { ...@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => {
}; };
}); });
PublicApi.postMemberCommentConsumerOrderTradeSubmit({ PublicApi.postMemberCommentSupplyOrderTradeSubmit({
commentSubmitDetailList: payload, commentSubmitDetailList: payload,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
......
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