ken_nogi/Pleasanter/Extended/wwwroot/myScripts/beforeComment.html
Kenichiro NOGI ce58cb4be4 初回コミット: dev配下(NodeSrv/Pleasanter等)をGitea管理下に統合
GitHub(nextgroup2706/ken_nogi)は今後使わず自社Gitea運用に切替え。
NodeSrvは旧リポジトリの履歴を破棄しファイルのみ統合(Dokploy用サービスアカウントは
別途mygit-admin/NodeSrv.gitに履歴あり)。notepmエクスポート(12GB)とPleasanter
インストーラzip(208MB)はサイズが大きいため.gitignoreで除外。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 15:37:06 +09:00

100 lines
4.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>事前確認 コメント記入</title>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2//themes/smoothness/jquery-ui.css">
</head>
<body>
<h2 style="margin:5px 5px 5px 20px;">注文住宅MSS★マスターシート 事前確認シート</h2>
<h3 style="margin:5px 5px 5px 20px;" id="jizenKakuninMode">&nbsp</h3>
<div style="font-size:80%; margin-left:20px;">
★マスターシートの各項目をチェックし、指摘事項がある場合は下記の入力欄にコメントを記載をしてください。<br>
すべてチェックし終わったら、『事前確認完了』にチェックを入れてください。途中で保存することもできます。<br>
<span style="color:red;font-weight:bold;font-size:110%;">最後に必ず『コメント内容を保存』ボタンを押してください。</span><br>
<br>
</div>
<form id="myComment">
<textarea name="message" id="jizenComment" cols="100" rows="20" style="padding:5px;margin:5px;"></textarea>
<br>
<input type="checkbox" id="checkbox1" name="checkbox1" value="yes" style="margin-left:20px;">
<label for="checkbox1">事前確認完了</label><span style="color:red;font-weight:bold;font-size:80%;">
※完了後はコメントを編集できなくなります。</span>
<br><br>
<input type="submit" value="コメント内容を保存" style="margin-left:20px;">
</form>
</body>
<script>
window.onbeforeunload = function (e) {
e.returnValue = "ページを閉じます";
}
window.addEventListener('load', function () {
const form = document.getElementById('myComment');
//保存ボタン実行処理
form.addEventListener('submit', function (event) {
window.onbeforeunload = null;
let checkFlg;
event.preventDefault(); // デフォルトの送信処理をキャンセル
// JavaScriptで処理を実行する
console.log($('#jizenComment').val());
const $checkbox1 = $('#checkbox1');
if ($checkbox1.is(':checked')) {
checkFlg = window.confirm('『事前確認完了』がチェックされています。\n確認内容を保存し、事前確認作業を終了します。\nよろしいですか');
console.log(checkFlg);
} else {
checkFlg = window.confirm('『事前確認完了』がチェックされていません。\n確認内容は保存されますが、事前確認作業は完了しません。\nよろしいですか');
console.log(checkFlg);
}
if (checkFlg) {
window.opener.receiveMessageFromChild($('#jizenComment').val(), $checkbox1.is(':checked'));
}
});
//事前確認完了ボタン処理
const checkbox1 = document.getElementById('checkbox1');
checkbox1.addEventListener('change', function () {
if (this.checked) {
console.log("Checkbox1 is Checked");
} else {
console.log("Checkbox1 is unChecked");
}
});
//マスターシートからデータを取得して表示
let message = window.opener.getMessageFromParent();
$('#jizenComment').val(message);
let checkbox = window.opener.getChekboxFromParent();
if (checkbox) {
$('#checkbox1').prop('checked', true);
}
//事前確認モードの確認
let modeMessage = {
124: '本契約 事前確認:管理設計',
125: '本契約 事前確認:所属長',
126: '本契約 事前確認:専務',
127: '本契約 事前確認:総務',
//128: '本契約 事前確認:担当役員',
195: '設計契約 事前確認:管理設計',
196: '設計契約 事前確認:所属長',
197: '設計契約 事前確認:総務',
//198: '設計契約 事前確認:担当役員',
}
let jizenKakuninMode = window.opener.getjizenKakuninModeFromParent();
$('#jizenComment').val(message);
$('#jizenKakuninMode').html(modeMessage[jizenKakuninMode]);
});
</script>
</html>