Commit 5cec7645 authored by liuyanfang's avatar liuyanfang

将查询的订单都返回

parent 691ba89e
{ {
"name": "菜芽-自动约单", "name": "菜芽-自动约单",
"version": "1.0.0", "version": "1.0.5",
"description": "辅助手机壳厂家打印发货易的快递单", "description": "辅助手机壳厂家打印发货易的快递单",
"manifest_version": 2, "manifest_version": 2,
......
This diff is collapsed.
...@@ -83,6 +83,7 @@ async function booking(wayCompanyId: string, orderNo: string,fhy_type:Number) { ...@@ -83,6 +83,7 @@ async function booking(wayCompanyId: string, orderNo: string,fhy_type:Number) {
let rowObject = { let rowObject = {
info: rowInfo, info: rowInfo,
msg: rowResult, msg: rowResult,
orderNo,
success: 1, success: 1,
} }
rowResultList.push(rowResult) rowResultList.push(rowResult)
...@@ -130,6 +131,7 @@ async function booking(wayCompanyId: string, orderNo: string,fhy_type:Number) { ...@@ -130,6 +131,7 @@ async function booking(wayCompanyId: string, orderNo: string,fhy_type:Number) {
result.msg = "未匹配快递单模板"; result.msg = "未匹配快递单模板";
result.status = 3; result.status = 3;
result.data=printError
return result; return result;
} }
...@@ -141,7 +143,7 @@ async function waitOrder() { ...@@ -141,7 +143,7 @@ async function waitOrder() {
msg: "获取订单超时", msg: "获取订单超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
if (domEle.checkBoxSelectAll.checked != true) { if (domEle.checkBoxSelectAll.checked != true) {
...@@ -165,7 +167,7 @@ async function waitDialog() { ...@@ -165,7 +167,7 @@ async function waitDialog() {
msg: "获取打印按钮超时", msg: "获取打印按钮超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
if (domEle.btnDialogPrint.disabled == false) { if (domEle.btnDialogPrint.disabled == false) {
result.status = 0; result.status = 0;
...@@ -182,7 +184,7 @@ async function waitPrintResult() { ...@@ -182,7 +184,7 @@ async function waitPrintResult() {
msg: "获取打印结果超时", msg: "获取打印结果超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
if (domEle.modalResult.className == 'modal fade sui-modal none in') { if (domEle.modalResult.className == 'modal fade sui-modal none in') {
result.status = 0; result.status = 0;
......
...@@ -34,6 +34,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -34,6 +34,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
msg: "未找到店铺", msg: "未找到店铺",
data: [], data: [],
} }
let printError: any = orderNo
for(let navIter=0;navIter<domEle.divNav.length;navIter++){ for(let navIter=0;navIter<domEle.divNav.length;navIter++){
let aNav = domEle.divNav[navIter] as HTMLLinkElement; let aNav = domEle.divNav[navIter] as HTMLLinkElement;
...@@ -48,10 +49,12 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -48,10 +49,12 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
} }
if (result.status > 0) { if (result.status > 0) {
result.data=printError
return result; return result;
} }
result = await waitOrder(); result = await waitOrder();
if (result.status > 0) { if (result.status > 0) {
result.data=printError
return result; return result;
} }
changeReactInputValue(document.querySelector(domEle.inputOrderId),orderNo) changeReactInputValue(document.querySelector(domEle.inputOrderId),orderNo)
...@@ -60,6 +63,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -60,6 +63,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
simulateMouseClick(document.querySelector(domEle.btnSearch)); simulateMouseClick(document.querySelector(domEle.btnSearch));
result = await waitOrder(); result = await waitOrder();
if (result.status > 0) { if (result.status > 0) {
result.data=printError
return result; return result;
} }
...@@ -75,6 +79,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -75,6 +79,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
result = await waitDialog(); result = await waitDialog();
if (result.status > 0) { if (result.status > 0) {
result.data=printError
return result; return result;
} }
...@@ -95,6 +100,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -95,6 +100,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
if(!domEle.inputWaybillNoOnly().checked ){ if(!domEle.inputWaybillNoOnly().checked ){
result.status=5; result.status=5;
result.msg="未选择仅获取电子面单"; result.msg="未选择仅获取电子面单";
result.data=printError
return result; return result;
} }
...@@ -118,6 +124,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -118,6 +124,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
let rowObject = { let rowObject = {
info: rowInfo, info: rowInfo,
msg: rowResult, msg: rowResult,
orderNo,
success: 1, success: 1,
} }
rowResultList.push(rowResultHTML) rowResultList.push(rowResultHTML)
...@@ -183,7 +190,7 @@ async function waitOrder() { ...@@ -183,7 +190,7 @@ async function waitOrder() {
msg: "获取订单超时", msg: "获取订单超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
let loadingMask = document.querySelector("#root > section > main > div > div > div > div.order-main > div.order-table-container > div.loading-mark-container > div") as any; let loadingMask = document.querySelector("#root > section > main > div > div > div > div.order-main > div.order-table-container > div.loading-mark-container > div") as any;
...@@ -209,7 +216,7 @@ async function waitDialog() { ...@@ -209,7 +216,7 @@ async function waitDialog() {
msg: "获取打印按钮超时", msg: "获取打印按钮超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
if (document.getElementsByClassName("ant-modal-content").length) { if (document.getElementsByClassName("ant-modal-content").length) {
...@@ -227,7 +234,7 @@ async function waitPrintResult() { ...@@ -227,7 +234,7 @@ async function waitPrintResult() {
msg: "获取打印结果超时", msg: "获取打印结果超时",
data: [], data: [],
} }
for (let i = 0; i < 10; i++) { for (let i = 0; i < 30; i++) {
await delayDate(1000); await delayDate(1000);
if (domEle.tableResult()) { if (domEle.tableResult()) {
result.status = 0; result.status = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment