|
@@ -149,7 +149,7 @@ namespace SiteCore.Handler
|
|
|
{
|
|
{
|
|
|
if (ex_psize == 0)
|
|
if (ex_psize == 0)
|
|
|
{
|
|
{
|
|
|
- lw.Add(string.Format("datediff(d,pay_time,getdate())<=92 "));
|
|
|
|
|
|
|
+ lw.Add(string.Format("pay_time >= DATEADD(DAY, -31, GETDATE()) "));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (PKey != "admin")
|
|
if (PKey != "admin")
|
|
@@ -1348,6 +1348,12 @@ namespace SiteCore.Handler
|
|
|
string eid = GetPostString("ctid");
|
|
string eid = GetPostString("ctid");
|
|
|
CeErpTradeCell entity = null;
|
|
CeErpTradeCell entity = null;
|
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
if (eid != "") entity = CeErpTradeCell.GetByCtid(eid);
|
|
|
|
|
+ CeErpTrade father = CeErpTrade.Get(entity.tid);
|
|
|
|
|
+ if (father.receiver_state.Contains("台湾") && string.IsNullOrEmpty(father.receiver_zip))
|
|
|
|
|
+ {
|
|
|
|
|
+ returnErrorMsg("台湾客户需填写身份证号!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (entity != null)
|
|
if (entity != null)
|
|
|
{
|
|
{
|
|
|
if (entity.ctid.IndexOf("C") != -1)
|
|
if (entity.ctid.IndexOf("C") != -1)
|
|
@@ -3911,11 +3917,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")
|
|
|
|
|
|
|
+ if (entity.IsHaveNewOrder == 2 && CurrentUser.UserPost.Post.Code != "SysAdmin")
|
|
|
{
|
|
{
|
|
|
returnErrorMsg("订单正在下载中无法退回!");
|
|
returnErrorMsg("订单正在下载中无法退回!");
|
|
|
return;
|
|
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;
|
|
@@ -5422,7 +5428,7 @@ namespace SiteCore.Handler
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- lw.Add(string.Format("datediff(d,pay_time,getdate())<=92 "));
|
|
|
|
|
|
|
+ lw.Add(string.Format("pay_time >= DATEADD(DAY, -31, GETDATE()) "));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
string posTag = CurrentUser.UserPost.Post.Code;
|
|
string posTag = CurrentUser.UserPost.Post.Code;
|
|
@@ -5435,7 +5441,7 @@ namespace SiteCore.Handler
|
|
|
string supplier = GetPostString("supplier");
|
|
string supplier = GetPostString("supplier");
|
|
|
if (supplier.Length > 0) lw.Add(string.Format("SupplierName like '%{0}%'", supplier));
|
|
if (supplier.Length > 0) lw.Add(string.Format("SupplierName like '%{0}%'", supplier));
|
|
|
}
|
|
}
|
|
|
- lw.Add(string.Format("(OrderState = 7 or OrderState=8)"));
|
|
|
|
|
|
|
+ lw.Add(string.Format(" OrderState IN (7, 8)"));
|
|
|
lw.Add(string.Format("type != 'PDD' "));
|
|
lw.Add(string.Format("type != 'PDD' "));
|
|
|
lw.Add(string.Format("IsRefund!={0}", 2));
|
|
lw.Add(string.Format("IsRefund!={0}", 2));
|
|
|
dStruct.Order = "MemoOpt desc, FinishPlaceTime desc";
|
|
dStruct.Order = "MemoOpt desc, FinishPlaceTime desc";
|
|
@@ -10977,8 +10983,13 @@ namespace SiteCore.Handler
|
|
|
{
|
|
{
|
|
|
if (entity.OrderState == -1)
|
|
if (entity.OrderState == -1)
|
|
|
{
|
|
{
|
|
|
|
|
+ CeErpTrade ceErpTrade = CeErpTrade.Get(entity.tid);
|
|
|
CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(entity.ctid);
|
|
CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(entity.ctid);
|
|
|
-
|
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(ceErpTrade.receiver_state) && ceErpTrade.receiver_state.Contains("台湾") && string.IsNullOrEmpty(ceErpTrade.receiver_zip))
|
|
|
|
|
+ {
|
|
|
|
|
+ returnErrorMsg("台湾客户需填写身份证!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id) && !entity.ctid.Contains("N_") && !entity.ctid.Contains("S_"))
|
|
if (string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id) && !entity.ctid.Contains("N_") && !entity.ctid.Contains("S_"))
|
|
|
{
|
|
{
|
|
|
returnErrorMsg("订单spu没有确认无法通过审核!");
|
|
returnErrorMsg("订单spu没有确认无法通过审核!");
|
|
@@ -13530,6 +13541,36 @@ namespace SiteCore.Handler
|
|
|
}
|
|
}
|
|
|
returnErrorMsg("缺少必要的参数");
|
|
returnErrorMsg("缺少必要的参数");
|
|
|
}
|
|
}
|
|
|
|
|
+ public void backPackOrderInfo()
|
|
|
|
|
+ {
|
|
|
|
|
+ string id = GetPostString("id");
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
|
+ {
|
|
|
|
|
+ CeErpPackData ceErpPackData = CeErpPackData.Get(id);
|
|
|
|
|
+ if (ceErpPackData == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ returnSuccessMsg("查无数据");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ ceErpPackData.upStatus = 4;
|
|
|
|
|
+ ceErpPackData.Update();
|
|
|
|
|
+ List<string> list = new List<string>();
|
|
|
|
|
+ StringBuilder sql = new StringBuilder();
|
|
|
|
|
+ sql.AppendFormat("select * from CE_ErpPackDataItem where packId = {0}", ceErpPackData.ID);
|
|
|
|
|
+ DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
|
|
|
|
|
+ for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ DataRow row = dt.Rows[i];
|
|
|
|
|
+ list.Add("'" + row["ctid"].ToString() + "'");
|
|
|
|
|
+ }
|
|
|
|
|
+ string textCtids = string.Join(",", list);
|
|
|
|
|
+ DbHelper.DbConn.ExecuteNonQuery(string.Format("update CE_ErpTradeCell set OrderState=5,IsVerifyToSupplier=0,IsReturn=1,ReturnTime=GETDATE(),ReturnReason='无法打包' where ctid in ({0}) and OrderState=6", textCtids));
|
|
|
|
|
+ DbHelper.DbConn.ExecuteNonQuery(string.Format("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", textCtids, (int)OrderState.下单完成, 0, "无法打包退回"));
|
|
|
|
|
+ returnSuccessMsg("退回成功");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ returnErrorMsg("缺少必要的参数");
|
|
|
|
|
+ }
|
|
|
public void addPackDownNum()
|
|
public void addPackDownNum()
|
|
|
{
|
|
{
|
|
|
string id = GetPostString("id");
|
|
string id = GetPostString("id");
|
|
@@ -13747,6 +13788,21 @@ namespace SiteCore.Handler
|
|
|
ReturnSuccess("{" + string.Format("\"data\":{0}", "[]") + "}");
|
|
ReturnSuccess("{" + string.Format("\"data\":{0}", "[]") + "}");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public void addPersonId()
|
|
|
|
|
+ {
|
|
|
|
|
+ string tid = GetPostString("tid");
|
|
|
|
|
+ string personId = GetPostString("personId");
|
|
|
|
|
+ CeErpTrade ceErpTrade = CeErpTrade.Get(tid);
|
|
|
|
|
+ if (ceErpTrade != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ceErpTrade.receiver_zip = personId;
|
|
|
|
|
+ ceErpTrade.Update();
|
|
|
|
|
+ returnSuccessMsg("保存成功");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ returnErrorMsg("缺少必要的参数");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|