diff --git a/web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx b/web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx index a3f754b..6c8ac66 100644 --- a/web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx +++ b/web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx @@ -96,17 +96,17 @@ const ImportAchieveModal = props => { } - const judgeNull = (value) => { - return value ? String(value).trim().replace(/\s*/g, "") : null; - } + // const judgeNull = (value) => { + // return value ? String(value).trim().replace(/\s*/g, "") : null; + // } - const judgeNullTime = (v) => { - //注意的点:xlsx将excel中的时间内容解析后,会小一天 - //如2020/8/1,xlsx会解析成 Fri Jul 31 2020 23:59:17 GMT+0800 小了43秒 - let a = new Date(v); - a.setTime(a.getTime() + 43 * 1000); - return v ? a : null; - } + // const judgeNullTime = (v) => { + // //注意的点:xlsx将excel中的时间内容解析后,会小一天 + // //如2020/8/1,xlsx会解析成 Fri Jul 31 2020 23:59:17 GMT+0800 小了43秒 + // let a = new Date(v); + // a.setTime(a.getTime() + 43 * 1000); + // return v ? a : null; + // } const judgeTimeValid = (time) => { let valid = true; @@ -168,11 +168,11 @@ const ImportAchieveModal = props => { let d = res[i]; let obj = {}; Object.keys(achievementColumnKeys).map(key => { - if (key === 'recConDate') {//收到合同日期 - obj[key] = judgeNullTime(d[achievementColumnKeys[key]]); - } else { - obj[key] = d[achievementColumnKeys[key]] || null; - } + // if (key === 'recConDate') {//收到合同日期 + // obj[key] = judgeNullTime(d[achievementColumnKeys[key]]); + // } else { + obj[key] = d[achievementColumnKeys[key]] || null; + //} }) let tValid = judgeTimeValid(obj.recConDate); if (!tValid) { diff --git a/web/client/src/sections/business/containers/performanceReport/importBackModal.jsx b/web/client/src/sections/business/containers/performanceReport/importBackModal.jsx index 9b3f34f..c241ab7 100644 --- a/web/client/src/sections/business/containers/performanceReport/importBackModal.jsx +++ b/web/client/src/sections/business/containers/performanceReport/importBackModal.jsx @@ -104,17 +104,17 @@ const ImportBackModal = props => { } - const judgeNull = (value) => { - return value ? String(value).trim().replace(/\s*/g, "") : null; - } + // const judgeNull = (value) => { + // return value ? String(value).trim().replace(/\s*/g, "") : null; + // } - const judgeNullTime = (v) => { - //注意的点:xlsx将excel中的时间内容解析后,会小一天 - //如2020/8/1,xlsx会解析成 Fri Jul 31 2020 23:59:17 GMT+0800 小了43秒 - let a = new Date(v); - a.setTime(a.getTime() + 43 * 1000); - return v ? a : null; - } + // const judgeNullTime = (v) => { + // //注意的点:xlsx将excel中的时间内容解析后,会小一天 + // //如2020/8/1,xlsx会解析成 Fri Jul 31 2020 23:59:17 GMT+0800 小了43秒 + // let a = new Date(v); + // a.setTime(a.getTime() + 43 * 1000); + // return v ? a : null; + // } const judgeTimeValid = (time) => { let valid = true; @@ -178,11 +178,11 @@ const ImportBackModal = props => { let d = res[i]; let obj = {}; Object.keys(backMoneyColumnKeys).map(key => { - if (['receivableDate', 'incomeConfirmdate'].indexOf(key) != -1) {//两个时间 - obj[key] = judgeNullTime(d[backMoneyColumnKeys[key]]); - } else { - obj[key] = d[backMoneyColumnKeys[key]] || null; - } + // if (['receivableDate', 'incomeConfirmdate'].indexOf(key) != -1) {//两个时间 + // obj[key] = judgeNullTime(d[backMoneyColumnKeys[key]]); + // } else { + obj[key] = d[backMoneyColumnKeys[key]] || null; + //} }) //年度 序号 编号必填 if (!obj.year || !obj.serialNo || !obj.number) {