parent
b686515011
commit
8c522504c3
Binary file not shown.
Binary file not shown.
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
||||
<style>
|
||||
.require-star {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background-color: #ea4335;
|
||||
top: 12px;
|
||||
right: 8px;
|
||||
border-radius: 1.5px;
|
||||
}
|
||||
|
||||
.input-width {
|
||||
max-width: 475px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container" style="margin-top: 25px;">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: auto !important;"><span
|
||||
class="require-star"></span>分组名称</label>
|
||||
<div class="layui-input-block" style="margin-left: 90px !important;">
|
||||
<input type="text" id="group_name" name="group_name" lay-verify="required|groupName" autocomplete="off" placeholder="请输入分组名称"
|
||||
class="layui-input input-width">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="../../../component/layui/layui.js"></script>
|
||||
<script src="../../../component/pear/pear.js"></script>
|
||||
<script src="../../../component/pear/base64.js"></script>
|
||||
<script>
|
||||
layui.use(function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
|
||||
var bureauIds = GetQueryString("bureau_ids");
|
||||
|
||||
// 自定义验证
|
||||
form.verify({
|
||||
groupName: [/^.{2,32}$/, '任务名称长度必须为2到32位']
|
||||
|
||||
});
|
||||
|
||||
form.on('submit(save)', function (data) {
|
||||
$.ajax({
|
||||
url: '/QingLong/collect/addGroup',
|
||||
type: 'post',
|
||||
data: {
|
||||
"group_name": data.field.group_name,
|
||||
"bureauIds": bureauIds
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg("保存分组成功!", {
|
||||
icon: 1,
|
||||
time: 1000
|
||||
}, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.message, {
|
||||
icon: 2,
|
||||
time: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
function GetQueryString(name, istop) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
||||
|
||||
if (r != null) return unescape(r[2]);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in new issue