123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using CommonToolHelper;
- @{
- ViewBag.Title = "经销商信息";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @model PageInfo
- <style>
- body {
- height: auto;
- }
- .pad {
- margin: 10px 20px 10px 0px;
- }
- .tab-pane .form-group .under {
- border-bottom: 1px solid #ccc;
- min-height: 18px;
- float: left;
- margin-top: 7px;
- }
- .tab-pane .form-group .col-sm-1 {
- width: 15%;
- }
- </style>
- <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="add"><i class="im-plus"></i> 创建经销商</a>
- <a class="btn btn-primary btn-xs p310" id="modify" action="edit"><i class="im-pencil2"></i> 编辑</a>
- <a class="btn btn-primary btn-xs p310" id="delete" action="remove"><i class="im-remove4"></i> 删除</a>
- </div>*@
- </div>
- <div class="ibox-content">
- <!-- search star -->
- @using (Ajax.BeginForm("Index", null, new AjaxOptions() { }, new { @id = "form1", @class = "form-horizontal", @method = "get" }))
- {
- <div class="form-horizontal clearfix">
- <div class="col-lg-4 col-sm-4" style="width: 28%;float:right;">
- <div class="form-group">
- <div class="col-lg-12 col-sm-12 input-group" style="float:right;">
- @Html.TextBox("Search", null, new { @class = "input-sm form-control", @placeholder = "请输入农机名称查询" })
- <span class="input-group-btn">
- <button type="button" onclick="submit()" class="btn btn-sm btn-primary">搜索</button>
- </span>
- </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="10%">报修农机</th>
- <th width="15%">IMEI号</th>
- <th width="25%">报修电话</th>
- <th>报修人</th>
- <th>报修时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- @{
- if (Model != null)
- {
- foreach (var item in Model.List)
- {
- <tr>
- <td class="tn"><input name="checkbox_name" type="checkbox" value="@item.ID"></td>
- <td>@item.CODE</td>
- <td style="text-align:left">@HttpUtility.HtmlDecode(item.NAME)</td>
- <td>@item.Address</td>
- <td>@item.CREATEPERID</td>
- <td>@item.CREATEDATE</td>
- @{ if (item.BUSINESSLEVEL == 1)
- {
- <td></td>
- }
- else
- {
- <td><a href="javascript:carview('@item.ID')" listaction="detail">查看报修详情</a></td>
- }
- }
- </tr>
- }
- }
- }
- </tbody>
- </table>
- <!-- page -->
- <div class="bottom">
- <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>
- @section scripts{
- <script type="text/javascript">
- //查看正在发往的农机
- function carview(n) {
- dig.addModel('查看/农机', '/Sys/car/DistributorCarList?distributorsid=' + n, 1000, 700, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- }
- //列表增加
- $("#insert").click(function () {
- dig.addModel("添加/编辑经销商", "/Sys/Department/detail", 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //分配岗位
- $('#allocation').click(function () {
- dig.addModel('分配岗位', '/Sys/Post/PostCall?dptId=' + $('#dptId').val(), 500, 400, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //添加子部门
- $('#iChild').click(function () {
- dig.addModel("添加下级经销商", "/Sys/Department/detail?parentId=" + $('#dptId').val(), 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //列表选择修改
- //$('#modify').click(function () {
- // dig.addModel("添加/编辑经销商", "/Sys/Department/detail/" + $('#dptId').val(), 700, 300, function () {
- // if (this.returnValue == 'yes') {
- // location.reload();
- // }
- // });
- //});
- //点击修改
- function modify(n) {
- dig.addModel('添加/编辑车型', '/Sys/Department/Detail/' + n, 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- }
- //修改
- $('#modify').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/Department/Detail/' + vals, 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //删除
- $('#delete').click(function () {
- var vals = $('#dptId').val();
- if (vals == '' || vals == ',') {
- dig.alertError("提示", "对不起,请选中您要操作的记录!");
- return;
- }
- var msg = "删除记录后不可恢复,您确定吗?";
- dig.confirm("删除确认", msg, function () {
- $.post('/Sys/Department/Delete', { idList: vals }, function (res) {
- if (res.Status == "y") {
- dig.alertSuccess('提示', '删除成功', function () {
- location.reload();
- });
- } else {
- dig.alertError("提示", res.Msg);
- }
- }, "json");
- });
- });
- </script>
- }
|