Commit 8db571a6 by Takumi Imai

#49767 報告フォーム取得処理修正

parent 582dfa9e
...@@ -189,32 +189,6 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty ...@@ -189,32 +189,6 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
}; };
/** /**
* Communicate with cms and post
*
* @param {String} url
* @param {Object} params
* @param {String} method
*/
COMMON.postCommunication = function (url, params, method = 'post') {
const form = document.createElement('form');
form.method = method;
form.action = url;
for (const key in params) {
if (params.hasOwnProperty(key)) {
const hiddenField = document.createElement('input');
hiddenField.type = 'hidden';
hiddenField.name = key;
hiddenField.value = params[key];
form.appendChild(hiddenField);
}
}
document.body.appendChild(form);
form.submit();
};
/**
* Check if user is logged in * Check if user is logged in
* *
* @param {boolean} async * @param {boolean} async
......
...@@ -747,11 +747,8 @@ PICKUP.getInspectDate = function (dateString) { ...@@ -747,11 +747,8 @@ PICKUP.getInspectDate = function (dateString) {
*/ */
PICKUP.sendReportFormFromNewReport = function (operationId) { PICKUP.sendReportFormFromNewReport = function (operationId) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
let params = {}; const url = 'reportForm.html?operationId=' + operationId;
params.sid = COMMON.getSid(); COMMON.avwScreenMove(url);
params.operationId = operationId;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
COMMON.postCommunication(url, params);
}; };
/** /**
...@@ -763,13 +760,8 @@ PICKUP.sendReportFormFromNewReport = function (operationId) { ...@@ -763,13 +760,8 @@ PICKUP.sendReportFormFromNewReport = function (operationId) {
*/ */
PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, processKey, phaseNo) { PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, processKey, phaseNo) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
let params = {}; const url = 'reportForm.html?operationId=' + operationId + '&processKey=' + processKey + '&phaseNo=' + phaseNo;
params.sid = COMMON.getSid(); COMMON.avwScreenMove(url);
params.operationId = operationId;
params.processKey = processKey;
params.phaseNo = phaseNo;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
COMMON.postCommunication(url, params);
}; };
/** /**
...@@ -783,25 +775,23 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces ...@@ -783,25 +775,23 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces
*/ */
PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) { PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
let params = {}; let url = 'reportForm.html?operationId=' + operationId;
params.sid = COMMON.getSid();
params.operationId = operationId;
switch (reportType) { switch (reportType) {
case PICKUP.REPORT_TYPE.REPORTONLY: case PICKUP.REPORT_TYPE.REPORTONLY:
params.taskKey = taskKey; url += '&taskKey' + taskKey;
break; break;
case PICKUP.REPORT_TYPE.INSPECT: case PICKUP.REPORT_TYPE.INSPECT:
params.taskKey = taskKey; url += '&taskKey' + taskKey;
break; break;
case PICKUP.REPORT_TYPE.WITHREPLY: case PICKUP.REPORT_TYPE.WITHREPLY:
params.replyNo = replyNo; url += '&taskKey' + taskKey;
url += '&replyNO' + replyNo;
break; break;
case PICKUP.REPORT_TYPE.WORKFLOW: case PICKUP.REPORT_TYPE.WORKFLOW:
params.processKey = processKey; url += '&processKey' + processKey;
params.phaseNo = phaseNo; url += '&phaseNo' + phaseNo;
break; break;
} }
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM; COMMON.avwScreenMove(url);
COMMON.postCommunication(url, params);
}; };
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