Jelajahi Sumber

Merge branch 'DuGuYang' into develop

lichunlei 3 tahun lalu
induk
melakukan
ab91f39aff

+ 1 - 4
Areas/Admin/Controllers/MainServer/ActiveRewardController.cs

@@ -60,9 +60,6 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("KqMerNo", "1"); //快钱商户编号
             Fields.Add("KqSnNo", "1"); //快钱SN号
             Fields.Add("TopUserId", "0"); //顶级创客
-            ViewBag.RightInfo = RightInfo;
-            ViewBag.right = right;
-            ViewBag.BrandId = BrandId;
 
             string condition = " and Status>-1";
             //商户编号
@@ -245,7 +242,7 @@ namespace MySystem.Areas.Admin.Controllers
             }
             Dictionary<string, object> other = new Dictionary<string, object>();
             string RewardAmount = "0.00";//奖励金额
-            DataTable dt = OtherMySqlConn.dtable("select sum(RewardAmount) from ActiveReward where BrandId='" + ViewBag.BrandId + "'" + condition);
+            DataTable dt = OtherMySqlConn.dtable("select sum(RewardAmount) from ActiveReward where BrandId='" + BrandId + "'" + condition);
             if (dt.Rows.Count > 0)
             {
                 RewardAmount = decimal.Parse(function.CheckNum(dt.Rows[0][0].ToString())).ToString("f2");

+ 13 - 13
Areas/Admin/Controllers/MainServer/ProfitRewardRecordController.cs

@@ -64,7 +64,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 分润奖励记录列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(ProfitRewardRecord data, string MakerCode, string RealName, string ProfitTypeSelect, string CheckStatusSelect, string CreateDateData, int page = 1, int limit = 30)
+        public JsonResult IndexData(ProfitRewardRecord data, string right, string BrandId, string MakerCode, string RealName, string ProfitTypeSelect, string CheckStatusSelect, string CreateDateData, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -104,32 +104,32 @@ namespace MySystem.Areas.Admin.Controllers
             if (!string.IsNullOrEmpty(CreateDateData))
             {
                 string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
-                var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
-                var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
-                var check = db.ProfitRewardRecord.Any(m => m.CreateDate >= start && m.BrandId == data.BrandId);
-                var checks = db.ProfitRewardRecord.Any(m => m.CreateDate <= end && m.BrandId == data.BrandId);
+                var start = Convert.ToDateTime(datelist[0]).ToString("yyyyMMdd");
+                var end = Convert.ToDateTime(datelist[1]).ToString("yyyyMMdd");
+                var check = db.ProfitRewardRecord.Any(m => Convert.ToInt32(m.SeoTitle) >= Convert.ToInt32(start) && m.BrandId == Convert.ToInt32(BrandId));
+                var checks = db.ProfitRewardRecord.Any(m => Convert.ToInt32(m.SeoTitle) <= Convert.ToInt32(end) && m.BrandId == Convert.ToInt32(BrandId));
                 if (check)
                 {
-                    var sId = db.ProfitRewardRecord.Where(m => m.CreateDate >= start && m.BrandId == data.BrandId).Min(m => m.Id);
+                    var sId = db.ProfitRewardRecord.Where(m => Convert.ToInt32(m.SeoTitle) >= Convert.ToInt32(start)  && m.BrandId == Convert.ToInt32(BrandId)).Min(m => m.Id);
                     condition += "  and Id >=" + sId;
                 }
                 if (checks)
                 {
-                    var eId = db.ProfitRewardRecord.Where(m => m.CreateDate <= end && m.BrandId == data.BrandId).Max(m => m.Id);
+                    var eId = db.ProfitRewardRecord.Where(m => Convert.ToInt32(m.SeoTitle) <= Convert.ToInt32(end) && m.BrandId == Convert.ToInt32(BrandId)).Max(m => m.Id);
                     condition += " and Id <=" + eId;
                 }
             }
             else
             {
-                var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"));
-                var check = db.ProfitRewardRecord.Any(m => m.CreateDate >= start && m.BrandId == data.BrandId);
+                var start = DateTime.Now.AddMonths(-1).ToString("yyyyMMdd");
+                var check = db.ProfitRewardRecord.Any(m => Convert.ToInt32(m.SeoTitle) >= Convert.ToInt32(start) && m.BrandId == Convert.ToInt32(BrandId));
                 if (check)
                 {
-                    var minId = db.ProfitRewardRecord.Where(m => m.CreateDate >= start && m.BrandId == data.BrandId).Min(m => m.Id);
-                    var Info = function.ReadInstance("/WritePage/ProfitRewardRecord/ProfitRewardRecord.txt");
+                    var minId = db.ProfitRewardRecord.Where(m => Convert.ToInt32(m.SeoTitle) >= Convert.ToInt32(start) && m.BrandId == Convert.ToInt32(BrandId)).Min(m => m.Id);
+                    var Info = function.ReadInstance("/WritePage/ProfitRewardRecord/ProfitRewardRecord" + BrandId + ".txt");
                     if (string.IsNullOrEmpty(Info.ToString()))
                     {
-                        function.WritePage("/WritePage/ProfitRewardRecord/", "ProfitRewardRecord.txt", minId.ToString());
+                        function.WritePage("/WritePage/ProfitRewardRecord/", "ProfitRewardRecord" + BrandId + ".txt", minId.ToString());
                         condition += " and Id >=" + minId;
                     }
                     else
@@ -216,7 +216,7 @@ namespace MySystem.Areas.Admin.Controllers
             string MerchantProfitAmount = "0.00";//商户交易分润总金额
             string CreditProfitAmount = "0.00";//贷记卡分润总金额
             // TODO: 读取太慢,要优化
-            DataTable dt = OtherMySqlConn.dtable("SELECT SUM(if(BrandId="+ViewBag.BrandId+",TradeAmt,0)),SUM(if(BrandId="+ViewBag.BrandId+",CreditTradeAmt,0)),SUM(if(BrandId="+ViewBag.BrandId+",TradeProfit,0)),SUM(if(BrandId="+ViewBag.BrandId+",CreditTradeProfit,0)) FROM ProfitRewardRecord where 1=1 " + condition);
+            DataTable dt = OtherMySqlConn.dtable("SELECT SUM(if(BrandId=" + BrandId + ",TradeAmt,0)),SUM(if(BrandId=" + BrandId + ",CreditTradeAmt,0)),SUM(if(BrandId=" + BrandId + ",TradeProfit,0)),SUM(if(BrandId=" + BrandId + ",CreditTradeProfit,0)) FROM ProfitRewardRecord where 1=1 " + condition);
             if (dt.Rows.Count > 0)
             {
                 MerchantTradeAmount = decimal.Parse(function.CheckNum(dt.Rows[0][0].ToString())).ToString();

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

@@ -116,7 +116,7 @@ namespace MySystem.Areas.Admin.Controllers
             else
             {
                 var start = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
-                condition += " and TradeMonth=" + start;
+                condition += " and TradeMonth>=" + start;
 
                 // var check = db.ProfitSubsidyDetail.Any(m => Convert.ToInt32(m.TradeMonth) >= Convert.ToInt32(start));
                 // if (check)

+ 2 - 2
Areas/Admin/Controllers/MainServer/TradeRecordController.cs

@@ -62,7 +62,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("SnNo", "2"); //快钱SN号
             Fields.Add("TopUserId", "0"); //顶级创客
 
-            string condition = " and Status>-1";
+            string condition = " and Status>-1 and BrandId =" + BrandId;
             //商户编号
             if (!string.IsNullOrEmpty(MerchantNo))
             {
@@ -152,7 +152,7 @@ namespace MySystem.Areas.Admin.Controllers
                     var Info = function.ReadInstance("/WritePage/TradeRecord/TradeRecord" + BrandId + ".txt");
                     if (string.IsNullOrEmpty(Info))
                     {
-                        function.WritePage("/WritePage/TradeRecord/", "TradeRecord" + BrandId + "..txt", minId.ToString());
+                        function.WritePage("/WritePage/TradeRecord/", "TradeRecord" + BrandId + ".txt", minId.ToString());
                         condition += " and Id >=" + minId;
                     }
                     else

+ 6 - 6
Areas/Admin/Controllers/MainServer/UserCashRecordController.cs

@@ -108,26 +108,26 @@ namespace MySystem.Areas.Admin.Controllers
                 // 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 = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
-                var checks = db.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType == 3);
+                var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType < 3);
+                var checks = db.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType < 3);
                 if (check)
                 {
-                    var sId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
+                    var sId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType < 3).Min(m => m.Id);
                     condition += "  and Id >=" + sId;
                 }
                 if (checks)
                 {
-                    var eId = db.UserCashRecord.Where(m => m.CreateDate <= end && m.TradeType == 3).Max(m => m.Id);
+                    var eId = db.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-dd"));
-                var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
+                var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType < 3);
                 if (check)
                 {
-                    var minId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
+                    var minId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType < 3).Min(m => m.Id);
                     var Info = function.ReadInstance("/WritePage/UserCashRecord/UserCashRecord.txt");
                     if (string.IsNullOrEmpty(Info.ToString()))
                     {

+ 9 - 99
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -1521,7 +1521,7 @@ namespace MySystem.Areas.Admin.Controllers
                 start = datelist[0].Replace("-", "");
                 end = datelist[1].Replace("-", "");
                 con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
-                cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + start + " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + end;
+                cons += " and SeoKeyword >=" + start + " and SeoKeyword <=" + end;
 
             }
             //时间为空
@@ -1530,7 +1530,7 @@ namespace MySystem.Areas.Admin.Controllers
                 start = DateTime.Now.ToString("yyyyMM") + "01";
                 end = DateTime.Now.AddMonths(1).ToString("yyyyMM") + "01";
                 con += " and TradeDate>='" + start + "' and TradeDate<'" + end + "'";
-                cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + start + " and DATE_FORMAT(BindingTime,'%Y%m%d') <" + end;
+                cons += " and SeoKeyword >=" + start + " and SeoKeyword <" + end;
             }
             if (!string.IsNullOrEmpty(BrandSelect.ToString()) && BrandId > 0)
             {
@@ -1621,7 +1621,7 @@ namespace MySystem.Areas.Admin.Controllers
                 JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][10].ToString()));
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][11].ToString()));
             }
-            //统计激活绑定数(个人、团队)
+            //统计激活数(个人、团队)
             dt = OtherMySqlConn.dtable("SELECT SUM(if(SeoTitle='self',ActiveBuddyMerStatus,0)),SUM(if(SeoTitle='team',ActiveBuddyMerStatus,0)) FROM UserTradeMonthSummary WHERE UserId= " + ParentId + "" + cons);
             if (dt.Rows.Count > 0)
             {
@@ -1690,14 +1690,12 @@ namespace MySystem.Areas.Admin.Controllers
 
             string condition = " and Status>-1";
             string cons = " and Status>=-1";
-            string con = " and Status>=-1";
 
             //产品类型
             if (!string.IsNullOrEmpty(BrandId.ToString()) && BrandId > 0)
             {
                 condition += " and BrandId =" + BrandId;
                 cons += " and BrandId =" + BrandId;
-                con += " and BrandId =" + BrandId;
             }
             //创客Id
             if (!string.IsNullOrEmpty(UserId.ToString()))
@@ -1708,15 +1706,14 @@ namespace MySystem.Areas.Admin.Controllers
             if (!string.IsNullOrEmpty(sTradeDate) && !string.IsNullOrEmpty(eTradeDate))
             {
                 condition += " and TradeDate >=" + Convert.ToInt32(sTradeDate) + " and TradeDate <=" + Convert.ToInt32(eTradeDate);
-                cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + Convert.ToInt32(sTradeDate) + " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + Convert.ToInt32(eTradeDate);
-                con += " and TradeDate >=" + Convert.ToInt32(sTradeDate) + " and TradeDate <=" + Convert.ToInt32(eTradeDate);
+                cons += " and SeoKeyword >=" + Convert.ToInt32(sTradeDate) + " and SeoKeyword <=" + Convert.ToInt32(eTradeDate);
             }
             //结束时间
             else
             {
-                condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
-                cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + Convert.ToInt32(eTradeDate);
-                con += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
+                var start = DateTime.Now.ToString("yyyyMM") + "01";
+                condition += " and TradeDate >=" + Convert.ToInt32(start) + " and TradeDate <=" + Convert.ToInt32(eTradeDate);
+                cons += " and SeoKeyword >=" + Convert.ToInt32(start) + " and SeoKeyword <=" + Convert.ToInt32(eTradeDate);
             }
 
             //扶持期
@@ -1759,95 +1756,8 @@ namespace MySystem.Areas.Admin.Controllers
                 JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][10].ToString()));
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][11].ToString()));
             }
-            // DataTable dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     TotalAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     DAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JfAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(HelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JCountfc = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     YAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     TotalAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     DAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dt.Rows[0][1].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JfAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team'" + condition);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            // dt = OtherMySqlConn.dtable("SELECT SUM(ActiveBuddyMerStatus) sum FROM UserTradeMonthSummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + cons);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            dt = OtherMySqlConn.dtable("SELECT SUM(ActiveBuddyMerStatus) sum FROM UserTradeMonthSummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + con);
-            if (dt.Rows.Count > 0)
-            {
-                ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
-            }
-            //TODO: 统计激活绑定数(个人)
-            // dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId= '" + UserId + "'" + cons);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     PBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            dt = OtherMySqlConn.dtable("SELECT SUM(ActiveBuddyMerStatus) sum FROM UserTradeMonthSummary WHERE SeoTitle='self' AND UserId= '" + UserId + "'" + con);
-            if (dt.Rows.Count > 0)
-            {
-                PACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
-            }
-            //TODO: 统计激活绑定数(团队)
-            // dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId IN (SELECT Id FROM Users WHERE ParentNav LIKE '%," + UserId + ",%' OR Id=" + UserId + ")" + cons);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     TBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
-            // }
-            dt = OtherMySqlConn.dtable("SELECT SUM(ActiveBuddyMerStatus) sum FROM UserTradeMonthSummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + con);
+            //统计激活数(个人、团队)
+            dt = OtherMySqlConn.dtable("SELECT SUM(if(SeoTitle='team',ActiveBuddyMerStatus,0)) FROM UserTradeMonthSummary WHERE UserId= " + UserId + "" + cons);
             if (dt.Rows.Count > 0)
             {
                 TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));

+ 62 - 58
wwwroot/layuiadmin/modules_main/PosMachinesTwo_Admin.js

@@ -92,23 +92,23 @@ layui.config({
             }
         }
     });
-    
+
 
     //excel导入
-    excel = layui.excel;        
+    excel = layui.excel;
     $('#ExcelFile').change(function (e) {
         var files = e.target.files;
-        excel.importExcel(files, { }, function (data) {
+        excel.importExcel(files, {}, function (data) {
             ExcelData = data[0].sheet1;
         });
     });
 
     //监听单元格编辑
-    table.on('edit(LAY-list-manage)', function(obj){
+    table.on('edit(LAY-list-manage)', function (obj) {
         var value = obj.value //得到修改后的值
-        ,data = obj.data //得到所在行所有键值
-        ,field = obj.field; //得到字段
-        if(field == "Sort"){
+            , data = obj.data //得到所在行所有键值
+            , field = obj.field; //得到字段
+        if (field == "Sort") {
             $.ajax({
                 type: "POST",
                 url: "/Admin/PosMachinesTwo/Sort?r=" + Math.random(1),
@@ -119,38 +119,38 @@ layui.config({
             });
         }
     });
-    
+
     //列表数据
     table.render({
         elem: '#LAY-list-manage'
         , url: '/Admin/PosMachinesTwo/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
-            ,{field:'PosSn', width: 200, title:'SN编号', sort: true}
-            ,{field:'BrandId', width: 200, title:'产品类型', sort: true}
-            ,{field:'StoreIdCode', width: 200, title:'所在仓库编号', sort: true}
-            ,{field:'StoreIdName', width: 200, title:'所在仓库名称', sort: true}
-            ,{field:'UserIdMakerCode', width: 200, title:'创客编号', sort: true}
-            ,{field:'UserIdRealName', width: 200, title:'创客姓名', sort: true}
-            ,{field:'BindMerchantIdMerchantNo', width: 200, title:'绑定商户编号', sort: true}
-            ,{field:'BindMerchantIdMerchantName', width: 200, title:'绑定商户姓名', sort: true}
-            ,{field:'PosSnType', width: 200, title:'机具类型', sort: true}
-            ,{field:'DeviceType', width: 200, title:'设备类型', sort: true}
-            ,{field:'BindingState', width: 200, title:'绑定状态', sort: true}
-            ,{ field: 'ActivationState', width: 200, title: '激活状态', sort: true }
-            ,{ field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
-            ,{ field: 'BindingTime', width: 200, title: '绑定时间', sort: true }
-            ,{ field: 'TransferTime', width: 200, title: '划拨时间', sort: true }
-            ,{ field: 'CreateDate', width: 200, title: '入库时间', sort: true }
-            ,{ field: 'RecycStartDate', width: 200, title: '循环开始时间', sort: true }
-            ,{ field: 'RecycEndDate', width: 200, title: '循环截止时间', sort: true }
-            ,{ field: 'UserInfo', width: 200, title: '大盟主券标记', sort: true }
-            ,{ field: 'IsFirst', width: 200, title: '是否第一台机具', sort: true }
-            ,{ field: 'SeoKeyword', width: 200, title: '押金金额', sort: true }
-            ,{ title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            , { field: 'PosSn', width: 200, title: 'SN编号', sort: true }
+            , { field: 'BrandId', width: 200, title: '产品类型', sort: true }
+            , { field: 'StoreIdCode', width: 200, title: '所在仓库编号', sort: true }
+            , { field: 'StoreIdName', width: 200, title: '所在仓库名称', sort: true }
+            , { field: 'UserIdMakerCode', width: 200, title: '创客编号', sort: true }
+            , { field: 'UserIdRealName', width: 200, title: '创客姓名', sort: true }
+            , { field: 'BindMerchantIdMerchantNo', width: 200, title: '绑定商户编号', sort: true }
+            , { field: 'BindMerchantIdMerchantName', width: 200, title: '绑定商户姓名', sort: true }
+            , { field: 'PosSnType', width: 200, title: '机具类型', sort: true }
+            , { field: 'DeviceType', width: 200, title: '设备类型', sort: true }
+            , { field: 'BindingState', width: 200, title: '绑定状态', sort: true }
+            , { field: 'ActivationState', width: 200, title: '激活状态', sort: true }
+            , { field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
+            , { field: 'BindingTime', width: 200, title: '绑定时间', sort: true }
+            , { field: 'TransferTime', width: 200, title: '划拨时间', sort: true }
+            , { field: 'CreateDate', width: 200, title: '入库时间', sort: true }
+            , { field: 'RecycStartDate', width: 200, title: '循环开始时间', sort: true }
+            , { field: 'RecycEndDate', width: 200, title: '循环截止时间', sort: true }
+            , { field: 'UserInfo', width: 200, title: '大盟主券标记', sort: true }
+            , { field: 'IsFirst', width: 200, title: '是否第一台机具', sort: true }
+            , { field: 'SeoKeyword', width: 200, title: '押金金额', sort: true }
+            , { title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
-            
+
         }
         , page: true
         , limit: 30
@@ -177,7 +177,7 @@ layui.config({
                     data: "Id=" + data.Id,
                     dataType: "text",
                     success: function (data) {
-                        if (data == "success") {                            
+                        if (data == "success") {
                             obj.del();
                             layer.close(index);
                         } else {
@@ -200,20 +200,20 @@ layui.config({
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -224,7 +224,7 @@ layui.config({
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/PosMachinesTwo/Edit?r=" + Math.random(1),
@@ -256,14 +256,18 @@ layui.config({
     form.on('submit(LAY-list-front-search)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-
-        //执行重载
-        table.reload('LAY-list-manage', {
-            where: field,
-            page: {
-                curr: 1
-            }
-        });
+        if (field.UserIdMakerCode == "" && field.UserIdRealName == "" && field.StoreIdCode == "" && field.StoreIdName == "" && field.PosSn == "" && field.BindingStateSelect == "" && field.ActivationStateSelect == "" && field.ActivationDateData == "" && field.BindingDateData == "" && field.BrandId == "") {
+            layer.alert('请输入查询条件');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field,
+                page: {
+                    curr: 1
+                }
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {
@@ -318,20 +322,20 @@ layui.config({
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -342,7 +346,7 @@ layui.config({
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/PosMachinesTwo/Add?r=" + Math.random(1),
@@ -416,9 +420,9 @@ layui.config({
         , Open: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要开启的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";
@@ -445,9 +449,9 @@ layui.config({
         , Close: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要关闭的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";

+ 58 - 54
wwwroot/layuiadmin/modules_main/PosMerchantInfoList_Admin.js

@@ -87,20 +87,20 @@ layui.config({
 
 
     //excel导入
-    excel = layui.excel;        
+    excel = layui.excel;
     $('#ExcelFile').change(function (e) {
         var files = e.target.files;
-        excel.importExcel(files, { }, function (data) {
+        excel.importExcel(files, {}, function (data) {
             ExcelData = data[0].sheet1;
         });
     });
 
     //监听单元格编辑
-    table.on('edit(LAY-list-manage)', function(obj){
+    table.on('edit(LAY-list-manage)', function (obj) {
         var value = obj.value //得到修改后的值
-        ,data = obj.data //得到所在行所有键值
-        ,field = obj.field; //得到字段
-        if(field == "Sort"){
+            , data = obj.data //得到所在行所有键值
+            , field = obj.field; //得到字段
+        if (field == "Sort") {
             $.ajax({
                 type: "POST",
                 url: "/Admin/PosMerchantInfo/Sort?r=" + Math.random(1),
@@ -111,7 +111,7 @@ layui.config({
             });
         }
     });
-    
+
 
     //列表数据
     table.render({
@@ -119,26 +119,26 @@ layui.config({
         , url: '/Admin/PosMerchantInfoList/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
-            ,{field:'MerchantNo', width: 200, title:'商户编号', sort: true}
-            ,{field:'MerIdcardNo', width: 200, title:'身份证号', sort: true}
-            ,{field:'MerchantName', width: 200, title:'商户名称', sort: true}
-            ,{field:'MerchantMobile', width: 200, title:'商户手机号', sort: true}
-            ,{field:'KqMerNo', width: 200, title:'快钱商户编码', sort: true}
-            ,{field:'KqSnNo', width: 200, title:'快钱SN号', sort: true}
-            ,{field:'SnType', width: 200, title:'机具类型', sort: true}
-            ,{field:'RebateQual', width: 200, title:'返利资格', sort: true}
-            ,{field:'ActType', width: 200, title:'激活类型', sort: true}
-            ,{field:'MerStatus', width: 200, title:'商户状态', sort: true}
-            ,{field:'ActiveStatus', width: 200, title:'商户激活状态', sort: true}
-            ,{field:'MerMakerCode', width: 200, title:'商户创客编码', sort: true}
-            ,{field:'MerRealName', width: 200, title:'商户创客名称', sort: true}
-            ,{field:'MerUserType', width: 200, title:'商户创客类型', sort: true}
-            ,{field:'MakerCode', width: 200, title:'直属创客编号', sort: true}
-            ,{field:'RealName', width: 200, title:'直属创客姓名', sort: true}
-            ,{field:'StoreNo', width: 200, title:'SN仓库编号', sort: true}
-            ,{field:'StoreName', width: 200, title:'SN仓库名称', sort: true}
-            ,{field:'SnApplyMakerCode', width: 200, title:'申请创客编号', sort: true}
-            ,{field:'SnApplyRealName', width: 200, title:'申请创客姓名', sort: true}
+            , { field: 'MerchantNo', width: 200, title: '商户编号', sort: true }
+            , { field: 'MerIdcardNo', width: 200, title: '身份证号', sort: true }
+            , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
+            , { field: 'MerchantMobile', width: 200, title: '商户手机号', sort: true }
+            , { field: 'KqMerNo', width: 200, title: '快钱商户编码', sort: true }
+            , { field: 'KqSnNo', width: 200, title: '快钱SN号', sort: true }
+            , { field: 'SnType', width: 200, title: '机具类型', sort: true }
+            , { field: 'RebateQual', width: 200, title: '返利资格', sort: true }
+            , { field: 'ActType', width: 200, title: '激活类型', sort: true }
+            , { field: 'MerStatus', width: 200, title: '商户状态', sort: true }
+            , { field: 'ActiveStatus', width: 200, title: '商户激活状态', sort: true }
+            , { field: 'MerMakerCode', width: 200, title: '商户创客编码', sort: true }
+            , { field: 'MerRealName', width: 200, title: '商户创客名称', sort: true }
+            , { field: 'MerUserType', width: 200, title: '商户创客类型', sort: true }
+            , { field: 'MakerCode', width: 200, title: '直属创客编号', sort: true }
+            , { field: 'RealName', width: 200, title: '直属创客姓名', sort: true }
+            , { field: 'StoreNo', width: 200, title: 'SN仓库编号', sort: true }
+            , { field: 'StoreName', width: 200, title: 'SN仓库名称', sort: true }
+            , { field: 'SnApplyMakerCode', width: 200, title: '申请创客编号', sort: true }
+            , { field: 'SnApplyRealName', width: 200, title: '申请创客姓名', sort: true }
             , { field: 'KqRegTime', width: 200, title: '注册时间', sort: true }
             , { title: '操作', width: 120, align: 'left', toolbar: '#table-list-tools', fixed: 'right' }
         ]]
@@ -164,7 +164,7 @@ layui.config({
                     data: "Id=" + data.Id,
                     dataType: "text",
                     success: function (data) {
-                        if (data == "success") {                            
+                        if (data == "success") {
                             obj.del();
                             layer.close(index);
                         } else {
@@ -187,20 +187,20 @@ layui.config({
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -211,7 +211,7 @@ layui.config({
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/PosMerchantInfo/Edit?r=" + Math.random(1),
@@ -292,14 +292,18 @@ layui.config({
     form.on('submit(LAY-list-front-search)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-
-        //执行重载
-        table.reload('LAY-list-manage', {
-            where: field,
-            page: {
-                curr: 1
-            }
-        });
+        if (field.MerIdcardNo == "" && field.MerchantName == "" && field.MerchantMobile == "") {
+            layer.alert('请输入查询条件');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field,
+                page: {
+                    curr: 1
+                }
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {
@@ -354,20 +358,20 @@ layui.config({
                         , submitID = 'LAY-list-front-submit'
                         , submit = layero.find('iframe').contents().find('#' + submitID);
 
-                    setTimeout(function () { 
+                    setTimeout(function () {
                         layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
                             var errObj = $(this).find('.layui-form-danger');
                             if (errObj.length > 0) {
                                 iframeWindow.element.tabChange('mytabbar', String(i + 1));
                                 submit.click();
                             }
-                        });                        
+                        });
                     }, 300);
 
-                    
-                    
-                    
-                    
+
+
+
+
 
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
@@ -378,7 +382,7 @@ layui.config({
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/PosMerchantInfo/Add?r=" + Math.random(1),
@@ -433,9 +437,9 @@ layui.config({
         , Open: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要开启的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";
@@ -462,9 +466,9 @@ layui.config({
         , Close: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据
-            if(data.length < 1){
+            if (data.length < 1) {
                 parent.layer.msg("请选择要关闭的项");
-            }else{
+            } else {
                 var ids = "";
                 $.each(data, function (index, value) {
                     ids += data[index].Id + ",";

+ 12 - 8
wwwroot/layuiadmin/modules_main/StoreHouse_Admin.js

@@ -474,14 +474,18 @@ layui.config({
     form.on('submit(LAY-list-front-search)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-
-        //执行重载
-        table.reload('LAY-list-manage', {
-            where: field,
-            page: {
-                curr: 1
-            }
-        });
+        if (field.StoreNo == "" && field.StoreName == "" && field.UserIdMakerCode == "" && field.UserIdRealName == "" && field.ManageUserIdRealName == "" && field.ManageUserIdMobile == "" && field.ManageUserIdMakerCode == "" && field.ManagerEmail == "" && field.StoreStatusSelect == "" && field.CreateDateData == "") {
+            layer.alert('请输入查询条件');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field,
+                page: {
+                    curr: 1
+                }
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {

+ 12 - 8
wwwroot/layuiadmin/modules_main/UserAccount_Admin.js

@@ -320,14 +320,18 @@ layui.config({
     form.on('submit(LAY-list-front-search)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-
-        //执行重载
-        table.reload('LAY-list-manage', {
-            where: field,
-            page: {
-                curr: 1
-            }
-        });
+        if (field.MakerCode == "" && field.RealName == "" && field.CreateDateData == "" && field.TopUserId == "" && field.AccountStatusSelect == "") {
+            layer.alert('请输入查询条件');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field,
+                page: {
+                    curr: 1
+                }
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {

+ 24 - 20
wwwroot/layuiadmin/modules_main/Users_Admin.js

@@ -152,23 +152,23 @@ layui.config({
                 });
             });
         } else if (obj.event === 'cancle') {
-                var index = layer.confirm('是否确定注销' + data.MakerCode + ',' + data.RealName + '?', function (index) {
-                    $.ajax({
-                        type: "POST",
-                        url: "/Admin/Users/Cancel?r=" + Math.random(1),
-                        data: "UserId=" + data.Id,
-                        dataType: "text",
-                        success: function (data) {
-                            if (data == "success") {
-                                obj.del();
-                                layer.close(index);
-                                parent.layer.msg('已注销');
-                            } else {
-                                parent.layer.msg(data);
-                            }
+            var index = layer.confirm('是否确定注销' + data.MakerCode + ',' + data.RealName + '?', function (index) {
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/Users/Cancel?r=" + Math.random(1),
+                    data: "UserId=" + data.Id,
+                    dataType: "text",
+                    success: function (data) {
+                        if (data == "success") {
+                            obj.del();
+                            layer.close(index);
+                            parent.layer.msg('已注销');
+                        } else {
+                            parent.layer.msg(data);
                         }
-                    });
+                    }
                 });
+            });
         } else if (obj.event === 'sycn') {
             var index = layer.confirm('确定要同步该创客的机具数吗?', function (index) {
                 layer.close(index);
@@ -672,11 +672,15 @@ layui.config({
     form.on('submit(LAY-list-front-search)', function (data) {
         var field = data.field;
         field.ShowFlag = 1;
-
-        //执行重载
-        table.reload('LAY-list-manage', {
-            where: field
-        });
+        if (field.MakerCode == "" && field.RealName == "" && field.ParentMakerCode == "" && field.ParentRealName == "" && field.Mobile == "" && field.CertId == "" && field.CreateDateData == "" && field.UserLevel == "" && field.AuthFlagSelect == "" && field.RiskFlagSelect == "" && field.MerchantTypeSelect == "") {
+            layer.alert('请输入查询条件');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {