物流
This commit is contained in:
@@ -422,16 +422,17 @@ class VehicleController extends Crud
|
|||||||
$translations = array_merge($required_translations, $translations);
|
$translations = array_merge($required_translations, $translations);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是 POST 请求,处理数据保存和翻译
|
|
||||||
if ($request->method() === 'POST') {
|
|
||||||
$this->save($request);
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = Vehicle::where('id', $id)->first();
|
$data = Vehicle::where('id', $id)->first();
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return json(['code' => 1, 'msg' => $translations['data_not_found'] ?? '数据不存在']);
|
return json(['code' => 1, 'msg' => $translations['data_not_found'] ?? '数据不存在']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果是 POST 请求,处理数据保存和翻译
|
||||||
|
if ($request->method() == 'POST') {
|
||||||
|
$this->save($request);
|
||||||
|
return json(['code' => 0, 'msg' => '保存成功']);
|
||||||
|
}
|
||||||
|
|
||||||
return view('vehicle/updateLogistics', [
|
return view('vehicle/updateLogistics', [
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'data' => $data,
|
'data' => $data,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<!-- 代 码 结 构 -->
|
<!-- 代 码 结 构 -->
|
||||||
<body background="/app/admin/admin/images/background.svg" style="background-size: cover;">
|
<body background="/app/admin/admin/images/background.svg" style="background-size: cover;">
|
||||||
<form class="layui-form">
|
<form class="layui-form">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="height: 50px">
|
||||||
<img class="logo" src="<?=$logo?>" />
|
<img class="logo" src="<?=$logo?>" />
|
||||||
<div class="title pear-text"><?=$title?></div>
|
<div class="title pear-text"><?=$title?></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="text-align: center; margin-top: 10px;">
|
<div class="layui-form-item" style="text-align: center; margin-top: 10px;">
|
||||||
<!-- <a href="/app/admin/account/registerPage" class="pear-text">还没有账号?立即注册</a>-->
|
<!-- <a href="/app/admin/account/registerPage" class="pear-text">还没有账号?立即注册</a>-->
|
||||||
<a href="/app/admin/account/register/page" class="pear-text">还没有账号?立即注册</a>
|
<!-- <a href="/app/admin/account/register/page" class="pear-text">还没有账号?立即注册</a>-->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="edit" permission="app.admin.vehicle.update"><?= $translations['edit'] ?? '编辑' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="edit" permission="app.admin.vehicle.update"><?= $translations['edit'] ?? '编辑' ?></button>
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="remove" permission="app.admin.vehicle.delete"><?= $translations['delete'] ?? '删除' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="remove" permission="app.admin.vehicle.delete"><?= $translations['delete'] ?? '删除' ?></button>
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="detail" permission="app.admin.vehicle.detail"><?= $translations['detail'] ?? '详情' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="detail" permission="app.admin.vehicle.detail"><?= $translations['detail'] ?? '详情' ?></button>
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="updateLogistics" permission="app.admin.vehicle.updatelogistics"><?= $translations['updateLogistics'] ?? '物流修改' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="updateLogistics" permission="app.admin.vehicle.logisticsupdate"><?= $translations['updateLogistics'] ?? '物流修改' ?></button>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/app/admin/component/layui/layui.js"></script>
|
<script src="/app/admin/component/layui/layui.js"></script>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
// 表头参数
|
// 表头参数
|
||||||
let cols = [[
|
let cols = [[
|
||||||
{type: "checkbox", align: "center"},
|
{type: "checkbox", align: "center"},
|
||||||
{title: translations.vin, align: "center", field: "vin"},
|
{title: translations.vin, align: "center", field: "vin", width: 180},
|
||||||
{title: translations.brand, align: "center", field: "brand"},
|
{title: translations.brand, align: "center", field: "brand"},
|
||||||
{title: translations.model, align: "center", field: "model"},
|
{title: translations.model, align: "center", field: "model"},
|
||||||
// {title: translations.img_url, align: "center", field: "img_url"},
|
// {title: translations.img_url, align: "center", field: "img_url"},
|
||||||
|
|||||||
Reference in New Issue
Block a user