ken_nogi/Pleasanter/営業積算システム/docs/新・営業積算システム仕様書_分割/036_新・営業積算システム仕様書_別記資料スクリプト(6/28).md
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

2.2 KiB
Raw Blame History

別記資料 スクリプトScripts全文 628

// ...(前ファイルからの続き)
$p.judgeClassS = function () {
    let classYVal = $('#Results_ClassY').val();
    let classZVal = $('#Results_ClassZ').val();
    let judged = (!classYVal || classZVal === '9999AAABB') ? '0' : '1';
    $p.set($('#Results_ClassS'), judged);
}

//----------------------------------------------------------------------
//Class022エリア、SiteId:210699→ ClassMエリア記号転記
//Class022自身は重複チェックキーのため、この項目自体はロック対象・必須のまま
$p.applyAreaMasterLookup = function (wasEmpty) {
    let newVal = $('#Results_Class022').val();
    if (newVal && areaMasterData[newVal] !== undefined) {
        $p.applyLookupValue('ClassM', areaMasterData[newVal], wasEmpty);
    }
}

$p.on('change', 'Class022', function () {
    let wasEmpty = !previousLookupValues.Class022;
    $p.applyAreaMasterLookup(wasEmpty);
    previousLookupValues.Class022 = $('#Results_Class022').val();
});

//----------------------------------------------------------------------
//Class023契約ブランド、SiteId:109100選択時の転記 → ClassNブランド記号
$p.on('change', 'Class023', function () {
    let newVal = $('#Results_Class023').val();
    let wasEmpty = !previousLookupValues.Class023;

    if (newVal && brandMasterData[newVal] !== undefined) {
        $p.applyLookupValue('ClassN', brandMasterData[newVal], wasEmpty);
    }

    previousLookupValues.Class023 = newVal;
});

//----------------------------------------------------------------------
//Class031契約営業所、SiteId:96243選択時の転記 → Class038所属長
$p.on('change', 'Class031', function () {
    let newVal = $('#Results_Class031').val();
    let wasEmpty = !previousLookupValues.Class031;

    if (newVal && officeMasterData[newVal] !== undefined) {
        $p.applyLookupValue('Class038', officeMasterData[newVal], wasEmpty);
    }

    previousLookupValues.Class031 = newVal;
});

scripts/2_02_プロセス処理スクリプト.js.js