Quellcode durchsuchen

修改共创指派权限

zhuyiyi vor 1 Monat
Ursprung
Commit
e7a981f8a8
1 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 7 1
      SiteCore/taobao/commonHelper.cs

+ 7 - 1
SiteCore/taobao/commonHelper.cs

@@ -1942,11 +1942,17 @@ namespace SiteCore
 
             if ((post != "SysAdmin" && post != "Summarize"))
             {
+
+
                 if (ceErpTradeCell.DesignUserId != 0 && (ceErpTradeCell.DispatchSort != 2 && !ceErpTradeCell.ctid.Contains("S_")))
                 {
                     return new designApiResponseVo(-1, "已有设计师无法指派");
                 }
-
+                CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ceErpTradeCell.ctid);
+                if (ceErpTradeCellExtend != null && "内部".Equals(ceErpTradeCellExtend.ToType))
+                {
+                    return new designApiResponseVo(-1, "无法指派不是共创的订单");
+                }
                 string info_sql = string.Format("SELECT count(*) as total FROM [dbo].[Ce_ErpDesignInfo] WHERE type = 1 and tarId = 3542 and  shopId = {0}", ceErpTradeCell.ShopId);
                 DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
                 int a = Convert.ToInt32(data.Rows[0]["total"]);