zhuyiyi há 6 meses atrás
pai
commit
5c3a654381

+ 32 - 9
SiteCore/Handler/sync.order.cs

@@ -57,7 +57,7 @@ namespace SiteCore.Handler
 
             string poscode = CurrentUser.UserPost.Post.Code;
             DataStruct dStruct = GetPostStruct();
-            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\产品价格表.xlsx");
+            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\扇子.xls");
             //apiHelper.Api_SyncOrderByTime("598825");
             //apiHelper.API_GetWaybill("ZTO-CAINIAO-TZJK", "4233447147588233939");
             //apiHelper.Api_SyacOrder("2460143282114312263", "yujia");
@@ -5125,7 +5125,7 @@ namespace SiteCore.Handler
                         commonHelper.UpdateRelationOrder(entity.ctid);
                         commonHelper.insertToBuchaForDelivery(mainEn.tid, mainEn.posCode, dcomcode, outSid);
                         CeErpSukuraData.createInfo(entity.ctid, 4);
-                        if (entity.SupplierId == 64)
+                        if (entity.SupplierId == 64 || entity.SupplierId == 80)
                         {
                             commonHelper.sendCytExpress(exinfo);
                         }
@@ -6136,7 +6136,7 @@ namespace SiteCore.Handler
                                     commonHelper.UpdateRelationOrder(entity.ctid);
                                     CeErpSukuraData.createInfo(ctid, 4);
                                     commonHelper.insertToBuchaForDelivery(mainEn.tid, mainEn.posCode, cpCode, curUseWayBillCode);
-                                    if (entity.SupplierId == 64)
+                                    if (entity.SupplierId == 64 || entity.SupplierId == 80)
                                     {
                                         commonHelper.sendCytExpress(exinfo);
                                     }
@@ -6176,7 +6176,7 @@ namespace SiteCore.Handler
                                 exinfo.Create();
                                 commonHelper.UpdateRelationOrder(entity.ctid);
                                 CeErpSukuraData.createInfo(entity.ctid, 4);
-                                if (entity.SupplierId == 64)
+                                if (entity.SupplierId == 64 || entity.SupplierId == 80)
                                 {
                                     commonHelper.sendCytExpress(exinfo);
                                 }
@@ -6287,7 +6287,7 @@ namespace SiteCore.Handler
                                     commonHelper.UpdateRelationOrder(ceErpTradeCell.ctid);
                                     CeErpSukuraData.createInfo(ctid, 4);
                                     commonHelper.insertToBuchaForDelivery(ceErpTrade.tid, ceErpTrade.posCode, cpCode, curUseWayBillCode);
-                                    if (ceErpTradeCell.SupplierId == 64)
+                                    if (ceErpTradeCell.SupplierId == 64 || ceErpTradeCell.SupplierId == 80)
                                     {
                                         commonHelper.sendCytExpress(exinfo);
                                     }
@@ -6395,7 +6395,7 @@ namespace SiteCore.Handler
                     exinfo.print_time = DateTime.Now;
                     exinfo.printUser = CurrentUser.UserName;
                     exinfo.Create();
-                    if (entity.SupplierId == 64)
+                    if (entity.SupplierId == 64 || entity.SupplierId == 80)
                     {
                         commonHelper.sendCytExpress(exinfo);
                     }
@@ -7192,7 +7192,7 @@ namespace SiteCore.Handler
             if (dwfinish.Length > 0) lw.Add(dwfinish);
 
             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 = '{0}'", supplier));
             string responsible = GetPostString("responsibleman");
             if (responsible.Length > 0) lw.Add(string.Format("AfterSaleResponsible like '%{0}%'", responsible));
 
@@ -11927,7 +11927,7 @@ namespace SiteCore.Handler
                                 CeErpTradeResponsible.DelById(dr["ID"], 1);
                                 isEnd = true;
                             }
-                            if (!Convert.IsDBNull(dr["type"]) && Convert.ToInt32(dr["type"]) == 1 && Convert.ToInt32(dr["UserId"]) == 64)
+                            if (!Convert.IsDBNull(dr["type"]) && Convert.ToInt32(dr["type"]) == 1 && (Convert.ToInt32(dr["UserId"]) == 64 || Convert.ToInt32(dr["UserId"]) == 80))
                             {
                                 needCyt = true;
                             }
@@ -11968,7 +11968,7 @@ namespace SiteCore.Handler
                                     continue;
                                 }
                             }
-                            if (!Convert.IsDBNull(dr["type"]) && Convert.ToInt32(dr["type"]) == 1 && Convert.ToInt32(dr["UserId"]) == 64)
+                            if (!Convert.IsDBNull(dr["type"]) && Convert.ToInt32(dr["type"]) == 1 && (Convert.ToInt32(dr["UserId"]) == 64 || Convert.ToInt32(dr["UserId"]) == 80))
                             {
                                 needCyt = true;
                             }
@@ -13532,6 +13532,29 @@ namespace SiteCore.Handler
             writeGridDataTableJson(dStruct.TotalCount, dt);
         }
 
+        public void get_pack_order_list()
+        {
+
+            string packId = GetPostString("packId");
+            if (string.IsNullOrEmpty(packId))
+            {
+                returnErrorMsg("缺少必要的参数");
+                return;
+            }
+
+            StringBuilder sql = new StringBuilder();
+            sql.AppendFormat("select c.ctid,c.seller_memo,i.message from CE_ErpPackDataItem i left join CE_ErpTradeCell c on i.ctid=c.ctid where i.packId = {0}", packId);
+            DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+            if (dt == null || dt.Rows.Count == 0)
+            {
+                ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(new DataTable())) + "}");
+                return;
+            }
+
+            ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)) + "}");
+            return;
+        }
+
         public void get_supplier_product_time_list()
         {
             DataStruct dStruct = GetPostStruct();

+ 1 - 3
SiteCore/taobao/designHelper.cs

@@ -58,8 +58,6 @@ namespace SiteCore.Handler
             }
         }
         static string baseUrl = "http://api.lingtao8.com/";
-        static string test_baseUrl = "https://sj.lingtao8.com/";
-        //static string test_baseUrl = "http://47.122.40.91:8181/";
         //static string baseUrl = "http://47.122.40.91:8099/";
 
         static string pUrl = baseUrl + "api/manager/";
@@ -519,7 +517,7 @@ namespace SiteCore.Handler
             {
                 return result;
             }
-            string post_url = test_baseUrl + "api/originalOrder/discernOrder";
+            string post_url = pUrl + "discernOrder";
             System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // 根据需要选择合适的协议版本
 
             WebClient wc = new WebClient();

+ 1 - 1
Web/EAfterSale/js/FinishAfterSale.js

@@ -181,7 +181,7 @@ function searchFn() {
     //console.log("565656565", data);
     grid.load({
         ctid: s.tid, shopname: s.shop, buyer_nick: s.ww, reason: s.reason, method: s.method, finishdate1: s.finishdate1, finishdate2: s.finishdate2,
-        vstate: s.returnvstate
+        vstate: s.returnvstate, supplier: s.supplier
     });
 }
 //清除查询内容

+ 36 - 0
Web/EDelivery/PackCenter.aspx

@@ -58,6 +58,7 @@
             if (record.upStatus == 3) {
                 html += getGridBtn("notify", "重新打包", "rePackData(" + record.ID + ")");
             }
+            html += getGridBtn("task", "查看订单", "viewOrder(" + record.ID + ")");
             return html;
         }
         function downUrl(url, id) {
@@ -66,6 +67,41 @@
                 resultShow(data, "grid.reload();");
             });
         }
+
+        function viewOrder(id) {
+            postAjax("get_pack_order_list", { packId: id }, function (data) {
+                let tableHtml = "";
+                if (data.data.length == 0) {
+                    mini.alert("无订单记录!");
+                }
+                for (let i = 0; i < data.data.length; i++) {
+                    let item = data.data[i];
+                    tableHtml += `<tr>
+                        <td>${item.ctid}</td>
+                        <td>${item.seller_memo}</td>
+                        <td>${item.message}</td>
+                    </tr>`;
+                }
+                let html = `<div style="font-size: 20px;row-gap: 10px;display: flex;flex-direction: column;">
+                <table border="1">
+                  <tr>
+                    <th>订单编号</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,
+                    html,
+                })
+            });
+        }
     </script>
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">

+ 4 - 2
ecomServer/MainForm.cs

@@ -803,10 +803,12 @@ namespace ErpServer
                                     SqlParameter[] sqlParameter = {
                                     new SqlParameter("@inctid", SqlDbType.VarChar,200),
                                     new SqlParameter("@intype", SqlDbType.Int,5),
+                                    new SqlParameter("@nowtime", SqlDbType.VarChar,200),
                                     new SqlParameter("@res", SqlDbType.VarChar, 50) };
                                     sqlParameter[0].Value = dr["ctid"].ToString();
                                     sqlParameter[1].Value = changeBl ? 1 : 0;
-                                    sqlParameter[2].Direction = ParameterDirection.Output;
+                                    sqlParameter[2].Value = nowTime.ToString();
+                                    sqlParameter[3].Direction = ParameterDirection.Output;
                                     if (isDianziOrder == "1")
                                     {
                                         continue;
@@ -858,7 +860,7 @@ namespace ErpServer
                                             SqlHelper.ExecuteNonQueryStoreWithTimeOut("sp_autodispatch_wx", sqlParameter, 10);
                                         }
                                     }
-                                    res = sqlParameter[2].Value.ToString();
+                                    res = sqlParameter[3].Value.ToString();
                                     helper.writeLog("自动派单:" + dr["ctid"].ToString() + "-" + res);
                                     if (res.IndexOf("派单完成") != -1)
                                     {