修改采购商品信息
This commit is contained in:
parent
b1b3396c0b
commit
bebbd7083d
@ -57,6 +57,10 @@ class PurchaseProductOfferLists extends BaseApiDataLists implements ListsSearchI
|
|||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function($item) use(&$cateIds, &$supplierIds, &$unitIds) {
|
->select()->each(function($item) use(&$cateIds, &$supplierIds, &$unitIds) {
|
||||||
|
$item->store_info = empty($item['store_info']) ? ($item['product']['store_info'] ?? '') : $item['store_info'];
|
||||||
|
$item->after_sales = empty($item['after_sales']) ? ($item['product']['after_sales'] ?? '') : $item['after_sales'];
|
||||||
|
$item->marques = empty($item['marques']) ? ($item['product']['marques'] ?? '') : $item['marques'];
|
||||||
|
$item->package = empty($item['package']) ? ($item['product']['package'] ?? '') : $item['package'];
|
||||||
$item->store_name=$item->product->store_name ?? '';
|
$item->store_name=$item->product->store_name ?? '';
|
||||||
$item->image=$item->product->image ?? '';
|
$item->image=$item->product->image ?? '';
|
||||||
$cateIds[] = $item->product->top_cate_id ?? 0;
|
$cateIds[] = $item->product->top_cate_id ?? 0;
|
||||||
|
@ -24,7 +24,7 @@ class PurchaseProductOffer extends BaseModel
|
|||||||
|
|
||||||
public function product()
|
public function product()
|
||||||
{
|
{
|
||||||
return $this->hasOne(StoreProduct::class, 'id', 'product_id')->field('id,store_name,top_cate_id,image');
|
return $this->hasOne(StoreProduct::class, 'id', 'product_id')->field('id,store_name,top_cate_id,image,store_info,package,marques,after_sales');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user