diff --git a/web/client/src/sections/business/constants/index.js b/web/client/src/sections/business/constants/index.js index d6de706..0a8e0dd 100644 --- a/web/client/src/sections/business/constants/index.js +++ b/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:'销售人员' } \ No newline at end of file diff --git a/web/client/src/sections/business/containers/performanceReport/importPerformanceSummaryModal.jsx b/web/client/src/sections/business/containers/performanceReport/importPerformanceSummaryModal.jsx index 3c1242b..d6482f7 100644 --- a/web/client/src/sections/business/containers/performanceReport/importPerformanceSummaryModal.jsx +++ b/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 })