您现在的位置是:首页 >>LayuiLayui

Add添加页面

zhang2021-07-22 15:29:56【Layui】人已围观

简介:
<!--#include file="getjobFun.asp" --><!DOCTYPE html><html><head> &#...

<!--#include file="getjobFun.asp" -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>添加</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../static/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../static/layui/css/diy.css" media="all">
</head>
<body>
<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
<div class="layui-form-item">
<label class="layui-form-label">负责人</label>
<div class="layui-input-inline">
<%
dim srs
set srs=conn.exec("select TrueName,CID from CxCms_TableContent1 where ContentStatus=1","r1")
echo "<select name='UserID' lay-search='' lay-verify='number'>"
echo "<option value=''>下拉选择负责人</option>" & vbcr
Do While Not srs.Eof
echo "<option value=""" &srs(1)& """>" &srs(0)& "</option>" & vbcr
srs.MoveNext
Loop
srs.Close:Set srs = Nothing
echo "</select>"
%>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">区县</label>
<div class="layui-input-inline">
<select name="Country" lay-verify="required">
<option value="">选择区县</option>
<%=GetSelect(replaceStr(sel_Country,"",""),"")%>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">公司名称</label>
<div class="layui-input-inline">
<input type="text" name="Company" value="" lay-verify="required" placeholder="请输入公司名称" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">工种</label>
<div class="layui-input-inline">
<input type="text" name="WorkType" value="" lay-verify="required" placeholder="请输入工种" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否结业</label>
<div class="layui-input-block">
<input type="radio" name="GraduationStatus" value="是" title="是">
<input type="radio" name="GraduationStatus" value="否" title="否" checked>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否报补</label>
<div class="layui-input-block">
<input type="radio" name="ReimbursementStatus" value="是" title="是">
<input type="radio" name="ReimbursementStatus" value="否" title="否" checked>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">开班时间</label>
<div class="layui-input-inline">
<input type="text" name="OpenTime" readonly lay-verify="required" placeholder="请输入开班时间" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注信息</label>
<div class="layui-input-inline">
<input type="text" name="Remark" value="" lay-verify="required" placeholder="请输入备注信息" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item layui-hide">
<input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加">
</div>
</div>

<script src="../../../static/layui/layui.js"></script>
<script src="../../../static/js/function.js"></script>
<script>
layui.use(['layer','laydate','form'], function(){
var $ = layui.$
,layer = layui.layer
,laydate = layui.laydate
,form = layui.form;

laydate.render({
elem: "input[name='OpenTime']"
,type: 'date'
});

//监听提交
form.on('submit(layuiadmin-app-form-submit)', function(data){
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
var loading=parent.layer.msg("正在发送打包命令,请稍后...",{icon:16,shade:[0.3, '#666'],time:false});
//提交 Ajax 开始
$.ajax({
type: 'POST',
url: '?action=add',//发送请求
data: formEncode(data.field),
dataType : "json",
success: function(data) {
parent.layer.close(loading);
if(data.status=="success"){
layer.confirm('添加成功,是否需要刷新列表页面数据?',{btn: ['是','否']}, function(){
parent.layui.table.reload('LAY-app-content-list');
parent.layer.close(index);
},function(){
parent.layer.close(index);
});
}
else{
layer.msg(decodeUnicode(data.msg), {icon: 2,time: 2*1000,shift: 6});
}
},
error:function(data,textStatus,errorThrown){
parent.layer.close(loading);
layer.msg("服务器返回"+data.status+"错误,请检查原因!", {icon: 2,time: 2*1000,shift: 6});
/*jqXHR对象的信息*/
console.log('错误代码 --> ',data.responseText);
console.log('状态码 --> ',data.status);
console.log('当前状态 --> ',data.readyState);
console.log('错误描述 --> ',data.statusText);
/*其他两个参数的信息*/
console.log('返回状态 --> ',textStatus);
console.log('错误描述 --> ',errorThrown);
}

});
//提交 Ajax 结束
});
})
</script>

</body>
</html>



备注:添加页面做好以后,编辑,查看页面,都直接复制代码使用,稍微修改一下即可。





文章评论

    评论加载中...

标签云

站点信息

  • 建站时间:2018-11-17
  • 文章统计:165篇文章
  • 微信交流:扫描二维码,添加我
在线客服
在线客服
在线咨询:
点击这里给我发消息技术交流
点击这里给我发消息技术交流
电话咨询:
(微信同步)
15629136039
微信二维码