DuGuYang 3 лет назад
Родитель
Сommit
7491de52c2

+ 30 - 2
Areas/Admin/Controllers/MainServer/PosMerchantInfoListController.cs

@@ -168,7 +168,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// <returns></returns>
         public JsonResult IndexsData(PosMerchantInfo data, string MerIdcardNo, string MerchantName, string PhoneNo, int ShowFlag = 0, int page = 1, int limit = 30)
         {
-            
+
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Fields.Add("MerchantMobile", "1"); //商户手机号
@@ -182,7 +182,7 @@ namespace MySystem.Areas.Admin.Controllers
             }
 
             string condition = " and Status>-1 and StandardStatus=100";
-            
+
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", 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)
@@ -245,6 +245,34 @@ namespace MySystem.Areas.Admin.Controllers
         #endregion
 
 
+        #region 批量通过
+
+        /// <summary>
+        /// 批量通过
+        /// </summary>
+        /// <returns></returns>
+        public string BatchSetting(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "PosMerchantInfo", "BatchSetting");
+            var Ids = "";//商户Id
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Ids += id + ",";
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("StandardStatus", 101);//设置为可退押状态
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, id);
+            }
+            string text = string.Format("商户押金退还批量通过,商户Id: '" + Ids.TrimEnd(',') + "',操作人: '" + SysUserName + "_" + SysRealName + "',Time'" + DateTime.Now + "'");
+            function.WriteLog(text, "商户押金退还批量通过");
+            db.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+
         #region 增加商户
 
         /// <summary>

+ 3 - 3
Areas/Admin/Views/MainServer/PosMerchantInfoList/Indexs.cshtml

@@ -65,10 +65,10 @@
                         <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
                             <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
                         </button>
-                        @if (RightInfo.Contains("," + right + "_export,"))
+                        @if (RightInfo.Contains("," + right + "_batchset,"))
                         {
-                            <button class="layui-btn" data-type="ExportExcel">
-                                <i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出
+                            <button class="layui-btn" data-type="BatchSetting">
+                                <i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>批量通过
                             </button>
                         }
                     </div>

Разница между файлами не показана из-за своего большого размера
+ 51 - 1154
Models/WebCMSEntities.cs


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

@@ -297,8 +297,6 @@ layui.config({
         }
         else {
             //执行重载
-            var field = data.field;
-            field.ShowFlag = 1;
             table.reload('LAY-list-manage', {
                 where: field,
                 page: {
@@ -308,6 +306,8 @@ layui.config({
         }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
+        var field = data.field;
+        field.ShowFlag = 1;
         table.reload('LAY-list-manage', {
             where: null,
             page: {

+ 38 - 28
wwwroot/layuiadmin/modules_main/PosMerchantInfosList_Admin.js

@@ -123,25 +123,7 @@ layui.config({
             , { field: 'MerIdcardNo', width: 200, title: '身份证号', sort: true }
             , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
             , { field: 'MerchantMobile', 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' }
+            , { field: 'KqSnNo', width: 220, title: '机具SN号', sort: true }
         ]]
         , where: {
         }
@@ -198,11 +180,6 @@ layui.config({
                         });
                     }, 300);
 
-
-
-
-
-
                     //监听提交
                     iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
                         var field = data.field; //获取提交的字段
@@ -298,10 +275,8 @@ layui.config({
         }
         else {
             //执行重载
-            var field = data.field;
-            field.ShowFlag = 1;
             table.reload('LAY-list-manage', {
-                where: field,
+                where: null,
                 page: {
                     curr: 1
                 }
@@ -309,8 +284,10 @@ layui.config({
         }
     });
     form.on('submit(LAY-list-front-searchall)', function (data) {
+        var field = data.field;
+        field.ShowFlag = 1;
         table.reload('LAY-list-manage', {
-            where: null,
+            where: field,
             page: {
                 curr: 1
             }
@@ -437,6 +414,39 @@ layui.config({
                 }
             });
         }
+        , BatchSetting: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要通过的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要通过吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/PosMerchantInfoList/BatchSetting?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                layer.msg('成功', {
+                                    time: 1000
+                                }, function () {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                });
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
         , Open: function () {
             var checkStatus = table.checkStatus('LAY-list-manage')
                 , data = checkStatus.data; //得到选中的数据

Некоторые файлы не были показаны из-за большого количества измененных файлов