mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-22 18:35:35 +08:00
102 lines
3.0 KiB
HTML
102 lines
3.0 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.
|
|
-->
|
|
|
|
<div class="tableform">
|
|
<form action="index.php?app=taoguaninventory&ctl=admin_codestate&act=save" method="post" id="newAddrForm">
|
|
<table border="0" class='gridlist'>
|
|
<thead>
|
|
<tbody>
|
|
<tr>
|
|
<th style=" white-space:nowrap;">标识:</th>
|
|
<td><{$state.name}>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th style=" white-space:nowrap;">前缀:</th>
|
|
<td>
|
|
|
|
<input id="head" name="head" type="text" size="15" value='<{$state.head}>' vtype="required"/></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th style=" white-space:nowrap;">编码长度:</th>
|
|
<td>
|
|
<input id="bhlen" name="bhlen" type="text" size="15" value='<{$state.bhlen}>' vtype="required&&number"/></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th style=" white-space:nowrap;">用途:</th>
|
|
<td>
|
|
<{$state.description}>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th style=" white-space:nowrap;">当前编号:</th>
|
|
<td>
|
|
<{$state.currentno}>
|
|
</td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</thead>
|
|
</table>
|
|
<div class="table-action">
|
|
<{button label="保存" class="btn-primary" id="btn_submit_addr" type="button"}>
|
|
<{button label="取消" class="btn-secondary" isCloseDialogBtn="true"}>
|
|
</div>
|
|
<input type='hidden' name='eid' value='<{$state.eid}>'>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
(function(){
|
|
$('btn_submit_addr').addEvent('click',function(e){
|
|
var _this=this;
|
|
var form=this.getParent('form');
|
|
var bhlen = $('bhlen').value;
|
|
if(bhlen<=0){
|
|
return MessageBox.error('<{t}>编码长度不可小于等于0<{/t}>');
|
|
}
|
|
form.store('target',{
|
|
onRequest:function(){
|
|
_this.disabled=true;
|
|
},
|
|
onComplete:function(jsontext){
|
|
|
|
try{
|
|
var json = Json.evaluate(jsontext);
|
|
|
|
if (typeof(json.error) != 'undefined'){
|
|
_this.disabled=false;
|
|
}else{
|
|
_this.disabled=true;
|
|
_this.getParent('.dialog').retrieve('instance').close();
|
|
window.finderGroup['<{$env.get.finder_id}>'].refresh(true);
|
|
|
|
}
|
|
}catch(e){}
|
|
}
|
|
});
|
|
form.fireEvent('submit',e);
|
|
|
|
});
|
|
|
|
|
|
|
|
})()
|
|
</script>
|