车辆归属的船舶
This commit is contained in:
@@ -286,10 +286,18 @@ class VehicleController extends Crud
|
||||
unset($data['purchase']);
|
||||
unset($data['procedure_location']);
|
||||
unset($data['fbo_destination']);
|
||||
foreach ($translationModels as $model) {
|
||||
$vehicle = $model::find($data_t['id']);
|
||||
$vehicle->fill($data_t);
|
||||
$vehicle->save();
|
||||
foreach ($translationModels as $modelC) {
|
||||
$model = new $modelC();
|
||||
if(!empty($data_t['id'])){
|
||||
$vehicleT = $model::find($data_t['id']);
|
||||
}else{
|
||||
$vehicleT = $model;
|
||||
}
|
||||
$vehicleT->fill($data_t);
|
||||
$vehicleT->save();
|
||||
}
|
||||
if(empty($data_t['id'])){
|
||||
$data['id'] = $vehicle->id;
|
||||
}
|
||||
|
||||
// 创建翻译服务实例
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'menu_vehicle' => 'إدارة السفن',
|
||||
'title' => 'إدارة السفن',
|
||||
'add' => 'إضافة',
|
||||
'edit' => 'تعديل',
|
||||
'delete' => 'حذف',
|
||||
'remove' => 'حذف',
|
||||
'detail' => 'عرض',
|
||||
'submit' => 'تأكيد',
|
||||
'reset' => 'إعادة تعيين',
|
||||
'search' => 'يبحث',
|
||||
'operation_success' => 'تمت العملية بنجاح',
|
||||
'data_not_found' => 'لم يتم العثور على البيانات',
|
||||
'no_data_selected' => 'لم يتم تحديد بيانات',
|
||||
'confirm_delete' => 'هل أنت متأكد أنك تريد الحذف؟',
|
||||
|
||||
'id' => 'ID',
|
||||
'call_sign' => 'شارة تعريف',
|
||||
'call_sign_placeholder' => 'الرجاء إدخال إشارة النداء الخاصة بك',
|
||||
'ship_cnname' => 'الاسم الصيني',
|
||||
'ship_name' => 'الاسم الانجليزي',
|
||||
'ship_name_placeholder' => 'الرجاء إدخال اسمك باللغة الإنجليزية',
|
||||
'port' => 'ميناء الوجهة',
|
||||
'port_placeholder' => 'الرجاء إدخال منفذ الوجهة',
|
||||
'last_time_utc' => 'الوقت المقدر للوصول إلى ميناء الوجهة',
|
||||
'dest' => 'وجهة',
|
||||
'dest_placeholder' => 'الرجاء إدخال وجهتك (ميناء الاتصال التالي)',
|
||||
'length' => 'طويل',
|
||||
'length_placeholder' => 'الرجاء إدخال الطول',
|
||||
'width' => 'عرض',
|
||||
'width_placeholder' => 'الرجاء إدخال العرض',
|
||||
'lat' => 'خط العرض',
|
||||
'lat_placeholder' => 'الرجاء إدخال خط العرض',
|
||||
'lng' => 'خط الطول',
|
||||
'lng_placeholder' => 'الرجاء إدخال خط الطول',
|
||||
'eta_utc' => 'الوقت المتوقع للوصول',
|
||||
'eta_utc_placeholder' => 'الرجاء إدخال وقت وصولك المتوقع',
|
||||
'departure' => 'وقت المغادرة المتوقع',
|
||||
'departure_placeholder' => 'الرجاء إدخال وقت المغادرة المتوقع',
|
||||
'status' => 'ولاية',
|
||||
'status_placeholder' => 'الرجاء تحديد الحالة',
|
||||
'status_0' => 'في انتظار الإرسال',
|
||||
'status_1' => 'جاري',
|
||||
'status_2' => 'تم التوصيل',
|
||||
'status_pending' => '待发车',
|
||||
'status_shipping_to_fbo' => '在途(发往fbo港口)',
|
||||
'status_arrived_fbo' => '抵达发货港口',
|
||||
'status_shipping_to_warehouse' => '在途(发往目的地仓库)',
|
||||
'status_arrived_warehouse' => '抵达仓库',
|
||||
'status_sold' => '售出',
|
||||
'status_purchased' => '待采购',
|
||||
'status_pickedup' => '已付定金待提车',
|
||||
'purchase_location' => '买车地点',
|
||||
'purchase_location_placeholder' => '请输入买车地点',
|
||||
'procedure_location' => '手续办理地',
|
||||
'procedure_location_placeholder' => '请输入手续办理地',
|
||||
'fbo_location' => 'FBO目的地',
|
||||
'fbo_location_placeholder' => '请选择FBO目的地',
|
||||
'current_location' => '车辆所在地',
|
||||
'current_location_placeholder' => '请选择车辆所在地',
|
||||
'final_location' => '最终目的地',
|
||||
'final_location_placeholder' => '请选择最终目的地',
|
||||
'departure_time' => 'FBO发车时间',
|
||||
'departure_time_placeholder' => '请选择发车时间',
|
||||
'arrival_time' => 'FBO到达时间',
|
||||
'arrival_time_placeholder' => '请选择到达时间',
|
||||
'shipping_cycle' => '运输周期',
|
||||
'shipping_cycle_placeholder' => '请输入运输周期',
|
||||
'img_url' => 'الصورة',
|
||||
'img_url_placeholder' => 'الرجاء إدخال رابط الصورة',
|
||||
'created_at' => 'تاريخ الإنشاء',
|
||||
'updated_at' => 'تاريخ التحديث',
|
||||
'refresh' => 'تحديث',
|
||||
'filter' => 'تصفية',
|
||||
'print' => 'طباعة',
|
||||
'export' => 'تصدير',
|
||||
'operation' => 'العمليات',
|
||||
'upload_image' => 'رفع صورة',
|
||||
'select_location' => 'اختر الموقع',
|
||||
'select_final_location' => 'اختر الوجهة',
|
||||
'select_fbo_location' => 'اختر ميناء FBO',
|
||||
'please_select' => '请选择',
|
||||
'self_owned' => '自主',
|
||||
'agent' => '代理',
|
||||
'classify' => '分类',
|
||||
'classify_placeholder' => '请选择分类',
|
||||
'procedure_vin' => 'الرجاء إدخال رقم VIN',
|
||||
|
||||
// 分页相关
|
||||
// الترقيم
|
||||
'pagination_total' => 'إجمالي {total} عنصر',
|
||||
'pagination_page' => 'الصفحة {page}',
|
||||
'pagination_limit' => '{limit} عنصر في الصفحة',
|
||||
'pagination_prev' => 'السابق',
|
||||
'pagination_next' => 'التالي',
|
||||
'pagination_jump' => 'انتقل إلى',
|
||||
'pagination_go' => 'انتقل'
|
||||
];
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'menu_vehicle' => 'ship management',
|
||||
'title' => 'ship management',
|
||||
'add' => 'Add',
|
||||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'remove' => 'Remove',
|
||||
'detail' => 'Detail',
|
||||
'submit' => 'Submit',
|
||||
'reset' => 'Reset',
|
||||
'search' => 'search',
|
||||
'operation_success' => 'Operation successful',
|
||||
'data_not_found' => 'Data not found',
|
||||
'no_data_selected' => 'No data selected',
|
||||
'confirm_delete' => 'Are you sure you want to delete?',
|
||||
|
||||
'id' => 'ID',
|
||||
'call_sign' => 'wail',
|
||||
'call_sign_placeholder' => 'Please enter the call sign',
|
||||
'ship_cnname' => 'Chinese name',
|
||||
'ship_name' => 'English Name',
|
||||
'ship_name_placeholder' => 'Please enter English name',
|
||||
'port' => 'Destination Port',
|
||||
'port_placeholder' => 'Please enter the destination port (final destination port)',
|
||||
'last_time_utc' => 'Destination port time',
|
||||
'dest' => 'destination',
|
||||
'dest_placeholder' => 'Please enter your destination (next port of call)',
|
||||
'length' => 'Length',
|
||||
'length_placeholder' => 'Please enter the length',
|
||||
'width' => 'Width',
|
||||
'width_placeholder' => 'Please enter the width',
|
||||
'lat' => 'latitude',
|
||||
'lat_placeholder' => 'Please enter latitude',
|
||||
'lng' => 'longitude',
|
||||
'lng_placeholder' => 'Please enter longitude',
|
||||
'eta_utc' => 'Estimated time of arrival',
|
||||
'eta_utc_placeholder' => 'Please enter the estimated time of arrival at the next port',
|
||||
'departure' => 'Estimated departure time',
|
||||
'departure_placeholder' => 'Please enter your estimated departure time',
|
||||
'status' => 'status',
|
||||
'status_placeholder' => 'Please select status',
|
||||
'status_0' => 'Waiting for dispatch',
|
||||
'status_1' => 'Underway',
|
||||
'status_2' => 'Delivered',
|
||||
'status_pending' => '待发车',
|
||||
'status_shipping_to_fbo' => '在途(发往fbo港口)',
|
||||
'status_arrived_fbo' => '抵达发货港口',
|
||||
'status_shipping_to_warehouse' => '在途(发往目的地仓库)',
|
||||
'status_arrived_warehouse' => '抵达仓库',
|
||||
'status_sold' => '售出',
|
||||
'status_purchased' => '待采购',
|
||||
'status_pickedup' => '已付定金待提车',
|
||||
'purchase_location' => '买车地点',
|
||||
'purchase_location_placeholder' => '请输入买车地点',
|
||||
'procedure_location' => '手续办理地',
|
||||
'procedure_location_placeholder' => '请输入手续办理地',
|
||||
'fbo_location' => 'FBO目的地',
|
||||
'fbo_location_placeholder' => '请选择FBO目的地',
|
||||
'current_location' => '车辆所在地',
|
||||
'current_location_placeholder' => '请选择车辆所在地',
|
||||
'final_location' => '最终目的地',
|
||||
'final_location_placeholder' => '请选择最终目的地',
|
||||
'departure_time' => 'FBO发车时间',
|
||||
'departure_time_placeholder' => '请选择发车时间',
|
||||
'arrival_time' => 'FBO到达时间',
|
||||
'arrival_time_placeholder' => '请选择到达时间',
|
||||
'shipping_cycle' => '运输周期',
|
||||
'shipping_cycle_placeholder' => '请输入运输周期',
|
||||
'img_url' => 'Image',
|
||||
'img_url_placeholder' => 'Please enter image URL',
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
'refresh' => 'Refresh',
|
||||
'filter' => 'Filter',
|
||||
'print' => 'Print',
|
||||
'export' => 'Export',
|
||||
'operation' => 'Operation',
|
||||
'upload_image' => 'Upload Image',
|
||||
'select_location' => 'Select Location',
|
||||
'select_final_location' => 'Select Destination',
|
||||
'select_fbo_location' => 'Select FBO Port',
|
||||
'please_select' => '请选择',
|
||||
'self_owned' => '自主',
|
||||
'agent' => '代理',
|
||||
'classify' => '分类',
|
||||
'classify_placeholder' => '请选择分类',
|
||||
'procedure_vin' => 'Please enter VIN',
|
||||
|
||||
// 分页相关
|
||||
// Pagination related
|
||||
'pagination_total' => 'Total {total} items',
|
||||
'pagination_page' => 'Page {page}',
|
||||
'pagination_limit' => '{limit} items per page',
|
||||
'pagination_prev' => 'Previous',
|
||||
'pagination_next' => 'Next',
|
||||
'pagination_jump' => 'Jump to',
|
||||
'pagination_go' => 'Go'
|
||||
];
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'menu_vehicle' => 'Управление судном',
|
||||
'title' => 'Управление судном',
|
||||
'add' => 'Добавить',
|
||||
'edit' => 'Редактировать',
|
||||
'delete' => 'Удалить',
|
||||
'remove' => 'Удалить',
|
||||
'detail' => 'Детали',
|
||||
'submit' => 'Отправить',
|
||||
'reset' => 'Сбросить',
|
||||
'search' => 'поиск',
|
||||
'operation_success' => 'Операция успешна',
|
||||
'data_not_found' => 'Данные не найдены',
|
||||
'no_data_selected' => 'Данные не выбраны',
|
||||
'confirm_delete' => 'Вы уверены, что хотите удалить?',
|
||||
|
||||
'id' => 'ID',
|
||||
'call_sign' => 'Позывной',
|
||||
'call_sign_placeholder' => 'Пожалуйста, введите ваш позывной',
|
||||
'ship_cnname' => 'китайское имя',
|
||||
'ship_name' => 'Английское имя',
|
||||
'ship_name_placeholder' => 'Пожалуйста, введите ваше английское имя',
|
||||
'port' => 'Порт назначения',
|
||||
'port_placeholder' => 'Пожалуйста, введите порт назначения',
|
||||
'last_time_utc' => 'Расчетное время прибытия в порт назначения',
|
||||
'dest' => 'место назначения',
|
||||
'dest_placeholder' => 'Введите пункт назначения (следующий порт захода)',
|
||||
'length' => 'длинный',
|
||||
'length_placeholder' => 'Пожалуйста, введите длину',
|
||||
'width' => 'Ширина',
|
||||
'width_placeholder' => 'Пожалуйста, введите ширину',
|
||||
'lat' => 'широта',
|
||||
'lat_placeholder' => 'Пожалуйста, введите широту',
|
||||
'lng' => 'долгота',
|
||||
'lng_placeholder' => 'Пожалуйста, введите долготу',
|
||||
'eta_utc' => 'Расчетное время прибытия',
|
||||
'eta_utc_placeholder' => 'Пожалуйста, введите предполагаемое время прибытия.',
|
||||
'departure' => 'Расчетное время отправления',
|
||||
'departure_placeholder' => 'Введите предполагаемое время отправления.',
|
||||
'status' => 'состояние',
|
||||
'status_placeholder' => 'Пожалуйста, выберите статус',
|
||||
'status_0' => 'Ожидание отправки',
|
||||
'status_1' => 'В процессе',
|
||||
'status_2' => 'Доставленный',
|
||||
'status_pending' => '待发车',
|
||||
'status_shipping_to_fbo' => '在途(发往fbo港口)',
|
||||
'status_arrived_fbo' => '抵达发货港口',
|
||||
'status_shipping_to_warehouse' => '在途(发往目的地仓库)',
|
||||
'status_arrived_warehouse' => '抵达仓库',
|
||||
'status_sold' => '售出',
|
||||
'status_purchased' => '待采购',
|
||||
'status_pickedup' => '已付定金待提车',
|
||||
'purchase_location' => '买车地点',
|
||||
'purchase_location_placeholder' => '请输入买车地点',
|
||||
'procedure_location' => '手续办理地',
|
||||
'procedure_location_placeholder' => '请输入手续办理地',
|
||||
'fbo_location' => 'FBO目的地',
|
||||
'fbo_location_placeholder' => '请选择FBO目的地',
|
||||
'current_location' => '车辆所在地',
|
||||
'current_location_placeholder' => '请选择车辆所在地',
|
||||
'final_location' => '最终目的地',
|
||||
'final_location_placeholder' => '请选择最终目的地',
|
||||
'departure_time' => 'FBO发车时间',
|
||||
'departure_time_placeholder' => '请选择发车时间',
|
||||
'arrival_time' => 'FBO到达时间',
|
||||
'arrival_time_placeholder' => '请选择到达时间',
|
||||
'shipping_cycle' => '运输周期',
|
||||
'shipping_cycle_placeholder' => '请输入运输周期',
|
||||
'img_url' => 'Изображение',
|
||||
'img_url_placeholder' => 'Введите URL изображения',
|
||||
'created_at' => 'Создано',
|
||||
'updated_at' => 'Обновлено',
|
||||
'refresh' => 'Обновить',
|
||||
'filter' => 'Фильтр',
|
||||
'print' => 'Печать',
|
||||
'export' => 'Экспорт',
|
||||
'operation' => 'Операции',
|
||||
'upload_image' => 'Загрузить изображение',
|
||||
'select_location' => 'Выбрать местоположение',
|
||||
'select_final_location' => 'Выбрать пункт назначения',
|
||||
'select_fbo_location' => 'Выбрать порт FBO',
|
||||
'please_select' => '请选择',
|
||||
'self_owned' => '自主',
|
||||
'agent' => '代理',
|
||||
'classify' => '分类',
|
||||
'classify_placeholder' => '请选择分类',
|
||||
'procedure_vin' => 'Пожалуйста, введите VIN-номер',
|
||||
|
||||
// 分页相关
|
||||
'pagination_total' => 'Всего {total} записей',
|
||||
'pagination_page' => 'Страница {page}',
|
||||
'pagination_limit' => '{limit} записей на странице',
|
||||
'pagination_prev' => 'Предыдущая',
|
||||
'pagination_next' => 'Следующая',
|
||||
'pagination_jump' => 'Перейти к',
|
||||
'pagination_go' => 'Перейти'
|
||||
];
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'menu_vehicle' => '船舶管理',
|
||||
'title' => '船舶管理',
|
||||
'add' => '新增',
|
||||
'edit' => '编辑',
|
||||
'delete' => '删除',
|
||||
'remove' => '删除',
|
||||
'detail' => '详情',
|
||||
'submit' => '提交',
|
||||
'reset' => '重置',
|
||||
'search' => '查询',
|
||||
'operation_success' => '操作成功',
|
||||
'data_not_found' => '未找到数据',
|
||||
'no_data_selected' => '未选择数据',
|
||||
'confirm_delete' => '确定要删除吗?',
|
||||
|
||||
'id' => 'ID',
|
||||
'call_sign' => '呼号',
|
||||
'call_sign_placeholder' => '请输入呼号',
|
||||
'ship_cnname' => '中文名称',
|
||||
'ship_name' => '英文名称',
|
||||
'ship_name_placeholder' => '请输入英文名称',
|
||||
'port' => '目的港',
|
||||
'port_placeholder' => '请输入目的港',
|
||||
'last_time_utc' => '预计到达目的港时间',
|
||||
'dest' => '目的地',
|
||||
'dest_placeholder' => '请输入目的地(下次停靠港口)',
|
||||
'length' => '长',
|
||||
'length_placeholder' => '请输入长度',
|
||||
'width' => '宽',
|
||||
'width_placeholder' => '请输入宽度',
|
||||
'lat' => '纬度',
|
||||
'lat_placeholder' => '请输入纬度',
|
||||
'lng' => '经度',
|
||||
'lng_placeholder' => '请输入经度',
|
||||
'eta_utc' => '预计到达下一港口时间',
|
||||
'eta_utc_placeholder' => '请输入预计到达时间',
|
||||
'departure' => '预计出发时间',
|
||||
'departure_placeholder' => '请输入预计出发时间',
|
||||
'status' => '状态',
|
||||
'status_placeholder' => '请选择状态',
|
||||
'status_0' => '待发',
|
||||
'status_1' => '航行中',
|
||||
'status_2' => '已送达',
|
||||
'status_pending' => '待发车',
|
||||
'status_shipping_to_fbo' => '在途(发往fbo港口)',
|
||||
'status_arrived_fbo' => '抵达发货港口',
|
||||
'status_shipping_to_warehouse' => '在途(发往目的地仓库)',
|
||||
'status_arrived_warehouse' => '抵达仓库',
|
||||
'status_sold' => '售出',
|
||||
'status_purchased' => '待采购',
|
||||
'status_pickedup' => '已付定金待提车',
|
||||
'purchase_location' => '买车地点',
|
||||
'purchase_location_placeholder' => '请输入买车地点',
|
||||
'procedure_location' => '手续办理地',
|
||||
'procedure_location_placeholder' => '请输入手续办理地',
|
||||
'fbo_location' => 'FBO目的地',
|
||||
'fbo_location_placeholder' => '请选择FBO目的地',
|
||||
'current_location' => '车辆所在地',
|
||||
'current_location_placeholder' => '请选择车辆所在地',
|
||||
'final_location' => '最终目的地',
|
||||
'final_location_placeholder' => '请选择最终目的地',
|
||||
'departure_time' => 'FBO发车时间',
|
||||
'departure_time_placeholder' => '请选择发车时间',
|
||||
'arrival_time' => 'FBO到达时间',
|
||||
'arrival_time_placeholder' => '请选择到达时间',
|
||||
'shipping_cycle' => '运输周期',
|
||||
'shipping_cycle_placeholder' => '请输入运输周期',
|
||||
'img_url' => '图片',
|
||||
'img_url_placeholder' => '请输入图片URL',
|
||||
'created_at' => '创建时间',
|
||||
'updated_at' => '更新时间',
|
||||
'refresh' => '刷新',
|
||||
'filter' => '筛选',
|
||||
'print' => '打印',
|
||||
'export' => '导出',
|
||||
'operation' => '操作',
|
||||
'upload_image' => '上传图片',
|
||||
'select_location' => '选择地点',
|
||||
'select_final_location' => '选择目的地',
|
||||
'select_fbo_location' => '选择FBO港口',
|
||||
'please_select' => '请选择',
|
||||
'self_owned' => '自主',
|
||||
'agent' => '代理',
|
||||
'classify' => '分类',
|
||||
'classify_placeholder' => '请选择分类',
|
||||
'procedure_vin' => '请输入VIN',
|
||||
|
||||
// 分页相关
|
||||
'pagination_total' => '共 {total} 条',
|
||||
'pagination_page' => '第 {page} 页',
|
||||
'pagination_limit' => '每页 {limit} 条',
|
||||
'pagination_prev' => '上一页',
|
||||
'pagination_next' => '下一页',
|
||||
'pagination_jump' => '跳转',
|
||||
'pagination_go' => '确定'
|
||||
];
|
||||
@@ -94,6 +94,15 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required"><?= $translations['ship'] ?? '运输船舶' ?></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="ship_id" lay-filter="category" required lay-verify="required" id="ship_id" required>
|
||||
<option value=""><?= $translations['please_ship'] ?? '请选择船舶' ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required"><?= $translations['final_location'] ?? '最终目的地' ?></label>
|
||||
@@ -194,6 +203,36 @@
|
||||
layer.msg('请求失败: ' + xhr.status);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/app/admin/logisticsShip/getAll',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
if (res.code !== 0) {
|
||||
layer.msg(res.msg || '加载失败');
|
||||
return;
|
||||
}
|
||||
|
||||
const select = $('#ship_id');
|
||||
select.empty().append("<option value=''><?= $translations['please_ship'] ?? '请选择船舶' ?></option>");
|
||||
|
||||
$.each(res.data, function(index, item){
|
||||
select.append(`<option value="${item.id}">${item.ship_name}</option>`);
|
||||
});
|
||||
|
||||
// 重新渲染下拉框
|
||||
form.render('select');
|
||||
|
||||
// 如果有回调函数,执行回调
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
layer.msg('请求失败: ' + xhr.status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
loadOptions();
|
||||
|
||||
@@ -95,7 +95,16 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required"><?= $translations['ship'] ?? '运输船舶' ?></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="ship_id" lay-filter="category" required lay-verify="required" id="ship_id" required>
|
||||
<option value=""><?= $translations['please_ship'] ?? '请选择船舶' ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required"><?= $translations['final_location'] ?? '最终目的地' ?></label>
|
||||
<div class="layui-input-block">
|
||||
@@ -202,6 +211,35 @@
|
||||
layer.msg('请求失败: ' + xhr.status);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: '/app/admin/logisticsShip/getAll',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
if (res.code !== 0) {
|
||||
layer.msg(res.msg || '加载失败');
|
||||
return;
|
||||
}
|
||||
|
||||
const select = $('#ship_id');
|
||||
select.empty().append("<option value=''><?= $translations['please_ship'] ?? '请选择船舶' ?></option>");
|
||||
|
||||
$.each(res.data, function(index, item){
|
||||
select.append(`<option value="${item.id}">${item.ship_name}</option>`);
|
||||
});
|
||||
|
||||
// 重新渲染下拉框
|
||||
form.render('select');
|
||||
|
||||
// 如果有回调函数,执行回调
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
layer.msg('请求失败: ' + xhr.status);
|
||||
}
|
||||
});
|
||||
|
||||
//车辆状态
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user