Browse Source

(*)修改导入字段

master
ww664853070 2 years ago
parent
commit
638b739067
  1. 36
      web/client/src/sections/business/constants/index.js
  2. 6
      web/client/src/sections/business/containers/performanceReport/importPerformanceSummaryModal.jsx

36
web/client/src/sections/business/constants/index.js

@ -122,53 +122,17 @@ export const achievementColumnKeys = {
}
export const performanceSummaryKeys = {
oneAmount:'一月合同金额',
oneActualPerformance:'一月实际业绩',
oneAssessmentPerformance:'一月考核业绩',
oneTask:'一月销售任务',
twoAmount:'二月合同金额',
twoActualPerformance:'二月实际业绩',
twoAssessmentPerformance:'二月考核业绩',
twoTask:'二月销售任务',
threeAmount:'三月合同金额',
threeActualPerformance:'三月实际业绩',
threeAssessmentPerformance:'三月考核业绩',
threeTask:'三月销售任务',
fourAmount:'四月合同金额',
fourActualPerformance:'四月实际业绩',
fourAssessmentPerformance:'四月考核业绩',
fourTask:'四月销售任务',
fiveActualPerformance:'五月实际业绩',
fiveAssessmentPerformance:'五月考核业绩',
fiveTask:'五月销售任务',
fiveAmount:'五月合同金额',
sixAmount:'六月合同金额',
sixActualPerformance:'六月实际业绩',
sixAssessmentPerformance:'六月考核业绩',
sixTask:'六月销售任务',
sevenAmount:'七月合同金额',
sevenActualPerformance:'七月实际业绩',
sevenAssessmentPerformance:'七月考核业绩',
sevenTask:'七月销售任务',
eightAmount:'八月合同金额',
eightActualPerformance:'八月实际业绩',
eightAssessmentPerformance:'八月考核业绩',
eightTask:'八月销售任务',
nineAmount:'九月合同金额',
nineActualPerformance:'九月实际业绩',
nineAssessmentPerformance:'九月考核业绩',
nineTask:'九月销售任务',
tenAmount:'十月合同金额',
tenActualPerformance:'十月实际业绩',
tenAssessmentPerformance:'十月考核业绩',
tenTask:'十月销售任务',
elevenActualPerformance:'十一月实际业绩',
elevenAssessmentPerformance:'十一月考核业绩',
elevenTask:'十一月销售任务',
elevenAmount:'十一月合同金额',
twelveAmount:'十二月合同金额',
twelveActualPerformance:'十二月实际业绩',
twelveAssessmentPerformance:'十二月考核业绩',
twelveTask:'十二月销售任务',
name:'销售人员'
}

6
web/client/src/sections/business/containers/performanceReport/importPerformanceSummaryModal.jsx

@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import moment from 'moment';
import { Modal, Form, Button, Notification } from '@douyinfe/semi-ui';
import { IconUpload } from '@douyinfe/semi-icons';
import XLSX from 'xlsx';
import * as XLSX from 'xlsx'
import { performanceSummaryKeys } from '../../constants/index';
//
const ImportPerformanceSummaryModal = props => {
@ -68,12 +68,13 @@ const ImportPerformanceSummaryModal = props => {
reader.readAsBinaryString(request.response);
reader.onload = event => {
try {
debugger
const { result } = event.target;
// excel
const workbook = XLSX.read(result, {
type: "binary",
cellDates: true,//true
codepage: 936//
codepage: 936,//
});
let data = []; //
//
@ -195,7 +196,6 @@ const ImportPerformanceSummaryModal = props => {
postData.push(obj);
}
setPostData(postData)
console.log(postData,'=======================');
let msg = '文件解析完成,点击确定按钮上传保存!'
setMsg(msg)
onSuccess({ message: msg })

Loading…
Cancel
Save