Просмотр исходного кода

Merge branch 'feature-dgy-BUG修复' into feature-dgy-后台测试

# Conflicts:
#	AppStart/RelationClassForConst.cs
#	Areas/Admin/Views/Home/Login.cshtml
#	Areas/Admin/Views/MainServer/UserAccountRecord/Index.cshtml
DuGuYang 3 лет назад
Родитель
Сommit
cfd19e6e81
22 измененных файлов с 247 добавлено и 105 удалено
  1. 26 0
      AppStart/RelationClassForConst.cs
  2. 48 48
      Areas/Admin/Controllers/HomeController.cs
  3. 17 0
      Areas/Admin/Controllers/MainServer/LeaderReserveRecordController.cs
  4. 15 7
      Areas/Admin/Controllers/MainServer/StoreHouseAmountRecordController.cs
  5. 27 0
      Areas/Admin/Controllers/MainServer/SysToolsController.cs
  6. 77 27
      Areas/Admin/Controllers/MainServer/UserAccountRecordController.cs
  7. 2 2
      Areas/Admin/Views/Home/Login.cshtml
  8. 1 1
      Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexfs.cshtml
  9. 1 1
      Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexnfs.cshtml
  10. 1 1
      Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexrg.cshtml
  11. 4 4
      Areas/Admin/Views/MainServer/StoreHouseAmountRecord/Index.cshtml
  12. 2 2
      Areas/Admin/Views/MainServer/SysRechargeRecord/Index.cshtml
  13. 15 1
      Areas/Admin/Views/MainServer/UserAccountRecord/Index.cshtml
  14. 1 1
      wwwroot/layuiadmin/modules_main/LeaderReserveRecord_Admin.js
  15. 1 1
      wwwroot/layuiadmin/modules_main/MerchantDepositReturns_Admin.js
  16. 1 1
      wwwroot/layuiadmin/modules_main/MerchantDepositReturnsn_Admin.js
  17. 1 1
      wwwroot/layuiadmin/modules_main/PosMerchantInfofsList_Admin.js
  18. 1 1
      wwwroot/layuiadmin/modules_main/PosMerchantInfonfsList_Admin.js
  19. 2 2
      wwwroot/layuiadmin/modules_main/PosMerchantInforgList_Admin.js
  20. 2 2
      wwwroot/layuiadmin/modules_main/StoreHouseAmountRecord_Admin.js
  21. 1 1
      wwwroot/layuiadmin/modules_main/SysRechargeRecord_Admin.js
  22. 1 1
      wwwroot/layuiadmin/modules_main/ToChargeBackRecord_Admin.js

+ 26 - 0
AppStart/RelationClassForConst.cs

@@ -66,6 +66,12 @@ namespace MySystem
                 case 64:
                     result = "系统奖励";
                     break;
+                case 65:
+                    result = "押金暂扣";
+                    break;
+                case 66:
+                    result = "押金退还";
+                    break;
                 case 7:
                     result = "系统扣除";
                     break;
@@ -123,6 +129,18 @@ namespace MySystem
                 case 119:
                     result = "分仓临时额度退还";
                     break;
+                case 120:
+                    result = "运营中心(购机奖励)";
+                    break;
+                case 121:
+                    result = "运营中心奖励";
+                    break;
+                case 122:
+                    result = "推荐大盟主奖励";
+                    break;
+                case 123:
+                    result = "推荐小盟主奖励";
+                    break;
                 case 124:
                     result = "扣机具货款";
                     break;
@@ -132,8 +150,16 @@ namespace MySystem
                 case 126:
                     result = "机具货款退还";
                     break;
+<<<<<<< HEAD
                 case 130:
                     result = "预发临时额度退还";
+=======
+                case 201:
+                    result = "分期预扣款";
+                    break;
+                case 202:
+                    result = "创客预扣款";
+>>>>>>> feature-dgy-BUG修复
                     break;
             }
             return result;

+ 48 - 48
Areas/Admin/Controllers/HomeController.cs

@@ -149,60 +149,60 @@ namespace MySystem.Areas.Admin.Controllers
         [HttpPost]
         public string Login(string UserName, string Pwd, string CheckCode)
         {
-            // string result = "";
-            // if (function.GetCookie(_accessor.HttpContext, "checkcode") != CheckCode)
-            // {
-            //     result = "验证码错误!!";
-            // }
-            // else
-            // {
-            //     Pwd = function.MD5_32(Pwd);
-            //     var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
-            //     if (user != null)
-            //     {
-            //         user.LastLoginDate = DateTime.Now;
-            //         db.SaveChanges();
-            //         function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
-            //         function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
-            //         function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
-            //         int RoleId = int.Parse(function.CheckInt(user.Role));
-            //         BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
-            //         string RightInfo = function.CheckNull(Role.RightInfo);
-            //         function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
-            //         string UserId = user.Id.ToString();
-            //         function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
-            //         function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
-            //         result = "success";
-            //     }
-            //     else
-            //     {
-            //         result = "用户名或密码错误";
-            //     }
-            // }
-
             string result = "";
-            Pwd = function.MD5_32(Pwd);
-            var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
-            if (user != null)
+            if (function.GetCookie(_accessor.HttpContext, "checkcode") != CheckCode)
             {
-                user.LastLoginDate = DateTime.Now;
-                db.SaveChanges();
-                function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
-                function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
-                function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
-                int RoleId = int.Parse(function.CheckInt(user.Role));
-                BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
-                string RightInfo = function.CheckNull(Role.RightInfo);
-                function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
-                string UserId = user.Id.ToString();
-                function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
-                function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
-                result = "success";
+                result = "验证码错误!!";
             }
             else
             {
-                result = "用户名或密码错误";
+                Pwd = function.MD5_32(Pwd);
+                var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
+                if (user != null)
+                {
+                    user.LastLoginDate = DateTime.Now;
+                    db.SaveChanges();
+                    function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
+                    function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
+                    function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
+                    int RoleId = int.Parse(function.CheckInt(user.Role));
+                    BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
+                    string RightInfo = function.CheckNull(Role.RightInfo);
+                    function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
+                    string UserId = user.Id.ToString();
+                    function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
+                    function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
+                    result = "success";
+                }
+                else
+                {
+                    result = "用户名或密码错误";
+                }
             }
+
+            // string result = "";
+            // Pwd = function.MD5_32(Pwd);
+            // var user = db.SysAdmin.FirstOrDefault(m => m.AdminName == UserName && m.Password == Pwd);
+            // if (user != null)
+            // {
+            //     user.LastLoginDate = DateTime.Now;
+            //     db.SaveChanges();
+            //     function.WriteCookie(_accessor.HttpContext, "SysUserName", user.AdminName);
+            //     function.WriteCookie(_accessor.HttpContext, "SysRealName", user.RealName);
+            //     function.WriteCookie(_accessor.HttpContext, "SysRealRole", user.Role);
+            //     int RoleId = int.Parse(function.CheckInt(user.Role));
+            //     BsModels.SysAdminRole Role = db.SysAdminRole.FirstOrDefault(m => m.Id == RoleId) ?? new BsModels.SysAdminRole();
+            //     string RightInfo = function.CheckNull(Role.RightInfo);
+            //     function.WriteSession(_accessor.HttpContext, "RightInfo", RightInfo);
+            //     string UserId = user.Id.ToString();
+            //     function.WriteCookie(_accessor.HttpContext, "SysId", UserId);
+            //     function.WriteSession(_accessor.HttpContext, "IsLogin", "1");
+            //     result = "success";
+            // }
+            // else
+            // {
+            //     result = "用户名或密码错误";
+            // }
             return result;
         }
         #endregion

+ 17 - 0
Areas/Admin/Controllers/MainServer/LeaderReserveRecordController.cs

@@ -149,6 +149,23 @@ namespace MySystem.Areas.Admin.Controllers
                     }
                 }
 
+                //券码
+                int OrderId = int.Parse(function.CheckInt(dic["Id"].ToString()));
+                if (OrderId >= 2300)
+                {
+
+                    var info = db.UserSnDelayChange.Where(m => m.QueryCount == OrderId).ToList();
+                    var PosCoupons = "";
+                    foreach (var item in info)
+                    {
+                        PosCoupons += item.SnNo + ",";
+                    }
+                    dic["PosCoupons"] = PosCoupons;
+                }
+                else
+                {
+                    dic["PosCoupons"] = dic["SeoDescription"].ToString();
+                }
             }
             return Json(obj);
         }

+ 15 - 7
Areas/Admin/Controllers/MainServer/StoreHouseAmountRecordController.cs

@@ -77,7 +77,15 @@ namespace MySystem.Areas.Admin.Controllers
             //额度类别
             if (!string.IsNullOrEmpty(AmountTypeSelect))
             {
-                condition += " and AmountType=" + AmountTypeSelect;
+                //临时额度
+                if (AmountTypeSelect == "1")
+                {
+                    condition += " and (Sort=1 or Sort=3)";
+                }
+                else
+                {
+                    condition += " and Sort!=1 and Sort!=3)";
+                }
             }
             //变动类别
             if (!string.IsNullOrEmpty(ChangeTypeSelect))
@@ -109,14 +117,14 @@ namespace MySystem.Areas.Admin.Controllers
                 //申请单
                 dic["ApplyId"] = RelationClass.GetStoreMachineApplyInfo(int.Parse(dic["ApplyId"].ToString()));
                 //额度类别
-                int AmountType = int.Parse(dic["AmountType"].ToString());
-                if (AmountType == 0) dic["AmountType"] = "固定额度";
-                if (AmountType == 1) dic["AmountType"] = "临时额度";
+                int Sort = int.Parse(dic["Sort"].ToString());
+                if (Sort == 1 || Sort == 3) dic["AmountType"] = "临时额度";
+                else dic["AmountType"] = "可用额度";
                 //变动类别
                 int ChangeType = int.Parse(dic["Sort"].ToString());
                 if (ChangeType == 1) dic["ChangeType"] = "购买临时额度";
-                if (ChangeType == 2) dic["ChangeType"] = "增减分仓临时额度";
-                if (ChangeType == 3) dic["ChangeType"] = "调低额度返回余额";
+                if (ChangeType == 2) dic["ChangeType"] = "增减分仓可用额度";
+                if (ChangeType == 3) dic["ChangeType"] = "调低额度";
                 if (ChangeType == 4) dic["ChangeType"] = "仓库发货|预发机申请";
                 if (ChangeType == 5) dic["ChangeType"] = "后台仓库调拨";
                 //操作类别
@@ -474,7 +482,7 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and OperateType=" + OperateTypeSelect;
             }
-            //额度类别
+            //支付类别
             if (!string.IsNullOrEmpty(PayModeSelect))
             {
                 condition += " and PayMode=" + PayModeSelect;

+ 27 - 0
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -1394,6 +1394,16 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                     CustomerSqlConn.op("insert into PosMerchantInfo select * from PosMerchantInfoBak where KqMerNo='" + MerNo + "'", MysqlConn.connstr);
                 }
+
+                if (oldpos.OpId > 0)
+                {
+                    var opUserAccount = opdb.UserAccount.FirstOrDefault(m => m.Sort > 0 && m.Id == oldpos.OpId && m.UserId == oldpos.OpId) ?? new OpModels.UserAccount();
+                    opUserAccount.ValidAmount += oldpos.OpReserve3;
+                    opUserAccount.ValidForGetAmount += oldpos.OpReserve2;
+                    opUserAccount.TotalAmount += oldpos.OpReserve1;
+                }
+                opdb.SaveChanges();
+                
                 merchant = db.PosMerchantInfo.FirstOrDefault(m => m.KqMerNo == MerNo) ?? new PosMerchantInfo();
                 newpos.BindMerchantId = merchant.Id;
                 newpos.BuyUserId = oldpos.BuyUserId;
@@ -1589,6 +1599,14 @@ namespace MySystem.Areas.Admin.Controllers
                     storeFromUserAcount.ValidAmount += amount;
                     storeBackUserAcount.ValidAmount -= amount;
 
+                    if (oldpos.OpId > 0)
+                    {
+                        var opUserAccount = opdb.UserAccount.FirstOrDefault(m => m.Sort > 0 && m.Id == oldpos.OpId && m.UserId == oldpos.OpId) ?? new OpModels.UserAccount();
+                        opUserAccount.ValidAmount += oldpos.OpReserve3;
+                        opUserAccount.ValidForGetAmount += oldpos.OpReserve2;
+                        opUserAccount.TotalAmount += oldpos.OpReserve1;
+                    }
+
                     newpos.BuyUserId = oldpos.BuyUserId;
                     newpos.UserId = oldpos.UserId;
                     newpos.RecycEndDate = oldpos.RecycEndDate;
@@ -1660,6 +1678,7 @@ namespace MySystem.Areas.Admin.Controllers
                     oldpos.Status = -1;
                     PublicFunction.ClearPosHistory(db, oldpos.PosSn); //清除机具历史记录
                     db.SaveChanges();
+                    opdb.SaveChanges();
 
                     PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == newpos.BindMerchantId);
                     if (merchant != null)
@@ -1809,6 +1828,13 @@ namespace MySystem.Areas.Admin.Controllers
                     {
                         opData.Add(oldpos.BuyUserId + ":" + oldpos.BrandId);
                     }
+                    if (oldpos.OpId > 0)
+                    {
+                        var opUserAccount = opdb.UserAccount.FirstOrDefault(m => m.Sort > 0 && m.Id == oldpos.OpId && m.UserId == oldpos.OpId) ?? new OpModels.UserAccount();
+                        opUserAccount.ValidAmount += oldpos.OpReserve3;
+                        opUserAccount.ValidForGetAmount += oldpos.OpReserve2;
+                        opUserAccount.TotalAmount += oldpos.OpReserve1;
+                    }
 
                     oldpos.StoreId = storeBack.Id;
                     oldpos.QueryCount = 0;
@@ -1853,6 +1879,7 @@ namespace MySystem.Areas.Admin.Controllers
                     oldpos.Status = -1;
                     PublicFunction.ClearPosHistory(db, oldpos.PosSn); //清除机具历史记录
                     db.SaveChanges();
+                    opdb.SaveChanges();
 
                     BrokenMachineChange add = db.BrokenMachineChange.Add(new BrokenMachineChange()
                     {

+ 77 - 27
Areas/Admin/Controllers/MainServer/UserAccountRecordController.cs

@@ -57,15 +57,15 @@ namespace MySystem.Areas.Admin.Controllers
         /// 创客账户变动记录列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(UserAccountRecord data, string MakerCode, string RealName, int TopUserId, string CreateDateData, int UserId = 0, int page = 1, int limit = 30)
+        public JsonResult IndexData(UserAccountRecord data, int ChangeType, int ProductType, string TransRecordNo, string MakerCode, string RealName, int TopUserId, string CreateDateData, int UserId = 0, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
-            Fields.Add("ChangeType", "1"); //交易类型
-            Fields.Add("ProductType", "1"); //产品类型
-            Fields.Add("TransRecordNo", "3"); //交易流水编号
+            // Fields.Add("ChangeType", "1"); //交易类型
+            // Fields.Add("ProductType", "1"); //产品类型
+            // Fields.Add("TransRecordNo", "3"); //交易流水编号
 
-            string condition = condition = " and Status>-1";
+            string condition = " and Status>-1";
             //创客编号
             if (!string.IsNullOrEmpty(MakerCode))
             {
@@ -125,19 +125,34 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                     condition += " and Id =0";
                 }
-                
+
             }
-            if (data.ChangeType > 0)
+            if (ChangeType > 0)
             {
-                condition += " and ChangeType=" + data.ChangeType;
+                if (ChangeType == 1)
+                {
+                    condition += " and (ChangeType=" + ChangeType + " or (ChangeType in(112,1) and ProductType=101))";
+                }
+                else if (ChangeType == 30)
+                {
+                    condition += " and ChangeType=31 and Remark='开机抢红包活动'";
+                }
+                else if (ChangeType == 31)
+                {
+                    condition += " and (ChangeType=" + ChangeType + " and (Remark!='开机抢红包活动' or Remark IS NULL))";
+                }
+                else
+                {
+                    condition += " and ChangeType=" + ChangeType;
+                }
             }
-            if (data.ProductType > 0)
+            if (ProductType > 0)
             {
-                condition += " and ProductType=" + data.ProductType;
+                condition += " and ProductType=" + ProductType;
             }
-            if (!string.IsNullOrEmpty(data.TransRecordNo))
+            if (!string.IsNullOrEmpty(TransRecordNo))
             {
-                condition += " and TransRecordNo='" + data.TransRecordNo + "'";
+                condition += " and TransRecordNo='" + TransRecordNo + "'";
             }
 
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserAccountRecord", Fields, "Id desc", "0", page, limit, condition);
@@ -155,10 +170,10 @@ namespace MySystem.Areas.Admin.Controllers
                     dic["TopMakerCode"] = tuser.MakerCode;
                     dic["TopRealName"] = tuser.RealName;
                 }
-                int ProductType = int.Parse(dic["ProductType"].ToString());
-                dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductType);
-                int ChangeType = int.Parse(dic["ChangeType"].ToString());
-                dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeType);
+                int ProductTypes = int.Parse(dic["ProductType"].ToString());
+                dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductTypes);
+                int ChangeTypes = int.Parse(dic["ChangeType"].ToString());
+                dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeTypes);
 
                 //获得盟主5元奖励的机具Sn
                 int SnId = int.Parse(dic["QueryCount"].ToString());
@@ -167,8 +182,8 @@ namespace MySystem.Areas.Admin.Controllers
             }
             Dictionary<string, object> other = new Dictionary<string, object>();
 
-            string ChangeTypeAmount0 = "0.00", ChangeTypeAmount1 = "0.00", ChangeTypeAmount2 = "0.00", ChangeTypeAmount3 = "0.00", ChangeTypeAmount4 = "0.00", ChangeTypeAmount5 = "0.00", ChangeTypeAmount6 = "0.00", ChangeTypeAmount61 = "0.00", ChangeTypeAmount62 = "0.00", ChangeTypeAmount63 = "0.00", ChangeTypeAmount64 = "0.00", ChangeTypeAmount50 = "0.00", ChangeTypeAmount111 = "0.00", ChangeTypeAmount112 = "0.00", ChangeTypeAmount60 = "0.00", ChangeTypeAmount31 = "0.00",  ChangeTypeAmount31s = "0.00", ChangeTypeAmount124 = "0.00", ChangeTypeAmount125 = "0.00";
-            DataTable dt = OtherMySqlConn.dtable("select sum(if(ChangeType=0, ChangeAmount, 0)),sum(if(ChangeType=1, ChangeAmount, 0)) + sum(if(ChangeType=112 and ProductType=101, ChangeAmount, 0)),sum(if(ChangeType=2, ChangeAmount, 0)),sum(if(ChangeType=6, ChangeAmount, 0)),sum(if(ChangeType=61, ChangeAmount, 0)),sum(if(ChangeType=62, ChangeAmount, 0)),sum(if(ChangeType=63, ChangeAmount, 0)),sum(if(ChangeType=64, ChangeAmount, 0)),sum(if(ChangeType=50, ChangeAmount, 0)),sum(if(ChangeType=111, ChangeAmount, 0)),sum(if(ChangeType=112, ChangeAmount, 0)),sum(if(ChangeType=60, ChangeAmount, 0)),sum(if(ChangeType=31 and Remark='开机抢红包活动', ChangeAmount, 0)),sum(if(ChangeType=3, ChangeAmount, 0)),sum(if(ChangeType=4, ChangeAmount, 0)),sum(if(ChangeType=5, ChangeAmount, 0)),sum(if(ChangeType=124, ChangeAmount, 0)),sum(if(ChangeType=125, ChangeAmount, 0)),sum(if(ChangeType=31 and (Remark!='开机抢红包活动' or Remark IS NULL), ChangeAmount, 0)) from UserAccountRecord where 1=1" + condition);
+            string ChangeTypeAmount0 = "0.00", ChangeTypeAmount1 = "0.00", ChangeTypeAmount2 = "0.00", ChangeTypeAmount3 = "0.00", ChangeTypeAmount4 = "0.00", ChangeTypeAmount5 = "0.00", ChangeTypeAmount6 = "0.00", ChangeTypeAmount61 = "0.00", ChangeTypeAmount62 = "0.00", ChangeTypeAmount63 = "0.00", ChangeTypeAmount64 = "0.00", ChangeTypeAmount50 = "0.00", ChangeTypeAmount111 = "0.00", ChangeTypeAmount112 = "0.00", ChangeTypeAmount60 = "0.00", ChangeTypeAmount31 = "0.00", ChangeTypeAmount31s = "0.00", ChangeTypeAmount124 = "0.00", ChangeTypeAmount125 = "0.00";
+            DataTable dt = OtherMySqlConn.dtable("select sum(if(ChangeType=0, ChangeAmount, 0)),sum(if(ChangeType=1 and ProductType!=101, ChangeAmount, 0)) + sum(if(ChangeType in(112,1) and ProductType=101, ChangeAmount, 0)),sum(if(ChangeType=2, ChangeAmount, 0)),sum(if(ChangeType=6, ChangeAmount, 0)),sum(if(ChangeType=61, ChangeAmount, 0)),sum(if(ChangeType=62, ChangeAmount, 0)),sum(if(ChangeType=63, ChangeAmount, 0)),sum(if(ChangeType=64, ChangeAmount, 0)),sum(if(ChangeType=50, ChangeAmount, 0)),sum(if(ChangeType=111, ChangeAmount, 0)),sum(if(ChangeType=112  and ProductType!=101, ChangeAmount, 0)),sum(if(ChangeType=60, ChangeAmount, 0)),sum(if(ChangeType=31 and Remark='开机抢红包活动', ChangeAmount, 0)),sum(if(ChangeType=3, ChangeAmount, 0)),sum(if(ChangeType=4, ChangeAmount, 0)),sum(if(ChangeType=5, ChangeAmount, 0)),sum(if(ChangeType=124, ChangeAmount, 0)),sum(if(ChangeType=125, ChangeAmount, 0)),sum(if(ChangeType=31 and (Remark!='开机抢红包活动' or Remark IS NULL), ChangeAmount, 0)) from UserAccountRecord where 1=1" + condition);
             if (dt.Rows.Count > 0)
             {
                 ChangeTypeAmount0 = dt.Rows[0][0].ToString();
@@ -207,7 +222,7 @@ namespace MySystem.Areas.Admin.Controllers
             other.Add("ChangeTypeAmount112", ChangeTypeAmount112); //推荐奖励
             other.Add("ChangeTypeAmount60", ChangeTypeAmount60); //流量卡分佣
             other.Add("ChangeTypeAmount31", ChangeTypeAmount31); //红包奖励
-            other.Add("ChangeTypeAmount31s", ChangeTypeAmount31s); //红包奖励
+            other.Add("ChangeTypeAmount31s", ChangeTypeAmount31s); //活动奖励
             other.Add("ChangeTypeAmount124", ChangeTypeAmount124); //机具过期
             other.Add("ChangeTypeAmount125", ChangeTypeAmount125); //软件服务费
             obj.Add("other", other);
@@ -414,12 +429,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// </summary>
         /// <returns></returns>
-        public JsonResult ExportExcel(UserAccountRecord data, string MakerCode, string RealName, string CreateDateData, int TopUserId, int UserId)
+        public JsonResult ExportExcel(UserAccountRecord data, int ChangeType, int ProductType, string TransRecordNo, string MakerCode, string RealName, string CreateDateData, int TopUserId, int UserId)
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
-            Fields.Add("ChangeType", "1"); //交易类型
-            Fields.Add("ProductType", "1"); //产品类型
-            Fields.Add("TransRecordNo", "3"); //交易流水编号
+            // Fields.Add("ChangeType", "1"); //交易类型
+            // Fields.Add("ProductType", "1"); //产品类型
+            // Fields.Add("TransRecordNo", "3"); //交易流水编号
 
             string condition = " and Status>-1";
             //创客编号
@@ -441,6 +456,33 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and UserId=" + UserId;
             }
+            if (ChangeType > 0)
+            {
+                if (ChangeType == 1)
+                {
+                    condition += " and (ChangeType=" + ChangeType + " or (ChangeType in(112,1) and ProductType=101))";
+                }
+                else if (ChangeType == 30)
+                {
+                    condition += " and ChangeType=31 and Remark='开机抢红包活动'";
+                }
+                else if (ChangeType == 31)
+                {
+                    condition += " and (ChangeType=" + ChangeType + " and (Remark!='开机抢红包活动' or Remark IS NULL))";
+                }
+                else
+                {
+                    condition += " and ChangeType=" + ChangeType;
+                }
+            }
+            if (ProductType > 0)
+            {
+                condition += " and ProductType=" + ProductType;
+            }
+            if (!string.IsNullOrEmpty(TransRecordNo))
+            {
+                condition += " and TransRecordNo='" + TransRecordNo + "'";
+            }
             if (!string.IsNullOrEmpty(CreateDateData))
             {
                 string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
@@ -475,10 +517,18 @@ namespace MySystem.Areas.Admin.Controllers
                     dic["TopMakerCode"] = tuser.MakerCode;
                     dic["TopRealName"] = tuser.RealName;
                 }
-                int ProductType = int.Parse(dic["ProductType"].ToString());
-                dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductType);
-                int ChangeType = int.Parse(dic["ChangeType"].ToString());
-                dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeType);
+                int ProductTypes = int.Parse(dic["ProductType"].ToString());
+                dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductTypes);
+                int ChangeTypes = int.Parse(dic["ChangeType"].ToString());
+                string Remark = dic["Remark"].ToString();
+                if (ChangeTypes == 31 && (Remark == "开机抢红包活动" || string.IsNullOrEmpty(Remark)))
+                {
+                    dic["ChangeTypeName"] = "红包奖励";
+                }
+                else
+                {
+                    dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeTypes);
+                }
                 dic.Remove("UserId");
                 dic.Remove("ChangeType");
                 dic.Remove("ProductType");

+ 2 - 2
Areas/Admin/Views/Home/Login.cshtml

@@ -26,11 +26,11 @@
                     <label for="password">密码 / Password</label>
                     <input class="form-input" type="password" name="Pwd" id="Pwd" onKeyUp="if(event.keyCode==13){$('#CheckCode').focus();}" placeholder="请填写密码">
                 </div>
-                @* <div class="form-group pb10">
+                <div class="form-group pb10">
                     <label for="password">验证码 / Verification</label>
                     <input class="form-input" type="text" name="CheckCode" id="CheckCode" onkeyup="if(event.keyCode==13){syslogin();}" placeholder="请填写验证码" style="width: 70%; display: inline-block; margin-right: 2%">
                     <img src="/Api/PublicMethod/CheckCode" onclick="$(this).attr('src','/Api/PublicMethod/CheckCode?r='+Math.random())" style="width: 26%; height:38px;" />
-                </div> *@
+                </div>
                 @*<div class="form-group pb10 cf">
                         <label class="remembermetext fl" for="rememberme">
                             <input type="checkbox" checked name="rememberme">&nbsp;记住我的登录

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexfs.cshtml

@@ -87,7 +87,7 @@
                 </div>
             </div>
             <blockquote class="layui-elem-quote layui-text">
-                退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
+                服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
             </blockquote>
             <div class="layui-card-body">
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexnfs.cshtml

@@ -87,7 +87,7 @@
                 </div>
             </div>
             <blockquote class="layui-elem-quote layui-text">
-                退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
+                服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="fReturnAmount">0.00</span>
             </blockquote>
             <div class="layui-card-body">
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>

+ 1 - 1
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexrg.cshtml

@@ -93,7 +93,7 @@
                         }
                     </div>
                     <blockquote class="layui-elem-quote layui-text">
-                        退押总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 实际总金额:<span style="color: #f00;" id="ReturnAmounts">0.00</span>
+                        服务费总金额:<span style="color: #f00;" id="ReturnAmount">0.00</span> | 达标奖总金额:<span style="color: #f00;" id="ReturnAmounts">0.00</span>
                     </blockquote>
                 </div>
             </div>

+ 4 - 4
Areas/Admin/Views/MainServer/StoreHouseAmountRecord/Index.cshtml

@@ -68,7 +68,7 @@
                         <div class="layui-input-inline">
                             <select id="AmountTypeSelect" name="AmountTypeSelect" lay-search="">
                                 <option value="">全部...</option>
-                                <option value="0">固定额度</option>
+                                <option value="0">可用额度</option>
                                 <option value="1">临时额度</option>
                             </select>
                         </div>
@@ -79,8 +79,8 @@
                             <select id="ChangeTypeSelect" name="ChangeTypeSelect" lay-search="">
                                 <option value="">全部...</option>
                                 <option value="1">购买临时额度</option>
-                                <option value="2">增减分仓临时额度</option>
-                                <option value="3">调低额度返回余额</option>
+                                <option value="2">增减分仓可用额度</option>
+                                <option value="3">调低额度</option>
                                 <option value="4">仓库发货,预发机申请</option>
                                 <option value="5">后台仓库调拨</option>
                             </select>
@@ -97,7 +97,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="PayModeSelect" name="PayModeSelect" lay-search="">
                                 <option value="">全部...</option>

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

@@ -99,9 +99,9 @@
                         </div>
                     </div>
                     <div class="layui-inline">
-                        <label class="layui-form-label">奖励时间</label>
+                        <label class="layui-form-label">导入时间</label>
                         <div class="layui-input-inline">
-                            <input class="layui-input" type="text" readonly name="BizTimeData" id="BizTime" placeholder="奖励时间"
+                            <input class="layui-input" type="text" readonly name="BizTimeData" id="BizTime" placeholder="导入时间"
                             autocomplete="off">
                         </div>
                     </div>

+ 15 - 1
Areas/Admin/Views/MainServer/UserAccountRecord/Index.cshtml

@@ -88,6 +88,7 @@
                                 <option value="0">激活奖励</option>
                                 <option value="1">交易分润</option>
                                 <option value="11">月月红</option>
+                                <option value="12">交易奖励</option>
                                 <option value="2">提现申请</option>
                                 <option value="3">提现代付</option>
                                 <option value="4">提现手续费</option>
@@ -97,23 +98,36 @@
                                 <option value="62">人工解冻</option>
                                 <option value="63">人工扣减</option>
                                 <option value="64">人工增加</option>
+                                <option value="65">押金暂扣</option>
+                                <option value="66">押金退还</option>
                                 <option value="7">系统扣除</option>
                                 <option value="10">办卡奖励</option>
                                 <option value="20">余额支付</option>
                                 <option value="21">余额退款</option>
                                 <option value="22">余额退款手续费</option>
-                                <option value="31">红包奖励</option>
+                                <option value="30">红包奖励</option>
                                 <option value="31">活动奖励</option>
                                 <option value="40">商户达标返</option>
                                 <option value="50">开机奖励</option>
                                 <option value="60">流量卡分佣</option>
                                 <option value="111">分润补贴</option>
                                 <option value="112">直推奖励</option>
+                                <option value="114">私董会分红</option>
+                                <option value="115">分仓奖励</option>
                                 <option value="116">大盟主奖励</option>
+                                <option value="117">盟主奖励(储蓄金入账)</option>
+                                <option value="118">盟主奖励(购机奖励)</option>
+                                <option value="119">分仓临时额度退还</option>
+                                <option value="120">运营中心(购机奖励)</option>
+                                <option value="121">运营中心奖励</option>
+                                <option value="122">推荐大盟主奖励</option>
+                                <option value="123">推荐小盟主奖励</option>
                                 <option value="124">扣机具货款</option>
                                 <option value="125">软件服务费</option>
                                 <option value="126">机具货款退还</option>
                                 <option value="130">预发临时额度退还</option>
+                                <option value="201">分期预扣款</option>
+                                <option value="202">创客预扣款</option>
                             </select>
                         </div>
                     </div>

+ 1 - 1
wwwroot/layuiadmin/modules_main/LeaderReserveRecord_Admin.js

@@ -104,7 +104,7 @@ layui.config({
             , { field: 'ChangeAmt', width: 200, title: '使用额度', sort: true }
             , { field: 'BeforeAmt', width: 200, title: '使用前剩余额度', sort: true }
             , { field: 'AfterAmt', width: 200, title: '使用后剩余额度', sort: true }
-            , { field: 'SeoDescription', width: 400, title: '券码', sort: true }
+            , { field: 'PosCoupons', width: 400, title: '券码', sort: true }
 
             // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
             // , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }

+ 1 - 1
wwwroot/layuiadmin/modules_main/MerchantDepositReturns_Admin.js

@@ -134,7 +134,7 @@ layui.config({
             , { field: 'MerchantIdKqSnNo', width: 200, title: '机具Sn', sort: true }
             , { field: 'MerchantIdMerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'MerchantIdMerRealName', width: 200, title: '商户姓名', sort: true }
-            , { field: 'SeoKeyword', width: 200, title: '退押订单号', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '申请订单号', sort: true }
             , { field: 'AlipayAccountNo', width: 200, title: '支付宝账号', sort: true }
             , { field: 'BankCardNo', width: 200, title: '银行卡号', sort: true }
             , { field: 'BankName', width: 200, title: '开户行', sort: true }

+ 1 - 1
wwwroot/layuiadmin/modules_main/MerchantDepositReturnsn_Admin.js

@@ -134,7 +134,7 @@ layui.config({
             , { field: 'MerchantIdKqSnNo', width: 200, title: '机具Sn', sort: true }
             , { field: 'MerchantIdMerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'MerchantIdMerRealName', width: 200, title: '商户姓名', sort: true }
-            , { field: 'SeoKeyword', width: 200, title: '退押订单号', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '申请订单号', sort: true }
             , { field: 'AlipayAccountNo', width: 200, title: '支付宝账号', sort: true }
             , { field: 'BankCardNo', width: 200, title: '银行卡号', sort: true }
             , { field: 'BankName', width: 200, title: '开户行', sort: true }

+ 1 - 1
wwwroot/layuiadmin/modules_main/PosMerchantInfofsList_Admin.js

@@ -125,7 +125,7 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'PosSn', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
         ]]
         , where: {
         }

+ 1 - 1
wwwroot/layuiadmin/modules_main/PosMerchantInfonfsList_Admin.js

@@ -125,7 +125,7 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'PosSn', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
         ]]
         , where: {
         }

+ 2 - 2
wwwroot/layuiadmin/modules_main/PosMerchantInforgList_Admin.js

@@ -124,9 +124,9 @@ layui.config({
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'KqSnNo', width: 220, title: '机具SN号', sort: true }
-            , { field: 'SeoKeyword', width: 220, title: '实际押金', sort: true }
+            , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
             // , { field: 'PrizeParams', width: 220, title: '设置押金', sort: true }
-            , { field: 'Remark', width: 220, title: '已退金额', sort: true }
+            , { field: 'Remark', width: 220, title: '达标奖', sort: true }
         ]]
         , where: {
         }

+ 2 - 2
wwwroot/layuiadmin/modules_main/StoreHouseAmountRecord_Admin.js

@@ -102,10 +102,10 @@ layui.config({
             , { field: 'AmountType', width: 200, title: '额度类别', sort: true }
             , { field: 'ChangeType', width: 200, title: '变动类别', sort: true }
             , { field: 'OperateType', width: 200, title: '操作类别', sort: true }
-            , { field: 'PayMode', width: 200, title: '额度类别', sort: true }
+            , { field: 'PayMode', width: 200, title: '支付类别', sort: true }
 
             // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
-            , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            // , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
 

+ 1 - 1
wwwroot/layuiadmin/modules_main/SysRechargeRecord_Admin.js

@@ -127,7 +127,7 @@ layui.config({
             , { field: 'Amount', width: 200, title: '奖励金额(元)', sort: true }
             , { field: 'Status', width: 200, title: '状态', sort: true }
             , { field: 'SeoDescription', width: 200, title: '备注', sort: true }
-            , { field: 'BizTime', width: 200, title: '奖励时间', sort: true }
+            , { field: 'BizTime', width: 200, title: '导入时间', sort: true }
             , { field: 'SyncStatus', width: 200, title: '同步状态', sort: true }
             , { field: 'CreateMan', width: 200, title: '操作员', sort: true }
         ]]

+ 1 - 1
wwwroot/layuiadmin/modules_main/ToChargeBackRecord_Admin.js

@@ -154,7 +154,7 @@ layui.config({
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
             , { field: 'ChargeAmount', width: 200, title: '扣款金额', sort: true }
             , { field: 'ChargeTypeName', width: 200, title: '扣款类型', sort: true }
-            , { field: 'UpdateDate', width: 200, title: '扣款时间', sort: true }
+            , { field: 'UpdateDate', width: 200, title: '扣款/更新时间', sort: true }
             , { field: 'StatusName', width: 200, title: '扣款状态', sort: true }
             , { field: 'Remark', width: 200, title: '机具Sn', sort: true }
             , { field: 'SeoDescription', width: 200, title: '备注', sort: true }