“DuGuYang” 4 年之前
父節點
當前提交
24a81125a1

+ 7 - 8
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -243,7 +243,7 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
                             {
-                                UserId = user.Id, //接收创客
+                                UserId = pos.Id, //接收创客
                                 MsgType = 2,
                                 Title = "补录成功通知", //标题
                                 Summary = "您的 " + kqProducts.Name + " SN:" + pos.PosSn + "已经成功补录,请查收。",
@@ -1464,7 +1464,7 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
                 {
-                    UserId = forMakerCode.UserId, //接收创客
+                    UserId = pos.UserId, //接收创客
                     MsgType = 2,
                     Title = "解绑成功通知", //标题
                     Summary = "" + PosSn + "机具已成功解绑,当前机具如需绑定同一客户请再2个工作日后再进行绑定,直接绑定会导致数控异常,相关损失由您本人承担。",
@@ -1536,7 +1536,7 @@ namespace MySystem.Areas.Admin.Controllers
         #region 机具循环列表
 
         /// <summary>
-        /// 根据条件查询创客列表
+        /// 根据条件查询机具循环列表
         /// </summary>
         /// <returns></returns>
         public IActionResult Index(string right, string SwapSnExpand, string SnNos)
@@ -1585,7 +1585,7 @@ namespace MySystem.Areas.Admin.Controllers
                     dataList.Add(data);
                 }
             }
-            return View();
+            return View(dataList);
         }
 
         #endregion
@@ -1593,7 +1593,7 @@ namespace MySystem.Areas.Admin.Controllers
         #region 根据条件查询机具循环列表
 
         /// <summary>
-        /// 创客列表
+        /// 机具循环列表
         /// </summary>
         /// <returns></returns>
 
@@ -1608,7 +1608,7 @@ namespace MySystem.Areas.Admin.Controllers
 
             if (!string.IsNullOrEmpty(SwapSnExpand))
             {
-                machineApplie = db.MachineApply.Where(m => m.Status > -1 && m.SwapSnExpand.Contains(SwapSnExpand)).ToList();
+                machineApplie = machineApplie.Where(m => m.SwapSnExpand.Contains(SwapSnExpand)).ToList();
                 foreach (var item in machineApplie)
                 {
                     var orders = db.Orders.FirstOrDefault(m => m.Sort == item.Id && m.Id == item.QueryCount);
@@ -1626,7 +1626,7 @@ namespace MySystem.Areas.Admin.Controllers
             }
             else if (!string.IsNullOrEmpty(SnNos))
             {
-                machineApplie = db.MachineApply.Where(m => m.Status > -1 && m.SwapSnExpand.Contains(SnNos)).ToList();
+                machineApplie = machineApplie.Where(m => m.SwapSnExpand.Contains(SnNos)).ToList();
                 foreach (var item in machineApplie)
                 {
                     var orders = db.Orders.FirstOrDefault(m => m.Sort == item.Id && m.Id == item.QueryCount);
@@ -1644,7 +1644,6 @@ namespace MySystem.Areas.Admin.Controllers
             }
             else
             {
-                machineApplie = db.MachineApply.Where(m => m.Status > -1).ToList();
                 foreach (var item in machineApplie)
                 {
                     var orders = db.Orders.FirstOrDefault(m => m.Sort == item.Id && m.Id == item.QueryCount);

+ 4 - 8
Areas/Admin/Views/MainServer/SysTools/Loop.cshtml

@@ -47,13 +47,13 @@
                         <div class="layui-inline">
                             <label class="layui-form-label">来源机具SN</label>
                             <div class="layui-input-inline">
-                                <input class="layui-input" type="text" name="MakerCode" value="@MakerCode" autocomplete="off">
+                                <input class="layui-input" type="text" name="ComeSn" id="ComeSn" autocomplete="off">
                             </div>
                         </div>
                         <div class="layui-inline">
                             <label class="layui-form-label">发货机具SN</label>
                             <div class="layui-input-inline">
-                                <input class="layui-input" type="text" name="MakerCode" value="@MakerCode" autocomplete="off">
+                                <input class="layui-input" type="text" name="SendSn" id="SendSn" autocomplete="off">
                             </div>
                         </div>
                     </div>
@@ -61,14 +61,10 @@
             </div>
 
             <div class="layui-card-body">
-
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
-                <script type="text/html" id="imgTpl">
-                    <img style="display: inline-block; width: 50%; height: 100%;" src={{ d.avatar }}>
-                </script>
                 <script type="text/html" id="MakerCodeTpl">
-                    <a lay-href="/Admin/SysTools/Loop?right=@right&SwapSnExpand=@("{{d.SnNos}}")" lay-text="{{d.MakerCode}}发货机信息" style="color: #428bca;">{{d.SwapSnExpand}}</a>
-                    <a lay-href="/Admin/SysTools/Loop?right=@right&SnNos=@("{{d.SwapSnExpand}}")" lay-text="{{d.MakerCode}}申请机信息" style="color: #428bca;">{{d.SnNos}}</a>
+                    <a lay-href="/Admin/SysTools/Loop?right=@right&SwapSnExpand=@("{{d.SnNos}}")" lay-text="发货机信息" style="color: #428bca;">{{d.SwapSnExpand}}</a>
+                    <a lay-href="/Admin/SysTools/Loop?right=@right&SnNos=@("{{d.SwapSnExpand}}")" lay-text="申请机信息" style="color: #428bca;">{{d.SnNos}}</a>
                 </script>
             </div>
         </div>

+ 30 - 34
wwwroot/layuiadmin/modules_main/SysTools_Admin.js

@@ -1,35 +1,31 @@
+//列表数据
+table.render({
+    elem: '#LAY-list-manage'
+    , url: '/Admin/SysTools/IndexData' //模拟接口
+    , cols: [[
+        { type: 'checkbox', fixed: 'left' }
+        , { field: 'ApplyNo', width: 200, title: '申请订单号', sort: true }
+        , { field: 'OrderNo', width: 200, title: '订单号', sort: true }
+        , { field: 'MakerCode', width: 200, title: '创客编号', sort: true }
+        , { field: 'RealName', width: 200, title: '创客姓名', sort: true }
+        , { field: 'ComeSn', width: 200, title: '来源机具SN', sort: true, templet: '#MakerCodeTpl' }
+        , { field: 'SendSn', width: 200, title: '发货SN', sort: true, templet: '#MakerCodeTpl' }
+        , { field: 'CreateDate', width: 200, title: '申请时间', sort: true }
+        , { field: 'Status', width: 200, title: '申请状态', sort: true }
+        , { title: '操作', width: 1500, align: 'left', toolbar: '#table-list-tools' }
+    ]]
+    , where: {
+    }
+    , page: true
+    , limit: 30
+    , height: 'full-' + String($('.layui-card-header').height() + 130)
+    , text: '对不起,加载出现异常!'
+    , done: function (res, curr, count) {
+        $(".layui-none").text("无数据");
+    }
+});
 
-
-    //列表数据
-    table.render({
-        elem: '#LAY-list-manage'
-        , url: '/Admin/SysTools/IndexData' //模拟接口
-        , cols: [[
-            { type: 'checkbox', fixed: 'left' }
-            , { field: 'ApplyNo', width: 200, title: '申请订单号', sort: true }
-            , { field: 'OrderNo', width: 200, title: '订单号', sort: true }
-            , { field: 'MakerCode', width: 200, title: '创客编号', sort: true}
-            , { field: 'RealName', width: 200, title: '创客姓名', sort: true }
-            , { field: 'ComeSn', width: 200, title: '来源机具SN', sort: true, templet: '#MakerCodeTpl'}
-            , { field: 'SendSn', width: 200, title: '发货SN', sort: true, templet: '#MakerCodeTpl'}
-            , { field: 'CreateDate', width: 200, title: '申请时间', sort: true }
-            , { field: 'Status', width: 200, title: '申请状态', sort: true }
-            , { title: '操作', width: 1500, align: 'left', toolbar: '#table-list-tools' }
-        ]]
-        , where: {
-        }
-        , page: true
-        , limit: 30
-        , height: 'full-' + String($('.layui-card-header').height() + 130)
-        , text: '对不起,加载出现异常!'
-        , done: function (res, curr, count) {
-            $(".layui-none").text("无数据");
-        }
-    });
-
-    
-
-    $('.layui-btn').on('click', function () {
-        var type = $(this).data('type');
-        active[type] ? active[type].call(this) : '';
-    });
+$('.layui-btn').on('click', function () {
+    var type = $(this).data('type');
+    active[type] ? active[type].call(this) : '';
+});