|
@@ -3869,7 +3869,7 @@ namespace SiteCore.Handler
|
|
|
string needtids = string.Join(",", tLst.ToArray());
|
|
string needtids = string.Join(",", tLst.ToArray());
|
|
|
StringBuilder sql = new StringBuilder();
|
|
StringBuilder sql = new StringBuilder();
|
|
|
//sql.AppendFormat("update ce_erptradecell set IsVerifyToSupplier=1 where SupplierId!=0 and ctid in ({0});", needtids);
|
|
//sql.AppendFormat("update ce_erptradecell set IsVerifyToSupplier=1 where SupplierId!=0 and ctid in ({0});", needtids);
|
|
|
- sql.AppendFormat("update ce_erptradecell set IsVerifyToSupplier=1,IsReturn=0,FinishPlaceTime=GETDATE(),PlaceUserId={1} where SupplierId!=0 and ctid in ({0});", needtids, CurrentUser.UserID);
|
|
|
|
|
|
|
+ sql.AppendFormat("update ce_erptradecell set IsVerifyToSupplier=1,IsReturn=0,FinishPlaceTime=GETDATE(),PlaceUserId={1},IsHaveNewOrder=0 where SupplierId!=0 and ctid in ({0});", needtids, CurrentUser.UserID);
|
|
|
sql.AppendFormat("insert into CE_ErpTradeLog(tid,UserId,Con,OperateTime) select ctid,{1},'审核给供应商',getdate() from ce_erptradecell where ctid in({0});", needtids, CurrentUser.UserID);
|
|
sql.AppendFormat("insert into CE_ErpTradeLog(tid,UserId,Con,OperateTime) select ctid,{1},'审核给供应商',getdate() from ce_erptradecell where ctid in({0});", needtids, CurrentUser.UserID);
|
|
|
DbHelper.DbConn.ExecuteNonQuery(sql.ToString());
|
|
DbHelper.DbConn.ExecuteNonQuery(sql.ToString());
|
|
|
returnSuccessMsg("操作成功!");
|
|
returnSuccessMsg("操作成功!");
|
|
@@ -3911,6 +3911,11 @@ namespace SiteCore.Handler
|
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
|
if (entity != null)
|
|
if (entity != null)
|
|
|
{
|
|
{
|
|
|
|
|
+ /*if (entity.IsHaveNewOrder == 2 && CurrentUser.UserPost.Post.Code != "SysAdmin")
|
|
|
|
|
+ {
|
|
|
|
|
+ returnErrorMsg("订单正在下载中无法退回!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }*/
|
|
|
if (CurrentUser.UserPost.Post.Code != "Supplier")//不是供应商打回
|
|
if (CurrentUser.UserPost.Post.Code != "Supplier")//不是供应商打回
|
|
|
{
|
|
{
|
|
|
string key = "return_order_" + entity.SupplierId;
|
|
string key = "return_order_" + entity.SupplierId;
|
|
@@ -13714,6 +13719,34 @@ namespace SiteCore.Handler
|
|
|
}
|
|
}
|
|
|
returnErrorMsg("缺少必要的参数");
|
|
returnErrorMsg("缺少必要的参数");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public void checkSupplierOrder()
|
|
|
|
|
+ {
|
|
|
|
|
+ string ctids = GetPostString("ctids");
|
|
|
|
|
+ if (ctids != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ List<string> list = new List<string>();
|
|
|
|
|
+ string sql = string.Format("SELECT ctid,seller_memo,OrderState,IsVerifyToSupplier FROM [dbo].[CE_ErpTradeCell] WHERE ctid in ({0});", "'" + ctids.Replace(",", "','") + "'");
|
|
|
|
|
+ DataTable dt = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
|
|
|
|
|
+ for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ DataRow row = dt.Rows[i];
|
|
|
|
|
+ if (Convert.ToInt16(row["OrderState"]) == 6 && Convert.ToInt16(row["IsVerifyToSupplier"]) == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ list.Add(row["seller_memo"].ToString());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (list.Count > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ ReturnSuccess("{" + string.Format("\"data\":{0}", JsonConvert.SerializeObject(list)) + "}");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ReturnSuccess("{" + string.Format("\"data\":{0}", "[]") + "}");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|