lichunlei před 4 roky
rodič
revize
a4ca301d48

+ 11 - 2
Areas/Admin/Controllers/MainServer/StoreMachineApplyController.cs

@@ -460,6 +460,7 @@ namespace MySystem.Areas.Admin.Controllers
                 string SnNo = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
                 string Brand = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
                 BrandId = Convert.ToInt32(Brand);
+
                 if (BrandId == 1) FromStoreId = 7;
                 if (BrandId == 2) FromStoreId = 721;
                 if (BrandId == 3) FromStoreId = 697;
@@ -467,6 +468,8 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 5) FromStoreId = 775;
                 if (BrandId == 6) FromStoreId = 871;
                 if (BrandId == 7) FromStoreId = 1047;
+                if (BrandId == 8) FromStoreId = 4831;
+                if (BrandId == 9) FromStoreId = 4832;
                 PosMachinesTwo posMachinesTwo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo && m.StoreId == FromStoreId);
                 if (posMachinesTwo == null)
                 {
@@ -497,6 +500,8 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 5) FromStoreId = 775;
                 if (BrandId == 6) FromStoreId = 871;
                 if (BrandId == 7) FromStoreId = 1047;
+                if (BrandId == 8) FromStoreId = 4831;
+                if (BrandId == 9) FromStoreId = 4832;
                 tostore = db.StoreHouse.FirstOrDefault(m => m.UserId == apply.UserId && m.BrandId == BrandId.ToString());
                 SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
                 if (item == null)
@@ -625,7 +630,8 @@ namespace MySystem.Areas.Admin.Controllers
                             UserAccount userAccount = db.UserAccount.FirstOrDefault(m => m.UserId == apply.UserId);
                             var Amounts = Convert.ToUInt32(item.Num) * 300;
                             var Amount = (num - Convert.ToUInt32(item.Num)) * 300;
-                            userAccount.FixedAmount += Amount;
+                            // userAccount.FixedAmount += Amount;
+                            userAccount.ValidAmount += Amount;//可用额度操作
                             apply.UseAmount += Amounts;
                         }
                         if (kqProducts.Name.Contains("电签"))
@@ -633,7 +639,8 @@ namespace MySystem.Areas.Admin.Controllers
                             UserAccount userAccount = db.UserAccount.FirstOrDefault(m => m.UserId == apply.UserId);
                             var Amounts = Convert.ToUInt32(item.Num) * 200;
                             var Amount = (num - Convert.ToUInt32(item.Num)) * 200;
-                            userAccount.FixedAmount += Amount;
+                            // userAccount.FixedAmount += Amount;
+                            userAccount.ValidAmount += Amount;//可用额度操作
                             apply.UseAmount += Amounts;
                         }
                     }
@@ -701,6 +708,8 @@ namespace MySystem.Areas.Admin.Controllers
                 storeSH.LaveNum += item.Num;
                 storeSH.TotalNum += item.Num;
             }
+            apply.SeoTitle = SysUserName +'-'+ SysRealName;//添加操作人信息
+            
             db.SaveChanges();
             new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("StoreMachineApply", Fields, data.Id);
 

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

@@ -1236,7 +1236,7 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 CreateDate = DateTime.Now,
                 UpdateDate = DateTime.Now,
-                CreateMan = SysUserName,
+                CreateMan = SysUserName + "-" + SysRealName,
                 ChangeNo = ChangeNo, //转换单号
                 UserId = 0, //创客
                 ChangeTime = DateTime.Now, //转换时间
@@ -1323,7 +1323,7 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                     CreateDate = DateTime.Now,
                     UpdateDate = DateTime.Now,
-                    CreateMan = SysUserName,
+                    CreateMan = SysUserName + "-" + SysRealName,
                     ChangeNo = ChangeNo, //订单号
                     ChangeId = add.Id, //订单Id
                     BackProductType = oldpos.BrandId, //退回产品类型

+ 23 - 2
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -1264,6 +1264,9 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["JCountwd"] = Convert.ToInt32(Info["JCountwd"].ToString());
                 dic["YAmtwd"] = Convert.ToDecimal(Info["YAmtwd"].ToString());
 
+                dic["BCount"] = Info["BCount"].ToString();
+                dic["ACount"] = Info["ACount"].ToString();
+
             }
             return Json(obj);
         }
@@ -1282,12 +1285,12 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and UserId =" + UserId;
             }
-            //创客Id
+            //开始时间
             if (!string.IsNullOrEmpty(sTradeDate))
             {
                 condition += " and TradeDate >=" + Convert.ToInt32(sTradeDate);
             }
-            //创客Id
+            //结束时间
             if (!string.IsNullOrEmpty(eTradeDate))
             {
                 condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
@@ -1309,6 +1312,9 @@ namespace MySystem.Areas.Admin.Controllers
             int JCountwd = 0;
             decimal YAmtwd = 0;
 
+            int BCount = 0;
+            int ACount = 0;
+
             WebCMSEntities db = new WebCMSEntities();
             Dictionary<string, object> obj = new Dictionary<string, object>();
             DataTable dt = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team'"+ condition);
@@ -1373,6 +1379,18 @@ namespace MySystem.Areas.Admin.Controllers
                 YAmtwd = Convert.ToDecimal(function.CheckNum(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)
+            // {
+            //     BCount = Convert.ToDecimal(function.CheckNum(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)
+            // {
+            //     ACount = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
+            // }
+
             obj.Add("TotalAmtfc", TotalAmtfc);
             obj.Add("DAmtfc", DAmtfc);
             obj.Add("JAmtfc", JAmtfc);
@@ -1386,6 +1404,9 @@ namespace MySystem.Areas.Admin.Controllers
             obj.Add("JfAmtwd", JfAmtwd);
             obj.Add("JCountwd", JCountwd);
             obj.Add("YAmtwd", YAmtwd);
+
+            obj.Add("BCount", BCount);
+            obj.Add("ACount", ACount);
             db.Dispose();
             return obj;
         }

+ 18 - 0
Areas/Admin/Views/MainServer/PosMachinesTwo/Index.cshtml

@@ -87,6 +87,20 @@
                             </select>
                         </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="ActivationDateData" id="ActivationTime"
+                                placeholder="激活时间" autocomplete="off">
+                        </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="BindingDateData" id="BindingTime"
+                                placeholder="绑定时间" autocomplete="off">
+                        </div>
+                    </div>
                     @{Dictionary<string, string> ProfitObjectsActivesDic = new MySystem.DictionaryClass().getKqProductBrandDic();}
                     <div class="layui-inline">
                         <label class="layui-form-label">品牌</label>
@@ -125,6 +139,10 @@
                     {
                         <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                     }
+                    @if (RightInfo.Contains("," + right + "_Home,"))
+                    {
+                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="home"><i class="layui-icon layui-icon-edit"></i>一键归位</a>
+                    }
                 </script>
             </div>
         </div>

+ 61 - 4
wwwroot/layuiadmin/modules_main/PosMachinesTwo_Admin.js

@@ -30,6 +30,63 @@ layui.config({
 
     //- 筛选条件-日期
     var laydate = layui.laydate;
+    var layCreateDate = laydate.render({
+        elem: '#ActivationTime',
+        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;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#ActivationTime').val(value);
+            }
+        }
+    });
+
+    //- 筛选条件-日期
+    var laydates = layui.laydate;
+    var layCreateDate = laydates.render({
+        elem: '#BindingTime',
+        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;
+                    layCreateDate.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layCreateDate.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#BindingTime').val(value);
+            }
+        }
+    });
     
 
     //excel导入
@@ -75,10 +132,10 @@ layui.config({
             ,{field:'PosSnType', width: 200, title:'机具类型', sort: true}
             ,{field:'DeviceType', width: 200, title:'设备类型', sort: true}
             ,{field:'BindingState', width: 200, title:'绑定状态', sort: true}
-            ,{field:'BindingTime', width: 200, title:'绑定时间', sort: true}
-            , { field: 'ActivationState', width: 200, title: '激活状态', sort: true }
-            , { field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
-            , { title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            ,{ field: 'ActivationState', width: 200, title: '激活状态', sort: true }
+            ,{ field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
+            ,{ field: 'BindingTime', width: 200, title: '绑定时间', sort: true }
+            ,{ title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
             

+ 1 - 1
wwwroot/layuiadmin/modules_main/ServiceCenter_Admin.js

@@ -97,7 +97,7 @@ layui.config({
             ,{field:'CreateMan', title:'创建人', sort: true}
             ,{field:'CreateDate', title:'创建时间', sort: true}
             , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
-            , { title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+            , { title: '操作', width: 200, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
             

+ 8 - 5
wwwroot/layuiadmin/modules_main/UsersChildren_Admin.js

@@ -108,11 +108,14 @@ layui.config({
             , { field: 'YAmtfc', width: 200, title: '云闪付小额交易额(扶)', sort: true }
 
             , { field: 'TotalAmtwd', width: 200, title: '刷卡交易总额(稳)', sort: true }
-            , { field: 'DAmtwd', width: 200, title: '贷记卡交易额(稳', sort: true }
-            , { field: 'JAmtwd', width: 200, title: '借记卡非封顶交易额(稳', sort: true }
-            , { field: 'JfAmtwd', width: 200, title: '借记卡封顶交易额(稳', sort: true }
-            , { field: 'JCountwd', width: 200, title: '借记卡交易笔数(稳', sort: true }
-            , { field: 'YAmtwd', width: 200, title: '云闪付小额交易额(稳', sort: true }
+            , { field: 'DAmtwd', width: 200, title: '贷记卡交易额(稳)', sort: true }
+            , { field: 'JAmtwd', width: 200, title: '借记卡非封顶交易额(稳)', sort: true }
+            , { field: 'JfAmtwd', width: 200, title: '借记卡封顶交易额(稳)', sort: true }
+            , { field: 'JCountwd', width: 200, title: '借记卡交易笔数(稳)', sort: true }
+            , { field: 'YAmtwd', width: 200, title: '云闪付小额交易额(稳)', sort: true }
+
+            , { field: 'BCount', width: 200, title: '绑定数', sort: true }
+            , { field: 'ACount', width: 200, title: '激活数', sort: true }
 
             // , { field: 'HelpInfo', width: 400, title: '扶持期商户交易信息', sort: true }
             // , { field: 'NotHelpInfo', width: 400, title: '稳定期商户交易信息', sort: true }