|
|
@@ -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"]);
|