Files
OMS/app/o2o/view/admin/system/server.html
2026-01-04 19:08:31 +08:00

85 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.
-->
<h4 class="head-title">服务端信息</h4>
<div class="tableform">
<div class="division">
<form method="post" action="index.php?app=o2o&ctl=admin_server&act=save" id="server">
<input type="hidden" name="server[server_id]" value="<{$server.server_id}>" />
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<th><em class="c-red">*</em> 服务端编码:</th>
<td><{if $server.server_bn}><{$server.server_bn}><{else}><{input type='text&&required' size="32" name="server[server_bn]" value=$server.server_bn}><{/if}>
<input type='hidden' name="server[old_server_bn]" value="<{$server.server_bn}>">
<{help}><{t}>服务端在系统中的唯一标识<{/t}><{/help}>
</td>
</tr>
<tr>
<th ><em class="c-red">*</em> 名称:</th>
<td><{input type="text&&required" size="32" name="server[name]" value=$server.name}>
<{help}><{t}>服务端在此系统需要显示的中文名称<{/t}><{/help}>
</td>
</tr>
<tr>
<th ><em class="c-red">*</em> 服务端类型:</th>
<td><{input type='select' name='server[type]' id='server_type' vtype='required' rows=$type_list valueColumn='type' labelColumn='label' value=$server.type}>
<{help}><{t}>服务端对接联通的模式<{/t}><{/help}>
</td>
</tr>
</tbody>
</table>
<div id='server_config'></div>
<div class="table-action">
<{button class="btn-primary" type="button" id="saveserver" name="submit" label="提交"}>
</div>
</form>
</div>
</div>
<script>
$('server_type').addEvents({
'change':function(e){
if (!this.value) return;
W.page('index.php?app=o2o&&ctl=admin_server&act=confightml&p[0]=<{$server.server_id}>&p[1]='+this.value,{update:$('server_config'),clearUpdateMap:false});
},
'domready':function(e){
this.fireEvent('change',e);
}
});
$('saveserver').addEvent('click',function(event){
$('server').fireEvent('submit',new Event(event));
});
$('server').store('target',{
onRequest:function(){
$('saveserver').set('disabled', 'true');
},
onComplete:function(jsontext){
var json = Json.evaluate(jsontext);
if (typeof(json.error) != 'undefined'){
$('saveserver').set('disabled', '');
}else{
$('saveserver').set('disabled', 'true');
$('server').getParent('.dialog').retrieve('instance').close();
}
}
});
</script>