Commit 32efc557 by 焦荣

修改页面样式

parent bfa26965
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">所属单位:</label> <label class="layui-form-label">所属单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input id="ssdwcode" name="ssdwcode" type="text" lay-verify="scode" th:value="${session.User.getUnitcode()}" style="width:66%; height:32px;" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_UNIT',method:'get',textField : 'text', valueField : 'id'"/> <input id="ssdwcode" name="ssdwcode" type="text" lay-verify="scode" style="width:66%; height:32px;" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_UNIT',method:'get',textField : 'text', valueField : 'id'"/>
<input type="hidden" id="ssdwname" name="ssdwname" th:value="${session.User.getUnitname()}" /> <input type="hidden" id="ssdwname" name="ssdwname" th:value="${session.User.getUnitname()}" />
</div> </div>
</div> </div>
...@@ -430,7 +430,6 @@ ...@@ -430,7 +430,6 @@
$("#strgpy .layui-form-label").find(".red").remove(); $("#strgpy .layui-form-label").find(".red").remove();
$("#stryhkcjy .layui-form-label").find(".red").remove(); $("#stryhkcjy .layui-form-label").find(".red").remove();
$("#strdnabqdyj .layui-form-label").find(".red").remove(); $("#strdnabqdyj .layui-form-label").find(".red").remove();
form.verify({ form.verify({
pps1:[/\S/,'品牌型号不为空'] pps1:[/\S/,'品牌型号不为空']
}); });
...@@ -443,7 +442,6 @@ ...@@ -443,7 +442,6 @@
$('#gpycode').attr("lay-verify", ""); $('#gpycode').attr("lay-verify", "");
$('#yhkcjycode').attr("lay-verify", ""); $('#yhkcjycode').attr("lay-verify", "");
$('#dnabqdyjcode').attr("lay-verify", ""); $('#dnabqdyjcode').attr("lay-verify", "");
} }
form.render('select'); form.render('select');
form.render('div'); form.render('div');
...@@ -463,9 +461,8 @@ ...@@ -463,9 +461,8 @@
//监听提交 //监听提交
form.on('submit(formDemo)', function(data){ form.on('submit(formDemo)', function(data){
$("#ssdwname").val(codeFormatters($("#ssdwcode").val(),"CODE_UNIT")); $("#ssdwname").val(codeFormatters($("input[name='ssdwcode']").val(),"CODE_UNIT"));
var services=JSON.stringify(data.field); var services=JSON.stringify(data.field);
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "saveClientVp", url: "saveClientVp",
...@@ -474,14 +471,18 @@ ...@@ -474,14 +471,18 @@
success: function(data){ success: function(data){
console.log(data.status); console.log(data.status);
if(data.status=="201"){ if(data.status=="201"){
layer.msg("保存成功"); layer.msg('保存成功', {
var index = parent.layer.getFrameIndex(window.name); icon: 1,//提示的样式
time: 3000, //2秒关闭(如果不配置,默认是3秒)//设置后不需要自己写定时关闭了,单位是毫秒
end:function(){
location.href='/sbxxform';
}
});
parent.layer.close(index);//关闭当前页 parent.layer.close(index);//关闭当前页
//window.parent.location.reload(); //刷新父页面
}if(data.status=="203"){ }if(data.status=="203"){
layer.msg("ip与mac已经注册"); layer.msg("ip与mac已经注册");
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);//关闭当前页 parent.layer.close(index);//关闭当前页
//var index = parent.layer.getFrameIndex(window.name);
//window.parent.location.reload(); //刷新父页面 //window.parent.location.reload(); //刷新父页面
}else{ }else{
//layer.close(index); //layer.close(index);
...@@ -493,9 +494,8 @@ ...@@ -493,9 +494,8 @@
}); });
}); });
$(function() { $(function() {
// openCombotree('ssdwcode'); openCombotree('ssdwcode');
$("#ssdwcode").val(codeFormatters($("#ssdwcode").val(),"CODE_UNIT")); $("#ssdwcode").combotree("setValue",$("#ssdwname").val());
//form.render("input");
}) })
//格式化字典 //格式化字典
...@@ -517,6 +517,7 @@ ...@@ -517,6 +517,7 @@
return codeName; return codeName;
} }
</script> </script>
</body> </body>
</html> </html>
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">所属单位:</label> <label class="layui-form-label">所属单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input id="ssdwcode" name="ssdwcode" type="text" lay-verify="scode" th:value="${session.User.getUnitcode()}" style="width:66%; height:32px;" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_UNIT',method:'get',textField : 'text', valueField : 'id'"/> <input id="ssdwcode" name="ssdwcode" type="text" lay-verify="scode" th:value="${ClientVp.ssdwcode}" style="width:66%; height:32px;" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_UNIT',method:'get',textField : 'text', valueField : 'id'"/>
<input type="hidden" id="ssdwname" name="ssdwname" th:value="${session.User.getUnitname()}" /> <input type="hidden" id="ssdwname" name="ssdwname" th:value="${ClientVp.ssdwname}" />
</div> </div>
</div> </div>
...@@ -464,8 +464,8 @@ ...@@ -464,8 +464,8 @@
//监听提交 //监听提交
form.on('submit(formDemo)', function(data){ form.on('submit(formDemo)', function(data){
$("#ssdwname").val(codeFormatters($("input[name='ssdwcode']").val(),"CODE_UNIT"));
var services=JSON.stringify(data.field); var services=JSON.stringify(data.field);
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/updateClientVp", url: "/updateClientVp",
...@@ -474,10 +474,20 @@ ...@@ -474,10 +474,20 @@
success: function(data){ success: function(data){
console.log(data.status); console.log(data.status);
if(data.status=="201"){ if(data.status=="201"){
layer.msg("保存成功"); /* layer.msg("保存成功");
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);//关闭当前页 parent.layer.close(index);//关闭当前页
//window.parent.location.reload(); //刷新父页面 //window.parent.location.reload(); //刷新父页面
*/
layer.msg('修改成功', {
icon: 1,//提示的样式
time: 3000, //2秒关闭(如果不配置,默认是3秒)//设置后不需要自己写定时关闭了,单位是毫秒
end:function(){
location.href='/sbxxform';
}
});
parent.layer.close(index);//关闭当前页
}if(data.status=="203"){ }if(data.status=="203"){
layer.msg("ip与mac已经注册"); layer.msg("ip与mac已经注册");
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
...@@ -493,9 +503,8 @@ ...@@ -493,9 +503,8 @@
}); });
}); });
$(function() { $(function() {
// openCombotree('ssdwcode'); openCombotree('ssdwcode');
$("#ssdwcode").val(codeFormatters($("#ssdwcode").val(),"CODE_UNIT")); $("#ssdwcode").combotree("setValue",$("#ssdwname").val());
//form.render("input");
}) })
//格式化字典 //格式化字典
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment