Преглед на файлове

修改费率调整后台筛选和默认显示
修改机具循环开始时间

DuGuYang преди 3 години
родител
ревизия
19acf1b5e2

+ 11 - 3
Areas/Admin/Controllers/MainServer/PosMachinesFeeChangeRecordController.cs

@@ -51,7 +51,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 机具费率调整申请列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(PosMachinesFeeChangeRecord data, string UserIdMakerCode, string UserIdRealName, string PosUserIdMakerCode, string PosUserIdRealName, string StatusSelect = "2", int page = 1, int limit = 30)
+        public JsonResult IndexData(PosMachinesFeeChangeRecord data, string UserIdMakerCode, string UserIdRealName, string PosUserIdMakerCode, string PosUserIdRealName, string SortSelect = "1", string StatusSelect = "2", int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -84,10 +84,18 @@ namespace MySystem.Areas.Admin.Controllers
                 condition += " and PosUserId in (select PosUserId from UsersForRealName where RealName='" + PosUserIdRealName + "')";
             }
             //品牌
-            if (data.Sort > 0)
+            if (!string.IsNullOrEmpty(SortSelect))
             {
-                condition += " and Sort = " + data.Sort;
+                condition += " and Sort = " + Convert.ToInt32(SortSelect);
             }
+            // if (data.Sort > 0)
+            // {
+            //     condition += " and Sort = " + data.Sort;
+            // }
+            // if (data.Sort == 0)
+            // {
+            //     condition += " and Sort = 1";
+            // }
             if (!string.IsNullOrEmpty(StatusSelect))
             {
                 if (Convert.ToInt32(StatusSelect) > 0)

+ 11 - 3
Areas/Admin/Controllers/MainServer/PosMachinesTwoChangeController.cs

@@ -51,7 +51,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 机具库列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(PosMachinesTwo data, string BindingStateSelect, string ActivationStateSelect, string UserIdMakerCode, string UserIdRealName, string StoreIdCode, string StoreIdName, string ActivationDateData, string BindingDateData, string UpFeeFlagSelect = "0", int page = 1, int limit = 30)
+        public JsonResult IndexData(PosMachinesTwo data, string BindingStateSelect, string ActivationStateSelect, string UserIdMakerCode, string UserIdRealName, string StoreIdCode, string StoreIdName, string ActivationDateData, string BindingDateData, string BrandSelect = "1", string UpFeeFlagSelect = "0", int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -91,10 +91,18 @@ namespace MySystem.Areas.Admin.Controllers
                 condition += " and StoreId in (select StoreId from StoreForName where Name='" + StoreIdName + "')";
             }
             //品牌
-            if (data.BrandId > 0)
+            if (!string.IsNullOrEmpty(BrandSelect))
             {
-                condition += " and BrandId = " + data.BrandId;
+                condition += " and BrandId = " + Convert.ToInt32(BrandSelect);
             }
+            // if (data.BrandId > 0)
+            // {
+            //     condition += " and BrandId = " + data.BrandId;
+            // }
+            // if (data.BrandId == 0)
+            // {
+            //     condition += " and BrandId = 1";
+            // }
             if (!string.IsNullOrEmpty(UpFeeFlagSelect))
             {
                 condition += " and UpFeeFlag = " + UpFeeFlagSelect;

+ 1 - 1
Areas/Admin/Controllers/MainServer/PosMachinesTwoController.cs

@@ -173,7 +173,7 @@ namespace MySystem.Areas.Admin.Controllers
                 //循环开始时间
                 if (!string.IsNullOrEmpty(dic["RecycEndDate"].ToString()))
                 {
-                    var RecycStartDate = Convert.ToDateTime(dic["RecycEndDate"].ToString()).AddMonths(-3).ToString("yyyy-MM-dd HH:mm:ss");
+                    var RecycStartDate = Convert.ToDateTime(dic["RecycEndDate"].ToString()).AddDays(-180).ToString("yyyy-MM-dd HH:mm:ss");
                     dic["RecycStartDate"] = RecycStartDate;
                 }
 

+ 2 - 2
Areas/Admin/Views/MainServer/PosMachinesFeeChangeRecord/Index.cshtml

@@ -94,11 +94,11 @@
                     <div class="layui-inline">
                         <label class="layui-form-label">品牌</label>
                         <div class="layui-input-inline">
-                            <select id="Sort" name="Sort" lay-search="">
+                            <select id="SortSelect" name="SortSelect" lay-search="">
                                 <option value="">全部...</option>
                                 @foreach (string key in ProfitObjectsActivesDic.Keys)
                                 {
-                                    <option value="@key" @(key == "1" ? "selected=selected" : "")>@ProfitObjectsActivesDic[key]</option>
+                                    <option value="@key" @(key == "1" ? "selected" : "")>@ProfitObjectsActivesDic[key]</option>
                                 }
                             </select>
                         </div>

+ 2 - 2
Areas/Admin/Views/MainServer/PosMachinesTwoChange/Index.cshtml

@@ -125,11 +125,11 @@
                     <div class="layui-inline">
                         <label class="layui-form-label">品牌</label>
                         <div class="layui-input-inline">
-                            <select id="BrandId" name="BrandId" lay-search="">
+                            <select id="BrandSelect" name="BrandSelect" lay-search="">
                                 <option value="">全部...</option>
                                 @foreach (string key in ProfitObjectsActivesDic.Keys)
                                 {
-                                    <option value="@key" @(key == "1" ? "selected=selected" : "")>@ProfitObjectsActivesDic[key]</option>
+                                    <option value="@key" @(key == "1" ? "selected" : "")>@ProfitObjectsActivesDic[key]</option>
                                 }
                             </select>
                         </div>