Ver Fonte

后台-首台退押审核 导入人工已退列表新增退服务费时间
后台-首台押金退还 导出时增加服务费金额
后台-人工已退商户列表 新增导出功能
完成

DuGuYang há 3 anos atrás
pai
commit
29b435cb18

+ 17 - 12
Areas/Admin/Controllers/MainServer/PosMerchantInfoListController.cs

@@ -172,12 +172,12 @@ namespace MySystem.Areas.Admin.Controllers
         /// 人工已退商户列表
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexrgData(PosMerchantInfo data, string MerIdcardNo, string MerchantName, string PhoneNo, string PosSn, int page = 1, int limit = 30)
+        public JsonResult IndexrgData(PosMerchantInfo data, string KqMerNo, string MerIdcardNo, string MerchantName, string PhoneNo, string PosSn, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
 
-            Fields.Add("KqMerNo", "1"); //商户编号
+            // Fields.Add("KqMerNo", "1"); //商户编号
             string condition = " and Status>-1 and StandardStatus=-2";
             //身份证号
             if (!string.IsNullOrEmpty(MerIdcardNo))
@@ -191,12 +191,15 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and MerchantName like '%" + MerchantName + "%'";
             }
-            //手机号
-            if (!string.IsNullOrEmpty(PhoneNo))
+            //商户姓名
+            if (!string.IsNullOrEmpty(MerchantName))
             {
-                var PhoneNof = PhoneNo.Substring(0, 3);
-                var PhoneNob = PhoneNo.Substring(PhoneNo.Length - 4);
-                condition += " and LEFT(MerchantMobile,3)=" + PhoneNof + " AND RIGHT(MerchantMobile,4)=" + PhoneNob + "";
+                condition += " and MerchantName like '%" + MerchantName + "%'";
+            }
+            //商户编号
+            if (!string.IsNullOrEmpty(KqMerNo))
+            {
+                condition += " and KqMerNo='" + KqMerNo + "'";
             }
             //机具号
             if (!string.IsNullOrEmpty(PosSn))
@@ -359,11 +362,11 @@ namespace MySystem.Areas.Admin.Controllers
                 condition += " and KqSnNo='" + PosSn + "'";
             }
 
-            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", 1, 20000, condition, "MerchantNo,MerchantName,Remark,KqMerNo,KqSnNo,UserId", false);
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", 1, 20000, condition, "MerchantName,Remark,KqMerNo,KqSnNo,UserId", false);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             foreach (Dictionary<string, object> dic in diclist)
             {
-                
+
 
                 var KqSnNo = dic["KqSnNo"].ToString();
                 var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
@@ -374,6 +377,7 @@ namespace MySystem.Areas.Admin.Controllers
                 Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
                 dic["MakerCode"] = puser.MakerCode;
                 dic["RealName"] = puser.RealName;
+                dic.Remove("UserId");
 
                 //实际押金
                 string SeoKeyword = "0";
@@ -396,15 +400,15 @@ namespace MySystem.Areas.Admin.Controllers
             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("MerchantNo", "商户编号");
+            ReturnFields.Add("KqMerNo", "商户编号");
             ReturnFields.Add("MerchantName", "商户名称");
             ReturnFields.Add("BrandName", "机具品牌");
             ReturnFields.Add("KqSnNo", "机具SN");
             ReturnFields.Add("GetTime", "领取时间");
             ReturnFields.Add("SeoKeyword", "服务费金额");
             ReturnFields.Add("Remark", "已退还金额");
-            ReturnFields.Add("RealName", "创客编号");
-            ReturnFields.Add("MakerCode", "创客姓名");
+            ReturnFields.Add("MakerCode", "创客编号");
+            ReturnFields.Add("RealName", "创客姓名");
             result.Add("Fields", ReturnFields);
             AddSysLog("0", "PosMerchantInfo", "ExportrgExcel");
             return Json(result);
@@ -902,6 +906,7 @@ namespace MySystem.Areas.Admin.Controllers
                 var posMerchantInfo = db.PosMerchantInfo.FirstOrDefault(m => m.KqMerNo == KqMerNo) ?? new PosMerchantInfo();
                 posMerchantInfo.StandardStatus = -2;
                 posMerchantInfo.Remark = Amount;
+                posMerchantInfo.KqRegTime = DateTime.Now;
                 Ids += posMerchantInfo.Id + "_" + Amount + ",";
                 db.SaveChanges();
             }

+ 1 - 0
wwwroot/layuiadmin/modules_main/PosMerchantInforgList_Admin.js

@@ -125,6 +125,7 @@ layui.config({
             , { field: 'MerchantMobile', width: 200, title: '手机号', sort: true }
             , { field: 'KqSnNo', width: 220, title: '机具SN号', sort: true }
             , { field: 'SeoKeyword', width: 220, title: '服务费', sort: true }
+            , { field: 'KqRegTime', width: 220, title: '导入退还时间', sort: true }
             // , { field: 'PrizeParams', width: 220, title: '设置押金', sort: true }
             , { field: 'Remark', width: 220, title: '达标奖', sort: true }
         ]]