3 * @link https://datagram.co.jp/source/bksj for the canonical source repository
4 * @copyright Copyright (c) 2006-2019 Datagram Ltd. (https://datagram.co.jp)
5 * @license https://datagram.co.jp/source/bksj/license.txt
10 $basic = $ctrl->basic;
11 $acitm = $ctrl->acitm;
12 $cnd = $ctrl->dat['cnd'];
13 $list = $ctrl->dat['list'];
15 $c_c1 = $ctrl->const['c_c1'];
16 $c_c2 = $ctrl->const['c_c2'];
17 $c_c3 = $ctrl->const['c_c3'];
18 $c_c4 = $ctrl->const['c_c4'];
20 <script type="text/javascript">
36 gotoNext: function(func) {
44 this.func.val('UserItem');
45 this.act.val('create');
50 drop: function(id, name) {
54 if (!confirm("科目名 " + name + " を削除しますか?")) {
70 eval("this.ans = " + data);
73 this.ans = {"sts": "NG", "err": "ajax error"};
76 if (this.ans.sts == 'NG') {
81 this.gotoNext('UserItem', 'remember');
87 var vflg = $('#v_valid_flg_' + id).val();
102 eval("this.ans = " + data);
105 this.ans = {"sts": "NG", "err": "ajax error"};
108 if (this.ans.sts == 'NG') {
116 this.func.val('UserItem');
117 this.act.val('edit');
123 move: function(dlt) {
125 var curr = this.v_page_curr.val() * 1;
126 var last = this.v_page_last.val() * 1;
130 case -9: next = 1; break;
131 case 9: next = last; break;
132 default: next = curr + dlt; break;
143 this.v_page_curr.val(next);
151 if (this.v_page_curr.val() < 1) {
152 this.v_page_curr.val(1);
155 this.func.val('UserItem');
156 this.act.val('search');
157 this.cnd_kana.val(this.v_cnd_kana.val());
158 this.cnd_name.val(this.v_cnd_name.val());
159 this.page_curr.val(this.v_page_curr.val());
165 this.v_cnd_name.val('');
166 this.v_cnd_kana.val('');
167 this.v_page_curr.val(1);
172 this.next = $('#next');
173 this.func = $('#func');
174 this.act = $('#act');
176 this.cnd_kana = $('#cnd_kana');
177 this.cnd_name = $('#cnd_name');
178 this.page_curr = $('#page_curr');
179 this.v_cnd_kana = $('#v_cnd_kana');
180 this.v_cnd_name = $('#v_cnd_name');
181 this.v_page_curr = $('#v_page_curr');
182 this.v_page_last = $('#v_page_last');
192 <form method="post" name="next" id="next" action="<?= $base ?>">
193 <input type="hidden" name="func" id="func">
194 <input type="hidden" name="act" id="act">
195 <input type="hidden" name="cnd_kana" id="cnd_kana">
196 <input type="hidden" name="cnd_name" id="cnd_name">
197 <input type="hidden" name="page_curr" id="page_curr">
198 <input type="hidden" name="id" id="id">
199 <input type="hidden" name="bid" id="bid" value="<?= $bid ?>">
202 <table id="my_header" width="100%">
205 <a onclick="return my.gotoNext('UserMenu');">メニュー</a>
206 > 科目コード
208 <td style="text-align: right;">
209 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login');">ログアウト</button>
213 <td colspan="2" style="text-align: center;">
214 <?= $view->strBasic($basic) ?>
219 <div style="height: 5px;"> </div>
224 <table class="my_table" width="100%">
226 <th class="my_border">科目コード</th>
230 <div style="height: 1px;"> </div><hr>
232 <table class="my_table" width="100%">
234 <th colspan="3" class="my_border">絞込み検索</th>
237 <td class="my_border" style="text-align: center; width: 110px;" rowspan="2">
238 <table class="my_table" cellpadding="0" cellspacing="2">
241 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.search();">検索</button>
246 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.reset();">検索リセット</button>
251 <th class="my_border">科目名</th>
252 <td class="my_border">
253 <input id="v_cnd_name" type="text" value="<?= $view->str($cnd['cnd_name']) ?>" size="20" style="text-align: left;">
257 <th class="my_border" style="width: 100px;">科目名(かな)</th>
258 <td class="my_border">
259 <input id="v_cnd_kana" type="text" value="<?= $view->str($cnd['cnd_kana']) ?>" size="20" style="text-align: left;">
264 <div style="height: 1px;"> </div><hr>
266 <table class="my_table" width="100%">
268 <td class="my_border" id="my_create">
269 <button type="button" class="my_cyan" style="width: 150px;" onclick="return my.create();">新規科目コード作成</button>
274 <div style="height: 2px;"> </div>
278 <td style="text-align: left; width: 20%;">全件数:<?= $list['cnt'] ?>[件]</td>
280 if ($list['cnt'] < 1) {
282 <td style="visibility: hidden;">
286 <td style="text-align: center;">
290 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-9);">|<</button>
291 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-1);"><</button>
292 <input id="v_page_last" type="hidden" value="<?= $list['last'] ?>">
293 <input id="v_page_curr" style="text-align: right;" type="text" size="4" value="<?= $list['page'] ?>">/<?= $list['last'] ?>[ページ]
294 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(1);">></button>
295 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(9);">>|</button>
297 <td style="text-align: right; left; width: 20%;">
298 表示数:<?= $list['rpp'] ?>[件/ページ]
303 <div style="height: 2px;"> </div>
305 <table class="my_list">
323 if ($list['cnt'] < 1) {
326 <td colspan="11">データなし</td>
330 $i = ($list['page'] - 1) * $list['rpp'];
331 foreach ($list['rec'] as $rec) {
336 $ccd = $view->str($rec['ccd']);
337 $account = $view->str($rec['account']);
338 $item = $view->str($rec['item']);
339 $kana = $view->str($rec['kana']);
340 $name = $view->str($rec['name']);
341 $vopt = $view->validSelect($rec['valid_flg']);
342 $delete_flg = $view->str($rec['delete_flg']);
343 $edit_flg = $view->str($rec['edit_flg']);
344 $kcd = sprintf('%08d', $rec['ccd'] * 10000 + $rec['account'] * 100 + $rec['item']);
345 $c1 = substr($kcd, 0, 1);
346 $c2 = substr($kcd, 1, 1);
347 $c3 = substr($kcd, 2, 1);
348 $c4 = substr($kcd, 3, 1);
349 $acname = $view->str($acitm[$rec['ccd']][$rec['account']]);
353 if ($rec['ccd'] == '0') {
359 <td style="text-align: center;">
363 <button type="button" class="my_green" onclick="return my.edit('<?= $id ?>');">編集</button>
375 <td style="text-align: right;"><?= $i ?></td>
376 <td style="text-align: center;">
377 <select id="v_valid_flg_<?= $id ?>" onchange="return my.use('<?= $id ?>');">
382 <td><?= $name ?></td>
384 if ($rec['ccd'] == '0') {
395 <td><?= $c_c1[$c1] ?></td>
396 <td><?= $c_c2[$c1][$c2] ?></td>
397 <td><?= $c_c3[$c1][$c2][$c3]['name'] ?></td>
405 <td><?= $c_c4[$c1][$c2][$c3][$c4] ?></td>
409 <td><?= $acname ?></td>
410 <td style="text-align: center;">
414 <button type="button" class="my_magenta" onclick="return my.drop('<?= $id ?>', '<?= $name ?>');">削除</button>