Merge branch 'develop'

This commit is contained in:
mzl
2025-10-12 17:10:14 +08:00
parent 3a7449e2e9
commit 89d633389c
43 changed files with 4173 additions and 364 deletions
+12 -2
View File
@@ -72,11 +72,21 @@ class StockOrdersService extends \app\common\service\StockOrdersService
{
$config = $this->buildQueryConfig($request, 'detail');
$item = $this->logicShow($config);
// 检查是否至少有一个车辆填写了vin
$hasVin = false;
foreach ($item->items as $k => $v) {
if ($v->vin === '') {
throw new BusinessException('存在未填写vin的车辆,无法完成提交审核');
if ($v->vin !== '') {
$hasVin = true;
break;
}
}
// 如果没有任何车辆填写vin,则抛出异常
if (!$hasVin) {
throw new BusinessException('至少需要为一辆车辆填写vin,才能提交审核');
}
$this->logicUpdateBy($config, [
'approval_status' => 1
]);