1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <div id="manager" 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 layui-form-text">
- <label class="layui-form-label">批文</label>
- <div class="layui-input-block">
- <textarea name="reason" autocomplete="off" 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/leader",
- type: "POST",
- data: {
- "leaderName":data.field.username,
- "leaderreason":data.field.reason
- },
- success:function(da){
- alert(da.data);
- }
- });
- return false;
- });
-
- });
- </script>
|