|
@@ -141,8 +141,8 @@ export default {
|
|
|
const { data } = await getDtailPrintDis(requestParams);
|
|
|
loadingLen = data.length;
|
|
|
for (let i = data.length; i > 0; i--) {
|
|
|
- const newData = data[i - 1];
|
|
|
- await this.setPrintData(newData);
|
|
|
+ const newData = data[i - 1];
|
|
|
+ await this.setPrintData(newData);
|
|
|
loadingLen--;
|
|
|
}
|
|
|
} catch (error) {
|
|
@@ -154,16 +154,16 @@ export default {
|
|
|
formatting = [...new Set(formatting)];
|
|
|
loadingLen = formatting.length;
|
|
|
for (let i = formatting.length; i > 0; i--) {
|
|
|
- const requestParams = {
|
|
|
- id: formatting[i - 1],
|
|
|
- };
|
|
|
- try {
|
|
|
- const { data } = await getDeliverDetail(requestParams);
|
|
|
- this.setPrintData(data);
|
|
|
- } catch (error) {
|
|
|
- this.$endLoading();
|
|
|
- console.error("获取打印数据失败");
|
|
|
- }
|
|
|
+ const requestParams = {
|
|
|
+ id: formatting[i - 1],
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ const { data } = await getDeliverDetail(requestParams);
|
|
|
+ this.setPrintData(data);
|
|
|
+ } catch (error) {
|
|
|
+ this.$endLoading();
|
|
|
+ console.error("获取打印数据失败");
|
|
|
+ }
|
|
|
loadingLen--;
|
|
|
}
|
|
|
}
|
|
@@ -271,9 +271,9 @@ export default {
|
|
|
* this.outputData 打印数据
|
|
|
*/
|
|
|
setPrintData(data) {
|
|
|
- let salesOrderId , invoiceId
|
|
|
- salesOrderId=data.invoicePickBeans[0].salesOrderId
|
|
|
- invoiceId=data.invoicePickBeans[0].invoiceId
|
|
|
+ let salesOrderId, invoiceId; //出库单号,发货单号 默认数据中的第一个
|
|
|
+ salesOrderId = data.invoicePickBeans[0].salesOrderId;
|
|
|
+ invoiceId = data.invoicePickBeans[0].invoiceId;
|
|
|
// 初始化打印次数
|
|
|
let printNum = 0;
|
|
|
//避免数据发生改变
|
|
@@ -294,7 +294,6 @@ export default {
|
|
|
|
|
|
//添加表格数据
|
|
|
table.push({
|
|
|
-
|
|
|
id: tempData.id,
|
|
|
createTime: tempData.id
|
|
|
? this.dateToDayFilter(data.createTime)
|
|
@@ -314,7 +313,7 @@ export default {
|
|
|
// 添加print输出数据
|
|
|
this.outputData.push({
|
|
|
pageNumber: `${len}-${index + 1}`,
|
|
|
- printNum:printNum + 1,
|
|
|
+ printNum: printNum + 1,
|
|
|
salesId: salesOrderId,
|
|
|
invoiceId: invoiceId,
|
|
|
type: data.type,
|