Sfoglia il codice sorgente

修改直属交易额

DuGuYang 3 anni fa
parent
commit
b382e58230

+ 10 - 1
AppStart/ExcelHelper.cs

@@ -827,7 +827,16 @@ namespace MySystem
 
                                         int BrandId = int.Parse(function.CheckInt(BrandIdString));
 
+                                        decimal amount = 0;
                                         KqProducts kqProduct = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
+                                        if (kqProduct.Name.Contains("电签"))
+                                        {
+                                            amount = 200;
+                                        }
+                                        if (kqProduct.Name.Contains("大POS"))
+                                        {
+                                            amount = 300;
+                                        }
                                         if (kqProduct.Id > 0)
                                         {
                                             StoreForCode storefor = db.StoreForCode.FirstOrDefault(m => m.Code == OldStoreNo) ?? new StoreForCode();
@@ -927,7 +936,7 @@ namespace MySystem
                                             AfterOutNum = store.OutNum + OpStoreNum, //操作后出库数
                                         }).Entity;
                                         db.SaveChanges();
-                                        string ChangeNo = "SC";
+                                        string ChangeNo = "JJBH";
                                         int StoreStockChangeId = balance.Id;
                                         string StoreStockChangeIdString = StoreStockChangeId.ToString();
                                         for (int i = 0; i < 18 - StoreStockChangeId.ToString().Length; i++)

+ 111 - 9
Areas/Admin/Controllers/MainServer/PosMachinesTwoController.cs

@@ -410,23 +410,125 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导入数据
         /// </summary>
         /// <param name="ExcelData"></param>
-        public string Import(string ExcelData)
+        public string Import(string ExcelData, int Kind = 0)
         {
             ExcelData = HttpUtility.UrlDecode(ExcelData);
             JsonData list = JsonMapper.ToObject(ExcelData);
-            for (int i = 1; i < list.Count; i++)
+            if (Kind == 1)
             {
-                JsonData dr = list[i];
-
-                db.PosMachinesTwo.Add(new PosMachinesTwo()
+                string error = "";
+                List<string> PosSnList = new List<string>();
+                for (int i = 1; i < list.Count; i++)
                 {
-                    CreateDate = DateTime.Now,
-                    UpdateDate = DateTime.Now,
+                    JsonData dr = list[i];
+                    string itemJson = dr.ToJson();
+                    string PosSn = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
+                    string BrandId = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
+                    string MakerCode = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
+                    string StoreNo = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
+                    string No = itemJson.Contains("\"E\"") ? dr["E"].ToString() : "";
+                    string Remark = itemJson.Contains("\"F\"") ? dr["F"].ToString() : "";
+                    UserForMakerCode userForMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                    var user = db.Users.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new Users();
+                    MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn) ?? new MachineForSnNo();
+                    var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machineForSnNo.SnId && m.BrandId == Convert.ToInt32(BrandId) && m.UserId == user.Id && m.BindingState == 0);
+                    if (posInfo == null)
+                    {
+                        error += "以下操作失败" + PosSn + ',' + "未找到该品牌的机具" + '\n';
+                    }
+                    else if (PosSnList.Contains(PosSn))
+                    {
+                        error += "以下操作失败" + PosSn + ',' + "该机具号重复" + '\n';
+                    }
+                    else if (!string.IsNullOrEmpty(error))
+                    {
+                        return "Warning|" + error;
+                    }
+                    else
+                    {
+                        PosSnList.Add(PosSn);
+                    }
 
-                });
+                }
+                for (int i = 1; i < list.Count; i++)
+                {
+                    JsonData dr = list[i];
+                    string itemJson = dr.ToJson();
+                    string PosSn = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
+                    string BrandId = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
+                    string MakerCode = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
+                    string StoreNo = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
+                    string No = itemJson.Contains("\"E\"") ? dr["E"].ToString() : "";
+                    string Remark = itemJson.Contains("\"F\"") ? dr["F"].ToString() : "";
+                    decimal amount = 0;
+                    UserForMakerCode userForMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                    var user = db.Users.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new Users();
+                    var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new UserAccount();
+                    var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
+                    if (brandInfo.Name.Contains("电签"))
+                    {
+                        amount = 200;
+                    }
+                    if (brandInfo.Name.Contains("大POS"))
+                    {
+                        amount = 300;
+                    }
+                    userAccount.ValidAmount += amount;
+                    string text = string.Format("导入机具驳回仓库,UserId: '" + user.Id + "',BeforeChangeAmount:'" + userAccount.ValidAmount + "',AfterChangeAmount:'" + userAccount.ValidAmount + amount + "',ChangeAmount:'" + amount + "',Time'" + DateTime.Now + "'");
+                    function.WriteLog(text, "机具驳回仓库");//机具驳回仓库日志
+                    db.SaveChanges();
+                    MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn) ?? new MachineForSnNo();
+                    var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machineForSnNo.SnId && m.BrandId == Convert.ToInt32(BrandId) && m.UserId == user.Id && m.BindingState == 0);
+                    if (posInfo != null)
+                    {
+                        var storehouse = db.StoreHouse.FirstOrDefault(m => m.Id == posInfo.StoreId);
+                        StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
+                        {
+                            CreateDate = DateTime.Now,
+                            StoreId = storehouse.Id, //出货 仓库
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
+                            BizBatchNo = No, //业务批次号
+                            TransType = 1, //交易类型
+                            SnNo = PosSn, //SN编号
+                            StockOpDirect = 1, //库存操作方向
+                            SnStatus = 1, //SN状态
+                            DeviceVendor = posInfo.DeviceName, //设备厂商
+                            DeviceModel = posInfo.DeviceKind, //设备型号
+                            DeviceType = posInfo.DeviceType, //设备类型                    
+                            SourceStoreId = posInfo.SourceStoreId, //源仓库编号
+                            BrandType = posInfo.DeviceType, //品牌类型
+                        }).Entity;
+
+                        db.StoreChangeHistory.Add(new StoreChangeHistory()
+                        {
+                            CreateDate = DateTime.Now,
+                            UserId = user.Id, //创客
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            ChangeRecordNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), //变更记录单号
+                            SeoTitle = "机具驳回仓库",
+                            BizBatchNo = No, //业务批次号
+                            SnNo = PosSn, //SN编号
+                        });
+                        StoreBalance balance = db.StoreBalance.Add(new StoreBalance()
+                        {
+                            CreateDate = DateTime.Now,
+                            StoreId = posInfo.StoreId, //仓库
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            OpStoreNum = 1, //操作库存数
+                            OpSymbol = "+", //操作符
+                            BeforeTotalNum = storehouse.TotalNum, //操作前总库存数
+                            AfterTotalNum = storehouse.TotalNum + 1, //操作后总库存数
+                            BeforeLaveNum = storehouse.LaveNum, //操作前剩余库存数
+                            AfterLaveNum = storehouse.LaveNum + 1, //操作后剩余库存数
+                            BeforeOutNum = storehouse.OutNum, //操作前出库数
+                            AfterOutNum = storehouse.OutNum - 1, //操作后出库数
+                        }).Entity;
+                    }
+                }
                 db.SaveChanges();
             }
-            AddSysLog("0", "PosMachinesTwo", "Import");
+            AddSysLog("0", "MachinesRejectStore", "Import");
             return "success";
         }
         #endregion

+ 1 - 1
Areas/Admin/Controllers/MainServer/SchoolMakerStudyController.cs

@@ -107,6 +107,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("Detail", data.Detail); //介绍
             Fields.Add("ListPic", data.ListPic); //列表图片
             Fields.Add("Contents", data.Contents); //内容
+            Fields.Add("QueryCount", data.QueryCount); //学习人数
             Fields.Add("Url", data.Url); //外链
 
             Fields.Add("SeoTitle", data.SeoTitle);
@@ -115,7 +116,6 @@ namespace MySystem.Areas.Admin.Controllers
             int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("SchoolMakerStudy", Fields, 0);
             AddSysLog(data.Id.ToString(), "SchoolMakerStudy", "add");
             db.SaveChanges();
-
             return "success";
         }
 

+ 141 - 0
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -658,6 +658,147 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+        #region 机具驳回仓库
+        /// <summary>
+        /// 机具驳回仓库
+        /// </summary>
+        /// <param name="ExcelData"></param>
+        public string RejectStore(string ExcelData, int Kind = 0)
+        {
+            ExcelData = HttpUtility.UrlDecode(ExcelData);
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            if (Kind == 1)
+            {
+                string error = "";
+                List<string> PosSnList = new List<string>();
+                for (int i = 1; i < list.Count; i++)
+                {
+                    JsonData dr = list[i];
+                    string itemJson = dr.ToJson();
+                    string PosSn = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
+                    string BrandId = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
+                    string MakerCode = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
+                    string StoreNo = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
+                    string No = itemJson.Contains("\"E\"") ? dr["E"].ToString() : "";
+                    string Remark = itemJson.Contains("\"F\"") ? dr["F"].ToString() : "";
+                    UserForMakerCode userForMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                    StoreForCode storeForCode = db.StoreForCode.FirstOrDefault(m => m.Code == StoreNo);
+                    var store = db.StoreHouse.FirstOrDefault(m => m.Id == storeForCode.StoreId && m.UserId == userForMakerCode.UserId && m.BrandId == BrandId);
+                    if (store == null)
+                    {
+                        error += "以下操作失败" + StoreNo + ',' + "未找到该仓库" + '\n';
+                    }
+                    var user = db.Users.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new Users();
+                    MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn) ?? new MachineForSnNo();
+                    var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machineForSnNo.SnId && m.BrandId == Convert.ToInt32(BrandId) && m.UserId == user.Id && m.BindingState == 0);
+                    if (posInfo == null)
+                    {
+                        error += "以下操作失败" + PosSn + ',' + "未找到该品牌的机具" + '\n';
+                    }
+                    else if (PosSnList.Contains(PosSn))
+                    {
+                        error += "以下操作失败" + PosSn + ',' + "该机具号重复" + '\n';
+                    }
+                    else if (!string.IsNullOrEmpty(error))
+                    {
+                        return "Warning|" + error;
+                    }
+                    else
+                    {
+                        PosSnList.Add(PosSn);
+                    }
+
+                }
+                for (int i = 1; i < list.Count; i++)
+                {
+                    JsonData dr = list[i];
+                    string itemJson = dr.ToJson();
+                    string PosSn = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
+                    string BrandId = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
+                    string MakerCode = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
+                    string StoreNo = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
+                    string No = itemJson.Contains("\"E\"") ? dr["E"].ToString() : "";
+                    string Remark = itemJson.Contains("\"F\"") ? dr["F"].ToString() : "";
+                    decimal amount = 0;
+                    UserForMakerCode userForMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                    var user = db.Users.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new Users();
+                    var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == userForMakerCode.UserId) ?? new UserAccount();
+                    var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
+                    if (brandInfo.Name.Contains("电签"))
+                    {
+                        amount = 200;
+                    }
+                    if (brandInfo.Name.Contains("大POS"))
+                    {
+                        amount = 300;
+                    }
+                    userAccount.ValidAmount += amount;
+                    string text = string.Format("导入机具驳回仓库,UserId: '" + user.Id + "',BeforeChangeAmount:'" + userAccount.ValidAmount + "',AfterChangeAmount:'" + userAccount.ValidAmount + amount + "',ChangeAmount:'" + amount + "',Time'" + DateTime.Now + "'");
+                    function.WriteLog(text, "机具驳回仓库");//机具驳回仓库日志
+                    db.SaveChanges();
+                    MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn) ?? new MachineForSnNo();
+                    var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machineForSnNo.SnId && m.BrandId == Convert.ToInt32(BrandId) && m.UserId == user.Id && m.BindingState == 0);
+                    if (posInfo != null)
+                    {
+                        var storehouse = db.StoreHouse.FirstOrDefault(m => m.Id == posInfo.StoreId);
+                        storehouse.TotalNum += 1;
+                        storehouse.LaveNum += 1;
+                        storehouse.OutNum -= 1;
+                        db.SaveChanges();
+                        StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
+                        {
+                            CreateDate = DateTime.Now,
+                            StoreId = storehouse.Id, //出货 仓库
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
+                            BizBatchNo = No, //业务批次号
+                            TransType = 1, //交易类型
+                            SnNo = PosSn, //SN编号
+                            StockOpDirect = 1, //库存操作方向
+                            SnStatus = 1, //SN状态
+                            DeviceVendor = posInfo.DeviceName, //设备厂商
+                            DeviceModel = posInfo.DeviceKind, //设备型号
+                            DeviceType = posInfo.DeviceType, //设备类型                    
+                            SourceStoreId = posInfo.SourceStoreId, //源仓库编号
+                            BrandType = posInfo.DeviceType, //品牌类型
+                        }).Entity;
+
+                        db.StoreChangeHistory.Add(new StoreChangeHistory()
+                        {
+                            CreateDate = DateTime.Now,
+                            UserId = user.Id, //创客
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            ChangeRecordNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), //变更记录单号
+                            SeoTitle = "机具驳回仓库",
+                            BizBatchNo = No, //业务批次号
+                            SnNo = PosSn, //SN编号
+                        });
+                        StoreBalance balance = db.StoreBalance.Add(new StoreBalance()
+                        {
+                            CreateDate = DateTime.Now,
+                            StoreId = posInfo.StoreId, //仓库
+                            BrandId = Convert.ToInt32(BrandId), //产品类型
+                            OpStoreNum = 1, //操作库存数
+                            OpSymbol = "+", //操作符
+                            BeforeTotalNum = storehouse.TotalNum, //操作前总库存数
+                            AfterTotalNum = storehouse.TotalNum + 1, //操作后总库存数
+                            BeforeLaveNum = storehouse.LaveNum, //操作前剩余库存数
+                            AfterLaveNum = storehouse.LaveNum + 1, //操作后剩余库存数
+                            BeforeOutNum = storehouse.OutNum, //操作前出库数
+                            AfterOutNum = storehouse.OutNum - 1, //操作后出库数
+                        }).Entity;
+                    }
+                }
+                db.SaveChanges();
+            }
+            AddSysLog("0", "MachinesRejectStore", "Import");
+            return "success";
+        }
+        #endregion
+
+
+
         #region 导出Excel
 
         /// <summary>

+ 168 - 97
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -1504,9 +1504,9 @@ namespace MySystem.Areas.Admin.Controllers
             string start = "";
             string end = "";
 
-            string condition = " and Status>-1";
+            string condition = " and Status>-1 and AuthFlag >0";
             string con = " and Status>-1";
-            // string cons = " and Status>=-1";
+            string cons = " and Status>=-1";
             string sort = "Id desc";
             //创客编号
             if (!string.IsNullOrEmpty(MakerCode))
@@ -1516,6 +1516,7 @@ namespace MySystem.Areas.Admin.Controllers
             if (ParentId > 0)
             {
                 condition += " and ParentUserId=" + ParentId + " or Id=" + ParentId;
+                cons += " and UserId=" + ParentId;
             }
             if (!string.IsNullOrEmpty(CreateDateData))
             {
@@ -1523,10 +1524,12 @@ namespace MySystem.Areas.Admin.Controllers
                 start = datelist[0].Replace("-", "");
                 end = datelist[1].Replace("-", "");
                 con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
+                cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + start + " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + end;
             }
             if (!string.IsNullOrEmpty(BrandSelect.ToString()) && BrandId > 0)
             {
                 con += " and BrandId='" + BrandId + "'";
+                cons += " and BrandId='" + BrandId + "'";
             }
 
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, sort, "True", page, limit, condition);
@@ -1549,9 +1552,10 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["JfAmtwd"] = Convert.ToDecimal(Info["JfAmtwd"].ToString());
                 dic["JCountwd"] = Convert.ToInt32(Info["JCountwd"].ToString());
                 dic["YAmtwd"] = Convert.ToDecimal(Info["YAmtwd"].ToString());
-
-                dic["BCount"] = Info["BCount"].ToString();
-                dic["ACount"] = Info["ACount"].ToString();
+                dic["TBCount"] = Info["TBCount"].ToString();
+                dic["TACount"] = Info["TACount"].ToString();
+                // dic["BCount"] = Info["BCount"].ToString();
+                // dic["ACount"] = Info["ACount"].ToString();
 
             }
 
@@ -1572,22 +1576,27 @@ namespace MySystem.Areas.Admin.Controllers
             int JCountwd = 0;
             decimal YAmtwd = 0;
 
-            // //团队
-            // //扶持期
-            // decimal TotalAmtfc1 = 0;
-            // decimal DAmtfc1 = 0;
-            // decimal JAmtfc1 = 0;
-            // decimal JfAmtfc1 = 0;
-            // int JCountfc1 = 0;
-            // decimal YAmtfc1 = 0;
-
-            // //稳定期
-            // decimal TotalAmtwd1 = 0;
-            // decimal DAmtwd1 = 0;
-            // decimal JAmtwd1 = 0;
-            // decimal JfAmtwd1 = 0;
-            // int JCountwd1 = 0;
-            // decimal YAmtwd1 = 0;
+            //团队
+            //扶持期
+            decimal TotalAmtfc1 = 0;
+            decimal DAmtfc1 = 0;
+            decimal JAmtfc1 = 0;
+            decimal JfAmtfc1 = 0;
+            int JCountfc1 = 0;
+            decimal YAmtfc1 = 0;
+
+            //稳定期
+            decimal TotalAmtwd1 = 0;
+            decimal DAmtwd1 = 0;
+            decimal JAmtwd1 = 0;
+            decimal JfAmtwd1 = 0;
+            int JCountwd1 = 0;
+            decimal YAmtwd1 = 0;
+
+            int PBCount = 0;
+            int PACount = 0;
+            int TBCount = 0;
+            int TACount = 0;
 
             WebCMSEntities db = new WebCMSEntities();
             Dictionary<string, object> other = new Dictionary<string, object>();
@@ -1653,67 +1662,90 @@ namespace MySystem.Areas.Admin.Controllers
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
             }
 
-            // DataTable dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     TotalAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     DAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     JAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     JfAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(HelpNoonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     JCountfc1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     YAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNoonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     TotalAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     DAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     JAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     JfAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     JCountwd1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
-            // }
-            // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
-            // if (dts.Rows.Count > 0)
-            // {
-            //     YAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
-            // }
+            //TODO: 统计激活绑定数(个人)
+            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId= '" + ParentId + "'" + cons);
+            if (dt.Rows.Count > 0)
+            {
+                PBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            dt = OtherMySqlConn.dtable("SELECT SUM(DirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='self' AND UserId= '" + ParentId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                PACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            //TODO: 统计激活绑定数(团队)
+            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId IN (SELECT Id FROM Users WHERE ParentNav LIKE '%," + ParentId + ",%' OR Id=" + ParentId + ")" + cons);
+            if (dt.Rows.Count > 0)
+            {
+                TBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + ParentId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+
+            DataTable dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                TotalAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                DAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                JAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                JfAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(HelpNoonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                JCountfc1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                YAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNoonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                TotalAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                DAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                JAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                JfAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                JCountwd1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
+            }
+            dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
+            if (dts.Rows.Count > 0)
+            {
+                YAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
+            }
 
             other.Add("TotalAmtfc", TotalAmtfc);
             other.Add("DAmtfc", DAmtfc);
@@ -1729,19 +1761,24 @@ namespace MySystem.Areas.Admin.Controllers
             other.Add("JCountwd", JCountwd);
             other.Add("YAmtwd", YAmtwd);
 
-            // other.Add("TotalAmtfc1", TotalAmtfc1);
-            // other.Add("DAmtfc1", DAmtfc1);
-            // other.Add("JAmtfc1", JAmtfc1);
-            // other.Add("JfAmtfc1", JfAmtfc1);
-            // other.Add("JCountfc1", JCountfc1);
-            // other.Add("YAmtfc1", YAmtfc1);
-
-            // other.Add("TotalAmtwd1", TotalAmtwd1);
-            // other.Add("DAmtwd1", DAmtwd1);
-            // other.Add("JAmtwd1", JAmtwd1);
-            // other.Add("JfAmtwd1", JfAmtwd1);
-            // other.Add("JCountwd1", JCountwd1);
-            // other.Add("YAmtwd1", YAmtwd1);
+            other.Add("TotalAmtfc1", TotalAmtfc1);
+            other.Add("DAmtfc1", DAmtfc1);
+            other.Add("JAmtfc1", JAmtfc1);
+            other.Add("JfAmtfc1", JfAmtfc1);
+            other.Add("JCountfc1", JCountfc1);
+            other.Add("YAmtfc1", YAmtfc1);
+
+            other.Add("TotalAmtwd1", TotalAmtwd1);
+            other.Add("DAmtwd1", DAmtwd1);
+            other.Add("JAmtwd1", JAmtwd1);
+            other.Add("JfAmtwd1", JfAmtwd1);
+            other.Add("JCountwd1", JCountwd1);
+            other.Add("YAmtwd1", YAmtwd1);
+
+            other.Add("PBCount", PBCount);
+            other.Add("PACount", PACount);
+            other.Add("TBCount", TBCount);
+            other.Add("TACount", TACount);
             db.Dispose();
             obj.Add("other", other);
 
@@ -1752,12 +1789,14 @@ namespace MySystem.Areas.Admin.Controllers
         {
             string condition = " and Status>-1";
             string cons = " and Status>=-1";
+            string con = " and Status>=-1";
 
             //产品类型
             if (!string.IsNullOrEmpty(BrandId.ToString()) && BrandId > 0)
             {
                 condition += " and BrandId =" + BrandId;
                 cons += " and BrandId =" + BrandId;
+                con += " and BrandId =" + BrandId;
             }
             //创客Id
             if (!string.IsNullOrEmpty(UserId.ToString()))
@@ -1769,12 +1808,14 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 condition += " and TradeDate >=" + Convert.ToInt32(sTradeDate);
                 cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + Convert.ToInt32(sTradeDate);
+                con += " and TradeDate >=" + Convert.ToInt32(sTradeDate);
             }
             //结束时间
             if (!string.IsNullOrEmpty(eTradeDate))
             {
                 condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
                 cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + Convert.ToInt32(eTradeDate);
+                con += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
             }
 
             //扶持期
@@ -1795,6 +1836,10 @@ namespace MySystem.Areas.Admin.Controllers
 
             int BCount = 0;
             int ACount = 0;
+            int PBCount = 0;
+            int PACount = 0;
+            int TBCount = 0;
+            int TACount = 0;
 
             WebCMSEntities db = new WebCMSEntities();
             Dictionary<string, object> obj = new Dictionary<string, object>();
@@ -1859,16 +1904,38 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
             }
-            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND UserId= '" + UserId + "'" + cons);
+            dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + cons);
             if (dt.Rows.Count > 0)
             {
                 BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
             }
-            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE ActivationState=1 AND UserId= '" + UserId + "'" + cons);
+            dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + cons);
             if (dt.Rows.Count > 0)
             {
                 ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
             }
+            //TODO: 统计激活绑定数(个人)
+            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId= '" + UserId + "'" + cons);
+            if (dt.Rows.Count > 0)
+            {
+                PBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            dt = OtherMySqlConn.dtable("SELECT SUM(DirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='self' AND UserId= '" + UserId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                PACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            //TODO: 统计激活绑定数(团队)
+            dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId IN (SELECT Id FROM Users WHERE ParentNav LIKE '%," + UserId + ",%' OR Id=" + UserId + ")" + cons);
+            if (dt.Rows.Count > 0)
+            {
+                TBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
+            dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + con);
+            if (dt.Rows.Count > 0)
+            {
+                TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
+            }
 
 
             obj.Add("TotalAmtfc", TotalAmtfc);
@@ -1887,6 +1954,10 @@ namespace MySystem.Areas.Admin.Controllers
 
             obj.Add("BCount", BCount);
             obj.Add("ACount", ACount);
+            obj.Add("PBCount", PBCount);
+            obj.Add("PACount", PACount);
+            obj.Add("TBCount", TBCount);
+            obj.Add("TACount", TACount);
             db.Dispose();
             return obj;
         }

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

@@ -125,6 +125,7 @@
                         {
                         <button class="layui-btn" data-type="ExportExcel"><i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
                         }
+                        @* <button class="layui-btn" data-type="RejectStore"><i class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具驳回仓库</button> *@
                     </div>
                 </div>
             </div>

+ 4 - 0
Areas/Admin/Views/MainServer/StoreHouse/Import.cshtml

@@ -49,6 +49,10 @@
                                 {
                                 <a href="/users/客小爽仓库发货至创客模版.xlsx">点击下载仓库发货至创客模版</a>
                                 }
+                                @if(ExcelKind == "4")
+                                {
+                                <a href="/users/客小爽机具驳回仓库模版.xlsx">点击下载机具驳回仓库模版</a>
+                                }
                             </div>
                         </div>
                         <div class="layui-form-item">

+ 40 - 21
Areas/Admin/Views/MainServer/StoreHouse/Index.cshtml

@@ -1,37 +1,44 @@
 @{
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
-    
+
 }
 <!DOCTYPE html>
 <html>
+
 <head>
     <meta charset="utf-8">
     <title>仓库</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta name="viewport"
+        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
     <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
     <script src="/admin/js/jquery-1.10.1.min.js"></script>
     <style>
-        .layui-input-inline{
+        .layui-input-inline {
             width: 175px !important;
         }
-        .layui-form-label{
+
+        .layui-form-label {
             width: 128px !important;
         }
-        .layui-inline{
+
+        .layui-inline {
             margin-right: 0px !important;
         }
-        .w100{
+
+        .w100 {
             width: 100px !important;
         }
-        .ml50{
+
+        .ml50 {
             margin-left: 50px !important;
         }
     </style>
 </head>
+
 <body>
     <div class="layui-fluid">
         <div class="layui-card">
@@ -118,35 +125,46 @@
                 <div style="padding-bottom: 10px;">
                     @if (RightInfo.Contains("," + right + "_add,"))
                     {
-                        <button class="layui-btn" data-type="add"><i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>新增</button>
+                        <button class="layui-btn" data-type="add"><i
+                            class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>新增</button>
                     }
                     @if (RightInfo.Contains("," + right + "_delete,"))
                     {
-                        <button class="layui-btn" data-type="batchdel"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>
+                        <button class="layui-btn" data-type="batchdel"><i
+                            class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>
                     }
                     @if (RightInfo.Contains("," + right + "_export,"))
                     {
-                        <button class="layui-btn" data-type="ExportExcel"><i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
+                        <button class="layui-btn" data-type="ExportExcel"><i
+                            class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
                     }
                     @if (RightInfo.Contains("," + right + "_import1,") || RightInfo.Contains("," + right + "_import,"))
                     {
-                    <button class="layui-btn" data-type="ImportMachine"><i class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具入库</button>
+                        <button class="layui-btn" data-type="ImportMachine"><i
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具入库</button>
                     }
                     @if (RightInfo.Contains("," + right + "_import2,") || RightInfo.Contains("," + right + "_import,"))
                     {
-                    <button class="layui-btn" data-type="ImportChange"><i class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>仓库调拨</button>
+                        <button class="layui-btn" data-type="ImportChange"><i
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>仓库调拨</button>
                     }
                     @if (RightInfo.Contains("," + right + "_import3,") || RightInfo.Contains("," + right + "_import,"))
                     {
-                    <button class="layui-btn" data-type="ImportSend"><i class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>仓库发货至创客</button>
-                    @* <button class="layui-btn" data-type="ImportBack"><i class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具回仓库</button> *@
+                        <button class="layui-btn" data-type="ImportSend"><i
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>仓库发货至创客</button>
+                        @* <button class="layui-btn" data-type="ImportBack"><i class="layui-icon layui-icon-upload
+                            layuiadmin-button-btn"></i>机具回仓库</button> *@
+                        <button class="layui-btn" data-type="ImportRejectStore"><i
+                            class="layui-icon layui-icon-upload layuiadmin-button-btn"></i>机具驳回仓库</button>
+
                     }
                     @if (RightInfo.Contains("," + right + "_sycn,"))
                     {
-                        <button class="layui-btn" data-type="SycnData"><i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>同步库存</button>
+                        <button class="layui-btn" data-type="SycnData"><i
+                            class="layui-icon layui-icon-export layuiadmin-button-btn"></i>同步库存</button>
                     }
                 </div>
-                
+
                 <script type="text/html" id="ManageTpl">
                     <a lay-href="/Admin/Users/Index?right=@right&MakerCode={{d.ManageUserIdMakerCode}}" style="color: #428bca;">{{d.ManageUserIdMakerCode}}</a>
                 </script>
@@ -157,15 +175,15 @@
                 <script type="text/html" id="table-list-tools">
                     @if (RightInfo.Contains("," + right + "_edit,"))
                     {
-                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>修改</a>
+                            <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 + "_edits,"))
                     {
-                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edits"><i class="layui-icon layui-icon-add"></i>一键新建仓库</a>
+                            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edits"><i class="layui-icon layui-icon-add"></i>一键新建仓库</a>
                     }
                     @if (RightInfo.Contains("," + right + "_sycn,"))
                     {
-                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="sycn"><i class="layui-icon layui-icon-edit"></i>同步库存</a>
+                            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="sycn"><i class="layui-icon layui-icon-edit"></i>同步库存</a>
                     }
                 </script>
             </div>
@@ -191,7 +209,7 @@
         </div>
         <div class="layui-form-item ml10">
             <div class="layui-input-block">
-                <button type="button" class="layui-btn" onclick="ConfirmImport()">确认</button>
+                <button type="button" class="layui-btn" onclick="ConfirmRejectImport()">立即导入</button>
             </div>
         </div>
     </div>
@@ -199,7 +217,8 @@
     <script src="/layuiadmin/layui/layui.js"></script>
     <script src="/layuiadmin/modules_main/StoreHouse_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
     <script>
-        
+
     </script>
 </body>
+
 </html>

+ 66 - 51
Areas/Admin/Views/MainServer/StoreHouseAmountRecord/Index.cshtml

@@ -1,78 +1,88 @@
 @{
     string RightInfo = ViewBag.RightInfo as string;
     string right = ViewBag.right as string;
-    
+
 }
 <!DOCTYPE html>
 <html>
+
 <head>
     <meta charset="utf-8">
     <title>分仓机具额度记录</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta name="viewport"
+        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
     <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
     <script src="/admin/js/jquery-1.10.1.min.js"></script>
     <style>
-        .layui-input-inline{
+        .layui-input-inline {
             width: 175px !important;
         }
-        .layui-form-label{
+
+        .layui-form-label {
             width: 85px !important;
         }
-        .layui-inline{
+
+        .layui-inline {
             margin-right: 0px !important;
         }
-        .w100{
+
+        .w100 {
             width: 100px !important;
         }
-        .ml50{
+
+        .ml50 {
             margin-left: 50px !important;
         }
     </style>
 </head>
+
 <body>
     <div class="layui-fluid">
         <div class="layui-card">
             <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                 <div class="layui-form-item">
                     <div class="layui-inline">
-<label class="layui-form-label">创客真实姓名</label>
-<div class="layui-input-inline">
-<input class="layui-input" type="text" name="UserIdRealName" 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" name="UserIdMakerCode" 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="CreateDateData" id="CreateDate" placeholder="" autocomplete="off">
-</div></div><div class="layui-inline">
-<label class="layui-form-label">额度类别</label>
-<div class="layui-input-inline">
-<select id="AmountTypeSelect" name="AmountTypeSelect" lay-search="">
-<option value="">全部...</option>
-<option value="0">固定额度</option>
-<option value="1">临时额度</option>
-</select>
-</div>
-</div>
-<div class="layui-inline">
-<label class="layui-form-label">操作类别</label>
-<div class="layui-input-inline">
-<select id="OperateTypeSelect" name="OperateTypeSelect" lay-search="">
-<option value="">全部...</option>
-<option value="1">增加</option>
-<option value="2">减少</option>
-</select>
-</div>
-</div>
+                        <label class="layui-form-label">创客真实姓名</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" name="UserIdRealName" 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" name="UserIdMakerCode" 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="CreateDateData" id="CreateDate"
+                                placeholder="" autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">额度类别</label>
+                        <div class="layui-input-inline">
+                            <select id="AmountTypeSelect" name="AmountTypeSelect" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="0">固定额度</option>
+                                <option value="1">临时额度</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">操作类别</label>
+                        <div class="layui-input-inline">
+                            <select id="OperateTypeSelect" name="OperateTypeSelect" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="1">增加</option>
+                                <option value="2">减少</option>
+                            </select>
+                        </div>
+                    </div>
 
                     <div class="layui-inline ml50">
                         <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
@@ -89,32 +99,35 @@
                 <div style="padding-bottom: 10px;">
                     @if (RightInfo.Contains("," + right + "_add,"))
                     {
-                        <button class="layui-btn" data-type="add"><i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加</button>
+                        <button class="layui-btn" data-type="add"><i
+                            class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加</button>
                     }
                     @if (RightInfo.Contains("," + right + "_delete,"))
                     {
-                        <button class="layui-btn" data-type="batchdel"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>
+                        <button class="layui-btn" data-type="batchdel"><i
+                            class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>
                     }
                     @if (RightInfo.Contains("," + right + "_edit,"))
                     {
-                    <button class="layui-btn" data-type="ExportExcel"><i class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
+                        <button class="layui-btn" data-type="ExportExcel"><i
+                            class="layui-icon layui-icon-export layuiadmin-button-btn"></i>导出</button>
 
                     }
                 </div>
-                
+
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
                 <script type="text/html" id="table-list-tools">
                     @if (RightInfo.Contains("," + right + "_edit,"))
                     {
-                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
+                        <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 + "_delete,"))
                     {
-                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
+                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
                     }
                     @if (RightInfo.Contains("," + right + "_edit,"))
                     {
-                    
+
                     }
                 </script>
             </div>
@@ -146,9 +159,11 @@
     </div>
 
     <script src="/layuiadmin/layui/layui.js"></script>
-    <script src="/layuiadmin/modules/StoreHouseAmountRecord_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script
+        src="/layuiadmin/modules_main/StoreHouseAmountRecord_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
     <script>
-        
+
     </script>
 </body>
+
 </html>

+ 6 - 2
Areas/Admin/Views/MainServer/Users/Children.cshtml

@@ -97,12 +97,16 @@
                     </br>
                     刷卡交易总额(稳)(元):<span style="color: #f00;" id="TotalAmtwd">0.00</span> | 贷记卡交易额(稳)(元):<span style="color: #f00;" id="DAmtwd">0.00</span> | 借记卡非封顶交易额(稳)(元):<span style="color: #f00;" id="JAmtwd">0.00</span> | 借记卡封顶交易额(稳)(元):<span style="color: #f00;" id="JfAmtwd">0.00</span> | 借记卡交易笔数(稳)(元):<span style="color: #f00;" id="JCountwd">0.00</span> | 云闪付小额交易额(稳)(元):<span style="color: #f00;" id="YAmtwd">0.00</span>
                     </br>
-                    @* 团队交易额:
+                    个人绑定数:<span style="color: #f00;" id="PBCount">0</span> | 个人激活数:<span style="color: #f00;" id="PACount">0</span> 
+                    </br>
+                    团队交易额:
                     </br>
                     刷卡交易总额(扶)(元):<span style="color: #f00;" id="TotalAmtfc1">0.00</span> | 贷记卡交易额(扶)(元):<span style="color: #f00;" id="DAmtfc1">0.00</span> | 借记卡非封顶交易额(扶)(元):<span style="color: #f00;" id="JAmtfc1">0.00</span> | 借记卡封顶交易额(扶)(元):<span style="color: #f00;" id="JfAmtfc1">0.00</span> | 借记卡交易笔数(扶)(元):<span style="color: #f00;" id="JCountfc1">0.00</span> | 云闪付小额交易额(扶)(元):<span style="color: #f00;" id="YAmtfc1">0.00</span>
                     </br>
                     刷卡交易总额(稳)(元):<span style="color: #f00;" id="TotalAmtwd1">0.00</span> | 贷记卡交易额(稳)(元):<span style="color: #f00;" id="DAmtwd1">0.00</span> | 借记卡非封顶交易额(稳)(元):<span style="color: #f00;" id="JAmtwd1">0.00</span> | 借记卡封顶交易额(稳)(元):<span style="color: #f00;" id="JfAmtwd1">0.00</span> | 借记卡交易笔数(稳)(元):<span style="color: #f00;" id="JCountwd1">0.00</span> | 云闪付小额交易额(稳)(元):<span style="color: #f00;" id="YAmtwd1">0.00</span>
-                 *@
+                    </br>
+                    团队绑定数:<span style="color: #f00;" id="TBCount">0</span> | 团队激活数:<span style="color: #f00;" id="TACount">0</span> 
+                
                 </blockquote>
                 <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
             </div>

+ 20 - 2
wwwroot/layuiadmin/modules_main/PosMachinesTwo_Admin.js

@@ -1,15 +1,20 @@
-var ExcelData,ExcelKind;
+var ExcelData, ExcelKind;
 function ConfirmImport() {
     $.ajax({
         type: "POST",
         url: "/Admin/PosMachinesTwo/Import?r=" + Math.random(1),
-        data: "ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
+        data: "Kind=" + ExcelKind + "&ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
         dataType: "text",
         success: function (data) {
             if (data == "success") {
                 layer.msg("导入成功", { time: 2000 }, function () {
                     window.location.reload();
                 });
+            } else if (data.indexOf("warning") == 0) {
+                var datalist = data.split('|');
+                layer.alert(datalist[0], { time: 20000 }, function () {
+                    window.location.reload();
+                });
             } else {
                 layer.msg(data);
             }
@@ -356,6 +361,19 @@ layui.config({
             });
             layer.full(perContent);
         }
+        , RejectStore: function () {
+            ExcelKind = 1;
+            layer.open({
+                type: 1,
+                title: '机具驳回仓库导入',
+                maxmin: false,
+                area: ['460px', '280px'],
+                content: $('#excelForm'),
+                cancel: function () {
+                }
+            });
+            $("#excelTemp").html('<a href="/users/机具驳回仓库模版.xlsx">点击下载机具驳回仓库模版</a>');
+        }
         , ImportData: function () {
             ExcelKind = 1;
             layer.open({

+ 66 - 66
wwwroot/layuiadmin/modules_main/StoreHouseAmountRecord_Admin.js

@@ -1,4 +1,4 @@
-var ExcelData,ExcelKind;
+var ExcelData, ExcelKind;
 function ConfirmImport() {
     $.ajax({
         type: "POST",
@@ -31,49 +31,49 @@ layui.config({
     //- 筛选条件-日期
     var laydate = layui.laydate;
     var layCreateDate = laydate.render({
-elem: '#CreateDate',
-type: 'datetime',
-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) {
-$('#CreateDate').val(value);
-}
-}
-});
+        elem: '#CreateDate',
+        type: 'datetime',
+        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) {
+                $('#CreateDate').val(value);
+            }
+        }
+    });
 
 
     //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/StoreHouseAmountRecord/Sort?r=" + Math.random(1),
@@ -84,29 +84,29 @@ $('#CreateDate').val(value);
             });
         }
     });
-    
+
     //列表数据
     table.render({
         elem: '#LAY-list-manage'
         , url: '/Admin/StoreHouseAmountRecord/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
-    		, {field:'Id', fixed: 'left', title:'ID', width:80, sort: true, unresize: true}
-            ,{field:'UserIdRealName', width: 200, title:'创客真实姓名', sort: true}
-,{field:'UserIdMakerCode', width: 200, title:'创客创客编号', sort: true}
-,{field:'CreateDate', width: 200, title:'创建时间', sort: true}
-,{field:'ApplyId', width: 200, title:'申请单', sort: true}
-,{field:'UseAmount', width: 200, title:'使用额度', sort: true}
-,{field:'BeforeAmount', width: 200, title:'使用前剩余额度', sort: true}
-,{field:'AfterAmount', width: 200, title:'使用后剩余额度', sort: true}
-,{field:'AmountType', width: 200, title:'额度类别', sort: true}
-,{field:'OperateType', width: 200, title:'操作类别', sort: true}
-
-            , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
+            , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
+            , { field: 'UserIdRealName', width: 200, title: '创客真实姓名', sort: true }
+            , { field: 'UserIdMakerCode', width: 200, title: '创客创客编号', sort: true }
+            , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
+            , { field: 'ApplyId', width: 200, title: '申请单', sort: true }
+            , { field: 'UseAmount', width: 200, title: '使用额度', sort: true }
+            , { field: 'BeforeAmount', width: 200, title: '使用前剩余额度', sort: true }
+            , { field: 'AfterAmount', width: 200, title: '使用后剩余额度', sort: true }
+            , { field: 'AmountType', width: 200, title: '额度类别', sort: true }
+            , { field: 'OperateType', width: 200, title: '操作类别', sort: true }
+
+            , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
             , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
         ]]
         , where: {
-            
+
         }
         , page: true
         , limit: 30
@@ -128,7 +128,7 @@ $('#CreateDate').val(value);
                     data: "Id=" + data.Id,
                     dataType: "text",
                     success: function (data) {
-                        if (data == "success") {                            
+                        if (data == "success") {
                             obj.del();
                             layer.close(index);
                         } else {
@@ -151,20 +151,20 @@ $('#CreateDate').val(value);
                         , 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) {
@@ -175,7 +175,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/StoreHouseAmountRecord/Edit?r=" + Math.random(1),
@@ -268,20 +268,20 @@ $('#CreateDate').val(value);
                         , 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) {
@@ -292,7 +292,7 @@ $('#CreateDate').val(value);
                         }
                         //提交 Ajax 成功后,静态更新表格中的数据
                         //$.ajax({});
-                        
+
                         $.ajax({
                             type: "POST",
                             url: "/Admin/StoreHouseAmountRecord/Add?r=" + Math.random(1),
@@ -349,9 +349,9 @@ $('#CreateDate').val(value);
         , 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 + ",";
@@ -378,9 +378,9 @@ $('#CreateDate').val(value);
         , 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 + ",";

+ 35 - 0
wwwroot/layuiadmin/modules_main/StoreHouse_Admin.js

@@ -24,6 +24,29 @@ function ConfirmImport() {
     });
 }
 
+function ConfirmRejectImport() {
+    $.ajax({
+        type: "POST",
+        url: "/Admin/Users/RejectStore?r=" + Math.random(1),
+        data: "Kind=" + ExcelKind + "&ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
+        dataType: "text",
+        success: function (data) {
+            if (data == "success") {
+                layer.msg("导入成功", { time: 2000 }, function () {
+                    window.location.reload();
+                });
+            } else if (data.indexOf("warning") == 0) {
+                var datalist = data.split('|');
+                layer.alert(datalist[0], { time: 20000 }, function () {
+                    window.location.reload();
+                });
+            } else {
+                layer.msg(data);
+            }
+        }
+    });
+}
+
 function CheckImport(table, key, loadindex, index) {
     $.ajax({
         url: "/Admin/StoreHouse/CheckImportV2?r=" + Math.random(1),
@@ -743,6 +766,18 @@ layui.config({
                     submit.trigger('click');
                 }
             });
+        }, ImportRejectStore: function () {
+            ExcelKind = 1;
+            layer.open({
+                type: 1,
+                title: '导入',
+                maxmin: false,
+                area: ['650px', '350px'],
+                content: $('#excelForm'),
+                cancel: function () {
+                }
+            });
+            $("#excelTemp").html('<a href="/users/机具驳回仓库模版.xlsx">点击下载机具驳回仓库模版</a>');
         },
         ExportExcel: function () {
             var userdata = '';

+ 22 - 18
wwwroot/layuiadmin/modules_main/UsersChildren_Admin.js

@@ -114,8 +114,8 @@ layui.config({
             , { 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: 'TBCount', width: 200, title: '团队绑定数', sort: true }
+            , { field: 'TACount', width: 200, title: '团队激活数', sort: true }
 
             // , { field: 'HelpInfo', width: 400, title: '扶持期商户交易信息', sort: true }
             // , { field: 'NotHelpInfo', width: 400, title: '稳定期商户交易信息', sort: true }
@@ -143,22 +143,26 @@ layui.config({
             $("#JCountwd").text(res.other.JCountwd);
             $("#YAmtwd").text(res.other.YAmtwd);
 
-            // $("#TotalAmtfc1").text(res.other.TotalAmtfc1);
-            // $("#DAmtfc1").text(res.other.DAmtfc1);
-            // $("#JAmtfc1").text(res.other.JAmtfc1);
-            // $("#JfAmtfc1").text(res.other.JfAmtfc1);
-            // $("#JCountfc1").text(res.other.JCountfc1);
-            // $("#YAmtfc1").text(res.other.YAmtfc1);
-
-            // $("#TotalAmtwd1").text(res.other.TotalAmtwd1);
-            // $("#DAmtwd1").text(res.other.DAmtwd1);
-            // $("#JAmtwd1").text(res.other.JAmtwd1);
-            // $("#JfAmtwd1").text(res.other.JfAmtwd1);
-            // $("#JCountwd1").text(res.other.JCountwd1);
-            // $("#YAmtwd1").text(res.other.YAmtwd1);
-
-            // $("#BCount").text(res.other.BCount);
-            // $("#ACount").text(res.other.ACount);
+            $("#TotalAmtfc1").text(res.other.TotalAmtfc1);
+            $("#DAmtfc1").text(res.other.DAmtfc1);
+            $("#JAmtfc1").text(res.other.JAmtfc1);
+            $("#JfAmtfc1").text(res.other.JfAmtfc1);
+            $("#JCountfc1").text(res.other.JCountfc1);
+            $("#YAmtfc1").text(res.other.YAmtfc1);
+
+            $("#TotalAmtwd1").text(res.other.TotalAmtwd1);
+            $("#DAmtwd1").text(res.other.DAmtwd1);
+            $("#JAmtwd1").text(res.other.JAmtwd1);
+            $("#JfAmtwd1").text(res.other.JfAmtwd1);
+            $("#JCountwd1").text(res.other.JCountwd1);
+            $("#YAmtwd1").text(res.other.YAmtwd1);
+
+            $("#BCount").text(res.other.BCount);
+            $("#ACount").text(res.other.ACount);
+            $("#PBCount").text(res.other.PBCount);
+            $("#PACount").text(res.other.PACount);
+            $("#TBCount").text(res.other.TBCount);
+            $("#TACount").text(res.other.TACount);
 
             $(".layui-none").text("无数据");
         }