DuGuYang 3 anni fa
parent
commit
e964f44872

+ 11 - 1
Areas/Admin/Controllers/MainServer/ToChargeBackRecordController.cs

@@ -99,6 +99,7 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["UserIdRealName"] = userid_Users.RealName;
                 dic["UserIdMobile"] = userid_Users.Mobile;
                 dic.Remove("UserId");
+
                 //待扣类型
                 int ChargeType = int.Parse(dic["ChargeType"].ToString());
                 if (ChargeType == 124) dic["ChargeTypeName"] = "过期机具扣款";
@@ -106,6 +107,11 @@ namespace MySystem.Areas.Admin.Controllers
                 if (ChargeType == 2) dic["ChargeTypeName"] = "分期扣款";
                 if (ChargeType == 0) dic["ChargeTypeName"] = "";
 
+                if (ChargeType != 124)
+                {
+                    dic["Remark"] = "";
+                }
+
                 //扣款状态
                 int Status = int.Parse(dic["Status"].ToString());
                 if (Status == 0) dic["StatusName"] = "待扣款";
@@ -199,7 +205,7 @@ namespace MySystem.Areas.Admin.Controllers
             var info = db.ToChargeBackRecord.FirstOrDefault(m => m.Id == data.Id) ?? new ToChargeBackRecord();
             if (info.ChargeAmount != data.ChargeAmount)
             {
-                var userAccount =db.UserAccount.FirstOrDefault(m => m.Id == info.UserId) ?? new UserAccount();
+                var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == info.UserId) ?? new UserAccount();
                 if (info.ChargeAmount > data.ChargeAmount)
                 {
                     userAccount.ToChargeAmount -= info.ChargeAmount - data.ChargeAmount;
@@ -211,6 +217,10 @@ namespace MySystem.Areas.Admin.Controllers
             }
             Fields.Add("ChargeAmount", data.ChargeAmount); //待扣金额
             Fields.Add("SeoDescription", data.SeoDescription);
+            if (info.ChargeType != 124)
+            {
+                Fields.Add("Remark", data.SeoDescription);
+            }
             new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("ToChargeBackRecord", Fields, data.Id);
             AddSysLog(data.Id.ToString(), "ToChargeBackRecord", "update");
             db.SaveChanges();