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) => {
return value ? String(value).trim().replace(/\s*/g, "") : null;
}
// const judgeNull = (value) => {
// return value ? String(value).trim().replace(/\s*/g, "") : null;
// }
const judgeNullTime = (v) => {
//xlsxexcel
//2020/8/1xlsx 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) => {
// //xlsxexcel
// //2020/8/1xlsx 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) {

30
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) => {
//xlsxexcel
//2020/8/1xlsx 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) => {
// //xlsxexcel
// //2020/8/1xlsx 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) {

Loading…
Cancel
Save