商品溯源详情添加跳转
This commit is contained in:
parent
a49919882a
commit
c3acd04bf8
@ -96,6 +96,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item)use($export) {
|
->select()->each(function ($item)use($export) {
|
||||||
$item['outbound'] = '';
|
$item['outbound'] = '';
|
||||||
|
$item['outbound_time'] = '';
|
||||||
$item['order_type_name'] = '';
|
$item['order_type_name'] = '';
|
||||||
if ($item->admin_id) {
|
if ($item->admin_id) {
|
||||||
$item->admin_name = Admin::where(['id' => $item->admin_id])->value('name');
|
$item->admin_name = Admin::where(['id' => $item->admin_id])->value('name');
|
||||||
@ -132,6 +133,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
}
|
}
|
||||||
if ($item['outbound_id'] > 0) {
|
if ($item['outbound_id'] > 0) {
|
||||||
$item->outbound = '已出库|' . $item['outbound_id'];
|
$item->outbound = '已出库|' . $item['outbound_id'];
|
||||||
|
$outboundTime = WarehouseOrder::where('id', $item['outbound_id'])->value('create_time');
|
||||||
|
$item->outbound_time = date('Y-m-d H:i:s', $outboundTime);
|
||||||
}
|
}
|
||||||
if ($item['store_id'] > 0) {
|
if ($item['store_id'] > 0) {
|
||||||
$item->system_store = SystemStore::where(['id' => $item['store_id']])->value('name');
|
$item->system_store = SystemStore::where(['id' => $item['store_id']])->value('name');
|
||||||
|
@ -28,7 +28,7 @@ class InventoryTransferOrderLists extends BaseAdminDataLists implements ListsSea
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['order_id', 'one_type', 'two_type', 'types'],
|
'=' => ['id', 'order_id', 'one_type', 'two_type', 'types'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,11 @@ namespace app\admin\lists\product_source_link_info;
|
|||||||
|
|
||||||
|
|
||||||
use app\admin\lists\BaseAdminDataLists;
|
use app\admin\lists\BaseAdminDataLists;
|
||||||
|
use app\common\model\inventory_transfer\InventoryTransfer;
|
||||||
use app\common\model\product_source_link_info\ProductSourceLinkInfo;
|
use app\common\model\product_source_link_info\ProductSourceLinkInfo;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
||||||
|
use app\common\model\warehouse_product\WarehouseProduct;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,6 +51,7 @@ class ProductSourceLinkInfoLists extends BaseAdminDataLists implements ListsSear
|
|||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->each(function ($item) {
|
->each(function ($item) {
|
||||||
|
$item['route'] = $this->getRoute($item);
|
||||||
$item['type_name'] = $item->getTypeName();
|
$item['type_name'] = $item->getTypeName();
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
@ -65,4 +69,30 @@ class ProductSourceLinkInfoLists extends BaseAdminDataLists implements ListsSear
|
|||||||
return ProductSourceLinkInfo::where($this->searchWhere)->count();
|
return ProductSourceLinkInfo::where($this->searchWhere)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRoute($item)
|
||||||
|
{
|
||||||
|
if ($item['types'] == ProductSourceLinkInfo::TypeIn) {
|
||||||
|
$path = '/procure/warehouse_product';
|
||||||
|
$query = ['id' => $item['link_id']];
|
||||||
|
} elseif (in_array($item['types'], [ProductSourceLinkInfo::TypeOut, ProductSourceLinkInfo::TypeStoreIn, ProductSourceLinkInfo::TypeStoreOut])) {
|
||||||
|
$path = '/sales_inventory/outbound_list';
|
||||||
|
$query = ['id' => $item['link_id']];
|
||||||
|
} elseif ($item['types'] == ProductSourceLinkInfo::TypeOrder) {
|
||||||
|
$path = '/order/store_order';
|
||||||
|
$linkId = StoreOrderCartInfo::where('id', $item['link_id'])->value('oid');
|
||||||
|
$query = ['id' => $linkId];
|
||||||
|
} elseif ($item['types'] == ProductSourceLinkInfo::TypeOrderRefund) {
|
||||||
|
$path = '/order/store_order';
|
||||||
|
$query = ['id' => $item['link_id']];
|
||||||
|
} elseif (in_array($item['types'], [ProductSourceLinkInfo::TypeS2W, ProductSourceLinkInfo::TypeS2S, ProductSourceLinkInfo::TypeW2W])) {
|
||||||
|
$path = '/warehouse/inventory_transfer_order';
|
||||||
|
$linkId = InventoryTransfer::where('id', $item['link_id'])->value('oid');
|
||||||
|
$query = ['id' => $linkId];
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
'path' => $path ?? '',
|
||||||
|
'query' => $query ?? []
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -32,7 +32,7 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['store_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id', 'paid', 'status', 'is_writeoff', 'is_merge', 'uid'],
|
'=' => ['id', 'store_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id', 'paid', 'status', 'is_writeoff', 'is_merge', 'uid'],
|
||||||
'between_time' => 'create_time',
|
'between_time' => 'create_time',
|
||||||
'%like%' => ['order_id'],
|
'%like%' => ['order_id'],
|
||||||
];
|
];
|
||||||
|
@ -37,7 +37,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['warehouse_id', 'financial_pm', 'product_id','store_id','oid','supplier_id','is_pay','code'],
|
'=' => ['id', 'warehouse_id', 'financial_pm', 'product_id','store_id','oid','supplier_id','is_pay','code'],
|
||||||
'between_time' => 'create_time'
|
'between_time' => 'create_time'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user