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 $kcode = $ctrl->kcode;
12 $vopt = $view->validSelect(true);
14 <script type="text/javascript">
29 gotoNext: function(func, act) {
47 'kcode': this.v_kcode.val(),
48 'item': this.v_item.val(),
49 'kana': this.v_kana.val(),
50 'name': this.v_name.val(),
51 'valid_flg': this.v_valid_flg.val(),
56 eval("this.ans = " + data);
59 this.ans = {"sts": "NG", "err": "ajax error"};
69 if (!confirm("登録しますか?")) {
73 if (this.check() == 'NG') {
75 for (var i in this.ans.err) {
76 msg += this.ans.err[i] + '<br>';
79 this.errmsg.html(msg);
92 'kcode': this.v_kcode.val(),
93 'item': this.v_item.val(),
94 'kana': this.v_kana.val(),
95 'name': this.v_name.val(),
96 'valid_flg': this.v_valid_flg.val(),
101 eval("this.ans = " + data);
104 this.ans = {"sts": "NG", "err": "ajax error"};
107 if (this.ans.sts == 'NG') {
108 this.errmsg.html(this.ans.err);
112 this.gotoNext('UserItem', 'remember');
118 this.errmsg = $('#errmsg');
119 this.next = $('#next');
120 this.func = $('#func');
121 this.act = $('#act');
122 this.v_kcode = $('#v_kcode');
123 this.v_item = $('#v_item');
124 this.v_kana = $('#v_kana');
125 this.v_name = $('#v_name');
126 this.v_valid_flg = $('#v_valid_flg');
136 <form method="post" name="next" id="next" action="<?= $base ?>">
137 <input type="hidden" name="func" id="func">
138 <input type="hidden" name="act" id="act">
141 <table id="my_header" width="100%">
144 <a onclick="return my.gotoNext('UserMenu', '');">メニュー</a>
145 > <a onclick="return my.gotoNext('UserItem', 'remember');">科目コード</a>
148 <td style="text-align: right;">
149 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login', '');">ログアウト</button>
153 <td colspan="2" style="text-align: center;">
154 <?= $view->strBasic($basic) ?>
159 <div style="height: 5px;"> </div>
164 <table class="my_table" width="100%">
166 <th class="my_border">科目コード・新規作成</th>
170 <div style="height: 1px;"> </div><hr>
177 <td style="padding: 8px;">
178 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.regist();">登録</button>
180 <td style="width: 80px;"> </td>
182 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.gotoNext('UserItem', 'remember');">戻る</button>
190 <div style="height: 1px;"> </div><hr>
192 <div style="height: 8px;"> </div>
194 <table class="my_table">
196 <td colspan="2"><div id="errmsg" class="my_red"></div></td>
199 <td colspan="2"> </td>
202 <th class="my_border" style="width: 100px; text-align: right;">
205 <td class="my_border">
206 <select id="v_kcode">
208 foreach ($kcode as $k => $d) {
209 $kname = sprintf("%06d", $k);
210 $dname = $view->str($d);
212 <option value="<?= $k ?>"><?= $kname ?>:<?= $dname ?></option>
220 <th class="my_border" style="width: 100px; text-align: right;">
223 <td class="my_border">
226 $fmt = '<option value="%s">%02d</option>';
227 for ($i = 1; $i < 100; $i++) {
228 echo sprintf($fmt, $i, $i);
235 <th class="my_border" style="width: 100px; text-align: right;">
238 <td class="my_border">
239 <input style="width: 160px; text-align: left;" type="text" id="v_kana" value="">
243 <th class="my_border" style="width: 100px; text-align: right;">
246 <td class="my_border">
247 <input style="width: 160px; text-align: left;" type="text" id="v_name" value="">
251 <th class="my_border" style="text-align: right;">
252 <div class="my_required">有効フラグ</div>
254 <td class="my_border">
255 <select id="v_valid_flg"><?= $vopt ?></select>