zhuyiyi 9 kuukautta sitten
vanhempi
sitoutus
c18adda381

+ 4 - 0
BizCom/Dao/CeErpExpressInfo.cs

@@ -207,6 +207,10 @@ namespace BizCom
         {
             return FindFirst(Expression.Eq("tid", ctid));
         }
+        public static CeErpExpressInfo GetByExpress(string express)
+        {
+            return FindFirst(Expression.Eq("out_sid", express));
+        }
 
         public static void Del(object id)
         {

+ 16 - 2
SiteCore/Handler/sync.order.cs

@@ -5441,7 +5441,7 @@ namespace SiteCore.Handler
             }
             else
             {
-                lw.Add(string.Format("datediff(d,pay_time,getdate())<=92 "));
+                lw.Add(string.Format("datediff(d,pay_time,getdate())<=61 "));
             }
 
             string posTag = CurrentUser.UserPost.Post.Code;
@@ -13457,7 +13457,7 @@ namespace SiteCore.Handler
                     string outSid = ceErpTradeCell.OutSid;
                     if (outSid.Length > 0)
                     {
-                        string sql = string.Format("SELECT * FROM [dbo].[CE_ErpExpressInfo] WHERE (out_sid in ({0}) or tid = '{1}')  and  ISNULL(DATALENGTH(postData), 0)>0;", "'" + outSid.Replace(",", "','") + "'", ceErpTradeCell.tid);
+                        string sql = string.Format("SELECT out_sid FROM [dbo].[CE_ErpExpressInfo] WHERE (out_sid in ({0}) or tid = '{1}')  and  ISNULL(DATALENGTH(postData), 0)>0;", "'" + outSid.Replace(",", "','") + "'", ceErpTradeCell.tid);
                         DataTable dt = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
                         ReturnSuccess("{" + string.Format("\"data\":{0}", Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)) + "}");
                         return;
@@ -13468,6 +13468,20 @@ namespace SiteCore.Handler
             }
             returnErrorMsg("缺少必要的参数");
         }
+        public void getExpressPostData()
+        {
+            string express = GetPostString("express");
+            if (!string.IsNullOrEmpty(express))
+            {
+                CeErpExpressInfo ceErpExpressInfo = CeErpExpressInfo.GetByExpress(express);
+                if (ceErpExpressInfo != null)
+                {
+                    ReturnSuccess("{" + string.Format("\"data\":{0}", ceErpExpressInfo.postData) + "}");
+                    return;
+                }
+            }
+            returnErrorMsg("缺少必要的参数");
+        }
     }
 
 }

+ 8 - 1
Web/EAfterSale/js/WaitingVerify.js

@@ -217,6 +217,7 @@ function actionRenderer(e) {
             html += getGridBtn("sc", "不认可", "verifyNo('" + record.ID + "')");
         }
     }
+    //html += getGridBtn("sc", "推", "aftersaleCytSend('" + record.ctid + "')");
     if (record.AfterSaleSupplierState == 2) {
         html += ("<div>原因:" + record.AfterSaleSupplierMemo + "</div>");
     }
@@ -241,7 +242,13 @@ function supplierStateRenderer(e) {
 
     return html;
 }
-
+function aftersaleCytSend(ctid) {
+    var parms = new Object();
+    parms.ctid = ctid;
+    postAjax("aftersaleCytSend", parms, function (data) {
+        resultShow(data, "grid.reload();");
+    });
+}
 function verifyYes(ctid) {
     if (!confirm("确认认可吗?")) return;
     var parms = new Object();

+ 36 - 0
Web/EDelivery/js/DeliveredList.js

@@ -293,6 +293,7 @@ function actionRenderer(e) {
     if (!!record.attachments) {
         html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
     }
+    html += getGridBtn("word", "重新打单", "rePlaceOrder('" + record.ctid + "','" + record.seller_memo + "')");
 
     return html;
 }
@@ -384,4 +385,39 @@ function changeDeliveryRenderer(e) {
     var html = "<div>" + record.modExpressCom + "</div>";
     html += "<div>" + record.modExpressNo + "</div>";
     return html;
+}
+function rePlaceOrder(ctid, seller_memo) {
+    postAjax("getExpressInfo", { ctid, }, function (data) {
+        console.log(data);
+        let html = "";
+        let tableHtml = "";
+        let result = data.data;
+        if (result.length > 0) {
+            html = ""
+            for (let i = 0; i < result.length; i++) {
+                let item = result[i];
+                tableHtml += `<tr>   
+                    <td>${item.out_sid}</td>
+                    <td><div style="cursor: pointer;" onclick="printPlace('${item.out_sid}','${seller_memo}')">打印</div></td>
+                </tr>`
+            }
+            html = `<div style="font-size: 20px;row-gap: 10px;display: flex;flex-direction: column;"><table border="1">${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: [],
+            html,
+        })
+    });
+}
+
+function printPlace(out_sid, seller_memo) {
+    if (!confirm("确认重新打单?")) return;
+    postAjax("getExpressPostData", { express: out_sid, }, function (data) {
+        doPrintEn(JSON.stringify(data.data), seller_memo)
+    })
 }

+ 36 - 0
Web/EDelivery/js/PddDelivered.js

@@ -312,6 +312,7 @@ function actionRenderer(e) {
     if (!!record.attachments) {
         html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
     }
+    html += getGridBtn("word", "重新打单", "rePlaceOrder('" + record.ctid + "','" + record.seller_memo + "')");
     return html;
 }
 
@@ -381,4 +382,39 @@ function changeDeliveryRenderer(e) {
     var html = "<div>" + record.modExpressCom + "</div>";
     html += "<div>" + record.modExpressNo + "</div>";
     return html;
+}
+function rePlaceOrder(ctid, seller_memo) {
+    postAjax("getExpressInfo", { ctid, }, function (data) {
+        console.log(data);
+        let html = "";
+        let tableHtml = "";
+        let result = data.data;
+        if (result.length > 0) {
+            html = ""
+            for (let i = 0; i < result.length; i++) {
+                let item = result[i];
+                tableHtml += `<tr>   
+                    <td>${item.out_sid}</td>
+                    <td><div style="cursor: pointer;" onclick="printPlace('${item.out_sid}','${seller_memo}')">打印</div></td>
+                </tr>`
+            }
+            html = `<div style="font-size: 20px;row-gap: 10px;display: flex;flex-direction: column;"><table border="1">${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: [],
+            html,
+        })
+    });
+}
+
+function printPlace(out_sid, seller_memo) {
+    if (!confirm("确认重新打单?")) return;
+    postAjax("getExpressPostData", { express: out_sid, }, function (data) {
+        doPrintEn(JSON.stringify(data.data), seller_memo)
+    })
 }

+ 3 - 3
Web/EOrder/OrderList.aspx

@@ -900,7 +900,7 @@
         document.getElementById('address_file').addEventListener('change', function (e) {
             const file = e.target?.files[0];
             const reader = new FileReader();
-            reader.onload = function (option) {
+            /*reader.onload = function (option) {
                 const data = new Uint8Array(option.target.result);
                 const workbook = XLSX.read(data, { type: 'array' });
                 const sheetName = workbook.SheetNames[0]; // 获取第一个工作表的名称
@@ -923,8 +923,8 @@
                     resultShow("请上传正确的文件");
                 }
             };
-            reader.readAsArrayBuffer(file);
-            // putObject(data);1111122222333338930
+            reader.readAsArrayBuffer(file);*/
+            putObject(file);
         });
 
         let uploaderAddressTid = "";