Browse Source

(*)业绩汇总表,列表完成率计算

master
ww664853070 2 years ago
parent
commit
fb525fd360
  1. 22
      web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx

22
web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx

@ -12,7 +12,7 @@ const AchievementDetails = (props) => {
useEffect(() => { useEffect(() => {
dispatch(actions.businessManagement.getPerformanceSummary()); 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 = () => { const columnsList = () => {
colums.forEach(e => { colums.forEach(e => {
columns.push({ columns.push({
@ -22,31 +22,35 @@ const AchievementDetails = (props) => {
title: '合同金额', title: '合同金额',
dataIndex: e.name + '[amount]', dataIndex: e.name + '[amount]',
width: 130, width: 130,
// render: (text, record, index) => index + 1 render: (text, record, index) => text
}, },
{ {
title: '实际业绩', title: '实际业绩',
dataIndex: e.name + '[actualPerformance]', dataIndex: e.name + '[actualPerformance]',
width: 130, width: 130,
// render: (text, record, index) => index + 1 render: (text, record, index) => text
}, },
{ {
title: '考核业绩', title: '考核业绩',
dataIndex: e.name + '[assessmentPerformance]', dataIndex: e.name + '[assessmentPerformance]',
width: 130, width: 130,
// render: (text, record, index) => index + 1 render: (text, record, index) => text
}, },
{ {
title: '销售任务', title: '销售任务',
dataIndex: e.name + '[task]', dataIndex: e.name + '[task]',
width: 130, width: 130,
// render: (text, record, index) => index + 1 render: (text, record, index) => text
}, },
{ {
title: '完成率%', title: '完成率%',
dataIndex: e.name + '[completion]', dataIndex: e.name + '[completion]',
width: 130, 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 e.five = i
} }
if (i.month == 6) { if (i.month == 6) {
e.sex = i e.six = i
} }
if (i.month == 7) { if (i.month == 7) {
e.seven = i e.seven = i
@ -129,7 +133,7 @@ const AchievementDetails = (props) => {
e.ten = i e.ten = i
} }
if (i.month == 11) { if (i.month == 11) {
e.evelen = i e.eleven = i
} }
if (i.month == 12) { if (i.month == 12) {
e.twelve = i e.twelve = i
@ -138,7 +142,6 @@ const AchievementDetails = (props) => {
return e return e
}) })
const exportDetail = () => { const exportDetail = () => {
console.log(arr, 'arrarrarr');
let tableStyle = "text-align: center;font-size:21px" let tableStyle = "text-align: center;font-size:21px"
let exportTable = ` let exportTable = `
<tr> <tr>
@ -287,7 +290,6 @@ const AchievementDetails = (props) => {
let days = moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days') let days = moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days')
let day = days / 365 let day = days / 365
const workingYears = day.toFixed(1) const workingYears = day.toFixed(1)
console.log(Number(fourTask ? fourTask : 0) + Number(fiveTask ? fiveTask : 0) + Number(sixTask ? sixTask : 0));
return Object.assign({}, item, { return Object.assign({}, item, {
oneCompletion: oneCompletion, oneCompletion: oneCompletion,
twoCompletion: twoCompletion, twoCompletion: twoCompletion,

Loading…
Cancel
Save