6
0
Fork 0
base
panliang 2023-02-24 15:07:53 +08:00
parent a571e18aa1
commit e0c45b34fc
1 changed files with 10 additions and 4 deletions

View File

@ -183,10 +183,16 @@ class OrderController extends AdminController
$show->field('cost_price')->as(function ($value) { $show->field('cost_price')->as(function ($value) {
return bcdiv($value, 100, 2); return bcdiv($value, 100, 2);
}); });
$show->field('products_total_amount')->as(fn($value) => bcdiv($value, 100, 2)); $show->field('products_total_amount')->as(fn($value) => bcdiv($value, 100, 2))->prepend('¥');
$show->field('coupon_discount_amount')->as(fn($value) => bcdiv($value, 100, 2)); $show->field('vip_discount_amount')->as(fn ($v) => bcdiv($v, 100, 2))->prepend('- ¥');
// $show->field('vip_discount_amount')->as(fn($value) => bcdiv($value, 100, 2));
$show->field('total_amount', '支付金额')->as(fn($value) => bcdiv($value, 100, 2)); $userCouponId = $show->model()->user_coupon_id;
if ($userCouponId) {
$show->field('coupon_discount_amount')->as(fn($value) => bcdiv($value, 100, 2))->prepend('- ¥');
}
$show->field('shipping_fee')->as(fn ($v) => bcdiv($v, 100, 2))->prepend('+ ¥');
$show->field('reduced_amount')->as(fn($value) => bcdiv($value, 100, 2))->prepend('- ¥');
$show->field('total_amount', '支付金额')->as(fn($value) => bcdiv($value, 100, 2))->prepend('¥');
$show->field('sales_value'); $show->field('sales_value');
$show->field('order_status')->as(function ($v) { $show->field('order_status')->as(function ($v) {
return $this->order_status; return $this->order_status;