123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <link rel="stylesheet" href="/repair/style.css">
- <title>{$title}</title>
- </head>
- <body>
- <div class="container">
- <form method="post" action="{:url('add')}" class="form-horizontal" id="form">
- <input type="hidden" name="mode" value="{$mode}">
- <div class="add-content-box">
- <textarea name="content" id="" placeholder="请输入内容..." ></textarea>
- </div>
- <div class="add-img-box">
- <div class="upload-bx">
- {:widget_view('common/upimg',['name'=>'images','multi'=>9,'val'=>''])}
- </div>
- </div>
- <div class="add-contacts-info-box">
- <div class="header-box">联系人信息</div>
- <div class="add-form-group">
- <label class="control-label">姓名</label>
- <div class="input-right">
- <input type="text" name="name" value="" placeholder="请输入">
- </div>
- </div>
- <div class="add-form-group">
- <label class="control-label">电话</label>
- <div class="input-right">
- <input type="text" name="phone" value="" placeholder="请输入">
- </div>
- </div>
- </div>
- <!-- <button type="submit" target-form="form-horizontal" class="add-btn ajax-post" >提交</button>-->
- <div class="add-btn" id="addBtn">提交</div>
- </form>
- </div>
- {if $mode == 2}
- <div class="add-table-record-box">
- <table class="table table-bordered">
- <tbody>
- {if isset($list)}
- {foreach $list as $k=>$v}
- <tr>
- <td>{$v['create_time']}</td>
- <td>{$v['addrName']}</td>
- <td>{$v['content']}</td>
- <td>{$v['statusTxt']}({$v['userName']})</td>
- </tr>
- {/foreach}
- {/if}
- </tbody>
- </table>
- </div>
- {/if}
- </body>
- </html>
- <script>
- $('#addBtn').click(function (){
- $.ajax({
- type: "POST",
- dataType: "json",
- url: '{:url("repair/add")}' ,
- data: $('#form').serialize(),
- success: function (res) {
- if (res.code == 1) {
- layer.msg('操作成功',{time:2000},function (){
- window.location.href = "{:url('addSuccess')}";
- })
- }else{
- layer.msg(res.msg,{time:2000},)
- }
- },
- error : function() {
- layer.msg('网络异常')
- }
- });
- })
- </script>
|