123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <div id="activitiExample" class="plg-tab-container">
- <blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
- 流程实例使用教程
- </blockquote>
- <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
- <legend>示列:用户请假表单</legend>
- </fieldset>
-
- <form class="layui-form" action="">
- <div class="layui-form-item">
- <label class="layui-form-label">请假人</label>
- <div class="layui-input-block">
- <input type="text" name="username" autocomplete="off" lay-verify="required" placeholder="请输入请假人名称" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">时间</label>
- <div class="layui-input-block">
- <input type="text" name="day" lay-verify="required" placeholder="请输入请假天数" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item layui-form-text">
- <label class="layui-form-label">请假原因</label>
- <div class="layui-input-block">
- <textarea name="reason" lay-verify="required" placeholder="请输入请假原因" class="layui-textarea"></textarea>
- </div>
- </div>
-
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
- <button type="reset" class="layui-btn layui-btn-primary">重置</button>
- </div>
- </div>
- </form>
- </div>
- <script>
- $(function(){
- var form = layui.form,
- layer = layui.layer;
-
- //监听提交
- form.on('submit(demo1)', function(data){
- // layer.alert(JSON.stringify(data.field), {
- // title: '最终的提交信息'
- // })
- //请求后台
- Prolog.ajax({
- url: "/api/askforleave-service/askforleave/employ",
- type: "POST",
- data: {
- "employName":data.field.username,
- "holidaytime":data.field.day,
- "reason":data.field.reason
- },
- success:function(da){
- alert(da.data);
- }
- });
- return false;
- });
-
- });
- </script>
|