|
|
|
@ -1936,11 +1936,10 @@ export default {
|
|
|
|
|
this.page.total = inventoryList.total; |
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 过滤掉已选择的数量 |
|
|
|
|
|
|
|
|
|
const _inventoryInfo = inventoryList.records; |
|
|
|
|
this.inventoryInfo = _inventoryInfo |
|
|
|
|
this.inventoryInfo = _inventoryInfo; |
|
|
|
|
if (this.inventoryData.length !== 0) { |
|
|
|
|
// 获取ids的映射数组 |
|
|
|
|
const ids = this.inventoryData.map(val => val.id); |
|
|
|
@ -2630,7 +2629,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
this.marketName = _marketName; |
|
|
|
|
console.log('this.inventoryList :>> ', this.inventoryList); |
|
|
|
|
this.inventoryData = [...this.inventoryData,...this.inventoryList]; |
|
|
|
|
this.inventoryData = [...this.inventoryData, ...this.inventoryList]; |
|
|
|
|
|
|
|
|
|
this.stockListShow = false; |
|
|
|
|
}, |
|
|
|
@ -2797,14 +2796,9 @@ export default {
|
|
|
|
|
this.query.typeService = 2; |
|
|
|
|
this.query.genre = '1'; |
|
|
|
|
this.query.marketName = this.marketName; |
|
|
|
|
// const page = this.page; |
|
|
|
|
let a = []; |
|
|
|
|
if (this.orderData) { |
|
|
|
|
this.orderData.forEach(item => { |
|
|
|
|
a.push(item.id); |
|
|
|
|
}); |
|
|
|
|
if (this.orderData.length !== 0) { |
|
|
|
|
this.query.orderIds = this.orderData.map(val => val.id).join(','); |
|
|
|
|
} |
|
|
|
|
this.query.orderIds = a.join(','); |
|
|
|
|
console.log('--------------query>', this.query); |
|
|
|
|
const res = await selectStockArticleInfoList( |
|
|
|
|
page.currentPage, |
|
|
|
@ -2812,27 +2806,18 @@ export default {
|
|
|
|
|
Object.assign(params, this.query) |
|
|
|
|
); |
|
|
|
|
const { records, total } = res.data.data; |
|
|
|
|
this.stockArticleInfo = records; |
|
|
|
|
const _filterArr = records |
|
|
|
|
|
|
|
|
|
// this.stockArticleInfo = records; |
|
|
|
|
console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); |
|
|
|
|
this.stockArticleInfo.forEach((item, index) => { |
|
|
|
|
//检查订单是否冻结 |
|
|
|
|
this.checkOrder(item, index); |
|
|
|
|
// if (this.orderData) { |
|
|
|
|
// this.orderData.forEach(o => { |
|
|
|
|
// if (o.id === item.id) { |
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
// this.$refs.orderList.toggleRowSelection(this.stockArticleInfo[index], true); |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }else { |
|
|
|
|
// this.orderList = []; |
|
|
|
|
// } |
|
|
|
|
this.page.total = total; |
|
|
|
|
}); |
|
|
|
|
if (this.orderData.length !== 0) { |
|
|
|
|
const ids = this.orderData.map(val => val.id); |
|
|
|
|
const _orderData = this.stockArticleInfo.filter(val => !ids.includes(val.id)) |
|
|
|
|
const _orderData = this.stockArticleInfo.filter(val => !ids.includes(val.id)); |
|
|
|
|
// this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id)); |
|
|
|
|
console.log('orderSelectList :>> ', this.orderSelectList); |
|
|
|
|
} |
|
|
|
|