独孤洋\DuGuYang 3 лет назад
Родитель
Сommit
65f5cc437e

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

@@ -1516,7 +1516,7 @@ namespace MySystem.Areas.Admin.Controllers
 
         #endregion
 
-
+        //TODO:关联分仓和取消关联要添加额度变动记录
         #region 关联分仓
 
         /// <summary>

+ 2 - 1
Areas/Admin/Controllers/OperateServer/StoreMachineApplyOperateController.cs

@@ -552,6 +552,7 @@ namespace MySystem.Areas.Admin.Controllers
 
         #endregion
 
+        //TODO:总仓给运营中心机关联的分仓发货应操作哪些数据
         #region 审核发货
 
         [HttpPost]
@@ -905,7 +906,7 @@ namespace MySystem.Areas.Admin.Controllers
                 var sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.QueryCount == 1 && m.Status == 0 && m.UserId == storeSH.UserId) ?? new SysAdmin();
                 if (sysAdmin.Id > 0)
                 {
-                    // sysAdmin.TotalMachineCount += item.Num;
+                    sysAdmin.TotalMachineCount += item.Num;
                 }
             }
             apply.SeoTitle = SysUserName + '-' + SysRealName;//添加操作人信息

+ 5 - 5
Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs

@@ -216,7 +216,7 @@ namespace MySystem.Areas.Admin.Controllers
                             Sort = edit.Id,//所属运营中心
                             CreateMan = SysUserName + "_" + SysRealName,
                             Details = "运营中心管理员,可以操作运营中心所有权限",
-                            RightInfo = ",1_1,1_1_1,1_1_1_edit,1_2,1_2_1,1_2_2,1_2_1_export,1_3,1_3_1,1_3_1_import,1_4,1_4_1,1_4_1_add,1_4_2,1_4_2_add,1_6,1_6_1,1_6_1_add,1_6_1_delete,1_6_1_edit,1_6_2,1_6_2_add,1_6_2_delete,1_6_2_edit,",
+                            RightInfo = ",1_1,1_1_1,1_1_1_edit,1_2,1_2_1,1_2_2,1_2_3,1_2_1_export,1_3,1_3_1,1_3_1_import,1_4,1_4_1,1_4_1_add,1_4_2,1_4_2_add,1_4_3,1_6,1_6_1,1_6_1_add,1_6_1_delete,1_6_1_edit,1_6_2,1_6_2_add,1_6_2_delete,1_6_2_edit,",
                             Name = "运营中心管理员",
 
                         }).Entity;
@@ -565,7 +565,7 @@ namespace MySystem.Areas.Admin.Controllers
         [HttpPost]
         public string EditAmt(SysAdmin data, string OperationAmount, string Note, int Kind)
         {
-            int OpId = data.Id;
+            int OpId = data.UserId;
             var account = opdb.UserAccount.FirstOrDefault(m => m.UserId == OpId);
             //扣减
             if (Kind == 1 && decimal.Parse(OperationAmount) > account.ValidAmount)
@@ -576,6 +576,7 @@ namespace MySystem.Areas.Admin.Controllers
             if (Kind == 1 && decimal.Parse(OperationAmount) <= account.ValidAmount)
             {
                 account.ValidAmount -= decimal.Parse(OperationAmount);
+                account.TotalAmount -= decimal.Parse(OperationAmount);
                 OperateType = 1;//系统扣减
             }
             else if (Kind == 1 && decimal.Parse(OperationAmount) > account.ValidAmount)
@@ -586,6 +587,7 @@ namespace MySystem.Areas.Admin.Controllers
             else if (Kind == 2)
             {
                 account.ValidAmount += decimal.Parse(OperationAmount);
+                account.TotalAmount += decimal.Parse(OperationAmount);
                 OperateType = 2;//系统增加
             }
             AmountRecord amountRecord = opdb.AmountRecord.Add(new AmountRecord()
@@ -593,14 +595,12 @@ namespace MySystem.Areas.Admin.Controllers
                 CreateDate = DateTime.Now,
                 UserId = OpId, //运营中心Id
                 CreateMan = SysUserName + "-" + SysRealName,
-                UpdateMan = SysUserName + "-" + SysRealName,
                 UseAmount = decimal.Parse(OperationAmount),//操作金额
                 BeforeAmount = account.ValidAmount,//使用前剩余额度
                 AfterAmount = account.ValidAmount + decimal.Parse(OperationAmount),//使用后剩余额度
                 OperateType = OperateType,//操作类别
             }).Entity;
             opdb.SaveChanges();
-            RedisDbconn.Instance.Set("OpUserAccount:" + OpId, account);
             AddSysLog(data.Id.ToString(), "SysAdmin", "EditAmt");
             opdb.SaveChanges();
             return "success";
@@ -627,7 +627,7 @@ namespace MySystem.Areas.Admin.Controllers
         [HttpPost]
         public string EditBalance(SysAdmin data, string OperationAmount, string Note, int Kind)
         {
-            int OpId = data.Id;
+            int OpId = data.UserId;
             var account = opdb.UserAccount.FirstOrDefault(m => m.UserId == OpId);
             if ((Kind == 1 || Kind == 3) && decimal.Parse(OperationAmount) > account.BalanceAmount)
             {

+ 668 - 0
Areas/Admin/Controllers/OperateServer/UserCashRecordOperatesController.cs

@@ -0,0 +1,668 @@
+/*
+ * 提现记录
+ */
+
+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.OpModels;
+using Library;
+using LitJson;
+using MySystemLib;
+
+namespace MySystem.Areas.Admin.Controllers
+{
+    [Area("Admin")]
+    [Route("Admin/[controller]/[action]")]
+    public class UserCashRecordOperatesController : BaseController
+    {
+        public UserCashRecordOperatesController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
+        {
+            OtherMySqlConn.connstr = ConfigurationManager.AppSettings["OpSqlConnStr"].ToString();
+        }
+
+        #region 提现记录列表
+
+        /// <summary>
+        /// 根据条件查询提现记录列表
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Index(UserCashRecord 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(UserCashRecord data, string OpCode, string StatusSelect, string CreateDateData, int page = 1, int limit = 30)
+        {
+
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+            Fields.Add("CashOrderNo", "1"); //提现单号
+            Fields.Add("TradeType", "0"); //交易类型
+
+            string condition = " and Status>-1 and TradeType=3";
+            //运营中心编号
+            if (!string.IsNullOrEmpty(OpCode))
+            {
+                condition += " and UserId in (select UserId from SysAdmin where OpCode='" + OpCode + "')";
+            }
+            //提现状态
+            if (!string.IsNullOrEmpty(StatusSelect))
+            {
+                condition += " and Status=" + StatusSelect;
+            }
+            if (!string.IsNullOrEmpty(data.CashOrderNo))
+            {
+                condition += " and CashOrderNo='" + data.CashOrderNo + "'";
+            }
+            if (data.TradeType > 0)
+            {
+                condition += " and TradeType=" + data.TradeType;
+            }
+
+            if (!string.IsNullOrEmpty(CreateDateData))
+            {
+                string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                // string start = datelist[0];
+                // string end = datelist[1];
+                // condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
+                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 = opdb.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType < 3);
+                var checks = opdb.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType < 3);
+                if (check)
+                {
+                    var sId = opdb.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType < 3).Min(m => m.Id);
+                    condition += "  and Id >=" + sId;
+                }
+                if (checks)
+                {
+                    var eId = opdb.UserCashRecord.Where(m => m.CreateDate <= end && m.TradeType < 3).Max(m => m.Id);
+                    condition += " and Id <=" + eId;
+                }
+            }
+            else
+            {
+                var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
+                var check = opdb.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType < 3);
+                if (check)
+                {
+                    var minId = opdb.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType < 3).Min(m => m.Id);
+                    var Info = function.ReadInstance("/WritePage/OpUserCashRecord/OpUserCashRecord.txt");
+                    if (string.IsNullOrEmpty(Info.ToString()))
+                    {
+                        function.WritePage("/WritePage/OpUserCashRecord/", "OpUserCashRecord.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.OpTables).IndexData("UserCashRecord", 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());
+                SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == UserId) ?? new SysAdmin();
+                dic["OpCode"] = sysAdmin.OpCode;
+                dic["MakerCode"] = sysAdmin.MakerCode;
+                dic["RealName"] = sysAdmin.MakerName;
+                dic["TradeType"] = RelationClassForConst.GetTradeTypeInfo(int.Parse(dic["TradeType"].ToString()));
+                int Status = int.Parse(dic["Status"].ToString());
+                if (Status == 0) dic["StatusName"] = "处理中";
+                if (Status == 1) dic["StatusName"] = "成功";
+                if (Status == 2) dic["StatusName"] = "失败";
+
+                int QueryCount = int.Parse(dic["QueryCount"].ToString());
+                if (QueryCount == 0) dic["LockName"] = "待提交";
+                if (QueryCount == 1) dic["LockName"] = "已提交";
+            }
+            Dictionary<string, object> other = new Dictionary<string, object>();
+
+            string WaitAmount = "0.00";//待处理总金额
+            string SuccessAmount = "0.00";//提现成功总金额
+            string FailAmount = "0.00";//提现失败总金额
+            DataTable dt = OtherMySqlConn.dtable("SELECT SUM(if(Status=0,TradeAmount,0)),SUM(if(Status=1,TradeAmount,0)),SUM(if(Status=2,TradeAmount,0)) FROM UserCashRecord where 1=1 " + condition);
+            if (dt.Rows.Count > 0)
+            {
+                WaitAmount = decimal.Parse(function.CheckNum(dt.Rows[0][0].ToString())).ToString("f2");
+                SuccessAmount = decimal.Parse(function.CheckNum(dt.Rows[0][1].ToString())).ToString("f2");
+                FailAmount = decimal.Parse(function.CheckNum(dt.Rows[0][2].ToString())).ToString("f2");
+            }
+            other.Add("WaitAmount", WaitAmount);
+            other.Add("SuccessAmount", SuccessAmount);
+            other.Add("FailAmount", FailAmount);
+            obj.Add("other", other);
+            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(UserCashRecord data)
+        {
+            Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+            Fields.Add("Remark", data.Remark); //备注
+
+            Fields.Add("SeoTitle", data.SeoTitle);
+            Fields.Add("SeoKeyword", data.SeoKeyword);
+            Fields.Add("SeoDescription", data.SeoDescription);
+            int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Add("UserCashRecord", Fields, 0);
+            AddSysLog(data.Id.ToString(), "UserCashRecord", "add");
+            db.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 修改提现记录
+
+        /// <summary>
+        /// 增加或修改提现记录信息
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Edit(string right, int Id = 0)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            UserCashRecord editData = opdb.UserCashRecord.FirstOrDefault(m => m.Id == Id) ?? new UserCashRecord();
+            ViewBag.data = editData;
+            return View();
+        }
+
+        #endregion
+
+        #region 修改提现记录
+
+        /// <summary>
+        /// 增加或修改提现记录信息
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string Edit(UserCashRecord data)
+        {
+            Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+            Fields.Add("Remark", data.Remark); //备注
+
+            Fields.Add("SeoTitle", data.SeoTitle);
+            Fields.Add("SeoKeyword", data.SeoKeyword);
+            Fields.Add("SeoDescription", data.SeoDescription);
+            new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("UserCashRecord", Fields, data.Id);
+            AddSysLog(data.Id.ToString(), "UserCashRecord", "update");
+            opdb.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 删除提现记录信息
+
+        /// <summary>
+        /// 删除提现记录信息
+        /// </summary>
+        /// <returns></returns>
+        public string Delete(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "UserCashRecord", "del");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", -1);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("UserCashRecord", Fields, id);
+            }
+            opdb.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 开启
+
+        /// <summary>
+        /// 开启
+        /// </summary>
+        /// <returns></returns>
+        public string Open(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "UserCashRecord", "open");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", 1);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("UserCashRecord", Fields, id);
+            }
+            opdb.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+        #region 关闭
+
+        /// <summary>
+        /// 关闭
+        /// </summary>
+        /// <returns></returns>
+        public string Close(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "UserCashRecord", "close");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", 0);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("UserCashRecord", Fields, id);
+            }
+            opdb.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+
+        #region 批量设置成功
+
+        /// <summary>
+        /// 批量设置成功
+        /// </summary>
+        /// <returns></returns>
+        public string BatchSetting(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "OpUserCashRecord", "BatchSetting");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", 1);//设置提现记录为成功
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("UserCashRecord", Fields, id);
+                var userCashRecord = opdb.UserCashRecord.FirstOrDefault(m => m.Id == id) ?? new UserCashRecord();
+                if (userCashRecord.Id > 0)
+                {
+                    UserAccount account = opdb.UserAccount.FirstOrDefault(m => m.UserId == Convert.ToInt32(userCashRecord.UserId));
+                    if (account != null)
+                    {
+                        account.QueryCount = 1;
+                        decimal TradeAmount = userCashRecord.TradeAmount;
+                        decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                        decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
+                        decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                        decimal AfterTotalAmount = account.TotalAmount; //变更后总金额
+                        decimal AfterFreezeAmount = account.FreezeAmount; //变更后冻结金额
+                        decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
+                        opdb.UserAccountRecord.Add(new UserAccountRecord()
+                        {
+                            CreateDate = DateTime.Now,
+                            UserId = userCashRecord.UserId, //运营中心
+                            ChangeType = 3, //变动类型
+                            ProductType = 99, //产品类型
+                            ChangeAmount = userCashRecord.ActualTradeAmount, //变更金额
+                            BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                            AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                            BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                            AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                            BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                            AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                        });
+                        opdb.UserAccountRecord.Add(new UserAccountRecord()
+                        {
+                            CreateDate = DateTime.Now,
+                            UserId = userCashRecord.UserId, //运营中心
+                            ChangeType = 4, //变动类型
+                            ProductType = 99, //产品类型
+                            ChangeAmount = userCashRecord.TradeFee, //变更金额
+                            BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                            AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                            BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                            AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                            BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                            AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                        });
+                        opdb.UserAccountRecord.Add(new UserAccountRecord()
+                        {
+                            CreateDate = DateTime.Now,
+                            UserId = userCashRecord.UserId, //运营中心
+                            ChangeType = 5, //变动类型
+                            ProductType = 99, //产品类型
+                            ChangeAmount = userCashRecord.ManageFee, //变更金额
+                            BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                            AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                            BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                            AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                            BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                            AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                        });
+                        opdb.SaveChanges();
+                        RedisDbconn.Instance.Set("OpUserAccount:" + userCashRecord.UserId, account);
+                    }
+                }
+            }
+            opdb.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+        #region 排序
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id"></param>
+        public string Sort(int Id, int Sort)
+        {
+            new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Sort("UserCashRecord", Sort, Id);
+
+            AddSysLog(Id.ToString(), "UserCashRecord", "sort");
+            return "success";
+        }
+        #endregion
+
+        #region 导入数据
+
+        public IActionResult Import(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+            return View();
+        }
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData"></param>
+        [HttpPost]
+        public string ImportPost(string ExcelPath)
+        {
+            string key = function.MD5_16(Guid.NewGuid().ToString());
+            RedisDbconn.Instance.AddList("ExcelImportV3", ExcelPath + "#cut#OpUserCashRecord#cut#" + key + "#cut#" + SysUserName);
+            return "success|" + key;
+        }
+        public string CheckImport(string key)
+        {
+            string result = RedisDbconn.Instance.Get<string>("OpCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    return result;
+                }
+                return datalist[0];
+            }
+            return "0";
+        }
+        #endregion
+
+        #region 导出Excel
+
+        /// <summary>
+        /// 导出Excel
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult ExportExcel(UserCashRecord data, string OpCode, string StatusSelect, string PayStatus)
+        {
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+            Fields.Add("CashOrderNo", "1"); //提现单号
+            Fields.Add("CreateDate", "3"); //创建时间
+            Fields.Add("TradeType", "0"); //交易类型
+
+            string condition = " and Status>-1 and TradeType=3";
+            //运营中心编号
+            if (!string.IsNullOrEmpty(OpCode))
+            {
+                var sysUser = opdb.SysAdmin.FirstOrDefault(m => m.OpCode == OpCode) ?? new OpModels.SysAdmin();
+                if (sysUser.Id > 0)
+                {
+                    condition += " and OpId=" + sysUser.UserId;
+                }
+            }
+            //提现状态
+            if (!string.IsNullOrEmpty(StatusSelect))
+            {
+                condition += " and Status=" + StatusSelect;
+            }
+            //提交到代付状态
+            if (!string.IsNullOrEmpty(PayStatus))
+            {
+                int QueryCount = int.Parse(function.CheckInt(PayStatus));
+                if (QueryCount == 2)
+                {
+                    QueryCount = 0;
+                }
+                condition += " and QueryCount=" + QueryCount;
+            }
+
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).IndexData("UserCashRecord", Fields, "Id desc", "0", 1, 20000, condition, "CashOrderNo,UserId,IdCardNo,ActualTradeAmount,Remark,Status,QueryCount,CreateDate", false);
+            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());
+                SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == UserId) ?? new SysAdmin();
+                var user = db.Users.FirstOrDefault(m => m.Id == sysAdmin.UserId) ?? new Models.Users();
+                dic["OpCode"] = sysAdmin.OpCode;
+                dic["MakerCode"] = sysAdmin.MakerCode;
+                dic["MakerName"] = sysAdmin.MakerName;
+                dic["RealName"] = sysAdmin.RealName;
+                dic["Mobile"] = sysAdmin.MakerMobile;
+                dic["SettleBankName"] = user.SettleBankName;
+                dic["SettleBankCardNo"] = user.SettleBankCardNo;
+                dic.Remove("UserId");
+                // dic["TradeType"] = RelationClassForConst.GetTradeTypeInfo(int.Parse(dic["TradeType"].ToString()));
+                int Status = int.Parse(dic["Status"].ToString());
+                if (Status == 0) dic["StatusName"] = "处理中";
+                if (Status == 1) dic["StatusName"] = "成功";
+                if (Status == 2) dic["StatusName"] = "失败";
+                dic.Remove("Status");
+
+                int QueryCount = int.Parse(dic["QueryCount"].ToString());
+                if (QueryCount == 0) dic["LockName"] = "待提交";
+                if (QueryCount == 1) dic["LockName"] = "已提交";
+                dic.Remove("QueryCount");
+            }
+
+            Dictionary<string, object> result = new Dictionary<string, object>();
+            result.Add("Status", "1");
+            result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
+            result.Add("Obj", diclist);
+            Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
+            ReturnFields.Add("CashOrderNo", "提现单号");
+            ReturnFields.Add("OpCode", "运营中心编号");
+            ReturnFields.Add("MakerCode", "创客编号");
+            ReturnFields.Add("MakerName", "创客姓名");
+            ReturnFields.Add("Mobile", "手机号");
+            ReturnFields.Add("IdCardNo", "身份证号");
+            ReturnFields.Add("SettleBankName", "开户行名称");
+            ReturnFields.Add("SettleBankCardNo", "开户行卡号");
+            ReturnFields.Add("ActualTradeAmount", "发佣金额(单位:元)");
+            ReturnFields.Add("LockName", "代付标记");
+            ReturnFields.Add("StatusName", "状态");
+            ReturnFields.Add("Remark", "备注");
+            ReturnFields.Add("CreateDate", "创建时间");
+
+            // ReturnFields.Add("CashOrderNo", "提现单号");
+            // ReturnFields.Add("MakerCode", "创客编码");
+            // ReturnFields.Add("RealName", "创客名称");
+            // ReturnFields.Add("IdCardNo", "身份证号");
+            // ReturnFields.Add("SettleBankCardNo", "提现卡号");
+            // ReturnFields.Add("SettleBankName", "银行名称");
+            // ReturnFields.Add("TradeType", "交易类型");
+            // ReturnFields.Add("TradeAmount", "交易金额(元)");
+            // ReturnFields.Add("Status", "订单状态");
+            // ReturnFields.Add("ReturnCode", "提现服务返回编码");
+            // ReturnFields.Add("ReturnMsg", "提现服务返回信息");
+            result.Add("Fields", ReturnFields);
+            AddSysLog("0", "OpUserCashRecord", "ExportExcel");
+            return Json(result);
+        }
+
+        #endregion
+
+
+        #region 拒绝
+
+        /// <summary>
+        /// 拒绝
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Reduce(string right, int Id = 0)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            UserCashRecord editData = opdb.UserCashRecord.FirstOrDefault(m => m.Id == Id) ?? new UserCashRecord();
+            ViewBag.data = editData;
+
+            return View();
+        }
+
+        #endregion
+
+        #region 拒绝
+
+        /// <summary>
+        /// 拒绝
+        /// </summary>
+        /// <returns></returns>
+        public string ReduceDo(int Id, string Remark)
+        {
+            AddSysLog(Id, "UserCashRecord", "Reduce");
+            UserCashRecord edit = opdb.UserCashRecord.FirstOrDefault(m => m.Id == Id);
+            if (edit != null)
+            {
+                edit.Status = 2;
+                edit.Remark = Remark;
+                edit.UpdateMan = SysUserName;
+                UserAccount account = opdb.UserAccount.FirstOrDefault(m => m.Id == edit.UserId);
+                if (account != null)
+                {
+                    decimal TradeAmount = edit.TradeAmount;
+                    decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                    decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
+                    decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                    //TODO: 运营中心额度提现扣减和增加金额的字段不明确
+                    account.BalanceAmount += TradeAmount;//返回余额
+                    decimal AfterTotalAmount = account.TotalAmount; //变更后总金额
+                    decimal AfterFreezeAmount = account.FreezeAmount; //变更后冻结金额
+                    decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
+                    opdb.UserAccountRecord.Add(new UserAccountRecord()
+                    {
+                        CreateDate = DateTime.Now,
+                        UserId = edit.UserId, //创客
+                        ChangeType = 6, //变动类型
+                        ProductType = 99, //产品类型
+                        ChangeAmount = TradeAmount, //变更金额
+                        BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                        AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                        BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                        AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                        BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                        AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                    });
+                    opdb.SaveChanges();
+                }
+
+                opdb.SaveChanges();
+            }
+            return "success";
+        }
+
+        #endregion
+
+
+        #region 解除
+
+        /// <summary>
+        /// 解除
+        /// </summary>
+        /// <returns></returns>
+        public string Cancel(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "WithdrawRecord", "Cancel");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                UserCashRecord edit = opdb.UserCashRecord.FirstOrDefault(m => m.Id == id);
+                if (edit != null)
+                {
+                    edit.QueryCount = 0;
+                    opdb.SaveChanges();
+                }
+            }
+
+            return "success";
+        }
+
+        #endregion
+
+    }
+}

+ 7 - 0
Areas/Admin/Views/MainServer/StoreHouse/BatchSetting.cshtml

@@ -38,6 +38,13 @@
                                             placeholder="请输入运营创客编号">
                                     </div>
                                 </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">是否标记</label>
+                                    <div class="layui-input-block">
+                                        <input type="checkbox" id="IsOk" name="IsOk" value="1" lay-skin="switch"
+                                            lay-filter="switchTest" title="开关">
+                                    </div>
+                                </div>
                             </div>
                         </div>
                     </div>

+ 209 - 0
Areas/Admin/Views/OperateServer/UserCashRecordOperates/Add.cshtml

@@ -0,0 +1,209 @@
+@{
+    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 layui-form-text">
+<label class="layui-form-label">备注</label>
+<div class="layui-input-block">
+<textarea class="layui-textarea" id="Remark" name="Remark" 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>

+ 211 - 0
Areas/Admin/Views/OperateServer/UserCashRecordOperates/Edit.cshtml

@@ -0,0 +1,211 @@
+@using MySystem.Models;
+@{UserCashRecord editData = ViewBag.data as UserCashRecord;}
+@{
+    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">
+        <input type="hidden" name="Id" value="@editData.Id" />
+        
+        <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 layui-form-text">
+<label class="layui-form-label">备注</label>
+<div class="layui-input-block">
+<textarea class="layui-textarea" id="Remark" name="Remark" maxlength="128" lay-verify="" placeholder="请输入备注">@editData.Remark</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>

+ 134 - 0
Areas/Admin/Views/OperateServer/UserCashRecordOperates/Import.cshtml

@@ -0,0 +1,134 @@
+@{
+    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>
+    <style>
+        .layui-form-label {
+            width: 135px !important;
+        }
+
+        .layui-form-item .layui-input-block {
+            margin-left: 165px !important;
+        }
+    </style>
+</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">
+                    <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-form-mid layui-word-aux" id="excelTemp">
+                                    <a href="/users/提现结果模板.xlsx">点击下载提现结果模版</a>
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">excel文件</label>
+                                <div class="layui-input-block">
+                                    <div class="layui-upload">
+                                        <input type="hidden" id="ExcelPath" name="ExcelPath" value="">
+                                        <button class="layui-btn" type="button" id="ExcelPathBtn">选择</button>
+                                        <div class="layui-inline layui-word-aux"></div>
+                                    </div>
+                                    <div class="mt10" id="ExcelPathFile">
+                                    </div>
+                                </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.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 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');
+            });
+
+            //日期
+
+
+            //上传文件
+            WebUploadJs('ExcelPathBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload/v2', { width: 0, height: 0, quality: 0 }, { max_file_size: 1048576 }, function (filename) {
+                var fName = (filename.substring(filename.lastIndexOf("/"))).split("/");
+                $('#ExcelPathFile').html(fName);
+                $('#ExcelPath').val(filename);
+            });
+
+            //穿梭框
+
+
+
+            //TreeView,比如权限管理
+
+
+            //省市区
+
+        });
+
+    </script>
+</body>
+
+</html>

+ 157 - 0
Areas/Admin/Views/OperateServer/UserCashRecordOperates/Index.cshtml

@@ -0,0 +1,157 @@
+@{
+    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="OpCode" autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">提现状态</label>
+                        <div class="layui-input-inline">
+                            <select id="StatusSelect" name="StatusSelect" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="0">处理中</option>
+                                <option value="2">失败</option>
+                                <option value="1">成功</option>
+                            </select>
+                        </div>
+                    </div>
+
+                    <div class="layui-inline">
+                        <label class="layui-form-label">交易类型</label>
+                        <div class="layui-input-inline">
+                            <select id="TradeType" name="TradeType" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="1">消费代付</option>
+                                <option value="2">用户提现</option>
+                            </select>
+                        </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>
+                        @* @if (RightInfo.Contains("," + right + "_reduce,"))
+                            {
+                            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reduce"><i
+                            class="layui-icon layui-icon-edit"></i>驳回</a>
+                            } *@
+                        @if (RightInfo.Contains("," + right + "_export,"))
+                        {
+                            <button class="layui-btn" data-type="ExportExcel"><i
+                                class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
+                        }
+                        @* @if (RightInfo.Contains("," + right + "_export,"))
+                        {
+                            <button class="layui-btn" data-type="ImportData"><i
+                                class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>提现结果导入</button>
+                        } *@
+                        @* @if (RightInfo.Contains("," + right + "_cash,"))
+                        {
+                            <button class="layui-btn" data-type="Cash"><i
+                                class="layui-icon layui-icon-up layuiadmin-button-btn"></i>提交到代付平台</button>
+                        } *@
+                        @if (RightInfo.Contains("," + right + "_batchset,"))
+                        {
+                            <button class="layui-btn layui-btn-danger" data-type="BatchSetting"><i
+                                class="layui-icon layui-icon-edit layuiadmin-button-btn"></i>批量设置成功</button>
+                        }
+                    </div>
+                </div>
+            </div>
+
+            <div class="layui-card-body">
+                <blockquote class="layui-elem-quote layui-text">
+                    待处理总金额(元):<span style="color: #f00;" id="WaitAmount">0.00</span> | 提现成功总金额(元):<span
+                        style="color: #f00;" id="SuccessAmount">0.00</span> | 提现失败总金额(元):<span style="color: #f00;"
+                        id="FailAmount">0.00</span>
+                </blockquote>
+                <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
+                <script type="text/html" id="StatusTpl">
+                    {{# if(d.Status == 2) { }}
+                    {{ d.StatusName }} <a href="javascript:;" style="color:cornflowerblue" onclick="layer.msg('{{ d.Remark }}')">点击查看原因</a>
+                    {{# } else { }}
+                    {{ d.StatusName }}
+                    {{# } }}
+                </script>
+                <script type="text/html" id="table-list-tools">
+                    {{# if(d.Status == 0) { }}
+                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reduce"><i class="layui-icon layui-icon-edit"></i>驳回</a>
+                    {{# } }}
+                    {{# if(d.QueryCount == 1 && d.Status == 2) { }}
+                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="cancel"><i class="layui-icon layui-icon-edit"></i>解除</a>
+                    {{# } }}
+                </script>
+            </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/layuiadmin/modules_operate/UserCashRecords_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script>
+
+    </script>
+</body>
+
+</html>

+ 107 - 0
Areas/Admin/Views/OperateServer/UserCashRecordOperates/Reduce.cshtml

@@ -0,0 +1,107 @@
+@using MySystem.OpModels;
+@{UserCashRecord editData = ViewBag.data as UserCashRecord;}
+@{
+    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">
+        <input type="hidden" name="Id" value="@editData.Id" />
+        
+        <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 layui-form-text">
+                            <label class="layui-form-label">驳回原因</label>
+                            <div class="layui-input-block">
+                                <textarea class="layui-textarea" id="Remark" name="Remark" maxlength="128" lay-verify=""
+                                    placeholder="请输入驳回原因">@editData.Remark</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 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>

+ 210 - 160
wwwroot/layuiadmin/modules_operate/SysAdminOperate_Admin.js

@@ -1,4 +1,5 @@
 var ExcelData;
+
 function ConfirmImport() {
     $.ajax({
         type: "POST",
@@ -7,7 +8,9 @@ function ConfirmImport() {
         dataType: "text",
         success: function (data) {
             if (data == "success") {
-                layer.msg("导入成功", { time: 2000 }, function () {
+                layer.msg("导入成功", {
+                    time: 2000
+                }, function () {
                     window.location.reload();
                 });
             } else {
@@ -24,9 +27,9 @@ layui.config({
     myexcel: 'layui/lay/modules/excel',
     index: 'lib/index' //主入口模块
 }).use(['index', 'table', 'excel', 'laydate'], function () {
-    var $ = layui.$
-        , form = layui.form
-        , table = layui.table;
+    var $ = layui.$,
+        form = layui.form,
+        table = layui.table;
 
     //- 筛选条件-日期
     var laydate = layui.laydate;
@@ -71,51 +74,99 @@ layui.config({
     //监听单元格编辑
     table.on('edit(LAY-list-manage)', function (obj) {
         var value = obj.value //得到修改后的值
-            , data = obj.data //得到所在行所有键值
-            , field = obj.field; //得到字段
+            ,
+            data = obj.data //得到所在行所有键值
+            ,
+            field = obj.field; //得到字段
         if (field == "Sort") {
             $.ajax({
                 type: "POST",
                 url: "/Admin/SysAdminOperate/Sort?r=" + Math.random(1),
                 data: "Id=" + data.Id + "&Sort=" + value,
                 dataType: "text",
-                success: function (data) {
-                }
+                success: function (data) {}
             });
         }
     });
 
     //列表数据
     table.render({
-        elem: '#LAY-list-manage'
-        , url: '/Admin/SysAdminOperate/IndexData' //模拟接口
-        , cols: [[
-            { type: 'checkbox', fixed: 'left' }
-            , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
-            , { field: 'OpCode', title: '运营中心编号', sort: true }
-            , { field: 'RealName', title: '名称', sort: true }
-            , { field: 'MakerCode', title: '所属创客编号', sort: true }
-            , { field: 'MakerName', title: '所属真实姓名', sort: true }
-            , { field: 'CreateDate', title: '创建时间', sort: true }
-            , { field: 'TotalAmt', title: '实缴额度', sort: true }
-            , { field: 'ValidAmount', title: '当前额度', sort: true }
-            , { field: 'WithdrawAmount', title: '已提现金额', sort: true }
-            , { field: 'WithdrawingAmount', title: '提现中金额', sort: true }
-            , { field: 'StoreCount', title: '分仓数量', sort: true }
-            // , { field: 'Role', title: '角色', sort: true }
-            // , { field: 'LastLoginDate', title: '最后登录时间', sort: true }
-
-            // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
-            , { title: '操作', align: 'center',width: 400, 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) {
+        elem: '#LAY-list-manage',
+        url: '/Admin/SysAdminOperate/IndexData' //模拟接口
+            ,
+        cols: [
+            [{
+                    type: 'checkbox',
+                    fixed: 'left'
+                }, {
+                    field: 'Id',
+                    fixed: 'left',
+                    title: 'ID',
+                    width: 80,
+                    sort: true,
+                    unresize: true
+                }, {
+                    field: 'OpCode',
+                    title: '运营中心编号',
+                    sort: true
+                }, {
+                    field: 'RealName',
+                    title: '名称',
+                    sort: true
+                }, {
+                    field: 'MakerCode',
+                    title: '所属创客编号',
+                    sort: true
+                }, {
+                    field: 'MakerName',
+                    title: '所属真实姓名',
+                    sort: true
+                }, {
+                    field: 'CreateDate',
+                    title: '创建时间',
+                    sort: true
+                }, {
+                    field: 'TotalAmt',
+                    title: '实缴额度',
+                    sort: true
+                }, {
+                    field: 'ValidAmount',
+                    title: '当前额度',
+                    sort: true
+                }, {
+                    field: 'WithdrawAmount',
+                    title: '已提现金额',
+                    sort: true
+                }, {
+                    field: 'WithdrawingAmount',
+                    title: '提现中金额',
+                    sort: true
+                }, {
+                    field: 'StoreCount',
+                    title: '分仓数量',
+                    sort: true
+                }
+                // , { field: 'Role', title: '角色', sort: true }
+                // , { field: 'LastLoginDate', title: '最后登录时间', sort: true }
+
+                // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
+                , {
+                    title: '操作',
+                    align: 'center',
+                    width: 400,
+                    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("无数据");
         }
     });
@@ -143,112 +194,124 @@ layui.config({
         } else if (obj.event === 'EditAmt') {
             var tr = $(obj.tr);
             var perContent = layer.open({
-                type: 2
-                , title: '修改运营中心可用金额'
-                , content: 'EditAmt?Id=' + data.Id
-                , maxmin: false
-                , area: ['550px', '550px']
-                , btn: ['确定', '取消']
-                , yes: function (index, layero) {
-                    var iframeWindow = window['layui-layer-iframe' + index]
-                        , submitID = 'LAY-list-front-submit'
-                        , submit = layero.find('iframe').contents().find('#' + submitID);
+                type: 2,
+                title: '修改运营中心可用金额',
+                content: 'EditAmt?Id=' + data.Id,
+                maxmin: false,
+                area: ['550px', '550px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
 
                     //监听提交
                     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({});
-
-                        $.ajax({
-                            type: "POST",
-                            url: "/Admin/SysAdminOperate/EditAmt?r=" + Math.random(1),
-                            data: userdata,
-                            dataType: "text",
-                            success: function (data) {
-                                layer.close(index); //关闭弹层
-                                if (data == "success") {
-                                    layer.msg("保存成功", { time: 1500 }, function () {
-                                        table.reload('LAY-list-manage'); //数据刷新
-                                    });
-                                } else {
-                                    layer.msg(data);
-                                }
+                        if (clickflag == 0) {
+                            clickflag = 1;
+                            var field = data.field; //获取提交的字段
+                            var userdata = "";
+                            for (var prop in field) {
+                                userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
                             }
-                        });
+                            //提交 Ajax 成功后,静态更新表格中的数据
+                            //$.ajax({});
+
+                            $.ajax({
+                                type: "POST",
+                                url: "/Admin/SysAdminOperate/EditAmt?r=" + Math.random(1),
+                                data: userdata,
+                                dataType: "text",
+                                success: function (data) {
+                                    clickflag = 0;
+                                    layer.close(index); //关闭弹层
+                                    if (data == "success") {
+                                        layer.msg("保存成功", {
+                                            time: 1500
+                                        }, function () {
+                                            table.reload('LAY-list-manage'); //数据刷新
+                                        });
+                                    } else {
+                                        layer.msg(data);
+                                    }
+                                }
+                            });
+                        }
                     });
 
                     submit.trigger('click');
-                }
-                , success: function (layero, index) {
+                },
+                success: function (layero, index) {
 
                 }
             });
-        }else if (obj.event === 'EditBalance') {
+        } else if (obj.event === 'EditBalance') {
             var tr = $(obj.tr);
             var perContent = layer.open({
-                type: 2
-                , title: '修改运营中心金额'
-                , content: 'EditBalance?Id=' + data.Id
-                , maxmin: false
-                , area: ['550px', '550px']
-                , btn: ['确定', '取消']
-                , yes: function (index, layero) {
-                    var iframeWindow = window['layui-layer-iframe' + index]
-                        , submitID = 'LAY-list-front-submit'
-                        , submit = layero.find('iframe').contents().find('#' + submitID);
+                type: 2,
+                title: '修改运营中心金额',
+                content: 'EditBalance?Id=' + data.Id,
+                maxmin: false,
+                area: ['550px', '550px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
 
                     //监听提交
                     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({});
-
-                        $.ajax({
-                            type: "POST",
-                            url: "/Admin/SysAdminOperate/EditBalance?r=" + Math.random(1),
-                            data: userdata,
-                            dataType: "text",
-                            success: function (data) {
-                                layer.close(index); //关闭弹层
-                                if (data == "success") {
-                                    layer.msg("保存成功", { time: 1500 }, function () {
-                                        table.reload('LAY-list-manage'); //数据刷新
-                                    });
-                                } else {
-                                    layer.msg(data);
-                                }
+                        if (clickflag == 0) {
+                            clickflag = 1;
+                            var field = data.field; //获取提交的字段
+                            var userdata = "";
+                            for (var prop in field) {
+                                userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
                             }
-                        });
+                            //提交 Ajax 成功后,静态更新表格中的数据
+                            //$.ajax({});
+
+                            $.ajax({
+                                type: "POST",
+                                url: "/Admin/SysAdminOperate/EditBalance?r=" + Math.random(1),
+                                data: userdata,
+                                dataType: "text",
+                                success: function (data) {
+                                    clickflag = 0;
+                                    layer.close(index); //关闭弹层
+                                    if (data == "success") {
+                                        layer.msg("保存成功", {
+                                            time: 1500
+                                        }, function () {
+                                            table.reload('LAY-list-manage'); //数据刷新
+                                        });
+                                    } else {
+                                        layer.msg(data);
+                                    }
+                                }
+                            });
+                        }
                     });
 
                     submit.trigger('click');
-                }
-                , success: function (layero, index) {
+                },
+                success: function (layero, index) {
 
                 }
             });
         } else if (obj.event === 'edit') {
             var tr = $(obj.tr);
             var perContent = layer.open({
-                type: 2
-                , title: '后台管理员-编辑'
-                , content: 'Edit?Id=' + data.Id + ''
-                , 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);
+                type: 2,
+                title: '后台管理员-编辑',
+                content: 'Edit?Id=' + data.Id + '',
+                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) {
@@ -259,12 +322,6 @@ layui.config({
                             }
                         });
                     }, 300);
-
-
-
-
-
-
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
                         var field = data.field; //获取提交的字段
@@ -292,8 +349,8 @@ layui.config({
                     });
 
                     submit.trigger('click');
-                }
-                , success: function (layero, index) {
+                },
+                success: function (layero, index) {
 
                 }
             });
@@ -320,8 +377,8 @@ layui.config({
     //事件
     var active = {
         batchdel: function () {
-            var checkStatus = table.checkStatus('LAY-list-manage')
-                , data = checkStatus.data; //得到选中的数据
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
             if (data.length < 1) {
                 parent.layer.msg("请选择要删除的项");
             } else {
@@ -347,19 +404,19 @@ layui.config({
                     });
                 });
             }
-        }
-        , add: function () {
+        },
+        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);
+                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) {
@@ -370,12 +427,6 @@ layui.config({
                             }
                         });
                     }, 300);
-
-
-
-
-
-
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
                         var field = data.field; //获取提交的字段
@@ -406,19 +457,18 @@ layui.config({
                 }
             });
             layer.full(perContent);
-        }
-        , ImportData: function () {
+        },
+        ImportData: function () {
             layer.open({
                 type: 1,
                 title: '导入',
                 maxmin: false,
                 area: ['460px', '180px'],
                 content: $('#excelForm'),
-                cancel: function () {
-                }
+                cancel: function () {}
             });
-        }
-        , ExportExcel: function () {
+        },
+        ExportExcel: function () {
             var userdata = '';
             $(".layuiadmin-card-header-auto input").each(function (i) {
                 userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
@@ -436,10 +486,10 @@ layui.config({
                     excel.exportExcel(data.Obj, data.Info, 'xlsx');
                 }
             });
-        }
-        , Open: function () {
-            var checkStatus = table.checkStatus('LAY-list-manage')
-                , data = checkStatus.data; //得到选中的数据
+        },
+        Open: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
             if (data.length < 1) {
                 parent.layer.msg("请选择要开启的项");
             } else {
@@ -465,10 +515,10 @@ layui.config({
                     });
                 });
             }
-        }
-        , Close: function () {
-            var checkStatus = table.checkStatus('LAY-list-manage')
-                , data = checkStatus.data; //得到选中的数据
+        },
+        Close: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
             if (data.length < 1) {
                 parent.layer.msg("请选择要关闭的项");
             } else {

+ 659 - 0
wwwroot/layuiadmin/modules_operate/UserCashRecords_Admin.js

@@ -0,0 +1,659 @@
+var ExcelData;
+
+function ConfirmImport() {
+    $.ajax({
+        type: "POST",
+        url: "/Admin/UserCashRecordOperates/Import?r=" + Math.random(1),
+        data: "ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
+        dataType: "text",
+        success: function (data) {
+            if (data == "success") {
+                layer.msg("导入成功", {
+                    time: 2000
+                }, function () {
+                    window.location.reload();
+                });
+            } else {
+                layer.msg(data);
+            }
+        }
+    });
+}
+
+function CheckImport(table, key, loadindex, index) { 
+    $.ajax({
+        url: "/Admin/UserCashRecordOperates/CheckImport?r=" + Math.random(1),
+        data: "key=" + key,
+        dataType: "text",
+        success: function (data) {
+            if (data.indexOf('success') == 0) {
+                layer.msg("成功操作" + data.split('|')[1] + "笔提现申请", { time: 2000 }, function () {
+                    layer.close(index); //关闭弹层
+                    layer.close(loadindex);
+                    table.reload('LAY-list-manage'); //数据刷新
+                });
+            } else {
+                layer.msg(data, { time: 1000 }, function () {
+                    CheckImport(table, key, loadindex, index);
+                });
+            }
+        }
+    });
+}
+
+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/UserCashRecordOperates/Sort?r=" + Math.random(1),
+                data: "Id=" + data.Id + "&Sort=" + value,
+                dataType: "text",
+                success: function (data) {}
+            });
+        }
+    });
+
+    //列表数据
+    table.render({
+        elem: '#LAY-list-manage',
+        url: '/Admin/UserCashRecordOperates/IndexData' //模拟接口
+            ,
+        cols: [
+            [{
+                    type: 'checkbox',
+                    fixed: 'left'
+                }, {
+                    field: 'CashOrderNo',
+                    width: 200,
+                    title: '提现单号',
+                    sort: true
+                }, {
+                    field: 'OpCode',
+                    width: 200,
+                    title: '运营中心编码',
+                    sort: true
+                }, {
+                    field: 'MakerCode',
+                    width: 200,
+                    title: '创客编码',
+                    sort: true
+                }, {
+                    field: 'RealName',
+                    width: 200,
+                    title: '创客名称',
+                    sort: true
+                }, {
+                    field: 'IdCardNo',
+                    width: 200,
+                    title: '身份证号',
+                    sort: true
+                }, {
+                    field: 'SettleBankCardNo',
+                    width: 200,
+                    title: '提现卡号',
+                    sort: true
+                }, {
+                    field: 'SettleBankName',
+                    width: 200,
+                    title: '银行名称',
+                    sort: true
+                }, {
+                    field: 'TradeType',
+                    width: 200,
+                    title: '交易类型',
+                    sort: true
+                }, {
+                    field: 'TradeAmount',
+                    width: 200,
+                    title: '提现金额(元)',
+                    sort: true
+                }, {
+                    field: 'ActualTradeAmount',
+                    width: 200,
+                    title: '发佣金额(元)',
+                    sort: true
+                }, {
+                    field: 'StatusName',
+                    width: 200,
+                    title: '订单状态',
+                    templet: '#StatusTpl',
+                    sort: true
+                }, {
+                    field: 'ReturnCode',
+                    width: 200,
+                    title: '提现服务返回编码',
+                    sort: true
+                }, {
+                    field: 'ReturnMsg',
+                    width: 200,
+                    title: '提现服务返回信息',
+                    sort: true
+                }, {
+                    field: 'CreateDate',
+                    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) {
+            $("#SuccessAmount").text(res.other.SuccessAmount);
+            $("#FailAmount").text(res.other.FailAmount);
+            $("#WaitAmount").text(res.other.WaitAmount);            
+            $(".layui-none").text("无数据");
+        }
+    });
+
+    //监听工具条
+    table.on('tool(LAY-list-manage)', function (obj) {
+        var data = obj.data;
+        if (obj.event === 'del') {
+            var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/UserCashRecordOperates/Delete?r=" + Math.random(1),
+                    data: "Id=" + data.Id,
+                    dataType: "text",
+                    success: function (data) {
+                        if (data == "success") {
+                            obj.del();
+                            layer.close(index);
+                        } else {
+                            parent.layer.msg(data);
+                        }
+                    }
+                });
+            });
+        } else if (obj.event === 'cancel') {
+            var index = layer.confirm('确定要解除吗?操作后不能恢复!', function (index) {
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/UserCashRecordOperates/Cancel?r=" + Math.random(1),
+                    data: "Id=" + data.Id,
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(index);
+                        if (data == "success") {
+                            parent.layer.msg('已解除');
+                            table.reload('LAY-list-manage'); //数据刷新
+                        } else {
+                            parent.layer.msg(data);
+                        }
+                    }
+                });
+            });
+        } else if (obj.event === 'edit') {
+            var tr = $(obj.tr);
+            var perContent = layer.open({
+                type: 2,
+                title: '提现记录-编辑',
+                content: 'Edit?Id=' + data.Id + '',
+                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({});
+
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/UserCashRecordOperates/Edit?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                },
+                success: function (layero, index) {
+
+                }
+            });
+            layer.full(perContent);
+        } else if (obj.event === 'reduce') {
+            var tr = $(obj.tr);
+            var perContent = layer.open({
+                type: 2,
+                title: '拒绝处理',
+                content: 'Reduce?Id=' + data.Id + '',
+                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({});
+
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/UserCashRecordOperates/ReduceDo?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                },
+                success: function (layero, index) {
+
+                }
+            });
+        }
+    });
+
+
+    //监听搜索
+    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 = {
+        batchdel: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要删除的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecordOperates/Delete?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
+        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({});
+
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/UserCashRecordOperates/Add?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+            });
+            layer.full(perContent);
+        },
+        ImportData: function () {
+            var perContent = layer.open({
+                type: 2
+                , title: '提现结果导入'
+                , content: 'Import'
+                , maxmin: true
+                , area: ['650px', '350px']
+                , btn: ['确定', '取消']
+                , yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index]
+                        , submitID = 'LAY-list-front-submit'
+                        , submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    
+                    //监听提交
+                    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 loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/UserCashRecordOperates/ImportPost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+            });
+        },
+        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/UserCashRecordOperates/ExportExcel?r=" + Math.random(1),
+                data: userdata,
+                dataType: "json",
+                success: function (data) {
+                    data.Obj.unshift(data.Fields);
+                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
+                }
+            });
+        },
+        BatchSetting: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要设置的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要设为成功状态吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecordOperates/BatchSetting?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
+        Open: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要开启的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要开启吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecordOperates/Open?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
+        Close: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要关闭的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要关闭吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecordOperates/Close?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
+        Cash: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage'),
+                data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要提交代付的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要提交到代付平台申请出款吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/UserCashRecordOperates/Cash?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                layer.msg('提交成功,请等待代付平台处理');
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        },
+    };
+
+    $('.layui-btn').on('click', function () {
+        var type = $(this).data('type');
+        active[type] ? active[type].call(this) : '';
+    });
+});