|
|
|
@ -368,13 +368,8 @@
|
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnParcels" |
|
|
|
|
:tableData="packageData" |
|
|
|
|
:checkselect="packageData" |
|
|
|
|
|
|
|
|
|
:checkselect="packageDataSec" |
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionPackageChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
@ -1669,6 +1664,10 @@
|
|
|
|
|
orderIds: '', |
|
|
|
|
//预约编号 |
|
|
|
|
reservationId: '', |
|
|
|
|
// 商城名称 |
|
|
|
|
marketName: '', |
|
|
|
|
// 包件复选框列表 |
|
|
|
|
packageDataSec: [], |
|
|
|
|
inventoryData: [], |
|
|
|
|
orderData: [], |
|
|
|
|
stockListShow: false, |
|
|
|
@ -1809,7 +1808,11 @@
|
|
|
|
|
item.applyNum = item.quantityStock - item.quantityOccupied; |
|
|
|
|
}); |
|
|
|
|
this.page.total = inventoryList.total; |
|
|
|
|
this.inventoryInfo = inventoryList.records; |
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
this.inventoryInfo = inventoryList.records.filter(value=>{ |
|
|
|
|
if(this.marketName === '')return value |
|
|
|
|
return value.marketName === this.marketName |
|
|
|
|
}); |
|
|
|
|
//存在库存品,需要将库存品进行回显勾选 |
|
|
|
|
if (this.inventoryData) { |
|
|
|
|
this.inventoryInfo.forEach((item, index) => { |
|
|
|
@ -1907,7 +1910,7 @@
|
|
|
|
|
this.loading = true; |
|
|
|
|
this.packageList = row.packageList; |
|
|
|
|
this.obj = row; |
|
|
|
|
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row); |
|
|
|
|
console.log('row>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row); |
|
|
|
|
if (this.reservationId) { |
|
|
|
|
//这里就是编辑的数据回显问题 |
|
|
|
|
let packageInfo = row.parcelListVOS; |
|
|
|
@ -1933,8 +1936,21 @@
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.packageData = row.parcelListVOS; |
|
|
|
|
|
|
|
|
|
// 当row内packageList为空时, 默认全选 |
|
|
|
|
if(row.packageList.length === 0) { |
|
|
|
|
this.packageDataSec = row.parcelListVOS |
|
|
|
|
}else{ |
|
|
|
|
this.packageDataSec = row.parcelListVOS.filter(item => { |
|
|
|
|
return row.packageList.some( value => value.id === item.id) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.packageData = row.parcelListVOS; |
|
|
|
|
this.packageDataSec = row.parcelListVOS.filter(item => { |
|
|
|
|
return row.packageList.some( value => value.id === item.id) |
|
|
|
|
}); |
|
|
|
|
//这里回显展示的效果应该是展示被其他预约单勾选的订单处于禁用勾选,冻结订单处于禁用无法勾选,其他默认为全选 |
|
|
|
|
let data = row.parcelListVOS; |
|
|
|
|
data.forEach((item, index) => { |
|
|
|
@ -2029,13 +2045,13 @@
|
|
|
|
|
this.handleAddInventory(); |
|
|
|
|
}, |
|
|
|
|
onSubmitPackage() { |
|
|
|
|
if (this.packageList.length === 0) { |
|
|
|
|
if (this.packageDataSec.length === 0) { |
|
|
|
|
this.$message.warning('请选择包件!!!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.orderData.forEach(item => { |
|
|
|
|
if (item.id === this.obj.id) { |
|
|
|
|
item.packageList = this.packageList; |
|
|
|
|
item.packageList = this.packageDataSec; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log('this.orderData------------>', this.orderData); |
|
|
|
@ -2149,6 +2165,10 @@
|
|
|
|
|
} |
|
|
|
|
console.log(item); |
|
|
|
|
}); |
|
|
|
|
// 当两个列表没有数据时, 清空限制 |
|
|
|
|
if(this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '' |
|
|
|
|
// 当列表没有数据时, 表单清空 |
|
|
|
|
if(this.orderData.length === 0) this.form = {} |
|
|
|
|
console.log('>>>>>>>>>>>>>>>row', row); |
|
|
|
|
}, |
|
|
|
|
removeStockList(row) { |
|
|
|
@ -2160,8 +2180,10 @@
|
|
|
|
|
if (item.id === row.id) { |
|
|
|
|
this.inventoryData.splice(index, 1); |
|
|
|
|
} |
|
|
|
|
console.log(item); |
|
|
|
|
console.log('item>>>>>>>>>>>',item); |
|
|
|
|
}); |
|
|
|
|
// 当两个列表没有数据时, 清空限制 |
|
|
|
|
if(this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '' |
|
|
|
|
console.log('>>>>>>>>>>>>>>>row', row); |
|
|
|
|
}, |
|
|
|
|
showStockListEdit(row) { |
|
|
|
@ -2210,7 +2232,7 @@
|
|
|
|
|
selectionPackageChange(list) { |
|
|
|
|
console.log('-----------<>', list); |
|
|
|
|
if (this.reservationId) { |
|
|
|
|
this.packageList = list; |
|
|
|
|
this.packageDataSec = list; |
|
|
|
|
} else { |
|
|
|
|
//新增 |
|
|
|
|
let a = []; |
|
|
|
@ -2223,7 +2245,7 @@
|
|
|
|
|
a.push(item); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.packageList = a; |
|
|
|
|
this.packageDataSec = a; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
selectionInventoryChange(list) { |
|
|
|
@ -2254,6 +2276,18 @@
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log('this.inventoryList :>> ', this.inventoryList); |
|
|
|
|
// 检测商场是否选择统一商场 |
|
|
|
|
let _marketName = '' |
|
|
|
|
const _isUnifyMarketName = this.inventoryList.every(value => { |
|
|
|
|
if (_marketName === '') _marketName = value.marketName |
|
|
|
|
return _marketName === value.marketName |
|
|
|
|
}) |
|
|
|
|
if(!_isUnifyMarketName){ |
|
|
|
|
this.$message.warning('请选择统一商场!!!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.marketName = _marketName |
|
|
|
|
this.inventoryData = this.inventoryList; |
|
|
|
|
|
|
|
|
|
// if (this.orderData.length) { |
|
|
|
@ -2308,6 +2342,9 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 设置商场名称 |
|
|
|
|
this.marketName = list[0].marketName |
|
|
|
|
|
|
|
|
|
this.form.consignee = name; |
|
|
|
|
this.form.deliveryAddress = address; |
|
|
|
|
this.form.deliveryPhone = phone; |
|
|
|
@ -2388,8 +2425,9 @@
|
|
|
|
|
this.reservationId, |
|
|
|
|
Object.assign(params, this.query) |
|
|
|
|
).then(res => { |
|
|
|
|
console.log('res------------>', res); |
|
|
|
|
console.log('res123123------------>', res); |
|
|
|
|
const data = res.data.data; |
|
|
|
|
console.log('data :>> ', data); |
|
|
|
|
this.stockArticleInfo = data.records; |
|
|
|
|
this.stockArticleInfo.forEach((item, index) => { |
|
|
|
|
//检查订单是否冻结 |
|
|
|
@ -2475,9 +2513,16 @@
|
|
|
|
|
page.pageSize, |
|
|
|
|
Object.assign(params, this.query) |
|
|
|
|
).then(res => { |
|
|
|
|
console.log('res------------>', res); |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.stockArticleInfo = data.records; |
|
|
|
|
console.log('res123------------>', res); |
|
|
|
|
const {records, total} = res.data.data; |
|
|
|
|
this.stockArticleInfo = records.filter(value => { |
|
|
|
|
if(this.marketName === '') return value |
|
|
|
|
if(this.marketName) { |
|
|
|
|
console.log('value.marketName :>> ', value.marketName); |
|
|
|
|
return value.mallName === this.marketName |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); |
|
|
|
|
this.stockArticleInfo.forEach((item, index) => { |
|
|
|
|
//检查订单是否冻结 |
|
|
|
|
this.checkOrder(item, index); |
|
|
|
@ -2492,7 +2537,7 @@
|
|
|
|
|
// }else { |
|
|
|
|
// this.orderList = []; |
|
|
|
|
// } |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.page.total = total; |
|
|
|
|
}); |
|
|
|
|
this.orderList = []; |
|
|
|
|
}); |
|
|
|
@ -2541,7 +2586,9 @@
|
|
|
|
|
// stockArticleListInfo.forEach(item=>{ |
|
|
|
|
// |
|
|
|
|
// }) |
|
|
|
|
console.log('>>>>>>>>', reservation); |
|
|
|
|
console.log('reservation>>>>>>>>', reservation); |
|
|
|
|
// 添加限制的商场名称 |
|
|
|
|
this.marketName = reservation.mallName; |
|
|
|
|
this.orderData = reservation.stockArticleList; |
|
|
|
|
this.inventoryData = reservation.inventoryList; |
|
|
|
|
this.inventoryData.forEach(item => { |
|
|
|
@ -2565,7 +2612,7 @@
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style> |
|
|
|
|
<style lang="scss"> |
|
|
|
|
input::-webkit-outer-spin-button, |
|
|
|
|
input::-webkit-inner-spin-button { |
|
|
|
|
-webkit-appearance: none; |
|
|
|
|