Просмотр исходного кода

后台费率报警功能升级

lcl 2 лет назад
Родитель
Сommit
a20da656c8

+ 20 - 2
Areas/Admin/Controllers/MainServer/PosFeeWarningRecordController.cs

@@ -38,7 +38,8 @@ namespace MySystem.Areas.Admin.Controllers
         {
         {
             ViewBag.RightInfo = RightInfo;
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = right;
             ViewBag.right = right;
-
+            List<KqProducts> BrandList = db.KqProducts.ToList();
+            ViewBag.BrandList = BrandList;
 
 
             return View();
             return View();
         }
         }
@@ -51,7 +52,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 机具费率报警列表
         /// 机具费率报警列表
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>
-        public JsonResult IndexData(PosFeeWarningRecord data, string DoStatus, string CreateDateData, int page = 1, int limit = 30)
+        public JsonResult IndexData(PosFeeWarningRecord data, string DoStatus, string CreateDateData, string UpdateDateData, int page = 1, int limit = 30)
         {
         {
 
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -61,6 +62,10 @@ namespace MySystem.Areas.Admin.Controllers
             {
             {
                 condition += " and PosSn like '%" + data.PosSn + "%'";
                 condition += " and PosSn like '%" + data.PosSn + "%'";
             }
             }
+            if (data.BrandId > 0)
+            {
+                condition += " and BrandId=" + data.BrandId;
+            }
             //状态
             //状态
             if (!string.IsNullOrEmpty(DoStatus))
             if (!string.IsNullOrEmpty(DoStatus))
             {
             {
@@ -74,6 +79,14 @@ namespace MySystem.Areas.Admin.Controllers
                 string end = datelist[1];
                 string end = datelist[1];
                 condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
                 condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
             }
             }
+            //同步时间
+            if (!string.IsNullOrEmpty(UpdateDateData))
+            {
+                string[] datelist = UpdateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and UpdateDate>='" + start + " 00:00:00' and UpdateDate<='" + end + " 23:59:59'";
+            }
 
 
             List<KqProducts> BrandList = db.KqProducts.ToList();
             List<KqProducts> BrandList = db.KqProducts.ToList();
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosFeeWarningRecord", Fields, "Id desc", "0", page, limit, condition);
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosFeeWarningRecord", Fields, "Id desc", "0", page, limit, condition);
@@ -83,6 +96,11 @@ namespace MySystem.Areas.Admin.Controllers
                 int BrandId = int.Parse(dic["BrandId"].ToString());
                 int BrandId = int.Parse(dic["BrandId"].ToString());
                 KqProducts Brand = BrandList.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
                 KqProducts Brand = BrandList.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
                 dic["BrandName"] = Brand.Name;
                 dic["BrandName"] = Brand.Name;
+                
+                int PosId = int.Parse(dic["PosId"].ToString());
+                PosMachinesTwo Pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == PosId) ?? new PosMachinesTwo();
+                PosMerchantInfo Merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == Pos.BindMerchantId) ?? new PosMerchantInfo();
+                dic["MerNo"] = Merchant.KqMerNo;
 
 
                 //状态
                 //状态
                 int Status = int.Parse(dic["Status"].ToString());
                 int Status = int.Parse(dic["Status"].ToString());

+ 21 - 1
Areas/Admin/Views/MainServer/PosFeeWarningRecord/Index.cshtml

@@ -1,7 +1,8 @@
+@using MySystem.Models;
 @{
 @{
     string RightInfo = ViewBag.RightInfo as string;
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
     string right = ViewBag.right as string;
-
+    List<KqProducts> BrandList = ViewBag.BrandList as List<KqProducts>;
 }
 }
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html>
 <html>
@@ -50,6 +51,18 @@
                             <input class="layui-input" type="text" name="PosSn" autocomplete="off">
                             <input class="layui-input" type="text" name="PosSn" autocomplete="off">
                         </div>
                         </div>
                     </div>
                     </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">品牌</label>
+                        <div class="layui-input-inline">
+                            <select id="BrandId" name="BrandId" lay-search="">
+                                <option value="">全部...</option>
+                                @foreach(KqProducts Brand in BrandList)
+                                {
+                                    <option value="@Brand.Id">@Brand.Name</option>
+                                }
+                            </select>
+                        </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">
@@ -57,6 +70,13 @@
                                 placeholder="" autocomplete="off">
                                 placeholder="" autocomplete="off">
                         </div>
                         </div>
                     </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="UpdateDateData" id="UpdateDate"
+                                placeholder="" autocomplete="off">
+                        </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">

+ 33 - 1
wwwroot/layuiadmin/modules_main/PosFeeWarningRecord_Admin.js

@@ -58,6 +58,35 @@ layui.config({
         }
         }
     });
     });
 
 
+    var laydate = layui.laydate;
+    var layUpdateDate = laydate.render({
+        elem: '#UpdateDate',
+        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;
+                    layUpdateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layUpdateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#UpdateDate').val(value);
+            }
+        }
+    });
+
     //excel导入
     //excel导入
     excel = layui.excel;
     excel = layui.excel;
     $('#ExcelFile').change(function (e) {
     $('#ExcelFile').change(function (e) {
@@ -82,14 +111,17 @@ layui.config({
             { type: 'checkbox', fixed: 'left' }
             { type: 'checkbox', fixed: 'left' }
             , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
             , { field: 'PosSn', width: 250, title: '机具SN', sort: true }
             , { field: 'PosSn', width: 250, title: '机具SN', sort: true }
+            , { field: 'MerNo', width: 250, title: '商户编号', sort: true }
             , { field: 'BrandName', width: 200, title: '品牌', sort: true }
             , { field: 'BrandName', width: 200, title: '品牌', sort: true }
             , { field: 'Status', width: 100, title: '状态', sort: true }
             , { field: 'Status', width: 100, title: '状态', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
             , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'UpdateDate', width: 200, title: '同步时间', sort: true }
+            , { field: 'DoDate', width: 200, title: '执行时间', sort: true }
             , { field: 'UpFeeFlag', width: 150, title: '调升标记', sort: true }
             , { field: 'UpFeeFlag', width: 150, title: '调升标记', sort: true }
             , { field: 'DownFeeFlag', width: 150, title: '调降标记', sort: true }
             , { field: 'DownFeeFlag', width: 150, title: '调降标记', sort: true }
             , { field: 'DownFee', width: 150, title: '调降费率', sort: true }
             , { field: 'DownFee', width: 150, title: '调降费率', sort: true }
             , { field: 'TradeFeeRate', width: 150, title: '支付公司费率', sort: true }
             , { field: 'TradeFeeRate', width: 150, title: '支付公司费率', sort: true }
-            , { field: 'TradeFeeAmt', width: 150, title: '支付公司秒到费', sort: true }
+            , { field: 'TradeFeeAmt', width: 150, title: '支付公司秒到费', sort: true } 
 
 
             , { title: '操作', align: 'center', width: 150, fixed: 'right', toolbar: '#table-list-tools' }
             , { title: '操作', align: 'center', width: 150, fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         ]]