|
@@ -6,7 +6,7 @@ import { getCompanyList } from '@/api/user'
|
|
|
let detailArr = []
|
|
|
let detailData = []
|
|
|
let company = ''
|
|
|
-let filterId = []
|
|
|
+let cNewIds = []
|
|
|
// 获取详情
|
|
|
getCompanyLists()
|
|
|
function getDetails(ids, nickName) {
|
|
@@ -17,11 +17,13 @@ function getDetails(ids, nickName) {
|
|
|
// detailData = ids
|
|
|
let newIds = []
|
|
|
newIds = ids
|
|
|
-
|
|
|
+ let filterId = []
|
|
|
filterId = newIds.map(k => {
|
|
|
return k.id
|
|
|
})
|
|
|
+
|
|
|
filterId = [...new Set(filterId)]
|
|
|
+ cNewIds =JSON.parse(JSON.stringify(filterId))
|
|
|
for (let i = 0; i < filterId.length; i++) {
|
|
|
getDetail({ id: filterId[i] }).then(res => {
|
|
|
const item = res.data
|
|
@@ -106,9 +108,7 @@ function getCompanyLists() {
|
|
|
|
|
|
// 添加次数
|
|
|
function addPrints() {
|
|
|
- console.log(filterId);
|
|
|
-
|
|
|
-
|
|
|
+ console.log(detailData);
|
|
|
// let ids = detailData.map(item => {
|
|
|
// console.log(item.invoicePickBeans);
|
|
|
// if (item.invoicePickBeans && item.invoicePickBeans.length) {
|
|
@@ -125,11 +125,10 @@ function addPrints() {
|
|
|
// })
|
|
|
|
|
|
// console.log(document.execCommand('print'),'4545');
|
|
|
- addPrint({ ids: filterId.join(',') }).then(res => {
|
|
|
+ addPrint({ ids: cNewIds.join(',') }).then(res => {
|
|
|
console.log('chenggong ');
|
|
|
// this.$successMsg('提交成功');
|
|
|
// this.$parent.getList()
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
|