mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-24 02:16:14 +08:00
Update TruckService.php
This commit is contained in:
parent
3bfb86076b
commit
7668217b48
@ -43,10 +43,11 @@ class TruckService extends Service
|
|||||||
[$repeatNumber, $repeatAmount] = [$rule['repeatNumber'] ?: 0, $rule['repeatAmount'] ?: 0];
|
[$repeatNumber, $repeatAmount] = [$rule['repeatNumber'] ?: 0, $rule['repeatAmount'] ?: 0];
|
||||||
if ($truckCount <= $firstNumber) {
|
if ($truckCount <= $firstNumber) {
|
||||||
return [$firstAmount, $truckCount, $template['code'], "首件计费,不超过{$firstNumber}件"];
|
return [$firstAmount, $truckCount, $template['code'], "首件计费,不超过{$firstNumber}件"];
|
||||||
}
|
} else {
|
||||||
$amount = $repeatNumber > 0 ? $repeatAmount * ceil(($truckCount - $firstNumber) / $repeatNumber) : 0;
|
$amount = $repeatNumber > 0 ? $repeatAmount * ceil(($truckCount - $firstNumber) / $repeatNumber) : 0;
|
||||||
return [$firstAmount + $amount, $truckCount, $template['code'], "续件计费,超出{$firstNumber}件续件{$amount}元"];
|
return [$firstAmount + $amount, $truckCount, $template['code'], "续件计费,超出{$firstNumber}件续件{$amount}元"];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配送区域树型数据
|
* 配送区域树型数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user