Browse Source

(*)回款和业绩 导入时间验证修改

master
wuqun 2 years ago
parent
commit
b7c72b9589
  1. 30
      web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx
  2. 30
      web/client/src/sections/business/containers/performanceReport/importBackModal.jsx

30
web/client/src/sections/business/containers/performanceReport/importAchieveModal.jsx

@ -96,17 +96,17 @@ const ImportAchieveModal = props => {
} }
const judgeNull = (value) => { // const judgeNull = (value) => {
return value ? String(value).trim().replace(/\s*/g, "") : null; // return value ? String(value).trim().replace(/\s*/g, "") : null;
} // }
const judgeNullTime = (v) => { // const judgeNullTime = (v) => {
//xlsxexcel // //xlsxexcel
//2020/8/1xlsx Fri Jul 31 2020 23:59:17 GMT+0800 43 // //2020/8/1xlsx Fri Jul 31 2020 23:59:17 GMT+0800 43
let a = new Date(v); // let a = new Date(v);
a.setTime(a.getTime() + 43 * 1000); // a.setTime(a.getTime() + 43 * 1000);
return v ? a : null; // return v ? a : null;
} // }
const judgeTimeValid = (time) => { const judgeTimeValid = (time) => {
let valid = true; let valid = true;
@ -168,11 +168,11 @@ const ImportAchieveModal = props => {
let d = res[i]; let d = res[i];
let obj = {}; let obj = {};
Object.keys(achievementColumnKeys).map(key => { Object.keys(achievementColumnKeys).map(key => {
if (key === 'recConDate') {// // if (key === 'recConDate') {//
obj[key] = judgeNullTime(d[achievementColumnKeys[key]]); // obj[key] = judgeNullTime(d[achievementColumnKeys[key]]);
} else { // } else {
obj[key] = d[achievementColumnKeys[key]] || null; obj[key] = d[achievementColumnKeys[key]] || null;
} //}
}) })
let tValid = judgeTimeValid(obj.recConDate); let tValid = judgeTimeValid(obj.recConDate);
if (!tValid) { if (!tValid) {

30
web/client/src/sections/business/containers/performanceReport/importBackModal.jsx

@ -104,17 +104,17 @@ const ImportBackModal = props => {
} }
const judgeNull = (value) => { // const judgeNull = (value) => {
return value ? String(value).trim().replace(/\s*/g, "") : null; // return value ? String(value).trim().replace(/\s*/g, "") : null;
} // }
const judgeNullTime = (v) => { // const judgeNullTime = (v) => {
//xlsxexcel // //xlsxexcel
//2020/8/1xlsx Fri Jul 31 2020 23:59:17 GMT+0800 43 // //2020/8/1xlsx Fri Jul 31 2020 23:59:17 GMT+0800 43
let a = new Date(v); // let a = new Date(v);
a.setTime(a.getTime() + 43 * 1000); // a.setTime(a.getTime() + 43 * 1000);
return v ? a : null; // return v ? a : null;
} // }
const judgeTimeValid = (time) => { const judgeTimeValid = (time) => {
let valid = true; let valid = true;
@ -178,11 +178,11 @@ const ImportBackModal = props => {
let d = res[i]; let d = res[i];
let obj = {}; let obj = {};
Object.keys(backMoneyColumnKeys).map(key => { Object.keys(backMoneyColumnKeys).map(key => {
if (['receivableDate', 'incomeConfirmdate'].indexOf(key) != -1) {// // if (['receivableDate', 'incomeConfirmdate'].indexOf(key) != -1) {//
obj[key] = judgeNullTime(d[backMoneyColumnKeys[key]]); // obj[key] = judgeNullTime(d[backMoneyColumnKeys[key]]);
} else { // } else {
obj[key] = d[backMoneyColumnKeys[key]] || null; obj[key] = d[backMoneyColumnKeys[key]] || null;
} //}
}) })
// //
if (!obj.year || !obj.serialNo || !obj.number) { if (!obj.year || !obj.serialNo || !obj.number) {

Loading…
Cancel
Save