Browse Source

(fixed)7628 评级时间显示与导入模板不一致

master
周沫沫历险记 2 years ago
parent
commit
b5832953ce
  1. 11
      web/client/src/sections/humanAffairs/components/importPositionRating.jsx

11
web/client/src/sections/humanAffairs/components/importPositionRating.jsx

@ -89,7 +89,8 @@ const ImportPositionRatingModal = props => {
//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 a.getFullYear() + '-' + a.getMonth() + '-' + a.getDay(); return a;
// return a.getFullYear() + '-' + a.getMonth() + '-' + a.getDay();
} }
return ( return (
@ -162,7 +163,7 @@ const ImportPositionRatingModal = props => {
} }
else if (["theoryPassed", "totalRatingPassed"].includes(item)) { else if (["theoryPassed", "totalRatingPassed"].includes(item)) {
if (!["是", "否"].includes(obj[item])) { if (!["是", "否"].includes(obj[item])) {
errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`; errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`;
break; break;
} else { } else {
obj[item] = "是" == obj[item] ? true : false; obj[item] = "是" == obj[item] ? true : false;
@ -175,17 +176,17 @@ const ImportPositionRatingModal = props => {
} }
else { else {
if (!obj.ratingTime.toString().match(/^(\d{1,4})(-|.|\/)(\d{1,2})\2(\d{1,2})$/)) { if (!obj.ratingTime.toString().match(/^(\d{1,4})(-|.|\/)(\d{1,2})\2(\d{1,2})$/)) {
errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请将单元格更改为时间格式`; errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请将单元格更改为时间格式`;
break; break;
} }
} }
} else { } else {
errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`; errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`;
break; break;
} }
} else if (["theoryBasicScore", "totalScore"].includes(item)) { } else if (["theoryBasicScore", "totalScore"].includes(item)) {
if (isNaN(obj[item])) { if (isNaN(obj[item])) {
errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`; errmsg = `${i + 2}行【${IMPORT_FIELD[item].label}】不合,请修改`;
break; break;
} }
} }

Loading…
Cancel
Save