Commit a0e1d90d by Ha Jonguk

プロジェクト一覧の定期点検対応

parent e9d85210
...@@ -520,16 +520,33 @@ HOME_CHECK.renderAddProject = function(post) { ...@@ -520,16 +520,33 @@ HOME_CHECK.renderAddProject = function(post) {
id: "list_" + post.projectId, id: "list_" + post.projectId,
class: "read" class: "read"
}); });
var taskInfo = $("<div/>", {class: "taskInfoDiv"});
var codeAndExpiration = $("<ul/>", {class: "codeAndExpiration"});
var startDate = "-/-/-"; var startDate = "-/-/-";
var endDate = "-/-/-"; var endDate = "-/-/-";
startDate = post.projectStartDate.replace(/-/g, '/'); var dateStr = " ~ ";
endDate = post.projectEndDate.replace(/-/g, '/'); var periodStr = "期間:";
var isInspect = post.projectReportType == "1";
var taskInfo = $("<div/>", {class: "taskInfoDiv"}); var hasInspectTask = post.reportStartDate && post.reportEndDate;
var codeAndExpiration = $("<ul/>", {class: "codeAndExpiration"});
if (isInspect) {
periodStr = "作業期間:";
if (hasInspectTask) {
startDate = post.reportStartDate.replace(/-/g, '/');
endDate = post.reportEndDate.replace(/-/g, '/');
dateStr = periodStr + startDate + dateStr + endDate;
} else {
dateStr = periodStr + "作業データがありません。";
}
} else {
startDate = post.projectStartDate.replace(/-/g, '/');
endDate = post.projectEndDate.replace(/-/g, '/');
dateStr = periodStr + startDate + dateStr + endDate;
}
codeAndExpiration.append($("<li/>", {class: "period"}).text(dateStr));
codeAndExpiration.append($("<li/>", {class: "period"}).text("期間:" + startDate + " ~ " + endDate));
taskInfo.append(codeAndExpiration); taskInfo.append(codeAndExpiration);
taskInfo.append($("<p/>").text(post.projectName)); taskInfo.append($("<p/>").text(post.projectName));
...@@ -539,19 +556,23 @@ HOME_CHECK.renderAddProject = function(post) { ...@@ -539,19 +556,23 @@ HOME_CHECK.renderAddProject = function(post) {
var actionBtnDiv = $("#actionBtnDiv").clone().attr("id", post.projectId + "_actionBtnDiv"); var actionBtnDiv = $("#actionBtnDiv").clone().attr("id", post.projectId + "_actionBtnDiv");
actionBtnDiv.css("display", "flex"); actionBtnDiv.css("display", "flex");
$(actionBtnDiv.children()[0]).on("click", function() { if (isInspect && !hasInspectTask) {
//CHK.reportMode = "1"; $(actionBtnDiv.children()[0]).find('img').attr("src","img/check/icon_working_off.png");
HOME_CHECK.createSession(post.projectId, post.projectType, post.projectReportType); } else {
}); $(actionBtnDiv.children()[0]).on("click", function() {
$(actionBtnDiv.children()[1]).hide(); //CHK.reportMode = "1";
HOME_CHECK.createSession(post.projectId, post.projectType, post.projectReportType);
});
}
$(actionBtnDiv.children()[1]).hide();
if (post.relatedContentList.length > 0) { if (post.relatedContentList.length > 0) {
$(actionBtnDiv.children()[2]).on("click", function() { $(actionBtnDiv.children()[2]).on("click", function() {
HOME_CHECK.initContentView(post.relatedContentList, null, post.projectName); HOME_CHECK.initContentView(post.relatedContentList, null, post.projectName);
}); });
} else { } else {
$(actionBtnDiv.children()[2]).find('img').attr("src","img/check/ic_common_content_off.png"); $(actionBtnDiv.children()[2]).find('img').attr("src","img/check/icon_document_reference_off.png");
$(actionBtnDiv.children()[2]).prop("disabled", true); $(actionBtnDiv.children()[2]).prop("disabled", true);
} }
......
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