批量修改在售库存
This commit is contained in:
parent
ae5cc03c17
commit
86554e20d5
@ -38,14 +38,14 @@ class GoodsSkusExport implements FromCollection, ShouldAutoSize
|
|||||||
$headTitle = [
|
$headTitle = [
|
||||||
'商品编码',
|
'商品编码',
|
||||||
'商品名称',
|
'商品名称',
|
||||||
'在售库存',
|
'可售库存',
|
||||||
'创建时间',
|
'创建时间',
|
||||||
];
|
];
|
||||||
$map = [
|
$map = [
|
||||||
'cost' => ['当前成本', '更新前成本', "更新后成本"],
|
'cost' => ['当前成本', '更新前成本', "更新后成本"],
|
||||||
'inventory' => ['当前库存', '盘点数', '采购总数'],
|
'inventory' => ['当前库存', '盘点数', '采购总数'],
|
||||||
];
|
];
|
||||||
$headTitle = array_merge($headTitle, $map[$this->type]);
|
$headTitle = array_merge($headTitle, $map[$this->type] ?? []);
|
||||||
if ('cost' === $this->type) {
|
if ('cost' === $this->type) {
|
||||||
$update = $this->getChangeCostLogs();
|
$update = $this->getChangeCostLogs();
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ class GoodsSkusExport implements FromCollection, ShouldAutoSize
|
|||||||
}
|
}
|
||||||
if ($this->type === "goods_combination") {
|
if ($this->type === "goods_combination") {
|
||||||
$builder->where('is_combination', 1);
|
$builder->where('is_combination', 1);
|
||||||
}else{
|
} else {
|
||||||
$builder->where('is_combination', 0);
|
$builder->where('is_combination', 0);
|
||||||
}
|
}
|
||||||
$data = $builder->filter()->orderByDesc('id')->get()->toArray();
|
$data = $builder->filter()->orderByDesc('id')->get()->toArray();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user