|
|
@@ -7093,8 +7093,14 @@ namespace SiteCore.Handler
|
|
|
if (sellermemo.Length > 0) lw.Add(string.Format("seller_memo like '%{0}%'", sellermemo));
|
|
|
string orderState = GetPostString("orderState");
|
|
|
if (orderState.Length > 0) lw.Add(string.Format("OrderState like '%{0}%'", orderState));
|
|
|
+
|
|
|
+ string searchType = GetPostString("searchType");
|
|
|
+
|
|
|
string afterState = GetPostString("afterstate");
|
|
|
- if (afterState.Length > 0) lw.Add(string.Format("AfterSaleState={0}", afterState));
|
|
|
+ if (searchType != "documentary")
|
|
|
+ {
|
|
|
+ if (afterState.Length > 0) lw.Add(string.Format("AfterSaleState={0}", afterState));
|
|
|
+ }
|
|
|
|
|
|
string date1 = GetPostString("date1");
|
|
|
string date2 = GetPostString("date2");
|
|
|
@@ -7148,7 +7154,6 @@ namespace SiteCore.Handler
|
|
|
string shopid = CurrentUser.User.pemShop;
|
|
|
lw.Add(string.Format("shopId in ({0})", shopid));
|
|
|
}
|
|
|
- string searchType = GetPostString("searchType");
|
|
|
if (searchType == "wait")
|
|
|
{
|
|
|
lw.Add(string.Format("HandleTime is null"));
|
|
|
@@ -7156,8 +7161,8 @@ namespace SiteCore.Handler
|
|
|
}
|
|
|
if (searchType == "documentary")
|
|
|
{
|
|
|
- lw.Add(string.Format("HandleTime is not null and TextResult in ('重印-转设计师','重印-转下单员') AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' "));
|
|
|
-
|
|
|
+ lw.Add(string.Format(" AfterSaleState > 2 AND HandleTime is not null and TextResult in ('重印-转设计师','重印-转下单员') AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' AND AfterSalSend = 0 "));
|
|
|
+ afterState = "2";
|
|
|
}
|
|
|
if (searchType == "handling")
|
|
|
{
|
|
|
@@ -8129,7 +8134,7 @@ namespace SiteCore.Handler
|
|
|
if (type == "Handling")
|
|
|
{
|
|
|
|
|
|
- string sql = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null and TextResult in ('','联系不上客户','无需售后','退差价','退款','加购','包邮顺丰','退款+退快递费','下单后退款,重拍+包邮顺丰','下单后退款,重拍','待处理','催发货/改快递/改地址','退差价+包邮顺丰')" + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
+ string sql = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
DataTable dt = null;
|
|
|
try
|
|
|
{
|
|
|
@@ -8197,7 +8202,7 @@ namespace SiteCore.Handler
|
|
|
if (type == "documentary")
|
|
|
{
|
|
|
//跟单中
|
|
|
- string sql4 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 and HandleTime is not null AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and TextResult in ('重印-转设计师','重印-转下单员') " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
+ string sql4 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate > 2 and HandleTime is not null AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and TextResult in ('重印-转设计师','重印-转下单员') AND AfterSalSend = 0 " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
DataTable dt4 = null;
|
|
|
try
|
|
|
{
|
|
|
@@ -8302,7 +8307,7 @@ namespace SiteCore.Handler
|
|
|
if (type == "Handling")
|
|
|
{
|
|
|
//处理中
|
|
|
- string sql4 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null and TextResult in ('','联系不上客户','无需售后','退差价','退款','加购','包邮顺丰','退款+退快递费','下单后退款,重拍+包邮顺丰','下单后退款,重拍','待处理','催发货/改快递/改地址','退差价+包邮顺丰')" + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
+ string sql4 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
DataTable dt4 = null;
|
|
|
try
|
|
|
{
|
|
|
@@ -8336,7 +8341,7 @@ namespace SiteCore.Handler
|
|
|
if (type == "documentary")
|
|
|
{
|
|
|
//跟单中
|
|
|
- string sql6 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate=1 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null and TextResult in ('重印-转设计师','重印-转下单员') " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
+ string sql6 = string.Format("select count(*) as number from view_AfterSaleList where aftersalestate > 2 AND AfterSaleBackReason = '' AND AfterSaleSupplierMemo = '' and HandleTime is not null and TextResult in ('重印-转设计师','重印-转下单员') AND AfterSalSend = 0 " + (mainwhere.Length > 0 ? (" and " + mainwhere) : ""));
|
|
|
DataTable dt6 = null;
|
|
|
try
|
|
|
{
|
|
|
@@ -12166,6 +12171,37 @@ namespace SiteCore.Handler
|
|
|
returnErrorMsg("找不到指定售后单对应的原始订单!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void aftersale_documentary_finish()
|
|
|
+ {
|
|
|
+ if (UrlPostParmsCheck("ctid"))
|
|
|
+ {
|
|
|
+ string ctid = GetPostString("ctid");
|
|
|
+ if (ctid.Length > 0)
|
|
|
+ {
|
|
|
+ CeErpTradeAfterSaleExtend ceErpTradeAfterSaleExtend = CeErpTradeAfterSaleExtend.getByTid(ctid);
|
|
|
+ if (ceErpTradeAfterSaleExtend == null)
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend = new CeErpTradeAfterSaleExtend();
|
|
|
+ ceErpTradeAfterSaleExtend.tid = ctid;
|
|
|
+ }
|
|
|
+ ceErpTradeAfterSaleExtend.AfterSalSend = 1;
|
|
|
+ if (ceErpTradeAfterSaleExtend.ID > 0)
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend.Update();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend.Create();
|
|
|
+ }
|
|
|
+ LogHelper.addLog(ctid, CurrentUser.UserID, "跟单完成", 6, 4);
|
|
|
+ returnSuccessMsg("修改成功!");
|
|
|
+ return;
|
|
|
+
|
|
|
+ }
|
|
|
+ returnErrorMsg("找不到指定售后单对应的原始订单!");
|
|
|
+ }
|
|
|
+ }
|
|
|
public void aftersale_batch_audit_master()
|
|
|
{
|
|
|
if (UrlPostParmsCheck("ctids"))
|