创建时翻译
This commit is contained in:
@@ -66,23 +66,43 @@
|
||||
let $ = layui.jquery;
|
||||
let popup = layui.popup;
|
||||
|
||||
form.on('submit(save)', function(data) {
|
||||
$.ajax({
|
||||
// form.on('submit(save)', function(data) {
|
||||
// console.log('submit');
|
||||
// $.ajax({
|
||||
// url: '/app/admin/location/insert',
|
||||
// data: JSON.stringify(data.field),
|
||||
// dataType: 'json',
|
||||
// contentType: 'application/json',
|
||||
// type: 'post',
|
||||
// success: function(result) {
|
||||
// console.log('操作成功',result);
|
||||
// if (result.code) {
|
||||
// popup.failure(result.msg);
|
||||
// } else {
|
||||
// popup.success("<?= $translations['operation_success'] ?? '操作成功' ?>", function() {
|
||||
// parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// return false;
|
||||
// });
|
||||
layui.form.on("submit(save)", function (data) {
|
||||
layui.$.ajax({
|
||||
url: '/app/admin/location/insert',
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'post',
|
||||
success: function(result) {
|
||||
if (result.code) {
|
||||
popup.failure(result.msg);
|
||||
} else {
|
||||
popup.success("<?= $translations['operation_success'] ?? '操作成功' ?>", function() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
type: "POST",
|
||||
dateType: "json",
|
||||
data: data.field,
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
return layui.popup.failure(res.msg);
|
||||
}
|
||||
return layui.popup.success("操作成功", function () {
|
||||
parent.refreshTable();
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
return false;
|
||||
});
|
||||
})
|
||||
|
||||
@@ -76,18 +76,18 @@
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?= $translations['fbo_location'] ?? 'fbo目的地' ?></label>
|
||||
<label class="layui-form-label required"><?= $translations['fbo_location'] ?? 'fbo目的地' ?></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="fbo_locations_id" lay-filter="category" id="fbo_locations_id" required>
|
||||
<select name="fbo_locations_id" lay-filter="category" required lay-verify="required" id="fbo_locations_id" required>
|
||||
<option value=""><?= $translations['please_select'] ?? '请选择分类' ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?= $translations['current_location'] ?? '车辆所在地' ?></label>
|
||||
<label class="layui-form-label required"><?= $translations['current_location'] ?? '车辆所在地' ?></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="locations_id" lay-filter="category" id="locations_id" required>
|
||||
<select name="locations_id" lay-filter="category" required lay-verify="required" id="locations_id" required>
|
||||
<option value=""><?= $translations['please_select'] ?? '请选择分类' ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user