DuGuYang 3 vuotta sitten
vanhempi
commit
231f7d25ef

+ 90 - 29
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -1569,6 +1569,8 @@ namespace MySystem.Areas.Admin.Controllers
         {
             string[] idlist = StoreIds.Split(new char[] { ',' });
             var totalAmount = 0;
+            decimal deposit = 0;
+            var userIds = "";
             foreach (var item in idlist)
             {
                 int StoreId = int.Parse(item);
@@ -1585,12 +1587,17 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                     amount = 150;
                 }
+                if (!userIds.Contains(storeInfo.UserId + ","))
+                {
+                    userIds += storeInfo.UserId + ",";
+                    deposit += storeInfo.Deposit;
+                }
                 tamount = amount * posCount;//扣减运营中心该品牌机具额度
                 totalAmount += tamount;//关联分仓打标记运营中心所需额度
             }
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = right;
-            ViewBag.totalAmount = "关联分仓机具需要额度:" + totalAmount;
+            ViewBag.totalAmount = "关联分仓机具需要额度:" + totalAmount + "\n" + "关联分仓获得押金:" + deposit;
 
             return View();
         }
@@ -1648,10 +1655,6 @@ namespace MySystem.Areas.Admin.Controllers
                                 userIds += storeInfo.UserId + ",";
                                 deposit += storeInfo.Deposit;//增加分仓押金
                             }
-                            else
-                            {
-                                deposit = storeInfo.Deposit;//增加分仓押金
-                            }
                             tamount += amount * posCount;//扣减运营中心该品牌机具额度
                             pCount += posCount;//添加总机具数
                         }
@@ -1661,7 +1664,11 @@ namespace MySystem.Areas.Admin.Controllers
                         return "Warning|" + error;
                     }
                     var userAmount = opdb.UserAccount.FirstOrDefault(m => m.Sort == sysAdmin.Id) ?? new OpModels.UserAccount();
-                    if (userAmount.ValidAmount + deposit - tamount >= 0)
+                    decimal TotalAmount = userAmount.ValidAmount + userAmount.TotalAmt + userAmount.ValidForGetAmount;//旧的总金额
+                    userAmount.ValidAmount += deposit;
+                    opdb.SaveChanges();
+                    decimal toAmount = userAmount.ValidAmount + userAmount.TotalAmt + userAmount.ValidForGetAmount;//新的总金额
+                    if (toAmount - tamount >= 0)
                     {
                         foreach (var item in idlist)
                         {
@@ -1672,12 +1679,45 @@ namespace MySystem.Areas.Admin.Controllers
                             {
                                 var pos = db.PosMachinesTwo.Where(m => m.StoreId == StoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0).ToList();
                                 var posCount = pos.Count();
+                                var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == int.Parse(storeInfo.BrandId));
+                                if (brandInfo.Name.Contains("电签"))
+                                {
+                                    amount = 100;
+                                }
+                                if (brandInfo.Name.Contains("大POS"))
+                                {
+                                    amount = 150;
+                                }
                                 if (IsOk == "1")
                                 {
                                     foreach (var items in pos)
                                     {
                                         var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == items.Id) ?? new PosMachinesTwo();
                                         posInfo.OpId = sysAdmin.UserId;
+                                        if (userAmount.ValidAmount - amount >= 0)
+                                        {
+                                            posInfo.OpReserveKind = 3;//标记为关联分仓额度
+                                            userAmount.ValidAmount -= amount;
+                                            opdb.SaveChanges();
+                                        }
+                                        else
+                                        {
+                                            if (userAmount.TotalAmt - amount >= 0)
+                                            {
+                                                posInfo.OpReserveKind = 1;//标记为未使用额度
+                                                userAmount.TotalAmt -= amount;
+                                                opdb.SaveChanges();
+                                            }
+                                            else
+                                            {
+                                                if (userAmount.ValidForGetAmount - amount >= 0)
+                                                {
+                                                    posInfo.OpReserveKind = 2;//标记为可提现额度
+                                                    userAmount.ValidForGetAmount -= amount;
+                                                    opdb.SaveChanges();
+                                                }
+                                            }
+                                        }
                                         db.SaveChanges();
                                     }
                                     sysAdmin.TotalMachineCount += posCount;//添加总机具数
@@ -1727,8 +1767,8 @@ namespace MySystem.Areas.Admin.Controllers
                                     SeoDescription = "关联分仓",
                                     OperateType = 1,
                                     UseAmount = deposit - tamount,
-                                    BeforeAmount = userAmount.ValidAmount,
-                                    AfterAmount = userAmount.ValidAmount + deposit - tamount,
+                                    BeforeAmount = TotalAmount,
+                                    AfterAmount = TotalAmount + deposit- tamount,
                                 }).Entity;
                             }
                             if (deposit < tamount)
@@ -1740,19 +1780,21 @@ namespace MySystem.Areas.Admin.Controllers
                                     SeoDescription = "关联分仓",
                                     OperateType = 2,
                                     UseAmount = tamount - deposit,
-                                    BeforeAmount = userAmount.ValidAmount,
-                                    AfterAmount = userAmount.ValidAmount + deposit - tamount,
+                                    BeforeAmount = TotalAmount,
+                                    AfterAmount = TotalAmount + deposit - tamount,
                                 }).Entity;
                             }
-                            userAmount.ValidAmount -= tamount;//扣减关联分仓机具占用额度
-                            userAmount.ValidAmount += deposit;//增加关联分仓押金
+                            // userAmount.ValidAmount -= tamount;//扣减关联分仓机具占用额度
+                            // userAmount.ValidAmount += deposit;//增加关联分仓押金
                             opdb.SaveChanges();
                         }
-                        sysAdmin.StoreCount += pCount;//添加关联分仓数
+                        sysAdmin.StoreCount += idlist.Count();//添加关联分仓数
                         opdb.SaveChanges();
                     }
                     else
                     {
+                        userAmount.ValidAmount -= deposit;
+                        opdb.SaveChanges();
                         return "运营中心额度不足";
                     }
                 }
@@ -1769,7 +1811,8 @@ namespace MySystem.Areas.Admin.Controllers
         {
             UserForMakerCode userFor = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode) ?? new UserForMakerCode();
             OpModels.UserAccount account = opdb.UserAccount.FirstOrDefault(m => m.Id == userFor.UserId) ?? new OpModels.UserAccount();
-            return account.ValidAmount.ToString("f2");
+            decimal TotalAmount = account.ValidAmount + account.TotalAmt + account.ValidForGetAmount;
+            return TotalAmount.ToString("f2");
         }
 
         #endregion
@@ -1808,17 +1851,12 @@ namespace MySystem.Areas.Admin.Controllers
                     userIds += storeInfo.UserId + ",";
                     deposit += storeInfo.Deposit;
                 }
-                else
-                {
-                    deposit = storeInfo.Deposit;
-                }
                 tamount = amount * posCount;//增加运营中心该品牌机具额度
                 totalAmount += tamount;//取消关联分仓打标记运营中心所需额度
             }
-            // totalAmount -= deposit;
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = right;
-            ViewBag.totalAmount = "取消关联机具获得额度:" + totalAmount;
+            ViewBag.totalAmount = "取消关联机具获得额度:" + totalAmount + "\n" + "取消关联分仓扣除押金:" + deposit;
             return View();
         }
 
@@ -1841,6 +1879,8 @@ namespace MySystem.Areas.Admin.Controllers
             if (userForMakerCode.UserId > 0)
             {
                 var sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == userForMakerCode.UserId);
+                var userAmount = opdb.UserAccount.FirstOrDefault(m => m.Sort == sysAdmin.Id) ?? new OpModels.UserAccount();
+                decimal TotalAmount = userAmount.ValidAmount + userAmount.TotalAmt + userAmount.ValidForGetAmount;
                 Fields.Add("OpId", 0);
                 if (sysAdmin.Id > 0)
                 {
@@ -1876,25 +1916,45 @@ namespace MySystem.Areas.Admin.Controllers
                                 userIds += store.UserId + ",";
                                 deposit += store.Deposit;//增加分仓押金
                             }
-                            else
+                            foreach (var items in pos)
                             {
-                                deposit = store.Deposit;//增加分仓押金
+                                var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == items.Id) ?? new PosMachinesTwo();
+                                if (posInfo.OpReserveKind == 3)
+                                {
+                                    userAmount.ValidAmount += amount;//标记为关联分仓额度
+                                    opdb.SaveChanges();
+                                }
+                                if (posInfo.OpReserveKind == 1)
+                                {
+                                    userAmount.TotalAmt += amount;//标记为未使用额度
+                                    opdb.SaveChanges();
+                                }
+                                if (posInfo.OpReserveKind == 2)
+                                {
+                                    userAmount.ValidForGetAmount += amount;//标记为可提现额度
+                                    opdb.SaveChanges();
+                                }
+                                posInfo.OpReserveKind = 0;
+                                db.SaveChanges();
                             }
                             tamount += amount * posCount;//扣减运营中心该品牌机具额度
                             pCount += posCount;//添加总机具数
                         }
                     }
+                    //扣减押金
+                    userAmount.ValidAmount -= deposit;
+                    opdb.SaveChanges();
                     if (!string.IsNullOrEmpty(error))
                     {
                         return "Warning|" + error;
                     }
-                    var userAmount = opdb.UserAccount.FirstOrDefault(m => m.Sort == sysAdmin.Id) ?? new OpModels.UserAccount();
-                    if (userAmount.ValidAmount - deposit + tamount >= 0)
+                    if (TotalAmount - deposit >= 0)
                     {
                         foreach (var item in idlist)
                         {
                             int StoreId = int.Parse(item);
                             new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("StoreHouse", Fields, StoreId);
+                            db.SaveChanges();
                             var store = db.StoreHouse.FirstOrDefault(m => m.Id == StoreId && m.StoreKind != 2);
                             var pos = db.PosMachinesTwo.Where(m => m.StoreId == StoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0 && m.OpId == sysAdmin.UserId).ToList();
                             foreach (var items in pos)
@@ -1913,7 +1973,8 @@ namespace MySystem.Areas.Admin.Controllers
                             }
                         }
                         userAmount.ValidAmount -= deposit;//扣减关联分仓押金
-                        userAmount.ValidAmount += tamount;//添加关联仓库机占用额度
+                        // userAmount.ValidAmount += tamount;//添加关联仓库机占用额度
+
                         sysAdmin.StoreCount -= idlist.Count();//减少关联分仓数
                         sysAdmin.TotalMachineCount -= pCount;//减少关联分仓机具数
                         if (deposit > tamount)
@@ -1925,8 +1986,8 @@ namespace MySystem.Areas.Admin.Controllers
                                 SeoDescription = "取消关联分仓",
                                 OperateType = 2,
                                 UseAmount = deposit - tamount,
-                                BeforeAmount = userAmount.ValidAmount,
-                                AfterAmount = userAmount.ValidAmount - deposit + tamount,
+                                BeforeAmount = TotalAmount,
+                                AfterAmount = TotalAmount - deposit + tamount,
                             }).Entity;
                         }
                         if (deposit < tamount)
@@ -1938,8 +1999,8 @@ namespace MySystem.Areas.Admin.Controllers
                                 SeoDescription = "取消关联分仓",
                                 OperateType = 1,
                                 UseAmount = tamount - deposit,
-                                BeforeAmount = userAmount.ValidAmount,
-                                AfterAmount = userAmount.ValidAmount - deposit + tamount,
+                                BeforeAmount = TotalAmount,
+                                AfterAmount = TotalAmount - deposit + tamount,
                             }).Entity;
                         }
                         opdb.SaveChanges();

+ 11 - 12
Areas/Admin/Controllers/OperateServer/StoreMachineApplyOperateController.cs

@@ -679,8 +679,17 @@ 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;
+                if (BrandId == 4) FromStoreId = 774;
+                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;
                 Models.MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new Models.MachineForSnNo();
-                var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId) ?? new Models.PosMachinesTwo();
+                var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId && m.StoreId == FromStoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0) ?? new Models.PosMachinesTwo();
                 if (posInfo.SnId > 0)
                 {
                     if (pos.Id > 0)
@@ -690,16 +699,6 @@ namespace MySystem.Areas.Admin.Controllers
                             error += "以下操作失败" + SnNo + ',' + "该机具品牌填写错误" + '\n';
                         }
                     }
-
-                    if (BrandId == 1) FromStoreId = 7;
-                    if (BrandId == 2) FromStoreId = 721;
-                    if (BrandId == 3) FromStoreId = 697;
-                    if (BrandId == 4) FromStoreId = 774;
-                    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;
                     if (PosSnList.Contains(SnNo))
                     {
                         error += "以下操作失败" + SnNo + ',' + "该机具重复发货" + '\n';
@@ -708,7 +707,7 @@ namespace MySystem.Areas.Admin.Controllers
                 }
                 else
                 {
-                    error += "以下操作失败" + SnNo + ',' + "未找到该机具" + '\n';
+                    error += "以下操作失败" + SnNo + ',' + "未找到该机具或者该机具不符合发货条件" + '\n';
                 }
             }
             if (!string.IsNullOrEmpty(error))

+ 15 - 16
Areas/Admin/Controllers/OperateServer/StoreMachineApplysOperateController.cs

@@ -74,7 +74,7 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 var maker = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode) ?? new UserForMakerCode();
                 var user = db.Users.FirstOrDefault(m => m.Id == maker.UserId) ?? new Users();
-                condition += " and UserId="+ user.Id;
+                condition += " and UserId=" + user.Id;
             }
             //运营中心编号
             if (!string.IsNullOrEmpty(OpCode))
@@ -585,8 +585,17 @@ 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;
+                if (BrandId == 4) FromStoreId = 774;
+                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;
                 MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
-                var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId) ?? new PosMachinesTwo();
+                var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId && m.StoreId == FromStoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0) ?? new PosMachinesTwo();
                 if (posInfo.SnId > 0)
                 {
                     if (pos.Id > 0)
@@ -596,16 +605,6 @@ namespace MySystem.Areas.Admin.Controllers
                             error += "以下操作失败" + SnNo + ',' + "该机具品牌填写错误" + '\n';
                         }
                     }
-
-                    if (BrandId == 1) FromStoreId = 7;
-                    if (BrandId == 2) FromStoreId = 721;
-                    if (BrandId == 3) FromStoreId = 697;
-                    if (BrandId == 4) FromStoreId = 774;
-                    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;
                     if (PosSnList.Contains(SnNo))
                     {
                         error += "以下操作失败" + SnNo + ',' + "该机具重复发货" + '\n';
@@ -614,7 +613,7 @@ namespace MySystem.Areas.Admin.Controllers
                 }
                 else
                 {
-                    error += "以下操作失败" + SnNo + ',' + "未找到该机具" + '\n';
+                    error += "以下操作失败" + SnNo + ',' + "未找到该机具或者该机具不符合发货条件" + '\n';
                 }
             }
             if (!string.IsNullOrEmpty(error))
@@ -738,8 +737,8 @@ namespace MySystem.Areas.Admin.Controllers
                         machine.StoreId = tostore.Id;
                         machine.UpdateDate = DateTime.Now;
 
-                        //添加机具所属运营中心
-                        machine.OpId = tostore.UserId;
+                        // //添加机具所属运营中心
+                        // machine.OpId = tostore.UserId;
                         db.SaveChanges();
                     }
                 }
@@ -808,7 +807,7 @@ namespace MySystem.Areas.Admin.Controllers
                 balance.TransRecordNo = ChangeNo2; //交易流水编号
                 storeSH.TotalNum += item.Num;
                 storeSH.LaveNum += item.Num;
-                
+
             }
             apply.SeoTitle = SysUserName + '-' + SysRealName;//添加操作人信息
             apply.UseAmount = ApplyAmount;

+ 2 - 2
Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs

@@ -207,7 +207,7 @@ namespace MySystem.Areas.Admin.Controllers
                     if (info != null)
                     {
                         Field.Add("TotalAmt", userAccount.TotalAmt); //初始额度
-                        Field.Add("ValidAmount", userAccount.TotalAmt); //可用额度
+                        // Field.Add("ValidAmount", userAccount.TotalAmt); //可用额度
                         Field.Add("Sort", Id); //运营中心Id
                         Field.Add("Id", edit.UserId); //创客Id
                         Field.Add("UserId", edit.UserId); //创客Id
@@ -219,7 +219,7 @@ namespace MySystem.Areas.Admin.Controllers
                             Sort = edit.Id,//所属运营中心
                             CreateMan = SysUserName + "_" + SysRealName,
                             Details = "运营中心管理员,可以操作运营中心所有权限",
-                            RightInfo = ",1_1,1_1_1,1_1_1_edit,1_2,1_2_1,1_2_1_export,1_3,1_3_1,1_3_1_import,1_4,1_4_1,1_4_1_add,1_4_2,1_4_2_add,1_4_3,1_4_3_edit,1_4_3_base,1_4_3_audit,1_6,1_6_1,1_6_1_add,1_6_1_delete,1_6_1_edit,1_6_2,1_6_2_add,1_6_2_delete,1_6_2_edit,",
+                            RightInfo = ",1_1,1_1_1,1_1_1_edit,1_2,1_2_1,1_2_1_export,1_2_2,1_2_3,1_3,1_3_1,1_3_1_import,1_4,1_4_1,1_4_1_add,1_4_2,1_4_2_add,1_4_3,1_4_3_edit,1_4_3_base,1_4_3_audit,1_6,1_6_1,1_6_1_add,1_6_1_delete,1_6_1_edit,1_6_2,1_6_2_add,1_6_2_delete,1_6_2_edit,",
                             Name = "运营中心管理员",
 
                         }).Entity;

+ 3 - 4
Areas/Admin/Controllers/OperateServer/UserCashRecordOperatesController.cs

@@ -605,12 +605,11 @@ namespace MySystem.Areas.Admin.Controllers
                 if (account != null)
                 {
                     decimal TradeAmount = edit.TradeAmount;
-                    decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                    decimal BeforeTotalAmount = account.ValidForGetAmount; //变更前总金额
                     decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
                     decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
-                    //TODO: 运营中心额度提现扣减和增加金额的字段不明确
-                    account.BalanceAmount += TradeAmount;//返回余额
-                    decimal AfterTotalAmount = account.TotalAmount; //变更后总金额
+                    account.ValidForGetAmount += TradeAmount;//返回可提现余额
+                    decimal AfterTotalAmount = account.ValidForGetAmount; //变更后总金额
                     decimal AfterFreezeAmount = account.FreezeAmount; //变更后冻结金额
                     decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
                     opdb.UserAccountRecord.Add(new UserAccountRecord()

+ 0 - 4
Areas/Admin/Views/OperateServer/SysAdminOperate/Index.cshtml

@@ -114,10 +114,6 @@
                     {
                             <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="EditBalance"><i class="layui-icon layui-icon-edit"></i>修改账户余额</a>
                     }
-                    @if (RightInfo.Contains("," + right + "_edit,"))
-                    {
-                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-edit"></i>登陆地址</a>
-                    }
                 </script>
             </div>
         </div>

+ 1 - 0
Models/PosMachinesTwo.cs

@@ -53,5 +53,6 @@ namespace MySystem.Models
         public ulong DownFeeFlag { get; set; }
         public ulong UpFeeFlag { get; set; }
         public int OpId { get; set; }
+        public int OpReserveKind { get; set; }
     }
 }

+ 2 - 0
Models/WebCMSEntities.cs

@@ -8611,6 +8611,8 @@ namespace MySystem.Models
 
                 entity.Property(e => e.OpId).HasColumnType("int(11)");
 
+                entity.Property(e => e.OpReserveKind).HasColumnType("int(11)");
+
                 entity.Property(e => e.OrderId).HasColumnType("int(11)");
 
                 entity.Property(e => e.PosSn)

+ 2 - 0
OpModels/UserAccount.cs

@@ -26,5 +26,7 @@ namespace MySystem.OpModels
         public decimal FreezeAmount { get; set; }
         public decimal TotalAmt { get; set; }
         public int UserId { get; set; }
+        public decimal PosCouponApplyAmount { get; set; }
+        public decimal ValidForGetAmount { get; set; }
     }
 }

+ 4 - 0
OpModels/WebCMSEntities.cs

@@ -2632,6 +2632,8 @@ namespace MySystem.OpModels
 
                 entity.Property(e => e.FreezeAmount).HasColumnType("decimal(18,2)");
 
+                entity.Property(e => e.PosCouponApplyAmount).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
@@ -2668,6 +2670,8 @@ namespace MySystem.OpModels
 
                 entity.Property(e => e.ValidAmount).HasColumnType("decimal(18,2)");
 
+                entity.Property(e => e.ValidForGetAmount).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.Version).HasColumnType("int(11)");
 
                 entity.Property(e => e.WithdrawAmount).HasColumnType("decimal(18,2)");

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

@@ -82,6 +82,7 @@ function CheckImport(table, key, loadindex, index) {
 }
 
 var excel;
+var loadindex;
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径
 }).extend({
@@ -319,6 +320,7 @@ layui.config({
         text: '对不起,加载出现异常!',
         done: function (res, curr, count) {
             $(".layui-none").text("无数据");
+            layer.close(loadindex);
         }
     });
 
@@ -851,6 +853,9 @@ layui.config({
                     area: ['550px', '350px'],
                     btn: ['确定', '取消'],
                     yes: function (index, layero) {
+                        loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
                         var iframeWindow = window['layui-layer-iframe' + index],
                             submitID = 'LAY-list-front-submit',
                             submit = layero.find('iframe').contents().find('#' + submitID);
@@ -928,6 +933,9 @@ layui.config({
                     area: ['650px', '550px'],
                     btn: ['确定', '取消'],
                     yes: function (index, layero) {
+                        loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
                         var iframeWindow = window['layui-layer-iframe' + index],
                             submitID = 'LAY-list-front-submit',
                             submit = layero.find('iframe').contents().find('#' + submitID);