zhuyiyi 8 月之前
父节点
当前提交
ed1ac92a70

+ 75 - 0
BizCom/Dao/CeErpDeliverMark.cs

@@ -0,0 +1,75 @@
+using Castle.ActiveRecord;
+using System;
+using NHibernate.Criterion;
+
+namespace BizCom
+{
+    [ActiveRecord("CE_ErpDeliverMark")]
+    public class CeErpDeliverMark : ComBase<CeErpDeliverMark>
+    {
+        /// <summary>
+        /// ID
+        /// </summary>
+        [PrimaryKey(PrimaryKeyType.Native)]
+        public int ID { get; set; }
+
+        private string _ctid;
+        /// <summary>
+        /// ctid
+        /// </summary>
+        [Property]
+        public string ctid
+        {
+            get { return _ctid; }
+            set { _ctid = value; }
+        }
+
+        private string _nickName;
+        /// <summary>
+        /// 昵称
+        /// </summary>
+        [Property]
+        public string nickName
+        {
+            get { return _nickName; }
+            set { _nickName = value; }
+        }
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        [Property]
+        public DateTime? createtime { get; set; }
+
+        private bool _isDel = false;
+        /// <summary>
+        /// 是否删除
+        /// </summary>
+        [Property]
+        public bool isdel
+        {
+            get { return _isDel; }
+            set { _isDel = value; }
+        }
+
+        private int _markNumber = 0;
+        /// <summary>
+        /// 编码
+        /// </summary>
+        [Property]
+        public int markNumber
+        {
+            get { return _markNumber; }
+            set { _markNumber = value; }
+        }
+
+        public static CeErpDeliverMark GetByCtid(string ctid)
+        {
+            return FindFirst(Expression.Sql(string.Format("ctid='{0}' and isDel = 0", ctid)));
+        }
+
+        public static CeErpDeliverMark GetByNumber(int markNumber)
+        {
+            return FindFirst(Expression.Sql(string.Format("markNumber='{0}' and isDel = 0", markNumber)));
+        }
+    }
+}

+ 5 - 1
BizCom/Dao/CeErpTradeCell.cs

@@ -1045,7 +1045,11 @@ namespace BizCom
             get { return _ParentSplitNo; }
             set { _ParentSplitNo = value; }
         }
-
+        /// <summary>
+        /// 更新时间
+        /// </summary>
+        [Property]
+        public DateTime? UpdateTime { get; set; }
 
         public static CeErpTradeCell GetByTid(string tid)
         {

+ 177 - 22
SiteCore/Handler/sync.order.cs

@@ -62,7 +62,7 @@ namespace SiteCore.Handler
             //apiHelper.API_LogisticsOnlineSend("2460807662231834875", "yujia", "YTO-GDCYT", "YT7524607355919");
             //banniuApiHelper.sendLogisticsInfo(null);
             //commonHelper.setOrderDummyDelivery("4055992920657411904");
-            //commonHelper.checkOrderListDesignInfo("4042031616863358615");
+            //commonHelper.checkOrderListDesignInfo("1111122222333338841");
             //CeErpTradeCell entity = CeErpTradeCell.GetByCtid("2484048723252587257");
             //int sid = commonHelper.autoDistributeToSupplier(entity);
             // string a  = apiHelper.API_GetPrintData("YT8951457355085");
@@ -621,7 +621,7 @@ namespace SiteCore.Handler
 
 
                     entity.IsUrgency = true;
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     ApiVo apiVo = new ApiVo();
                     apiVo.orderNumber = entity.ctid;
@@ -774,6 +774,7 @@ namespace SiteCore.Handler
                         memo = memo.Replace(")", ")");
                     }
                     entity.seller_memo = memo;
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     ApiVo apiVo = new ApiVo();
                     apiVo.orderNumber = entity.ctid;
@@ -820,6 +821,7 @@ namespace SiteCore.Handler
                     }
                     entity.MemoOpt = 3;
                     entity.CheckOrderTime = DateTime.Now;
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     CeErpSukuraData.createInfo(entity.ctid, 6);
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "标记:查货", entity.OrderState, 1);
@@ -1298,7 +1300,7 @@ namespace SiteCore.Handler
                             entity.OrderState = tmcHelper.orderAudit(entity.ShopId);
                         }
                     }
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "手动领单", entity.OrderState, 1);
                     returnSuccessMsg("领单成功!");
@@ -1489,7 +1491,7 @@ namespace SiteCore.Handler
                     }
 
                     entity.AfterSaleState = 1; //1待售后2售后主管审核3主管审核4完成售后
-                                               //entity.AfterSaleReason = reason;
+                    entity.UpdateTime = DateTime.Now;                        //entity.AfterSaleReason = reason;
                     entity.AfterSaleTime = DateTime.Now;
                     entity.Update();
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "标记售后-" + reason, entity.OrderState, 1);
@@ -1803,6 +1805,7 @@ namespace SiteCore.Handler
                 entitycell.seller_memo = "(" + entitycell.OrderSn + ")-" + memo;
                 entitycell.ProductId = Convert.ToInt32(productId);
                 entitycell.ShopId = shopId;
+                entitycell.UpdateTime = DateTime.Now;
                 entitycell.payment = Convert.ToDouble(GetPostString("payment"));
                 if (entity.buyer_nick == "现货手提袋" || memo.IndexOf("现货手提袋") != -1)
                 {
@@ -2398,7 +2401,7 @@ namespace SiteCore.Handler
 
                         entity.DesignUserId = userid;
                         entity.WaitDesignTime = DateTime.Now;
-
+                        entity.UpdateTime = DateTime.Now;
                         entity.Update();
                         string name = commonHelper.getUserNameById(userid);
                         commonHelper.UpdateRelationOrder(entity.ctid);
@@ -3032,6 +3035,7 @@ namespace SiteCore.Handler
                         string suname = commonHelper.getSupplierNameById(entity.SupplierId);
                         LogHelper.addLog(entity.ctid, 0, "匹配供应商:" + suname, entity.OrderState);
                     }
+                    entity.UpdateTime = DateTime.Now;
                     //entity.MakeSupplier = suname;
                     entity.Update();
                     commonHelper.UpdateRelationOrder(entity.ctid); //更新补差价单
@@ -3749,6 +3753,7 @@ namespace SiteCore.Handler
                     entity.OrderState = 0;
                     entity.IsReturn = 3;
                     entity.ReturnTime = DateTime.Now;
+                    entity.UpdateTime = DateTime.Now;
                     entity.ReturnReason = reason;
                     entity.Update();
                     CeErpSukuraData.createInfo(entity.ctid, 5);
@@ -3770,6 +3775,7 @@ namespace SiteCore.Handler
                 {
                     entity.OrderState = 3;
                     entity.IsReturn = 0;
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     CeErpSukuraData.createInfo(entity.ctid, 5);
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "售后单从打回售后恢复到设计", entity.OrderState);
@@ -3968,6 +3974,7 @@ namespace SiteCore.Handler
                     entity.UnusualCon = "";
                     entity.IsReturn = returnTag;
                     entity.ReturnTime = DateTime.Now;
+                    entity.UpdateTime = DateTime.Now;
                     entity.ReturnReason = GetPostString("returnreason");
                     entity.Update();
                     if (entity.OrderState == 3)
@@ -4904,6 +4911,7 @@ namespace SiteCore.Handler
                         entity.OrderState = 7;//发货后订单已发货
                         entity.OutSid = outSid;
                         entity.MemoOpt = 0;
+                        entity.UpdateTime = DateTime.Now;
                         entity.FinishDeliveryTime = DateTime.Now;
                         entity.Update();
                         commonHelper.aftersaleSend(entity.ctid, comName, outSid);
@@ -5057,7 +5065,7 @@ namespace SiteCore.Handler
                         CeErpSukuraData.createInfo(entity.ctid, 6);
                     }
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "已确认:" + stropt, entity.OrderState, 1);
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.MemoOpt = 0;
                     entity.Update();
                     returnSuccessMsg("操作成功!");
@@ -5202,6 +5210,7 @@ namespace SiteCore.Handler
                 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("type != 'PDD' "));
             lw.Add(string.Format("IsRefund!={0}", 2));
             dStruct.Order = "MemoOpt desc, FinishPlaceTime desc";
             dStruct.MainWhere = string.Join(" and ", lw.ToArray());
@@ -5478,7 +5487,8 @@ namespace SiteCore.Handler
 
             lw.Add(string.Format("OrderState >= 6"));
             lw.Add(string.Format("IsSample != 2 "));
-            lw.Add(string.Format("isDianziOrder = 0 "));
+            //lw.Add(string.Format("isDianziOrder = 0 "));
+            lw.Add(string.Format("SupplierId > 0 "));
             //lw.Add(string.Format("IsRefund<={0}", 1));
             dStruct.Order = "MemoOpt desc, FinishPlaceTime desc";
             dStruct.MainWhere = string.Join(" and ", lw.ToArray());
@@ -5880,6 +5890,7 @@ namespace SiteCore.Handler
                             entity.FinishDeliveryTime = DateTime.Now;
                             entity.IsReturn = 0;
                             entity.MemoOpt = 0;
+                            entity.UpdateTime = DateTime.Now;
                             entity.Update();
 
                             commonHelper.aftersaleSend(entity.ctid, cpCode, curUseWayBillCode);
@@ -5905,13 +5916,27 @@ namespace SiteCore.Handler
                             }
                             LogHelper.addLog(ctid, CurrentUser.UserID, "发货成功-" + cpCode + "-" + curUseWayBillCode);
                             //CeErpDataSendOrderInfo.createObject(entity.ctid);
-
-                            if (isTogether == "1")
+                            CeErpDeliverMark ceErpDeliverMark = CeErpDeliverMark.GetByCtid(ctid);
+                            if (isTogether == "1" && ceErpDeliverMark == null)
                             {
                                 StringBuilder sqlsb = new StringBuilder();
                                 sqlsb.AppendFormat("update ce_erptradecell with(rowlock) set OrderState=7,OutSid='{2}' where tid='{0}' and OrderState=6 and SupplierId={1}", entity.tid, entity.SupplierId, curUseWayBillCode);
                                 DbHelper.DbConn.ExecuteNonQuery(sqlsb.ToString());
                             }
+                            if (ceErpDeliverMark != null)
+                            {
+                                DataTable dt1 = DbHelper.DbConn.ExecuteDataset(string.Format("select * from CE_ErpDeliverMark where isDel = 0 and markNumber = {0};", ceErpDeliverMark.markNumber)).Tables[0];
+                                if (dt1 != null && dt1.Rows != null && dt1.Rows.Count > 0)
+                                {
+                                    List<string> list = new List<string>();
+                                    foreach (DataRow row in dt1.Rows)
+                                    {
+                                        list.Add("'" + row["ctid"] + "'");
+                                    }
+                                    DbHelper.DbConn.ExecuteNonQuery(string.Format("update ce_erptradecell with(rowlock) set OrderState=7,OutSid='{2}' where ctid in ('{0}') and OrderState=6 and SupplierId={1}", string.Join(",", list), entity.SupplierId, curUseWayBillCode));
+                                }
+                                DbHelper.DbConn.ExecuteNonQuery(string.Format("update CE_ErpDeliverMark with(rowlock) set isDel=1 where markNumber='{0}' ", ceErpDeliverMark.markNumber));
+                            }
                         }
                         catch (Exception ex)
                         {
@@ -5926,6 +5951,7 @@ namespace SiteCore.Handler
                         {
                             entity.OrderState = 7;
                         }
+                        entity.UpdateTime = DateTime.Now;
                         entity.FinishDeliveryTime = DateTime.Now;
                         btnType = "已发货";
                         entity.Update();
@@ -5946,18 +5972,34 @@ namespace SiteCore.Handler
                         {
                             commonHelper.sendCytExpress(exinfo);
                         }
-                        if (isTogether == "1")
+                        CeErpDeliverMark ceErpDeliverMark = CeErpDeliverMark.GetByCtid(ctid);
+                        if (isTogether == "1" && ceErpDeliverMark == null)
                         {
                             StringBuilder sqlsb = new StringBuilder();
                             sqlsb.AppendFormat("update ce_erptradecell with(rowlock) set OrderState=7,OutSid='{2}' where tid='{0}' and OrderState=6 and SupplierId={1}", entity.tid, entity.SupplierId, curUseWayBillCode);
                             DbHelper.DbConn.ExecuteNonQuery(sqlsb.ToString());
                         }
+                        if (ceErpDeliverMark != null)
+                        {
+                            DataTable dt1 = DbHelper.DbConn.ExecuteDataset(string.Format("select * from CE_ErpDeliverMark where isDel = 0 and markNumber = {0};", ceErpDeliverMark.markNumber)).Tables[0];
+                            if (dt1 != null && dt1.Rows != null && dt1.Rows.Count > 0)
+                            {
+                                List<string> list = new List<string>();
+                                foreach (DataRow row in dt1.Rows)
+                                {
+                                    list.Add("'" + row["ctid"] + "'");
+                                }
+                                DbHelper.DbConn.ExecuteNonQuery(string.Format("update ce_erptradecell with(rowlock) set OrderState=7,OutSid='{2}' where ctid in ('{0}') and OrderState=6 and SupplierId={1}", string.Join(",", list), entity.SupplierId, curUseWayBillCode));
+                            }
+                            DbHelper.DbConn.ExecuteNonQuery(string.Format("update CE_ErpDeliverMark with(rowlock) set isDel=1 where markNumber='{0}' ", ceErpDeliverMark.markNumber));
+                        }
 
 
                         //不处理
                     }
                     else
                     {
+                        entity.UpdateTime = DateTime.Now;
                         entity.LastBillCpCode = cpCode;
                         entity.LastBillWaybillCode = curUseWayBillCode;
                         entity.Update();
@@ -6035,6 +6077,7 @@ namespace SiteCore.Handler
                     entity.OutSid = osid + "," + outsid;
                     entity.FinishDeliveryTime = DateTime.Now;
                     entity.OrderState = 7;
+                    entity.UpdateTime = DateTime.Now;
                     entity.IsReturn = 0;
                     entity.Update();
 
@@ -6114,6 +6157,7 @@ namespace SiteCore.Handler
                     }
                     else
                         entity.AfterSaleState = 0;
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     returnSuccessMsg("操作成功!");
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "取消售后移出", entity.OrderState, 1);
@@ -6944,7 +6988,7 @@ namespace SiteCore.Handler
                                 newentity.OrderSn = orderSn;
                             }
                         }
-
+                        newentity.UpdateTime = DateTime.Now;
                         newentity.AfterSaleState = 0;
                         newentity.AfterSaleMethod = afterMethod;
                         if (!ishav)
@@ -7330,7 +7374,7 @@ namespace SiteCore.Handler
                     entity.AfterSalePayment = Convert.ToDouble(pm);
                     entity.DeductFee = Convert.ToDouble(df);
                     entity.RefundFee = Convert.ToDouble(rf);
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     string toState = GetPostString("ToState");
                     string original = GetPostString("isOriginal");
@@ -7405,7 +7449,7 @@ namespace SiteCore.Handler
 
                     ceErpTradeAfterSaleExtend.Update();
                     entity.AfterSaleState = 2;
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "售后‘预完成’给售后主管审核", entity.OrderState, 2);
                     aftersale_data_change(entity.ctid);
@@ -7790,6 +7834,7 @@ namespace SiteCore.Handler
                 {
                     entity.VerifyState = 1;
                     entity.VerifyTime = DateTime.Now;
+
                     entity.Update();
 
                     LogHelper.addLog(entity.tid, CurrentUser.UserID, "责任人完成审核", 0, 3);
@@ -7799,7 +7844,7 @@ namespace SiteCore.Handler
                     CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCtid(entity.tid);
                     if (dt.Rows.Count <= 0)
                     {
-                        string sqlupd = "update ce_erptradecell WITH(ROWLOCK) set AfterSaleState=4,FinishAfterSaleTime=getdate()  where ctid='" + entity.tid + "'";
+                        string sqlupd = "update ce_erptradecell WITH(ROWLOCK) set AfterSaleState=4,FinishAfterSaleTime=getdate(),UpdateTime=getdate()  where ctid='" + entity.tid + "'";
                         DbHelper.DbConn.ExecuteNonQuery(sqlupd);
                         LogHelper.addLog(entity.tid, CurrentUser.UserID, "完成售后", 0, 3);
                         CeErpSukuraData.createInfo(entity.tid, 8);
@@ -7866,7 +7911,7 @@ namespace SiteCore.Handler
                     entity.AfterSaleBackReason = GetPostString("backreason");
                     entity.AfterSaleState = 1;
                     entity.AfterSaleSupplierState = 0;
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     returnSuccessMsg("操作成功!");
                     LogHelper.addLog(entity.ctid, CurrentUser.UserID, "退回到售后中", 0, 0);
@@ -8034,6 +8079,7 @@ namespace SiteCore.Handler
                         apiVo.actionName = "afterOver";
                         designHelper.API_WorkCore(apiVo);     //afterOver
                     }
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     returnSuccessMsg("操作成功!");
                     CeErpSukuraData.createInfo(entity.ctid, 8);
@@ -8104,7 +8150,7 @@ namespace SiteCore.Handler
                                 ceErpTradeAfterSaleExtend.Create();
                             }
                         }
-
+                        entity.UpdateTime = DateTime.Now;
                         entity.Update();
                         returnSuccessMsg("操作成功!");
                         LogHelper.addLog(entity.ctid, CurrentUser.UserID, "责任主管" + (st == 1 ? "认可" : ("不认可," + afmemo)), 0, 3);
@@ -8171,7 +8217,7 @@ namespace SiteCore.Handler
                             apiVo.actionName = "afterOver";
                             designHelper.API_WorkCore(apiVo);     //afterOver
                         }
-
+                        entity.UpdateTime = DateTime.Now;
                         entity.Update();
                         returnSuccessMsg("操作成功!");
                         CeErpSukuraData.createInfo(entity.ctid, 8);
@@ -10108,6 +10154,7 @@ namespace SiteCore.Handler
                 if (entity != null)
                 {
                     entity.MemoOpt = 4;
+                    entity.UpdateTime = DateTime.Now;
                     entity.Update();
                     LogHelper.addLog(eid, CurrentUser.UserID, "开始查货", 4, 0);
                     CeErpSukuraData.createInfo(entity.ctid, 6);
@@ -10724,6 +10771,11 @@ namespace SiteCore.Handler
                     returnSuccessMsg("未找到对应的订单!");
                     return;
                 }
+                if (ce.OrderState >= 5)
+                {
+                    returnSuccessMsg("已上传文件无法修改!");
+                    return;
+                }
                 int type = GetPostInt("type");
                 string content = GetPostString("content");
                 if (type == 0)
@@ -11815,7 +11867,7 @@ namespace SiteCore.Handler
                 if (tids != null && tids.Length > 0)
                 {
                     StringBuilder sql = new StringBuilder();
-                    sql.AppendFormat("update CE_ErpTradeCell set OrderState = 6 where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"));
+                    sql.AppendFormat("update CE_ErpTradeCell set OrderState = 6,UpdateTime=getdate() where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"));
                     CeErpTradeCell.ExecuteNonQuery(sql.ToString());
                     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.下单完成, CurrentUser.UserID, "下载设计文件");
@@ -12685,6 +12737,9 @@ namespace SiteCore.Handler
             {
                 CeErpSukuraData.createInfo(ctid, 3);
             }
+            StringBuilder sql = new StringBuilder();
+            sql.AppendFormat("update CE_ErpTradeCell set UpdateTime=getdate() where ctid in ({0}) ;", ("'" + ctids.Replace(",", "','") + "'"));
+            CeErpTradeCell.ExecuteNonQuery(sql.ToString());
             designHelper.api_approveDesign(ctids);     //approveDesign
             returnSuccessMsg("");
         }
@@ -12865,24 +12920,46 @@ namespace SiteCore.Handler
                     List<string> ids = new List<string>();
                     if (dt != null && dt.Rows.Count > 1)
                     {
+                        bool needhe = false;
                         foreach (DataRow dr in dt.Rows)
                         {
                             ids.Add("'" + dr["ctid"] + "'");
+                            //备注有合包
+                            if (dr["seller_memo"].ToString().IndexOf("合包") > -1)
+                            {
+                                needhe = true;
+                            }
+                            if (dr["OtherMemo"].ToString().IndexOf("合包") > -1)
+                            {
+                                needhe = true;
+                            }
+                            //顺丰快递
+                            if (Convert.ToInt32(dr["IsSF"]) > 0)
+                            {
+                                needhe = true;
+                            }
+                        }
+                        if (!needhe)
+                        {
+                            ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(new DataTable())) + "}");
+                            return;
                         }
-
                         sql = new StringBuilder();
-                        sql.AppendFormat("select * from CE_ErpDeliverMark where ctid in ({0});", string.Join(",", ids));
+                        sql.AppendFormat("select * from CE_ErpDeliverMark where isDel = 0 and ctid in ({0});", string.Join(",", ids));
                         dt.Columns.Add(new DataColumn("dstate", typeof(int)));
+                        dt.Columns.Add(new DataColumn("dnumber", typeof(int)));
                         DataTable dt1 = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
                         foreach (DataRow dr in dt.Rows)
                         {
                             dr["dstate"] = 0;
+                            dr["dnumber"] = 0;
                             foreach (DataRow row in dt1.Rows)
                             {
 
                                 if (dr["ctid"].ToString().Equals(row["ctid"].ToString()))
                                 {
                                     dr["dstate"] = 2;
+                                    dr["dnumber"] = Convert.ToInt32(row["markNumber"]);
                                 }
 
                             }
@@ -12893,8 +12970,7 @@ namespace SiteCore.Handler
                         }
 
                     }
-                    string ro_jsond = JsonConvert.SerializeObject(dt.Rows);
-                    returnSuccess(ro_jsond);
+                    ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)) + "}");
                     return;
                 }
                 returnErrorMsg("未找到订单");
@@ -12903,6 +12979,85 @@ namespace SiteCore.Handler
 
             returnErrorMsg("缺少必要的参数");
         }
+
+        public void get_mark_number()
+        {
+            string eid = GetPostString("ctid");
+
+            CeErpTradeCell entity = CeErpTradeCell.GetByCtid(eid);
+            if (entity != null)
+            {
+                CeErpDeliverMark ceErpDeliverMark = CeErpDeliverMark.GetByCtid(eid);
+                int current = 1;
+
+                if (ceErpDeliverMark == null)
+                {
+                    StringBuilder sql = new StringBuilder();
+                    sql.AppendFormat("select * from ce_erptradecell where SupplierId={0} and orderstate=6 and tid='{1}';", entity.SupplierId, entity.tid);
+                    DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+                    List<string> ids = new List<string>();
+                    if (dt != null && dt.Rows.Count > 1)
+                    {
+                        foreach (DataRow dr in dt.Rows)
+                        {
+                            ids.Add("'" + dr["ctid"] + "'");
+                        }
+                        //查询已有的编号
+                        sql = new StringBuilder();
+                        sql.AppendFormat("select * from CE_ErpDeliverMark where isDel = 0 and ctid in ({0});", string.Join(",", ids));
+                        DataTable dt1 = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+                        if (dt1 == null || dt1.Rows.Count == 0)
+                        {
+                            DataTable numbers = DbHelper.DbConn.ExecuteDataset(string.Format("select markNumber from CE_ErpDeliverMark where isDel = 0 group by markNumber")).Tables[0];
+                            List<int> list_number = new List<int>();
+                            foreach (DataRow row in numbers.Rows)
+                            {
+                                list_number.Add(Convert.ToInt32(row["markNumber"]));
+                            }
+                            //查询空余编号
+                            for (int i = 0; i < list_number.Count + 2; i++)
+                            {
+                                if (!list_number.Contains(current))
+                                {
+                                    CeErpDeliverMark ceErpDeliverMark1 = CeErpDeliverMark.GetByNumber(current);
+                                    //防止查询过程中有新数据生成
+                                    if (ceErpDeliverMark1 == null)
+                                    {
+                                        break;
+                                    }
+                                }
+                                current++;
+                            }
+                        }
+                        else
+                        {
+                            foreach (DataRow row in dt1.Rows)
+                            {
+                                current = Convert.ToInt32(row["markNumber"]);
+                            }
+                        }
+
+                        ceErpDeliverMark = new CeErpDeliverMark();
+                        ceErpDeliverMark.ctid = eid;
+                        ceErpDeliverMark.createtime = DateTime.Now;
+                        CeErpTrade ceErpTrade = CeErpTrade.Get(entity.tid);
+                        if (ceErpTrade != null)
+                        {
+                            ceErpDeliverMark.nickName = ceErpTrade.buyer_nick;
+                        }
+                        ceErpDeliverMark.markNumber = current;
+                        ceErpDeliverMark.Create();
+
+                    }
+                }
+                else
+                {
+                    current = ceErpDeliverMark.markNumber;
+                }
+                ReturnSuccess(JsonConvert.SerializeObject(new { markNumber = current }));
+                return;
+            }
+        }
     }
 
 }

+ 17 - 0
SiteCore/taobao/apiDesign.cs

@@ -860,5 +860,22 @@ namespace SiteCore.Handler
             returnErrorMsg("找不到订单记录");
         }
 
+        //http://47.114.150.226:88/Handler/apiDesign.ashx?t=getOrderLogs   post请求参数(参数放body中):responsibleId-售后单id status-处理结果1同意2不同意 supmemo-理由
+        public void getOrderLogs()
+        {
+            string ctid = GetPostString("ctid");
+            if (string.IsNullOrEmpty(ctid))
+            {
+                returnErrorMsg("找不到订单记录");
+                return;
+            }
+            StringBuilder sql = new StringBuilder();
+            sql.AppendFormat("select * from view_erptradelog where tid='{0}' order by id;", ctid);
+            DataTable ds = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+
+            ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(ds)) + "}");
+            return;
+
+        }
     }
 }

+ 51 - 21
SiteCore/taobao/commonHelper.cs

@@ -26,6 +26,7 @@ using static SiteCore.taoObj.work_core_vo;
 using System.Linq;
 using NHibernate.Mapping;
 using System.Reflection.Emit;
+using NPOI.SS.Formula.Functions;
 
 namespace SiteCore
 {
@@ -82,6 +83,7 @@ namespace SiteCore
                             {
                                 entity.AfterSaleState = 4;
                                 entity.FinishAfterSaleTime = DateTime.Now;
+                                entity.UpdateTime = DateTime.Now;
                                 entity.AfterSaleSupplierState = 1;
                                 ApiVo apiVo = new ApiVo();
                                 apiVo.orderNumber = entity.ctid;
@@ -117,7 +119,7 @@ namespace SiteCore
                             {
                                 entity.AfterSaleState = 4;
                                 entity.FinishAfterSaleTime = DateTime.Now;
-
+                                entity.UpdateTime = DateTime.Now;
                                 entity.AfterSaleSupplierState = 1;
                                 entity.Update();
                                 ApiVo apiVo = new ApiVo();
@@ -1839,7 +1841,7 @@ namespace SiteCore
             {
                 return new designApiResponseVo(-1, "无订单信息");
             }
-            string info_sql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tid);
+            string info_sql = string.Format("SELECT ctid,ProductId,seller_memo FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tid);
             DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
             string check_info = "无订单信息";
             if (data.Rows.Count > 0)
@@ -1854,7 +1856,7 @@ namespace SiteCore
                     {
                         if (cell.DesignUserId == 0 || cell.DispatchSort == 2)
                         {
-                            designApiResponseVo result = checkOrderDesignInfo(cell, "");
+                            designApiResponseVo result = checkOrderDesignInfo(cell, "", data);
                             check_info = result.msg;
                             if (result.code == 200)
                             {
@@ -1878,7 +1880,7 @@ namespace SiteCore
         }
         static List<int> products = new List<int>() { 29, 2489, 2517, 2518, 2519, 2520, 2533, 2534, 2558, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2634, 2644, 2645, 2646, 2648, 2649, 2650 };
         static List<int> shops = new List<int>() { 2, 77, 121, 122, 65, 87, 26, 45, 17, 21, 52, 54, 103, 107, 108, 109, 118, 63, 64, 66, 49, 67, 105, 35, 57, 29, 53, 62 };
-        public static designApiResponseVo checkOrderDesignInfo(CeErpTradeCell ceErpTradeCell, string post = "")
+        public static designApiResponseVo checkOrderDesignInfo(CeErpTradeCell ceErpTradeCell, string post = "", DataTable dt = null)
         {
             if (ceErpTradeCell.DispatchSort == 2)
             {
@@ -1991,28 +1993,24 @@ namespace SiteCore
                         {
 
                         }
-                        if (ceErpTradeCell.seller_memo.Contains("刮刮"))
-                        {
-                            num = Math.Max(num - 1, 1);
-                        }
-                        pattern = @"(\d+)款";
-                        matches = Regex.Matches(ceErpTradeCell.seller_memo, pattern);
-                        try
-                        {
-                            num = Math.Max(num - matches.Count, 0);
 
-                            foreach (System.Text.RegularExpressions.Match match in matches)
+                        num = getSellerMemoNum(ceErpTradeCell.seller_memo);
+                        if (dt != null && dt.Rows != null && dt.Rows.Count > 0)
+                        {
+                            foreach (DataRow item in dt.Rows)
                             {
-                                if (match.Success)
+                                int tempNum = 0;
+                                if (!string.IsNullOrEmpty(item["ProductId"].ToString()))
                                 {
-                                    num += Convert.ToInt32(match.Groups[1].Value);
-                                    break;
+                                    if (Convert.ToInt32(item["ProductId"]) == ceErpTradeCell.ProductId)
+                                    {
+                                        tempNum = getSellerMemoNum(item["seller_memo"].ToString());
+                                        tempNum = tempNum == 0 ? 1 : tempNum;
+                                    }
                                 }
-                            }
-                        }
-                        catch (Exception ex)
-                        {
+                                num += tempNum;
 
+                            }
                         }
                         //2款不进
                         if (num < min_num)
@@ -2029,6 +2027,38 @@ namespace SiteCore
             }
             return new designApiResponseVo(200, "");
         }
+
+        private static int getSellerMemoNum(string memo)
+        {
+            int num = 0;
+            string pattern = @"\b(\d{1,5}[x\*]\d{1,5}(mm|cm))\b";
+            Regex reg = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline, TimeSpan.FromSeconds(2));//2秒后超时
+            MatchCollection matches = reg.Matches(memo);//设定要查找的字符串
+            if (memo.Contains("刮刮"))
+            {
+                num = Math.Max(num - 1, 1);
+            }
+            pattern = @"(\d+)款";
+            matches = Regex.Matches(memo, pattern);
+            try
+            {
+                num = Math.Max(num - matches.Count, 0);
+
+                foreach (System.Text.RegularExpressions.Match match in matches)
+                {
+                    if (match.Success)
+                    {
+                        num += Convert.ToInt32(match.Groups[1].Value);
+                        break;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+
+            }
+            return num;
+        }
         private static string cytUserId = "77886";
         public static void sendCytAfterSale(CeErpTradeCell entity)
         {

+ 2 - 2
SiteCore/taobao/dataHelper.cs

@@ -387,8 +387,8 @@ namespace SiteCore.Handler
 
         public static void api_orderBack(string orderNumber, string state, string content)
         {
-            string post_url = "http://api.presales.lingtao8.com/open/order/orderProcessReturn";
-            //string post_url = "http://admin.lingtao.zmht888.com/prod-api/open/order/orderProcessReturn";
+            //string post_url = "http://api.presales.lingtao8.com/open/order/orderProcessReturn";
+            string post_url = "http://admin.lingtao.zmht888.com/prod-api/open/order/orderProcessReturn";
             string remoteInfo = "";
             string param = JsonConvert.SerializeObject(new
             {

+ 2 - 2
SiteCore/taobao/designHelper.cs

@@ -57,8 +57,8 @@ namespace SiteCore.Handler
                 }
             }
         }
-        static string pUrl = "http://api.lingtao8.com/api/manager/";
-        //static string pUrl = "http://47.122.40.91:8099/api/manager/";
+        //static string pUrl = "http://api.lingtao8.com/api/manager/";
+        static string pUrl = "http://47.122.40.91:8099/api/manager/";
 
         static HttpHelper tb_http = new HttpHelper();
 

+ 1 - 0
SiteCore/taobao/preSalesHelper.cs

@@ -1808,6 +1808,7 @@ namespace SiteCore.Handler
                 entity.IsUrgency = item.isUrgent;
                 entity.ptid = item.ptid;
                 entity.SplitTag = item.splitInfoNo;
+                entity.UpdateTime = DateTime.Now;
                 if (!string.IsNullOrEmpty(item.paymentFile))
                 {
                     entity.PayProofImg = item.paymentFile;

+ 9 - 5
SiteCore/taobao/tmcHelper.cs

@@ -865,7 +865,7 @@ namespace SiteCore
                     {
                         entity.pay_time = StampToDateTime(tObj.payTime);
                     }
-
+                    entity.UpdateTime = DateTime.Now;
                     entity.ShopId = shopId;
 
                     if (isXianhuo)
@@ -1436,7 +1436,7 @@ namespace SiteCore
                     entity.tid = tid;
                     ishaveBu = false;
                 }
-
+                entity.UpdateTime = DateTime.Now;
                 if (entity.ShopId == 0)
                 {
                     CeErpShop nShop = CeErpShop.GetShopIdByName(father.seller_nick);
@@ -1542,6 +1542,7 @@ namespace SiteCore
                     {
                         entity.OrderSn = orderSn;
                     }
+                    entity.UpdateTime = DateTime.Now;
                     entity.tid = tid;
                     entity.seller_memo = smemo;
                     entity.payment = Convert.ToDouble(father.payment);
@@ -1560,6 +1561,7 @@ namespace SiteCore
                 else
                 {
                     entity.IsSample = 1;
+                    entity.UpdateTime = DateTime.Now;
                     entity.seller_memo = smemo;
                     entity.OrderState = 6;
                     entity.FinishPlaceTime = DateTime.Now;
@@ -1824,7 +1826,7 @@ namespace SiteCore
                     entity.OrderSn = orderSn;
                 }
             }
-
+            entity.UpdateTime = DateTime.Now;
             entity.tid = father.tid;
             entity.SplitTag = splitTag;
             if (entity.ShopId == 0)
@@ -2236,7 +2238,7 @@ namespace SiteCore
                     entity.OrderSn = orderSn;
                 }
             }
-
+            entity.UpdateTime = DateTime.Now;
             entity.tid = father.tid;
             entity.SplitTag = splitTag;
             if (entity.ShopId == 0)
@@ -2446,7 +2448,7 @@ namespace SiteCore
             {
                 entity.OrderSn = ctid;
             }
-
+            entity.UpdateTime = DateTime.Now;
             entity.tid = father.tid;
             entity.SplitTag = splitTag;
             string[] acclist = itemMemo.Split('-');
@@ -2623,6 +2625,7 @@ namespace SiteCore
             {
                 entity.OrderSn = ctid;
             }
+            entity.UpdateTime = DateTime.Now;
             entity.tid = father.tid;
             entity.SplitTag = splitTag;
             string[] acclist = memo_index1.Split('-');
@@ -2984,6 +2987,7 @@ namespace SiteCore
             {
                 entity.OrderSn = ctid;
             }
+            entity.UpdateTime = DateTime.Now;
             entity.tid = father.tid;
             entity.SplitTag = splitTag;
             string[] acclist = itemMemo.Split('-');

+ 1 - 0
Web/EDelivery/PddDelivering.aspx.cs

@@ -66,6 +66,7 @@ public partial class EDelivery_PddDelivering : BasePage
             AppendScript("printPageUrl='" + webConfig.SiteUrl + "';");
             AppendScript("userPostCode='" + CurrentUser.UserPost.Post.Code + "';");
             AppendScript("cdrImgUrl='" + webConfig.ltFileSiteUrl + "/d/ws';");
+            AppendScript("supperIds='" + CurrentUser.User.pemVend + "';");
             //StringBuilder sql = new StringBuilder();
             //sql.AppendFormat("select * from s_runinfotype");
             //DataSet ds = DbHelper.DbConn.ExecuteDataset(sql.ToString());

+ 1 - 0
Web/EDelivery/WaitingDelivery.aspx.cs

@@ -67,6 +67,7 @@ public partial class EDelivery_WaitingDelivery : BasePage
             AppendScript("printPageUrl='" + webConfig.SiteUrl + "';");
             AppendScript("userPostCode='" + CurrentUser.UserPost.Post.Code + "';");
             AppendScript("cdrImgUrl='" + webConfig.ltFileSiteUrl + "/d/ws';");
+            AppendScript("supperIds='" + CurrentUser.User.pemVend + "';");
             //StringBuilder sql = new StringBuilder();
             //sql.AppendFormat("select * from s_runinfotype");
             //DataSet ds = DbHelper.DbConn.ExecuteDataset(sql.ToString());

+ 1 - 0
Web/EDelivery/js/PddDelivering.js

@@ -6,6 +6,7 @@ var userPostCode = "";
 var memoType = 0;
 var productHourList = [];
 var cdrImgUrl = null;
+var supperIds = null;
 function addFn() {
     edit_id = "";
     edit_shop = "";

+ 1 - 0
Web/EDelivery/js/WaitingDelivery.js

@@ -6,6 +6,7 @@ var userPostCode = "";
 var memoType = 0;
 var productHourList = [];
 var cdrImgUrl = null;
+var supperIds = null;
 function addFn() {
     edit_id = "";
     edit_shop = "";

+ 106 - 5
Web/EDelivery/js/pddPrintBill.js

@@ -451,12 +451,18 @@ function sendPrintData(iTag) {
     }
     //console.log("start" + billOrderList.length);
     var item = billOrderList[iTag];
-    if (item.SplitTag.length > 0) {
-        isHaveOtherOrder(item.ctid, item, iTag, item.tid);
-    }
-    else {
-        doRealGetPrintData(item, iTag);
+    let vend_list = supperIds == null ? [] : supperIds.split(",");
+    if (vend_list.indexOf("97") > -1) {
+        checkOrderSplit(item, iTag)
+    } else {
+        if (item.SplitTag.length > 0) {
+            isHaveOtherOrder(item.ctid, item, iTag, item.tid);
+        }
+        else {
+            doRealGetPrintData(item, iTag);
+        }
     }
+
 }
 
 function doRealGetPrintData(item, iTag, isTogether = 0) {
@@ -555,6 +561,101 @@ function cancelWaybillFn() {
     mini.get("waybill_win").hide();
 }
 
+function checkOrderSplit(item, iTag) {
+    let ctid = item.ctid;
+    postAjaxSync("check_erp_sameorders", { ctid }, function (data) {
+
+        if (data.data) {
+            let mome = "";
+            let tableHtml = "";
+            let isNumber = false;
+            if (data.data.length > 0) {
+                for (let i = 0; i < data.data.length; i++) {
+                    let item = data.data[i];
+                    let sf = "";
+                    let stateStr = "";
+
+                    if (item.IsSF == 1) {
+                        sf = "顺丰寄付";
+                    } else if (item.IsSF == 2) {
+                        sf = "顺丰到付"
+                    }
+                    if (item.dstate == 0) {
+                        stateStr = "生产中";
+                    } else if (item.dstate == 1) {
+                        stateStr = "此件";
+                        mome = item.seller_memo;
+                    } else if (item.dstate == 2) {
+                        stateStr = "等待中";
+                        isNumber = true;
+                    }
+                    tableHtml += `<tr>
+                    <td>${item.ctid}</td>
+                    <td>${sf}</td>
+                    <td style="width:600px">${item.seller_memo}</td>
+                    <td>${item.OtherMemo}</td>
+                    <td>${stateStr}</td>
+                    <td>${item.dnumber}</td>
+                </tr>`;
+
+                }
+                let html = `<div style="font-size: 20px;row-gap: 10px;display: flex;flex-direction: column;">
+                <div>请注意:该订单有需要合包的拆单,共${data.data.length}单!</div>
+                <div>${mome}</div>
+                <table border="1">
+                  <tr>
+                    <th>订单编号</th>
+                    <th>是否顺丰</th>
+                    <th style="width:600px">备注</th>
+                    <th style="width:150px">额外备注</th>
+                    <th>状态</th>
+                    <th>编号</th>
+                  </tr>
+                  ${tableHtml}
+                </table>
+            </div>
+            <style>.mini-messagebox-content td{font-size:14px;padding: 5px;}.mini-panel-body{overflow-y: scroll !important;}</style>`;
+
+                mini.showMessageBox({
+                    title: "合包提示!",
+                    iconCls: "mini-messagebox-question",
+                    maxWidth: 1200,
+                    maxHeight: 500,
+                    buttons: ["合并打单", isNumber ? "同号等待" : "取号等待", "取消打印"],
+                    html,
+                    callback: function (action) {
+
+                        if (action == "合并打单") {
+                            doRealGetPrintData(item, iTag, 1);
+                        }
+                        else if (action == "取消打印") {
+                            mini.get("id_saveWaybillBtn").enable();
+                            return;
+                        } else if (action == "取号等待" || action == "同号等待") {
+                            postAjaxSync("get_mark_number", { ctid }, function (result) {
+                                let htmls = `<span style = "color:red;font-size:60px;display:flex;justify-content: center;">${result.markNumber}</span>`;
+                                mini.showMessageBox({
+                                    title: "打单取号!",
+                                    iconCls: "mini-messagebox-question",
+                                    buttons: ["确定"],
+                                    html: htmls,
+                                    callback: function (action1) {
+                                        sendPrintData(iTag + 1);
+                                    }
+                                })
+                            })
+                        }
+                    }
+                })
+            } else {
+                doRealGetPrintData(item, iTag);
+            }
+
+        }
+        progressHide();
+        mini.get("id_saveWaybillBtn").enable();
+    })
+}
 
 //菜鸟物流云打印--------------------------------------------------------------------------------------------=======================================
 

+ 110 - 12
Web/EDelivery/js/printBill.js

@@ -186,7 +186,6 @@ function doPrintSF(iData, sellerMemo) {
     //mainDataStr = mainDataStr.replace(/n/g, "");
     var mainData = JSON.parse(mainDataStr);
     var docData = mainData.data[0]
-    console.log("SFSFSFSF", docData);
     var request = getRequestObject("print");
     request.task = new Object();
     request.task.taskID = getUUID(8, 10);
@@ -253,7 +252,6 @@ function doPrintEn(data, sellerMemo) {
     //selfData.item_name = "我是你要的商品芭比娃娃。。。";
     //obj.data = selfData
     content.push(docuData.props);
-    console.log("doPrintEn", sellerMemo);
     let result_str = "";
     for (let i = 0; i < sellerMemo.length; i++) {
         if (i % 20 === 0 && i != 0) {
@@ -330,7 +328,7 @@ function waybillFn() {
     var rec = grid.getSelecteds();
     if (rec != undefined && rec != "" && rec.length > 0) {
         if (!isConnected) {
-            return mini.alert("打印机未连接") 
+            //return mini.alert("打印机未连接")
         }
         //edit_id = rec.tid;
         var offline_str = "";
@@ -425,7 +423,6 @@ function saveWaybillFn() {
     orderCount = billOrderList.length;
     errorMsg = "";
     if (billOrderList.length <= 0) return;
-    console.log(billOrderList);
 
     progressShow("电子面单打印中...进度:1");
     sendPrintData(0);
@@ -440,16 +437,22 @@ function sendPrintData(iTag) {
         //mini.get("id_sysWaybillBtn").enable();
         return;
     }
+    let vend_list = supperIds == null ? [] : supperIds.split(",");
     //console.log("start" + billOrderList.length);
     var item = billOrderList[iTag];
-    if (item.SplitTag.length > 0) {
-        isHaveOtherOrder(item.ctid, item, iTag, item.tid);
-    }
-    else {
-        doRealGetPrintData(item, iTag);
+    if (vend_list.indexOf("97") > -1) {
+        checkOrderSplit(item, iTag);
+    } else {
+        if (item.SplitTag.length > 0) {
+            isHaveOtherOrder(item.ctid, item, iTag, item.tid);
+        }
+        else {
+            doRealGetPrintData(item, iTag);
+        }
     }
-}
 
+}
+//获取面单
 function doRealGetPrintData(item, iTag, isTogether = 0) {
     var ctid = item.ctid;
     var cpcode = mini.get("txtBillCom").getValue();
@@ -471,7 +474,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
         if (data.restype == 0) {
             errorMsg += item.ctid;
             errorMsg += data.data;
-            errorMsg += ",";
+            errorMsg += ",\n";
         }
         else {
             if (cpcode == "SFFQ-LY") {
@@ -502,7 +505,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
         }
     });
 }
-
+//是否合包
 function isHaveOtherOrder(ctid, item, iTag, tid) {
     for (var ltid of IsPrintOrderList) {
         if (ltid == tid) {
@@ -546,6 +549,101 @@ function cancelWaybillFn() {
     mini.get("waybill_win").hide();
 }
 
+function checkOrderSplit(item, iTag) {
+    let ctid = item.ctid;
+    postAjaxSync("check_erp_sameorders", { ctid }, function (data) {
+
+        if (data.data) {
+            let mome = "";
+            let tableHtml = "";
+            let isNumber = false;
+            if (data.data.length > 0) {
+                for (let i = 0; i < data.data.length; i++) {
+                    let item = data.data[i];
+                    let sf = "";
+                    let stateStr = "";
+
+                    if (item.IsSF == 1) {
+                        sf = "顺丰寄付";
+                    } else if (item.IsSF == 2) {
+                        sf = "顺丰到付"
+                    }
+                    if (item.dstate == 0) {
+                        stateStr = "生产中";
+                    } else if (item.dstate == 1) {
+                        stateStr = "此件";
+                        mome = item.seller_memo;
+                    } else if (item.dstate == 2) {
+                        stateStr = "等待中";
+                        isNumber = true;
+                    }
+                    tableHtml += `<tr>
+                    <td>${item.ctid}</td>
+                    <td>${sf}</td>
+                    <td style="width:600px">${item.seller_memo}</td>
+                    <td>${item.OtherMemo}</td>
+                    <td>${stateStr}</td>
+                    <td>${item.dnumber}</td>
+                </tr>`;
+
+                }
+                let html = `<div style="font-size: 20px;row-gap: 10px;display: flex;flex-direction: column;">
+                <div>请注意:该订单有需要合包的拆单,共${data.data.length}单!</div>
+                <div>${mome}</div>
+                <table border="1">
+                  <tr>
+                    <th>订单编号</th>
+                    <th>是否顺丰</th>
+                    <th style="width:600px">备注</th>
+                    <th style="width:150px">额外备注</th>
+                    <th>状态</th>
+                    <th>编号</th>
+                  </tr>
+                  ${tableHtml}
+                </table>
+            </div>
+            <style>.mini-messagebox-content td{font-size:14px;padding: 5px;}.mini-panel-body{overflow-y: scroll !important;}</style>`;
+
+                mini.showMessageBox({
+                    title: "合包提示!",
+                    iconCls: "mini-messagebox-question",
+                    maxWidth: 1200,
+                    maxHeight: 500,
+                    buttons: ["合并打单", isNumber ? "同号等待" : "取号等待", "取消打印"],
+                    html,
+                    callback: function (action) {
+
+                        if (action == "合并打单") {
+                            doRealGetPrintData(item, iTag, 1);
+                        }
+                        else if (action == "取消打印") {
+                            mini.get("id_saveWaybillBtn").enable();
+                            return;
+                        } else if (action == "取号等待" || action == "同号等待") {
+                            postAjaxSync("get_mark_number", { ctid }, function (result) {
+                                let htmls = `<span style = "color:red;font-size:60px;display:flex;justify-content: center;">${result.markNumber}</span>`;
+                                mini.showMessageBox({
+                                    title: "打单取号!",
+                                    iconCls: "mini-messagebox-question",
+                                    buttons: ["确定"],
+                                    html: htmls,
+                                    callback: function (action1) {
+                                        sendPrintData(iTag + 1);
+                                    }
+                                })
+                            })
+                        }
+                    }
+                })
+            } else {
+                doRealGetPrintData(item, iTag);
+            }
+
+        }
+        progressHide();
+        mini.get("id_saveWaybillBtn").enable();
+    })
+}
 
 //菜鸟物流云打印--------------------------------------------------------------------------------------------=======================================
 

+ 1 - 0
Web/Global.asax

@@ -112,6 +112,7 @@
                                  typeof(CeErpSampleCustomer),
                                  typeof(CeErpTradeSpu),
                                  typeof(CeErpSukuraData),
+                                 typeof(CeErpDeliverMark),
                                  typeof(CeErpDataSendOrderInfo)
 
                              };

+ 1 - 1
Web/js/index.js

@@ -404,7 +404,7 @@ function getMyTipOrder() {
                     width: 700,
                     height: 405,
                     buttons: ["同意", "不同意", "稍后处理"],
-                    html: `<div style="display:flex;font-size:16px;flex-direction: column;font-weight: 600;justify-content: center;"><span style="padding:5px 0">订单编号为:${item?.tid}  申请改价</span><span style="padding:5px 0">备注:${item?.seller_memo}</span><span style="color: #fb0606;padding:5px 0">同意后内容将替换订单备注</span><span style="display:flex;align-items: center; text-align: center;padding:5px 0">修改内容:<textarea id="passChangeInpupt" style="width:400px;height:100px" >${item?.content}</textarea></span></div>`,
+                    html: `<div style="display:flex;font-size:16px;flex-direction: column;font-weight: 600;justify-content: center;"><span style="padding:5px 0">订单编号为:${item?.tid}  申请改价</span><span style="padding:5px 0">修改内容:${item?.content}</span><span style="color: #fb0606;padding:5px 0">同意后内容将替换订单备注</span><span style="display:flex;align-items: center; text-align: center;padding:5px 0">修改内容:<textarea id="passChangeInpupt" style="width:400px;height:100px" >${item?.seller_memo}</textarea></span></div>`,
 
                     callback: function (action) {
                         let params = { ctid: item.tid, id: item.ID }