123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- @{
- ViewBag.Title = "赛事报名";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using Ant.Service.Common.Enums;
- @using CommonToolHelper;
- @using MES.Production.Entity;
- @using ChangFa.Machinery.WebPage.Areas;
- @using ChangFa.Machinery.WebPage.Areas.SysManage.Controllers;
- @model PageInfo
- <!-- table star -->
- <div class="row col-lg-12">
- <div class="wrapper wrapper-content animated fadeInUp">
- <div class="ibox">
- <div class="ibox-title">
- <h5>资格审查</h5>
- <div class="ibox-tools rboor">
- @*<a class="btn btn-primary btn-xs p310" id="insert" action="edit"><i class="im-pencil2"></i> 导出</a>*@
- </div>
- </div>
- <div class="ibox-content">
- <!-- search star -->
- @using (Ajax.BeginForm("EventScheduling", null, new AjaxOptions() { }, new { @id = "form1", @class = "form-horizontal", @method = "get" }))
- {
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">查询条件</h3>
- </div>
- <div class="panel-body">
- <div class="clearfix f-hafl">
- <div class="row">
- <div class="col-xs-6 col-md-4">
- <label class="col-lg-0 control-label" style="float:left;">赛事名称:</label>
- <div class="col-lg-8 col-sm-7">
- @Html.TextBox("nameOrProject", ViewData["nameOrProject"], new { @class = "input-sm form-control", @placeholder = "请输入赛事名称" })
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <label class="col-lg-0 control-label" style="float:left;"></label>
- <div class="col-lg-9 col-sm-7">
- <button type="button" onclick="submit()" class="btn btn-primary btn-sm active"><i class="im-search"></i> 搜 索</button>
- </div>
- </div>
- </div>
- <div class="clearfix f-hafl">
- <div class="col-lg-2 col-sm-3 pl0">
- <div class="form-group">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- search end -->
- <div id="example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
- <table id="example" class="table table-striped table-bordered table-hover dataTables-example dataTable" cellspacing="0" width="100%">
- <thead>
- <tr>
- <th class="tn" style="width: 40px !important"><input name="checkall" id="checkall" type="checkbox" value=""></th>
- <th width="20%">赛事名称</th>
- <th width="10%">比赛时间</th>
- <th width="20%">赛事地址</th>
- <th width="8%">比赛项目</th>
- <th width="6%">有效性</th>
- <th width="6%">操作</th>
- @*<th width="8%">参赛条件</th>*@
- </tr>
- </thead>
- <tbody>
- @{foreach (var item in Model.List)
- {
- <tr>
- <td class="tn"><input name="checkbox_name" type="checkbox" value="@item.ID"></td>
- <td>
- <a listaction="detail">@item.Name</a>
- </td>
- <td>从@(Convert.ToDateTime(item.EventStartTime).ToString("MM月dd日"))至@(Convert.ToDateTime(item.EventEndTime).ToString("dd日"))</td>
- <td>@item.EventAddress</td>
- <td>@item.RaceProject</td>
- <td>@(((SportsEventController.Status)item.State).ToString())</td>
- <td>
- <a class="btn btn-primary btn-xs p310 exportExecl"><i class="im-pencil2"></i> 导出</a>
- </td>
- </tr>
- }
- }
- </tbody>
- </table>
- <!-- page -->
- <div class="bottom">
- @if (Model != null)
- {
- <div class="dataTables_info" id="example_info" Post="status" aria-live="polite">显示第 @Model.BeginPage 至 @Model.EndPage 项结果,共 @Model.Count 项</div>
- <div class="dataTables_length" id="example_length">
- <label>
- 显示
- <select name="example_length" onchange="submit()" aria-controls="example" class="form-control input-sm">
- <option value="10" @(Model.PageSize == 10 ? "selected" : "")>10</option>
- <option value="25" @(Model.PageSize == 25 ? "selected" : "")>25</option>
- <option value="50" @(Model.PageSize == 50 ? "selected" : "")>50</option>
- <option value="100" @(Model.PageSize == 100 ? "selected" : "")>100</option>
- </select> 项结果
- </label>
- </div>
- @CommonHtmlHelper.PaginationPager(Model.Index, Model.PageSize, Model.Count, 7, Model.Url);
- }
- <div class="clear"></div>
- </div>
- <!-- page -->
- </div>
- }
- </div>
- </div>
- </div>
- </div>
- <!-- table end -->
- @section scripts{
- <script type="text/javascript">
- //点击修改
- //function modify(n) {
- // dig.addModel('添加/修改赛事', '/Sys/Car/CarLockList/' + n,900, 600, function () {
- // if (this.returnValue == 'yes') {
- // location.reload();
- // }
- // });
- //}
- $(function () {
- $('.select2').select2();
- //添加
- //$('#insert').click(function () {
- // dig.addModel('仪表保养提醒', '/Sys//Car/CarLockList/', 900, 600, function () {
- // if (this.returnValue == 'yes') {
- // location.reload();
- // }
- // });
- //});
- //修改
- $('#insert').click(function () {
- var vals = '';
- var num = 0;
- $('input[name="checkbox_name"]:checked').each(function () {
- vals = $(this).val();
- num++;
- });
- if (!vals) {
- dig.alertError("提示", "对不起,请选中您要操作的记录!");
- return;
- }
- if (num > 1) {
- dig.alertError("提示", "对不起,每次只能选择一条赛事进行报名!");
- return;
- }
- dig.addModel('参赛报名', '/Sys/SportsEvent/GetQualificationsExecl/' + vals, 900, 600, true, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //删除
- $('#delete').click(function () {
- var vals = '';
- var num = 0;
- $('input[name="checkbox_name"]:checked').each(function () {
- if (num == 0)
- vals = $(this).val();
- else
- vals = vals + ',' + $(this).val();
- num++;
- });
- //var vals = $('input[name="checkbox_name"]').val();
- if (vals == '' || vals == ',') {
- dig.alertError("提示", "对不起,请选中您要操作的记录!");
- return;
- }
- //alert(vals);
- var msg = "删除记录后不可恢复,您确定吗?";
- dig.confirm("删除确认", msg, function () {
- $.post('/Sys/SportsEvent/Delete', { idList: vals }, function (res) {
- if (res.Status == "y") {
- dig.alertSuccess('提示', '删除成功', function () {
- location.reload();
- });
- } else {
- dig.alertError("提示", res.Msg);
- }
- }, "json");
- });
- });
- //导出
- $('.exportExecl').click(function () {
- window.location.href = "/Sys/SportsEvent/GetQualificationsExecl/?id=" + $(this).parent().parent().find("input:checkbox").val() + "&rnd=" + Math.random();
- });
- });
- </script>
- }
|