|
@@ -603,6 +603,12 @@ namespace SiteCore.Handler
|
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
|
if (entity != null)
|
|
if (entity != null)
|
|
|
{
|
|
{
|
|
|
|
|
+ double prices = commonHelper.calculationPrice(entity);
|
|
|
|
|
+ if (prices <= 100)
|
|
|
|
|
+ {
|
|
|
|
|
+ returnErrorMsg("此订单金额不足100元,无法加急。");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
string utime = GetPostString("urgencytime");
|
|
string utime = GetPostString("urgencytime");
|
|
|
if (utime.Length > 0)
|
|
if (utime.Length > 0)
|
|
|
{
|
|
{
|
|
@@ -2688,8 +2694,11 @@ namespace SiteCore.Handler
|
|
|
if (price1.Length > 0) lw.Add(string.Format("payment >= '{0}'", price1));
|
|
if (price1.Length > 0) lw.Add(string.Format("payment >= '{0}'", price1));
|
|
|
string price2 = GetPostString("price2");
|
|
string price2 = GetPostString("price2");
|
|
|
if (price2.Length > 0) lw.Add(string.Format("payment <= '{0}'", price2));
|
|
if (price2.Length > 0) lw.Add(string.Format("payment <= '{0}'", price2));
|
|
|
-
|
|
|
|
|
- if (CurrentUser.UserPost.Post.Code == "Director" || CurrentUser.UserPost.Post.Code == "CustomerMr")
|
|
|
|
|
|
|
+ if (CurrentUser.UserPost.Post.Code == "SysAdmin")
|
|
|
|
|
+ {
|
|
|
|
|
+ lw.Add(string.Format("CusOrgID = 94"));
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (CurrentUser.UserPost.Post.Code == "Director" || CurrentUser.UserPost.Post.Code == "CustomerMr")
|
|
|
{
|
|
{
|
|
|
lw.Add(string.Format("ShopId in ({0})", CurrentUser.User.pemShop));
|
|
lw.Add(string.Format("ShopId in ({0})", CurrentUser.User.pemShop));
|
|
|
}
|
|
}
|
|
@@ -6175,14 +6184,14 @@ namespace SiteCore.Handler
|
|
|
}
|
|
}
|
|
|
else if (!string.IsNullOrEmpty(isTogether) && Convert.ToInt32(isTogether) == 2)
|
|
else if (!string.IsNullOrEmpty(isTogether) && Convert.ToInt32(isTogether) == 2)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ string ctids = GetPostString("ctids");
|
|
|
DataTable dt = getSameOrderList(entity, mainEn);
|
|
DataTable dt = getSameOrderList(entity, mainEn);
|
|
|
List<string> list = new List<string>();
|
|
List<string> list = new List<string>();
|
|
|
List<string> send_list = new List<string>();
|
|
List<string> send_list = new List<string>();
|
|
|
CeErpTradeCell ceErpTradeCell = new CeErpTradeCell();
|
|
CeErpTradeCell ceErpTradeCell = new CeErpTradeCell();
|
|
|
CeErpTrade ceErpTrade = new CeErpTrade();
|
|
CeErpTrade ceErpTrade = new CeErpTrade();
|
|
|
//可合包的合并一起发货
|
|
//可合包的合并一起发货
|
|
|
- if (dt == null)
|
|
|
|
|
|
|
+ if (dt == null && string.IsNullOrEmpty(ctids))
|
|
|
{
|
|
{
|
|
|
var res_objz = new
|
|
var res_objz = new
|
|
|
{
|
|
{
|
|
@@ -6193,6 +6202,13 @@ namespace SiteCore.Handler
|
|
|
returnSuccess(ro_jsonz);
|
|
returnSuccess(ro_jsonz);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!string.IsNullOrEmpty(ctids))
|
|
|
|
|
+ {
|
|
|
|
|
+ StringBuilder sql = new StringBuilder();
|
|
|
|
|
+ sql.AppendFormat("select ctid,IsSF,seller_memo,OtherMemo,productId,FinishPlaceTime,ProductCount from view_ErpTradeCell where ctid in ({0})", "'" + ctids.Replace(",", "','") + "'");
|
|
|
|
|
+
|
|
|
|
|
+ dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
|
|
|
|
|
+ }
|
|
|
foreach (DataRow row in dt.Rows)
|
|
foreach (DataRow row in dt.Rows)
|
|
|
{
|
|
{
|
|
|
list.Add("'" + row["ctid"] + "'");
|
|
list.Add("'" + row["ctid"] + "'");
|
|
@@ -12791,6 +12807,12 @@ namespace SiteCore.Handler
|
|
|
CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCtid(ctid);
|
|
CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCtid(ctid);
|
|
|
if (ceErpTradeCell != null)
|
|
if (ceErpTradeCell != null)
|
|
|
{
|
|
{
|
|
|
|
|
+ double prices = commonHelper.calculationPrice(ceErpTradeCell);
|
|
|
|
|
+ if (prices <= 100)
|
|
|
|
|
+ {
|
|
|
|
|
+ returnErrorMsg("此订单金额不足100元,无法加急。");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
double price = GetPostDouble("price");
|
|
double price = GetPostDouble("price");
|
|
|
CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ceErpTradeCell.ctid);
|
|
CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ceErpTradeCell.ctid);
|
|
|
if (ceErpTradeCellExtend == null)
|
|
if (ceErpTradeCellExtend == null)
|
|
@@ -12807,6 +12829,7 @@ namespace SiteCore.Handler
|
|
|
{
|
|
{
|
|
|
ceErpTradeCellExtend.Save();
|
|
ceErpTradeCellExtend.Save();
|
|
|
}
|
|
}
|
|
|
|
|
+ LogHelper.addLog(ceErpTradeCell.ctid, CurrentUser.UserID, "手动订单加急", 0, 1);
|
|
|
returnSuccessMsg("修改成功!");
|
|
returnSuccessMsg("修改成功!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -13088,7 +13111,7 @@ namespace SiteCore.Handler
|
|
|
string shopid = CurrentUser.User.pemShop;
|
|
string shopid = CurrentUser.User.pemShop;
|
|
|
lw.Add(string.Format("shopId in ({0})", shopid));
|
|
lw.Add(string.Format("shopId in ({0})", shopid));
|
|
|
}
|
|
}
|
|
|
- if ("AfterSale".Equals(poscode) || "AfterSaleMaster".Equals(poscode))
|
|
|
|
|
|
|
+ if ("AfterSale".Equals(poscode) || "AfterSaleMaster".Equals(poscode) || "CustomerMr".Equals(poscode))
|
|
|
{
|
|
{
|
|
|
lw.Add("IssueState = 1");
|
|
lw.Add("IssueState = 1");
|
|
|
}
|
|
}
|
|
@@ -13183,7 +13206,7 @@ namespace SiteCore.Handler
|
|
|
}
|
|
}
|
|
|
ceErpTrade.Attachments = atta;
|
|
ceErpTrade.Attachments = atta;
|
|
|
ceErpTrade.Update();
|
|
ceErpTrade.Update();
|
|
|
- LogHelper.addLog(tid, CurrentUser.UserID, "上传文件地址", 6);
|
|
|
|
|
|
|
+ LogHelper.addLog(tid, CurrentUser.UserID, "上传文件地址:" + atta, 6);
|
|
|
returnSuccessMsg("上传成功!");
|
|
returnSuccessMsg("上传成功!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -13270,6 +13293,7 @@ namespace SiteCore.Handler
|
|
|
if (dr["ctid"].ToString().Equals(row["ctid"].ToString()))
|
|
if (dr["ctid"].ToString().Equals(row["ctid"].ToString()))
|
|
|
{
|
|
{
|
|
|
dr["dstate"] = 2;
|
|
dr["dstate"] = 2;
|
|
|
|
|
+ //dr["default"] = 1;
|
|
|
dr["dnumber"] = Convert.ToInt32(row["markNumber"]);
|
|
dr["dnumber"] = Convert.ToInt32(row["markNumber"]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -13277,7 +13301,9 @@ namespace SiteCore.Handler
|
|
|
if (eid.Equals(dr["ctid"].ToString()))
|
|
if (eid.Equals(dr["ctid"].ToString()))
|
|
|
{
|
|
{
|
|
|
dr["dstate"] = 1;
|
|
dr["dstate"] = 1;
|
|
|
|
|
+ //dr["default"] = 1;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)) + "}");
|
|
ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)) + "}");
|
|
|
return;
|
|
return;
|
|
@@ -13317,8 +13343,10 @@ namespace SiteCore.Handler
|
|
|
{
|
|
{
|
|
|
return dt;
|
|
return dt;
|
|
|
}
|
|
}
|
|
|
|
|
+ dt.Columns.Add(new DataColumn("default", typeof(int)));
|
|
|
foreach (DataRow dr in dt.Rows)
|
|
foreach (DataRow dr in dt.Rows)
|
|
|
{
|
|
{
|
|
|
|
|
+ dr["default"] = 0;
|
|
|
//当前订单
|
|
//当前订单
|
|
|
if (entity.ctid.Equals(dr["ctid"]))
|
|
if (entity.ctid.Equals(dr["ctid"]))
|
|
|
{
|
|
{
|
|
@@ -13328,6 +13356,7 @@ namespace SiteCore.Handler
|
|
|
CeErpDeliverMark ceErpDeliverMark = CeErpDeliverMark.GetByCtid(dr["ctid"].ToString());
|
|
CeErpDeliverMark ceErpDeliverMark = CeErpDeliverMark.GetByCtid(dr["ctid"].ToString());
|
|
|
if (ceErpDeliverMark != null)
|
|
if (ceErpDeliverMark != null)
|
|
|
{
|
|
{
|
|
|
|
|
+ dr["default"] = 1;
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
string[] productIds = null;
|
|
string[] productIds = null;
|
|
@@ -13339,12 +13368,10 @@ namespace SiteCore.Handler
|
|
|
//没有品类
|
|
//没有品类
|
|
|
if (string.IsNullOrEmpty(productId) || "0".Equals(productId))
|
|
if (string.IsNullOrEmpty(productId) || "0".Equals(productId))
|
|
|
{
|
|
{
|
|
|
- dr.Delete();//标记删除
|
|
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (string.IsNullOrEmpty(finishPlaceTime))
|
|
if (string.IsNullOrEmpty(finishPlaceTime))
|
|
|
{
|
|
{
|
|
|
- dr.Delete();//标记删除
|
|
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
placeTime = DateTime.Parse(finishPlaceTime);
|
|
placeTime = DateTime.Parse(finishPlaceTime);
|
|
@@ -13399,12 +13426,14 @@ namespace SiteCore.Handler
|
|
|
int sendDay = Convert.ToInt16(row["sendDay"]);
|
|
int sendDay = Convert.ToInt16(row["sendDay"]);
|
|
|
|
|
|
|
|
//下单时间小于当日发货时间则不用判断
|
|
//下单时间小于当日发货时间则不用判断
|
|
|
|
|
+ //当日发货必须发货
|
|
|
if (dayDeadLine.Hour > 0 && dayDeadLine.Hour > placeTime.Hour)
|
|
if (dayDeadLine.Hour > 0 && dayDeadLine.Hour > placeTime.Hour)
|
|
|
{
|
|
{
|
|
|
|
|
+ dr["default"] = 1;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
//在截稿时间之前下单的可以减去一天时间
|
|
//在截稿时间之前下单的可以减去一天时间
|
|
|
- if (deadLine.Hour > 0 && deadLine.Hour > placeTime.Hour)
|
|
|
|
|
|
|
+ /*if (deadLine.Hour > 0 && deadLine.Hour > placeTime.Hour)
|
|
|
{
|
|
{
|
|
|
sendDay = Math.Max(1, sendDay - 1);
|
|
sendDay = Math.Max(1, sendDay - 1);
|
|
|
}
|
|
}
|
|
@@ -13412,13 +13441,11 @@ namespace SiteCore.Handler
|
|
|
//判断有没有到发货日期
|
|
//判断有没有到发货日期
|
|
|
if (DateTime.Compare(sendtime.Date, DateTime.Now.Date) > 0)
|
|
if (DateTime.Compare(sendtime.Date, DateTime.Now.Date) > 0)
|
|
|
{
|
|
{
|
|
|
- dr.Delete();//标记删除
|
|
|
|
|
break;
|
|
break;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- dt.AcceptChanges();//把标记的都删除
|
|
|
|
|
}
|
|
}
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
|
{
|
|
{
|