|
@@ -6,14 +6,14 @@ let detailArr = []
|
|
let cids = []
|
|
let cids = []
|
|
let company = ''
|
|
let company = ''
|
|
// 获取详情
|
|
// 获取详情
|
|
-getCompanyLists()
|
|
|
|
-function getDetail(ids,nickName) {
|
|
|
|
|
|
+
|
|
|
|
+async function getDetail(ids,nickName) {
|
|
|
|
|
|
let invoicePickBeans = []
|
|
let invoicePickBeans = []
|
|
let start = 0
|
|
let start = 0
|
|
let end = 5
|
|
let end = 5
|
|
detailArr = []
|
|
detailArr = []
|
|
- // detailData = ids
|
|
|
|
|
|
+ // detailData = ids
|
|
let newIds = []
|
|
let newIds = []
|
|
newIds = ids
|
|
newIds = ids
|
|
cids = JSON.parse(JSON.stringify(ids))
|
|
cids = JSON.parse(JSON.stringify(ids))
|
|
@@ -21,15 +21,16 @@ function getDetail(ids,nickName) {
|
|
filterId = newIds.map(k=>{
|
|
filterId = newIds.map(k=>{
|
|
return k.id
|
|
return k.id
|
|
})
|
|
})
|
|
- filterId = [...new Set(filterId)]
|
|
|
|
|
|
+ filterId = [...new Set(filterId)]
|
|
|
|
+ await getCompanyLists()
|
|
for (let i = 0; i < filterId.length; i++) {
|
|
for (let i = 0; i < filterId.length; i++) {
|
|
- getDeliverDetail({ id: filterId[i] }).then(res => {
|
|
|
|
|
|
+ await getDeliverDetail({ id: filterId[i] }).then(res => {
|
|
const item = res.data
|
|
const item = res.data
|
|
console.log(item,'887899');
|
|
console.log(item,'887899');
|
|
detailData.push(JSON.parse(JSON.stringify(item)))
|
|
detailData.push(JSON.parse(JSON.stringify(item)))
|
|
-
|
|
|
|
|
|
+
|
|
invoicePickBeans = item.invoicePickBeans
|
|
invoicePickBeans = item.invoicePickBeans
|
|
- let len =Math.ceil(invoicePickBeans.length / 5)
|
|
|
|
|
|
+ let len =Math.ceil(invoicePickBeans.length / 5)
|
|
console.log(len,'长度');
|
|
console.log(len,'长度');
|
|
for (let index = 0; index < len; index++) {
|
|
for (let index = 0; index < len; index++) {
|
|
const table = []
|
|
const table = []
|
|
@@ -46,8 +47,8 @@ function getDetail(ids,nickName) {
|
|
refundableQty: e.refundableQty || 0,
|
|
refundableQty: e.refundableQty || 0,
|
|
// headerRemark:e.headerRemark,
|
|
// headerRemark:e.headerRemark,
|
|
pjxh1Text: e.pjxh1Text || ''
|
|
pjxh1Text: e.pjxh1Text || ''
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ })
|
|
|
|
+
|
|
});
|
|
});
|
|
}
|
|
}
|
|
detailArr.push({
|
|
detailArr.push({
|
|
@@ -115,22 +116,22 @@ function addPrint() {
|
|
for (let index = 0; index < item.invoicePickBeans.length; index++) {
|
|
for (let index = 0; index < item.invoicePickBeans.length; index++) {
|
|
const element = item.invoicePickBeans[index];
|
|
const element = item.invoicePickBeans[index];
|
|
console.log(element.id ,'element.id ');
|
|
console.log(element.id ,'element.id ');
|
|
- // return element.id
|
|
|
|
|
|
+ // return element.id
|
|
ids.push(element.id )
|
|
ids.push(element.id )
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
// console.log(item.invoiceOrderId ,'item.invoiceOrderId ');
|
|
// console.log(item.invoiceOrderId ,'item.invoiceOrderId ');
|
|
return item.invoiceOrderId || item.id
|
|
return item.invoiceOrderId || item.id
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
// console.log(document.execCommand('print'),'4545');
|
|
// console.log(document.execCommand('print'),'4545');
|
|
addPrints({ ids: ids.join(',') }).then(res => {
|
|
addPrints({ ids: ids.join(',') }).then(res => {
|
|
console.log('chenggong ');
|
|
console.log('chenggong ');
|
|
// this.$successMsg('提交成功');
|
|
// this.$successMsg('提交成功');
|
|
// this.$parent.getList()
|
|
// this.$parent.getList()
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|