|
@@ -117,30 +117,6 @@ export default {
|
|
}
|
|
}
|
|
let list = _.uniqBy(fileList, 'address._id');
|
|
let list = _.uniqBy(fileList, 'address._id');
|
|
this.$set(this, 'fileList', list);
|
|
this.$set(this, 'fileList', list);
|
|
- // let fileList = [];
|
|
|
|
- // if (this.fileList.length == 0) {
|
|
|
|
- // fileList.push({ goodsList, address });
|
|
|
|
- // this.$set(this, 'fileList', fileList);
|
|
|
|
- // } else {
|
|
|
|
- // for (const val of this.fileList) {
|
|
|
|
- // // 判断this.fileList里是否有和选中的地址id相同的
|
|
|
|
- // if (val.address._id == address._id) {
|
|
|
|
- // // 判断是否有选中的商品,没有就过滤掉
|
|
|
|
- // if (goodsList.length == 0) {
|
|
|
|
- // let p2 = this.fileList.filter((f) => f.address._id != address._id);
|
|
|
|
- // this.fileList = p2;
|
|
|
|
- // } else {
|
|
|
|
- // val.goodsList = goodsList;
|
|
|
|
- // }
|
|
|
|
- // } else {
|
|
|
|
- // // 判断this.fileList里是否有和选中的地址id相同的,不同就push到fileList里
|
|
|
|
- // this.fileList.push({ goodsList, address });
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // let list = _.uniqBy(this.fileList, 'address._id');
|
|
|
|
- // this.$set(this, 'fileList', list);
|
|
|
|
- // console.log(list);
|
|
|
|
},
|
|
},
|
|
toFile() {
|
|
toFile() {
|
|
const workbook = new ExcelJS.Workbook();
|
|
const workbook = new ExcelJS.Workbook();
|