736 lines
29 KiB
JavaScript
736 lines
29 KiB
JavaScript
/*
|
||
@config : next999.json
|
||
@filename : ${psFileBasename}
|
||
@title : 4.プロセスごとに実行スクリプト
|
||
@name :
|
||
@siteIds : 189112
|
||
@siteTitles : ★マスターシート
|
||
@disabled: false
|
||
*/
|
||
|
||
$p.ex.statusCheck = function (status) {
|
||
//ステータスチェックリスト
|
||
let statusCheckList = {
|
||
100: { flag: true, check: 0, next: 150, nextAuth: "", nextAuthUsers: [] }, //[本契]新規作成
|
||
102: { flag: true, check: 0, next: 150, nextAuth: "", nextAuthUsers: [] }, //設計契約→本契約
|
||
150: { flag: true, check: 0, next: 160, nextAuth: "", nextAuthUsers: [] }, //[本契]事前申請
|
||
160: { flag: true, check: 0, next: 200, nextAuth: "", nextAuthUsers: [] }, //[本契]事前確認
|
||
101: { flag: true, check: 107, next: 200, nextAuth: "管理設計", nextAuthUsers: [] }, //[本契]差戻し
|
||
200: { flag: true, check: 108, next: 300, nextAuth: "所属長", nextAuthUsers: [] }, //[本契]WF申請
|
||
300: { flag: true, check: 109, next: 400, nextAuth: "着工要因", nextAuthUsers: [] }, //[本契]管理設計
|
||
400: { flag: true, check: 110, next: 500, nextAuth: "専務", nextAuthUsers: [] }, //[本契]所属長
|
||
500: { flag: true, check: 111, next: 600, nextAuth: "総務", nextAuthUsers: [] }, //[本契]着工要因
|
||
//600: { flag: true, check: 112, next: 700, nextAuth: "役員", nextAuthUsers: [] }, //[本契]専務
|
||
600: { flag: true, check: 112, next: 700, nextAuth: "所属長", nextAuthUsers: [] }, //[本契]専務
|
||
700: { flag: true, check: 0, next: 900, nextAuth: "", nextAuthUsers: [] }, //[本契]総務
|
||
110: { flag: true, check: 0, next: 151, nextAuth: "", nextAuthUsers: [] }, //[設契]新規作成
|
||
151: { flag: true, check: 0, next: 161, nextAuth: "", nextAuthUsers: [] }, //[設契]事前申請
|
||
161: { flag: true, check: 0, next: 210, nextAuth: "", nextAuthUsers: [] }, //[設契]事前確認
|
||
111: { flag: true, check: 101, next: 210, nextAuth: "管理設計", nextAuthUsers: [] }, //[設契]差戻し
|
||
210: { flag: true, check: 102, next: 310, nextAuth: "所属長", nextAuthUsers: [] }, //[設契]WF申請
|
||
310: { flag: true, check: 103, next: 410, nextAuth: "着工要因", nextAuthUsers: [] }, //[設契]管理設計
|
||
410: { flag: true, check: 104, next: 510, nextAuth: "総務", nextAuthUsers: [] }, //[設契]所属長
|
||
//510: { flag: true, check: 105, next: 710, nextAuth: "役員", nextAuthUsers: [] }, //[設契]着工要因
|
||
510: { flag: true, check: 105, next: 710, nextAuth: "所属長", nextAuthUsers: [] }, //[設契]着工要因
|
||
710: { flag: true, check: 0, next: 910, nextAuth: "", nextAuthUsers: [] }, //[設契]総務
|
||
910: { flag: true, check: 0, next: 102, nextAuth: "", nextAuthUsers: [] } //[設契]最終
|
||
}
|
||
|
||
//承認者一覧
|
||
let authUsers1 = []; //[管理設計]
|
||
let authUsers2 = []; //[所属長]
|
||
let authUsers3 = []; //[WF着工要因GR]
|
||
let authUsers4 = []; //[WF専務]
|
||
let authUsers5 = []; //[WF総務GR]
|
||
let authUsers6 = []; //[担当役員] →2025年より[所属長]に変更
|
||
|
||
authUsers1 = authUsers1.concat(myData.ClassHash.ClassL); //[管理設計]
|
||
authUsers2 = authUsers2.concat(myData.ClassHash.ClassY); //[所属長]
|
||
authUsers3 = authUsers3.concat($("#Results_Class180").val()); //[WF着工要因GR]
|
||
authUsers4 = authUsers4.concat($("#Results_Class182").val()); //[WF専務]
|
||
authUsers5 = authUsers5.concat($("#Results_Class183").val()); //[WF総務GR]
|
||
//authUsers6 = authUsers6.concat(myData.ClassHash.Class122); //担当役員
|
||
authUsers6 = authUsers6.concat(myData.ClassHash.ClassY); //所属長
|
||
|
||
//次のステータスの承認者を挿入
|
||
statusCheckList[101].nextAuthUsers = authUsers1; //[管理設計]
|
||
statusCheckList[200].nextAuthUsers = authUsers2; //[所属長]
|
||
statusCheckList[300].nextAuthUsers = authUsers3; //[WF着工要因GR]
|
||
statusCheckList[400].nextAuthUsers = authUsers4; //[WF専務]
|
||
statusCheckList[500].nextAuthUsers = authUsers5; //[WF総務GR]
|
||
statusCheckList[600].nextAuthUsers = authUsers6; //[担当役員] → [所属長]
|
||
|
||
statusCheckList[111].nextAuthUsers = authUsers1; //[管理設計]
|
||
statusCheckList[210].nextAuthUsers = authUsers2; //[所属長]
|
||
statusCheckList[310].nextAuthUsers = authUsers3; //[WF着工要因GR]
|
||
statusCheckList[410].nextAuthUsers = authUsers5; //[WF総務GR]
|
||
statusCheckList[510].nextAuthUsers = authUsers6; //[担当役員]→ [所属長]
|
||
|
||
//デザイノ物件の場合
|
||
//契約会社のコードをチェックする
|
||
if (myData.ClassHash.ClassD == '96242') {
|
||
//専務によるチェックを省略し、総務チェックにする
|
||
statusCheckList[400].check = 111;
|
||
statusCheckList[400].next = 600;
|
||
statusCheckList[400].nextAuth = "総務";
|
||
statusCheckList[400].nextAuthUsers = authUsers5; //[WF総務GR]
|
||
}
|
||
|
||
|
||
let now = status;
|
||
console.log(status);
|
||
let check = statusCheckList[now].check;
|
||
let checkX;
|
||
let next;
|
||
|
||
console.log(statusCheckList);
|
||
|
||
if (check != 0) {
|
||
do {
|
||
check = statusCheckList[now].check;
|
||
checkX = $("#Results_Check" + check).prop("checked");
|
||
next = statusCheckList[now].next;
|
||
if (checkX) {
|
||
now = next;
|
||
}
|
||
} while (checkX);
|
||
|
||
console.log(now);
|
||
console.log(statusCheckList[now]);
|
||
|
||
$p.set($('#Results_Class199'), statusCheckList[now].next); //次のステータス
|
||
$p.set($('#Results_Class185'), statusCheckList[now].nextAuth); //次の承認者カテゴリ
|
||
$p.set($('#Results_Class186'), JSON.stringify(statusCheckList[now].nextAuthUsers)); //次承認者一覧
|
||
|
||
}
|
||
|
||
}
|
||
|
||
$p.ex.returnProcess = function (procNum) {
|
||
let status = myData.Status;
|
||
//$("#Results_Status").val();
|
||
|
||
let statusCheckList2 = {
|
||
200: { check: 107 },
|
||
300: { check: 108 },
|
||
400: { check: 109 },
|
||
500: { check: 110 },
|
||
600: { check: 111 },
|
||
700: { check: 112 },
|
||
210: { check: 101 },
|
||
310: { check: 102 },
|
||
410: { check: 103 },
|
||
510: { check: 104 },
|
||
710: { check: 105 }
|
||
}
|
||
|
||
let flag = false;
|
||
console.log($('#Results_Check100').prop("checked"));
|
||
let check100 = $('#Results_Check100').prop("checked");
|
||
|
||
//差戻しチェックがON
|
||
if (check100) {
|
||
//差戻しチェックボックスをオフにする
|
||
$p.set($('#Results_Check100'), ''); //チェックボックス オフ
|
||
|
||
switch (procNum) {
|
||
//[本契]差戻し
|
||
case '10':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('147', '差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
//承認済みチェックを外す
|
||
$p.set($('#Results_Check' + statusCheckList2[status].check), 0);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
break;
|
||
|
||
//[本契]システム差戻し
|
||
case '21':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('147', '差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
break;
|
||
|
||
//[設契]差戻し
|
||
case '18':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('167', '[設契]差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
//承認済みチェックを外す
|
||
$p.set($('#Results_Check' + statusCheckList2[status].check), 0);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
break;
|
||
|
||
//[設契]システム差戻し
|
||
case '22':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('167', '[設契]差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
break;
|
||
//--------------------------------------------------------------------------------------------------------
|
||
default:
|
||
flag = false;
|
||
break;
|
||
}
|
||
} else {
|
||
//差戻しチェックがOFF
|
||
//差戻しシートへ移動
|
||
$('a[href="#FieldSetTab18"]').click();
|
||
}
|
||
|
||
}
|
||
|
||
//プロセスごとに実行スクリプト
|
||
$p.ex.processScript = function (procNum) {
|
||
let flag = false;
|
||
let status = myData.Status;
|
||
//$("#Results_Status").val();
|
||
|
||
|
||
switch (procNum) {
|
||
//[本契]WF事前申請
|
||
case '1':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.kakuninFileCheck();
|
||
if (flag) {
|
||
flag = $p.ex.addComments('179', '事前申請開始');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WF申請の事前申請を開始します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.set($("#Results_Num081"), $("#Results_Num080").val());
|
||
$p.execProcess($('#Process_' + procNum));
|
||
//$p.ex.childTableLock('910');
|
||
}
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]WF新規申請
|
||
case '24':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('140', '新規申請開始');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WF申請を開始します。以後、内容の修正はできなくなります。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('910');
|
||
}
|
||
}
|
||
|
||
break;
|
||
|
||
//[本契]WF再申請
|
||
case '2':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.kakuninFileCheck();
|
||
if (flag) {
|
||
flag = $p.ex.addComments('140', '差戻し後再申請');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WF申請を再申請します。以後、内容の修正はできなくなります。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.set($("#Results_Num081"), $("#Results_Num080").val());
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('910');
|
||
}
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]WF新規申請(設契)
|
||
case '3':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.kakuninFileCheck();
|
||
if (flag) {
|
||
flag = $p.ex.addComments('179', '設計契約承認済み本契約事前申請');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約後本契約WF申請の事前申請を開始します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.set($("#Results_Num081"), $("#Results_Num080").val());
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock();
|
||
}
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]管理設計承認
|
||
case '4':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('141', '管理設計承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]所属長承認
|
||
case '5':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('142', '所属長承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]着工要因承認
|
||
case '6':
|
||
case '31':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('143', '着工要因承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]専務承認
|
||
case '7':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('144', '専務承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]総務承認
|
||
case '8':
|
||
case '32':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('145', '総務承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[本契]最終承認
|
||
case '9':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('146', '最終承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.arariKakuninshoLock('910');
|
||
}
|
||
}
|
||
break;
|
||
|
||
//[本契]差戻し
|
||
case '10':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('147', '差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
break;
|
||
|
||
//[本契]差戻し
|
||
case '21':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('147', '差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('本契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
|
||
|
||
break;
|
||
//--------------------------------------------------------------------------------------------------------
|
||
//[設契]WF事前申請
|
||
case '11':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.kakuninFileCheck();
|
||
if (flag) {
|
||
flag = $p.ex.addComments('189', '[設契]事前申請開始');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WF申請の事前申請を開始します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
//$p.ex.childTableLock('910'); //事前申請ではロックしない
|
||
}
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]WF新規申請
|
||
case '26':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('160', '[設契]新規申請開始');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WF申請を開始します。以後、内容の修正はできなくなります。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('910');
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]WF再申請
|
||
case '12':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
|
||
flag = $p.ex.kakuninFileCheck();
|
||
if (flag) {
|
||
flag = $p.ex.addComments('160', '[設契]差戻し後再申請');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WF申請を再申請します。以後、内容の修正はできなくなります。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('910');
|
||
}
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]管理設計承認
|
||
case '13':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('161', '[設契]管理設計承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]所属長承認
|
||
case '14':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('162', '[設契]所属長承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]着工要因承認
|
||
case '15':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('163', '[設契]着工要因承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]総務承認
|
||
case '16':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('165', '[設契]総務承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.ex.statusCheck(status);
|
||
$p.execProcess($('#Process_' + procNum));
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]最終承認
|
||
case '17':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('166', '[設契]最終承認済み');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを承認します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.arariKakuninshoLock('920');
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]差戻し
|
||
case '18':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('167', '[設契]差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
|
||
break;
|
||
//[設契]システム差戻し
|
||
case '22':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = $p.ex.addComments('167', '[設契]差戻し理由:');
|
||
if (flag) {
|
||
flag = window.confirm('設計契約WFを差戻します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
|
||
break;
|
||
//設計契約→本契約移行
|
||
case '19':
|
||
case '29':
|
||
case '30':
|
||
console.log('Process_' + procNum + ' Activate');
|
||
flag = true;
|
||
if (flag) {
|
||
flag = window.confirm('設計契約シートを本契約へ移行します。宜しいですか?');
|
||
if (flag) {
|
||
$p.execProcess($('#Process_' + procNum));
|
||
$p.ex.childTableLock('100');
|
||
//$p.ex.arariKakuninshoLock('100');
|
||
}
|
||
}
|
||
|
||
break;
|
||
default:
|
||
flag = false;
|
||
break;
|
||
}
|
||
|
||
$p.ex.colAlertChecker();
|
||
|
||
}
|
||
|
||
$p.ex.colAlertChecker = function () {
|
||
if ($('#colAlertChecker')) {
|
||
$('#colAlertChecker').remove();
|
||
}
|
||
|
||
if ($('span.alert-error').length != 0) {
|
||
let div = document.createElement('div');
|
||
div.id = 'colAlertChecker';
|
||
div.style.float = 'left';
|
||
div.style.margin = '10px';
|
||
div.style.color = 'red';
|
||
div.style.fontSize = '1.2em';
|
||
|
||
let title = document.createElement('div');
|
||
title.innerHTML = '<h3>【WF申請】未入力アラート</h3>';
|
||
div.append(title);
|
||
|
||
let errorList = $('label.error');
|
||
$.each(errorList, function (index, value) {
|
||
let colName = $('#' + value.htmlFor + 'Field label')[0].innerHTML;
|
||
let coldiv = document.createElement('div');
|
||
coldiv.innerHTML = '・' + colName;
|
||
div.append(coldiv);
|
||
});
|
||
|
||
$('#EditorTabsContainer').after(div);
|
||
}
|
||
}
|
||
|
||
|
||
$p.ex.childTableLock = function (lockCode) {
|
||
let class191 = $('#Results_Class191').val(); //リードタイム算定
|
||
let class193 = $('#Results_Class193').val(); //工期計算
|
||
|
||
let tables = [];
|
||
if (class191 != '' && class191 != '116503') {
|
||
tables.push(class191);
|
||
}
|
||
|
||
if (class193 != '' && class193 != '203147') {
|
||
tables.push(class193);
|
||
}
|
||
|
||
if ($('span.alert-error').length == 0) {
|
||
for (i = 0; i < tables.length; i++) {
|
||
$p.apiUpdate({
|
||
'id': tables[i],
|
||
'data': {
|
||
'ApiVersion': 1.1,
|
||
'ApiKey': apiKey,
|
||
'Status': lockCode
|
||
},
|
||
'done': function (data) {
|
||
console.log(data);
|
||
},
|
||
'fail': function (data) {
|
||
console.log(data);
|
||
}
|
||
});
|
||
}
|
||
console.log('ChildTable Lock Success');
|
||
} else {
|
||
console.log('ChildTable Lock Fail');
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
}
|
||
|
||
$p.ex.addComments = function (num, defCom) {
|
||
let comments = window.prompt('コメントがある場合は記入', defCom);
|
||
if (comments == null) {
|
||
//キャンセル押したら終了
|
||
return false;
|
||
} else {
|
||
//コメントを指定カラムに保存
|
||
$p.set($('#Results_Class' + num), comments);
|
||
//差戻し履歴の保存
|
||
let now = new Date();
|
||
nowStr = now.getFullYear() + '/' +
|
||
(now.getMonth() + 1).toString().padStart(2, '0') + '/' +
|
||
now.getDate().toString().padStart(2, '0') + ' ' +
|
||
now.getHours().toString().padStart(2, '0') + ':' +
|
||
now.getMinutes().toString().padStart(2, '0') + ':' +
|
||
now.getSeconds().toString().padStart(2, '0');
|
||
|
||
if (num == 147) {
|
||
let data = $('#Results_Description' + num).val();
|
||
data = data + '\n' + '--------------------\n' + '本契約WF 差戻し' + ':' + $p.userName() + '\n' + nowStr + '\n' + comments;
|
||
$p.set($('#Results_Description' + num), data);
|
||
}
|
||
|
||
if (num == 167) {
|
||
let data = $('#Results_Description' + num).val();
|
||
data = data + '\n' + '--------------------\n' + '設計契約WF 差戻し ' + ':' + $p.userName() + '\n' + nowStr + '\n' + comments;
|
||
$p.set($('#Results_Description' + num), data);
|
||
}
|
||
|
||
return true;
|
||
}
|
||
}
|
||
|
||
//ワークフロー確認者登録
|
||
/*
|
||
let users = {
|
||
//WF着工要因GR//入谷 優子:677, xxx刈込 美智子:644
|
||
'180': ['677'],
|
||
//WF確認申請GR//今井 加奈恵:796, 髙井 寧子:792, 白澤 智昌:795, 宮入 敬子:534, 田中 絵理:793, 石井 祥雄:935, 植田 寛人:897, 東條 和弘:686, 井上 京子:882, 齋藤 哲也:689, 井桁 勝:906
|
||
'181': ['796', '792', '795', '534', '793', '935', '897', '686', '882', '689', '906'],
|
||
//WF専務//川名 真治 423
|
||
'182': ['423'],
|
||
//WF総務GR//豊蔵 恵美:463,長谷川 望:459, 秦野 勇輝:655, 露﨑 直樹:691
|
||
松井 かおり:462 削除
|
||
'183': ['463', '462', '459', '655', '691'],
|
||
//WF最終確認GR//豊蔵 一幸:421, 遠藤 友美:859酒巻 美穂:874, 近藤 菜緒:870, 髙山 君代:886
|
||
, 山田 由美子:461, 削除
|
||
, 佐藤 久顕:944, 廣島 法子:881, 市原 里紗:903, 削除
|
||
'184': ['421', '859', '461', '874', '870', '886', '944', '881', '903'],
|
||
}
|
||
*/
|
||
|
||
$p.ex.arariKakuninshoLock = function (lockCode) {
|
||
let class190 = $('#Results_Class190').val(); //粗利益確認書
|
||
$p.apiUpdate({
|
||
'id': class190,
|
||
'data': {
|
||
'ApiVersion': 1.1,
|
||
'ApiKey': apiKey,
|
||
'Status': lockCode
|
||
},
|
||
'done': function (data) {
|
||
console.log(data);
|
||
$p.execProcess($(this));
|
||
},
|
||
'fail': function (data) {
|
||
console.log(data);
|
||
}
|
||
});
|
||
}
|
||
|
||
$p.ex.kakuninFileCheck = function () {
|
||
let class121 = myData.ClassHash.Class121;
|
||
|
||
console.log($("#Results_Class119").val())
|
||
console.log(myData.ClassHash.Class119)
|
||
|
||
//let class119 = myData.ClassHash.Class119;
|
||
let class119 = $("#Results_Class119").val();
|
||
|
||
if (class121 == 1) {
|
||
if (class119 == 0) {
|
||
$p.clearMessage();
|
||
$p.setMessage('#Message', JSON.stringify({
|
||
Css: 'alert-success',
|
||
Text: '【9】敷地調査関連書類が不足しています'
|
||
}));
|
||
|
||
$('a[href="#FieldSetTab12"]').click();
|
||
return false;
|
||
} else {
|
||
//OK
|
||
return true;
|
||
}
|
||
} else {
|
||
$p.clearMessage();
|
||
$p.setMessage('#Message', JSON.stringify({
|
||
Css: 'alert-success',
|
||
Text: '【9】敷地調査関連書類の保管を確認してください'
|
||
}));
|
||
|
||
$('a[href="#FieldSetTab12"]').click();
|
||
return false;
|
||
}
|
||
} |