Sfoglia il codice sorgente

调整筛选条件

DuGuYang 3 anni fa
parent
commit
79c6340c2c

+ 0 - 3
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";
             //商户编号

+ 1 - 1
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>();

+ 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()))
                     {

+ 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.PosSn == "" || field.UserIdMakerCode == "") {
+            layer.alert('请填写创客编号或者机具Sn');
+        }
+        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 + ",";

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

@@ -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 == "") {
+            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/StoreHouse_Admin.js

@@ -468,14 +468,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.UserIdMakerCode == "") {
+            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 == "") {
+            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 == "") {
+            layer.alert('请填写创客编号');
+        }
+        else {
+            //执行重载
+            table.reload('LAY-list-manage', {
+                where: field
+            });
+        }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
         table.reload('LAY-list-manage', {