Commit ae039cf8 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(采购询价): 修复bug

parent 0730aebf
......@@ -5,97 +5,97 @@
*/
export const paltformSignRoute = [
// 平台营销活动报名
{
path: '/memberCenter/marketingAbility/paltformSign',
name: '平台营销活动报名',
routes: [
// 平台营销活动查询
{
path: '/memberCenter/marketingAbility/paltformSign/search',
name: '平台营销活动查询',
component: '@/pages/transaction/marketingAbility/paltformSign/search'
},
// 平台营销活动详情
{
path: '/memberCenter/marketingAbility/paltformSign/search/detail',
name: '平台营销活动详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交审核报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine',
name: '待提交审核报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine'
},
// 填写报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add',
name: '填写报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add',
hideInMenu: true,
noMargin: true,
},
// 修改报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/modify',
name: '修改报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add',
hideInMenu: true,
noMargin: true,
},
// 待提交审核报名资料详情
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/detail',
name: '待提交审核报名资料详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (一级)
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne',
name: '待审核报名资料 (一级)',
component: '@/pages/transaction/marketingAbility/paltformSign/readyExamineOne'
},
// 待审核报名资料 (一级)详情
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail',
name: '待审核报名资料 (一级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (二级)
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo',
name: '待审核报名资料 (二级)',
component: '@/pages/transaction/marketingAbility/paltformSign/readyExamineTwo'
},
// 待审核报名资料 (二级)详情
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail',
name: '待审核报名资料 (二级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmit',
name: '待提交报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmit'
},
// 待提交报名资料详情
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmit/detail',
name: '待提交报名资料详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
]
},
// 平台营销活动报名
{
path: '/memberCenter/marketingAbility/paltformSign',
name: '平台营销活动报名',
routes: [
// 平台营销活动查询
{
path: '/memberCenter/marketingAbility/paltformSign/search',
name: '平台营销活动查询',
component: '@/pages/transaction/marketingAbility/paltformSign/search'
},
// 平台营销活动详情
{
path: '/memberCenter/marketingAbility/paltformSign/search/detail',
name: '平台营销活动详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交审核报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine',
name: '待提交审核报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine'
},
// 填写报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add',
name: '填写报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add',
hideInMenu: true,
noMargin: true,
},
// 修改报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/modify',
name: '修改报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add',
hideInMenu: true,
noMargin: true,
},
// 待提交审核报名资料详情
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/detail',
name: '待提交审核报名资料详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (一级)
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne',
name: '待审核报名资料 (一级)',
component: '@/pages/transaction/marketingAbility/paltformSign/readyExamineOne'
},
// 待审核报名资料 (一级)详情
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail',
name: '待审核报名资料 (一级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (二级)
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo',
name: '待审核报名资料 (二级)',
component: '@/pages/transaction/marketingAbility/paltformSign/readyExamineTwo'
},
// 待审核报名资料 (二级)详情
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail',
name: '待审核报名资料 (二级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交报名资料
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmit',
name: '待提交报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmit'
},
// 待提交报名资料详情
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmit/detail',
name: '待提交报名资料详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
]
},
]
......@@ -24,6 +24,7 @@ const Roles: React.FC = () => {
}, []);
const handleSelect = (item: MemberRole) => {
console.log(item)
const { memberRoleId } = item;
if (memberRoleId === curRole.memberRoleId) {
return;
......
......@@ -228,9 +228,7 @@ const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) =
rowKey="productId"
columns={columns}
dataSource={dataSource}
pagination={{
size: 'small'
}}
pagination={false}
/>
</Form.Item>
<TableModal
......
import React, { Fragment, useState } from 'react';
import React, { Fragment, useCallback, useState } from 'react';
import { Space, Tooltip } from 'antd';
import { history } from 'umi';
import { Context } from '@/pages/transaction/components/detailLayout/components/context';
import PeripheralLayout from '@/pages/transaction/components/detailLayout';
import { _data } from './data';
......@@ -16,6 +17,7 @@ import DemandLayout from '../../components/demandLayout';
import ListLayout from '@/pages/transaction/components/detailLayout/components/listLayout';
import { ColumnType } from 'antd/lib/table/interface';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
const TABLINK = [
{ id: 'progressLayout', title: '流转进度' },
......@@ -28,6 +30,9 @@ const TABLINK = [
]
const DetialLayout = () => {
const { query: { activityId }, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
}
......@@ -40,24 +45,23 @@ const DetialLayout = () => {
setBasicEffect([
{
col: [
{ label: '活动ID', extra: data.activityId },
{ label: '活动ID', extra: data.id },
{ label: '活动名称', extra: data.activityName },
{ label: '外部状态', extra: data.externalStateName },
{ label: '内部状态', extra: data.interiorStateName },
{ label: '外部状态', extra: data.outerStatusName },
{ label: '内部状态', extra: data.innerStatusName },
]
},
{
col: [
{ label: '活动类型', extra: ACTIVITYTYPENAME[data.activityType] },
{ label: '下单模式', extra: data.orderModal },
{ label: '活动开始时间', extra: format(data.activityStartTime) },
{ label: '活动结束时间', extra: format(data.activityEndTime) },
{ label: '活动类型', extra: data.activityTypeName },
{ label: '活动参与类型', extra: data.activitySignUpTypeName },
{ label: '活动开始时间', extra: format(data.startTime) },
{ label: '活动结束时间', extra: format(data.endTime) },
]
},
{
col: [
{ label: '会员名称', extra: data.membersName },
{ label: '创建时间', extra: format(data.creationTime) },
{ label: '要求报名时间', extra: <>{format(data.signUpStartTime)}~{format(data.signUpEndTime)}</> },
]
},
])
......@@ -161,8 +165,17 @@ const DetialLayout = () => {
},
]
const fetchDataSource = useCallback(async () => {
await PublicApi.getMarketingPlatformActivitySignupDetail({ activityId }).then(res => {
if (res.code !== 1000) {
return
}
handleBasicEffect(res.data)
}).catch(() => {})
}, [])
useEffect(() => {
handleBasicEffect(_data);
fetchDataSource();
handleGeneralEffect(_data);
}, [])
......
......@@ -21,7 +21,7 @@ const Search = () => {
title: '活动名称',
key: 'activityName',
dataIndex: 'activityName',
render: (text) => <EyePreview>{text}</EyePreview>
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/search/detail?activityId=${record.activityId}`}>{text}</EyePreview>
},
{
title: '活动类型',
......
......@@ -260,6 +260,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
rowKey="id"
columns={columns}
dataSource={dataSource}
pagination={false}
/>
{/* 选择货品 */}
<SelectProduct
......
......@@ -166,22 +166,23 @@ const Demand: React.FC<Iprops> = (props: any) => {
/** 获取会员列表 */
const handleMenberList = (e: any) => {
const RowCtl = e.selectRow;
console.log(e)
if (RowCtl.length > 0) {
setMenberVidible(false)
const data: any = []
RowCtl.forEach(item => {
data.push({
id: item.id,
isSubMember: 1,
isSubMember: item.isSubMember || 1,
memberId: item.memberId,
memberName: item.name,
memberName: item.name || item.memberName,
memberTypeName: item.memberTypeName,
roleId: item.roleId,
roleName: item.roleName,
levelTag: item.levelTag,
membershipOrNot: 1,
state: 1,
type: 2,
membershipOrNot: item.membershipOrNot || 1,
state: item.state || 1,
type: item.type || 2,
})
})
form.setFieldsValue({ "rowCol": data })
......@@ -313,6 +314,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
<Table
columns={columns}
dataSource={rowCtl}
pagination={false}
/>
</Form.Item>
)}
......
......@@ -24,7 +24,7 @@ interface Iprops {
const SelectMenber: React.FC<Iprops> = (props: any) => {
const ref = useRef({});
const { visible, onclose, confirm, rowCtl } = props;
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id' });
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'memberId' });
const columns: ColumnType<any>[] = [
{
title: '会员ID',
......@@ -65,8 +65,9 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
useEffect(() => {
if (rowCtl) {
console.log(rowCtl)
RowCtl.setSelectRow(rowCtl)
RowCtl.setSelectedRowKeys(rowCtl.map(v => v.id))
RowCtl.setSelectedRowKeys(rowCtl.map(v => v.memberId))
}
}, [visible])
......@@ -94,7 +95,7 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
tableProps={{ rowKey: 'memberId' }}
rowSelection={rowSelection}
fetchTableData={(params) => fetchGoodsData(params)}
formilyProps={
......
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