diff --git a/web/client/src/sections/business/actions/index.js b/web/client/src/sections/business/actions/index.js index 37f28f9..652c1b2 100644 --- a/web/client/src/sections/business/actions/index.js +++ b/web/client/src/sections/business/actions/index.js @@ -3,9 +3,11 @@ import * as reserveItem from './reserve-item'; import * as salersReport from './salers-report'; import * as achievementReport from './achievement-report'; import * as getCustomerContactsFollowup from './customerContactFollowup' +import * as getPerformanceSummary from './performanceSummary' export default { ...reserveItem, ...salersReport, ...achievementReport, - ...getCustomerContactsFollowup + ...getCustomerContactsFollowup, + ...getPerformanceSummary } \ No newline at end of file diff --git a/web/client/src/sections/business/actions/performanceSummary.js b/web/client/src/sections/business/actions/performanceSummary.js new file mode 100644 index 0000000..7d2e6fb --- /dev/null +++ b/web/client/src/sections/business/actions/performanceSummary.js @@ -0,0 +1,16 @@ +'use strict'; + +import { ApiTable, basicAction } from '$utils' + +export function getPerformanceSummary() {//查询 + return (dispatch) => basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_PERFORMANCE_SUMMARY", + url: `${ApiTable.getPerformanceSummary}`, + msg: { option: "查询业绩汇总表" }, + reducer: { name: "performanceSummaryList", params: { noClear: true } }, + }); +} + + diff --git a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx index b20fe57..4f82db5 100644 --- a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx +++ b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx @@ -6,7 +6,11 @@ import { IconSearch } from '@douyinfe/semi-icons'; import '../../style.less'; const AchievementDetails = (props) => { - const { dispatch, actions, user } = props + const { dispatch, actions, performanceSummaryList } = props + console.log(performanceSummaryList, '------------------'); + useEffect(() => { + dispatch(actions.businessManagement.getPerformanceSummary()); + }, []); let columns = [ { title: '部门', @@ -534,8 +538,6 @@ const AchievementDetails = (props) => { } ] - useEffect(() => { - }, []); const exportAllData = () => { @@ -587,10 +589,11 @@ const AchievementDetails = (props) => { function mapStateToProps(state) { - const { auth, global } = state; + const { auth, global, performanceSummaryList } = state; return { user: auth.user, actions: global.actions, + performanceSummaryList: performanceSummaryList.data || [] }; } diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 60b361d..3c87750 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -31,7 +31,8 @@ export const ApiTable = { getContractDetail: 'contract/detail', getInvoicingDetail: 'invoicing/detail', //客户联系人对接跟进 - getCustomerContactsFollowup:'customerContactsFollup' + getCustomerContactsFollowup:'customerContactsFollup', + getPerformanceSummary:'salePerformance', }; export const RouteTable = { apiRoot: "/api/root",