Browse Source

订单信息

master
李可松 4 years ago
parent
commit
63d821f933
  1. 14
      app/AdminAgent/Controllers/OrderController.php
  2. 14
      app/AdminSupplier/Controllers/OrderController.php

14
app/AdminAgent/Controllers/OrderController.php

@ -45,16 +45,20 @@ class OrderController extends AdminController
->display('查看') ->display('查看')
->modal('订单信息', function ($modal) { ->modal('订单信息', function ($modal) {
$info = $this->info ?? []; $info = $this->info ?? [];
/*$info = array_map(function($v) {
$info = array_map(function($v) {
if (isset($v['value'], $v['type'])) { if (isset($v['value'], $v['type'])) {
if ($v['type'] == 'image') { if ($v['type'] == 'image') {
return '<img data-action="preview-img" src="'.$v['value'].'" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">';
if (is_array($v['value'])) {
return array_reduce($v['value'], fn($v2, $v3) => $v2 . '<img data-action="preview-img" src="' . $v3 . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail"> &nbsp;');
} else {
return '<img data-action="preview-img" src="' . $v['value'] . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">';
}
} else { } else {
return $v['value'];
return is_string($v['value']) ? $v['value'] : join(',', $v['value']);
} }
} }
return $v;
}, $info);*/
return is_string($v) ? $v : json_encode($v);
}, $info);
return Table::make([], $info); return Table::make([], $info);
})->xl(); })->xl();
$grid->column('product', '产品信息') $grid->column('product', '产品信息')

14
app/AdminSupplier/Controllers/OrderController.php

@ -48,16 +48,20 @@ class OrderController extends AdminController
->display('查看') ->display('查看')
->modal('订单信息', function ($modal) { ->modal('订单信息', function ($modal) {
$info = $this->info ?? []; $info = $this->info ?? [];
/*$info = array_map(function($v) {
$info = array_map(function($v) {
if (isset($v['value'], $v['type'])) { if (isset($v['value'], $v['type'])) {
if ($v['type'] == 'image') { if ($v['type'] == 'image') {
return '<img data-action="preview-img" src="'.$v['value'].'" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">';
if (is_array($v['value'])) {
return array_reduce($v['value'], fn($v2, $v3) => $v2 . '<img data-action="preview-img" src="' . $v3 . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail"> &nbsp;');
} else {
return '<img data-action="preview-img" src="' . $v['value'] . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">';
}
} else { } else {
return $v['value'];
return is_string($v['value']) ? $v['value'] : join(',', $v['value']);
} }
} }
return $v;
}, $info);*/
return is_string($v) ? $v : json_encode($v);
}, $info);
return Table::make([], $info); return Table::make([], $info);
})->xl(); })->xl();
$grid->column('paid_money'); $grid->column('paid_money');

Loading…
Cancel
Save