feat(admin): 优化仓库产品和财务流水列表
- 在 StoreFinanceFlowLists 中添加 order_sn 字段的搜索支持 - 在 WarehouseProductLists 中增加商品规格、单位等信息的展示 - 修改 BeforehandOrderLogic 中的价格处理逻辑,区分 purchase 和 price 字段 - 在 OperationLog 模型中添加 params 字段的 JSON 序列化 - 移除 apidoc-ui.zip 文件
This commit is contained in:
parent
97e0704cec
commit
9aa4431523
@ -32,7 +32,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id'],
|
'=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id','order_sn'],
|
||||||
'between_time' => 'create_time',
|
'between_time' => 'create_time',
|
||||||
'%pipe_like%' => ['keyword' => 'order_sn'],
|
'%pipe_like%' => ['keyword' => 'order_sn'],
|
||||||
];
|
];
|
||||||
|
@ -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_product_unit\StoreProductUnit;
|
||||||
use app\common\model\supplier\Supplier;
|
use app\common\model\supplier\Supplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +79,8 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item->store_name = '';
|
$item->store_name = '';
|
||||||
$item->image = '';
|
$item->image = '';
|
||||||
$item->price = '';
|
$item->price = '';
|
||||||
|
$item->unit_name = '';
|
||||||
|
$item->store_info = '';
|
||||||
if ($item->financial_pm == 0) {
|
if ($item->financial_pm == 0) {
|
||||||
$item->financial_pm_name = '出库';
|
$item->financial_pm_name = '出库';
|
||||||
} else {
|
} else {
|
||||||
@ -101,11 +104,13 @@ 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')->find();
|
$find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info')->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->store_info =$find->store_info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($item->warehouse_id) {
|
if ($item->warehouse_id) {
|
||||||
@ -182,12 +187,17 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$data = [
|
$data = [
|
||||||
|
'id' => 'id',
|
||||||
'admin_name' => '操作人员',
|
'admin_name' => '操作人员',
|
||||||
'warehouse_name' => '仓库',
|
'warehouse_name' => '仓库',
|
||||||
'store_name' => '商品名称',
|
'store_name' => '商品名称',
|
||||||
|
'store_info' => '规格',
|
||||||
|
'unit_name' => '单位',
|
||||||
'financial_pm_name' => '出入库',
|
'financial_pm_name' => '出入库',
|
||||||
'system_store_name' => '门店',
|
'system_store_name' => '门店',
|
||||||
'nums' => '数量',
|
'nums' => '数量',
|
||||||
|
'purchase' => '价格',
|
||||||
|
'total_price' => '总价',
|
||||||
'create_time' => '操作时间',
|
'create_time' => '操作时间',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
unset($params['product_arr'][$k]);
|
unset($params['product_arr'][$k]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$datas[$k]['purchase'] = $v['purchase'];
|
||||||
$datas[$k]['mark'] = $v['mark'] ?? '';
|
$datas[$k]['mark'] = $v['mark'] ?? '';
|
||||||
$datas[$k]['product_id'] = $v['product_id'];
|
$datas[$k]['product_id'] = $v['product_id'];
|
||||||
$datas[$k]['uid'] = $uid;
|
$datas[$k]['uid'] = $uid;
|
||||||
@ -70,7 +71,7 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
$datas[$k]['gross_weight'] = $v['gross_weight'];
|
$datas[$k]['gross_weight'] = $v['gross_weight'];
|
||||||
$datas[$k]['net_weight'] = $v['net_weight'];
|
$datas[$k]['net_weight'] = $v['net_weight'];
|
||||||
$datas[$k]['cart_num'] = $v['nums'];
|
$datas[$k]['cart_num'] = $v['nums'];
|
||||||
$datas[$k]['price'] = $v['purchase'];
|
$datas[$k]['price'] = $v['price'];
|
||||||
$datas[$k]['package'] = $v['package'];
|
$datas[$k]['package'] = $v['package'];
|
||||||
$datas[$k]['total_price'] = $v['total_price'];
|
$datas[$k]['total_price'] = $v['total_price'];
|
||||||
$datas[$k]['create_time'] = time();
|
$datas[$k]['create_time'] = time();
|
||||||
@ -360,7 +361,7 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
'admin_id' => $admin_id,
|
'admin_id' => $admin_id,
|
||||||
'total_price' => $arr['total_price'],
|
'total_price' => $arr['total_price'],
|
||||||
'price' => $arr['price'],
|
'price' => $arr['price'],
|
||||||
'purchase' => $arr['price'],
|
'purchase' => $arr['purchase'],
|
||||||
'oid' => $res['id'],
|
'oid' => $res['id'],
|
||||||
'code' => $res['code'],
|
'code' => $res['code'],
|
||||||
];
|
];
|
||||||
|
@ -6,4 +6,6 @@ namespace app\common\model;
|
|||||||
|
|
||||||
class OperationLog extends BaseModel
|
class OperationLog extends BaseModel
|
||||||
{
|
{
|
||||||
|
protected $json = ['params'];
|
||||||
|
|
||||||
}
|
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user