修改门店入库列表查询
This commit is contained in:
parent
8567f2de4a
commit
36016871da
@ -27,7 +27,7 @@ class InventoryWarehouseLists extends BaseAdminDataLists implements ListsSearchI
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['product_id'],
|
||||
'=' => ['product_id', 'warehouse_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ namespace app\admin\lists\warehouse_product;
|
||||
|
||||
|
||||
use app\admin\lists\BaseAdminDataLists;
|
||||
use app\common\model\beforehand_order\BeforehandOrder;
|
||||
use app\common\model\warehouse_product\WarehouseProduct;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\auth\Admin;
|
||||
@ -65,7 +66,7 @@ class StoreWarehouseProductLists extends BaseAdminDataLists implements ListsSear
|
||||
$this->searchWhere[] = ['financial_pm', '=',0];
|
||||
$this->searchWhere[] = ['order_type', 'in',[1, 2, 3, 4, 8]];
|
||||
return WarehouseProduct::where($this->searchWhere)
|
||||
->field(['id', 'admin_id', 'store_id','product_id', 'nums', 'refund_nums', 'status', 'mark', 'create_time',])
|
||||
->field(['id', 'admin_id', 'store_id','product_id', 'nums', 'refund_nums', 'status', 'mark', 'create_time', 'order_type'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
// ->withTrashed()
|
||||
@ -96,6 +97,7 @@ class StoreWarehouseProductLists extends BaseAdminDataLists implements ListsSear
|
||||
$item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name');
|
||||
}
|
||||
}
|
||||
$item->order_type_name = BeforehandOrder::getOrderTypeName($item->order_type);
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
||||
}
|
||||
}
|
||||
return WarehouseProduct::where($this->searchWhere)
|
||||
->field(['id', 'code','pay_type','oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay'])
|
||||
->field(['id', 'code','pay_type','oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay', 'order_type'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
// ->withTrashed()
|
||||
|
@ -29,8 +29,10 @@ class BeforehandOrder extends BaseModel
|
||||
3 => '一条龙订单',
|
||||
4 => '线上订单',
|
||||
5 => '仓库补货',
|
||||
6 => '采购订单',
|
||||
7 => '其他订单',
|
||||
6 => '往期补单',
|
||||
7 => '采购订单',
|
||||
8 => '其他订单',
|
||||
9 => '往期补单',
|
||||
];
|
||||
return $typeMap[$type] ?? '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user