diff --git a/app/Domains/Virtual/Http/Controllers/AgentController.php b/app/Domains/Virtual/Http/Controllers/AgentController.php
index f6d5af59..66e11093 100644
--- a/app/Domains/Virtual/Http/Controllers/AgentController.php
+++ b/app/Domains/Virtual/Http/Controllers/AgentController.php
@@ -35,11 +35,11 @@ class AgentController extends Controller
$agents->load(['company:id,name']);
- return res($agents, '代理商列表', 201);
+ return res($agents, '机构列表', 201);
}
/**
- * 代理商详情.
+ * 机构详情.
*
* @return \Illuminate\Http\Response
*/
@@ -48,12 +48,12 @@ class AgentController extends Controller
$node = app(AgentRepository::class)->find($id);
if (!$node) {
- throw new NotExistException('代理商不存在或已删除');
+ throw new NotExistException('机构不存在或已删除');
}
$node->load(['company:id,name']);
- return res($node, '代理商详情', 201);
+ return res($node, '机构详情', 201);
}
diff --git a/app/Domains/Virtual/Http/Controllers/PropertyController.php b/app/Domains/Virtual/Http/Controllers/PropertyController.php
index 5e2f710b..f8e7006b 100644
--- a/app/Domains/Virtual/Http/Controllers/PropertyController.php
+++ b/app/Domains/Virtual/Http/Controllers/PropertyController.php
@@ -44,14 +44,14 @@ class PropertyController extends Controller
}
/**
- * 代理商配置.
+ * 机构配置.
*
* @return \Illuminate\Http\Response
*/
public function agents()
{
$res = app(AgentService::class)->listGroupByCompanyId();
- return res($res, '代理商配置', 201);
+ return res($res, '机构配置', 201);
}
/**
diff --git a/app/Domains/Virtual/Routes/api.php b/app/Domains/Virtual/Routes/api.php
index 8d06f468..40b378ec 100644
--- a/app/Domains/Virtual/Routes/api.php
+++ b/app/Domains/Virtual/Routes/api.php
@@ -36,7 +36,7 @@ $router->group(['prefix' => 'virtual', 'as' => 'virtual', 'middleware' => ['admi
// $router->post('/company/addresses/update/{id}', ['as' => 'company.addresses.update', 'uses' => 'CompanyAddressController@update']);
// $router->post('/company/addresses/destroy', ['as' => 'company.addresses.destroy', 'uses' => 'CompanyAddressController@destroy']);
- // 代理商管理
+ // 机构管理
$router->get('/agents/index', ['as' => 'agents.index', 'uses' => 'AgentController@index']);
$router->get('/agents/show/{id}', ['as' => 'agents.show', 'uses' => 'AgentController@show']);
$router->post('/agents/create', ['as' => 'agents.create', 'uses' => 'AgentController@create']);
diff --git a/app/Domains/Virtual/Services/AgentService.php b/app/Domains/Virtual/Services/AgentService.php
index cfef95ab..e7e04931 100644
--- a/app/Domains/Virtual/Services/AgentService.php
+++ b/app/Domains/Virtual/Services/AgentService.php
@@ -28,7 +28,7 @@ class AgentService extends Service
}
/**
- * 代理商列表
+ * 机构列表
*
* @param array $conditions
* @return mixed
@@ -50,7 +50,7 @@ class AgentService extends Service
}
/**
- * 存储代理商
+ * 存储机构
*
* @param array $attributes
* @param Agent $parent
@@ -72,9 +72,9 @@ class AgentService extends Service
$message = [
'company_id.required' => '请输入企业ID',
'company_id.exists' => '企业不存在或已删除',
- 'name.required' => '请输入代理商名称',
- 'name.between' => '代理商名称长度不合法',
- 'name.unique' => '代理商名称已经被其他用户所使用',
+ 'name.required' => '请输入机构名称',
+ 'name.between' => '机构名称长度不合法',
+ 'name.unique' => '机构名称已经被其他用户所使用',
'contacts.between' => '联系人长度不合法',
'mobile.cn_phone' => '手机号不合法',
];
@@ -96,7 +96,7 @@ class AgentService extends Service
$node = $this->agentServiceRepository->find($attributes['id']);
if (!$node) {
- throw new NotExistException('代理商不存在或已删除');
+ throw new NotExistException('机构不存在或已删除');
}
$this->agentServiceRepository->setModel($node)->update($attributes);
diff --git a/app/Domains/Virtual/Services/PropertyService.php b/app/Domains/Virtual/Services/PropertyService.php
index b76dd774..21557ee1 100644
--- a/app/Domains/Virtual/Services/PropertyService.php
+++ b/app/Domains/Virtual/Services/PropertyService.php
@@ -31,7 +31,7 @@ class PropertyService extends Service
'product' => '产品类型',
'package_type' => '套餐类型',
'province' => '省份设置',
- 'agent' => '代理商设置',
+ 'agent' => '机构设置',
];
public static $default = [
@@ -314,22 +314,22 @@ class PropertyService extends Service
$index = [];
foreach ($value['agent'] as $agent) {
if (in_array($agent['company_id'] . '_' . $agent['platform'], $index)) {
- throw new InvalidArgumentException('代理商平台重复配置');
+ throw new InvalidArgumentException('机构平台重复配置');
} else {
array_push($index, $agent['company_id'] . '_' . $agent['platform']);
}
if (!in_array($agent['agent'], array_pluck($itemAgents, 'id'))) {
- throw new InvalidArgumentException('代理商配置不正确');
+ throw new InvalidArgumentException('机构配置不正确');
}
if (!in_array($agent['platform'], array_keys($settings['platform']))) {
- throw new InvalidArgumentException('代理商平台配置不正确');
+ throw new InvalidArgumentException('机构平台配置不正确');
}
}
if (array_sum(array_pluck($value['agent'], 'percentages')) != 0 && sprintf("%.2f", array_sum(array_pluck($value['agent'], 'percentages'))) != 100) {
- throw new InvalidArgumentException('代理商百分比配置不正确');
+ throw new InvalidArgumentException('机构百分比配置不正确');
}
$value['agent'] = json_encode($value['agent'], 256);
diff --git a/app/Models/Virtual/Agent.php b/app/Models/Virtual/Agent.php
index d28cbe18..a46d468c 100644
--- a/app/Models/Virtual/Agent.php
+++ b/app/Models/Virtual/Agent.php
@@ -7,10 +7,10 @@ use App\Models\CompanyBase;
/**
* App\Models\Virtual\Agent
*
- * @property int $id 代理商ID
+ * @property int $id 机构ID
* @property int $company_id 企业ID
- * @property string $sn 代理商编号
- * @property string $name 代理商名称
+ * @property string $sn 机构编号
+ * @property string $name 机构名称
* @property string $contacts 联系人
* @property string $mobile 手机号
* @property string $address 地址
diff --git a/frontend/src/api/virtual/agents.js b/frontend/src/api/virtual/agents.js
index c75c6893..e56dac47 100644
--- a/frontend/src/api/virtual/agents.js
+++ b/frontend/src/api/virtual/agents.js
@@ -1,9 +1,9 @@
/**
- * 代理商管理
+ * 机构管理
*/
/**
- * [index 代理商列表]
+ * [index 机构列表]
* @param {[type]} data [description]
* @return {[type]} [description]
*/
@@ -14,7 +14,7 @@ export function index(data) {
}
/**
- * [show 代理商详情]
+ * [show 机构详情]
* @param {[type]} id [description]
* @return {[type]} [description]
*/
@@ -23,7 +23,7 @@ export function show(id) {
}
/**
- * [create 创建代理商]
+ * [create 创建机构]
* @param {[type]} data [description]
* @return {[type]} [description]
*/
@@ -32,7 +32,7 @@ export function create(data) {
}
/**
- * [update 修改代理商]
+ * [update 修改机构]
* @param {[type]} data [description]
* @param {[type]} id [角色id]
* @return {[type]} [description]
@@ -42,7 +42,7 @@ export function update(data, id) {
}
/**
- * [destroy 删除代理商]
+ * [destroy 删除机构]
* @param {[type]} data [description]
* @return {[type]} [description]
*/
diff --git a/frontend/src/api/virtual/properties.js b/frontend/src/api/virtual/properties.js
index 0fc9fe77..5bcaae32 100644
--- a/frontend/src/api/virtual/properties.js
+++ b/frontend/src/api/virtual/properties.js
@@ -14,7 +14,7 @@ export function settings(data) {
}
/**
- * [agents 代理商设置]
+ * [agents 机构设置]
* @param {[type]} data [description]
* @return {[type]} [description]
*/
diff --git a/frontend/src/router/routes.js b/frontend/src/router/routes.js
index a7fd0f3a..b7a0e32a 100644
--- a/frontend/src/router/routes.js
+++ b/frontend/src/router/routes.js
@@ -19,7 +19,7 @@ const routes = [
{ path: '/iframe', name: 'Iframe', component: load('iframe/index'), meta: { title: 'iframe' } },
{ path: '/companies', name: 'Companies', component: load('virtual/companies/index'), meta: { title: '企业管理' } },
{ path: '/company/accounts', name: 'CompanyAccounts', component: load('virtual/company_accounts/index'), meta: { title: '账号管理' } },
- { path: '/agents', name: 'Agents', component: load('virtual/agents/index'), meta: { title: '代理商管理' } },
+ { path: '/agents', name: 'Agents', component: load('virtual/agents/index'), meta: { title: '机构管理' } },
{ path: '/packages/:type', name: 'Packages', component: load('virtual/packages/index'), meta: { title: '套餐管理' } },
{ path: '/products/:type', name: 'Products', component: load('virtual/products/index'), meta: { title: '定价管理' } },
{ path: '/properties', name: 'Properties', component: load('virtual/properties/index'), meta: { title: '属性管理' } },
diff --git a/frontend/src/views/virtual/agents/detail.vue b/frontend/src/views/virtual/agents/detail.vue
index 55379600..ae011d40 100644
--- a/frontend/src/views/virtual/agents/detail.vue
+++ b/frontend/src/views/virtual/agents/detail.vue
@@ -3,7 +3,7 @@
:footer-hide="true"
:mask-closable="false"
@on-visible-change="visibleChange"
- title="代理商详情"
+ title="机构详情"
v-model="my_show"
width="900"
>
@@ -13,7 +13,7 @@
diff --git a/frontend/src/views/virtual/agents/index.vue b/frontend/src/views/virtual/agents/index.vue index 51c178ed..5fd3e5a7 100644 --- a/frontend/src/views/virtual/agents/index.vue +++ b/frontend/src/views/virtual/agents/index.vue @@ -16,7 +16,7 @@ icon="md-add" type="primary" v-if="hasPermission('create')" - >添加代理商 + >添加机构