Commit 8db571a6 by Takumi Imai

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

parent 582dfa9e
......@@ -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
*
* @param {boolean} async
......
......@@ -747,11 +747,8 @@ PICKUP.getInspectDate = function (dateString) {
*/
PICKUP.sendReportFormFromNewReport = function (operationId) {
//Transition to the report form or operation list screen
let params = {};
params.sid = COMMON.getSid();
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);
const url = 'reportForm.html?operationId=' + operationId;
COMMON.avwScreenMove(url);
};
/**
......@@ -763,13 +760,8 @@ PICKUP.sendReportFormFromNewReport = function (operationId) {
*/
PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, processKey, phaseNo) {
//Transition to the report form or operation list screen
let params = {};
params.sid = COMMON.getSid();
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);
const url = 'reportForm.html?operationId=' + operationId + '&processKey=' + processKey + '&phaseNo=' + phaseNo;
COMMON.avwScreenMove(url);
};
/**
......@@ -783,25 +775,23 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces
*/
PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) {
//Transition to the report form or operation list screen
let params = {};
params.sid = COMMON.getSid();
params.operationId = operationId;
let url = 'reportForm.html?operationId=' + operationId;
switch (reportType) {
case PICKUP.REPORT_TYPE.REPORTONLY:
params.taskKey = taskKey;
url += '&taskKey' + taskKey;
break;
case PICKUP.REPORT_TYPE.INSPECT:
params.taskKey = taskKey;
url += '&taskKey' + taskKey;
break;
case PICKUP.REPORT_TYPE.WITHREPLY:
params.replyNo = replyNo;
url += '&taskKey' + taskKey;
url += '&replyNO' + replyNo;
break;
case PICKUP.REPORT_TYPE.WORKFLOW:
params.processKey = processKey;
params.phaseNo = phaseNo;
url += '&processKey' + processKey;
url += '&phaseNo' + phaseNo;
break;
}
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);
COMMON.avwScreenMove(url);
};
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