|
@@ -810,105 +810,97 @@ const clickNewbiePrint = (row) => {
|
|
|
request.task.preview = false;
|
|
|
request.task.printer = printer;
|
|
|
let documents = [];
|
|
|
- let list = [
|
|
|
- {
|
|
|
- data: {
|
|
|
- _dataFrom: "waybill",
|
|
|
- _page_config: {
|
|
|
- REQUEST_LAYERED_IMAGE: false,
|
|
|
- },
|
|
|
- adsInfo: {
|
|
|
- adId: "3",
|
|
|
- advertisementType: "PSA",
|
|
|
- bannerUrl: "https://ad-cdn.cainiao.com/img/3/1672122736541.png",
|
|
|
- miniBannerUrl: "https://ad-cdn.cainiao.com/img/3/1672122733813.png",
|
|
|
- useCustomArea: false,
|
|
|
- },
|
|
|
- cpCode: "STO",
|
|
|
- extraInfo: {},
|
|
|
- needEncrypt: false,
|
|
|
- orderChannelsType: "OTHERS",
|
|
|
- packageInfo: {
|
|
|
- items: [
|
|
|
- {
|
|
|
- count: 2,
|
|
|
- name: "TPE双层(61*0.6cm):183*61*0.6体位线款,紫罗兰Y07+浅紫Y11",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- parent: false,
|
|
|
- recipient: {
|
|
|
- address: {
|
|
|
- detail: "1",
|
|
|
- province: "广东",
|
|
|
+ let res = {
|
|
|
+ data: {
|
|
|
+ _dataFrom: "waybill",
|
|
|
+ _page_config: {
|
|
|
+ REQUEST_LAYERED_IMAGE: false,
|
|
|
+ },
|
|
|
+ adsInfo: {
|
|
|
+ adId: "3",
|
|
|
+ advertisementType: "PSA",
|
|
|
+ bannerUrl: "https://ad-cdn.cainiao.com/img/3/1672122736541.png",
|
|
|
+ miniBannerUrl: "https://ad-cdn.cainiao.com/img/3/1672122733813.png",
|
|
|
+ useCustomArea: false,
|
|
|
+ },
|
|
|
+ cpCode: "STO",
|
|
|
+ extraInfo: {},
|
|
|
+ needEncrypt: false,
|
|
|
+ orderChannelsType: "OTHERS",
|
|
|
+ packageInfo: {
|
|
|
+ items: [
|
|
|
+ {
|
|
|
+ count: 2,
|
|
|
+ name: "TPE双层(61*0.6cm):183*61*0.6体位线款,紫罗兰Y07+浅紫Y11",
|
|
|
},
|
|
|
- mobile: "1",
|
|
|
- name: "江美娟",
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ parent: false,
|
|
|
+ recipient: {
|
|
|
+ address: {
|
|
|
+ detail: "1",
|
|
|
+ province: "广东",
|
|
|
},
|
|
|
- routingExtraInfo: {},
|
|
|
- routingInfo: {
|
|
|
- consolidation: {
|
|
|
- name: "东莞中转包",
|
|
|
- },
|
|
|
- origin: {
|
|
|
- code: "350300",
|
|
|
- name: "福建福清公司",
|
|
|
- },
|
|
|
- receiveBranch: {},
|
|
|
- sortation: {
|
|
|
- name: "651",
|
|
|
- },
|
|
|
- startCenter: {},
|
|
|
- terminalCenter: {},
|
|
|
+ mobile: "1",
|
|
|
+ name: "江美娟",
|
|
|
+ },
|
|
|
+ routingExtraInfo: {},
|
|
|
+ routingInfo: {
|
|
|
+ consolidation: {
|
|
|
+ name: "东莞中转包",
|
|
|
},
|
|
|
- sender: {
|
|
|
- address: {
|
|
|
- city: "福州市",
|
|
|
- detail: "三山镇横坑村金园路18号胜德体育工厂",
|
|
|
- district: "福清市",
|
|
|
- province: "福建省",
|
|
|
- },
|
|
|
- mobile: "15960106051",
|
|
|
- name: "陈云钦",
|
|
|
- phone: "15960106051",
|
|
|
+ origin: {
|
|
|
+ code: "350300",
|
|
|
+ name: "福建福清公司",
|
|
|
+ },
|
|
|
+ receiveBranch: {},
|
|
|
+ sortation: {
|
|
|
+ name: "651",
|
|
|
},
|
|
|
- shippingOption: {
|
|
|
- code: "STANDARD_EXPRESS",
|
|
|
- title: "标准快递",
|
|
|
+ startCenter: {},
|
|
|
+ terminalCenter: {},
|
|
|
+ },
|
|
|
+ sender: {
|
|
|
+ address: {
|
|
|
+ city: "福州市",
|
|
|
+ detail: "三山镇横坑村金园路18号胜德体育工厂",
|
|
|
+ district: "福清市",
|
|
|
+ province: "福建省",
|
|
|
},
|
|
|
- waybillCode: "773247793496332",
|
|
|
+ mobile: "15960106051",
|
|
|
+ name: "陈云钦",
|
|
|
+ phone: "15960106051",
|
|
|
+ },
|
|
|
+ shippingOption: {
|
|
|
+ code: "STANDARD_EXPRESS",
|
|
|
+ title: "标准快递",
|
|
|
},
|
|
|
- signature: "MD:tNcEbtbMMHggDlx907LitQ==",
|
|
|
- templateURL: "https://cloudprint.cainiao.com/template/standard/288948/66",
|
|
|
- ver: "waybill_print_secret_version_1",
|
|
|
- detail: "TPE双层(61*0.6cm):183*61*0.6体位线款,紫罗兰Y07+浅紫Y11*2",
|
|
|
- customTemplateUrl: "https://cloudprint.cainiao.com/template/customArea/23578994/1",
|
|
|
+ waybillCode: "773247793496332",
|
|
|
},
|
|
|
- ];
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- if (list[i].packingList && list[i].packingList.length > 0) {
|
|
|
- for (let j = 0; j < list[i].packingList.length; j++) {
|
|
|
- if (list[i].packingList[j].detail || list[i].packingList[j].customTemplateUrl) {
|
|
|
- documents.push({
|
|
|
- documentID: list[i].packingList[j].data.waybillCode,
|
|
|
- contents: [
|
|
|
- list[i].packingList[j],
|
|
|
- {
|
|
|
- data: {
|
|
|
- detail: list[i].packingList[j].detail,
|
|
|
- },
|
|
|
- templateURL: list[i].packingList[j].customTemplateUrl,
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
- } else {
|
|
|
- documents.push({
|
|
|
- documentID: list[i].packingList[j].data.waybillCode,
|
|
|
- contents: [list[i].packingList[j]],
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ signature: "MD:tNcEbtbMMHggDlx907LitQ==",
|
|
|
+ templateURL: "https://cloudprint.cainiao.com/template/standard/288948/66",
|
|
|
+ ver: "waybill_print_secret_version_1",
|
|
|
+ detail: "TPE双层(61*0.6cm):183*61*0.6体位线款,紫罗兰Y07+浅紫Y11*2",
|
|
|
+ customTemplateUrl: "https://cloudprint.cainiao.com/template/customArea/23578994/1",
|
|
|
+ };
|
|
|
+ if (res.detail || res.customTemplateUrl) {
|
|
|
+ documents.push({
|
|
|
+ documentID: res.data.waybillCode,
|
|
|
+ contents: [
|
|
|
+ res,
|
|
|
+ {
|
|
|
+ data: {
|
|
|
+ detail: res.detail,
|
|
|
+ },
|
|
|
+ templateURL: res.customTemplateUrl,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ documents.push({
|
|
|
+ documentID: res.data.waybillCode,
|
|
|
+ contents: [res],
|
|
|
+ });
|
|
|
}
|
|
|
request.task.documents = documents;
|
|
|
if (ws.value.readyState !== 1) {
|
|
@@ -923,32 +915,6 @@ const clickNewbiePrint = (row) => {
|
|
|
// request.task.preview = false;
|
|
|
// request.task.printer = printer;
|
|
|
// let documents = [];
|
|
|
- // let list = res;
|
|
|
- // for (let i = 0; i < list.length; i++) {
|
|
|
- // if (list[i].packingList && list[i].packingList.length > 0) {
|
|
|
- // for (let j = 0; j < list[i].packingList.length; j++) {
|
|
|
- // if (list[i].packingList[j].detail || list[i].packingList[j].customTemplateUrl) {
|
|
|
- // documents.push({
|
|
|
- // documentID: list[i].packingList[j].data.waybillCode,
|
|
|
- // contents: [
|
|
|
- // list[i].packingList[j],
|
|
|
- // {
|
|
|
- // data: {
|
|
|
- // detail: list[i].packingList[j].detail,
|
|
|
- // },
|
|
|
- // templateURL: list[i].packingList[j].customTemplateUrl,
|
|
|
- // },
|
|
|
- // ],
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // documents.push({
|
|
|
- // documentID: list[i].packingList[j].data.waybillCode,
|
|
|
- // contents: [list[i].packingList[j]],
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
// request.task.documents = documents;
|
|
|
// if (ws.value.readyState !== 1) {
|
|
|
// initWebSocket(true, request);
|