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 $cnd = $ctrl->dat['cnd'];
12 $list = $ctrl->dat['list'];
14 $c_c0 = $ctrl->const['c_c0'];
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'];
19 $c_deb_cre = $ctrl->const['c_deb_cre'];
20 $c_item_class = $ctrl->const['c_item_class'];
22 <script type="text/javascript">
38 gotoNext: function(func) {
46 this.func.val('UserAcitm');
47 this.act.val('create');
52 drop: function(id, name) {
56 if (!confirm("勘定科目 " + name + " を削除しますか?")) {
72 eval("this.ans = " + data);
75 this.ans = {"sts": "NG", "err": "ajax error"};
78 if (this.ans.sts == 'NG') {
83 this.gotoNext('UserAcitm', 'remember');
89 this.func.val('UserAcitm');
98 var curr = this.v_page_curr.val() * 1;
99 var last = this.v_page_last.val() * 1;
103 case -9: next = 1; break;
104 case 9: next = last; break;
105 default: next = curr + dlt; break;
116 this.v_page_curr.val(next);
124 if (this.v_page_curr.val() < 1) {
125 this.v_page_curr.val(1);
128 this.func.val('UserAcitm');
129 this.act.val('search');
130 this.cnd_kana.val(this.v_cnd_kana.val());
131 this.cnd_name.val(this.v_cnd_name.val());
132 this.page_curr.val(this.v_page_curr.val());
138 this.v_cnd_name.val('');
139 this.v_cnd_kana.val('');
140 this.v_page_curr.val(1);
145 this.next = $('#next');
146 this.func = $('#func');
147 this.act = $('#act');
149 this.cnd_kana = $('#cnd_kana');
150 this.cnd_name = $('#cnd_name');
151 this.page_curr = $('#page_curr');
152 this.v_cnd_kana = $('#v_cnd_kana');
153 this.v_cnd_name = $('#v_cnd_name');
154 this.v_page_curr = $('#v_page_curr');
155 this.v_page_last = $('#v_page_last');
165 <form method="post" name="next" id="next" action="<?= $base ?>">
166 <input type="hidden" name="func" id="func">
167 <input type="hidden" name="act" id="act">
168 <input type="hidden" name="cnd_kana" id="cnd_kana">
169 <input type="hidden" name="cnd_name" id="cnd_name">
170 <input type="hidden" name="page_curr" id="page_curr">
171 <input type="hidden" name="id" id="id">
172 <input type="hidden" name="bid" id="bid" value="<?= $bid ?>">
175 <table id="my_header" width="100%">
178 <a onclick="return my.gotoNext('UserMenu');">メニュー</a>
179 > 勘定コード
181 <td style="text-align: right;">
182 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login');">ログアウト</button>
186 <td colspan="2" style="text-align: center;">
187 <?= $view->strBasic($basic) ?>
192 <div style="height: 5px;"> </div>
197 <table class="my_table" width="100%">
199 <th class="my_border">勘定コード</th>
203 <div style="height: 1px;"> </div><hr>
205 <table class="my_table" width="100%">
207 <th colspan="3" class="my_border">絞込み検索</th>
210 <td class="my_border" style="text-align: center; width: 110px;" rowspan="2">
211 <table class="my_table" cellpadding="0" cellspacing="2">
214 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.search();">検索</button>
219 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.reset();">検索リセット</button>
224 <th class="my_border">勘定名</th>
225 <td class="my_border">
226 <input id="v_cnd_name" type="text" value="<?= $view->str($cnd['cnd_name']) ?>" size="20" style="text-align: left;">
230 <th class="my_border" style="width: 100px;">勘定名(かな)</th>
231 <td class="my_border">
232 <input id="v_cnd_kana" type="text" value="<?= $view->str($cnd['cnd_kana']) ?>" size="20" style="text-align: left;">
237 <div style="height: 1px;"> </div><hr>
239 <table class="my_table" width="100%">
241 <td class="my_border" id="my_create">
242 <button type="button" class="my_cyan" style="width: 150px;" onclick="return my.create();">新規勘定コード作成</button>
247 <div style="height: 2px;"> </div>
251 <td style="text-align: left; width: 20%;">全件数:<?= $list['cnt'] ?>[件]</td>
253 if ($list['cnt'] < 1) {
255 <td style="visibility: hidden;">
259 <td style="text-align: center;">
263 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-9);">|<</button>
264 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-1);"><</button>
265 <input id="v_page_last" type="hidden" value="<?= $list['last'] ?>">
266 <input id="v_page_curr" style="text-align: right;" type="text" size="4" value="<?= $list['page'] ?>">/<?= $list['last'] ?>[ページ]
267 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(1);">></button>
268 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(9);">>|</button>
270 <td style="text-align: right; left; width: 20%;">
271 表示数:<?= $list['rpp'] ?>[件/ページ]
276 <div style="height: 2px;"> </div>
278 <table class="my_list">
297 if ($list['cnt'] < 1) {
300 <td colspan="12">データなし</td>
304 $i = ($list['page'] - 1) * $list['rpp'];
305 foreach ($list['rec'] as $rec) {
310 $ccd = $view->str($rec['ccd']);
311 $item = $view->str($rec['item']);
312 $item_ccd = $view->str($rec['item_ccd']);
313 $division = $view->str($rec['division']);
314 $kana = $view->str($rec['kana']);
315 $name = $view->str($rec['name']);
316 $delete_flg = $view->str($rec['delete_flg']);
317 $edit_flg = $view->str($rec['edit_flg']);
318 $kcd = sprintf('%06d', $rec['ccd'] * 100 + $rec['item']);
319 $c1 = substr($kcd, 0, 1);
320 $c2 = substr($kcd, 1, 1);
321 $c3 = substr($kcd, 2, 1);
322 $c4 = substr($kcd, 3, 1);
326 if ($rec['ccd'] == '0') {
332 <td style="text-align: center;">
336 <button type="button" class="my_green" onclick="return my.edit('<?= $id ?>');">編集</button>
348 <td style="text-align: right;"><?= $i ?></td>
350 <td><?= $name ?></td>
352 if ($rec['ccd'] == '0') {
365 <td><?= $c_c0[$c_c3[$c1][$c2][$c3]['div']] ?></td>
366 <td><?= $c_deb_cre[$division]['name'] ?></td>
367 <td><?= $c_item_class[$item_ccd] ?></td>
368 <td><?= $c_c1[$c1] ?></td>
369 <td><?= $c_c2[$c1][$c2] ?></td>
370 <td><?= $c_c3[$c1][$c2][$c3]['name'] ?></td>
378 <td><?= $c_c4[$c1][$c2][$c3][$c4] ?></td>
382 <td style="text-align: center;">
386 <button type="button" class="my_magenta" onclick="return my.drop('<?= $id ?>', '<?= $name ?>');">削除</button>