diff --git a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx index 1a23643..e391c87 100644 --- a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx +++ b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx @@ -12,7 +12,7 @@ const AchievementDetails = (props) => { useEffect(() => { dispatch(actions.businessManagement.getPerformanceSummary()); }, []); - let colums = [{ num: '1月', name: 'one' }, { num: '2月', name: 'two' }, { num: '3月', name: 'three' }, { num: '4月', name: 'four' }, { num: '5月', name: 'five' }, { num: '6月', name: 'sex' }, { num: '7月', name: 'seven' }, { num: '8月', name: 'eight' }, { num: '9月', name: 'nine' }, { num: '10月', name: 'ten' }, { num: '11月', name: 'evelen' }, { num: '12月', name: 'twelve' }] + let colums = [{ num: '1月', name: 'one' }, { num: '2月', name: 'two' }, { num: '3月', name: 'three' }, { num: '4月', name: 'four' }, { num: '5月', name: 'five' }, { num: '6月', name: 'six' }, { num: '7月', name: 'seven' }, { num: '8月', name: 'eight' }, { num: '9月', name: 'nine' }, { num: '10月', name: 'ten' }, { num: '11月', name: 'eleven' }, { num: '12月', name: 'twelve' }] const columnsList = () => { colums.forEach(e => { columns.push({ @@ -22,31 +22,35 @@ const AchievementDetails = (props) => { title: '合同金额', dataIndex: e.name + '[amount]', width: 130, - // render: (text, record, index) => index + 1 + render: (text, record, index) => text }, { title: '实际业绩', dataIndex: e.name + '[actualPerformance]', width: 130, - // render: (text, record, index) => index + 1 + render: (text, record, index) => text }, { title: '考核业绩', dataIndex: e.name + '[assessmentPerformance]', width: 130, - // render: (text, record, index) => index + 1 + render: (text, record, index) => text }, { title: '销售任务', dataIndex: e.name + '[task]', width: 130, - // render: (text, record, index) => index + 1 + render: (text, record, index) => text }, { title: '完成率%', dataIndex: e.name + '[completion]', width: 130, - // render: (text, record, index) => index + 1 + render: (text, record, index) => { + let assessmentPerformance = record[e.name] ? record[e.name].assessmentPerformance : 0 + let task = record[e.name] ? record[e.name].task : 0 + return assessmentPerformance == 0 || task == 0 ? 0 : assessmentPerformance / task + } } ] } @@ -114,7 +118,7 @@ const AchievementDetails = (props) => { e.five = i } if (i.month == 6) { - e.sex = i + e.six = i } if (i.month == 7) { e.seven = i @@ -129,7 +133,7 @@ const AchievementDetails = (props) => { e.ten = i } if (i.month == 11) { - e.evelen = i + e.eleven = i } if (i.month == 12) { e.twelve = i @@ -138,7 +142,6 @@ const AchievementDetails = (props) => { return e }) const exportDetail = () => { - console.log(arr, 'arrarrarr'); let tableStyle = "text-align: center;font-size:21px" let exportTable = `