|
@ -89,7 +89,7 @@ const ImportPositionRatingModal = props => { |
|
|
//如2020/8/1,xlsx会解析成 Fri Jul 31 2020 23:59:17 GMT+0800 小了43秒 |
|
|
//如2020/8/1,xlsx会解析成 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; |
|
|
return a.getFullYear() + '-' + a.getMonth() + '-' + a.getDay(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
@ -169,8 +169,16 @@ const ImportPositionRatingModal = props => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ("ratingTime" == item) { |
|
|
else if ("ratingTime" == item) { |
|
|
if (obj.ratingTime.toString().match(/^(\d{1,4})(-|.|\/)(\d{1,2})\2(\d{1,2})$/)) { |
|
|
if (!isNaN(Date.parse(obj.ratingTime))) { |
|
|
obj["ratingTime"] = changeTime(obj.ratingTime); |
|
|
if ("object" == typeof obj.ratingTime) {//时间格式 |
|
|
|
|
|
obj["ratingTime"] = changeTime(obj.ratingTime); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
if (!obj.ratingTime.toString().match(/^(\d{1,4})(-|.|\/)(\d{1,2})\2(\d{1,2})$/)) { |
|
|
|
|
|
errmsg = `第${i + 2}行【${IMPORT_FIELD[item].label}】不合法,请将单元格更改为时间格式`; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
errmsg = `第${i + 2}行【${IMPORT_FIELD[item].label}】不合法,请修改`; |
|
|
errmsg = `第${i + 2}行【${IMPORT_FIELD[item].label}】不合法,请修改`; |
|
|
break; |
|
|
break; |
|
|