增加平台参数表
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" id="serialNumber">获取序列号</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" id="submitActivationCode">填写激活码</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="tableData" style="height:340px;top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
@@ -61,6 +61,32 @@
|
||||
<a href="javascript:void(0)" id="cancelPlugin" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#pluginDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<div id="activationCodeDlg" class="easyui-dialog" style="width:420px;padding:10px 20px"
|
||||
closed="true" buttons="#activationCodeDlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="activationCodeFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>机器码 </td>
|
||||
<td style="padding:5px">
|
||||
<span id="machineCode"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>激活码 </td>
|
||||
<td style="padding:5px">
|
||||
<input name="activationCode" id="activationCode" class="easyui-textbox" data-options="multiline:true" style="width: 280px;height: 60px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id="activationCodeDlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveActivationCode" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelActivationCode" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#activationCodeDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function () {
|
||||
@@ -365,8 +391,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
//获取序列号
|
||||
$("#serialNumber").unbind().bind({
|
||||
//填写激活码
|
||||
$("#submitActivationCode").unbind().bind({
|
||||
click: function () {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
@@ -374,7 +400,28 @@
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code == 200) {
|
||||
$.messager.alert('序列号', res.data);
|
||||
$("#machineCode").text(res.data);
|
||||
$('#activationCodeDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 填写激活码');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$("#activationCode").textbox("clear");
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/platformConfig/getPlatformConfigByKey",
|
||||
data: {
|
||||
platformKey: "activation_code"
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code == 200){
|
||||
$("#activationCode").textbox("setValue",res.data.platformValue);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
@@ -385,6 +432,33 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#saveActivationCode").off("click").on("click",function () {
|
||||
if($("#activationCode").val()==""){
|
||||
$.messager.alert('提示', '激活码不能为空!', 'warning');
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/platformConfig/updatePlatformConfigByKey",
|
||||
data: {
|
||||
platformKey: "activation_code",
|
||||
platformValue: $("#activationCode").val()
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code == 200){
|
||||
$.messager.alert('提示', '保存成功!', 'info');
|
||||
$('#activationCodeDlg').dialog('close');
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user