feat(warehouse): 仓库产品列表增加分类名称显示
- 在仓库产品列表中添加分类名称字段 - 优化产品信息查询,包含分类 ID - 修复部分产品无规格信息的问题 - 注释掉 OperationLog 中的 json 属性
This commit is contained in:
parent
9aa4431523
commit
61a5d5d6d5
@ -11,6 +11,7 @@ use app\common\model\store_product\StoreProduct;
|
|||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
use app\common\model\warehouse\Warehouse;
|
use app\common\model\warehouse\Warehouse;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
|
use app\common\model\store_category\StoreCategory;
|
||||||
use app\common\model\store_product_unit\StoreProductUnit;
|
use app\common\model\store_product_unit\StoreProductUnit;
|
||||||
use app\common\model\supplier\Supplier;
|
use app\common\model\supplier\Supplier;
|
||||||
|
|
||||||
@ -81,6 +82,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item->price = '';
|
$item->price = '';
|
||||||
$item->unit_name = '';
|
$item->unit_name = '';
|
||||||
$item->store_info = '';
|
$item->store_info = '';
|
||||||
|
$item->top_cate_name = '';
|
||||||
if ($item->financial_pm == 0) {
|
if ($item->financial_pm == 0) {
|
||||||
$item->financial_pm_name = '出库';
|
$item->financial_pm_name = '出库';
|
||||||
} else {
|
} else {
|
||||||
@ -104,13 +106,14 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item->admin_name = '';
|
$item->admin_name = '';
|
||||||
}
|
}
|
||||||
if ($item->product_id) {
|
if ($item->product_id) {
|
||||||
$find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info')->find();
|
$find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info,top_cate_id')->withTrashed()->find();
|
||||||
if($find){
|
if($find){
|
||||||
$item->store_name = $find->store_name . '|' . $item->product_id;
|
$item->store_name = $find->store_name . '|' . $item->product_id;
|
||||||
$item->image = $find->image;
|
$item->image = $find->image;
|
||||||
$item->price = $find->price;
|
$item->price = $find->price;
|
||||||
$item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name');
|
$item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name');
|
||||||
$item->store_info =$find->store_info;
|
$item->store_info =$find->store_info;
|
||||||
|
$item->top_cate_name =StoreCategory::where('id', $find->top_cate_id)->value('name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($item->warehouse_id) {
|
if ($item->warehouse_id) {
|
||||||
@ -191,6 +194,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
'admin_name' => '操作人员',
|
'admin_name' => '操作人员',
|
||||||
'warehouse_name' => '仓库',
|
'warehouse_name' => '仓库',
|
||||||
'store_name' => '商品名称',
|
'store_name' => '商品名称',
|
||||||
|
'top_cate_name' => '分类',
|
||||||
'store_info' => '规格',
|
'store_info' => '规格',
|
||||||
'unit_name' => '单位',
|
'unit_name' => '单位',
|
||||||
'financial_pm_name' => '出入库',
|
'financial_pm_name' => '出入库',
|
||||||
|
@ -6,6 +6,6 @@ namespace app\common\model;
|
|||||||
|
|
||||||
class OperationLog extends BaseModel
|
class OperationLog extends BaseModel
|
||||||
{
|
{
|
||||||
protected $json = ['params'];
|
// protected $json = ['params'];
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user