zhuyiyi 5 months ago
parent
commit
146052aafc
2 changed files with 18 additions and 6 deletions
  1. 11 5
      supplierDownload.aspx.cs
  2. 7 1
      uploadFile.aspx.cs

+ 11 - 5
supplierDownload.aspx.cs

@@ -122,7 +122,7 @@ public partial class supplierDownload : System.Web.UI.Page
         }
         }
 
 
         int mvClientDown = 0;//转移到客户端下载
         int mvClientDown = 0;//转移到客户端下载
-
+        string ctids = "";
         int isFromClient = 0;
         int isFromClient = 0;
         if (onlyDownFile != 1)
         if (onlyDownFile != 1)
         {
         {
@@ -255,6 +255,15 @@ public partial class supplierDownload : System.Web.UI.Page
                 return;
                 return;
             }
             }
 
 
+
+            if (ctidLst.Count > 0)
+            {
+                ctids = string.Join(",", ctidLst);
+                if (!string.IsNullOrEmpty(ctids))
+                {
+                    CeErpTradeCell.ExecuteNonQuery(string.Format("update CE_ErpTradeCell set IsHaveNewOrder = 2 where ctid in ({0}) ;", ("'" + ctids.Replace(",", "','") + "'")));
+                }
+            }
             if (files.Count == 1)
             if (files.Count == 1)
             {
             {
                 downLoadFile(userId, ctidLst[0], files[0], onlyDownFile, isFromClient, rnameList[0]);
                 downLoadFile(userId, ctidLst[0], files[0], onlyDownFile, isFromClient, rnameList[0]);
@@ -339,6 +348,7 @@ public partial class supplierDownload : System.Web.UI.Page
         byte[] buffer = null;
         byte[] buffer = null;
         List<string> addFiles = new List<string>();
         List<string> addFiles = new List<string>();
         List<string> addCtid = new List<string>();
         List<string> addCtid = new List<string>();
+
         using (ZipFile file = ZipFile.Create(ms))
         using (ZipFile file = ZipFile.Create(ms))
         {
         {
 
 
@@ -384,10 +394,6 @@ public partial class supplierDownload : System.Web.UI.Page
         //{
         //{
         //    updateIsDownSuccess(userId, addCtid[i]);
         //    updateIsDownSuccess(userId, addCtid[i]);
         //}
         //}
-        //StringBuilder sql = new StringBuilder();
-        //string tids = string.Join(",", addCtid);
-        //sql.AppendFormat("update CE_ErpTradeCell set OrderState = 6 where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"));
-        //CeErpTradeCell.ExecuteNonQuery(sql.ToString());
         //sql = new StringBuilder();
         //sql = new StringBuilder();
         //sql.AppendFormat("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"), (int)OrderState.下单完成, userId, "下载设计文件");
         //sql.AppendFormat("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"), (int)OrderState.下单完成, userId, "下载设计文件");
         //CeErpTradeCell.ExecuteNonQuery(sql.ToString());
         //CeErpTradeCell.ExecuteNonQuery(sql.ToString());

+ 7 - 1
uploadFile.aspx.cs

@@ -204,6 +204,11 @@ public partial class uploadFile : System.Web.UI.Page
                         conErc("已经下单无法上传!");
                         conErc("已经下单无法上传!");
                         return;
                         return;
                     }
                     }
+                    if (entity.IsVerifyToSupplier)
+                    {
+                        conErc("订单已到车间无法上传!");
+                        return;
+                    }
                     string extend = Path.GetExtension(file_name).ToLower();
                     string extend = Path.GetExtension(file_name).ToLower();
                     if (!(extend == ".cdr" || extend == ".zip" || extend == ".rar" || extend == ".pdf"))
                     if (!(extend == ".cdr" || extend == ".zip" || extend == ".rar" || extend == ".pdf"))
                     {
                     {
@@ -230,11 +235,12 @@ public partial class uploadFile : System.Web.UI.Page
                             entity.OrderState = 5; //设计完成
                             entity.OrderState = 5; //设计完成
                                                    //if (entity.IsReturn == 2) //2是下单人打回给设计的,重新上传的话,需要清除打回
                                                    //if (entity.IsReturn == 2) //2是下单人打回给设计的,重新上传的话,需要清除打回
                                                    //{
                                                    //{
-                        entity.IsReturn = 0;
+
                         entity.IsXianHuo = 0;
                         entity.IsXianHuo = 0;
                         entity.IsVerifyToSupplier = false;
                         entity.IsVerifyToSupplier = false;
                         //}
                         //}
                     }
                     }
+                    entity.IsReturn = 0;
                     if (entity.MemoOpt == 1 || entity.MemoOpt == 2)
                     if (entity.MemoOpt == 1 || entity.MemoOpt == 2)
                     {
                     {
                         entity.MemoOpt = 0;
                         entity.MemoOpt = 0;