DuGuYang 3 年之前
父節點
當前提交
77a8ad8750

+ 5 - 9
Areas/Admin/Controllers/MainServer/RecycMachineOrderController.cs

@@ -66,17 +66,12 @@ namespace MySystem.Areas.Admin.Controllers
             //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
-                condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
-            }
-            //创客真实姓名
-            if (!string.IsNullOrEmpty(UserIdRealName))
-            {
-                condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             //退回仓库编号
             if (!string.IsNullOrEmpty(RecycStoreIdStoreNo))
             {
-                condition += " and RecycStoreId in (select RecycStoreId from StoreHouseForStoreNo where StoreNo='" + RecycStoreIdStoreNo + "')";
+                condition += " and RecycStoreId in (select StoreId from StoreForCode where Code='" + RecycStoreIdStoreNo + "')";
             }
             //寄回方式
             if (!string.IsNullOrEmpty(PostTypeSelect))
@@ -119,6 +114,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (PostType == 1) dic["PostType"] = "邮寄";
                 if (PostType == 2) dic["PostType"] = "送货上门";
                 if (PostType == 0) dic["PostType"] = "";
+                dic["BrandId"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["BrandId"].ToString()));
 
             }
             return Json(obj);
@@ -349,12 +345,12 @@ namespace MySystem.Areas.Admin.Controllers
             //创客创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
-                condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             //创客真实姓名
             if (!string.IsNullOrEmpty(UserIdRealName))
             {
-                condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
             }
             //退回仓库仓库编号
             if (!string.IsNullOrEmpty(RecycStoreIdStoreNo))

+ 8 - 4
Areas/Admin/Controllers/MainServer/RecycMachineOrderPosController.cs

@@ -52,7 +52,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 机具回收明细列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(RecycMachineOrderPos data, string OrderIdSelect, string CreateDateData, string BrandIdSelect, string StatusSelect, int page = 1, int limit = 30)
+        public JsonResult IndexData(RecycMachineOrderPos data, string OrderNo, string CreateDateData, string BrandIdSelect, string StatusSelect, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -70,10 +70,11 @@ namespace MySystem.Areas.Admin.Controllers
                 string end = datelist[1];
                 condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
             }
-            //申请订单Id
-            if (!string.IsNullOrEmpty(OrderIdSelect))
+            //申请订单
+            if (!string.IsNullOrEmpty(OrderNo))
             {
-                condition += " and OrderId=" + OrderIdSelect;
+                var recycMachineOrder = db.RecycMachineOrder.FirstOrDefault(m => m.RecycOrderNo == OrderNo) ?? new RecycMachineOrder();
+                condition += " and OrderId=" + recycMachineOrder.Id;
             }
             //机具品牌
             if (!string.IsNullOrEmpty(BrandIdSelect))
@@ -101,6 +102,9 @@ namespace MySystem.Areas.Admin.Controllers
                 if (Status == 1) dic["Status"] = "已确认";
                 if (Status == 2) dic["Status"] = "驳回";
 
+                int OrderId = int.Parse(dic["OrderId"].ToString());
+                var recycMachineOrder = db.RecycMachineOrder.FirstOrDefault(m => m.Id == OrderId) ?? new RecycMachineOrder();
+                dic["OrderNo"] = recycMachineOrder.RecycOrderNo;
             }
             return Json(obj);
         }

+ 0 - 6
Areas/Admin/Views/MainServer/RecycMachineOrder/Index.cshtml

@@ -50,12 +50,6 @@
                             <input class="layui-input" type="text" name="UserIdMakerCode" autocomplete="off">
                         </div>
                     </div>
-                    <div class="layui-inline">
-                        <label class="layui-form-label">创客真实姓名</label>
-                        <div class="layui-input-inline">
-                            <input class="layui-input" type="text" name="UserIdRealName" autocomplete="off">
-                        </div>
-                    </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">创建时间</label>
                         <div class="layui-input-inline">

+ 3 - 5
Areas/Admin/Views/MainServer/RecycMachineOrderPos/Index.cshtml

@@ -46,11 +46,9 @@
             <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                 <div class="layui-form-item">
                     <div class="layui-inline">
-                        <label class="layui-form-label">申请订单Id</label>
+                        <label class="layui-form-label">申请订单</label>
                         <div class="layui-input-inline">
-                            <select id="OrderIdSelect" name="OrderIdSelect" lay-search="">
-                                <option value="">全部...</option>
-                            </select>
+                            <input class="layui-input" type="text" name="OrderNo" placeholder="" autocomplete="off">
                         </div>
                     </div>
                     <div class="layui-inline">
@@ -67,7 +65,7 @@
                         </div>
                     </div>
                     <div class="layui-inline">
-                        <label class="layui-form-label">激活状态</label>
+                        <label class="layui-form-label">状态</label>
                         <div class="layui-input-inline">
                             <select id="StatusSelect" name="StatusSelect" lay-search="">
                                 <option value="">全部...</option>

+ 7 - 4
wwwroot/layuiadmin/modules_main/RecycMachineOrderPos_Admin.js

@@ -93,13 +93,16 @@ layui.config({
             { type: 'checkbox', fixed: 'left' }
             , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'UpdateDate', width: 200, title: '最后操作时间', sort: true }
+            , { field: 'Status', width: 200, title: '状态', sort: true }
+            , { field: 'OrderNo', width: 200, title: '订单号', sort: true }
             , { field: 'SnNo', width: 200, title: '机具SN', sort: true }
-            , { field: 'ResultDate', width: 200, title: '确认或驳回时间', sort: true }
-            , { field: 'CancelDate', width: 200, title: '创客撤销时间', sort: true }
+            // , { field: 'ResultDate', width: 200, title: '确认或驳回时间', sort: true }
+            // , { field: 'CancelDate', width: 200, title: '创客撤销时间', sort: true }
             , { field: 'BrandId', width: 200, title: '机具品牌', sort: true }
 
-            , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
-            , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
+            // , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
             OrderId: OrderId

+ 5 - 3
wwwroot/layuiadmin/modules_main/RecycMachineOrder_Admin.js

@@ -95,17 +95,19 @@ layui.config({
             , { field: 'UserIdMakerCode', width: 200, title: '创客编号', sort: true }
             , { field: 'UserIdRealName', width: 200, title: '创客真实姓名', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'UpdateDate', width: 200, title: '最后操作时间', sort: true }
+            , { field: 'BrandId', width: 200, title: '品牌', sort: true }
             , { field: 'RecycStoreIdStoreNo', width: 200, title: '退回仓库编号', sort: true }
             , { field: 'RecycStoreIdStoreName', width: 200, title: '退回仓库名称', sort: true }
             , { field: 'RecycStoreIdManageMobile', width: 200, title: '退回仓库管理者手机号', sort: true }
             , { field: 'PostType', width: 200, title: '寄回方式', sort: true }
             , { field: 'ErpName', width: 200, title: '快递名称', sort: true }
             , { field: 'ErpCode', width: 200, title: '快递单号', sort: true }
-            , { field: 'ResultDate', width: 200, title: '确认或驳回时间', sort: true }
-            , { field: 'CancelDate', width: 200, title: '创客撤销时间', sort: true }
+            // , { field: 'ResultDate', width: 200, title: '确认或驳回时间', sort: true }
+            // , { field: 'CancelDate', width: 200, title: '创客撤销时间', sort: true }
             , { field: 'RecycOrderNo', width: 200, title: '申请单号', sort: true }
 
-            , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
+            // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
             , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {