Browse Source

售前修改地址

zhuyiyi 5 months ago
parent
commit
4d8d0b974f

+ 1 - 1
SiteCore/Handler/sync.order.cs

@@ -58,7 +58,7 @@ namespace SiteCore.Handler
 
             string poscode = CurrentUser.UserPost.Post.Code;
             DataStruct dStruct = GetPostStruct();
-            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\特种纸打码烫金(1).xls");
+            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\透卡澜达海报售价(1).xls");
             //apiHelper.Api_SyncOrderByTime("598825");
             //apiHelper.API_GetWaybill("ZTO-CAINIAO-TZJK", "4233447147588233939");
             //apiHelper.Api_SyacOrder("2460143282114312263", "yujia");

+ 1 - 1
SiteCore/taobao/apiCaiYingTong.cs

@@ -527,7 +527,7 @@ namespace SiteCore.Handler
                     return;
                 }
             }
-            if (entity != null)
+            if (entity != null && ceErpTradeResponsible != null)
             {
                 if (entity.AfterSaleState != 3 || ceErpTradeResponsible.VerifyState != 0)
                 {

+ 27 - 2
SiteCore/taobao/preSalesHelper.cs

@@ -784,20 +784,45 @@ namespace SiteCore.Handler
             string tid = GetPostString("tid");
             int UserID = GetPostInt("UserID");
             string atta = GetPostString("atta");
+            string ctid = GetPostString("ctid");
+            string systemRemark = GetPostString("systemRemark");
             if (!string.IsNullOrEmpty(tid))
             {
                 if (string.IsNullOrEmpty(atta))
                 {
                     returnErrorMsg("文件地址为空");
+                    return;
                 }
                 CeErpTrade ceErpTrade = CeErpTrade.Get(tid);
                 if (ceErpTrade == null)
                 {
                     returnErrorMsg("找不到订单");
+                    return;
+                }
+                CeErpTradeCell ceErpTradeCell = null;
+                if (string.IsNullOrEmpty(ctid))
+                {
+                    ceErpTradeCell = CeErpTradeCell.GetByCtid(ctid);
+                    if (ceErpTradeCell == null)
+                    {
+                        returnErrorMsg("找不到订单");
+                        return;
+                    }
+                    if (ceErpTradeCell.OrderState > 5)
+                    {
+                        returnErrorMsg("订单状态不正确");
+                        return;
+                    }
+                }
+                if (ceErpTradeCell != null && !string.IsNullOrEmpty(systemRemark))
+                {
+                    ceErpTradeCell.seller_memo = systemRemark;
+                    LogHelper.addLog(tid, UserID, "上传文件地址修改备注:" + systemRemark, 6);
+                    ceErpTradeCell.Update();
                 }
-                ceErpTrade.Attachments = atta;
+                ceErpTrade.Attachments = "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + atta;
                 ceErpTrade.Update();
-                LogHelper.addLog(tid, UserID, "上传文件地址", 6);
+                LogHelper.addLog(tid, UserID, "上传文件地址" + ceErpTrade.Attachments, 6);
                 returnSuccessMsg("上传成功!");
                 return;
             }