Files
OMS/app/wmsmgr/view/abnormal/add_code.html
2026-01-04 19:08:31 +08:00

89 lines
3.2 KiB
HTML

<!--
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<form method="post" action="index.php?app=wmsmgr&ctl=admin_abnormal_code&act=save" id='add-form'>
<input type="hidden" value="<{$data.abnormal_id}>" name="abnormal_id" />
<div class="tableform">
<div class="division">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<th><{t}><font color="red">*</font>单据类型:<{/t}></th>
<td>
<select name="abnormal_type" class="x-input dailog-batch-ipt" vtype='required'>
<option value=''>请选择</option>
<{foreach from=$abnormal_types key=itemKey item=itemVal}>
<option value='<{$itemKey}>' <{if $itemKey==$data.abnormal_type}>selected="selected"<{/if}> ><{$itemVal}></option>
<{/foreach}>
</select>
</td>
</tr>
<tr>
<th><{t}><font color="red">*</font>错误码:<{/t}></th>
<td><input type="text" value="<{$data.abnormal_code}>" name="abnormal_code" maxlength="20" vtype='required' class='x-input' /></td>
</tr>
<tr>
<th><{t}><font color="red">*</font>错误描述:<{/t}></th>
<td><input type="text" value="<{$data.abnormal_name}>" name="abnormal_name" maxlength="30" vtype='required' class='x-input' /></td>
</tr>
</table>
</div>
</div>
</form>
<{area inject=".mainFoot"}>
<div class="table-action">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<button class="btn btn-primary" id="submit_btn" ><span><span><{t}>提交<{/t}></span></span></button>&nbsp;&nbsp;
<{button class="btn-secondary " label="取消" isclosedialogbtn="true" onclick="W.page('index.php?app=wmsmgr&ctl=admin_abnormal_code&act=index')" }>
</td>
</tr>
</tbody>
</table>
</div>
<{/area}>
<script>
(function(){
var _form = $('add-form');
var btn = $('submit_btn');
var finder = finderGroup['<{$env.get.finder_id}>'];
_form.store('target',{
onComplete:function(){
},
onSuccess:function(response){
var hash_res_obj = JSON.decode(response);
if (hash_res_obj.success != undefined && hash_res_obj.success != ""){
try{
var _dialogIns = btn.getParent('.dialog').retrieve('instance');
}catch(e){}
if(_dialogIns){
finder.refresh();
_dialogIns.close();
}
}
}
});
btn.addEvent('click',function(){
_form.fireEvent('submit',{stop:$empty});
});
})();
</script>