/* @config : next999.json @filename : ${psFileBasename} @title : 1.選択年月リスト作成 @name : 1.選択年月リスト作成 @siteIds : 310511 @siteTitles : イオン多摩平シフト管理 @disabled: false */ try { // 年月を当月から2ヶ月後まで自動表示 let now = new Date(); for (let i = 0; i < 3; i++) { let date = new Date(now.getFullYear(), now.getMonth() + i, 1); let year = date.getFullYear(); let month = (date.getMonth() + 1).toString().padStart(2, '0'); let ym = year + '年' + month + '月'; columns.ClassA.AddChoiceHash(ym, ym); //対象年月ごとの件数を調べてHTML内に保管する let ymList = [ym] let classP = ['社員', 'パート']; let view = { 'View': { 'ColumnFilterHash': { 'ClassA': JSON.stringify(ymList), 'ClassP': JSON.stringify(classP) } } }; let count = items.Count(310511, JSON.stringify(view)); let key = year + '_' + month + '_Count' hidden.Add(key, count); } } catch (e) { context.Log(e.stack); }