1. 在BeforehandOrderCartInfoLists类中添加了备注字段到显示列表中。

2. 在`WarehouseProductLogic`类的采购入库方法中,当仓库商品不存在时,异常提示中增加了产品ID信息。
3. 在`AdminTokenCache`类中,缓存管理员信息时增加了岗位ID数组。
This commit is contained in:
mkm 2024-10-15 14:10:37 +08:00
parent c05b791dd6
commit 604cfecd1c
3 changed files with 5 additions and 1 deletions

View File

@ -120,6 +120,7 @@ class BeforehandOrderCartInfoLists extends BaseAdminDataLists implements ListsSe
'unit_name' => '单位',
'price' => '单价',
'total_price' => '总价',
'mark' => '备注',
];
return $data;
}

View File

@ -165,7 +165,7 @@ class WarehouseProductLogic extends BaseLogic
$total_price = bcmul($after_nums, $params['purchase'], 2);
WarehouseProductStorege::update(['nums' =>bcsub($storege['nums'], $params['nums']), 'total_price' => $total_price], ['id' => $storege['id']]);
} else {
throw new BusinessException('仓库商品不存在');
throw new BusinessException('仓库商品不存在'.'|'.$params['product_id']);
}
$batch_count = WarehouseProduct::where(['product_id' => $params['product_id'], 'warehouse_id' => $params['warehouse_id'], 'financial_pm' => $params['financial_pm'], 'store_id' => $params['store_id']])->count();

View File

@ -5,6 +5,7 @@ namespace app\common\cache;
use app\common\model\auth\Admin;
use app\common\model\auth\AdminJobs;
use app\common\model\auth\AdminSession;
use app\common\model\auth\SystemRole;
use app\common\model\BaseModel;
@ -78,8 +79,10 @@ class AdminTokenCache extends BaseCache
if(isset($auth_shop)){
$supplier_id=$auth_shop['pid'];
}
$job_ids=AdminJobs::where('admin_id',$admin->id)->column('jobs_id');
$adminInfo = [
'admin_id' => $admin->id,
'job_ids' => $job_ids,
'supplier_id' => $supplier_id,
'root' => $admin->root,
'name' => $admin->name,