Browse Source

新线程调用本地服务,订单日志新增自定义查询,售后新增空校验,打包中心新增重新打包

zhuyiyi 2 days ago
parent
commit
929ae48900

File diff suppressed because it is too large
+ 1 - 1
SiteCore/Handler/sync.order.cs


+ 4 - 3
SiteCore/taobao/commonHelper.cs

@@ -588,18 +588,19 @@ namespace SiteCore
                                 else if (deadLine.Hour > 0 && deadLine.Hour > placeTime.Hour)
                                 {
                                     //在截稿时间之前下单的可以减去一天时间
-                                    sendDay = Math.Max(1, sendDay - 1);
+                                    sendDay = Math.Max(1, sendDay - 2);
                                     sendtime = DateTime.Parse(placeTime.ToString("yyyy-MM-dd 23:59:59")).AddDays(sendDay);
                                 }
                                 else
                                 {
+                                    sendDay = Math.Max(1, sendDay - 1);
                                     sendtime = DateTime.Parse(placeTime.ToString("yyyy-MM-dd 23:59:59")).AddDays(sendDay);
                                 }
 
                                 //判断有没有到发货日期大于0还没到发货时间
                                 if (DateTime.Compare(sendtime.Date, DateTime.Now.Date) < 0)
                                 {
-                                    tLst.Add(row["ctid"].ToString());
+                                    tLst.Add("'" + row["ctid"].ToString() + "'");
                                     //匹配到就不要继续匹配了   
                                     break;
                                 }
@@ -3894,7 +3895,7 @@ namespace SiteCore
                 string orderSn = DateTimeNow("yyMMddHHmmssfff") + RandomNumbers(random, 3);
 
                 return orderSn;
-              
+
             }
             return "";
         }

+ 4 - 0
Web/EAfterSale/js/Handling.js

@@ -522,6 +522,10 @@ function saveHandleFn() {
         mini.alert("售后原因请选择详细一点");
         return;
     }
+    if (mini.get("txtReason1").getText() == "客户问题" && mini.get("txtReason2").getText() == "信息不全" && mini.get("txtReason3").getText() == "无照片反馈问题" && mini.get("txtReason4").getText() == "") {
+        mini.alert("售后原因请选择详细一点");
+        return;
+    }
 
     parms.AfterSaleReason = mini.get("txtReason1").getText() + "|" + mini.get("txtReason2").getText() + "|" + mini.get("txtReason3").getText() + "|" + mini.get("txtReason4").getText();
     parms.supplierResponsible = "";

+ 4 - 1
Web/EDelivery/PackCenter.aspx

@@ -57,9 +57,12 @@
                 html += getGridBtn("notify1", "下载", "downUrl('" + record.fileUrl + "','" + record.ID + "')");
             }
             if (record.upStatus == 3) {
-                html += getGridBtn("edit", "重新打包", "rePackData(" + record.ID + ")");
+
                 html += getGridBtn("memo", "退回", "backOrder(" + record.ID + ")");
             }
+            if (userPostCode == "SysAdmin") {
+                html += getGridBtn("edit", "重新打包", "rePackData(" + record.ID + ")");
+            }
             html += getGridBtn("task", "查看订单", "viewOrder(" + record.ID + ")");
             return html;
         }

+ 25 - 47
Web/EOrder/Order_Log.aspx

@@ -1,11 +1,12 @@
 <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/View.master" AutoEventWireup="true" CodeFile="Order_Log.aspx.cs" Inherits="EOrder_Order_Log" %>
 
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
-    <script type ="text/javascript" src="../js/address.js"></script>
+    <script type="text/javascript" src="../js/address.js"></script>
     <script type="text/javascript">
         var logData = null;
         var logDataTotal = null;
         var curLog = 0;
+        var ctid = '';
         //function downloadBillClick(tid) {
 
         //}
@@ -15,55 +16,30 @@
         //}
 
         function onClickChangeLog() {
-            if (curLog == 0) {
-                if (logDataTotal != null && logDataTotal.length > 0) {
-                    $("#idLogContent").html("");
-                    curLog = 1;
-                    var ahtml = "";
-                    $("#tipTxt").html("(当前为原始单号查找的所有日志)");
-                    for (var item of logDataTotal) {
-                        if (item.PostCode == "Supplier") {
-                            ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserTb + "-" + item.tid + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
-
-                        }
-                        else
-                            ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserName + "-" + item.tid  + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
-                    }
-                    $("#idLogContent").html(ahtml);
-                }
-            }
-            else {
-                if (logData != null && logData.length > 0) {
-                    curLog = 0;
-                    $("#idLogContent").html("");
-                    $("#tipTxt").html("(当前为本单的日志)");
-                    var ahtml = "";
-                    for (var item of logData) {
-                        if (item.PostCode == "Supplier") {
-                            ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserTb + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
-                        }
-                        else
-                            ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserName + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
-                    }
-                    $("#idLogContent").html(ahtml);
+            let inCtid = mini.get("inCtid").getValue()
+            postAjax("getOrderLogInfo", { ctid: inCtid }, function (data) {
+                var ahtml = "";
+                for (var item of data.data) {
+                    ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserName + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
                 }
-            }
+                $("#idLogContent").empty().html(ahtml);
+            });
         }
 
         $(function () {
-            console.log("xxxxx", logData);
             if (logData != null && logData.length > 0) {
                 curLog = 0;
                 var ahtml = "";
                 for (var item of logData) {
-                        ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserName + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
+                    ahtml += ("<div style=\"font-size:16px;color:#3C3C3C; margin-top:15px;line-height:25px; display:flex;flex-direction:column; \"> <div> <span style='color:darkblue;font-size:16px;'>❥" + formatCommonDate(item.OperateTime) + "</span>-<span style='color:green;'>" + item.UserName + "</span></div><div style='margin-left:12px;'>" + item.Con + "</div></div>")
                 }
                 $("#idLogContent").html(ahtml);
+                mini.get("inCtid").setValue(ctid)
             }
-              
+
         });
 
-        
+
 
     </script>
     <style type="text/css">
@@ -121,18 +97,20 @@
         .word_shou {
             background-color: saddlebrown;
         }
+
         .word_green {
             background-color: forestgreen;
         }
-        .state_word{
-            width:50px;
-            display:flex;
-            flex-direction:row;
-            padding:3px 6px 3px 6px;
-            text-align:center;
-            font-weight:bold;
-            color:white;
-            background-color:forestgreen;
+
+        .state_word {
+            width: 50px;
+            display: flex;
+            flex-direction: row;
+            padding: 3px 6px 3px 6px;
+            text-align: center;
+            font-weight: bold;
+            color: white;
+            background-color: forestgreen;
         }
 
         .mini-grid-cell-nowrap {
@@ -150,7 +128,7 @@
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
     <div style="display: flex; flex-direction: row">
-        <a class="mini-button" onclick="onClickChangeLog">切换</a><div id="tipTxt" style="font-size:20px;color:orangered;margin-left:5px;line-height:25px;">(当前为本单的日志)</div>
+        <input id="inCtid" class="mini-textbox inp" /><a class="mini-button" onclick="onClickChangeLog">查询</a><div id="tipTxt" style="font-size: 20px; color: orangered; margin-left: 5px; line-height: 25px;">(当前为本单的日志)</div>
     </div>
 
     <div style="width: 600px; height: 600px; overflow: auto; float: left; margin-left: 3px;" id="idLogContent">

+ 3 - 2
Web/EOrder/Order_Log.aspx.cs

@@ -12,7 +12,7 @@ using Utils;
 using SiteCore;
 using Utils.Serialization;
 
-public partial class EOrder_Order_Log: BasePage
+public partial class EOrder_Order_Log : BasePage
 {
     protected override void OnPreInit(EventArgs e)
     {
@@ -29,6 +29,7 @@ public partial class EOrder_Order_Log: BasePage
             sql.AppendFormat("select * from view_erptradelog where tid='{0}' order by id;", ctid);
             DataSet ds = DbHelper.DbConn.ExecuteDataset(sql.ToString());
             AppendScript("logData=" + JsonString.DataTable2AjaxJson(ds.Tables[0]) + ";");
+            AppendScript("ctid='" + ctid + "';");
 
             //string tid = ctid;
             //if (tid.IndexOf("C") != -1)
@@ -41,7 +42,7 @@ public partial class EOrder_Order_Log: BasePage
             //    DataSet ds2 = DbHelper.DbConn.ExecuteDataset(sql2.ToString());
             //    AppendScript("logDataTotal=" + JsonString.DataTable2AjaxJson(ds2.Tables[0]) + ";");
             //}
-            
+
 
         }
         //foreach (DataRow dr in dt.Rows)

+ 7 - 4
ecomServer/MainForm.cs

@@ -1608,10 +1608,13 @@ namespace ErpServer
         }
         public void connetUrl()
         {
-            WebClient wc = new WebClient();
-            wc.Encoding = Encoding.GetEncoding("utf-8");
-            byte[] ret = wc.UploadValues("http://183.250.143.56:8088/supplierBuildFile.aspx", "POST", new NameValueCollection());
-            string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
+            new Thread(new ThreadStart(delegate ()
+            {
+                WebClient wc = new WebClient();
+                wc.Encoding = Encoding.GetEncoding("utf-8");
+                byte[] ret = wc.UploadValues("http://183.250.143.56:8088/supplierBuildFile.aspx", "POST", new NameValueCollection());
+                string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
+            })).Start();
         }
 
         public static void addLog(string ctid, int userid, string con, int orderState = 0, int aftersaleState = 0)

Some files were not shown because too many files changed in this diff