var inputText = {
"P_EMPCODE_STR": "TSS009,SL079,TSS014,SL080,PT003,CS001,TSS033,12340001,TSS025,TSS020,TSS030,TSS002,TSS018,TSS015,TSS010,TSS005,TSS032,TSS031,TSS023,TSS022,TSS021,TSS019,TSS017,TSS013,TSS012,TSS004,TSS003,TSS001,Test002,LB001,TSS026,TSS024,TSS029,TSS006,ML0030,TS0050,TSS027,TSS008,78493213,TS0917,TS0554,CS0001,TSS034,TSS028,TSS016,TSS007,TSS011,TS0668",
"P_ITEMSTR": "O2,O3,act_wking_hrs,O1,Att_annual_leave,att_hrs,Att_weekday_rest,Att_weekend_rest,L5,L9,L3,L2,absent_hrs,Att_cur_al_balance,Att_cur_cl_balance",
"START_DATETIME": "2021/09/01 00:00:00",
"END_DATETIME": "2021/09/30 00:00:00",
"ATT_YEAR": 2021,
"ATT_MONTH": 9
}
var date = new Date();
var currentDateStr = formatDate(date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate());
var endtime = inputText.END_DATETIME
endtime = formatDate(endtime.split(" ")[0])
var inputText = endtime
function formatDate(date) {
date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Data();
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
return y + '-' + m + '-' + d;
}
console.log(endtime)
console.log(inputText)
console