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