Commit 41b855dd authored by 前端-彭佳文's avatar 前端-彭佳文

Merge branch 'v2-220418' into 'v2-220418'

修复广告管理/业绩管理bug See merge request linkseeks-design/pro-platform!97
parents 8267f740 62d5a473
...@@ -99,26 +99,26 @@ ...@@ -99,26 +99,26 @@
hideInMenu: true, hideInMenu: true,
hidePageHeader: true, hidePageHeader: true,
}, },
//广告管理 todo:wuting //广告管理
// { {
// path: '/memberCenter/contentAbility/advertisement', path: '/memberCenter/contentAbility/advertisement',
// name: 'advertisement', name: 'advertisement',
// component: '@/pages/content/advertisement', component: '@/pages/content/advertisement',
// }, },
// { {
// path: '/memberCenter/contentAbility/advertisement/add', path: '/memberCenter/contentAbility/advertisement/add',
// name: 'advertisementAdd', name: 'advertisementAdd',
// component: '@/pages/content/advertisement/advertisementInfo', component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true, hideInMenu: true,
// hidePageHeader: true, hidePageHeader: true,
// }, },
// { {
// path: '/memberCenter/contentAbility/advertisement/detail', path: '/memberCenter/contentAbility/advertisement/detail',
// name: 'advertisementInfo', name: 'advertisementInfo',
// component: '@/pages/content/advertisement/advertisementInfo', component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true, hideInMenu: true,
// hidePageHeader: true, hidePageHeader: true,
// }, },
] ]
} }
......
...@@ -170,26 +170,6 @@ export const purchaseInquiryRoute = [ ...@@ -170,26 +170,6 @@ export const purchaseInquiryRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// //广告管理
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement',
// name: 'advertisement',
// component: '@/pages/content/advertisement',
// },
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement/add',
// name: 'advertisementAdd',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement/detail',
// name: 'advertisementInfo',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
] ]
}, },
] ]
...@@ -38,7 +38,7 @@ const AllQuery = () => { ...@@ -38,7 +38,7 @@ const AllQuery = () => {
dataIndex: 'title', dataIndex: 'title',
render: (text: string, record: any) => ( render: (text: string, record: any) => (
<EyePreview <EyePreview
url={`/content/advertisement/detail?id=${record.id}&preview=1`} url={`/memberCenter/contentAbility/advertisement/detail?id=${record.id}&preview=1`}
> >
{text} {text}
</EyePreview> </EyePreview>
...@@ -118,7 +118,7 @@ const AllQuery = () => { ...@@ -118,7 +118,7 @@ const AllQuery = () => {
<Space> <Space>
<Button <Button
type="primary" type="primary"
onClick={() => { history.push('/content/advertisement/add') }} onClick={() => { history.push('/memberCenter/contentAbility/advertisement/add') }}
icon={<PlusOutlined />} icon={<PlusOutlined />}
> >
{getIntl().formatMessage({ id: 'common.button.add'})} {getIntl().formatMessage({ id: 'common.button.add'})}
......
...@@ -17,10 +17,7 @@ import StatusTag from '@/components/StatusTag'; ...@@ -17,10 +17,7 @@ import StatusTag from '@/components/StatusTag';
import { import {
getMemberAbilityAssignedPage, getMemberAbilityAssignedPage,
getMemberAbilityAssignedPageitems, getMemberAbilityAssignedPageitems,
getMemberAbilityMaintenancePage,
getMemberAbilityMaintenancePageitems,
postMemberAbilityAssignedBind, postMemberAbilityAssignedBind,
postMemberDepositVerifyBatch,
} from '@/services/MemberV2Api'; } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray'; import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema2'; import { querySchema } from './schema2';
......
...@@ -15,7 +15,7 @@ const SalesPerformanceStatistics: React.FC = () => { ...@@ -15,7 +15,7 @@ const SalesPerformanceStatistics: React.FC = () => {
const intl = getIntl(); const intl = getIntl();
const { token } = (getAuth() || {}) const { token } = (getAuth() || {})
const ref = useRef<any>({}); const ref = useRef<any>({});
const [organizationList,setOrganizationList] = useState<Array<{value:string,label:string}>>() const [organizationList,setOrganizationList] = useState<Array<{value:number,label:string}>>()
const [paramsData,setParamsData] = useState<{ name:string,time:string,organization:number,pageSize:number,current:number }>() const [paramsData,setParamsData] = useState<{ name:string,time:string,organization:number,pageSize:number,current:number }>()
const defaultColumns: ColumnType<any>[] = [ const defaultColumns: ColumnType<any>[] = [
...@@ -139,8 +139,8 @@ const SalesPerformanceStatistics: React.FC = () => { ...@@ -139,8 +139,8 @@ const SalesPerformanceStatistics: React.FC = () => {
/** 获取机构列表 */ /** 获取机构列表 */
const getOrganizationList = async ()=>{ const getOrganizationList = async ()=>{
let res = await getMemberFeignAbilitySalesOrganizationList() let res = await getMemberFeignAbilitySalesOrganizationList()
const list = res.data?.map((i)=>({ const list = res.data?.map((i,k)=>({
value:i, value:k,
label:i label:i
})) }))
setOrganizationList(list) setOrganizationList(list)
...@@ -164,7 +164,6 @@ const SalesPerformanceStatistics: React.FC = () => { ...@@ -164,7 +164,6 @@ const SalesPerformanceStatistics: React.FC = () => {
console.log('exporturl:',`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`) console.log('exporturl:',`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`)
window.open(`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`, '_blank') window.open(`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`, '_blank')
} }
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -176,7 +175,12 @@ const SalesPerformanceStatistics: React.FC = () => { ...@@ -176,7 +175,12 @@ const SalesPerformanceStatistics: React.FC = () => {
currentRef={ref} currentRef={ref}
rowKey='userId' rowKey='userId'
fetchTableData={(params: any) => { fetchTableData={(params: any) => {
console.log('params:',params)
delete params.account delete params.account
let num = Number(params.title)
if(num > -1 && organizationList?.length){
params.title = organizationList[params.title].label
}
setParamsData({...params}) setParamsData({...params})
return fetchListData(params) return fetchListData(params)
}} }}
...@@ -227,7 +231,7 @@ const SalesPerformanceStatistics: React.FC = () => { ...@@ -227,7 +231,7 @@ const SalesPerformanceStatistics: React.FC = () => {
type: 'Search', type: 'Search',
"x-component-props": { "x-component-props": {
placeholder: intl.formatMessage({ id: 'salesPerformanceStatistics.placeholder.name' }), placeholder: intl.formatMessage({ id: 'salesPerformanceStatistics.placeholder.name' }),
allowClear:true, allowClear:true,
} }
}, },
......
...@@ -234,7 +234,7 @@ const StatistticsList: React.FC<{ searchType: string; id: number }> = ({ ...@@ -234,7 +234,7 @@ const StatistticsList: React.FC<{ searchType: string; id: number }> = ({
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
api( api(
{ {
userId: 700, userId: id,
...rest, ...rest,
countTime: searchType === 'membership' ? memberTime : productTime, countTime: searchType === 'membership' ? memberTime : productTime,
}, },
......
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