DuGuYang 3 лет назад
Родитель
Сommit
f9c993fbe6

+ 6 - 77
Areas/Admin/Controllers/MainServer/OrdersController.cs

@@ -299,82 +299,6 @@ namespace MySystem.Areas.Admin.Controllers
             obj.Add("other", other);
             return Json(obj);
         }
-
-
-        public JsonResult IndexDatas(string UserIdMakerCode, string UserIdRealName, string PayModeSelect, string StoreIdStoreNo, string StoreIdStoreName, string RefundStatusSelect, string DeliveryTypeSelect, string SendStatusSelect, string ProductIdSelect, string StoreTypeSelect, string StoreUserIdMakerCode, string StoreUserIdRealName, string PayStatusSelect, int page = 1, int limit = 30)
-        {
-            string condition = " and Status>-1";
-            //创客编号
-            if (!string.IsNullOrEmpty(UserIdMakerCode))
-            {
-                condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
-            }
-            //创客真实姓名
-            if (!string.IsNullOrEmpty(UserIdRealName))
-            {
-                condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
-            }
-            //支付方式
-            if (!string.IsNullOrEmpty(PayModeSelect))
-            {
-                condition += " and PayMode=" + PayModeSelect;
-            }
-            //仓库编号
-            if (!string.IsNullOrEmpty(StoreIdStoreNo))
-            {
-                condition += " and StoreId in (select StoreId from StoreForCode where Code='" + StoreIdStoreNo + "')";
-            }
-            //仓库名称
-            if (!string.IsNullOrEmpty(StoreIdStoreName))
-            {
-                condition += " and StoreId in (select StoreId from StoreForName where Name='" + StoreIdStoreName + "')";
-            }
-            //退款状态
-            if (!string.IsNullOrEmpty(RefundStatusSelect))
-            {
-                condition += " and RefundStatus=" + RefundStatusSelect;
-            }
-            //提货类型
-            if (!string.IsNullOrEmpty(DeliveryTypeSelect))
-            {
-                condition += " and DeliveryType=" + DeliveryTypeSelect;
-            }
-            //发货状态
-            if (!string.IsNullOrEmpty(SendStatusSelect))
-            {
-                condition += " and SendStatus=" + SendStatusSelect;
-            }
-            //商品名称
-            if (!string.IsNullOrEmpty(ProductIdSelect))
-            {
-                condition += " and ProductId=" + ProductIdSelect;
-            }
-            //仓库类型
-            if (!string.IsNullOrEmpty(StoreTypeSelect))
-            {
-                condition += " and StoreType=" + StoreTypeSelect;
-            }
-            //仓库归属创客编号
-            if (!string.IsNullOrEmpty(StoreUserIdMakerCode))
-            {
-                condition += " and StoreUserId in (select StoreUserId from UserForMakerCode where MakerCode='" + StoreUserIdMakerCode + "')";
-            }
-            //仓库归属创客真实姓名
-            if (!string.IsNullOrEmpty(StoreUserIdRealName))
-            {
-                condition += " and StoreUserId in (select StoreUserId from UserForRealName where RealName='" + StoreUserIdRealName + "')";
-            }
-            //支付状态
-            if (!string.IsNullOrEmpty(PayStatusSelect))
-            {
-                condition += " and PayStatus=" + PayStatusSelect;
-            }
-            List<Dictionary<string, object>> other = new List<Dictionary<string, object>>();
-            Dictionary<string, object> obj = new Dictionary<string, object>();
-            DataTable dt = OtherMySqlConn.dtable("select sum(TotalPrice) from Orders where PayStatus=0" + condition);
-            return null;
-        }
-
         #endregion
 
 
@@ -405,7 +329,7 @@ namespace MySystem.Areas.Admin.Controllers
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
 
-            string condition = " and Status=4";
+            string condition = " and Status in(4,5)";
             //平台订单号
             if (!string.IsNullOrEmpty(OrderNo))
             {
@@ -434,6 +358,10 @@ namespace MySystem.Areas.Admin.Controllers
             foreach (Dictionary<string, object> dic in diclist)
             {
                 dic["OrderNo"] = dic["OrderNo"].ToString() + "<br />" + dic["TradeNo"].ToString();
+                //状态
+                int Status = int.Parse(dic["Status"].ToString());
+                if (Status == 4) dic["StatusName"] = "退货中";
+                if (Status == 5) dic["StatusName"] = "已退货";
                 //创客
                 int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
                 Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
@@ -654,6 +582,7 @@ namespace MySystem.Areas.Admin.Controllers
                 else
                 {
                     order.UpdateDate = DateTime.Now;
+                    order.Status = 4;
                     order.UpdateMan = SysUserName + "_" + SysRealName;
                     order.RefundReason = data.RefundReason;
                     order.RefundActAmount = data.RefundActAmount;

+ 1 - 0
wwwroot/layuiadmin/modules_main/OrdersRefund_Admin.js

@@ -146,6 +146,7 @@ layui.config({
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
             , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
+            ,{field:'StatusName', width: 200, title:'状态', sort: true}
             ,{field:'OrderNo', width: 200, title:'平台订单号-渠道订单号', sort: true}
             ,{field:'RefundReason', width: 200, title:'退款原因', sort: true}
             ,{field:'ProductName', width: 200, title:'商品名称', sort: true}