后台优化
This commit is contained in:
@@ -40,6 +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="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="updateLogistics" permission="app.admin.vehicle.updatelogistics"><?= $translations['updateLogistics'] ?? '物流修改' ?></button>
|
||||
</script>
|
||||
|
||||
<script src="/app/admin/component/layui/layui.js"></script>
|
||||
@@ -56,7 +57,8 @@
|
||||
const INSERT_URL = "/app/admin/vehicle/insert";
|
||||
const UPDATE_URL = "/app/admin/vehicle/update";
|
||||
const DETAIL_URL = "/app/admin/vehicle/detail";
|
||||
|
||||
const LOGISTICS_URL = "/app/admin/vehicle/updateLogistics";
|
||||
|
||||
// 翻译文本
|
||||
const translations = <?= json_encode($translations) ?>;
|
||||
|
||||
@@ -176,6 +178,8 @@
|
||||
edit(obj);
|
||||
} else if (obj.event === "detail") {
|
||||
detail(obj);
|
||||
} else if (obj.event === "updateLogistics") {
|
||||
updateLogistics(obj);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -325,6 +329,19 @@
|
||||
content: DETAIL_URL + "?" + PRIMARY_KEY + "=" + value
|
||||
});
|
||||
}
|
||||
|
||||
// 查看数据
|
||||
let updateLogistics = function(obj) {
|
||||
let value = obj.data[PRIMARY_KEY];
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: translations.edit,
|
||||
shade: 0.1,
|
||||
maxmin: true,
|
||||
area: [common.isModile()?"100%":"800px", common.isModile()?"100%":"600px"],
|
||||
content: LOGISTICS_URL + "?" + PRIMARY_KEY + "=" + value
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user