Commit 3fa1d8fe by ruaxl7

fix bug miss reportStartDate param when open the warning report of inspec type

parent c41b039d
......@@ -577,7 +577,9 @@ PICKUP.initWarningReportWithInspectType = function (report) {
PICKUP.REPORT_TYPE.INSPECT +
",'" +
report.taskKey +
"', null,null,null);\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>" +
"', null,null,null,'" +
report.reportStartDateString +
"');\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'>" +
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>" +
"<div class='type-icon'><span class='inspection'></span></div></div>" +
"<div class='pl-5 h-100 d-flex align-items-center'><div class='w-100'>" +
......@@ -746,6 +748,28 @@ PICKUP.getInspectDate = function (dateString) {
};
/**
* Change Inspect Date format
* @param {*} dateString
* @returns 2023-03-29 08:30:00
*/
PICKUP.changeFormatInspectDate = function (dateString) {
let date = new Date(dateString);
return (
date.getFullYear() +
'-' +
('0' + (date.getMonth() + 1)).slice(-2) +
'-' +
('0' + date.getDate()).slice(-2) +
' ' +
('0' + date.getHours()).slice(-2) +
':' +
('0' + date.getMinutes()).slice(-2) +
':' +
('0' + date.getSeconds()).slice(-2)
);
};
/**
* send data to open report form from New report pickup
* @param operarionId
* @returns
......@@ -781,8 +805,9 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces
* @param {*} processKey
* @param {*} phaseNo
* @param {*} replyNo
* @param {*} reportStartDate
*/
PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) {
PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo, reportStartDate) {
//Transaction to the report form or operation list screen
sessionStorage.setItem('pickUpType', CONSTANT.PICK_UP_TYPE.WARNING_REPORT);
sessionStorage.setItem('operationId', operationId);
......@@ -793,6 +818,9 @@ PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, task
break;
case PICKUP.REPORT_TYPE.INSPECT:
url += '&taskKey=' + taskKey;
if (reportStartDate) {
url += '&reportStartDate=' + PICKUP.changeFormatInspectDate(reportStartDate);
}
break;
case PICKUP.REPORT_TYPE.WITHREPLY:
url += '&taskKey=' + taskKey;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment