zhuyiyi 8 ヶ月 前
コミット
a8fefb224b

+ 7 - 4
SiteCore/Handler/sync.order.cs

@@ -117,7 +117,11 @@ namespace SiteCore.Handler
             {
                 if (tid.Length > 0)
                 {
-
+                    CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCode(tid);
+                    if (ceErpTradeCell != null)
+                    {
+                        tid = ceErpTradeCell.tid;
+                    }
                     List<string> select_tid = getTidByCtidMore(tid);
 
                     lw.Add(string.Format("tid in ({0})", string.Join(",", select_tid)));
@@ -13293,7 +13297,7 @@ namespace SiteCore.Handler
                                 if (dr["ctid"].ToString().Equals(row["ctid"].ToString()))
                                 {
                                     dr["dstate"] = 2;
-                                    //dr["default"] = 1;
+                                    dr["default"] = 1;
                                     dr["dnumber"] = Convert.ToInt32(row["markNumber"]);
                                 }
 
@@ -13301,7 +13305,7 @@ namespace SiteCore.Handler
                             if (eid.Equals(dr["ctid"].ToString()))
                             {
                                 dr["dstate"] = 1;
-                                //dr["default"] = 1;
+                                dr["default"] = 1;
                             }
 
                         }
@@ -13334,7 +13338,6 @@ namespace SiteCore.Handler
             try
             {
                 dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
-                return dt;
                 StringBuilder timerSql = new StringBuilder();
                 timerSql.AppendFormat("SELECT * FROM CE_ErpSupplierProductTime WHERE supplierId={0}", entity.SupplierId);
                 DataTable timerTable = DbHelper.DbConn.ExecuteDataset(timerSql.ToString()).Tables[0];

+ 2 - 0
Web/EDelivery/PddDelivering.aspx

@@ -1,6 +1,8 @@
 <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/ErpView.master" AutoEventWireup="true" CodeFile="PddDelivering.aspx.cs" Inherits="EDelivery_PddDelivering" %>
 
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
+        <link href="../css/imgbox.css" rel="stylesheet" />
+    <script src="../js/imgbox-1.0.3.js"></script>
     <script type="text/javascript" src="js/pddPrintBill.js"></script>
     <script type="text/javascript" src="js/PddDelivering.js?v=<%=SiteVer %>"></script>
 

+ 2 - 0
Web/EDelivery/WaitingDelivery.aspx

@@ -1,6 +1,8 @@
 <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/ErpView.master" AutoEventWireup="true" CodeFile="WaitingDelivery.aspx.cs" Inherits="EDelivery_WaitingDelivery" %>
 
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
+    <link href="../css/imgbox.css" rel="stylesheet" />
+    <script src="../js/imgbox-1.0.3.js"></script>
     <script type="text/javascript" src="js/printBill.js"></script>
     <script type="text/javascript" src="js/WaitingDelivery.js?v=<%=SiteVer %>"></script>
 

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

@@ -176,6 +176,7 @@ function actionRenderer(e) {
     html += getGridBtn("dis", "发货", "deliveryFn('" + ctid + "','" + record.seller_nick + "')");
     html += getGridBtn("dis", "标记已发", "setBuchaDelivery('" + ctid + "')");
     html += getGridBtn("dis", "问题反馈", "setIssueContent('" + ctid + "')");
+    html += getGridBtn("view", "预览文件", "viewCdrImg('" + ctid + "')");
     if (userPostCode != "Supplier") {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
@@ -184,6 +185,21 @@ function actionRenderer(e) {
     }
     return html;
 }
+
+function viewCdrImg(id) {
+    var rec = grid.getSelected();
+    if (rec.OrderState < 5) {
+        mini.alert("还没有上传文件,没有图片");
+        return;
+    }
+    var finish = formatCommonDate(rec.FinishDesignTime);
+    var yearmonth = finish.substring(0, 7);
+    var monthUrl = yearmonth.replace("/", "");
+    var url = cdrImgUrl + "/" + monthUrl + "/" + rec.seller_memo + ".png";
+    const img = YYZIMG.show(url)
+    //mini.get("viewimg_win").show();
+    //$("#r_img").attr("src", url);
+}
 function canceIssueFn() {
     mini.get("issue_win").hide();
 }

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

@@ -149,6 +149,7 @@ function actionRenderer(e) {
     html += getGridBtn("dis", "发货", "deliveryFn('" + ctid + "','" + record.seller_nick + "')");
     html += getGridBtn("dis", "标记已发", "setBuchaDelivery('" + ctid + "')");
     html += getGridBtn("dis", "问题反馈", "setIssueContent('" + ctid + "')");
+    html += getGridBtn("view", "预览文件", "viewCdrImg('" + ctid + "')");
     if (userPostCode != "Supplier") {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
@@ -157,6 +158,20 @@ function actionRenderer(e) {
     }
     return html;
 }
+function viewCdrImg(id) {
+    var rec = grid.getSelected();
+    if (rec.OrderState < 5) {
+        mini.alert("还没有上传文件,没有图片");
+        return;
+    }
+    var finish = formatCommonDate(rec.FinishDesignTime);
+    var yearmonth = finish.substring(0, 7);
+    var monthUrl = yearmonth.replace("/", "");
+    var url = cdrImgUrl + "/" + monthUrl + "/" + rec.seller_memo + ".png";
+    const img = YYZIMG.show(url)
+    //mini.get("viewimg_win").show();
+    //$("#r_img").attr("src", url);
+}
 
 function downAtta(url) {
     if (!!url) {

+ 27 - 4
Web/EDelivery/js/pddPrintBill.js

@@ -421,11 +421,14 @@ function onBillComChanged(e) {
 function onBillPrinterChanged(e) {
     doSetPrintConfig(mini.get("txtBillPrinter").getText());
 }
-
+let printIng = false;
 function saveWaybillFn() {
     //var url = "http://d3.diansan.com/d3/open/print/express/index.html?waybillCodeList=YT5608493119031&templateId=1&requestId=1909374336748825642&sourceType=THIRD_ORDER";
     //openWaiWin("打印面单", url, 900, 700, null);
     //return;
+    if (printIng) {
+        return;
+    }
     mini.get("id_saveWaybillBtn").disable();
     //mini.get("id_sysWaybillBtn").disable();
     IsPrintOrderList = [];
@@ -437,6 +440,7 @@ function saveWaybillFn() {
     console.log(billOrderList);
 
     progressShow("电子面单打印中...进度:1");
+    printIng = true;
     sendPrintData(0);
 
 }
@@ -467,7 +471,7 @@ function sendPrintData(iTag) {
 
 }
 
-function doRealGetPrintData(item, iTag, isTogether = 0) {
+function doRealGetPrintData(item, iTag, isTogether = 0, ctids = "") {
     var ctid = item.ctid;
     var cpcode = mini.get("txtBillCom").getValue();
     var cpname = mini.get("txtBillCom").getText();
@@ -481,6 +485,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
     parms.cpcode = cpcode;
     parms.cpname = cpname;
     parms.together = isTogether;
+    parms.ctids = ctids;
     $("#progressShowDiv").html("电子面单打印中...进度:" + (iTag + 1));
     postAjaxSync("set_erp_printwaybill", parms, function (data) {
         //console.log("back" + billOrderList.length);
@@ -521,6 +526,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
             //mini.get("id_sysWaybillBtn").enable();
             mini.get("waybill_win").hide();
             progressHide();
+            printIng = false;
             if (errorMsg != "") {
                 mini.alert(errorMsg);
             }
@@ -586,7 +592,8 @@ function checkOrderSplit(item, iTag) {
                     let item = data.data[i];
                     let sf = "";
                     let stateStr = "";
-
+                    let ischeck = false;
+                    let isRead = false;
                     if (item.IsSF == 1) {
                         sf = "顺丰寄付";
                     } else if (item.IsSF == 2) {
@@ -597,11 +604,20 @@ function checkOrderSplit(item, iTag) {
                     } else if (item.dstate == 1) {
                         stateStr = "此件";
                         mome = item.seller_memo;
+                        ischeck = true;
                     } else if (item.dstate == 2) {
                         stateStr = "等待中";
                         isNumber = true;
+                        ischeck = true;
+                    }
+                    if (item.default == 1) {
+                        ischeck = true;
+                        isRead = true;
                     }
+                    let inputCheck = `<input type="checkbox" name="ctids" value="${item.ctid}" ${ischeck ? "checked" : ""} ${isRead ? "onclick='return false;'" : ""}/>`;
+
                     tableHtml += `<tr>
+                    <td>${inputCheck}</td>
                     <td>${item.ctid}</td>
                     <td>${sf}</td>
                     <td style="width:600px">${item.seller_memo}</td>
@@ -616,6 +632,7 @@ function checkOrderSplit(item, iTag) {
                 <div>${mome}</div>
                 <table border="1">
                   <tr>
+                    <th></th>
                     <th>订单编号</th>
                     <th>是否顺丰</th>
                     <th style="width:600px">备注</th>
@@ -638,7 +655,11 @@ function checkOrderSplit(item, iTag) {
                     callback: function (action) {
 
                         if (action == "合并打单") {
-                            doRealGetPrintData(item, iTag, 2);
+                            let ctids_list = [];
+                            $("input[name='ctids']:checked").each(function () {
+                                ctids_list.push($(this).val());
+                            });
+                            doRealGetPrintData(item, iTag, 2, ctids_list.join(","));
                         }
                         else if (action == "取消打印") {
                             mini.get("id_saveWaybillBtn").enable();
@@ -665,6 +686,7 @@ function checkOrderSplit(item, iTag) {
 
         }
         progressHide();
+        printIng = false;
         mini.get("id_saveWaybillBtn").enable();
     })
 }
@@ -766,6 +788,7 @@ function sendPrintDataEN(iTag) {
             localStorage.setItem("waybill_printer_CN", mini.get("txtBillPrinter_CN").getText());
             grid.reload();
             progressHide();
+            printIng = false;
             mini.get("waybill_win_CN").hide();
             if (errorMsg.length > 0) {
                 mini.alert(errorMsg);

+ 26 - 4
Web/EDelivery/js/printBill.js

@@ -410,11 +410,14 @@ function onBillComChanged(e) {
 function onBillPrinterChanged(e) {
     doSetPrintConfig(mini.get("txtBillPrinter").getText());
 }
-
+let printIng = false;
 function saveWaybillFn() {
     //var url = "http://d3.diansan.com/d3/open/print/express/index.html?waybillCodeList=YT5608493119031&templateId=1&requestId=1909374336748825642&sourceType=THIRD_ORDER";
     //openWaiWin("打印面单", url, 900, 700, null);
     //return;
+    if (printIng) {
+        return;
+    }
     mini.get("id_saveWaybillBtn").disable();
     //mini.get("id_sysWaybillBtn").disable();
     IsPrintOrderList = [];
@@ -425,6 +428,7 @@ function saveWaybillFn() {
     if (billOrderList.length <= 0) return;
 
     progressShow("电子面单打印中...进度:1");
+    printIng = true;
     sendPrintData(0);
 
 }
@@ -455,7 +459,7 @@ function sendPrintData(iTag) {
 
 }
 //获取面单
-function doRealGetPrintData(item, iTag, isTogether = 0) {
+function doRealGetPrintData(item, iTag, isTogether = 0, ctids = "") {
     var ctid = item.ctid;
     var cpcode = mini.get("txtBillCom").getValue();
     var cpname = mini.get("txtBillCom").getText();
@@ -469,6 +473,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
     parms.cpcode = cpcode;
     parms.cpname = cpname;
     parms.together = isTogether;
+    parms.ctids = ctids;
     $("#progressShowDiv").html("电子面单打印中...进度:" + (iTag + 1));
     postAjaxSync("set_erp_printwaybill", parms, function (data) {
         //console.log("back" + billOrderList.length);
@@ -510,6 +515,7 @@ function doRealGetPrintData(item, iTag, isTogether = 0) {
             //mini.get("id_sysWaybillBtn").enable();
             mini.get("waybill_win").hide();
             progressHide();
+            printIng = false;
             if (errorMsg != "") {
                 mini.alert(errorMsg);
             }
@@ -575,7 +581,8 @@ function checkOrderSplit(item, iTag) {
                     let item = data.data[i];
                     let sf = "";
                     let stateStr = "";
-
+                    let ischeck = false;
+                    let isRead = false;
                     if (item.IsSF == 1) {
                         sf = "顺丰寄付";
                     } else if (item.IsSF == 2) {
@@ -587,11 +594,19 @@ function checkOrderSplit(item, iTag) {
                     } else if (item.dstate == 1) {
                         stateStr = "此件";
                         mome = item.seller_memo;
+                        ischeck = true;
                     } else if (item.dstate == 2) {
                         stateStr = "等待中";
                         isNumber = true;
+                        ischeck = true;
+                    }
+                    if (item.default == 1) {
+                        ischeck = true;
+                        isRead = true;
                     }
+                    let inputCheck = `<input type="checkbox" name="ctids" value="${item.ctid}" ${ischeck ? "checked" : ""} ${isRead ? "onclick='return false;'" : ""}/>`;
                     tableHtml += `<tr>
+                    <td>${inputCheck}</td>
                     <td>${item.ctid}</td>
                     <td>${sf}</td>
                     <td style="width:600px">${item.seller_memo}</td>
@@ -606,6 +621,7 @@ function checkOrderSplit(item, iTag) {
                 <div>${mome}</div>
                 <table border="1">
                   <tr>
+                    <th></th>
                     <th>订单编号</th>
                     <th>是否顺丰</th>
                     <th style="width:600px">备注</th>
@@ -629,7 +645,11 @@ function checkOrderSplit(item, iTag) {
                     callback: function (action) {
 
                         if (action == "合并打单") {
-                            doRealGetPrintData(item, iTag, 2);
+                            let ctids_list = [];
+                            $("input[name='ctids']:checked").each(function () {
+                                ctids_list.push($(this).val());
+                            });
+                            doRealGetPrintData(item, iTag, 2, ctids_list.join(","));
                         }
                         else if (action == "取消打印") {
                             mini.get("id_saveWaybillBtn").enable();
@@ -656,6 +676,7 @@ function checkOrderSplit(item, iTag) {
 
         }
         progressHide();
+        printIng = false;
         mini.get("id_saveWaybillBtn").enable();
     })
 }
@@ -756,6 +777,7 @@ function sendPrintDataEN(iTag) {
             localStorage.setItem("waybill_printer_CN", mini.get("txtBillPrinter_CN").getText());
             grid.reload();
             progressHide();
+            printIng = false;
             mini.get("waybill_win_CN").hide();
             if (errorMsg.length > 0) {
                 mini.alert(errorMsg);