Преглед изворни кода

Merge branch 'DuGuYang' into develop

lcl пре 3 година
родитељ
комит
88f9ccd754

+ 17 - 18
Areas/Admin/Controllers/BsServer/AdvertismentController.cs

@@ -32,11 +32,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 根据条件查询广告位列表
         /// </summary>
         /// <returns></returns>
-        public IActionResult Index(Advertisment data, string right)
+        public IActionResult Index(Advertisment data, string right, string CurColId)
         {
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = right;
             ViewBag.SysUserName = SysUserName;
+            ViewBag.CurColId = CurColId;
 
             string Condition = "";
             Condition += "Title:\"" + data.Title + "\",";
@@ -58,17 +59,22 @@ namespace MySystem.Areas.Admin.Controllers
         /// 广告位列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(Advertisment data, int page = 1, int limit = 30)
+        public JsonResult IndexData(Advertisment data, string CurColId, int page = 1, int limit = 30)
         {
-            Dictionary<string, string> ColDic = new DictionaryClass().getColDic("003");
+            Dictionary<string, string> ColDic = new DictionaryClass().getColDic(CurColId);
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Fields.Add("Title", "2"); //标题
-            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.BsTables).IndexData("Advertisment", Fields, "Id desc", "False", page, limit);
+            string condition = " and ColId like '" + CurColId + "%'";
+            // Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.BsTables).IndexData("Advertisment", Fields, "Id desc", "False", page, limit);
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.BsTables).IndexData("Advertisment", Fields, "Id desc", "False", page, limit, condition);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             foreach (Dictionary<string, object> dic in diclist)
             {
                 dic["ColId"] = new DictionaryClass().getDictionaryNameByKey(ColDic, dic["ColId"].ToString());
+                int Status = int.Parse(dic["Status"].ToString());
+                if (Status == 0) dic["StatusName"] = "已下架";
+                if (Status == 1) dic["StatusName"] = "已上架";
             }
             return Json(obj);
         }
@@ -81,11 +87,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 增加或修改广告位信息
         /// </summary>
         /// <returns></returns>
-        public IActionResult Add()
+        public IActionResult Add(string right, string CurColId)
         {
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = _accessor.HttpContext.Request.Query["right"];
             ViewBag.SysUserName = SysUserName;
+            ViewBag.CurColId = CurColId;
 
             return View();
         }
@@ -99,7 +106,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// </summary>
         /// <returns></returns>
         [HttpPost]
-        public string Add(Advertisment data)
+        public string Add(Advertisment data, string CurColId = "")
         {
             Dictionary<string, object> Fields = new Dictionary<string, object>();
             Fields.Add("Title", data.Title); //标题
@@ -114,8 +121,6 @@ namespace MySystem.Areas.Admin.Controllers
             AddSysLog(data.Id.ToString(), "Advertisment", "add");
             bsdb.SaveChanges();
 
-            SetRedis(data.ColId, Id);
-
             return "success";
         }
 
@@ -127,11 +132,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 增加或修改广告位信息
         /// </summary>
         /// <returns></returns>
-        public IActionResult Edit(int Id = 0)
+        public IActionResult Edit(string right, string CurColId, int Id = 0)
         {
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = _accessor.HttpContext.Request.Query["right"];
             ViewBag.SysUserName = SysUserName;
+            ViewBag.CurColId = CurColId;
 
             Advertisment editData = bsdb.Advertisment.FirstOrDefault(m => m.Id == Id) ?? new Advertisment();
             ViewBag.data = editData;
@@ -147,7 +153,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// </summary>
         /// <returns></returns>
         [HttpPost]
-        public string Edit(Advertisment data)
+        public string Edit(Advertisment data, string CurColId = "")
         {
             Dictionary<string, object> Fields = new Dictionary<string, object>();
             Fields.Add("Title", data.Title); //标题
@@ -161,8 +167,6 @@ namespace MySystem.Areas.Admin.Controllers
             AddSysLog(data.Id.ToString(), "Advertisment", "update");
             bsdb.SaveChanges();
 
-            SetRedis(data.ColId, data.Id);
-
             return "success";
         }
 
@@ -183,12 +187,11 @@ namespace MySystem.Areas.Admin.Controllers
                 int id = int.Parse(subid);
                 string ColId = "";
                 Advertisment ad = bsdb.Advertisment.FirstOrDefault(m => m.Id == id);
-                if(ad != null)
+                if (ad != null)
                 {
                     ColId = ad.ColId;
                 }
                 new AdminContentOther(_accessor.HttpContext, PublicFunction.BsTables).Delete("Advertisment", id);
-                SetRedis(ColId);
             }
             bsdb.SaveChanges();
 
@@ -254,10 +257,6 @@ namespace MySystem.Areas.Admin.Controllers
 
             AddSysLog(Id.ToString(), "Advertisment", "sort");
             Advertisment ad = bsdb.Advertisment.FirstOrDefault(m => m.Id == Id);
-            if(ad != null)
-            {
-                SetRedis(ad.ColId);
-            }
             return "success";
         }
         #endregion

+ 67 - 1
Areas/Admin/Controllers/MainServer/ToChargeBackRecordController.cs

@@ -7,6 +7,7 @@ using System.Web;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
+using System.Data;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.Http;
@@ -112,8 +113,22 @@ namespace MySystem.Areas.Admin.Controllers
                 if (Status == 1) dic["StatusName"] = "已扣款";
                 if (Status == 2) dic["StatusName"] = "已退还";
                 if (Status == 3) dic["StatusName"] = "暂停扣款";
-
             }
+            Dictionary<string, object> other = new Dictionary<string, object>();
+            string SuccessAmount = "0.00";//已扣款总金额
+            string WaitAmount = "0.00";//待扣款总金额
+            string StopAmount = "0.00";//暂停扣款总金额
+            DataTable dt = OtherMySqlConn.dtable("SELECT SUM(if(Status=1,ChargeAmount,0)),SUM(if(Status=0,ChargeAmount,0)),SUM(if(Status=3,ChargeAmount,0)) FROM ToChargeBackRecord WHERE 1=1 " + condition);
+            if (dt.Rows.Count > 0)
+            {
+                SuccessAmount = decimal.Parse(function.CheckNum(dt.Rows[0][0].ToString())).ToString("f2");
+                WaitAmount = decimal.Parse(function.CheckNum(dt.Rows[0][1].ToString())).ToString("f2");
+                StopAmount = decimal.Parse(function.CheckNum(dt.Rows[0][2].ToString())).ToString("f2");
+            }
+            other.Add("SuccessAmount", SuccessAmount);
+            other.Add("WaitAmount", WaitAmount);
+            other.Add("StopAmount", StopAmount);
+            obj.Add("other", other);
             return Json(obj);
         }
 
@@ -653,6 +668,57 @@ namespace MySystem.Areas.Admin.Controllers
         #endregion
 
 
+
+        #region 快捷导出Excel
+        public IActionResult QuickExportExcel(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string QuickExportExcelDo(string UserIdMakerCode, string PosSn, string CreateDateData, string ChargeTypeSelect, string StatusSelect)
+        {
+
+            string SqlString = " where 1=1 and a.Status>-1";
+            if (!string.IsNullOrEmpty(CreateDateData))
+            {
+                string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                SqlString += " and a.CreateDate>='" + start + " 00:00:00' and a.CreateDate<='" + end + " 23:59:59'";
+            }
+            //创客编号
+            if (!string.IsNullOrEmpty(UserIdMakerCode))
+            {
+                SqlString += " and a.UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+            }
+            if (!string.IsNullOrEmpty(PosSn))
+            {
+                SqlString += " and a.Remark=" + PosSn;
+            }
+            //待扣类型
+            if (!string.IsNullOrEmpty(ChargeTypeSelect))
+            {
+                SqlString += " and a.ChargeType=" + ChargeTypeSelect;
+            }
+            //扣款状态
+            if (!string.IsNullOrEmpty(StatusSelect))
+            {
+                SqlString += " and a.Status=" + StatusSelect;
+            }
+            var Sql = "SELECT b.MakerCode '创客编号',b.RealName '创客真实姓名',b.Mobile '手机号',DATE_FORMAT(a.CreateDate,'%Y-%m-%d %H:%i:%s') '创建时间',a.ChargeAmount '扣款金额',(CASE WHEN a.ChargeType=124 THEN '过期机具扣款' WHEN a.ChargeType=1 THEN '创客预扣款' WHEN a.ChargeType=2 THEN '分期预扣款' ELSE '' end) '扣款类型',DATE_FORMAT(a.UpdateDate,'%Y-%m-%d %H:%i:%s') '扣款/更新时间',(CASE WHEN a.`Status`=0 THEN '待扣款' WHEN a.`Status`=1 THEN '已扣款' WHEN a.`Status`=2 THEN '已退还' WHEN a.`Status`=3 THEN '暂停扣款'  ELSE '' end) '扣款状态',a.Remark '机具Sn',a.SeoDescription '备注',a.SeoTitle '操作人' FROM ToChargeBackRecord a LEFT JOIN Users b ON a.UserId=b.Id " + SqlString + "";
+            var sysAdmin = bsdb.SysAdmin.FirstOrDefault(m => m.AdminName == SysUserName && m.Status > -1);
+            var FileName = "创客预扣款记录" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            string SendData = "{\"Operater\":\"" + sysAdmin.Id + "\",\"SqlString\":\"" + Sql + "\",\"FileName\":\"" + FileName + "\",\"MaxCount\":\"0\"}";
+            RedisDbconn.Instance.AddList("ExportQueue", SendData);
+            return "success";
+        }
+        #endregion
+
+
         #region 分期扣款
 
         public IActionResult ChangeInfoDo(string right)

+ 324 - 0
Areas/Admin/Controllers/MainServer/UserCashRecordForBusinessController.cs

@@ -0,0 +1,324 @@
+/*
+ * 直营团队提现记录
+ */
+
+using System;
+using System.Web;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Data;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using MySystem.Models;
+using Library;
+using LitJson;
+using MySystemLib;
+
+namespace MySystem.Areas.Admin.Controllers
+{
+    [Area("Admin")]
+    [Route("Admin/[controller]/[action]")]
+    public class UserCashRecordForBusinessController : BaseController
+    {
+        public UserCashRecordForBusinessController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
+        {
+            OtherMySqlConn.connstr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        #region 直营团队提现记录列表
+
+        /// <summary>
+        /// 根据条件查询直营团队提现记录列表
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Index(UserCashRecordForBusiness data, string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+
+            // string Condition = "";
+            // Condition += "CashOrderNo:\"" + data.CashOrderNo + "\",";
+            // Condition += "TradeType:\"" + data.TradeType + "\",";
+
+            // if (!string.IsNullOrEmpty(Condition))
+            // {
+            //     Condition = Condition.TrimEnd(',');
+            //     Condition = ", where: {" + Condition + "}";
+            // }
+            // ViewBag.Condition = Condition;
+            return View();
+        }
+
+        #endregion
+
+        #region 根据条件查询直营团队提现记录列表
+
+        /// <summary>
+        /// 直营团队提现记录列表
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult IndexData(UserCashRecordForBusiness data, string MakerCode, string RealName, string CreateDateData, int page = 1, int limit = 30)
+        {
+
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+
+            string condition = " and Status>-1";
+            //创客编号
+            if (!string.IsNullOrEmpty(MakerCode))
+            {
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
+            }
+            //创客名称
+            if (!string.IsNullOrEmpty(RealName))
+            {
+                condition += " and UserId in (select Id from Users where RealName='" + RealName + "')";
+            }
+            if (!string.IsNullOrEmpty(data.CashOrderNo))
+            {
+                condition += " and CashOrderNo='" + data.CashOrderNo + "'";
+            }
+
+            if (!string.IsNullOrEmpty(CreateDateData))
+            {
+                string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
+                var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
+                var check = db.UserCashRecordForBusiness.Any(m => m.CreateDate >= start);
+                var checks = db.UserCashRecordForBusiness.Any(m => m.CreateDate <= end);
+                if (check)
+                {
+                    var sId = db.UserCashRecordForBusiness.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    condition += "  and Id >=" + sId;
+                }
+                if (checks)
+                {
+                    var eId = db.UserCashRecordForBusiness.Where(m => m.CreateDate <= end).Max(m => m.Id);
+                    condition += " and Id <=" + eId;
+                }
+            }
+            else
+            {
+                var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
+                var check = db.UserCashRecordForBusiness.Any(m => m.CreateDate >= start);
+                if (check)
+                {
+                    var minId = db.UserCashRecordForBusiness.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    var Info = function.ReadInstance("/WritePage/UserCashRecord/UserCashRecordForBusiness.txt");
+                    if (string.IsNullOrEmpty(Info.ToString()))
+                    {
+                        function.WritePage("/WritePage/UserCashRecord/", "UserCashRecordForBusiness.txt", minId.ToString());
+                        condition += " and Id >=" + minId;
+                    }
+                    else if (minId != int.Parse(Info))
+                    {
+                        function.WritePage("/WritePage/UserCashRecord/", "UserCashRecordForBusiness.txt", minId.ToString());
+                        condition += " and Id >=" + minId;
+                    }
+                    else
+                    {
+                        condition += " and Id >=" + Convert.ToInt32(Info);
+                    }
+                }
+                else
+                {
+                    condition += " and Id =0";
+                }
+            }
+
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserCashRecordForBusiness", Fields, "Id desc", "0", page, limit, condition);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            foreach (Dictionary<string, object> dic in diclist)
+            {
+                int UserId = int.Parse(dic["UserId"].ToString());
+                Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                dic["MakerCode"] = user.MakerCode;
+                dic["RealName"] = user.RealName;
+            }
+            return Json(obj);
+        }
+
+        #endregion
+
+        #region 增加直营团队提现记录
+
+        /// <summary>
+        /// 增加或修改直营团队提现记录信息
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Add(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        #endregion
+
+        #region 增加直营团队提现记录
+
+        /// <summary>
+        /// 增加或修改直营团队提现记录信息
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string Add(UserCashRecordForBusiness data, string MakerCode, string RealName, string Amount)
+        {
+            Dictionary<string, object> Fields = new Dictionary<string, object>();
+            var userInfo = db.Users.FirstOrDefault(m => m.MakerCode == MakerCode && m.RealName == RealName && m.BusinessFlag == 1) ?? new Users();
+            if (userInfo.Id > 0 && !string.IsNullOrEmpty(Amount))
+            {
+                UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == userInfo.Id) ?? new UserAccount();
+                // GetReserve(MakerCode, RealName, Amount);
+                if (account.BalanceAmount - account.ToChargeAmount - decimal.Parse(Amount) >= 0)
+                {
+                    string CashOrderNo = "T1" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                    Fields.Add("UserId", userInfo.Id); //创客Id
+                    Fields.Add("CreateMan", SysUserName + "_" + SysRealName); //操作人
+                    Fields.Add("TradeAmount", Amount); //提现金额
+                    Fields.Add("CashOrderNo", CashOrderNo); //提现单号
+                    Fields.Add("SeoKeyword", data.SeoKeyword); //备注
+                    int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("UserCashRecordForBusiness", Fields, 0);
+
+                    decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                    decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
+                    decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                    account.BalanceAmount -= decimal.Parse(Amount);
+                    account.FreezeAmount += decimal.Parse(Amount);
+                    decimal AfterTotalAmount = account.TotalAmount; //变更后总金额
+                    decimal AfterFreezeAmount = account.FreezeAmount; //变更后冻结金额
+                    decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
+
+                    db.UserAccountRecord.Add(new UserAccountRecord()
+                    {
+                        CreateDate = DateTime.Now,
+                        UserId = userInfo.Id, //创客
+                        ChangeType = 132, //变动类型
+                        Kind = 2,
+                        ChangeAmount = decimal.Parse(Amount), //变更金额
+                        BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                        AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                        BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                        AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                        BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                        AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                    });
+                    AddSysLog(data.Id.ToString(), "UserCashRecordForBusiness", "add");
+                    db.SaveChanges();
+                    return "success";
+                }
+                else
+                {
+                    return "创客可提现余额不足";
+                }
+            }
+            else
+            {
+                return "输入的创客信息不存在或者创客编号和姓名不匹配";
+            }
+        }
+
+        #endregion
+
+        #region 获取创客账户信息
+        public string GetReserve(string MakerCode, string RealName, string Amount)
+        {
+            var userInfo = db.Users.FirstOrDefault(m => m.MakerCode == MakerCode && m.RealName == RealName) ?? new Users();
+            UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == userInfo.Id) ?? new UserAccount();
+            return "当前余额为:" + account.BalanceAmount + "元 可提现余额为:" + (account.BalanceAmount - account.ToChargeAmount) + "元 提现后余额为:" + (account.BalanceAmount - decimal.Parse(Amount)) + "元";
+        }
+        #endregion
+
+
+        #region 快捷导出Excel
+        public IActionResult QuickExportExcel(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string QuickExportExcelDo(string CashOrderNo, string MakerCode, string RealName, string CreateDateData)
+        {
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+
+            string condition = " where 1=1 and a.Status>-1";
+            //创客编号
+            if (!string.IsNullOrEmpty(MakerCode))
+            {
+                condition += " and a.UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
+            }
+            //创客名称
+            if (!string.IsNullOrEmpty(RealName))
+            {
+                condition += " and a.UserId in (select Id from Users where RealName='" + RealName + "')";
+            }
+            if (!string.IsNullOrEmpty(CashOrderNo))
+            {
+                condition += " and a.CashOrderNo='" + CashOrderNo + "'";
+            }
+
+            if (!string.IsNullOrEmpty(CreateDateData))
+            {
+                string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
+                var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
+                var check = db.UserCashRecordForBusiness.Any(m => m.CreateDate >= start);
+                var checks = db.UserCashRecordForBusiness.Any(m => m.CreateDate <= end);
+                if (check)
+                {
+                    var sId = db.UserCashRecordForBusiness.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    condition += "  and a.Id >=" + sId;
+                }
+                if (checks)
+                {
+                    var eId = db.UserCashRecordForBusiness.Where(m => m.CreateDate <= end).Max(m => m.Id);
+                    condition += " and a.Id <=" + eId;
+                }
+            }
+            else
+            {
+                var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
+                var check = db.UserCashRecordForBusiness.Any(m => m.CreateDate >= start);
+                if (check)
+                {
+                    var minId = db.UserCashRecordForBusiness.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    var Info = function.ReadInstance("/WritePage/UserCashRecord/UserCashRecordForBusiness.txt");
+                    if (string.IsNullOrEmpty(Info.ToString()))
+                    {
+                        function.WritePage("/WritePage/UserCashRecord/", "UserCashRecordForBusiness.txt", minId.ToString());
+                        condition += " and a.Id >=" + minId;
+                    }
+                    else if (minId != int.Parse(Info))
+                    {
+                        function.WritePage("/WritePage/UserCashRecord/", "UserCashRecordForBusiness.txt", minId.ToString());
+                        condition += " and a.Id >=" + minId;
+                    }
+                    else
+                    {
+                        condition += " and a.Id >=" + Convert.ToInt32(Info);
+                    }
+                }
+                else
+                {
+                    condition += " and a.Id =0";
+                }
+            }
+            var Sql = "SELECT b.MakerCode '创客编号',b.RealName '创客姓名',a.CashOrderNo '提现单号',a.TradeAmount '提现金额',DATE_FORMAT(a.CreateDate,'%Y-%m-%d %H:%i:%s') '提现时间',a.SeoKeyword '备注',a.CreateMan '操作人' FROM UserCashRecordForBusiness a LEFT JOIN Users b ON a.UserId=b.Id" + condition;
+            var sysAdmin = bsdb.SysAdmin.FirstOrDefault(m => m.AdminName == SysUserName && m.Status > -1);
+            var FileName = "直营团队提现记录" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            string SendData = "{\"Operater\":\"" + sysAdmin.Id + "\",\"SqlString\":\"" + Sql + "\",\"FileName\":\"" + FileName + "\",\"MaxCount\":\"0\"}";
+            RedisDbconn.Instance.AddList("ExportQueue", SendData);
+            return "success";
+        }
+        #endregion
+
+    }
+}

+ 174 - 14
Areas/Admin/Controllers/MainServer/UserRankWhiteController.cs

@@ -50,7 +50,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 创客预设职级列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(UserRankWhite data, string MakerCode, string RealName, string StatusSelect, int page = 1, int limit = 30)
+        public JsonResult IndexData(UserRankWhite data, string MakerCode, string RealName, string StatusSelect, string TopMakerCode, string UpdateDateData, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -71,6 +71,42 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and Status=" + StatusSelect;
             }
+            //顶级创客编号
+            if (!string.IsNullOrEmpty(TopMakerCode))
+            {
+                var topUser = db.Users.FirstOrDefault(m => m.MakerCode == TopMakerCode) ?? new Users();
+                var childIds = "";
+                // if (!string.IsNullOrEmpty(topUser.ParentNav))
+                // {
+                //     string[] ParentNavList = topUser.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                //     var topUserId = "," + topUser.Id + ",";
+                //     if (ParentNavList.Length > 1)
+                //     {
+                //         var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                //         foreach (var item in childUser)
+                //         {
+                //             childIds = item.Id + ",";
+                //         }
+                //         childIds = childIds.TrimEnd(',');
+                //     }
+                // }
+                var topUserId = "," + topUser.Id + ",";
+                var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                foreach (var item in childUser)
+                {
+                    childIds += item.Id + ",";
+                }
+                childIds = childIds.TrimEnd(',');
+                condition += " and UserId in (" + childIds + ")";
+            }
+            //到期时间
+            if (!string.IsNullOrEmpty(UpdateDateData))
+            {
+                string[] datelist = UpdateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and UpdateDate>='" + start + " 00:00:00' and UpdateDate<='" + end + " 23:59:59'";
+            }
 
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserRankWhite", Fields, "Id desc", "0", page, limit, condition);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
@@ -82,17 +118,28 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["MakerCode"] = user.MakerCode;
                 dic["RealName"] = user.RealName;
                 if (user.ParentUserId > 0)
-                { 
+                {
                     Users puser = db.Users.FirstOrDefault(m => m.Id == user.ParentUserId) ?? new Users();
                     dic["ParentMakerCode"] = puser.MakerCode;
                     dic["ParentRealName"] = puser.RealName;
                 }
                 if (!string.IsNullOrEmpty(user.ParentNav))
-                { 
-                    int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
-                    Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
-                    dic["TopMakerCode"] = tuser.MakerCode;
-                    dic["TopRealName"] = tuser.RealName;
+                {
+                    string[] ParentNavList = user.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                    if (ParentNavList.Length > 1)
+                    {
+                        int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[1]);
+                        Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
+                        dic["TopMakerCode"] = tuser.MakerCode;
+                        dic["TopRealName"] = tuser.RealName;
+                    }
+                    else
+                    {
+                        int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
+                        Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
+                        dic["TopMakerCode"] = tuser.MakerCode;
+                        dic["TopRealName"] = tuser.RealName;
+                    }
                 }
                 dic["Status"] = dic["Status"].ToString() == "1" ? "有效" : "无效";
             }
@@ -129,7 +176,7 @@ namespace MySystem.Areas.Admin.Controllers
         {
             bool check = db.UserForMakerCode.Any(m => m.MakerCode == MakerCode);
             if (!check)
-            { 
+            {
                 return "创客编号不存在";
             }
             Dictionary<string, object> Fields = new Dictionary<string, object>();
@@ -152,7 +199,7 @@ namespace MySystem.Areas.Admin.Controllers
 
             UserRank rank = RedisDbconn.Instance.Get<UserRank>("UserRank:" + user.UserId);
             if (rank != null)
-            { 
+            {
                 rank.WhiteRank = data.Rank;
                 RedisDbconn.Instance.Set("UserRank:" + user.UserId, rank);
             }
@@ -175,11 +222,11 @@ namespace MySystem.Areas.Admin.Controllers
 
             UserRankWhite editData = db.UserRankWhite.FirstOrDefault(m => m.Id == Id) ?? new UserRankWhite();
             ViewBag.data = editData;
-            
+
             Users user = db.Users.FirstOrDefault(m => m.Id == editData.UserId) ?? new Users();
             ViewBag.MakerCode = user.MakerCode;
             ViewBag.RealName = user.RealName;
-            
+
             return View();
         }
 
@@ -333,7 +380,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// </summary>
         /// <returns></returns>
-        public JsonResult ExportExcel(UserRankWhite data, string MakerCode, string RealName, string StatusSelect)
+        public JsonResult ExportExcel(UserRankWhite data, string MakerCode, string RealName, string StatusSelect, string TopMakerCode, string UpdateDateData)
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
 
@@ -353,6 +400,42 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and Status=" + StatusSelect;
             }
+            //顶级创客编号
+            if (!string.IsNullOrEmpty(TopMakerCode))
+            {
+                var topUser = db.Users.FirstOrDefault(m => m.MakerCode == TopMakerCode) ?? new Users();
+                var childIds = "";
+                // if (!string.IsNullOrEmpty(topUser.ParentNav))
+                // {
+                //     string[] ParentNavList = topUser.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                //     var topUserId = "," + topUser.Id + ",";
+                //     if (ParentNavList.Length > 1)
+                //     {
+                //         var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                //         foreach (var item in childUser)
+                //         {
+                //             childIds = item.Id + ",";
+                //         }
+                //         childIds = childIds.TrimEnd(',');
+                //     }
+                // }
+                var topUserId = "," + topUser.Id + ",";
+                var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                foreach (var item in childUser)
+                {
+                    childIds += item.Id + ",";
+                }
+                childIds = childIds.TrimEnd(',');
+                condition += " and UserId in (" + childIds + ")";
+            }
+            //到期时间
+            if (!string.IsNullOrEmpty(UpdateDateData))
+            {
+                string[] datelist = UpdateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and UpdateDate>='" + start + " 00:00:00' and UpdateDate<='" + end + " 23:59:59'";
+            }
 
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserRankWhite", Fields, "Id desc", "0", 1, 20000, condition, "UserId,Rank,Status,CreateDate", false);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
@@ -364,13 +447,13 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["MakerCode"] = user.MakerCode;
                 dic["RealName"] = user.RealName;
                 if (user.ParentUserId > 0)
-                { 
+                {
                     Users puser = db.Users.FirstOrDefault(m => m.Id == user.ParentUserId) ?? new Users();
                     dic["ParentMakerCode"] = puser.MakerCode;
                     dic["ParentRealName"] = puser.RealName;
                 }
                 if (!string.IsNullOrEmpty(user.ParentNav))
-                { 
+                {
                     int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                     Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
                     dic["TopMakerCode"] = tuser.MakerCode;
@@ -394,6 +477,7 @@ namespace MySystem.Areas.Admin.Controllers
             ReturnFields.Add("Rank", "等级名称");
             ReturnFields.Add("Status", "有效状态");
             ReturnFields.Add("CreateDate", "创建时间");
+            ReturnFields.Add("UpdateDate", "过期时间");
             result.Add("Fields", ReturnFields);
             AddSysLog("0", "UserRankWhite", "ExportExcel");
             return Json(result);
@@ -401,5 +485,81 @@ namespace MySystem.Areas.Admin.Controllers
 
         #endregion
 
+
+
+        #region 快捷导出Excel
+        public IActionResult QuickExportExcel(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string QuickExportExcelDo(string MakerCode, string RealName, string StatusSelect, string TopMakerCode, string UpdateDateData)
+        {
+
+            string condition = " where 1=1 and a.Status>-1";
+            //创客编号
+            if (!string.IsNullOrEmpty(MakerCode))
+            {
+                condition += " and a.UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
+            }
+            //创客名称
+            if (!string.IsNullOrEmpty(RealName))
+            {
+                condition += " and a.UserId in (select UserId from UserForRealName where RealName='" + RealName + "')";
+            }
+            //状态
+            if (!string.IsNullOrEmpty(StatusSelect))
+            {
+                condition += " and a.Status=" + StatusSelect;
+            }
+            //顶级创客编号
+            if (!string.IsNullOrEmpty(TopMakerCode))
+            {
+                var topUser = db.Users.FirstOrDefault(m => m.MakerCode == TopMakerCode) ?? new Users();
+                var childIds = "";
+                // if (!string.IsNullOrEmpty(topUser.ParentNav))
+                // {
+                //     string[] ParentNavList = topUser.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                //     var topUserId = "," + topUser.Id + ",";
+                //     if (ParentNavList.Length > 1)
+                //     {
+                //         var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                //         foreach (var item in childUser)
+                //         {
+                //             childIds = item.Id + ",";
+                //         }
+                //         childIds = childIds.TrimEnd(',');
+                //     }
+                // }
+                var topUserId = "," + topUser.Id + ",";
+                var childUser = db.Users.Where(m => m.ParentNav.Contains(topUserId)).ToList();
+                foreach (var item in childUser)
+                {
+                    childIds += item.Id + ",";
+                }
+                childIds = childIds.TrimEnd(',');
+                condition += " and a.UserId in (" + childIds + ")";
+            }
+            //到期时间
+            if (!string.IsNullOrEmpty(UpdateDateData))
+            {
+                string[] datelist = UpdateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and a.UpdateDate>='" + start + " 00:00:00' and a.UpdateDate<='" + end + " 23:59:59'";
+            }
+            var Sql = "SELECT b.MakerCode '创客编号',b.RealName '创客姓名',b.UserLevel '创客职级',c.MakerCode '上级创客编号',c.RealName ' 上级创客姓名',d.MakerCode '顶级创客编号',d.RealName '顶级创客姓名',DATE_FORMAT(a.CreateDate,'%Y-%m-%d %H:%i:%s') '创建时间',DATE_FORMAT(a.UpdateDate,'%Y-%m-%d %H:%i:%s') '到期时间',a.Rank '预设职级' FROM UserRankWhite a LEFT JOIN Users b ON a.UserId=b.Id LEFT JOIN Users c ON b.ParentUserId=c.Id LEFT JOIN Users d ON SUBSTRING_INDEX(SUBSTRING_INDEX(b.ParentNav,',',4),',',-1)=d.Id" + condition;
+            var sysAdmin = bsdb.SysAdmin.FirstOrDefault(m => m.AdminName == SysUserName && m.Status > -1);
+            var FileName = "创客预设职级记录" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            string SendData = "{\"Operater\":\"" + sysAdmin.Id + "\",\"SqlString\":\"" + Sql + "\",\"FileName\":\"" + FileName + "\",\"MaxCount\":\"0\"}";
+            RedisDbconn.Instance.AddList("ExportQueue", SendData);
+            return "success";
+        }
+        #endregion
+
     }
 }

+ 6 - 5
Areas/Admin/Views/BsServer/Advertisment/Add.cshtml

@@ -2,6 +2,7 @@
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
     string SysUserName = ViewBag.SysUserName as string;
+    string CurColId = ViewBag.CurColId as string;
 }
 <!DOCTYPE html>
 <html>
@@ -28,16 +29,16 @@
                     <div class="layui-form-item">
                         <label class="layui-form-label">标题</label>
                         <div class="layui-input-block">
-                            <input class="layui-input" type="text" id="Title" name="Title" maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入标题">
+                            <input class="layui-input" type="text" id="Title" name="Title" maxlength="50" lay-verify="required|" autocomplete="off" placeholder="请输入标题">
                         </div>
                     </div>
                     <div class="layui-form-item">
                         <div class="layui-inline">
                             <label class="layui-form-label">分类</label>
                             <div class="layui-input-inline">
-                                <select id="ColId" name="ColId" lay-search="">
+                                <select id="ColId" name="ColId" lay-search="" lay-verify="required|" placeholder="请选择分类">
                                     <option value="">请选择</option>
-                                    @{Dictionary<string, string> ColDic = new MySystem.DictionaryClass().getColDic("003");}
+                                    @{Dictionary<string, string> ColDic = new MySystem.DictionaryClass().getColDic(CurColId);}
                                     @foreach (string key in ColDic.Keys)
                                     {
                                         string kg = "";
@@ -55,7 +56,7 @@
                         <label class="layui-form-label">图片</label>
                         <div class="layui-input-block">
                             <div class="layui-upload">
-                                <input type="hidden" id="PicPath" name="PicPath" value="">
+                                <input type="hidden" id="PicPath" name="PicPath" value="" lay-verify="required|">
                                 <button class="layui-btn" type="button" id="PicPathBtn">选择图片</button>
                                 <div class="layui-inline layui-word-aux"></div>
                             </div>
@@ -66,7 +67,7 @@
                     <div class="layui-form-item layui-form-text">
                         <label class="layui-form-label">内容</label>
                         <div class="layui-input-block">
-                            <textarea class="layui-textarea" id="Contents" name="Contents" placeholder="请输入内容" style="width:100%;height:500px;"></textarea>
+                            <textarea class="layui-textarea" id="Contents" name="Contents" style="width:100%;height:500px;"></textarea>
                         </div>
                     </div>
                     <div class="layui-form-item">

+ 5 - 4
Areas/Admin/Views/BsServer/Advertisment/Edit.cshtml

@@ -4,6 +4,7 @@
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
     string SysUserName = ViewBag.SysUserName as string;
+    string CurColId = ViewBag.CurColId as string;
 }
 <!DOCTYPE html>
 <html>
@@ -31,16 +32,16 @@
                     <div class="layui-form-item">
                         <label class="layui-form-label">标题</label>
                         <div class="layui-input-block">
-                            <input class="layui-input" type="text" id="Title" name="Title" value="@editData.Title" maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入标题">
+                            <input class="layui-input" type="text" id="Title" name="Title" value="@editData.Title" maxlength="50" lay-verify="required|" autocomplete="off" placeholder="请输入标题">
                         </div>
                     </div>
                     <div class="layui-form-item">
                         <div class="layui-inline">
                             <label class="layui-form-label">分类</label>
                             <div class="layui-input-inline">
-                                <select id="ColId" name="ColId" lay-search="">
+                                <select id="ColId" name="ColId" lay-search="" lay-verify="required|" placeholder="请选择分类">
                                     <option value="">请选择</option>
-                                    @{Dictionary<string, string> ColDic = new MySystem.DictionaryClass().getColDic("003");}
+                                    @{Dictionary<string, string> ColDic = new MySystem.DictionaryClass().getColDic(CurColId);}
                                     @foreach (string key in ColDic.Keys)
                                     {
                                         string kg = "";
@@ -59,7 +60,7 @@
                         <label class="layui-form-label">图片</label>
                         <div class="layui-input-block">
                             <div class="layui-upload">
-                                <input type="hidden" id="PicPath" name="PicPath" value="@editData.PicPath">
+                                <input type="hidden" id="PicPath" name="PicPath" value="@editData.PicPath" lay-verify="required|" placeholder="请输入图片">
                                 <button class="layui-btn" type="button" id="PicPathBtn">选择图片</button>
                                 <div class="layui-inline layui-word-aux"></div>
                             </div>

+ 202 - 67
Areas/Admin/Views/BsServer/Advertisment/Index.cshtml

@@ -1,96 +1,231 @@
 @{
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
+    string SysUserName = ViewBag.SysUserName as string;
+    string CurColId = ViewBag.CurColId as string;
 }
 <!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8">
-    <title>广告位</title>
+    <title>广告位(增加)</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
     <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
 </head>
 <body>
-    <div class="layui-fluid">
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
         <div class="layui-card">
-            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
-                <div class="layui-form-item">
-                    <div class="layui-inline">
-                        <div class="layui-input-inline">
-                            <input class="layui-input" type="text" name="Title" placeholder="标题" autocomplete="off">
+          <div class="layui-card-body">
+        <div class="layui-tab" lay-filter="mytabbar">
+            @*<ul class="layui-tab-title">
+                <li class="layui-this" lay-id="1">基本信息</li>
+                <li lay-id="6">高级设置</li>
+            </ul>*@
+            <div class="layui-tab-content mt20">
+                <div class="layui-tab-item layui-show">
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">标题</label>
+                        <div class="layui-input-block">
+                            <input class="layui-input" type="text" id="Title" name="Title" maxlength="50" lay-verify="required|" autocomplete="off" placeholder="请输入标题">
                         </div>
                     </div>
-                    <div class="layui-inline">
-                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
-                        </button>
-                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
-                            查看全部
-                        </button>
+                    <div class="layui-form-item">
+                        <div class="layui-inline">
+                            <label class="layui-form-label">分类</label>
+                            <div class="layui-input-inline">
+                                <select id="ColId" name="ColId" lay-search="" lay-verify="required|" placeholder="请选择分类">
+                                    <option value="">请选择</option>
+                                    @{Dictionary<string, string> ColDic = new MySystem.DictionaryClass().getColDic(CurColId);}
+                                    @foreach (string key in ColDic.Keys)
+                                    {
+                                        string kg = "";
+                                        for (int i = 1; i < key.Length / 3 - 1; i++)
+                                        {
+                                            kg += "  ";
+                                        }
+                                        <option value="@key">@kg@ColDic[key]</option>
+                                    }
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">图片</label>
+                        <div class="layui-input-block">
+                            <div class="layui-upload">
+                                <input type="hidden" id="PicPath" name="PicPath" value="" lay-verify="required|">
+                                <button class="layui-btn" type="button" id="PicPathBtn">选择图片</button>
+                                <div class="layui-inline layui-word-aux"></div>
+                            </div>
+                            <div class="mt10" id="PicPathImage">
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-form-item layui-form-text">
+                        <label class="layui-form-label">内容</label>
+                        <div class="layui-input-block">
+                            <textarea class="layui-textarea" id="Contents" name="Contents" style="width:100%;height:500px;"></textarea>
+                        </div>
+                    </div>
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">链接地址</label>
+                        <div class="layui-input-block">
+                            <input class="layui-input" type="text" id="Url" name="Url" maxlength="max" lay-verify="" autocomplete="off" placeholder="请输入链接地址">
+                        </div>
+                    </div>
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">参数</label>
+                        <div class="layui-input-block">
+                            <input class="layui-input" type="text" id="SeoTitle" name="SeoTitle" maxlength="max" lay-verify="" autocomplete="off" placeholder="请输入参数">
+                        </div>
                     </div>
-                </div>
-            </div>
 
-            <div class="layui-card-body">
-                <div style="padding-bottom: 10px;">
-                    @if (RightInfo.Contains("," + right + "_add,"))
-                    {
-                        <button class="layui-btn" data-type="add">添加</button>
-                    }
-                    @if (RightInfo.Contains("," + right + "_delete,"))
-                    {
-                        <button class="layui-btn" data-type="batchdel">删除</button>
-                    }
-                    @if (RightInfo.Contains("," + right + "_edit,"))
-                    {
-
-                    }
                 </div>
-                <script type="text/html" id="imgTpl">
-                    <img src="@(MySystem.OssHelper.Instance.SourceHost){{d.PicPath}}" style="max-width:100px; max-height:50px;" />
-                </script>
-
-                <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="table-list-tools">
-                    @if (RightInfo.Contains("," + right + "_edit,"))
-                    {
-                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
-                    }
-                    @if (RightInfo.Contains("," + right + "_delete,"))
-                    {
-                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
-                    }
-                </script>
-            </div>
-        </div>
-    </div>
-    <div id="excelForm" style="display:none; padding:20px;">
-        <div class="layui-tab-item layui-show">
-            <div class="layui-form-item">
-                <label class="layui-form-label">excel文件</label>
-                <div class="layui-input-block">
-                    <div class="layui-upload">
-                        <input type="file" id="ExcelFile" name="ExcelFile" value="">
+                @* <div class="layui-tab-item">
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">网页标题</label>
+                        <div class="layui-input-block">
+                            <input class="layui-input" type="text" id="SeoTitle" name="SeoTitle" maxlength="50" autocomplete="off" placeholder="请输入网页标题">
+                        </div>
                     </div>
-                    <div class="mt10" id="ExcelFileList">
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">网页关键字</label>
+                        <div class="layui-input-block">
+                            <input class="layui-input" type="text" id="SeoKeyword" name="SeoKeyword" maxlength="50" autocomplete="off" placeholder="请输入网页关键字">
+                        </div>
                     </div>
-                </div>
+                    <div class="layui-form-item layui-form-text">
+                        <label class="layui-form-label">网页描述</label>
+                        <div class="layui-input-block">
+<textarea class="layui-textarea" name="SeoDescription" id="SeoDescription" placeholder="请输入网页描述"></textarea>
+                        </div>
+                    </div>
+
+                </div> *@
+
             </div>
         </div>
-        <div class="layui-form-item ml10">
-            <div class="layui-input-block">
-                <button type="button" class="layui-btn" onclick="ConfirmImport()">立即导入</button>
-            </div>
+        <div class="layui-form-item layui-hide">
+            <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
         </div>
     </div>
+    </div>
+    </div>
 
     <script src="/layuiadmin/layui/layui.js"></script>
-    <script src="/layuiadmin/modules/Advertisment_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        //内容
+ @(Html.Raw(Library.Control.kindeditorVar("Contents")))
+
+
+        //编辑器
+        KindEditor.ready(function (K) {
+            //内容
+ @(Html.Raw(Library.Control.kindeditor("Contents", 1)))
+
+        });
+
+        var ids = "";
+        function getChildren(obj) {
+            $.each(obj, function (index, value) {
+                var id = obj[index].id;
+                ids += id + ",";
+                var children = obj[index].children;
+                if (children) {
+                    getChildren(children);
+                }
+            });
+        }
+
+        function movePrev(obj, tagId) {
+            $(obj).parent().prev().insertAfter($(obj).parent());
+            checkPics(tagId);
+        }
+        function moveNext(obj, tagId) {
+            $(obj).parent().next().insertBefore($(obj).parent());
+            checkPics(tagId);
+        }
+        function deletePic(obj, tagId) {
+            $(obj).parent().remove();
+            checkPics(tagId);
+        }
+        function checkPics(tagId) {
+            var pics = "";
+            var texts = "";
+            $("#" + tagId + "Image div img").each(function (i) {
+                pics += $(this).attr("src") + "|";
+            });
+            $("#" + tagId + "Image div input").each(function (i) {
+                texts += $(this).val() + "|";
+            });
+            if (pics == "") {
+                $("#" + tagId).val("");
+            } else {
+                pics = pics.substring(0, pics.length - 1);
+                texts = texts.substring(0, pics.length - 1);
+                $("#" + tagId).val(pics + "#cut#" + texts);
+            }
+        }
+        function showBigPic(picpath) {
+            parent.layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 0,
+                shadeClose: true,
+                area: ['auto', 'auto'],
+                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
+            });
+        }
+
+
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , element = layui.element
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util
+                , tree = layui.tree;
+            upload = layui.upload;
+
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+
+            //日期
+
+
+            //上传文件
+            WebUploadJs('PicPathBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload/v2', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("AdvertismentPicPath"))),  function (filename) {
+                $('#PicPathImage').html('<img src="' + osshost + filename + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(\'' + osshost + filename + '\')">')
+                $('#PicPath').val(filename);
+            });
+
+
+            //穿梭框
+
+
+            //TreeView,比如权限管理
+
+        })
+
+    </script>
 </body>
-</html>
+</html>

+ 3 - 0
Areas/Admin/Views/MainServer/ToChargeBackRecord/Index.cshtml

@@ -130,6 +130,9 @@
                         class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具回收确认退还</button>
                         } *@
                 </div>
+                 <blockquote class="layui-elem-quote layui-text">
+                    已扣款总金额(元):<span style="color: #f00;" id="SuccessAmount">0.00</span> | 待扣款总金额(元):<span style="color: #f00;" id="WaitAmount">0.00</span> | 暂停扣款总金额(元):<span style="color: #f00;" id="StopAmount">0.00</span>
+                </blockquote>
 
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
                 <script type="text/html" id="table-list-tools">

+ 235 - 0
Areas/Admin/Views/MainServer/UserCashRecordForBusiness/Add.cshtml

@@ -0,0 +1,235 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+
+}
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>直营团队提现记录(增加)</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+</head>
+
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+
+        <div class="layui-card">
+            <div class="layui-card-body">
+                <div class="layui-tab" lay-filter="mytabbar">
+                    <ul class="layui-tab-title">
+                        <li class="layui-this" lay-id="1">基本信息</li>
+                    </ul>
+                    <div class="layui-tab-content mt20">
+                        <div class="layui-tab-item layui-show">
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">创客编号</label>
+                                <div class="layui-input-inline">
+                                    <input class="layui-input" type="text" id="MakerCode" name="MakerCode"
+                                        maxlength="30" lay-verify="required|" autocomplete="off" placeholder="请输入创客编号">
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">创客姓名</label>
+                                <div class="layui-input-inline">
+                                    <input class="layui-input" type="text" id="RealName" name="RealName" maxlength="30"
+                                        lay-verify="required|" autocomplete="off" placeholder="请输入创客姓名">
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">提现金额</label>
+                                <div class="layui-input-inline">
+                                    <input class="layui-input" type="text" id="Amount" name="Amount" maxlength="30"
+                                        lay-verify="required|" autocomplete="off" placeholder="请输入提现金额">
+                                </div>
+                            </div>
+                            <div class="layui-form-item layui-form-text">
+                                <label class="layui-form-label">备注</label>
+                                <div class="layui-input-block">
+                                    <textarea class="layui-textarea" id="SeoKeyword" name="SeoKeyword" maxlength="128"
+                                        lay-verify="" placeholder="请输入备注"></textarea>
+                                </div>
+                            </div>
+                        </div>
+
+                    </div>
+                </div>
+                <div class="layui-form-item layui-hide">
+                    <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
+                        value="确认">
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script
+        src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+
+        //编辑器
+        KindEditor.ready(function (K) {
+
+        });
+
+        var ids = "";
+        function getChildren(obj) {
+            $.each(obj, function (index, value) {
+                var id = obj[index].id;
+                ids += id + ",";
+                var children = obj[index].children;
+                if (children) {
+                    getChildren(children);
+                }
+            });
+        }
+
+        function AreasProvinceInit(tagId, areasVal, form) {
+            for (var i = 0; i < provs_data.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(provs_data[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
+            }
+            form.render();
+        }
+
+        function AreasProvinceSelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "City").html('<option value="">市</option>');
+            var list = citys_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasCitySelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            var list = dists_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasAreaSelected(tagId, form) {
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+        function movePrev(obj, tagId) {
+            $(obj).parent().prev().insertAfter($(obj).parent());
+            checkPics(tagId);
+        }
+        function moveNext(obj, tagId) {
+            $(obj).parent().next().insertBefore($(obj).parent());
+            checkPics(tagId);
+        }
+        function deletePic(obj, tagId) {
+            $(obj).parent().remove();
+            checkPics(tagId);
+        }
+        function checkPics(tagId) {
+            var pics = "";
+            var texts = "";
+            $("#" + tagId + "Image div img").each(function (i) {
+                pics += $(this).attr("src").replace(osshost, '') + "|";
+            });
+            $("#" + tagId + "Image div input").each(function (i) {
+                texts += $(this).val() + "|";
+            });
+            if (pics == "") {
+                $("#" + tagId).val("");
+            } else {
+                pics = pics.substring(0, pics.length - 1);
+                texts = texts.substring(0, pics.length - 1);
+                $("#" + tagId).val(pics + "#cut#" + texts);
+            }
+        }
+        function checkBox(tagId) {
+            var text = "";
+            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
+                text += $(this).val() + ",";
+            });
+            $("#" + tagId).val(text);
+        }
+        function showBigPic(picpath) {
+            parent.layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 0,
+                shadeClose: true,
+                area: ['auto', 'auto'],
+                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
+            });
+        }
+
+
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+
+            //日期
+
+
+            //上传文件
+
+
+            //穿梭框
+
+
+            //TreeView,比如权限管理
+
+
+            //省市区
+
+        })
+
+    </script>
+</body>
+
+</html>

+ 108 - 0
Areas/Admin/Views/MainServer/UserCashRecordForBusiness/Index.cshtml

@@ -0,0 +1,108 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+
+}
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>直营团队提现记录</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <style>
+        .layui-input-inline {
+            width: 175px !important;
+        }
+
+        .layui-form-label {
+            width: 85px !important;
+        }
+
+        .layui-inline {
+            margin-right: 0px !important;
+        }
+
+        .w100 {
+            width: 100px !important;
+        }
+
+        .ml50 {
+            margin-left: 50px !important;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="layui-fluid">
+        <div class="layui-card">
+            <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">提现单号</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" name="CashOrderNo" 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="MakerCode" 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="RealName" 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" readonly name="CreateDateData" id="CreateDate"
+                                placeholder="" autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline ml50">
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
+                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
+                        </button>
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
+                            <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
+                        </button>
+                    </div>
+                    <div class="layui-card-body">
+                        <div style="padding-bottom: 10px;">
+                            @if (RightInfo.Contains("," + right + "_add,"))
+                            {
+                                <button class="layui-btn" data-type="add"><i
+                                        class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>新增</button>
+                            }
+                            @if (RightInfo.Contains("," + right + "_export,"))
+                            {
+                                <button class="layui-btn" data-type="ExportExcel"><i
+                                        class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
+                            }
+                        </div>
+                        <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script
+        src="/layuiadmin/modules_main/UserCashRecordForBusiness_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script>
+
+    </script>
+</body>
+
+</html>

+ 13 - 0
Areas/Admin/Views/MainServer/UserRankWhite/Index.cshtml

@@ -59,6 +59,19 @@
                             </select>
                         </div>
                     </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">顶级创客编号</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" name="TopMakerCode" 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" readonly name="UpdateDateData" id="UpdateDate"
+                                placeholder="" autocomplete="off">
+                        </div>
+                    </div>
                     <div class="layui-inline ml50">
                         <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
                             <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询

+ 4 - 0
Models/LeaderCompPrize.cs

@@ -17,6 +17,10 @@ namespace MySystem.Models
         public string SeoTitle { get; set; }
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal CompPrize { get; set; }
+        public ulong IsComp { get; set; }
         public int SecDirectCount { get; set; }
         public int NotDirectCount { get; set; }
         public int DirectCount { get; set; }

+ 31 - 0
Models/LeaderCompTradeStat.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class LeaderCompTradeStat
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public decimal ResultTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public decimal CheckTradeAmount { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+        public decimal SelfResultTradeAmount { get; set; }
+        public decimal SelfTradeAmount { get; set; }
+        public decimal CheckSelfTradeAmount { get; set; }
+    }
+}

+ 42 - 0
Models/UserCashRecordForBusiness.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class UserCashRecordForBusiness
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Remark { get; set; }
+        public string MediaSource { get; set; }
+        public string Ip { get; set; }
+        public DateTime? PaymentDate { get; set; }
+        public string ReturnMsg { get; set; }
+        public string ReturnCode { get; set; }
+        public string ResData { get; set; }
+        public string ReqData { get; set; }
+        public decimal ManageFee { get; set; }
+        public decimal TradeFee { get; set; }
+        public decimal ActualTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string ChanelName { get; set; }
+        public string ChannelCode { get; set; }
+        public string PayTradeNo { get; set; }
+        public int TradeType { get; set; }
+        public string SettleBankName { get; set; }
+        public string SettleBankCardNo { get; set; }
+        public string IdCardNo { get; set; }
+        public int UserId { get; set; }
+        public string CashOrderNo { get; set; }
+    }
+}

+ 255 - 1
Models/WebCMSEntities.cs

@@ -71,6 +71,7 @@ namespace MySystem.Models
         public virtual DbSet<KqProducts> KqProducts { get; set; }
         public virtual DbSet<LeaderAccountRecord> LeaderAccountRecord { get; set; }
         public virtual DbSet<LeaderCompPrize> LeaderCompPrize { get; set; }
+        public virtual DbSet<LeaderCompTradeStat> LeaderCompTradeStat { get; set; }
         public virtual DbSet<LeaderReserveRecord> LeaderReserveRecord { get; set; }
         public virtual DbSet<Leaders> Leaders { get; set; }
         public virtual DbSet<MachineApply> MachineApply { get; set; }
@@ -235,6 +236,7 @@ namespace MySystem.Models
         public virtual DbSet<UserCardForWeChat> UserCardForWeChat { get; set; }
         public virtual DbSet<UserCardRecord> UserCardRecord { get; set; }
         public virtual DbSet<UserCashRecord> UserCashRecord { get; set; }
+        public virtual DbSet<UserCashRecordForBusiness> UserCashRecordForBusiness { get; set; }
         public virtual DbSet<UserCenterIconList> UserCenterIconList { get; set; }
         public virtual DbSet<UserCollection> UserCollection { get; set; }
         public virtual DbSet<UserData> UserData { get; set; }
@@ -4193,6 +4195,10 @@ namespace MySystem.Models
 
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
+                entity.Property(e => e.CompPrize)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("达标奖励");
+
                 entity.Property(e => e.CreateDate)
                     .HasColumnType("datetime")
                     .HasComment("创建时间");
@@ -4207,9 +4213,24 @@ namespace MySystem.Models
                     .HasColumnType("int(11)")
                     .HasComment("直推达标人数");
 
+                entity.Property(e => e.IsComp)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'")
+                    .HasComment("是否达标");
+
                 entity.Property(e => e.NotDirectCount)
                     .HasColumnType("int(11)")
-                    .HasComment("简推达标人数");
+                    .HasComment("间推达标人数");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("上级创客集合")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("上级创客");
 
                 entity.Property(e => e.QueryCount)
                     .HasColumnType("int(11)")
@@ -4267,6 +4288,108 @@ namespace MySystem.Models
                     .HasComment("版本号");
             });
 
+            modelBuilder.Entity<LeaderCompTradeStat>(entity =>
+            {
+                entity.HasComment("领导人达标奖交易额统计");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CheckSelfTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("个人环比月交易额");
+
+                entity.Property(e => e.CheckTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("环比月交易额");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("上级创客集合")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("上级创客");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.ResultTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("增量交易");
+
+                entity.Property(e => e.SelfResultTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("个人增量交易");
+
+                entity.Property(e => e.SelfTradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("个人当月交易额");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.StatMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasComment("统计月份")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("当月交易额");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<LeaderReserveRecord>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -16326,6 +16449,137 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<UserCashRecordForBusiness>(entity =>
+            {
+                entity.HasComment("直营团队提现记录");
+
+                entity.HasIndex(e => new { e.UserId, e.TradeType, e.CashOrderNo })
+                    .HasName("UserCashRecordIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActualTradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CashOrderNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChanelName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelCode)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IdCardNo)
+                    .HasColumnType("varchar(18)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Ip)
+                    .HasColumnType("varchar(15)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ManageFee).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.MediaSource)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PayTradeNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PaymentDate).HasColumnType("datetime");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReqData)
+                    .HasColumnType("varchar(2048)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ResData)
+                    .HasColumnType("varchar(2048)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReturnCode)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReturnMsg)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleBankCardNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleBankName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeFee).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeType).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<UserCenterIconList>(entity =>
             {
                 entity.HasComment("个人中心常用工具");

+ 32 - 6
wwwroot/layuiadmin/modules/Advertisment_Admin.js

@@ -61,10 +61,11 @@ layui.config({
     //列表数据
     table.render({
         elem: '#LAY-list-manage'
-        , url: '/Admin/Advertisment/IndexData' //模拟接口
+        , url: '/Admin/Advertisment/IndexData?CurColId=' + CurColId //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
             , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
+            , { field: 'StatusName', width: 150, title: '状态', sort: true }
             , { field: 'Title', title: '标题', sort: true }
             , { field: 'ColId', title: '分类', sort: true }
             , { field: 'PicPath', title: '图片', width: 60, templet: '#imgTpl', unresize: true }
@@ -106,7 +107,7 @@ layui.config({
             var perContent = layer.open({
                 type: 2
                 , title: '广告位-编辑'
-                , content: 'Edit?Id=' + data.Id
+                , content: 'Edit?Id=' + data.Id + '&CurColId=' + CurColId
                 , maxmin: true
                 , area: ['500px', '450px']
                 , btn: ['确定', '取消']
@@ -118,9 +119,6 @@ layui.config({
                     //内容
                     iframeWindow.Contentsedit.sync();
 
-
-
-
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
                         var field = data.field; //获取提交的字段
@@ -154,6 +152,34 @@ layui.config({
                 }
             });
             layer.full(perContent);
+        } else if (obj.event === 'open') {
+            $.ajax({
+                type: "POST",
+                url: "/Admin/Advertisment/Open?r=" + Math.random(1),
+                data: "Id=" + data.Id,
+                dataType: "text",
+                success: function (data) {
+                    if (data == "success") {
+                        table.reload('LAY-list-manage'); //数据刷新
+                    } else {
+                        parent.layer.msg(data);
+                    }
+                }
+            });
+        } else if (obj.event === 'close') {
+            $.ajax({
+                type: "POST",
+                url: "/Admin/Advertisment/Close?r=" + Math.random(1),
+                data: "Id=" + data.Id,
+                dataType: "text",
+                success: function (data) {
+                    if (data == "success") {
+                        table.reload('LAY-list-manage'); //数据刷新
+                    } else {
+                        parent.layer.msg(data);
+                    }
+                }
+            });
         }
     });
 
@@ -208,7 +234,7 @@ layui.config({
             var perContent = layer.open({
                 type: 2
                 , title: '广告位-添加'
-                , content: 'Add'
+                , content: 'Add?CurColId=' + CurColId
                 , maxmin: true
                 , area: ['500px', '450px']
                 , btn: ['确定', '取消']

+ 40 - 12
wwwroot/layuiadmin/modules_main/ToChargeBackRecord_Admin.js

@@ -170,6 +170,9 @@ layui.config({
         , height: 'full-220'
         , text: '对不起,加载出现异常!'
         , done: function (res, curr, count) {
+            $("#SuccessAmount").text(res.other.SuccessAmount);
+            $("#WaitAmount").text(res.other.WaitAmount);
+            $("#StopAmount").text(res.other.StopAmount);
             $(".layui-none").text("无数据");
         }
     });
@@ -194,7 +197,7 @@ layui.config({
                     }
                 });
             });
-        }else if (obj.event === 'Break') {
+        } else if (obj.event === 'Break') {
             var index = layer.confirm('确定要暂停扣款吗?', function (index) {
                 $.ajax({
                     type: "POST",
@@ -211,7 +214,7 @@ layui.config({
                     }
                 });
             });
-        }else if (obj.event === 'Start') {
+        } else if (obj.event === 'Start') {
             var index = layer.confirm('确定要恢复扣款吗?', function (index) {
                 $.ajax({
                     type: "POST",
@@ -228,7 +231,7 @@ layui.config({
                     }
                 });
             });
-        }else if (obj.event === 'edit') {
+        } else if (obj.event === 'edit') {
             var tr = $(obj.tr);
             var perContent = layer.open({
                 type: 2
@@ -452,15 +455,40 @@ layui.config({
             $(".layuiadmin-card-header-auto select").each(function (i) {
                 userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
             });
-            $.ajax({
-                type: "GET",
-                url: "/Admin/ToChargeBackRecord/ExportExcel?r=" + Math.random(1),
-                data: userdata,
-                dataType: "json",
-                success: function (data) {
-                    data.Obj.unshift(data.Fields);
-                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
-                }
+            // $.ajax({
+            //     type: "GET",
+            //     url: "/Admin/ToChargeBackRecord/ExportExcel?r=" + Math.random(1),
+            //     data: userdata,
+            //     dataType: "json",
+            //     success: function (data) {
+            //         data.Obj.unshift(data.Fields);
+            //         excel.exportExcel(data.Obj, data.Info, 'xlsx');
+            //     }
+            // });
+            var index = layer.confirm('确定导出吗?', function (index) {
+                var indexs = layer.load(1, {
+                    shade: [0.5, '#000']
+                });
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/ToChargeBackRecord/QuickExportExcelDo?r=" + Math.random(1),
+                    data: userdata,
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(index); //关闭弹层
+                        if (data == "success") {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg('导出成功,请到我的下载中点击下载文件', {
+                                time: 1000
+                            }, function () {
+                                window.location.reload();
+                            });
+                        } else {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg(data);
+                        }
+                    }
+                });
             });
         }
         , Open: function () {

+ 265 - 0
wwwroot/layuiadmin/modules_main/UserCashRecordForBusiness_Admin.js

@@ -0,0 +1,265 @@
+var ExcelData;
+
+var excel;
+layui.config({
+    base: '/layuiadmin/' //静态资源所在路径
+}).extend({
+    myexcel: 'layui/lay/modules/excel',
+    index: 'lib/index' //主入口模块
+}).use(['index', 'table', 'excel', 'laydate'], function () {
+    var $ = layui.$,
+        form = layui.form,
+        table = layui.table;
+
+    //- 筛选条件-日期
+    var laydate = layui.laydate;
+    var layCreateDate = laydate.render({
+        elem: '#CreateDate',
+        type: 'date',
+        range: true,
+        trigger: 'click',
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
+
+
+    //excel导入
+    excel = layui.excel;
+    $('#ExcelFile').change(function (e) {
+        var files = e.target.files;
+        excel.importExcel(files, {}, function (data) {
+            ExcelData = data[0].sheet1;
+        });
+    });
+
+    //监听单元格编辑
+    table.on('edit(LAY-list-manage)', function (obj) {
+        var value = obj.value //得到修改后的值
+            ,
+            data = obj.data //得到所在行所有键值
+            ,
+            field = obj.field; //得到字段
+        if (field == "Sort") {
+            $.ajax({
+                type: "POST",
+                url: "/Admin/UserCashRecordForBusiness/Sort?r=" + Math.random(1),
+                data: "Id=" + data.Id + "&Sort=" + value,
+                dataType: "text",
+                success: function (data) { }
+            });
+        }
+    });
+
+    //列表数据
+    table.render({
+        elem: '#LAY-list-manage',
+        url: '/Admin/UserCashRecordForBusiness/IndexData' //模拟接口
+        ,
+        cols: [[
+            { type: 'checkbox', fixed: 'left' }
+            , { field: 'MakerCode', width: 200, title: '创客编号', sort: true }
+            , { field: 'RealName', width: 200, title: '创客姓名', sort: true }
+            , { field: 'CashOrderNo', width: 200, title: '提现单号', sort: true }
+            , { field: 'TradeAmount', width: 200, title: '提现金额', sort: true }
+            , { field: 'CreateDate', width: 200, title: '提现时间', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '备注', sort: true }
+            , { field: 'CreateMan', width: 200, title: '操作人', sort: true }
+            // , { title: '操作', align: 'center', width: 300, fixed: 'right', 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("无数据");
+            layer.close(loadindex);
+        }
+    });
+
+    //监听工具条
+    table.on('tool(LAY-list-manage)', function (obj) {
+        var data = obj.data;
+    });
+
+
+    //监听搜索
+    form.on('submit(LAY-list-front-search)', function (data) {
+        var field = data.field;
+
+        //执行重载
+        table.reload('LAY-list-manage', {
+            where: field,
+            page: {
+                curr: 1
+            }
+        });
+    });
+    form.on('submit(LAY-list-front-searchall)', function (data) {
+        table.reload('LAY-list-manage', {
+            where: null,
+            page: {
+                curr: 1
+            }
+        });
+    });
+
+    //事件
+    var active = {
+        add: function () {
+            var perContent = layer.open({
+                type: 2,
+                title: '直营团队提现记录-添加',
+                content: 'Add',
+                maxmin: true,
+                area: ['500px', '450px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    setTimeout(function () {
+                        layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
+                            var errObj = $(this).find('.layui-form-danger');
+                            if (errObj.length > 0) {
+                                iframeWindow.element.tabChange('mytabbar', String(i + 1));
+                                submit.click();
+                            }
+                        });
+                    }, 300);
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+
+                        // var info = "";
+                        // $.ajax({
+                        //     url: "/Admin/UserCashRecordForBusiness/GetReserve?r=" + Math.random(1),
+                        //     // data: searchInfo,
+                        //     data: userdata,
+                        //     dataType: "text",
+                        //     success: function (data) {
+                        //         info = data;
+
+                        //     }
+                        // });
+
+                        // var indexs = layer.confirm('确定要进行提现吗?' + info, function (indexs) {
+
+                        getInfo(userdata, function (info) {
+                            var indexs = layer.confirm(info + '\n确定要进行提现吗?', function (indexs) {
+                                $.ajax({
+                                    type: "POST",
+                                    url: "/Admin/UserCashRecordForBusiness/Add?r=" + Math.random(1),
+                                    data: userdata,
+                                    dataType: "text",
+                                    success: function (data) {
+                                        layer.close(index); //关闭弹层
+                                        layer.close(indexs); //关闭弹层
+                                        if (data == "success") {
+                                            layer.msg("成功");
+                                            table.reload('LAY-list-manage'); //数据刷新
+                                        } else {
+                                            layer.msg(data);
+                                        }
+                                    }
+                                });
+                            });
+                        })
+                    });
+
+                    submit.trigger('click');
+                }
+            });
+            // layer.full(perContent);
+        },
+        ExportExcel: function () {
+            var userdata = '';
+            $(".layuiadmin-card-header-auto input").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            $(".layuiadmin-card-header-auto select").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            // $.ajax({
+            //     type: "GET",
+            //     url: "/Admin/UserCashRecordForBusiness/ExportExcel?r=" + Math.random(1),
+            //     data: userdata,
+            //     dataType: "json",
+            //     success: function (data) {
+            //         data.Obj.unshift(data.Fields);
+            //         excel.exportExcel(data.Obj, data.Info, 'xlsx');
+            //     }
+            // });
+            var index = layer.confirm('确定导出吗?', function (index) {
+                var indexs = layer.load(1, {
+                    shade: [0.5, '#000']
+                });
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/UserCashRecordForBusiness/QuickExportExcelDo?r=" + Math.random(1),
+                    data: userdata,
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(index); //关闭弹层
+                        if (data == "success") {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg('导出成功,请到我的下载中点击下载文件', {
+                                time: 1000
+                            }, function () {
+                                window.location.reload();
+                            });
+                        } else {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg(data);
+                        }
+                    }
+                });
+            });
+        }
+    };
+
+    $('.layui-btn').on('click', function () {
+        var type = $(this).data('type');
+        active[type] ? active[type].call(this) : '';
+    });
+});
+
+function getInfo(userdata, func) {
+    $.ajax({
+        url: "/Admin/UserCashRecordForBusiness/GetReserve?r=" + Math.random(1),
+        data: userdata,
+        dataType: "text",
+        success: function (data) {
+            info = data;
+            func(info);
+        }
+    });
+};

+ 123 - 71
wwwroot/layuiadmin/modules_main/UserRankWhite_Admin.js

@@ -31,49 +31,76 @@ layui.config({
     //- 筛选条件-日期
     var laydate = layui.laydate;
     var layCreateDate = laydate.render({
-elem: '#CreateDate',
-type: 'date',
-range: true,
-trigger: 'click',
-change: function (value, date, endDate) {
-var op = true;
-if (date.year == endDate.year && endDate.month - date.month <= 1) {
-if (endDate.month - date.month == 1 && endDate.date > date.date) {
-op = false;
-layCreateDate.hint('日期范围请不要超过1个月');
-setTimeout(function () {
-$(".laydate-btns-confirm").addClass("laydate-disabled");
-}, 1);
-}
-} else {
-op = false;
-layCreateDate.hint('日期范围请不要超过1个月');
-setTimeout(function () {
-$(".laydate-btns-confirm").addClass("laydate-disabled");
-}, 1);
-}
-if (op) {
-$('#CreateDate').val(value);
-}
-}
-});
+        elem: '#CreateDate',
+        type: 'date',
+        range: true,
+        trigger: 'click',
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
+    var layUpdateDate = laydate.render({
+        elem: '#UpdateDate',
+        type: 'date',
+        range: true,
+        trigger: 'click',
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layUpdateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layUpdateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#UpdateDate').val(value);
+            }
+        }
+    });
 
 
     //excel导入
-    excel = layui.excel;        
+    excel = layui.excel;
     $('#ExcelFile').change(function (e) {
         var files = e.target.files;
-        excel.importExcel(files, { }, function (data) {
+        excel.importExcel(files, {}, function (data) {
             ExcelData = data[0].sheet1;
         });
     });
 
     //监听单元格编辑
-    table.on('edit(LAY-list-manage)', function(obj){
+    table.on('edit(LAY-list-manage)', function (obj) {
         var value = obj.value //得到修改后的值
-        ,data = obj.data //得到所在行所有键值
-        ,field = obj.field; //得到字段
-        if(field == "Sort"){
+            , data = obj.data //得到所在行所有键值
+            , field = obj.field; //得到字段
+        if (field == "Sort") {
             $.ajax({
                 type: "POST",
                 url: "/Admin/UserRankWhite/Sort?r=" + Math.random(1),
@@ -84,27 +111,27 @@ $('#CreateDate').val(value);
             });
         }
     });
-    
+
     //列表数据
     table.render({
         elem: '#LAY-list-manage'
         , url: '/Admin/UserRankWhite/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
-            ,{field:'MakerCode', width: 200, title:'创客编号', sort: true}
-            ,{field:'RealName', width: 200, title:'创客姓名', sort: true}
-            ,{field:'ParentMakerCode', width: 200, title:'上级创客编号', sort: true}
-            ,{field:'ParentRealName', width: 200, title:'上级创客名称', sort: true}
-            // ,{field:'TopMakerCode', width: 200, title:'顶级创客编号', sort: true}
-            // ,{field:'TopRealName', width: 200, title:'顶级创客名称', sort: true}
-            ,{field:'Rank', width: 200, title:'等级名称', sort: true}
-            ,{field:'Status', width: 200, title:'有效状态', sort: true}
-            ,{field:'CreateDate', width: 200, title:'创建时间', sort: true}
-            ,{field:'UpdateDate', width: 200, title:'过期时间', sort: true}
+            , { field: 'MakerCode', width: 200, title: '创客编号', sort: true }
+            , { field: 'RealName', width: 200, title: '创客姓名', sort: true }
+            , { field: 'ParentMakerCode', width: 200, title: '上级创客编号', sort: true }
+            , { field: 'ParentRealName', width: 200, title: '上级创客名称', sort: true }
+            , { field: 'TopMakerCode', width: 200, title: '顶级创客编号', sort: true }
+            , { field: 'TopRealName', width: 200, title: '顶级创客名称', sort: true }
+            , { field: 'Rank', width: 200, title: '等级名称', sort: true }
+            , { field: 'Status', width: 200, title: '有效状态', sort: true }
+            , { field: 'CreateDate', width: 200, title: '预设时间', sort: true }
+            , { field: 'UpdateDate', width: 200, title: '到期时间', sort: true }
             , { title: '操作', align: 'center', width: 100, fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
-            
+
         }
         , page: true
         , limit: 30
@@ -126,7 +153,7 @@ $('#CreateDate').val(value);
                     data: "Id=" + data.Id,
                     dataType: "text",
                     success: function (data) {
-                        if (data == "success") {                            
+                        if (data == "success") {
                             obj.del();
                             layer.close(index);
                         } else {
@@ -149,20 +176,20 @@ $('#CreateDate').val(value);
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -173,7 +200,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/UserRankWhite/Edit?r=" + Math.random(1),
@@ -265,7 +292,7 @@ $('#CreateDate').val(value);
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
@@ -275,10 +302,10 @@ $('#CreateDate').val(value);
                         });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -289,7 +316,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/UserRankWhite/Add?r=" + Math.random(1),
@@ -329,23 +356,48 @@ $('#CreateDate').val(value);
             $(".layuiadmin-card-header-auto select").each(function (i) {
                 userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
             });
-            $.ajax({
-                type: "GET",
-                url: "/Admin/UserRankWhite/ExportExcel?r=" + Math.random(1),
-                data: userdata,
-                dataType: "json",
-                success: function (data) {
-                    data.Obj.unshift(data.Fields);
-                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
-                }
+            // $.ajax({
+            //     type: "GET",
+            //     url: "/Admin/UserRankWhite/ExportExcel?r=" + Math.random(1),
+            //     data: userdata,
+            //     dataType: "json",
+            //     success: function (data) {
+            //         data.Obj.unshift(data.Fields);
+            //         excel.exportExcel(data.Obj, data.Info, 'xlsx');
+            //     }
+            // });
+            var index = layer.confirm('确定导出吗?', function (index) {
+                var indexs = layer.load(1, {
+                    shade: [0.5, '#000']
+                });
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/UserRankWhite/QuickExportExcelDo?r=" + Math.random(1),
+                    data: userdata,
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(index); //关闭弹层
+                        if (data == "success") {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg('导出成功,请到我的下载中点击下载文件', {
+                                time: 1000
+                            }, function () {
+                                window.location.reload();
+                            });
+                        } else {
+                            layer.close(indexs); //关闭弹层
+                            layer.msg(data);
+                        }
+                    }
+                });
             });
         }
         , Open: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要开启的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";
@@ -372,9 +424,9 @@ $('#CreateDate').val(value);
         , Close: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要关闭的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";