车辆归属的船舶
This commit is contained in:
@@ -7,12 +7,18 @@ use support\Response;
|
|||||||
use plugin\admin\app\model\LogisticsShip;
|
use plugin\admin\app\model\LogisticsShip;
|
||||||
use plugin\admin\app\controller\Crud;
|
use plugin\admin\app\controller\Crud;
|
||||||
use support\exception\BusinessException;
|
use support\exception\BusinessException;
|
||||||
|
use util\Util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 船舶信息
|
* 船舶信息
|
||||||
*/
|
*/
|
||||||
class LogisticsShipController extends Crud
|
class LogisticsShipController extends Crud
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 不需要鉴权的方法
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $noNeedAuth = ['getAll'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var LogisticsShip
|
* @var LogisticsShip
|
||||||
@@ -87,4 +93,11 @@ class LogisticsShipController extends Crud
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAll()
|
||||||
|
{
|
||||||
|
$lang = session('lang', 'zh-cn');
|
||||||
|
$locations = LogisticsShip::whereIn('status',[0,1])->get();
|
||||||
|
return Util::success($locations);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,6 +280,18 @@ class VehicleController extends Crud
|
|||||||
$sourceLang = $languages[$lang];
|
$sourceLang = $languages[$lang];
|
||||||
unset($languages[$lang]);
|
unset($languages[$lang]);
|
||||||
|
|
||||||
|
$data_t = $data;
|
||||||
|
unset($data['brand']);
|
||||||
|
unset($data['model']);
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
// 创建翻译服务实例
|
// 创建翻译服务实例
|
||||||
$translatorService = new \app\service\TranslatorService();
|
$translatorService = new \app\service\TranslatorService();
|
||||||
foreach ($languages as $lang) {
|
foreach ($languages as $lang) {
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ return [
|
|||||||
'select_location' => 'اختر الموقع',
|
'select_location' => 'اختر الموقع',
|
||||||
'select_final_location' => 'اختر الوجهة',
|
'select_final_location' => 'اختر الوجهة',
|
||||||
'select_fbo_location' => 'اختر ميناء FBO',
|
'select_fbo_location' => 'اختر ميناء FBO',
|
||||||
|
'ship' => 'سفن النقل',
|
||||||
|
'please_ship' => 'الرجاء اختيار السفينة',
|
||||||
|
|
||||||
// الترقيم
|
// الترقيم
|
||||||
'pagination_total' => 'إجمالي {total} عنصر',
|
'pagination_total' => 'إجمالي {total} عنصر',
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ return [
|
|||||||
'select_location' => 'Select Location',
|
'select_location' => 'Select Location',
|
||||||
'select_final_location' => 'Select Destination',
|
'select_final_location' => 'Select Destination',
|
||||||
'select_fbo_location' => 'Select FBO Port',
|
'select_fbo_location' => 'Select FBO Port',
|
||||||
|
'ship' => 'Transport Ships',
|
||||||
|
'please_ship' => 'Please select a vessel',
|
||||||
|
|
||||||
// Pagination related
|
// Pagination related
|
||||||
'pagination_total' => 'Total {total} items',
|
'pagination_total' => 'Total {total} items',
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ return [
|
|||||||
'select_location' => 'Выбрать местоположение',
|
'select_location' => 'Выбрать местоположение',
|
||||||
'select_final_location' => 'Выбрать пункт назначения',
|
'select_final_location' => 'Выбрать пункт назначения',
|
||||||
'select_fbo_location' => 'Выбрать порт FBO',
|
'select_fbo_location' => 'Выбрать порт FBO',
|
||||||
|
'ship' => 'Транспортные корабли',
|
||||||
|
'please_ship' => 'Пожалуйста, выберите судно',
|
||||||
|
|
||||||
// Пагинация
|
// Пагинация
|
||||||
'pagination_total' => 'Всего {total} записей',
|
'pagination_total' => 'Всего {total} записей',
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ return [
|
|||||||
'agent' => '代理',
|
'agent' => '代理',
|
||||||
'classify' => '分类',
|
'classify' => '分类',
|
||||||
'classify_placeholder' => '请选择分类',
|
'classify_placeholder' => '请选择分类',
|
||||||
|
'ship' => '运输船舶',
|
||||||
|
'please_ship' => '请选择船舶',
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
'pagination_total' => '共 {total} 条',
|
'pagination_total' => '共 {total} 条',
|
||||||
'pagination_page' => '第 {page} 页',
|
'pagination_page' => '第 {page} 页',
|
||||||
|
|||||||
Reference in New Issue
Block a user