zhuyiyi преди 8 месеца
родител
ревизия
759cba374c

+ 48 - 7
Web/EDelivery/js/DeliveredList.js

@@ -292,7 +292,11 @@ function actionRenderer(e) {
     html += getGridBtn("edit", "修改物流", "changeExpress('" + record.ctid + "')");
     html += getGridBtn("dis", "问题反馈", "setIssueContent('" + record.ctid + "')");
     if (!!record.attachments) {
-        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+        let url = record.attachments;
+        if (url.indexOf("http:") == -1 && url.indexOf("https:") == -1) {
+            url = "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + url;
+        }
+        html += getGridBtn("view", "下载附件", "downAtta('" + url + "')");
     }
     html += getGridBtn("word", "重新打单", "rePlaceOrder('" + record.ctid + "','" + record.seller_memo + "')");
 
@@ -315,13 +319,50 @@ function saveIssueFn() {
     });
 }
 function downAtta(url) {
-    if (!!url) {
-        const link = document.createElement('a');
-        link.href = url;
-        document.body.appendChild(link);
-        link.click();
-        document.body.removeChild(link);
+    var pdata = "url=" + url;
+
+    var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest实例
+    xhr.open('POST', "../plug/uploadFileOss.aspx"); // 打开下载文件请求
+    xhr.responseType = "blob";
+    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+    xhr.onloadstart = function () {
+    };
+    xhr.onprogress = function (event) {
+
+    };
+    xhr.onerror = function () {
+        progressHide();
     }
+    xhr.ontimeout = function () {
+        progressHide();
+    }
+    xhr.onloadend = function () {
+        if (xhr.status === 200) {
+            try {
+                let blob = xhr.response;
+                let fileName = xhr.getResponseHeader("Content-Disposition").split('filename=')[1];
+                fileName = decodeURIComponent(fileName);
+
+                let url = URL.createObjectURL(blob);
+                let a = document.createElement('a');
+                a.href = url;
+                a.download = fileName;
+                document.body.appendChild(a);
+                a.click();
+                document.body.removeChild(a);
+                window.URL.revokeObjectURL(url);
+            } catch (e) {
+                progressHide();
+            }
+
+
+        } else {
+
+        }
+        progressHide();
+
+    };
+    xhr.send(pdata); // 发送下载文件请求
 }
 
 function onBeforeOpen(e) {

+ 48 - 7
Web/EDelivery/js/PddDelivered.js

@@ -311,20 +311,61 @@ function actionRenderer(e) {
     html += getGridBtn("edit", "修改物流", "changeExpress('" + record.ctid + "')");
     html += getGridBtn("dis", "问题反馈", "setIssueContent('" + record.ctid + "')");
     if (!!record.attachments) {
-        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+        let url = record.attachments;
+        if (url.indexOf("http:") == -1 && url.indexOf("https:") == -1) {
+            url = "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + url;
+        }
+        html += getGridBtn("view", "下载附件", "downAtta('" + url + "')");
     }
     html += getGridBtn("word", "重新打单", "rePlaceOrder('" + record.ctid + "','" + record.seller_memo + "')");
     return html;
 }
 
 function downAtta(url) {
-    if (!!url) {
-        const link = document.createElement('a');
-        link.href = url;
-        document.body.appendChild(link);
-        link.click();
-        document.body.removeChild(link);
+    var pdata = "url=" + url;
+
+    var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest实例
+    xhr.open('POST', "../plug/uploadFileOss.aspx"); // 打开下载文件请求
+    xhr.responseType = "blob";
+    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+    xhr.onloadstart = function () {
+    };
+    xhr.onprogress = function (event) {
+
+    };
+    xhr.onerror = function () {
+        progressHide();
+    }
+    xhr.ontimeout = function () {
+        progressHide();
     }
+    xhr.onloadend = function () {
+        if (xhr.status === 200) {
+            try {
+                let blob = xhr.response;
+                let fileName = xhr.getResponseHeader("Content-Disposition").split('filename=')[1];
+                fileName = decodeURIComponent(fileName);
+
+                let url = URL.createObjectURL(blob);
+                let a = document.createElement('a');
+                a.href = url;
+                a.download = fileName;
+                document.body.appendChild(a);
+                a.click();
+                document.body.removeChild(a);
+                window.URL.revokeObjectURL(url);
+            } catch (e) {
+                progressHide();
+            }
+
+
+        } else {
+
+        }
+        progressHide();
+
+    };
+    xhr.send(pdata); // 发送下载文件请求
 }
 
 function onBeforeOpen(e) {

+ 48 - 7
Web/EDelivery/js/PddDelivering.js

@@ -182,7 +182,11 @@ function actionRenderer(e) {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
     if (!!record.attachments) {
-        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+        let url = record.attachments;
+        if (url.indexOf("http:") == -1 && url.indexOf("https:") == -1) {
+            url = "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + url;
+        }
+        html += getGridBtn("view", "下载附件", "downAtta('" + url + "')");
     }
     return html;
 }
@@ -218,13 +222,50 @@ function saveIssueFn() {
     });
 }
 function downAtta(url) {
-    if (!!url) {
-        const link = document.createElement('a');
-        link.href = url;
-        document.body.appendChild(link);
-        link.click();
-        document.body.removeChild(link);
+    var pdata = "url=" + url;
+
+    var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest实例
+    xhr.open('POST', "../plug/uploadFileOss.aspx"); // 打开下载文件请求
+    xhr.responseType = "blob";
+    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+    xhr.onloadstart = function () {
+    };
+    xhr.onprogress = function (event) {
+
+    };
+    xhr.onerror = function () {
+        progressHide();
+    }
+    xhr.ontimeout = function () {
+        progressHide();
     }
+    xhr.onloadend = function () {
+        if (xhr.status === 200) {
+            try {
+                let blob = xhr.response;
+                let fileName = xhr.getResponseHeader("Content-Disposition").split('filename=')[1];
+                fileName = decodeURIComponent(fileName);
+
+                let url = URL.createObjectURL(blob);
+                let a = document.createElement('a');
+                a.href = url;
+                a.download = fileName;
+                document.body.appendChild(a);
+                a.click();
+                document.body.removeChild(a);
+                window.URL.revokeObjectURL(url);
+            } catch (e) {
+                progressHide();
+            }
+
+
+        } else {
+
+        }
+        progressHide();
+
+    };
+    xhr.send(pdata); // 发送下载文件请求
 }
 //function ImgRenderer(e) {
 //    var record = e.record;

+ 48 - 7
Web/EDelivery/js/WaitingDelivery.js

@@ -155,7 +155,11 @@ function actionRenderer(e) {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
     if (!!record.attachments) {
-        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+        let url = record.attachments;
+        if (url.indexOf("http:") == -1 && url.indexOf("https:") == -1) {
+            url = "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + url;
+        }
+        html += getGridBtn("view", "下载附件", "downAtta('" + url + "')");
     }
     return html;
 }
@@ -175,13 +179,50 @@ function viewCdrImg(id) {
 }
 
 function downAtta(url) {
-    if (!!url) {
-        const link = document.createElement('a');
-        link.href = url;
-        document.body.appendChild(link);
-        link.click();
-        document.body.removeChild(link);
+    var pdata = "url=" + url;
+
+    var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest实例
+    xhr.open('POST', "../plug/uploadFileOss.aspx"); // 打开下载文件请求
+    xhr.responseType = "blob";
+    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+    xhr.onloadstart = function () {
+    };
+    xhr.onprogress = function (event) {
+
+    };
+    xhr.onerror = function () {
+        progressHide();
+    }
+    xhr.ontimeout = function () {
+        progressHide();
     }
+    xhr.onloadend = function () {
+        if (xhr.status === 200) {
+            try {
+                let blob = xhr.response;
+                let fileName = xhr.getResponseHeader("Content-Disposition").split('filename=')[1];
+                fileName = decodeURIComponent(fileName);
+
+                let url = URL.createObjectURL(blob);
+                let a = document.createElement('a');
+                a.href = url;
+                a.download = fileName;
+                document.body.appendChild(a);
+                a.click();
+                document.body.removeChild(a);
+                window.URL.revokeObjectURL(url);
+            } catch (e) {
+                progressHide();
+            }
+
+
+        } else {
+
+        }
+        progressHide();
+
+    };
+    xhr.send(pdata); // 发送下载文件请求
 }
 //function ImgRenderer(e) {
 //    var record = e.record;

+ 1 - 1
Web/EDelivery/js/pddPrintBill.js

@@ -456,7 +456,7 @@ function sendPrintData(iTag) {
     let vend_list = supperIds == null ? [] : supperIds.split(",");
     //console.log("start" + billOrderList.length);
     var item = billOrderList[iTag];
-    let suppiers = ["64"];
+    let suppiers = [];
     let intersection = vend_list.length == 0 ? [] : suppiers.filter(function (v) { return vend_list.indexOf(v) > -1 });
     if (intersection.length == 0) {
         checkOrderSplit(item, iTag)

+ 1 - 1
Web/EDelivery/js/printBill.js

@@ -444,7 +444,7 @@ function sendPrintData(iTag) {
     let vend_list = supperIds == null ? [] : supperIds.split(",");
     //console.log("start" + billOrderList.length);
     var item = billOrderList[iTag];
-    let suppiers = ["64"];
+    let suppiers = [];
     let intersection = vend_list.length == 0 ? [] : suppiers.filter(function (v) { return vend_list.indexOf(v) > -1 });
     if (intersection.length == 0) {
         checkOrderSplit(item, iTag);

+ 2 - 1
ecomServer/MainForm.cs

@@ -813,8 +813,9 @@ namespace ErpServer
                                     {
                                         continue;
                                     }
+                                    int[] uv_productIds = new int[] { 14, 43, 2487, 2531, 2654, 2656 };
                                     //指定店铺老客户和指定店铺单价500以上分给指定部门
-                                    if ((IsOldCustomer == "1" && userId == 241) || (userId == 241 && Convert.ToDouble(dr["payment"]) >= 500))
+                                    if (!uv_productIds.Contains(ProductId) && ((IsOldCustomer == "1" && userId == 241) || (userId == 241 && Convert.ToDouble(dr["payment"]) >= 500)))
                                     {
                                         //手绘   logo  画册 海报  宣传单
                                         if ((IsOldCustomer == "1" && (ProductId == 28 || ProductId == 57 || ProductId == 40 || ProductId == 4 || ProductId == 13)))