Sfoglia il codice sorgente

添加小分仓额度
添加占用小分仓额度超过30天未兑换的机具列表

DuGuYang 3 anni fa
parent
commit
6419b24f91

+ 196 - 3
Areas/Admin/Controllers/MainServer/PreSendStockDetailController.cs

@@ -52,15 +52,15 @@ namespace MySystem.Areas.Admin.Controllers
         /// 预发货库存明细列表
         /// 预发货库存明细列表
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>
-        public JsonResult IndexData(PreSendStockDetail data, string StoreIdStoreName, string StoreIdStoreNo, string BrandIdSelect, string ToUserIdMakerCode, string ToUserIdRealName, string ToStoreIdStoreNo, string ToStoreIdStoreName, string SourceStoreIdStoreNo, string SourceStoreIdStoreName, string FromUserIdMakerCode, string FromUserIdRealName, string FromStoreIdStoreNo, string FromStoreIdStoreName, int page = 1, int limit = 30)
+        public JsonResult IndexData(PreSendStockDetail data, string StoreIdStoreName, string StoreIdStoreNo, string CreateDateData, string ApplyDateData, string BrandIdSelect, string ToUserIdMakerCode, string ToUserIdRealName, string ToStoreIdStoreNo, string ToStoreIdStoreName, string SourceStoreIdStoreNo, string SourceStoreIdStoreName, string FromUserIdMakerCode, string FromUserIdRealName, string FromStoreIdStoreNo, string FromStoreIdStoreName, int page = 1, int limit = 30)
         {
         {
 
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Fields.Add("StoreId", "1");
             Fields.Add("StoreId", "1");
 
 
-            Fields.Add("CreateDate", "3"); //时间
+            // Fields.Add("CreateDate", "3"); //时间
             Fields.Add("SnNo", "1"); //SN编号
             Fields.Add("SnNo", "1"); //SN编号
-            Fields.Add("ApplyDate", "3"); //申请时间
+            // Fields.Add("ApplyDate", "3"); //申请时间
 
 
 
 
             string condition = " and Status>-1";
             string condition = " and Status>-1";
@@ -74,6 +74,20 @@ namespace MySystem.Areas.Admin.Controllers
             {
             {
                 condition += " and StoreId in (select StoreId from SmallStoreHouseForStoreNo where StoreNo='" + StoreIdStoreNo + "')";
                 condition += " and StoreId in (select StoreId from SmallStoreHouseForStoreNo where StoreNo='" + StoreIdStoreNo + "')";
             }
             }
+            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'";
+            }
+            if (!string.IsNullOrEmpty(ApplyDateData))
+            {
+                string[] datelist = ApplyDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and ApplyDate>='" + start + " 00:00:00' and ApplyDate<='" + end + " 23:59:59'";
+            }
             //产品类型
             //产品类型
             if (!string.IsNullOrEmpty(BrandIdSelect))
             if (!string.IsNullOrEmpty(BrandIdSelect))
             {
             {
@@ -177,6 +191,10 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["FromStoreIdStoreName"] = fromstoreid_StoreHouse.StoreName;
                 dic["FromStoreIdStoreName"] = fromstoreid_StoreHouse.StoreName;
                 dic.Remove("FromStoreId");
                 dic.Remove("FromStoreId");
                 dic["CancelFlagName"] = dic["CancelFlag"].ToString() == "1" ? "是" : "否";
                 dic["CancelFlagName"] = dic["CancelFlag"].ToString() == "1" ? "是" : "否";
+                //是否占用额度
+                int AuthFlag = int.Parse(function.CheckInt(dic["AuthFlag"].ToString()));
+                if (AuthFlag == 0) dic["PayMode"] = "否";
+                if (AuthFlag == 1) dic["PayMode"] = "是";
 
 
             }
             }
             return Json(obj);
             return Json(obj);
@@ -569,5 +587,180 @@ namespace MySystem.Areas.Admin.Controllers
 
 
         #endregion
         #endregion
 
 
+
+        #region 预发货库存明细列表(占额度超过30天未兑换)
+
+        /// <summary>
+        /// 根据条件查询预发货库存明细列表(占额度超过30天未兑换)
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Indexs(PreSendStockDetail data, string right, string StoreId)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+            ViewBag.StoreId = StoreId;
+
+
+            return View();
+        }
+
+        #endregion
+
+        #region 根据条件查询预发货库存明细列表(占额度超过30天未兑换)
+
+        /// <summary>
+        /// 根据条件查询预发货库存明细列表(占额度超过30天未兑换)
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult IndexsData(PreSendStockDetail data, string StoreIdStoreName, string StoreIdStoreNo, string CreateDateData, string ApplyDateData, string BrandIdSelect, string ToUserIdMakerCode, string ToUserIdRealName, string ToStoreIdStoreNo, string ToStoreIdStoreName, string SourceStoreIdStoreNo, string SourceStoreIdStoreName, string FromUserIdMakerCode, string FromUserIdRealName, string FromStoreIdStoreNo, string FromStoreIdStoreName, int page = 1, int limit = 30)
+        {
+
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+            Fields.Add("StoreId", "1");
+
+            // Fields.Add("CreateDate", "3"); //时间
+            Fields.Add("SnNo", "1"); //SN编号
+            // Fields.Add("ApplyDate", "3"); //申请时间
+
+
+            string condition = " and Status>-1 and DATE_SUB(CURDATE(), INTERVAL 30 DAY) >= date(CreateDate) and ApplyFlag =0 and AuthFlag =1";
+            //仓库名称
+            if (!string.IsNullOrEmpty(StoreIdStoreName))
+            {
+                condition += " and StoreId in (select StoreId from SmallStoreHouseForStoreName where StoreName='" + StoreIdStoreName + "')";
+            }
+            //仓库编号
+            if (!string.IsNullOrEmpty(StoreIdStoreNo))
+            {
+                condition += " and StoreId in (select StoreId from SmallStoreHouseForStoreNo where StoreNo='" + StoreIdStoreNo + "')";
+            }
+            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'";
+            }
+            if (!string.IsNullOrEmpty(ApplyDateData))
+            {
+                string[] datelist = ApplyDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and ApplyDate>='" + start + " 00:00:00' and ApplyDate<='" + end + " 23:59:59'";
+            }
+            //产品类型
+            if (!string.IsNullOrEmpty(BrandIdSelect))
+            {
+                condition += " and BrandId=" + BrandIdSelect;
+            }
+            //收货人创客编号
+            if (!string.IsNullOrEmpty(ToUserIdMakerCode))
+            {
+                condition += " and ToUserId in (select ToUserId from UsersForMakerCode where MakerCode='" + ToUserIdMakerCode + "')";
+            }
+            //收货人真实姓名
+            if (!string.IsNullOrEmpty(ToUserIdRealName))
+            {
+                condition += " and ToUserId in (select ToUserId from UsersForRealName where RealName='" + ToUserIdRealName + "')";
+            }
+            //收货仓库编号
+            if (!string.IsNullOrEmpty(ToStoreIdStoreNo))
+            {
+                condition += " and ToStoreId in (select ToStoreId from StoreHouseForStoreNo where StoreNo='" + ToStoreIdStoreNo + "')";
+            }
+            //收货仓库名称
+            if (!string.IsNullOrEmpty(ToStoreIdStoreName))
+            {
+                condition += " and ToStoreId in (select ToStoreId from StoreHouseForStoreName where StoreName='" + ToStoreIdStoreName + "')";
+            }
+            //源仓库编号仓库编号
+            if (!string.IsNullOrEmpty(SourceStoreIdStoreNo))
+            {
+                condition += " and SourceStoreId in (select SourceStoreId from StoreHouseForStoreNo where StoreNo='" + SourceStoreIdStoreNo + "')";
+            }
+            //源仓库编号仓库名称
+            if (!string.IsNullOrEmpty(SourceStoreIdStoreName))
+            {
+                condition += " and SourceStoreId in (select SourceStoreId from StoreHouseForStoreName where StoreName='" + SourceStoreIdStoreName + "')";
+            }
+            //出货创客编号
+            if (!string.IsNullOrEmpty(FromUserIdMakerCode))
+            {
+                condition += " and FromUserId in (select FromUserId from UsersForMakerCode where MakerCode='" + FromUserIdMakerCode + "')";
+            }
+            //出货创客真实姓名
+            if (!string.IsNullOrEmpty(FromUserIdRealName))
+            {
+                condition += " and FromUserId in (select FromUserId from UsersForRealName where RealName='" + FromUserIdRealName + "')";
+            }
+            //出货仓库编号
+            if (!string.IsNullOrEmpty(FromStoreIdStoreNo))
+            {
+                condition += " and FromStoreId in (select FromStoreId from StoreHouseForStoreNo where StoreNo='" + FromStoreIdStoreNo + "')";
+            }
+            //出货仓库名称
+            if (!string.IsNullOrEmpty(FromStoreIdStoreName))
+            {
+                condition += " and FromStoreId in (select FromStoreId from StoreHouseForStoreName where StoreName='" + FromStoreIdStoreName + "')";
+            }
+
+
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PreSendStockDetail", 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 StoreId = int.Parse(function.CheckInt(dic["StoreId"].ToString()));
+                SmallStoreHouse storeid_SmallStoreHouse = db.SmallStoreHouse.FirstOrDefault(m => m.Id == StoreId) ?? new SmallStoreHouse();
+                dic["StoreIdStoreName"] = storeid_SmallStoreHouse.StoreName;
+                dic["StoreIdStoreNo"] = storeid_SmallStoreHouse.StoreNo;
+                dic.Remove("StoreId");
+                //产品类型
+                dic["BrandId"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["BrandId"].ToString()));
+                //SNID
+                dic["SnId"] = RelationClass.GetPosMachinesTwoInfo(int.Parse(dic["SnId"].ToString()));
+                //收货人
+                int ToUserId = int.Parse(function.CheckInt(dic["ToUserId"].ToString()));
+                Users touserid_Users = db.Users.FirstOrDefault(m => m.Id == ToUserId) ?? new Users();
+                dic["ToUserIdMakerCode"] = touserid_Users.MakerCode;
+                dic["ToUserIdRealName"] = touserid_Users.RealName;
+                dic.Remove("ToUserId");
+                //收货仓库
+                int ToStoreId = int.Parse(function.CheckInt(dic["ToStoreId"].ToString()));
+                StoreHouse tostoreid_StoreHouse = db.StoreHouse.FirstOrDefault(m => m.Id == ToStoreId) ?? new StoreHouse();
+                dic["ToStoreIdStoreNo"] = tostoreid_StoreHouse.StoreNo;
+                dic["ToStoreIdStoreName"] = tostoreid_StoreHouse.StoreName;
+                dic.Remove("ToStoreId");
+                //源仓库编号
+                int SourceStoreId = int.Parse(function.CheckInt(dic["SourceStoreId"].ToString()));
+                StoreHouse sourcestoreid_StoreHouse = db.StoreHouse.FirstOrDefault(m => m.Id == SourceStoreId) ?? new StoreHouse();
+                dic["SourceStoreIdStoreNo"] = sourcestoreid_StoreHouse.StoreNo;
+                dic["SourceStoreIdStoreName"] = sourcestoreid_StoreHouse.StoreName;
+                dic.Remove("SourceStoreId");
+                dic["ApplyFlagName"] = dic["ApplyFlag"].ToString() == "1" ? "是" : "否";
+                //出货创客
+                int FromUserId = int.Parse(function.CheckInt(dic["FromUserId"].ToString()));
+                Users fromuserid_Users = db.Users.FirstOrDefault(m => m.Id == FromUserId) ?? new Users();
+                dic["FromUserIdMakerCode"] = fromuserid_Users.MakerCode;
+                dic["FromUserIdRealName"] = fromuserid_Users.RealName;
+                dic.Remove("FromUserId");
+                //出货仓库
+                int FromStoreId = int.Parse(function.CheckInt(dic["FromStoreId"].ToString()));
+                StoreHouse fromstoreid_StoreHouse = db.StoreHouse.FirstOrDefault(m => m.Id == FromStoreId) ?? new StoreHouse();
+                dic["FromStoreIdStoreNo"] = fromstoreid_StoreHouse.StoreNo;
+                dic["FromStoreIdStoreName"] = fromstoreid_StoreHouse.StoreName;
+                dic.Remove("FromStoreId");
+                dic["CancelFlagName"] = dic["CancelFlag"].ToString() == "1" ? "是" : "否";
+                //是否占用额度
+                int AuthFlag = int.Parse(function.CheckInt(dic["AuthFlag"].ToString()));
+                if (AuthFlag == 0) dic["PayMode"] = "否";
+                if (AuthFlag == 1) dic["PayMode"] = "是";
+
+            }
+            return Json(obj);
+        }
+
+        #endregion
+
     }
     }
 }
 }

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

@@ -60,12 +60,12 @@ namespace MySystem.Areas.Admin.Controllers
             //创客真实姓名
             //创客真实姓名
             if (!string.IsNullOrEmpty(UserIdRealName))
             if (!string.IsNullOrEmpty(UserIdRealName))
             {
             {
-                condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
             }
             }
             //创客编号
             //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
             {
-                condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             }
             if (!string.IsNullOrEmpty(CreateDateData))
             if (!string.IsNullOrEmpty(CreateDateData))
             {
             {
@@ -348,12 +348,12 @@ namespace MySystem.Areas.Admin.Controllers
             //创客真实姓名
             //创客真实姓名
             if (!string.IsNullOrEmpty(UserIdRealName))
             if (!string.IsNullOrEmpty(UserIdRealName))
             {
             {
-                condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
             }
             }
             //创客编号
             //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
             {
-                condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             }
             //额度类别
             //额度类别
             if (!string.IsNullOrEmpty(AmountTypeSelect))
             if (!string.IsNullOrEmpty(AmountTypeSelect))
@@ -430,7 +430,7 @@ namespace MySystem.Areas.Admin.Controllers
 
 
         #endregion
         #endregion
 
 
-        #region 根据条件查询分仓机具额度记录列表
+        #region 银行卡临额提现记录列表
 
 
         /// <summary>
         /// <summary>
         /// 分仓机具额度记录列表
         /// 分仓机具额度记录列表
@@ -445,12 +445,12 @@ namespace MySystem.Areas.Admin.Controllers
             //创客真实姓名
             //创客真实姓名
             if (!string.IsNullOrEmpty(UserIdRealName))
             if (!string.IsNullOrEmpty(UserIdRealName))
             {
             {
-                condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
             }
             }
             //创客编号
             //创客编号
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             if (!string.IsNullOrEmpty(UserIdMakerCode))
             {
             {
-                condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             }
             if (!string.IsNullOrEmpty(CreateDateData))
             if (!string.IsNullOrEmpty(CreateDateData))
             {
             {
@@ -521,5 +521,90 @@ namespace MySystem.Areas.Admin.Controllers
 
 
         #endregion
         #endregion
 
 
+
+        #region 银行卡临额提现记录导出Excel
+
+        /// <summary>
+        /// 导出Excel
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult ExportsExcel(StoreHouseAmountRecord data, string UserIdRealName, string UserIdMakerCode, string CreateDateData)
+        {
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+            Fields.Add("CreateDate", "3"); //时间
+
+
+            string condition = " and Status>-1 and PayMode=1 and Sort=3";
+            //创客真实姓名
+            if (!string.IsNullOrEmpty(UserIdRealName))
+            {
+                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
+            }
+            //创客编号
+            if (!string.IsNullOrEmpty(UserIdMakerCode))
+            {
+                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
+            }
+            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'";
+            }
+
+            Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, PublicFunction.MainTables).IndexData("StoreHouseAmountRecord", Fields, "Id desc", "0", 1, 20000, condition, "UserId,UseAmount", false);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            foreach (Dictionary<string, object> dic in diclist)
+            {
+                //创客
+                int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
+                Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                dic["UserIdRealName"] = userid_Users.RealName;
+                dic["UserIdMakerCode"] = userid_Users.MakerCode;
+                dic.Remove("UserId");
+
+            }
+
+            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("UserIdRealName", "创客真实姓名");
+            ReturnFields.Add("UserIdMakerCode", "创客编号");
+            ReturnFields.Add("UseAmount", "申请提现临额");
+
+            result.Add("Fields", ReturnFields);
+            AddSysLog("0", "StoreHouseAmountRecord", "ExportExcel");
+            return Json(result);
+        }
+
+        #endregion
+
+
+        #region 
+
+        /// <summary>
+        /// 开启
+        /// </summary>
+        /// <returns></returns>
+        public string BatchSetting(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "StoreHouseCardAmountRecord", "BatchSetting");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", -1);
+                new AdminContent(_accessor.HttpContext, PublicFunction.MainTables).Edit("StoreHouseAmountRecord", Fields, id);
+            }
+            db.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
     }
     }
 }
 }

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

@@ -178,9 +178,11 @@ namespace MySystem.Areas.Admin.Controllers
                 var amount = db.UserAccount.FirstOrDefault(m => m.Id == UserId) ?? new UserAccount();
                 var amount = db.UserAccount.FirstOrDefault(m => m.Id == UserId) ?? new UserAccount();
                 var ValidAmount = amount.ValidAmount;
                 var ValidAmount = amount.ValidAmount;
                 var FixedAmount = amount.FixedAmount;
                 var FixedAmount = amount.FixedAmount;
-                var TempAmount = amount.TempAmount;
+                var TempAmount = amount.TempAmount + amount.TempAmountForBalance;
                 var check = db.StoreHouseAmountPromiss.Any(m => m.ToUserId == UserId);
                 var check = db.StoreHouseAmountPromiss.Any(m => m.ToUserId == UserId);
                 decimal PromissAmount = 0;
                 decimal PromissAmount = 0;
+                var ThisMonthPreAmount = amount.ThisMonthPreAmount;
+                var ValidPreAmount = amount.ValidPreAmount;
                 if (check)
                 if (check)
                 {
                 {
                     PromissAmount = db.StoreHouseAmountPromiss.Where(m => m.Status == 1 && m.ToUserId == UserId).Sum(m => m.PromissAmount);
                     PromissAmount = db.StoreHouseAmountPromiss.Where(m => m.Status == 1 && m.ToUserId == UserId).Sum(m => m.PromissAmount);
@@ -189,6 +191,8 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["FixedAmount"] = FixedAmount.ToString();//固定额度
                 dic["FixedAmount"] = FixedAmount.ToString();//固定额度
                 dic["TempAmount"] = TempAmount.ToString();//临时额度
                 dic["TempAmount"] = TempAmount.ToString();//临时额度
                 dic["PromissAmount"] = PromissAmount.ToString();//担保金额
                 dic["PromissAmount"] = PromissAmount.ToString();//担保金额
+                dic["ThisMonthPreAmount"] = PromissAmount.ToString();//本月小分仓额度
+                dic["ValidPreAmount"] = PromissAmount.ToString();//可用小分仓额度
             }
             }
             return Json(obj);
             return Json(obj);
         }
         }

+ 237 - 0
Areas/Admin/Views/MainServer/PreSendStockDetail/Indexs.cshtml

@@ -0,0 +1,237 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    string StoreId = ViewBag.StoreId 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="StoreIdStoreName" 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="StoreIdStoreNo" autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">创建时间</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" readonly name="CreateDateData" id="CreateDate"
+                                placeholder="" autocomplete="off">
+                        </div>
+                    </div>
+                    @{Dictionary<string, string> KqProductsDic = new MySystem.DictionaryClass().getKqProductsDic();}
+                    <div class="layui-inline">
+                        <label class="layui-form-label">产品类型</label>
+                        <div class="layui-input-inline">
+                            <select id="BrandIdSelect" name="BrandIdSelect" lay-search="">
+                                <option value="">全部...</option>
+                                @foreach (string key in KqProductsDic.Keys)
+                                {
+                                    <option value="@key">@KqProductsDic[key]</option>
+                                }
+                            </select>
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">SN编号</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" name="SnNo" placeholder="" 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="ToUserIdMakerCode" 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="ToUserIdRealName" 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="ToStoreIdStoreNo" 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="ToStoreIdStoreName" 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="SourceStoreIdStoreNo" 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="SourceStoreIdStoreName" autocomplete="off">
+                        </div>
+                    </div> *@
+                    <div class="layui-inline">
+                        <label class="layui-form-label">申请时间</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" readonly name="ApplyDateData" id="ApplyDate"
+                                placeholder="" 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="FromUserIdMakerCode" 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="FromUserIdRealName" 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="FromStoreIdStoreNo" 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="FromStoreIdStoreName" autocomplete="off">
+                        </div>
+                    </div>
+
+                    <div class="layui-inline ml50">
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
+                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
+                        </button>
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
+                            <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
+                        </button>
+                    </div>
+                </div>
+            </div>
+
+            <div class="layui-card-body">
+                <div style="padding-bottom: 10px;">
+                    @if (RightInfo.Contains("," + right + "_add,"))
+                    {
+                        <button class="layui-btn" data-type="add"><i
+                            class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加</button>
+                    }
+                    @if (RightInfo.Contains("," + right + "_delete,"))
+                    {
+                        <button class="layui-btn" data-type="batchdel"><i
+                            class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>
+                    }
+                    @if (RightInfo.Contains("," + right + "_edit,"))
+                    {
+                        <button class="layui-btn" data-type="ExportExcel"><i
+                            class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
+
+                    }
+                </div>
+
+                <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
+                <script type="text/html" id="table-list-tools">
+                    @if (RightInfo.Contains("," + right + "_edit,"))
+                    {
+                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
+                    }
+                    @if (RightInfo.Contains("," + right + "_delete,"))
+                    {
+                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
+                    }
+                    @if (RightInfo.Contains("," + right + "_edit,"))
+                    {
+
+                    }
+                </script>
+            </div>
+        </div>
+    </div>
+    <div id="excelForm" style="display:none; padding:20px;">
+        <div class="layui-tab-item layui-show">
+            <div class="layui-form-item">
+                <label class="layui-form-label">模板下载</label>
+                <div class="layui-form-mid layui-word-aux" id="excelTemp">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">excel文件</label>
+                <div class="layui-form-mid layui-word-aux">
+                    <div class="layui-upload">
+                        <input type="file" id="ExcelFile" name="ExcelFile" value="">
+                    </div>
+                    <div class="mt10" id="ExcelFileList">
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="layui-form-item ml10">
+            <div class="layui-input-block">
+                <button type="button" class="layui-btn" onclick="ConfirmImport()">立即导入</button>
+            </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script
+        src="/layuiadmin/modules_main/PreSendStockDetails_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script>
+        var StoreId = '@StoreId';
+
+    </script>
+</body>
+
+</html>

+ 8 - 7
Areas/Admin/Views/MainServer/StoreHouseAmountRecord/Indexs.cshtml

@@ -51,7 +51,7 @@
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="layui-inline">
                     <div class="layui-inline">
-                        <label class="layui-form-label">创客创客编号</label>
+                        <label class="layui-form-label">创客编号</label>
                         <div class="layui-input-inline">
                         <div class="layui-input-inline">
                             <input class="layui-input" type="text" name="UserIdMakerCode" autocomplete="off">
                             <input class="layui-input" type="text" name="UserIdMakerCode" autocomplete="off">
                         </div>
                         </div>
@@ -92,22 +92,23 @@
                             class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
                             class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
 
 
                     }
                     }
+                    @if (RightInfo.Contains("," + right + "_batchset,"))
+                    {
+                        <button class="layui-btn" data-type="BatchSetting"><i
+                            class="layui-icon layui-icon-edit layuiadmin-button-btn"></i>批量设置</button>
+                    }
                 </div>
                 </div>
 
 
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
                 <script type="text/html" id="table-list-tools">
                 <script type="text/html" id="table-list-tools">
-                    @if (RightInfo.Contains("," + right + "_edit,"))
+                    @* @if (RightInfo.Contains("," + right + "_edit,"))
                     {
                     {
                             <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                             <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                     }
                     }
                     @if (RightInfo.Contains("," + right + "_delete,"))
                     @if (RightInfo.Contains("," + right + "_delete,"))
                     {
                     {
                             <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
                             <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
-                    }
-                    @if (RightInfo.Contains("," + right + "_edit,"))
-                    {
-
-                    }
+                    } *@
                 </script>
                 </script>
             </div>
             </div>
         </div>
         </div>

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

@@ -32,7 +32,7 @@ layui.config({
     var laydate = layui.laydate;
     var laydate = layui.laydate;
     var layCreateDate = laydate.render({
     var layCreateDate = laydate.render({
         elem: '#CreateDate',
         elem: '#CreateDate',
-        type: 'datetime',
+        type: 'date',
         range: true,
         range: true,
         trigger: 'click',
         trigger: 'click',
         change: function (value, date, endDate) {
         change: function (value, date, endDate) {
@@ -60,7 +60,7 @@ layui.config({
     var layApplyDate = laydate.render({
     var layApplyDate = laydate.render({
         elem: '#ApplyDate',
         elem: '#ApplyDate',
         trigger: 'click',
         trigger: 'click',
-        type: 'datetime',
+        type: 'date',
         range: true,
         range: true,
         change: function (value, date, endDate) {
         change: function (value, date, endDate) {
             var op = true;
             var op = true;

+ 451 - 0
wwwroot/layuiadmin/modules_main/PreSendStockDetails_Admin.js

@@ -0,0 +1,451 @@
+var ExcelData, ExcelKind;
+function ConfirmImport() {
+    $.ajax({
+        type: "POST",
+        url: "/Admin/PreSendStockDetail/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);
+            }
+        }
+    });
+}
+
+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);
+            }
+        }
+    });
+    var layApplyDate = laydate.render({
+        elem: '#ApplyDate',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        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;
+                    layApplyDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layApplyDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#ApplyDate').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/PreSendStockDetail/Sort?r=" + Math.random(1),
+                data: "Id=" + data.Id + "&Sort=" + value,
+                dataType: "text",
+                success: function (data) {
+                }
+            });
+        }
+    });
+
+    //列表数据
+    table.render({
+        elem: '#LAY-list-manage'
+        , url: '/Admin/PreSendStockDetail/IndexsData' //模拟接口
+        , cols: [[
+            { type: 'checkbox', fixed: 'left' }
+            , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
+            , { field: 'StoreIdStoreName', width: 200, title: '仓库名称', sort: true }
+            , { field: 'StoreIdStoreNo', width: 200, title: '仓库编号', sort: true }
+            , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'BrandId', width: 200, title: '产品类型', sort: true }
+            , { field: 'SnNo', width: 200, title: 'SN编号', sort: true }
+            , { field: 'SnId', width: 200, title: 'SNID', sort: true }
+            , { field: 'ToUserIdMakerCode', width: 200, title: '收货人创客编号', sort: true }
+            , { field: 'ToUserIdRealName', width: 200, title: '收货人真实姓名', sort: true }
+            , { field: 'ToStoreIdStoreNo', width: 200, title: '收货仓库编号', sort: true }
+            , { field: 'ToStoreIdStoreName', width: 200, title: '收货仓库名称', sort: true }
+            // , { field: 'SourceStoreIdStoreNo', width: 200, title: '源仓库编号', sort: true }
+            // , { field: 'SourceStoreIdStoreName', width: 200, title: '源仓库名称', sort: true }
+            , { field: 'ApplyFlagName', width: 200, title: '申请标记', sort: true }
+            , { field: 'ApplyDate', width: 200, title: '申请时间', sort: true }
+            , { field: 'FromUserIdMakerCode', width: 200, title: '出货创客编号', sort: true }
+            , { field: 'FromUserIdRealName', width: 200, title: '出货创客真实姓名', sort: true }
+            , { field: 'FromStoreIdStoreNo', width: 200, title: '出货仓库编号', sort: true }
+            , { field: 'FromStoreIdStoreName', width: 200, title: '出货仓库名称', sort: true }
+            , { field: 'CancelFlagName', width: 200, title: '撤回标记', sort: true }
+            , { field: 'CancelDate', width: 200, title: '撤回时间', sort: true }
+            , { field: 'AuthFlag', width: 200, title: '占用额度', sort: true }
+            // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }s
+            , { title: '操作', width: 180, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+        ]]
+        , where: {
+            StoreId: StoreId
+        }
+        , page: true
+        , limit: 30
+        , height: 'full-220'
+        , text: '对不起,加载出现异常!'
+        , done: function (res, curr, count) {
+            $(".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/PreSendStockDetail/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 === 'edit') {
+            var tr = $(obj.tr);
+            var perContent = layer.open({
+                type: 2
+                , title: '预发货库存明细-编辑'
+                , content: 'Edit?Id=' + data.Id + '&StoreId=' + StoreId + ''
+                , 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/PreSendStockDetail/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);
+        }
+    });
+
+
+    //监听搜索
+    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/PreSendStockDetail/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?StoreId=' + StoreId + ''
+                , 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/PreSendStockDetail/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 () {
+            ExcelKind = 1;
+            layer.open({
+                type: 1,
+                title: '导入',
+                maxmin: false,
+                area: ['460px', '280px'],
+                content: $('#excelForm'),
+                cancel: function () {
+                }
+            });
+            $("#excelTemp").html('<a href="/excelfile/模板文件.xlsx">点击下载模板文件</a>');
+        }
+        , 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/PreSendStockDetail/ExportExcel?r=" + Math.random(1),
+                data: userdata,
+                dataType: "json",
+                success: function (data) {
+                    data.Obj.unshift(data.Fields);
+                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
+                }
+            });
+        }
+        , 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/PreSendStockDetail/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/PreSendStockDetail/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);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+    };
+
+    $('.layui-btn').on('click', function () {
+        var type = $(this).data('type');
+        active[type] ? active[type].call(this) : '';
+    });
+});

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

@@ -32,7 +32,7 @@ layui.config({
     var laydate = layui.laydate;
     var laydate = layui.laydate;
     var layCreateDate = laydate.render({
     var layCreateDate = laydate.render({
         elem: '#CreateDate',
         elem: '#CreateDate',
-        type: 'datetime',
+        type: 'date',
         range: true,
         range: true,
         trigger: 'click',
         trigger: 'click',
         change: function (value, date, endDate) {
         change: function (value, date, endDate) {

+ 7 - 14
wwwroot/layuiadmin/modules_main/StoreHouseCardAmountRecord_Admin.js

@@ -95,17 +95,10 @@ layui.config({
             , { field: 'UserIdRealName', width: 200, title: '创客真实姓名', sort: true }
             , { field: 'UserIdRealName', width: 200, title: '创客真实姓名', sort: true }
             , { field: 'UserIdMakerCode', width: 200, title: '创客创客编号', sort: true }
             , { field: 'UserIdMakerCode', width: 200, title: '创客创客编号', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
-            , { field: 'ApplyId', width: 200, title: '申请单', sort: true }
-            , { field: 'UseAmount', width: 200, title: '使用额度', sort: true }
-            , { field: 'BeforeAmount', width: 200, title: '使用前剩余额度', sort: true }
-            , { field: 'AfterAmount', width: 200, title: '使用后剩余额度', sort: true }
-            , { field: 'AmountType', width: 200, title: '额度类别', sort: true }
-            , { field: 'ChangeType', width: 200, title: '变动类别', sort: true }
-            , { field: 'OperateType', width: 200, title: '操作类别', sort: true }
-            , { field: 'PayMode', width: 200, title: '额度类别', sort: true }
+            , { field: 'UseAmount', width: 200, title: '申请提现临额', sort: true }
 
 
             // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
             // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
-            , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            // , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         ]]
         , where: {
         , where: {
 
 
@@ -339,7 +332,7 @@ layui.config({
             });
             });
             $.ajax({
             $.ajax({
                 type: "GET",
                 type: "GET",
-                url: "/Admin/StoreHouseAmountRecord/ExportExcel?r=" + Math.random(1),
+                url: "/Admin/StoreHouseAmountRecord/ExportsExcel?r=" + Math.random(1),
                 data: userdata,
                 data: userdata,
                 dataType: "json",
                 dataType: "json",
                 success: function (data) {
                 success: function (data) {
@@ -348,21 +341,21 @@ layui.config({
                 }
                 }
             });
             });
         }
         }
-        , Open: function () {
+        , BatchSetting: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
                 , data = checkStatus.data; //得到选中的数据
             if (data.length < 1) {
             if (data.length < 1) {
-                parent.layer.msg("请选择要开启的项");
+                parent.layer.msg("请选择要设置的项");
             } else {
             } else {
                 var ids = "";
                 var ids = "";
                 $.each(data, function (index, value) {
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";
                     ids += data[index].Id + ",";
                 });
                 });
                 ids = ids.substring(0, ids.length - 1);
                 ids = ids.substring(0, ids.length - 1);
-                var index = layer.confirm('确定要开启吗?', function (index) {
+                var index = layer.confirm('确定批量设置完成记录吗?', function (index) {
                     $.ajax({
                     $.ajax({
                         type: "POST",
                         type: "POST",
-                        url: "/Admin/StoreHouseAmountRecord/Open?r=" + Math.random(1),
+                        url: "/Admin/StoreHouseAmountRecord/BatchSetting?r=" + Math.random(1),
                         data: "Id=" + ids,
                         data: "Id=" + ids,
                         dataType: "text",
                         dataType: "text",
                         success: function (data) {
                         success: function (data) {

+ 10 - 0
wwwroot/layuiadmin/modules_main/StoreHouse_Admin.js

@@ -280,6 +280,16 @@ layui.config({
                 width: 110,
                 width: 110,
                 title: '担保额度',
                 title: '担保额度',
                 sort: true
                 sort: true
+            }, {
+                field: 'ThisMonthPreAmount',
+                width: 150,
+                title: '本月小分仓额度',
+                sort: true
+            }, {
+                field: 'ValidPreAmount',
+                width: 150,
+                title: '可用小分仓额度',
+                sort: true
             }
             }
             , {
             , {
                 title: '操作',
                 title: '操作',