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
11 $basic = $ctrl->basic;
12 $kcode = $ctrl->kcode;
13 $vopt = $view->validSelect($dat['valid_flg']);
15 $id = $view->str($dat['id']);
16 $ccd = $view->str($dat['ccd']);
17 $account = $view->str($dat['account']);
18 $item = $view->str($dat['item']);
19 $kana = $view->str($dat['kana']);
20 $name = $view->str($dat['name']);
21 $valid_flg = $view->str($dat['valid_flg']);
23 <script type="text/javascript">
38 gotoNext: function(func, act) {
57 'kcode': this.v_kcode.val(),
58 'item': this.v_item.val(),
59 'kana': this.v_kana.val(),
60 'name': this.v_name.val(),
61 'valid_flg': this.v_valid_flg.val(),
66 eval("this.ans = " + data);
69 this.ans = {"sts": "NG", "err": "ajax error"};
79 if (!confirm("登録しますか?")) {
83 if (this.check() == 'NG') {
85 for (var i in this.ans.err) {
86 msg += this.ans.err[i] + '<br>';
89 this.errmsg.html(msg);
102 'bid': '<?= $bid ?>',
103 'kcode': this.v_kcode.val(),
104 'item': this.v_item.val(),
105 'kana': this.v_kana.val(),
106 'name': this.v_name.val(),
107 'valid_flg': this.v_valid_flg.val(),
112 eval("this.ans = " + data);
115 this.ans = {"sts": "NG", "err": "ajax error"};
118 if (this.ans.sts == 'NG') {
119 this.errmsg.html(this.ans.err);
123 this.gotoNext('UserItem', 'remember');
129 this.errmsg = $('#errmsg');
130 this.next = $('#next');
131 this.func = $('#func');
132 this.act = $('#act');
133 this.v_kcode = $('#v_kcode');
134 this.v_item = $('#v_item');
135 this.v_kana = $('#v_kana');
136 this.v_name = $('#v_name');
137 this.v_valid_flg = $('#v_valid_flg');
147 <form method="post" name="next" id="next" action="<?= $base ?>">
148 <input type="hidden" name="func" id="func">
149 <input type="hidden" name="act" id="act">
152 <table id="my_header" width="100%">
155 <a onclick="return my.gotoNext('UserMenu', '');">メニュー</a>
156 > <a onclick="return my.gotoNext('UserItem', 'remember');">科目コード</a>
159 <td style="text-align: right;">
160 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login', '');">ログアウト</button>
164 <td colspan="2" style="text-align: center;">
165 <?= $view->strBasic($basic) ?>
170 <div style="height: 5px;"> </div>
175 <table class="my_table" width="100%">
177 <th class="my_border">科目コード・編集</th>
181 <div style="height: 1px;"> </div><hr>
188 <td style="padding: 8px;">
189 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.regist();">登録</button>
191 <td style="width: 80px;"> </td>
193 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.gotoNext('UserItem', 'remember');">戻る</button>
201 <div style="height: 1px;"> </div><hr>
203 <div style="height: 8px;"> </div>
205 <table class="my_table">
207 <td colspan="2"><div id="errmsg" class="my_red"></div></td>
210 <td colspan="2"> </td>
213 <th class="my_border" style="width: 100px; text-align: right;">
216 <td class="my_border">
217 <select id="v_kcode">
219 foreach ($kcode as $k => $d) {
220 $kname = sprintf("%06d", $k);
221 $dname = $view->str($d);
222 $acitm = sprintf("%04d%02d", $ccd, $account);
223 $slctd = ($kname == $acitm) ? ' selected' : '';
225 <option value="<?= $k ?>"<?= $slctd ?>><?= $kname ?>:<?= $dname ?></option>
233 <th class="my_border" style="width: 100px; text-align: right;">
236 <td class="my_border">
239 $fmt = '<option value="%s"%s>%02d</option>';
240 for ($i = 1; $i < 100; $i++) {
241 $s = ($i == $item) ? ' selected' : '';
242 echo sprintf($fmt, $i, $s, $i);
249 <th class="my_border" style="width: 100px; text-align: right;">
252 <td class="my_border">
253 <input style="width: 160px; text-align: left;" type="text" id="v_kana" value="<?= $kana ?>">
257 <th class="my_border" style="width: 100px; text-align: right;">
260 <td class="my_border">
261 <input style="width: 160px; text-align: left;" type="text" id="v_name" value="<?= $name ?>">
265 <th class="my_border" style="text-align: right;">
266 <div class="my_required">有効フラグ</div>
268 <td class="my_border">
269 <select id="v_valid_flg"><?= $vopt ?></select>