Browse Source

bug修改

master
lemon 4 years ago
parent
commit
c006e9b4c2
  1. 7
      app/Admin/Extensions/Grid/AuditAgent.php
  2. 4
      app/AdminAgent/Controllers/AgentProductController.php
  3. 8
      app/Common/AgentType.php
  4. 2
      app/Traits/DemandTraits.php

7
app/Admin/Extensions/Grid/AuditAgent.php

@ -1,6 +1,7 @@
<?php <?php
namespace App\Admin\Extensions\Grid; namespace App\Admin\Extensions\Grid;
use App\Common\AgentType;
use App\Common\UserStatus; use App\Common\UserStatus;
use App\Models\Agent; use App\Models\Agent;
use App\Models\Category; use App\Models\Category;
@ -111,9 +112,9 @@ class AuditAgent extends RowAction
//插入权限表 //插入权限表
if ($user->status == UserStatus::NORMAL) { if ($user->status == UserStatus::NORMAL) {
$roleArr = [ $roleArr = [
1 => 2, //计调旅行社 role_id
2 => 2, //供应商旅行社 role_id
3 => 3, //组团旅行社 role_id
AgentType::CLUSTER => 4, //计调旅行社 role_id
AgentType::SUPPLIER => 2, //供应商旅行社 role_id
AgentType::OPERATOR => 3, //组团旅行社 role_id
]; ];
DB::table(config('admin-agent.database.role_users_table')) DB::table(config('admin-agent.database.role_users_table'))
->insertOrIgnore(['role_id' => $roleArr[$user->type], 'user_id' => $this->getKey()]); ->insertOrIgnore(['role_id' => $roleArr[$user->type], 'user_id' => $this->getKey()]);

4
app/AdminAgent/Controllers/AgentProductController.php

@ -267,7 +267,9 @@ class AgentProductController extends AdminController
->dialogWidth('50%;min-width:600px;') //不起作用 ->dialogWidth('50%;min-width:600px;') //不起作用
->from(SelectGuide::make()) ->from(SelectGuide::make())
->model(Guide::class, 'id', 'name'); ->model(Guide::class, 'id', 'name');
$form->confirm('提示', '如果修改了标题、价格、产品图片、旅游须知、产品详情需要重新审核,同时<span class="btn-danger">下架所有</span>关联的代理商产品,是否继续?');
if ($form->isEditing()) {
$form->confirm('提示', '如果修改了标题、价格、产品图片、旅游须知、产品详情需要重新审核,同时<span class="btn-danger">下架所有</span>关联的代理商产品,是否继续?');
}
} else { } else {
$form->switch('is_rec')->help('推荐后将在小程序“我的”页面下方显示'); $form->switch('is_rec')->help('推荐后将在小程序“我的”页面下方显示');

8
app/Common/AgentType.php

@ -9,21 +9,21 @@ namespace App\Common;
*/ */
class AgentType class AgentType
{ {
/** @var int 计调版旅行社 */
/** @var int 组团版旅行社 */
const OPERATOR = 1; const OPERATOR = 1;
/** @var int 供应商旅行社 */ /** @var int 供应商旅行社 */
const SUPPLIER = 2; const SUPPLIER = 2;
/** @var int 组团版旅行社 */
/** @var int 计调版旅行社 */
const CLUSTER = 3; const CLUSTER = 3;
public static function array(): array public static function array(): array
{ {
return [ return [
self::OPERATOR => '计调版旅行社',
self::OPERATOR => '组团版旅行社',
self::SUPPLIER => '供应商旅行社', self::SUPPLIER => '供应商旅行社',
self::CLUSTER => '组团版旅行社',
self::CLUSTER => '计调版旅行社',
]; ];
} }

2
app/Traits/DemandTraits.php

@ -24,7 +24,7 @@ trait DemandTraits
]; ];
public static $state = [ public static $state = [
1 => '竞标' ,
1 => '竞标' ,
2 => '已竞标' , 2 => '已竞标' ,
3 => '流拍' 3 => '流拍'
]; ];

Loading…
Cancel
Save