Commit 0dfc2e0a authored by Marcus's avatar Marcus

【生产反馈】后台和pda入仓补充,新增入仓记录,默认使用前一个入仓记录的储位,可修改

https://zentao.test.jdshangmen.com/bug-view-3288.html

入仓页面选择已有的待确定和已确定商品,入仓特性没有变化
parent ccebc3e2
......@@ -258,30 +258,34 @@ export default {
}
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
f.selected = this.isSelected(e.id, f.id)
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.selected = this.isSelected(e.id, f.id, g.id)
g.children?.forEach(k => {
// 子位置
k.selected = this.isSelected(e.id, f.id, k.id)
})
resetAreaTreeSelected(area) {
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
f.selected = this.isSelected(e.id, f.id)
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.selected = this.isSelected(e.id, f.id, g.id)
g.children?.forEach(k => {
// 子位置
k.selected = this.isSelected(e.id, f.id, k.id)
})
})
})
this.area = area
})
return area
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
this.area = this.resetAreaTreeSelected(r.data)
})
},
// 用于储位回显选中
isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && position === e.locationId)
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && (position === e.locationId || undefined === e.locationId))
},
}
}
......
......@@ -941,6 +941,11 @@ export default {
}
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
......@@ -952,7 +957,8 @@ export default {
"volume": '',
"weight": '',
specificationType: '1',
table: []
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment