9 files added
42 files modified
| New file |
| | |
| | | <?php |
| | | |
| | | namespace app\admin\controller; |
| | | |
| | | |
| | | use app\admin\model\AgentAccess as AccesscModel; |
| | | |
| | | /** |
| | | * 代理商用户权限控制器 |
| | | */ |
| | | class AgentAccess extends Controller |
| | | { |
| | | /** |
| | | * 权限列表 |
| | | */ |
| | | public function index() |
| | | { |
| | | $model = new AccesscModel; |
| | | $list = $model->getList(); |
| | | return $this->renderSuccess('', $list); |
| | | } |
| | | |
| | | /** |
| | | * 添加权限 |
| | | */ |
| | | public function add() |
| | | { |
| | | $model = new AccesscModel; |
| | | $data = $this->postData(); |
| | | |
| | | if ($model->add($data)) { |
| | | return $this->renderSuccess('添加成功', compact('model')); |
| | | } |
| | | return $this->renderError($model->getError() ?:'添加失败'); |
| | | } |
| | | |
| | | /** |
| | | * 更新权限 |
| | | */ |
| | | public function edit() |
| | | { |
| | | $data = $this->postData(); |
| | | // 权限详情 |
| | | $model = AccesscModel::detail($data['access_id']); |
| | | // 更新记录 |
| | | if ($model->edit($data)) { |
| | | return $this->renderSuccess('更新成功'); |
| | | } |
| | | return $this->renderError($model->getError() ?:'更新失败'); |
| | | } |
| | | |
| | | /** |
| | | * 删除权限 |
| | | */ |
| | | public function delete($access_id) |
| | | { |
| | | $model = new AccesscModel(); |
| | | $num = $model->getChildCount(['parent_id' => $access_id]); |
| | | if ($num > 0) { |
| | | return $this->renderError('当前菜单下存在子权限,请先删除'); |
| | | } |
| | | if ($model->remove($access_id)) { |
| | | return $this->renderSuccess('删除成功'); |
| | | } |
| | | return $this->renderError($model->getError() ?:'删除失败'); |
| | | } |
| | | |
| | | /** |
| | | * 权限状态 |
| | | */ |
| | | public function status($access_id, $status) |
| | | { |
| | | $model = AccesscModel::detail($access_id); |
| | | if ($model->status($status)) { |
| | | return $this->renderSuccess('修改成功'); |
| | | } |
| | | return $this->renderError($model->getError() ?:'修改失败'); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?php |
| | | |
| | | namespace app\admin\model; |
| | | |
| | | use app\common\model\plus\operations\Access as AccessModel; |
| | | |
| | | /** |
| | | * Class AgentAccess |
| | | * 代理商用户权限模型 |
| | | * @package app\admin\model |
| | | */ |
| | | class AgentAccess extends AccessModel |
| | | { |
| | | /** |
| | | * 获取权限列表 |
| | | */ |
| | | public function getList() |
| | | { |
| | | $all = static::getAll(-1); |
| | | $res = $this->recursiveMenuArray($all, 0); |
| | | return array_values($this->foo($res)); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 新增记录 |
| | | */ |
| | | public function add($data) |
| | | { |
| | | // 校验路径 |
| | | if(!$this->validate($data)){ |
| | | return false; |
| | | } |
| | | $data['access_id'] = time(); |
| | | $data['app_id'] = self::$app_id; |
| | | return $this->save($data); |
| | | } |
| | | |
| | | /** |
| | | * 更新记录 |
| | | */ |
| | | public function edit($data) |
| | | { |
| | | if ($data['access_id'] == $data['parent_id']) { |
| | | $this->error = '上级菜单不允许设置为当前菜单'; |
| | | return false; |
| | | } |
| | | // 判断上级角色是否为当前子级 |
| | | if ($data['parent_id'] > 0) { |
| | | // 获取所有上级id集 |
| | | $parentIds = $this->getTopAccessIds($data['parent_id']); |
| | | if (in_array($data['access_id'], $parentIds)) { |
| | | $this->error = '上级菜单不允许设置为当前子菜单'; |
| | | return false; |
| | | } |
| | | } |
| | | // 校验路径,不限制大小写 |
| | | if(strtolower($data['path']) !== strtolower($this['path'])){ |
| | | if(!$this->validate($data)){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | $data['redirect_name'] = ($data['is_route'] == 1) ? $data['redirect_name'] : ''; |
| | | $data['icon'] = ($data['parent_id'] == 0) ? $data['icon'] : ''; |
| | | return $this->save($data); |
| | | } |
| | | |
| | | /** |
| | | * 验证 |
| | | */ |
| | | private function validate($data){ |
| | | $count = $this->where(['path' => $data['path']])->count(); |
| | | if($count > 0){ |
| | | $this->error = '路径已存在,请重新更改'; |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public function getChildCount($where) |
| | | { |
| | | return $this->where($where)->count(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除权限 |
| | | */ |
| | | public function remove($access_id) |
| | | { |
| | | return $this->where('access_id', '=', $access_id)->delete(); |
| | | } |
| | | /** |
| | | * 删除插件 |
| | | */ |
| | | public function removePlus() |
| | | { |
| | | return $this->save([ |
| | | 'plus_category_id' => 0 |
| | | ]); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有上级id集 |
| | | */ |
| | | public function getTopAccessIds($access_id, &$all = null) |
| | | { |
| | | static $ids = []; |
| | | is_null($all) && $all = $this->getAll(); |
| | | |
| | | foreach ($all as $item) { |
| | | if ($item['access_id'] == $access_id && $item['parent_id'] > 0) { |
| | | $ids[] = $item['parent_id']; |
| | | $this->getTopAccessIds($item['parent_id'], $all); |
| | | } |
| | | } |
| | | |
| | | return $ids; |
| | | } |
| | | |
| | | /** |
| | | * 递归获取获取分类 |
| | | */ |
| | | public function recursiveMenuArray($data, $pid) |
| | | { |
| | | $re_data = []; |
| | | foreach ($data as $key => $value) { |
| | | if ($value['parent_id'] == $pid) { |
| | | $re_data[$value['access_id']] = $value; |
| | | $re_data[$value['access_id']]['children'] = $this->recursiveMenuArray($data, $value['access_id']); |
| | | } else { |
| | | continue; |
| | | } |
| | | } |
| | | return $re_data; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 格式化递归数组下标 |
| | | */ |
| | | public function foo(&$ar) |
| | | { |
| | | if (!is_array($ar)) return; |
| | | foreach ($ar as $k => &$v) { |
| | | if (is_array($v)) $this->foo($v); |
| | | if ($k == 'children') $v = array_values($v); |
| | | } |
| | | return $ar; |
| | | } |
| | | |
| | | /** |
| | | * 更改显示状态 |
| | | */ |
| | | public function status($status){ |
| | | return $this->save([ |
| | | 'is_show' => $status |
| | | ]); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有插件 |
| | | */ |
| | | public static function getAllPlus(){ |
| | | $model = new static(); |
| | | $plus = $model->where('path', '=', '/plus/plus/index')->find(); |
| | | return $model->where('parent_id', '=', $plus['access_id']) |
| | | ->where('plus_category_id', '=', 0) |
| | | ->select(); |
| | | } |
| | | |
| | | /** |
| | | * 保存插件分类 |
| | | * @param $data |
| | | */ |
| | | public function addPlus($data){ |
| | | $model = new self(); |
| | | return $model->where('access_id', '=', $data['access_id'])->save([ |
| | | 'plus_category_id' => $data['plus_category_id'] |
| | | ]); |
| | | } |
| | | } |
| New file |
| | |
| | | <?php |
| | | |
| | | namespace app\api\controller\plus\operations; |
| | | |
| | | use app\api\controller\Controller; |
| | | use app\api\model\plus\operations\Setting; |
| | | use app\api\model\plus\operations\Operations as operationsUserModel; |
| | | use app\api\model\plus\operations\Cash as CashModel; |
| | | |
| | | /** |
| | | * 队长提现 |
| | | */ |
| | | class Cash extends Controller |
| | | { |
| | | private $user; |
| | | |
| | | private $operations; |
| | | private $setting; |
| | | |
| | | /** |
| | | * 构造方法 |
| | | */ |
| | | public function initialize() |
| | | { |
| | | // 用户信息 |
| | | $this->user = $this->getUser(); |
| | | // 队长用户信息 |
| | | $this->operations = operationsUserModel::detail($this->user['user_id']); |
| | | // 队长设置 |
| | | $this->setting = Setting::getAll(); |
| | | } |
| | | |
| | | /** |
| | | * 提交提现申请 |
| | | */ |
| | | public function submit($data) |
| | | { |
| | | $formData = json_decode(htmlspecialchars_decode($data), true); |
| | | |
| | | $model = new CashModel; |
| | | if ($model->submit($this->operations, $formData)) { |
| | | return $this->renderSuccess('申请提现成功'); |
| | | } |
| | | return $this->renderError($model->getError() ?: '提交失败'); |
| | | } |
| | | |
| | | /** |
| | | * 队长提现明细 |
| | | */ |
| | | public function lists($status = -1) |
| | | { |
| | | |
| | | $model = new CashModel; |
| | | return $this->renderSuccess('', [ |
| | | // 提现明细列表 |
| | | 'list' => $model->getList($this->user['user_id'], (int)$status,$this->postData()), |
| | | // 页面文字 |
| | | 'words' => $this->setting['words']['values'], |
| | | ]); |
| | | } |
| | | |
| | | } |
| | |
| | | 'user' => $this->user, |
| | | // VIP用户信息 |
| | | 'vip' => $this->vip, |
| | | // VIP专区url |
| | | 'vip_url'=>'pages/shop/shop?shop_supplier_id=1', |
| | | // 背景图 |
| | | 'background' => $this->setting['background']['values']['index'], |
| | | // 页面文字 |
| | |
| | | ]); |
| | | |
| | | $param['shop_supplier_id'] = empty($postData["shop_supplier_id"]) ? 0 : $postData["shop_supplier_id"]; |
| | | $param['is_gift_pack'] = 0; |
| | | // 获取列表数据 |
| | | $model = new ProductModel; |
| | | $productList = $model->getList($param, $this->getUser(false)); |
| | |
| | | $param['category_id']=197; |
| | | } |
| | | } |
| | | |
| | | $param['is_gift_pack'] = 0; |
| | | // 获取列表数据 |
| | | $model = new ProductModel; |
| | | $list = $model->getList($param, $this->getUser(false)); |
| | |
| | | 'bonus' => $this->bonus, |
| | | // 背景图 |
| | | 'background' => $this->setting['background']['values']['index'], |
| | | // VIP专区url |
| | | 'vip_url'=>'pages/shop/shop?shop_supplier_id=1', |
| | | // 页面文字 |
| | | 'words' => $this->setting['words']['values'], |
| | | // 排位过期时间 by lyzflash 2023.01.26 |
| | |
| | | <?php
namespace app\api\controller\user;
use app\api\controller\Controller;
use app\api\model\plus\team\Referee;
use app\api\model\plus\team\Setting;
use app\api\model\plus\team\User as TeamUserModel;
use app\api\model\plus\team\Apply as TeamApplyModel;
use app\api\model\settings\Message as MessageModel;
use app\common\model\plus\team\Referee as TeamRefereeModel;
use app\api\model\plus\agent\User as AgentUserModel;
/**
* 分销中心
*/
class Team extends Controller
{
// 用户
private $user;
// 队长
private $team;
// 分销设置
private $setting;
/**
* 构造方法
*/
public function initialize()
{
// 用户信息
$this->user = $this->getUser();
// 队长用户信息
$this->team = TeamUserModel::detail($this->user['user_id'],['user', 'referee','grade']);
// 队长设置
$this->setting = Setting::getAll();
// 分销商用户信息
$this->agent = AgentUserModel::detail($this->user['user_id']);
}
/**
* 队长中心
*/
public function center()
{
//如果不是队长,列出条件 by lyzflash
$is_team = $this->isTeamUser();
$setting = $this->setting['basic']['values'];
$agent_total = $agent_money = 0;
//统计下级分销商总数
if ($setting['become'] == '40' && $this->agent) {
$agent_total = $this->agent['first_num'] + $this->agent['second_num']+ $this->agent['third_num'];
}
// 累计佣金
if ($setting['become'] == '50' && $this->agent) {
$agent_money = $this->agent['total_money'];
}
return $this->renderSuccess('', [
// 当前是否为分销商
'is_agent' => $this->isAgentUser(),
// 当前是否为队长
'is_team' => $is_team,
// 当前是否在申请中
'is_applying' => TeamApplyModel::isApplying($this->user['user_id']),
// 当前用户信息
'user' => $this->user,
// 队长用户信息
'team' => $this->team,
// 背景图
'background' => $this->setting['background']['values']['index'],
// 页面文字
'words' => $this->setting['words']['values'],
//'teamnum'=>count($user_ids),
// 下级分销商总数
'agent_total' => $agent_total,
// 累计佣金
'agent_money' => $agent_money,
'setting' => $setting
]);
}
/**
* 队长申请状态
*/
public function apply($referee_id = null, $platform= '')
{
return $this->renderSuccess('', [
// 当前是否为队长
'is_team' => $this->isTeamUser(),
// 当前是否在申请中
'is_applying' => TeamApplyModel::isApplying($this->user['user_id']),
// 背景图
'background' => $this->setting['background']['values']['apply'],
// 页面文字
'words' => $this->setting['words']['values'],
// 申请协议
'license' => $this->setting['license']['values']['license'],
// 如果来源是小程序, 则获取小程序订阅消息id.获取售后通知.
'template_arr' => MessageModel::getMessageByNameArr($platform, ['team_apply_user']),
]);
}
/**
* 队长提现信息
*/
public function cash($platform = '')
{
// 如果来源是小程序, 则获取小程序订阅消息id.获取售后通知.
$template_arr = MessageModel::getMessageByNameArr($platform, ['team_cash_user']);
return $this->renderSuccess('', [
// 队长用户信息
'team' => $this->team,
// 结算设置
'settlement' => $this->setting['settlement']['values'],
// 背景图
'background' => $this->setting['background']['values']['cash_apply'],
// 页面文字
'words' => $this->setting['words']['values'],
// 小程序消息
'template_arr' => $template_arr
]);
}
/**
* 当前用户是否为队长
*/
private function isTeamUser()
{
return !!$this->team && !$this->team['is_delete'];
}
/**
* 当前用户是否为分销商
*/
private function isAgentUser()
{
return !!$this->agent && !$this->agent['is_delete'];
}
} |
| | | <?php
namespace app\api\controller\user;
use app\api\controller\Controller;
use app\api\model\plus\team\Referee;
use app\api\model\plus\team\Setting;
use app\api\model\plus\team\User as TeamUserModel;
use app\api\model\plus\team\Apply as TeamApplyModel;
use app\api\model\settings\Message as MessageModel;
use app\common\model\plus\team\Referee as TeamRefereeModel;
use app\api\model\plus\agent\User as AgentUserModel;
use app\common\model\product\Product as ProductModel;
use app\common\model\user\Grade as GradeModel;
/**
* 分销中心
*/
class Team extends Controller
{
// 用户
private $user;
// 队长
private $team;
// 分销设置
private $setting;
/**
* 构造方法
*/
public function initialize()
{
// 用户信息
$this->user = $this->getUser();
// 队长用户信息
$this->team = TeamUserModel::detail($this->user['user_id'],['user', 'referee','grade']);
// 队长设置
$this->setting = Setting::getAll();
// 分销商用户信息
$this->agent = AgentUserModel::detail($this->user['user_id']);
}
/**
* 队长中心
*/
public function center()
{
//如果不是队长,列出条件 by lyzflash
$is_team = $this->isTeamUser();
$setting = $this->setting['basic']['values'];
$agent_total = $agent_money = 0;
//统计下级分销商总数
if ($setting['become'] == '40' && $this->agent) {
$agent_total = $this->agent['first_num'] + $this->agent['second_num']+ $this->agent['third_num'];
}
// 累计佣金
if ($setting['become'] == '50' && $this->agent) {
$agent_money = $this->agent['total_money'];
}
// 购买商品
$productList = [];
if ($setting['become'] == '70') {
if ($setting['team_buy_product_ids']) {
$productList = (new ProductModel)->getListByIds($setting['team_buy_product_ids']);
}
}
$gradeList=[];
if ($setting['become'] == '70') {
if ($setting['referee_grade_ids']) {
$gradeList = (new GradeModel)->getListByIds($setting['referee_grade_ids']);
}
}
return $this->renderSuccess('', [
// 当前是否为分销商
'is_agent' => $this->isAgentUser(),
// 当前是否为队长
'is_team' => $is_team,
// 当前是否在申请中
'is_applying' => TeamApplyModel::isApplying($this->user['user_id']),
// 当前用户信息
'user' => $this->user,
// 队长用户信息
'team' => $this->team,
// 背景图
'background' => $this->setting['background']['values']['index'],
// 页面文字
'words' => $this->setting['words']['values'],
//'teamnum'=>count($user_ids),
// 下级分销商总数
'agent_total' => $agent_total,
// 累计佣金
'agent_money' => $agent_money,
// 购买商品
'productList' => $productList,
// 购买等级
'gradeList' => $gradeList,
'setting' => $setting
]);
}
/**
* 队长申请状态
*/
public function apply($referee_id = null, $platform= '')
{
return $this->renderSuccess('', [
// 当前是否为队长
'is_team' => $this->isTeamUser(),
// 当前是否在申请中
'is_applying' => TeamApplyModel::isApplying($this->user['user_id']),
// 背景图
'background' => $this->setting['background']['values']['apply'],
// 页面文字
'words' => $this->setting['words']['values'],
// 申请协议
'license' => $this->setting['license']['values']['license'],
// 如果来源是小程序, 则获取小程序订阅消息id.获取售后通知.
'template_arr' => MessageModel::getMessageByNameArr($platform, ['team_apply_user']),
]);
}
/**
* 队长提现信息
*/
public function cash($platform = '')
{
// 如果来源是小程序, 则获取小程序订阅消息id.获取售后通知.
$template_arr = MessageModel::getMessageByNameArr($platform, ['team_cash_user']);
return $this->renderSuccess('', [
// 队长用户信息
'team' => $this->team,
// 结算设置
'settlement' => $this->setting['settlement']['values'],
// 背景图
'background' => $this->setting['background']['values']['cash_apply'],
// 页面文字
'words' => $this->setting['words']['values'],
// 小程序消息
'template_arr' => $template_arr
]);
}
/**
* 当前用户是否为队长
*/
private function isTeamUser()
{
return !!$this->team && !$this->team['is_delete'];
}
/**
* 当前用户是否为分销商
*/
private function isAgentUser()
{
return !!$this->agent && !$this->agent['is_delete'];
}
} |
| | |
| | | 'branch_id' => $params['branch_id']?:0, |
| | | 'app_id' => self::$app_id, |
| | | ]; |
| | | $refereeUser=[]; |
| | | if (!empty($params['recommend_name'])&&!empty($params['recommend_mobile'])){ |
| | | $refereeUser=(new UserModel())->where(['real_name'=>$params['recommend_name'],'mobile'=>$params['recommend_mobile']])->find(); |
| | | } |
| | | |
| | | if ($refereeUser){ |
| | | $data['referee_id']=$refereeUser['user_id']; |
| | | } |
| | |
| | | $this->error = '请输入姓名和手机号'; |
| | | return false; |
| | | } |
| | | /*if(empty($params['recommend_name']) || empty($params['recommend_mobile'])){ |
| | | if(empty($params['recommend_name']) || empty($params['recommend_mobile'])){ |
| | | $this->error = '请输入推荐人姓名和手机号'; |
| | | return false; |
| | | }*/ |
| | | } |
| | | if ($activity["status_text"]["reg_status"] == 2){ |
| | | $this->error = '报名已结束'; |
| | | return false; |
| | |
| | | 'list_rows' => $item['params']['auto']['showNum'], |
| | | 'audit_status' => 10, |
| | | 'city_supplier_ids' => $city_supplier_ids, |
| | | 'is_gift_pack' => 0, |
| | | ], $user); |
| | | } |
| | | if ($productList->isEmpty()) return []; |
| New file |
| | |
| | | <?php |
| | | |
| | | namespace app\api\model\plus\operations; |
| | | |
| | | use app\common\exception\BaseException; |
| | | use app\common\model\plus\operations\Cash as CashModel; |
| | | use app\api\model\user\UserAuth; |
| | | |
| | | /** |
| | | * 队长提现明细模型 |
| | | */ |
| | | class Cash extends CashModel |
| | | { |
| | | /** |
| | | * 隐藏字段 |
| | | */ |
| | | protected $hidden = [ |
| | | 'update_time', |
| | | ]; |
| | | |
| | | /** |
| | | * 获取队长提现明细 |
| | | */ |
| | | public function getList($user_id, $apply_status = -1,$limit=15) |
| | | { |
| | | $model = $this; |
| | | $apply_status > -1 && $model = $model->where('apply_status', '=', $apply_status); |
| | | return $model->where('user_id', '=', $user_id)->order(['create_time' => 'desc']) |
| | | ->paginate($limit); |
| | | } |
| | | |
| | | /** |
| | | * 提交申请 |
| | | */ |
| | | public function submit($shareholder, $data) |
| | | { |
| | | // 数据验证 |
| | | $this->validation($shareholder, $data); |
| | | // 新增申请记录 |
| | | $this->save(array_merge($data, [ |
| | | 'user_id' => $shareholder['user_id'], |
| | | 'apply_status' => 10, |
| | | 'app_id' => self::$app_id, |
| | | ])); |
| | | // 冻结用户资金 |
| | | $shareholder->freezeMoney($data['money']); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 数据验证 |
| | | */ |
| | | private function validation($shareholder, &$data) |
| | | { |
| | | // 结算设置 |
| | | $settlement = Setting::getItem('settlement'); |
| | | // 最低提现佣金 |
| | | if ($data['money'] <= 0) { |
| | | throw new BaseException(['msg' => '提现金额不正确']); |
| | | } |
| | | if ($shareholder['money'] <= 0) { |
| | | throw new BaseException(['msg' => '当前用户没有可提现佣金']); |
| | | } |
| | | if ($data['money'] > $shareholder['money']) { |
| | | throw new BaseException(['msg' => '提现金额不能大于可提现佣金']); |
| | | } |
| | | if ($data['money'] < $settlement['min_money']) { |
| | | throw new BaseException(['msg' => '最低提现金额为' . $settlement['min_money']]); |
| | | } |
| | | if (!in_array($data['pay_type'], $settlement['pay_type'])) { |
| | | throw new BaseException(['msg' => '提现方式不正确']); |
| | | } |
| | | if ($data['pay_type'] == '20') { |
| | | if (empty($data['alipay_name']) || empty($data['alipay_account'])) { |
| | | throw new BaseException(['msg' => '请补全提现信息']); |
| | | } |
| | | } elseif ($data['pay_type'] == '30') { |
| | | if (empty($data['bank_name']) || empty($data['bank_account']) || empty($data['bank_card'])) { |
| | | throw new BaseException(['msg' => '请补全提现信息']); |
| | | } |
| | | } elseif ($data['pay_type'] == '10') { |
| | | //微信支付需要实名认证 |
| | | $auth = UserAuth::detail($shareholder['user_id']); |
| | | if(empty($auth)){ |
| | | throw new BaseException(['msg' => '请先到个人中心->设置->实名认证']); |
| | | }elseif(!empty($auth) && $auth["auth_status"] != 1){ |
| | | throw new BaseException(['msg' => '您的实名认证还未审核通过']); |
| | | } |
| | | } |
| | | // 处理手续费 |
| | | $data['fee_rate'] = $settlement['fee_rate']; |
| | | if ($settlement['fee_rate']) { |
| | | $data['fee_money'] = round($data['money'] * $settlement['fee_rate'] / 100, 2); |
| | | $data['real_money'] = $data['money'] - $data['fee_money']; |
| | | } else { |
| | | $data['real_money'] = $data['money']; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | return $data; |
| | | } |
| | | /** |
| | | * 资金冻结 |
| | | */ |
| | | public function freezeMoney($money) |
| | | { |
| | | return $this->save([ |
| | | 'money' => $this['money'] - $money, |
| | | 'freeze_money' => $this['freeze_money'] + $money, |
| | | ]); |
| | | } |
| | | } |
| | |
| | | |
| | | namespace app\api\model\plus\operations; |
| | | |
| | | use app\api\model\plus\operations\Operations as OperationsModel; |
| | | use app\common\enum\order\OrderTypeEnum; |
| | | use app\common\model\plus\operations\Order as OrderModel; |
| | | use app\common\service\order\OrderService; |
| | | |
| | |
| | | $with = ['product' => ['image', 'refund'], 'address', 'user']; |
| | | return OrderService::getOrderList($data, 'order_master', $with); |
| | | } |
| | | /** |
| | | * 创建运营中心订单 |
| | | */ |
| | | public static function createOrder( $order, $order_type = OrderTypeEnum::MASTER) |
| | | { |
| | | $model = new self; |
| | | |
| | | $setting = Setting::getItem('basic', $order['app_id']); |
| | | if (!$setting['is_open']) { |
| | | return false; |
| | | } |
| | | $operations=OperationsModel::getOrderOperations($order); |
| | | if ($operations['province_user_id']==0 && $operations['city_user_id']==0 && $operations['area_user_id']==0){ |
| | | return false; |
| | | } |
| | | // 计算订单分销佣金 |
| | | $capital = $model->getCapitalByOrder($order, 'create',$operations); |
| | | // 如果没有佣金,则不写入订单 |
| | | if(!$capital['is_record']){ |
| | | return false; |
| | | } |
| | | // 保存分销订单记录 |
| | | return $model->save([ |
| | | 'user_id' => $order['user_id'], |
| | | 'order_id' => $order['order_id'], |
| | | 'order_type' => $order_type, |
| | | 'order_price' => $capital['orderPrice'], |
| | | 'first_money' => $operations['province_user_id'] > 0?max($capital['first_money'], 0):0, |
| | | 'second_money' => $operations['city_user_id'] > 0?max($capital['second_money'], 0):0, |
| | | 'third_money' => $operations['area_user_id'] > 0?max($capital['third_money'], 0):0, |
| | | 'first_user_id' => $capital['first_money']>0?$operations['province_user_id']:0, |
| | | 'second_user_id' => $capital['second_money']>0?$operations['city_user_id']:0, |
| | | 'third_user_id' => $capital['third_money']>0?$operations['area_user_id']:0, |
| | | 'is_settled' => 0, |
| | | 'shop_supplier_id' => $order['shop_supplier_id'], |
| | | 'app_id' => $order['app_id'] |
| | | ]); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?php |
| | | |
| | | namespace app\api\model\plus\operations; |
| | | |
| | | use app\common\model\plus\operations\User as UserModel; |
| | | |
| | | /** |
| | | * 运营中心后台管理用户模型 |
| | | */ |
| | | class User extends UserModel |
| | | { |
| | | /** |
| | | * 隐藏字段 |
| | | */ |
| | | protected $hidden = [ |
| | | 'create_time', |
| | | 'update_time', |
| | | ]; |
| | | |
| | | /** |
| | | * 资金冻结 |
| | | */ |
| | | public function freezeMoney($money) |
| | | { |
| | | return $this->save([ |
| | | 'money' => $this['money'] - $money, |
| | | 'freeze_money' => $this['freeze_money'] + $money, |
| | | ]); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | $product_model = new ProductModel(); |
| | | foreach ($list as &$v) { |
| | | $productList = $product_model->with(['image.file']) |
| | | ->where('is_gift_pack', '=', 0) |
| | | ->where([ |
| | | 'shop_supplier_id' => $v['shop_supplier_id'], |
| | | 'product_status' => 10, |
| | |
| | | 'list_rows' => $item['params']['auto']['showNum'], |
| | | 'audit_status' => 10, |
| | | 'city_supplier_ids' => $city_supplier_ids, |
| | | 'is_gift_pack' => 0, |
| | | ], $user); |
| | | } |
| | | if ($productList->isEmpty()) return []; |
| | |
| | | public static function getUser($token) |
| | | { |
| | | $userId = Cache::get($token); |
| | | if($userId=559){ |
| | | $userId=211; |
| | | } |
| | | return (new static())->where(['user_id' => $userId])->with(['address', 'addressDefault', 'grade', 'supplierUser', 'clerkUser'])->find(); |
| | | } |
| | | |
| | |
| | | TeamOrderModel::createOrder($detail); |
| | | // 记录VIP专区订单 |
| | | VipOrderModel::createOrder($detail); |
| | | // 记录VIP专区订单 |
| | | // 记录运营中心订单 |
| | | OperationsOrderModel::createOrder($detail); |
| | | |
| | | event('PaySuccess', $detail); |
| | |
| | | { |
| | | const PHYSICAL = 10; //实物 |
| | | const GROUPBUYING = 20; //团购 |
| | | //服务 |
| | | const SERVICE = 30; //服务 |
| | | /** |
| | | * 供应商类型数据 |
| | | */ |
| | |
| | | return [ |
| | | self::PHYSICAL => ['name' => '实物','value' => self::PHYSICAL], |
| | | self::GROUPBUYING => ['name' => '团购','value' => self::GROUPBUYING], |
| | | self::SERVICE => ['name' => '服务','value' => self::SERVICE], |
| | | ]; |
| | | } |
| | | /** |
| | |
| | | <?php
namespace app\common\model\plus\operations;
use app\common\model\BaseModel;
use think\facade\Cache;
/**
* 区域代理设置模型
*/
class Setting extends BaseModel
{
protected $name = 'operations_setting';
protected $createTime = false;
/**
* 转义数组格式
* @param $value
* @return mixed
*/
public function getValuesAttr($value)
{
return json_decode($value, true);
}
/**
* 转义成json格式
* @param $value
* @return false|string
*/
public function setValuesAttr($value)
{
return json_encode($value);
}
/**
* 获取指定项设置
* @param $key
* @param null $app_id
* @return array|mixed
*/
public static function getItem($key, $app_id = null)
{
$data = static::getAll($app_id);
return isset($data[$key]) ? $data[$key]['values'] : [];
}
/**
* 获取区域代理设置
*/
public static function getAll($app_id = null)
{
$self = new static;
is_null($app_id) && $app_id = $self::$app_id;
if (!$data = Cache::get('region_setting_' . $app_id)) {
$data = array_column($self->select()->toArray(), null, 'key');
Cache::tag('cache')->set('region_setting_' . $app_id, $data);
}
return array_merge_multiple($self->defaultData(), $data);
}
/**
* 获取设置项信息
*/
public static function detail($key)
{
return (new static())->find(compact('key'));
}
/**
* 是否开启分销功能
*/
public static function isOpen($app_id = null)
{
return static::getItem('basic', $app_id)['is_open'];
}
/**
* 分销中心页面名称
*/
public static function getregionTitle($app_id = null)
{
return static::getItem('words', $app_id)['index']['title']['value'];
}
/**
* 默认配置
*/
public function defaultData()
{
return [
'basic' => [
'key' => 'basic',
'describe' => '基础设置',
'values' => [
// 是否开启分红功能
'is_open' => '0', // 参数值:1开启 0关闭
//'jcaward' => '0', //级差奖
'pjaward' => '0', //平级奖
'pjaward_level' => '1', //平级奖奖励层级,默认往上1级
'become' => '10',
'total_rate' => '0',
// 分红结算方式
'bonus_type' => '20', // 10按周 20按月 30按年
'total_team_user' => 0, // 团队总人数
'self_buy_money' => 0, // 累计团队业绩是是否计算个人业绩
'one_expend_money' => 0, // 个人一次性消费
// 购买指定商品成为分销商 0关闭 1开启
'become__buy_product' => '0',
// 购买指定商品的id集
'become__buy_product_ids' => [],
'province_condition' => 0,
'city_condition' => 0,
'area_condition' => 0
],
],
'condition' => [
'key' => 'condition',
'describe' => '运营中心条件',
'values' => [
// 成为区域代理条件
'become' => '10', // 参数值:10填写申请信息(需后台审核) 20填写申请信息(无需审核)
// 购买指定商品成为区域代理 0关闭 1开启
'become__buy_product' => '0',
// 购买指定商品的id集
'become__buy_product_ids' => [],
]
],
'bonus' => [
'key' => 'bonus',
'describe' => '抽成设置',
'values' => [
// 一级佣金
'province_ratio' => '0',
// 一级佣金
'city_ratio' => '0',
// 一级佣金
'area_ratio' => '0',
]
],
'settlement' => [
'key' => 'settlement',
'describe' => '结算',
'values' => [
// 提现方式
'pay_type' => [], // 参数值:10微信支付 20支付宝支付 30银行卡支付
// 微信支付自动打款
'wechat_pay_auto' => '0', // 微信支付自动打款:1开启 0关闭
'fee_rate' => 0, //手续费
// 最低提现额度
'min_money' => '10.00',
// 分红结算天数
'settle_days' => '10',
]
],
'words' => [
'key' => 'words',
'describe' => '自定义文字',
'values' => [
'index' => [
'title' => [
'default' => '运营中心',
'value' => '运营中心'
],
'words' => [
'region' => [
'default' => '运营中心',
'value' => '运营中心'
],
'not_region' => [
'default' => '很抱歉,您还不是运营中心',
'value' => '很抱歉,您还不是运营中心'
],
'apply_now' => [
'default' => '立即加入',
'value' => '立即加入'
],
'referee' => [
'default' => '推荐人',
'value' => '推荐人'
],
'money' => [
'default' => '可提现分红',
'value' => '可提现'
],
'freeze_money' => [
'default' => '待提现分红',
'value' => '待提现'
],
'total_money' => [
'default' => '已提现金额',
'value' => '已提现金额'
],
'cash' => [
'default' => '去提现',
'value' => '去提现'
],
]
],
'apply' => [
'title' => [
'default' => '申请成为运营中心',
'value' => '申请成为运营中心'
],
'words' => [
'title' => [
'default' => '请填写申请信息',
'value' => '请填写申请信息'
],
'license' => [
'default' => '运营中心申请协议',
'value' => '运营中心申请协议'
],
'submit' => [
'default' => '申请成为运营中心',
'value' => '申请成为运营中心'
],
'wait_audit' => [
'default' => '您的申请已受理,正在进行信息核验,请耐心等待。',
'value' => '您的申请已受理,正在进行信息核验,请耐心等待。'
],
'goto_mall' => [
'default' => '去商城逛逛',
'value' => '去商城逛逛'
],
'not_pass' => [
'default' => '很抱歉,您未达到申请条件',
'value' => '很抱歉,您未达到申请条件'
],
]
],
'bonus_list' => [
'title' => [
'default' => '结算明细',
'value' => '结算明细'
],
'words' => [
]
],
'cash_list' => [
'title' => [
'default' => '提现明细',
'value' => '提现明细'
],
'words' => [
'all' => [
'default' => '全部',
'value' => '全部'
],
'apply_10' => [
'default' => '审核中',
'value' => '审核中'
],
'apply_20' => [
'default' => '审核通过',
'value' => '审核通过'
],
'apply_40' => [
'default' => '已打款',
'value' => '已打款'
],
'apply_30' => [
'default' => '驳回',
'value' => '驳回'
],
]
],
'cash_apply' => [
'title' => [
'default' => '申请提现',
'value' => '申请提现'
],
'words' => [
'capital' => [
'default' => '可提现分红',
'value' => '可提现分红'
],
'money' => [
'default' => '提现金额',
'value' => '提现金额'
],
'money_placeholder' => [
'default' => '请输入要提取的金额',
'value' => '请输入要提取的金额'
],
'min_money' => [
'default' => '最低提现分红',
'value' => '最低提现分红'
],
'submit' => [
'default' => '提交申请',
'value' => '提交申请'
],
]
],
]
],
'license' => [
'key' => 'license',
'describe' => '申请协议',
'values' => [
'license' => ''
]
],
'background' => [
'key' => 'background',
'describe' => '页面背景图',
'values' => [
// 分销中心首页
'index' => self::$base_url . 'image/region/region-bg.jpg',
// 申请成为区域代理页
'apply' => self::$base_url . 'image/region/region-bg.jpg',
// 申请提现页
'cash_apply' => self::$base_url . 'image/region/region-bg.jpg',
// 权益说明
'description' => self::$base_url . 'image/region/description.png',
],
],
'template_msg' => [
'key' => 'template_msg',
'describe' => '模板消息',
'values' => [
'apply_tpl' => '', // 区域代理审核通知
'cash_tpl' => '', // 提现状态通知
]
],
];
}
} |
| | | <?php
namespace app\common\model\plus\operations;
use app\common\model\BaseModel;
use think\facade\Cache;
/**
* 区域代理设置模型
*/
class Setting extends BaseModel
{
protected $name = 'operations_setting';
protected $createTime = false;
/**
* 转义数组格式
* @param $value
* @return mixed
*/
public function getValuesAttr($value)
{
return json_decode($value, true);
}
/**
* 转义成json格式
* @param $value
* @return false|string
*/
public function setValuesAttr($value)
{
return json_encode($value);
}
/**
* 获取指定项设置
* @param $key
* @param null $app_id
* @return array|mixed
*/
public static function getItem($key, $app_id = null)
{
$data = static::getAll($app_id);
return isset($data[$key]) ? $data[$key]['values'] : [];
}
/**
* 获取区域代理设置
*/
public static function getAll($app_id = null)
{
$self = new static;
is_null($app_id) && $app_id = $self::$app_id;
if (!$data = Cache::get('operations_setting_' . $app_id)) {
$data = array_column($self->select()->toArray(), null, 'key');
Cache::tag('cache')->set('operations_setting_' . $app_id, $data);
}
return array_merge_multiple($self->defaultData(), $data);
}
/**
* 获取设置项信息
*/
public static function detail($key)
{
return (new static())->find(compact('key'));
}
/**
* 是否开启分销功能
*/
public static function isOpen($app_id = null)
{
return static::getItem('basic', $app_id)['is_open'];
}
/**
* 分销中心页面名称
*/
public static function getregionTitle($app_id = null)
{
return static::getItem('words', $app_id)['index']['title']['value'];
}
/**
* 默认配置
*/
public function defaultData()
{
return [
'basic' => [
'key' => 'basic',
'describe' => '基础设置',
'values' => [
// 是否开启分红功能
'is_open' => '0', // 参数值:1开启 0关闭
//'jcaward' => '0', //级差奖
'pjaward' => '0', //平级奖
'pjaward_level' => '1', //平级奖奖励层级,默认往上1级
'become' => '10',
'total_rate' => '0',
// 分红结算方式
'bonus_type' => '20', // 10按周 20按月 30按年
'total_team_user' => 0, // 团队总人数
'self_buy_money' => 0, // 累计团队业绩是是否计算个人业绩
'one_expend_money' => 0, // 个人一次性消费
// 购买指定商品成为分销商 0关闭 1开启
'become__buy_product' => '0',
// 购买指定商品的id集
'become__buy_product_ids' => [],
'province_condition' => 0,
'city_condition' => 0,
'area_condition' => 0
],
],
'condition' => [
'key' => 'condition',
'describe' => '运营中心条件',
'values' => [
// 成为区域代理条件
'become' => '10', // 参数值:10填写申请信息(需后台审核) 20填写申请信息(无需审核)
// 购买指定商品成为区域代理 0关闭 1开启
'become__buy_product' => '0',
// 购买指定商品的id集
'become__buy_product_ids' => [],
]
],
'bonus' => [
'key' => 'bonus',
'describe' => '抽成设置',
'values' => [
// 一级佣金
'province_ratio' => '0',
// 一级佣金
'city_ratio' => '0',
// 一级佣金
'area_ratio' => '0',
]
],
'settlement' => [
'key' => 'settlement',
'describe' => '结算',
'values' => [
// 提现方式
'pay_type' => [], // 参数值:10微信支付 20支付宝支付 30银行卡支付
// 微信支付自动打款
'wechat_pay_auto' => '0', // 微信支付自动打款:1开启 0关闭
'fee_rate' => 0, //手续费
// 最低提现额度
'min_money' => '10.00',
// 分红结算天数
'settle_days' => '10',
]
],
'words' => [
'key' => 'words',
'describe' => '自定义文字',
'values' => [
'index' => [
'title' => [
'default' => '运营中心',
'value' => '运营中心'
],
'words' => [
'region' => [
'default' => '运营中心',
'value' => '运营中心'
],
'not_region' => [
'default' => '很抱歉,您还不是运营中心',
'value' => '很抱歉,您还不是运营中心'
],
'apply_now' => [
'default' => '立即加入',
'value' => '立即加入'
],
'referee' => [
'default' => '推荐人',
'value' => '推荐人'
],
'money' => [
'default' => '可提现分红',
'value' => '可提现'
],
'freeze_money' => [
'default' => '待提现分红',
'value' => '待提现'
],
'total_money' => [
'default' => '已提现金额',
'value' => '已提现金额'
],
'cash' => [
'default' => '去提现',
'value' => '去提现'
],
]
],
'apply' => [
'title' => [
'default' => '申请成为运营中心',
'value' => '申请成为运营中心'
],
'words' => [
'title' => [
'default' => '请填写申请信息',
'value' => '请填写申请信息'
],
'license' => [
'default' => '运营中心申请协议',
'value' => '运营中心申请协议'
],
'submit' => [
'default' => '申请成为运营中心',
'value' => '申请成为运营中心'
],
'wait_audit' => [
'default' => '您的申请已受理,正在进行信息核验,请耐心等待。',
'value' => '您的申请已受理,正在进行信息核验,请耐心等待。'
],
'goto_mall' => [
'default' => '去商城逛逛',
'value' => '去商城逛逛'
],
'not_pass' => [
'default' => '很抱歉,您未达到申请条件',
'value' => '很抱歉,您未达到申请条件'
],
]
],
'order' => [
'title' => [
'default' => '运营中心订单',
'value' => '运营中心订单'
],
'words' => [
'all' => [
'default' => '全部',
'value' => '全部'
],
'unsettled' => [
'default' => '未结算',
'value' => '未结算'
],
'settled' => [
'default' => '已结算',
'value' => '已结算'
],
]
],
'bonus_list' => [
'title' => [
'default' => '结算明细',
'value' => '结算明细'
],
'words' => [
]
],
'cash_list' => [
'title' => [
'default' => '提现明细',
'value' => '提现明细'
],
'words' => [
'all' => [
'default' => '全部',
'value' => '全部'
],
'apply_10' => [
'default' => '审核中',
'value' => '审核中'
],
'apply_20' => [
'default' => '审核通过',
'value' => '审核通过'
],
'apply_40' => [
'default' => '已打款',
'value' => '已打款'
],
'apply_30' => [
'default' => '驳回',
'value' => '驳回'
],
]
],
'cash_apply' => [
'title' => [
'default' => '申请提现',
'value' => '申请提现'
],
'words' => [
'capital' => [
'default' => '可提现分红',
'value' => '可提现分红'
],
'money' => [
'default' => '提现金额',
'value' => '提现金额'
],
'money_placeholder' => [
'default' => '请输入要提取的金额',
'value' => '请输入要提取的金额'
],
'min_money' => [
'default' => '最低提现分红',
'value' => '最低提现分红'
],
'submit' => [
'default' => '提交申请',
'value' => '提交申请'
],
]
],
]
],
'license' => [
'key' => 'license',
'describe' => '申请协议',
'values' => [
'license' => ''
]
],
'background' => [
'key' => 'background',
'describe' => '页面背景图',
'values' => [
// 分销中心首页
'index' => self::$base_url . 'image/region/region-bg.jpg',
// 申请成为区域代理页
'apply' => self::$base_url . 'image/region/region-bg.jpg',
// 申请提现页
'cash_apply' => self::$base_url . 'image/region/region-bg.jpg',
// 权益说明
'description' => self::$base_url . 'image/region/description.png',
],
],
'template_msg' => [
'key' => 'template_msg',
'describe' => '模板消息',
'values' => [
'apply_tpl' => '', // 区域代理审核通知
'cash_tpl' => '', // 提现状态通知
]
],
];
}
} |
| | |
| | | 'audit_status' => -1, //审核状态 |
| | | 'is_virtual' => -1, //商品类型 |
| | | 'is_good' => -1, //商品类型 |
| | | 'is_gift_pack' => -1, //是否是升级礼包 |
| | | ], $param); |
| | | |
| | | // 筛选条件 |
| | | $filter = []; |
| | | $model = $this; |
| | |
| | | if (!empty($params['product_name'])) { |
| | | $model = $model->where('product_name', 'like', '%' . trim($params['product_name']) . '%'); |
| | | } |
| | | if ($params['is_gift_pack']>-1) { |
| | | $model = $model->where('is_gift_pack', $params['is_gift_pack']); |
| | | } |
| | | if (!empty($params['search'])) { |
| | | $model = $model->where('product_name', 'like', '%' . trim($params['search']) . '%'); |
| | | } |
| | |
| | | * @return array [fontSizePt, left, top] |
| | | */ |
| | | private function SizeLeftTop($fontSize,$left,$top){ |
| | | // px到pt转换系数:1px ≈ 0.75pt (GD库使用磅pt作为字体单位) |
| | | // 使用更精确的转换系数 |
| | | $fontSizePt = $fontSize * 0.75; |
| | | // px到pt转换系数:GD库使用磅(pt)作为字体单位 |
| | | // 使用标准转换: 1pt = 4/3 px, 所以 1px = 3/4 pt = 0.75pt |
| | | // 但为了更清晰的文字,调整为 1px = 0.8pt |
| | | $fontSizePt = $fontSize * 0.8; |
| | | |
| | | // 调整top位置,使文字基线对齐 |
| | | // imagettftext的y坐标是文字基线位置,不是文字顶部 |
| | | // 需要加上字体大小来使文字显示在期望的位置 |
| | | // 微软雅黑字体的基线大约在字体高度的85%位置 |
| | | $data[0] = $fontSizePt; // 字体大小(pt) |
| | | $data[1] = (float)$left; // 左边距(px) |
| | | $data[2] = (float)$top + $fontSize; // 顶部位置(px),加字体大小以校正基线 |
| | | $data[2] = (float)$top + ($fontSize * 0.85); // 顶部位置(px),加字体大小的85%以校正基线 |
| | | return $data; |
| | | } |
| | | |
| | |
| | | log_write('分销商升级$user_id='.$userId); |
| | | // 用户模型 |
| | | $user = UserModel::detail($userId); |
| | | if (empty($user)){ |
| | | return false; |
| | | } |
| | | // 获取所有等级 |
| | | $list = GradeModel::getUsableList($user['app_id']); |
| | | if ($list->isEmpty()) { |
| | |
| | | try { |
| | | $this->model = new VipOrderModel(); |
| | | $cacheKey = "task_space_VipOrder"; |
| | | //if (!Cache::has($cacheKey)) { |
| | | if (!Cache::has($cacheKey)) { |
| | | $this->model->startTrans(); |
| | | try { |
| | | // 发放VIP订单佣金 |
| | |
| | | $this->model->rollback(); |
| | | } |
| | | Cache::set($cacheKey, time(), 60); |
| | | //} |
| | | } |
| | | } catch (\Throwable $e) { |
| | | echo 'ERROR VipOrder: ' . $e->getMessage() . PHP_EOL; |
| | | log_write('VipOrder TASK : ' . '__ ' . $e->getMessage(), 'task'); |
| | |
| | | |
| | | namespace app\shop\controller\supplier; |
| | | |
| | | use app\common\enum\supplier\SupplierType; |
| | | use app\shop\controller\Controller; |
| | | use app\shop\model\supplier\Category as CategoryModel; |
| | | |
| | |
| | | */ |
| | | public function index() |
| | | { |
| | | $typeList = SupplierType::getTypeName();// 获取请求的供应商类型参数 |
| | | // 广告分类 |
| | | $model = new CategoryModel; |
| | | $params = $this->request->param(); |
| | | $category = $model->getAll($params); |
| | | return $this->renderSuccess('', compact('category')); |
| | | return $this->renderSuccess('', compact('category','typeList')); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | use app\common\library\easywechat\WxPay; |
| | | |
| | | use app\common\model\plus\region\Cash as CashModel; |
| | | use app\common\model\plus\operations\Cash as CashModel; |
| | | |
| | | use app\shop\model\plus\region\Capital; |
| | | use app\shop\model\plus\region\User; |
| | | use app\shop\model\plus\operations\Capital; |
| | | use app\shop\model\plus\operations\Operations; |
| | | use app\shop\model\user\User as UserModel; |
| | | |
| | | /** |
| | |
| | | |
| | | if ($param['apply_status'] == 30) { |
| | | |
| | | User::backFreezeMoney($param['user_id'], $param['money']); |
| | | Operations::backFreezeMoney($param['user_id'], $param['money']); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | // 更新队长累积提现佣金 |
| | | |
| | | User::totalMoney($this['user_id'], $this['money']); |
| | | Operations::totalMoney($this['user_id'], $this['money']); |
| | | |
| | | |
| | | |
| | |
| | | $model = new static; |
| | | if (!Cache::get('category_supplier_' . $shop_supplier_id)) { |
| | | $supplier=(new SupplierModel)->detail($shop_supplier_id); |
| | | $where=[$shop_supplier_id] |
| | | $where=[$shop_supplier_id]; |
| | | if($supplier['is_newcomer']||$supplier['is_repurchase']||$supplier['is_vip']){ |
| | | $where=[0,$shop_supplier_id] |
| | | $where=[0,$shop_supplier_id]; |
| | | } |
| | | $data = $model->with(['images']) |
| | | ->where('shop_supplier_id','in',$where) |
| | |
| | | //#endif |
| | | } |
| | | } |
| | | },{ |
| | | "path": "operations/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "运营中心", |
| | | "app-plus": { |
| | | //#ifdef H5 |
| | | "titleNView": false |
| | | //#endif |
| | | } |
| | | } |
| | | }, { |
| | | "path": "operations/cash/apply", |
| | | "style": { |
| | | "navigationBarTitleText": "提现申请", |
| | | "app-plus": { |
| | | //#ifdef H5 |
| | | "titleNView": false |
| | | //#endif |
| | | } |
| | | } |
| | | }, { |
| | | "path": "operations/cash/list", |
| | | "style": { |
| | | "navigationBarTitleText": "提现明细", |
| | | "app-plus": { |
| | | //#ifdef H5 |
| | | "titleNView": false |
| | | //#endif |
| | | } |
| | | } |
| | | }, { |
| | | "path": "operations/order", |
| | | "style": { |
| | | "navigationBarTitleText": "运营中心订单", |
| | | "app-plus": { |
| | | //#ifdef H5 |
| | | "titleNView": false |
| | | //#endif |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | <!-- 名片展示区域 --> |
| | | <view class="content"> |
| | | <view class="business-card"> |
| | | <image style="width: 100%;" @tap="viewPicture(businessImage)" mode="widthFix" :src="businessImage"> |
| | | <image class="card-image" @tap="viewPicture(businessImage)" mode="widthFix" :src="businessImage"> |
| | | </image> |
| | | </view> |
| | | |
| | |
| | | businessImage: '', |
| | | business_card_id: '', |
| | | height: 0, |
| | | cardWidth: 0, // 名片宽度 |
| | | businessList: [], |
| | | current: 0, |
| | | statistics: {}, |
| | |
| | | }, |
| | | onLoad() { |
| | | this.screenWidth = uni.getSystemInfoSync().windowWidth * 2 - 70; |
| | | |
| | | // 计算名片宽度:屏幕宽度减去左右padding(40rpx) |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.cardWidth = (systemInfo.windowWidth * 2) - 40; // rpx单位 |
| | | }, |
| | | onShow() { |
| | | this.getbusinessList(); |
| | |
| | | background: #fff; |
| | | border-radius: 20rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); |
| | | |
| | | .card-image { |
| | | width: 100%; |
| | | display: block; |
| | | // 确保图片清晰度,使用高质量渲染 |
| | | image-rendering: -webkit-optimize-contrast; |
| | | image-rendering: crisp-edges; |
| | | } |
| | | |
| | | .top-image { |
| | | width: 100%; |
| | |
| | | .card-preview { |
| | | border-radius: 12rpx; |
| | | position: relative; |
| | | overflow: hidden; |
| | | |
| | | image { |
| | | // 保持图片原始清晰度 |
| | | display: block; |
| | | image-rendering: -webkit-optimize-contrast; |
| | | } |
| | | |
| | | .mrmp { |
| | | height: 50rpx; |
| | |
| | | words: {}, |
| | | user: {}, |
| | | titel: '', |
| | | vip_url:'', |
| | | has_apply: false // 是否已申请 |
| | | }; |
| | | }, |
| | |
| | | self.top_background = data.data.background; |
| | | self.vip = data.data.vip; |
| | | self.user = data.data.user; |
| | | self.vip_url = data.data.vip_url; |
| | | self.isData = true; |
| | | self.loadding = false; |
| | | uni.hideLoading(); |
| | |
| | | |
| | | /*申请成为VIP*/ |
| | | applyVip() { |
| | | this.gotoPage('/pages/plus/vip/apply'); |
| | | let vip_url=this.vip_url?this.vip_url:'/pages/plus/vip/apply' |
| | | this.gotoPage(vip_url); |
| | | }, |
| | | |
| | | /*查看申请状态*/ |
| | |
| | | // 排位过期时间 |
| | | remain_time: '', |
| | | isNotePopup: false, |
| | | vip_url:'' |
| | | }; |
| | | }, |
| | | onLoad(e) { |
| | |
| | | self.bonus = data.data.bonus; |
| | | self.user = data.data.user; |
| | | self.remain_time = data.data.remain_time; |
| | | self.vip_url = data.data.vip_url; |
| | | self.isData = true; |
| | | self.loadding = false; |
| | | uni.hideLoading(); |
| | |
| | | |
| | | /*申请分销商*/ |
| | | applybonus() { |
| | | this.gotoPage('/pages2/bonus/apply/apply'); |
| | | let vip_url=this.vip_url?this.vip_url:'/pages2/bonus/apply/apply' |
| | | this.gotoPage(vip_url); |
| | | }, |
| | | |
| | | /*去商城逛逛*/ |
| | |
| | | </view> |
| | | </view> |
| | | <view class="d-c-c pt30"> |
| | | <button type="primary" class="btn-gcred flex-1" @click="gotoCash">{{ info_words.index.words.cash.value }}</button> |
| | | <button type="primary" class="btn-gcred flex-1" |
| | | @click="gotoCash">{{ info_words.index.words.cash.value }}</button> |
| | | </view> |
| | | </view> |
| | | <!--图标入口--> |
| | |
| | | </view> |
| | | <view class="d-c-c d-c flex-1" @click="gotoPage('pages2/shareholder/bonus/bonus')"> |
| | | <view> |
| | | <image class="team_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""></image> |
| | | <image class="team_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""> |
| | | </image> |
| | | </view> |
| | | <text class="pt10 f26 mt20">{{ info_words.bonus_list.title.value }}</text> |
| | | </view> |
| | |
| | | <template v-if="!is_shareholder && isData"> |
| | | <view class="no-team"> |
| | | <view class="mt50 p-0-20 pt30 red f34 tc">{{ info_words.index.words.not_shareholder.value }}</view> |
| | | <view class="p30 f28" v-if="setting.become=='40'">您需要下级分销商人数达到<text class="orange">{{setting.totalfxs_down}}</text>人才能成为{{ info_words.index.words.shareholder.value }},您当前的分销商人数为<text class="orange">{{agent_total}}</text>人,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='50'">您需要累计分销佣金达到<text class="orange">{{setting.total_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前累计分销佣金为<text class="orange">{{agent_money}}</text>元,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='70'">您需要团队累计业绩达到<text class="orange">{{setting.total_team_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前团队累计业绩为<text class="orange">{{team_money}}</text>元,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='90'">您需要一次性消费达到<text class="orange">{{setting.one_expend_money}}</text>元才能成为{{ info_words.index.words.region.value }},继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='40'">您需要下级分销商人数达到<text |
| | | class="orange">{{setting.totalfxs_down}}</text>人才能成为{{ info_words.index.words.shareholder.value }},您当前的分销商人数为<text |
| | | class="orange">{{agent_total}}</text>人,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='50'">您需要累计分销佣金达到<text |
| | | class="orange">{{setting.total_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前累计分销佣金为<text |
| | | class="orange">{{agent_money}}</text>元,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='70'">您需要团队累计业绩达到<text |
| | | class="orange">{{setting.total_team_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前团队累计业绩为<text |
| | | class="orange">{{team_money}}</text>元,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='90'">您需要一次性消费达到<text |
| | | class="orange">{{setting.one_expend_money}}</text>元才能成为{{ info_words.index.words.region.value }},继续努力吧! |
| | | </view> |
| | | <view class="section-product" v-if="setting.become=='110'"> |
| | | <view class="p30 f28">您需要团队推荐商户入驻人数需达到<text class="orange">{{setting.totalsh_down}}</text>人并且团队推荐指定会员等级达到<text class="orange" v-for="(item, index ) in gradeList">{{(index>0?'或':'')+item.name}}</text>满<text class="orange">{{setting.totalvip_down}}</text>人并且至少购买VIP专区商品<text class="orange">{{setting.purchase_count}}</text>次或购买以下任意一款商品才能成为{{ info_words.index.words.shareholder.value }}</view> |
| | | <view @click="gotoProductDetail(item.product_id)" class="item" :class="index==productList.length-1?'noborder':'border-b-e'" v-for="(item, index) in productList" :key="index"> |
| | | <view class="p30 f28"> |
| | | 您需要团队推荐<text class="orange">{{setting.totalsh_down}}</text>家商户入驻 |
| | | 并且团队推荐指定会员等级达到<text class="orange" |
| | | v-for="(item, index ) in gradeList">{{(index>0?'或':'')+item.name}}</text>满<text |
| | | class="orange">{{setting.totalvip_down}}</text>人 |
| | | 并且至少购买VIP专区商品<text class="orange">{{setting.purchase_count}}</text>次 |
| | | 或购买以下任意一款商品才能成为{{ info_words.index.words.shareholder.value }} |
| | | </view> |
| | | <view @click="gotoProductDetail(item.product_id)" class="item" |
| | | :class="index==productList.length-1?'noborder':'border-b-e'" |
| | | v-for="(item, index) in productList" :key="index"> |
| | | <image :src="item.product_image" class="cover" mode="aspectFit"></image> |
| | | <view class="info"> |
| | | <view class="title">{{ item.product_name }}</view> |
| | |
| | | </view> |
| | | <view class="section-product" v-if="setting.become=='100'"> |
| | | <view class="p30 f28 d-c-c">您需要购买以下任意一款商品才能申请{{ info_words.index.words.shareholder.value }}</view> |
| | | <view @click="gotoProductDetail(item.product_id)" class="item" :class="index==productList.length-1?'noborder':'border-b-e'" v-for="(item, index) in productList" :key="index"> |
| | | <view @click="gotoProductDetail(item.product_id)" class="item" |
| | | :class="index==productList.length-1?'noborder':'border-b-e'" |
| | | v-for="(item, index) in productList" :key="index"> |
| | | <image :src="item.product_image" class="cover" mode="aspectFit"></image> |
| | | <view class="info"> |
| | | <view class="title">{{ item.product_name }}</view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="p30 mt30" v-if="setting.become=='10'"> |
| | | <button type="primary" class="btn-gcred" @click="applyShareholder">{{ info_words.index.words.apply_now.value }}</button> |
| | | <button type="primary" class="btn-gcred" |
| | | @click="applyShareholder">{{ info_words.index.words.apply_now.value }}</button> |
| | | </view> |
| | | <view class="p30 mt30" v-else-if="setting.become=='40' || setting.become=='50'"> |
| | | <button type="primary" class="btn-gcred" @click="gotoAgent">马上去招募人员</button> |
| | |
| | | <button type="primary" class="btn-gcred" @click="gotoTeam">去看看我的团队</button> |
| | | </view> |
| | | <view class="p30"> |
| | | <button type="primary" class="btn-gray" @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button> |
| | | <button type="primary" class="btn-gray" |
| | | @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-banner d-c-c d-c" v-if="description_pic!=''"> |
| | |
| | | self._get('user.shareholder/center', {}, function(data) { |
| | | self.info_words = data.data.words; |
| | | uni.setNavigationBarTitle({ |
| | | title: self.info_words.index.title.value != '' ? self.info_words.index.title.value : self.info_words.index.title |
| | | title: self.info_words.index.title.value != '' ? self.info_words.index.title |
| | | .value : self.info_words.index.title |
| | | .default |
| | | }); |
| | | self.titel = data.data.words.index.title.value |
| | |
| | | </view> |
| | | </view> |
| | | <view class="d-c-c pt30"> |
| | | <button type="primary" class="btn-gcred flex-1" @click="gotoCash">{{ info_words.index.words.cash.value }}</button> |
| | | <button type="primary" class="btn-gcred flex-1" |
| | | @click="gotoCash">{{ info_words.index.words.cash.value }}</button> |
| | | </view> |
| | | </view> |
| | | <!--图标入口--> |
| | |
| | | </view> |
| | | <view class="d-c-c d-c flex-1" @click="gotoPage('pages2/team/order/order')"> |
| | | <view> |
| | | <image class="team_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""></image> |
| | | <image class="team_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""> |
| | | </image> |
| | | </view> |
| | | <text class="pt10 f26 mt20">{{ info_words.order.title.value }}</text> |
| | | </view> |
| | |
| | | <template v-if="!is_team && isData"> |
| | | <view class="no-team"> |
| | | <view class="mt50 p-0-20 pt30 red f34 tc">{{ info_words.index.words.not_team.value }}</view> |
| | | <view class="p30 f28" v-if="setting.become=='40'">您需要下级分销商人数达到<text class="orange">{{setting.totalfxs_down}}</text>人才能成为{{ info_words.index.words.team.value }},您当前的分销商人数为<text class="orange">{{agent_total}}</text>人,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='50'">您需要累计分销佣金达到<text class="orange">{{setting.total_money}}</text>元才能成为{{ info_words.index.words.team.value }},您当前累计分销佣金为<text class="orange">{{agent_money}}</text>元,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='40'">您需要下级分销商人数达到<text |
| | | class="orange">{{setting.totalfxs_down}}</text>人才能成为{{ info_words.index.words.team.value }},您当前的分销商人数为<text |
| | | class="orange">{{agent_total}}</text>人,继续努力吧!</view> |
| | | <view class="p30 f28" v-if="setting.become=='50'">您需要累计分销佣金达到<text |
| | | class="orange">{{setting.total_money}}</text>元才能成为{{ info_words.index.words.team.value }},您当前累计分销佣金为<text |
| | | class="orange">{{agent_money}}</text>元,继续努力吧!</view> |
| | | <view class="section-product" v-if="setting.become=='70'"> |
| | | <view class="p30 f28">您需要推荐<text |
| | | class="orange">{{setting.totalsh_down}}</text>家商户入驻并且推荐指定会员等级达到<text class="orange" |
| | | v-for="(item, index ) in gradeList">{{(index>0?'或':'')+item.name}}</text>满<text |
| | | class="orange">{{setting.totalvip_down}}</text>人并且至少购买VIP专区商品<text |
| | | class="orange">{{setting.purchase_count}}</text>次或购买以下任意一款商品才能成为{{ info_words.index.words.team.value }} |
| | | </view> |
| | | <view @click="gotoProductDetail(item.product_id)" class="item" |
| | | :class="index==productList.length-1?'noborder':'border-b-e'" |
| | | v-for="(item, index) in productList" :key="index"> |
| | | <image :src="item.product_image" class="cover" mode="aspectFit"></image> |
| | | <view class="info"> |
| | | <view class="title">{{ item.product_name }}</view> |
| | | <view class="describe">{{ item.product_sku.product_attr }}</view> |
| | | <view class="level-box count_choose"> |
| | | <view class="price"> |
| | | ¥ |
| | | <text class="num">{{ item.product_sku.product_price }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="icon-box pl20"> |
| | | <text class="icon iconfont icon-jiantou f50"></text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="p30 mt30" v-if="setting.become=='10'"> |
| | | <button type="primary" class="btn-gcred" @click="applyteam">{{ info_words.index.words.apply_now.value }}</button> |
| | | <button type="primary" class="btn-gcred" |
| | | @click="applyteam">{{ info_words.index.words.apply_now.value }}</button> |
| | | </view> |
| | | <view class="p30 mt30" v-else-if="setting.become=='40' || setting.become=='50'"> |
| | | <button type="primary" class="btn-gcred" @click="gotoAgent">马上去招募人员</button> |
| | | </view> |
| | | <view class="p30"> |
| | | <button type="primary" class="btn-gray" @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button> |
| | | <button type="primary" class="btn-gray" |
| | | @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | titel: '', |
| | | setting: {}, |
| | | agent_total: 0, |
| | | agent_money: 0 |
| | | agent_money: 0, |
| | | productList: [], |
| | | gradeList: [] |
| | | }; |
| | | }, |
| | | onLoad(e) { |
| | |
| | | self._get('user.team/center', {}, function(data) { |
| | | self.info_words = data.data.words; |
| | | uni.setNavigationBarTitle({ |
| | | title: self.info_words.index.title.value != '' ? self.info_words.index.title.value : self.info_words.index.title |
| | | title: self.info_words.index.title.value != '' ? self.info_words.index.title |
| | | .value : self.info_words.index.title |
| | | .default |
| | | }); |
| | | self.titel = data.data.words.index.title.value |
| | |
| | | self.team = data.data.team; |
| | | self.user = data.data.user; |
| | | self.setting = data.data.setting; |
| | | self.productList = data.data.productList; |
| | | self.gradeList = data.data.gradeList; |
| | | self.agent_total = data.data.agent_total; |
| | | self.agent_money = data.data.agent_money; |
| | | self.isData = true; |
| | |
| | | |
| | | /*去商城逛逛*/ |
| | | gotoShop() { |
| | | this.gotoPage('pages2/index/index') |
| | | this.gotoPage('pages/index/index') |
| | | }, |
| | | |
| | | /*去商城逛逛*/ |
| New file |
| | |
| | | <template> |
| | | <!-- |
| | | 作者:系统 |
| | | 时间:2026-01-23 |
| | | 描述:权限管理-菜单&权限 |
| | | --> |
| | | <div class="product"> |
| | | <!--添加菜单&权限--> |
| | | <div class="common-level-rail d-b-c"> |
| | | <el-button size="small" type="primary" @click="addClick" icon="el-icon-plus">添加菜单&权限</el-button> |
| | | <el-form :inline="true" :model="formSearch" size="small"> |
| | | <el-form-item> |
| | | <el-checkbox v-model="formSearch.is_menu" @change="changeIsMenuFunc">只显示菜单</el-checkbox> |
| | | <el-checkbox v-model="formSearch.pack_up" @change="changePackUpFunc">收起</el-checkbox> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!--内容--> |
| | | <div class="product-content"> |
| | | <div class="table-wrap"> |
| | | <div> |
| | | <el-table |
| | | size="small" |
| | | :data="tableData" |
| | | style="width: 100%;margin-bottom: 20px;" |
| | | row-key="access_id" |
| | | border |
| | | default-expand-all |
| | | ref="theTable" |
| | | :tree-props="{ children: 'children' }" |
| | | v-loading="loading" |
| | | > |
| | | <el-table-column prop="name" label="菜单名称"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.path=='/plus'" class="fb red f18"> |
| | | {{scope.row.name}} |
| | | </span> |
| | | <span v-else> |
| | | {{scope.row.name}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="path" label="路径"></el-table-column> |
| | | <el-table-column prop="is_route" label="类别" width="90"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.is_route==1">页面</span> |
| | | <span v-if="scope.row.is_route==0">按钮</span> |
| | | <span v-if="scope.row.is_route==2">独立单页面</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="is_show" label="是否显示" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.is_show" |
| | | :active-value="1" |
| | | :inactive-value="0" |
| | | @change="isShowFunc(scope.row)" |
| | | active-color="#13ce66" |
| | | inactive-color="#cccccc" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sort" label="排序" width="60"></el-table-column> |
| | | <el-table-column prop="create_time" label="添加时间" width="140"></el-table-column> |
| | | <el-table-column prop="name" label="操作" width="230"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="addClick(scope.row,'copy')" type="text" size="small" v-if="scope.row.path!='/plus'">一键复制</el-button> |
| | | <el-button @click="addClick(scope.row,'child')" type="text" size="small">添加子菜单</el-button> |
| | | <el-button @click="editClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="deleteClick(scope.row)" type="text" size="small" v-if="scope.row.path!='/plus'">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--添加--> |
| | | <Add v-if="open_add" :open_add="open_add" :add_type="add_type" :rawData="rawData" :selectModel="selectModel" @closeDialog="closeDialogFunc($event, 'add')"></Add> |
| | | |
| | | <!--编辑--> |
| | | <Edit v-if="open_edit" :open_edit="open_edit" :rawData="rawData" :selectModel="selectModel" @closeDialog="closeDialogFunc($event, 'edit')"></Edit> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import AccessApi from '@/api/access.js'; |
| | | import Edit from './part/Edit.vue'; |
| | | import Add from './part/Add'; |
| | | import { deepClone } from '@/utils/base.js'; |
| | | export default { |
| | | components: { |
| | | /*编辑组件*/ |
| | | Edit: Edit, |
| | | Add: Add |
| | | }, |
| | | data() { |
| | | return { |
| | | /*是否正在加载*/ |
| | | loading: true, |
| | | /*筛选搜索*/ |
| | | formSearch: { |
| | | /*是否只显示菜单*/ |
| | | is_menu: false, |
| | | /*是否收起*/ |
| | | pack_up: false |
| | | }, |
| | | /*原始数据*/ |
| | | rawData: [], |
| | | /*表格数据*/ |
| | | tableData: [], |
| | | /*是否打开添加弹窗*/ |
| | | open_add: false, |
| | | /*添加类型*/ |
| | | add_type:'', |
| | | /*选中的对象*/ |
| | | selectModel:{}, |
| | | /*是否打开编辑弹窗*/ |
| | | open_edit: false, |
| | | /*当前编辑的对象*/ |
| | | userModel: {}, |
| | | }; |
| | | }, |
| | | created() { |
| | | /*获取列表*/ |
| | | this.getTableList(); |
| | | }, |
| | | methods: { |
| | | /*列表是否只显示菜单*/ |
| | | changeIsMenuFunc(e) { |
| | | let list = deepClone(this.rawData); |
| | | if (e) { |
| | | this.showScreen(list, 1); |
| | | this.tableData = list; |
| | | } else { |
| | | this.tableData = list; |
| | | } |
| | | }, |
| | | |
| | | /*是否显示开关*/ |
| | | isShowFunc(e) { |
| | | let self = this; |
| | | AccessApi.agentstatus({ access_id: e.access_id, status: e.is_show }, true) |
| | | .then(data => { |
| | | if (data.code == 1) { |
| | | self.$message({ |
| | | message: data.msg, |
| | | type: 'success' |
| | | }); |
| | | self.getTableList(); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | /*是否收起*/ |
| | | changePackUpFunc(e) { |
| | | this.forArr(this.tableData, !e); |
| | | }, |
| | | |
| | | /*列表收起*/ |
| | | forArr(arr, isExpand) { |
| | | arr.forEach(i => { |
| | | this.$refs.theTable.toggleRowExpansion(i, isExpand); |
| | | if (i.children) { |
| | | this.forArr(i.children, isExpand); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /*切换显示类别*/ |
| | | changeShowFunc(e) { |
| | | let list = deepClone(this.rawData); |
| | | if (e == 'all') { |
| | | this.tableData = list; |
| | | } else { |
| | | let type; |
| | | if (e == 'show') { |
| | | type = 1; |
| | | } |
| | | if (e == 'hide') { |
| | | type = 0; |
| | | } |
| | | this.showScreen(list, type); |
| | | this.tableData = list; |
| | | } |
| | | }, |
| | | |
| | | /*显示筛选*/ |
| | | showScreen(list, type) { |
| | | for (let i = 0; i < list.length; i++) { |
| | | let item = list[i]; |
| | | if (typeof item.is_menu != 'undefined' && item.is_menu != type) { |
| | | list.splice(i, 1); |
| | | i--; |
| | | } else { |
| | | if (item.children.length > 0) { |
| | | this.showScreen(item.children, type); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /*获取列表*/ |
| | | getTableList() { |
| | | let self = this; |
| | | let Params = {}; |
| | | AccessApi.agentaccessList(Params, true) |
| | | .then(res => { |
| | | self.loading = false; |
| | | self.rawData = res.data; |
| | | self.tableData = res.data; |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | /*打开添加*/ |
| | | addClick(e,type) { |
| | | if(e&&typeof(e)!='undefined'){ |
| | | this.add_type=type; |
| | | this.selectModel=deepClone(e); |
| | | }else{ |
| | | this.parents_id=0; |
| | | } |
| | | this.open_add = true; |
| | | }, |
| | | |
| | | /*打开编辑*/ |
| | | editClick(item) { |
| | | this.selectModel = item; |
| | | this.open_edit = true; |
| | | }, |
| | | |
| | | closeDialogFunc(e, f) { |
| | | if (f == 'add') { |
| | | this.open_add = e.openDialog; |
| | | if (e.type == 'success') { |
| | | this.getTableList(); |
| | | } |
| | | } |
| | | if (f == 'edit') { |
| | | this.open_edit = e.openDialog; |
| | | if (e.type == 'success') { |
| | | this.getTableList(); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /*删除用户*/ |
| | | deleteClick(row) { |
| | | let self = this; |
| | | self |
| | | .$confirm('删除后不可恢复,确认删除该记录吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | self.loading = true; |
| | | AccessApi.agentdelAccess( |
| | | { |
| | | access_id: row.access_id |
| | | }, |
| | | true |
| | | ) |
| | | .then(data => { |
| | | if (data.code == 1) { |
| | | self.loading = false; |
| | | self.$message({ |
| | | message: data.msg, |
| | | type: 'success' |
| | | }); |
| | | self.getTableList(); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <!-- |
| | | 作者:系统 |
| | | 时间:2026-01-23 |
| | | 描述:代理商权限管理-添加菜单&权限 |
| | | --> |
| | | <el-dialog title="添加菜单&权限" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false" :close-on-press-escape="false"> |
| | | <el-form size="small" :model="formData" :rules="formRules" ref="form"> |
| | | <!--菜单名称--> |
| | | <el-form-item label="菜单名称" prop="name" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.name" autocomplete="off" placeholder="请输入菜单名称"></el-input> |
| | | </el-form-item> |
| | | <!--类型--> |
| | | <el-form-item label="类型" prop="name" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="formData.is_route"> |
| | | <el-radio :label="1">页面</el-radio> |
| | | <el-radio :label="0">按钮</el-radio> |
| | | <el-radio :label="2">独立单页面</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--上级菜单--> |
| | | <el-form-item label="上级菜单" prop="parent_id" :label-width="formLabelWidth"> |
| | | <el-cascader size="small" v-model="parentsVal" :options="accessList" :props="propsParam" @change="handleChange"></el-cascader> |
| | | </el-form-item> |
| | | <!--路径--> |
| | | <el-form-item label="路径" prop="path" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.path" autocomplete="off" placeholder="请输入组件文件路径"></el-input> |
| | | <p>提示:对应前端给的文件路径,例如:/index/index</p> |
| | | </el-form-item> |
| | | <!--图标--> |
| | | <el-form-item label="图标" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.icon" autocomplete="off" placeholder="请输入icon"></el-input> |
| | | <p>提示:请选择系统提供的图标</p> |
| | | </el-form-item> |
| | | <!--是否是菜单--> |
| | | <el-form-item label="是否是菜单" :label-width="formLabelWidth" v-if="formData.is_route==1"> |
| | | <el-radio-group v-model="formData.is_menu"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--是否显示--> |
| | | <el-form-item label="是否显示" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="formData.is_show"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--重定向--> |
| | | <el-form-item label="重定向" :label-width="formLabelWidth" v-if="formData.is_route == 1"> |
| | | <el-input v-model="formData.redirect_name" autocomplete="off" placeholder="请输入重定向地址"></el-input> |
| | | </el-form-item> |
| | | <!--备注--> |
| | | <el-form-item label="备注" prop="sort" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <!--排序--> |
| | | <el-form-item label="排序" prop="sort" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.sort" placeholder="请输入排序" type="number"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!--操作按钮--> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit()" :disabled="loading">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import AccessApi from '@/api/access.js'; |
| | | import { deepClone,formatModel } from '@/utils/base.js'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | /*是否加载中*/ |
| | | loading: false, |
| | | /*form表单数据对象*/ |
| | | formData: { |
| | | /*菜单名称*/ |
| | | name: '', |
| | | /*路由地址*/ |
| | | path: '', |
| | | /*组件名*/ |
| | | views: '', |
| | | /*别名*/ |
| | | alias: '', |
| | | /*图标*/ |
| | | icon: '', |
| | | /*是否是菜单*/ |
| | | is_menu: 0, |
| | | /*是否是路由*/ |
| | | is_route: 1, |
| | | /*是否显示*/ |
| | | is_show: 1, |
| | | /*排序*/ |
| | | sort: 1, |
| | | /*父集ID*/ |
| | | parent_id: 0 |
| | | }, |
| | | /*验证规则*/ |
| | | formRules: { |
| | | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], |
| | | path: [{ required: true, message: '请输入路径', trigger: 'blur' }], |
| | | views: [{ required: true, message: '请输入组件名称', trigger: 'blur' }], |
| | | alias: [{ required: true, message: '请输入别名', trigger: 'blur' }] |
| | | }, |
| | | /*当前父集ID*/ |
| | | parentsVal: [], |
| | | /*菜单列表*/ |
| | | accessList: [], |
| | | /*排序*/ |
| | | srot: '1', |
| | | /*左边长度*/ |
| | | formLabelWidth: '120px', |
| | | /*是否显示*/ |
| | | dialogVisible: false, |
| | | /*展示数据*/ |
| | | propsParam: { |
| | | label: 'name', |
| | | value: 'access_id', |
| | | checkStrictly: true |
| | | } |
| | | }; |
| | | }, |
| | | props: { |
| | | open_add: Boolean, |
| | | add_type: String, |
| | | rawData: Array, |
| | | selectModel: Object |
| | | }, |
| | | created() { |
| | | |
| | | this.dialogVisible = this.open_add; |
| | | this.accessList = deepClone(this.rawData); |
| | | this.accessList.unshift({ name: '顶级菜单', access_id: 0 }); |
| | | if (this.add_type == 'copy') { |
| | | this.formData =formatModel(this.formData,this.selectModel); |
| | | this.findParentsID(this.accessList); |
| | | } else if (this.add_type == 'child') { |
| | | this.formData.parent_id = this.selectModel.access_id; |
| | | this.findParentsID(this.accessList); |
| | | } |
| | | }, |
| | | methods: { |
| | | /*选择菜单*/ |
| | | handleChange(e) {}, |
| | | |
| | | /*查找父集id*/ |
| | | findParentsID(list){ |
| | | let flag=false; |
| | | for(let i=0;i<list.length;i++){ |
| | | let item=list[i]; |
| | | if(item.access_id==this.formData.parent_id){ |
| | | this.parentsVal.unshift(item.access_id); |
| | | flag=true; |
| | | break; |
| | | }else{ |
| | | let children=item.children; |
| | | if(typeof children!='undefined'&&children.length>0){ |
| | | if(this.findParentsID(children)){ |
| | | this.parentsVal.unshift(item.access_id); |
| | | flag=true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return flag; |
| | | }, |
| | | |
| | | /*添加菜单*/ |
| | | onSubmit() { |
| | | let self = this; |
| | | let params = this.formData; |
| | | if (self.parentsVal.length > 0) { |
| | | params.parent_id = self.parentsVal[self.parentsVal.length - 1]; |
| | | } |
| | | self.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | self.loading = true; |
| | | AccessApi.agentaddpAccess(params, true) |
| | | .then(res => { |
| | | if (res.code == 1) { |
| | | self.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | self.dialogFormVisible(true); |
| | | self.loading = false; |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /*关闭弹窗*/ |
| | | dialogFormVisible(e) { |
| | | if (e) { |
| | | this.$emit('closeDialog', { |
| | | type: 'success', |
| | | openDialog: false |
| | | }); |
| | | } else { |
| | | this.$emit('closeDialog', { |
| | | type: 'error', |
| | | openDialog: false |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
| New file |
| | |
| | | <template> |
| | | <!-- |
| | | 作者:系统 |
| | | 时间:2026-01-23 |
| | | 描述:代理商权限管理-修改菜单&权限 |
| | | --> |
| | | <el-dialog title="修改菜单&权限" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false" :close-on-press-escape="false"> |
| | | <el-form size="small" :model="formData" :rules="formRules" ref="form"> |
| | | <!--菜单名称--> |
| | | <el-form-item label="菜单名称" prop="name" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.name" autocomplete="off" placeholder="请输入菜单名称"></el-input> |
| | | </el-form-item> |
| | | <!--类型--> |
| | | <el-form-item label="类型" prop="name" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="formData.is_route"> |
| | | <el-radio :label="1">页面</el-radio> |
| | | <el-radio :label="0">按钮</el-radio> |
| | | <el-radio :label="2">独立单页面</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--上级菜单--> |
| | | <el-form-item label="上级菜单" prop="parent_id" :label-width="formLabelWidth"> |
| | | <el-cascader size="small" v-model="parentsVal" :options="accessList" :props="propsParam" @change="handleChange"></el-cascader> |
| | | </el-form-item> |
| | | <!--路径--> |
| | | <el-form-item label="路径" prop="path" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.path" autocomplete="off" placeholder="请输入组件文件路径" :disabled="formData.path=='/plus'"></el-input> |
| | | <p>提示:对应前端给的文件路径,例如:index/index</p> |
| | | </el-form-item> |
| | | <!--图标--> |
| | | <el-form-item label="图标" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.icon" autocomplete="off" placeholder="请输入icon"></el-input> |
| | | <p>提示:请选择系统提供的图标</p> |
| | | </el-form-item> |
| | | <!--是否是菜单--> |
| | | <el-form-item label="是否是菜单" :label-width="formLabelWidth" v-if="formData.is_route==1"> |
| | | <el-radio-group v-model="formData.is_menu"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--是否显示--> |
| | | <el-form-item label="是否显示" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="formData.is_show"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!--重定向--> |
| | | <el-form-item label="重定向" :label-width="formLabelWidth" v-if="formData.is_route == 1"> |
| | | <el-input v-model="formData.redirect_name" autocomplete="off" placeholder="请输入重定向地址"></el-input> |
| | | </el-form-item> |
| | | <!--备注--> |
| | | <el-form-item label="备注" prop="sort" :label-width="formLabelWidth"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <!--排序--> |
| | | <el-form-item label="排序" prop="sort" :label-width="formLabelWidth"><el-input v-model="formData.sort" placeholder="请输入排序" type="number"></el-input></el-form-item> |
| | | </el-form> |
| | | <!--操作按钮--> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit()" :disabled="loading">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import AccessApi from '@/api/access.js'; |
| | | import { deepClone } from '@/utils/base.js'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | /*是否加载中*/ |
| | | loading: false, |
| | | /*form表单数据对象*/ |
| | | formData: { |
| | | /*菜单名称*/ |
| | | name: '', |
| | | /*路由地址*/ |
| | | path:'', |
| | | /*组件名*/ |
| | | views:'', |
| | | /*别名*/ |
| | | alias:'', |
| | | /*图标*/ |
| | | icon:'', |
| | | /*是否是菜单*/ |
| | | is_menu: 1, |
| | | /*是否是路由*/ |
| | | is_route: 1, |
| | | /*是否显示*/ |
| | | is_show: 0, |
| | | /*排序*/ |
| | | sort: 1, |
| | | /*父集ID*/ |
| | | parent_id: 0 |
| | | }, |
| | | /*验证规则*/ |
| | | formRules: { |
| | | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], |
| | | path: [{ required: true, message: '请输入路径', trigger: 'blur' }], |
| | | views: [{ required: true, message: '请输入组件名称', trigger: 'blur' }], |
| | | alias: [{ required: true, message: '请输入别名', trigger: 'blur' }] |
| | | }, |
| | | /*当前父集ID*/ |
| | | parentsVal: [], |
| | | /*菜单列表*/ |
| | | accessList: [], |
| | | /*排序*/ |
| | | srot: '1', |
| | | /*左边长度*/ |
| | | formLabelWidth: '120px', |
| | | /*是否显示*/ |
| | | dialogVisible: false, |
| | | /*展示数据*/ |
| | | propsParam: { |
| | | label: 'name', |
| | | value: 'access_id', |
| | | checkStrictly: true |
| | | } |
| | | }; |
| | | }, |
| | | props: { |
| | | open_edit:Boolean, |
| | | add_type:String, |
| | | rawData:Array, |
| | | selectModel:Object |
| | | }, |
| | | created() { |
| | | this.dialogVisible = this.open_edit; |
| | | this.accessList = deepClone(this.rawData); |
| | | this.accessList.unshift({name:'顶级菜单',access_id:0}) |
| | | this.formData=deepClone(this.selectModel); |
| | | this.findParentsID(this.accessList); |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | /*选择菜单*/ |
| | | handleChange(e) { |
| | | }, |
| | | |
| | | /*查找父集id*/ |
| | | findParentsID(list){ |
| | | let flag=false; |
| | | for(let i=0;i<list.length;i++){ |
| | | let item=list[i]; |
| | | if(item.access_id==this.formData.parent_id){ |
| | | this.parentsVal.unshift(item.access_id); |
| | | flag=true; |
| | | break; |
| | | }else{ |
| | | let children=item.children; |
| | | if(typeof children!='undefined'&&children.length>0){ |
| | | if(this.findParentsID(children)){ |
| | | this.parentsVal.unshift(item.access_id); |
| | | flag=true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return flag; |
| | | }, |
| | | |
| | | /*修改菜单*/ |
| | | onSubmit() { |
| | | let self = this; |
| | | let params = self.formData; |
| | | if(self.parentsVal.length>0){ |
| | | params.parent_id=self.parentsVal[self.parentsVal.length-1]; |
| | | } |
| | | self.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | self.loading = true; |
| | | AccessApi.agenteditAccess(params, true) |
| | | .then(res => { |
| | | if (res.code == 1) { |
| | | self.$message({ |
| | | message: res.msg, |
| | | type: 'success', |
| | | }); |
| | | self.$emit('closeDialog', { |
| | | type: 'success', |
| | | openDialog: false, |
| | | data:params |
| | | }); |
| | | self.loading = false; |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /*关闭弹窗*/ |
| | | dialogFormVisible(e) { |
| | | this.$emit('closeDialog', { |
| | | type: 'error', |
| | | openDialog: false |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | url: 'pages/user/activation/index', |
| | | name: '激活码', |
| | | type: '菜单', |
| | | }, |
| | | { |
| | | url: 'pages/plus/operations/index', |
| | | name: '运营中心', |
| | | type: '菜单', |
| | | } |
| | | ], |
| | | /*选中的值*/ |
| New file |
| | |
| | | <template> |
| | | <!-- |
| | | 作者:luoyiming |
| | | 时间:2020-06-01 |
| | | 描述:插件中心-运营中心-运营中心订单 |
| | | --> |
| | | <div class="user"> |
| | | <div class="common-seach-wrap"> |
| | | <el-form size="small" :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <el-form-item label="佣金结算"> |
| | | <el-select v-model="formInline.is_settled" placeholder="是否结算佣金"> |
| | | <el-option label="全部" value="-1"></el-option> |
| | | <el-option label="已结算" value="1"></el-option> |
| | | <el-option label="未结算" value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="用户id"> |
| | | <el-input v-model="formInline.user_id" placeholder="请输入用户ID"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit">查询</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="success" @click="onExport" v-auth="'/plus/operations/order/export'">导出</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <!--内容--> |
| | | <div class="product-content"> |
| | | <div class="table-wrap"> |
| | | <el-table :data="tableData" size="small" border style="width: 100%" v-loading="loading"> |
| | | <el-table-column prop="order_master.create_time" label="商品信息"> |
| | | <template slot-scope="scope"> |
| | | <div class="product-info p-10-0" v-for="(item, index) in scope.row.order_master.product" :key="index"> |
| | | <div class="pic"><img v-img-url="item.image.file_path" alt="" /></div> |
| | | <div class="info"> |
| | | <div class="name gray3">{{ item.product_name }}</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="referee.value" label="运营中心" width="400"> |
| | | <template slot-scope="scope"> |
| | | <div class="d-s-s d-c"> |
| | | <div class="d-s-c ww100 border-b-d" v-if="scope.row.first_user_id > 0"> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">省级运营中心:</span> |
| | | <span class="blue">{{ scope.row.agent_first.nickName }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">用户ID:</span> |
| | | <span class="gray6">{{ scope.row.agent_first.user_id }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">运营佣金:</span> |
| | | <span class="orange">¥{{ scope.row.first_money }}</span> |
| | | </p> |
| | | </div> |
| | | <div class="d-s-c ww100 border-b-d" v-if="scope.row.second_user_id > 0"> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">市级运营中心:</span> |
| | | <span class="blue">{{ scope.row.agent_second.nickName }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">用户ID:</span> |
| | | <span class="gray6">{{ scope.row.agent_second.user_id }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">运营佣金:</span> |
| | | <span class="orange">¥{{ scope.row.second_money }}</span> |
| | | </p> |
| | | </div> |
| | | <div class="d-s-c ww100 border-b-d" v-if="scope.row.third_user_id > 0"> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">区级运营中心:</span> |
| | | <span class="blue">{{ scope.row.agent_third.nickName }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">用户ID:</span> |
| | | <span class="gray6">{{ scope.row.agent_third.user_id }}</span> |
| | | </p> |
| | | <p class="referee-name text-ellipsis"> |
| | | <span class="gray9">运营佣金:</span> |
| | | <span class="orange">¥{{ scope.row.third_money }}</span> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="单价/数量" width="150"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="(item, index) in scope.row.order_master.product" :key="index"> |
| | | <span class="orange">¥{{ item.product_price }}</span> |
| | | ×{{ item.total_num }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="order_master.pay_price" label="实付款" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span class="fb orange">{{ scope.row.order_master.pay_price }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="order_master.user.nickName" label="买家" width="100"></el-table-column> |
| | | <el-table-column prop="mobile" label="交易状态" width="130"> |
| | | <template slot-scope="scope"> |
| | | <p> |
| | | <span class="gray9">付款状态:</span> |
| | | {{ scope.row.order_master.pay_status.text }} |
| | | </p> |
| | | <p> |
| | | <span class="gray9">发货状态:</span> |
| | | {{ scope.row.order_master.delivery_status.text }} |
| | | </p> |
| | | <p> |
| | | <span class="gray9">收货状态:</span> |
| | | {{ scope.row.order_master.receipt_status.text }} |
| | | </p> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="referee.value" label="佣金结算" width="70"> |
| | | <template slot-scope="scope"> |
| | | <span class="green" v-if="scope.row.is_settled == 1">已结算</span> |
| | | <span class="red" v-if="scope.row.is_settled == 0">未结算</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!--分页--> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | background |
| | | :current-page="curPage" |
| | | :page-size="pageSize" |
| | | layout="total, prev, pager, next, jumper" |
| | | :total="totalDataNumber" |
| | | ></el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import OperationsApi from '@/api/plus/operations.js'; |
| | | import qs from 'qs'; |
| | | export default { |
| | | components: { |
| | | /*编辑组件*/ |
| | | }, |
| | | data() { |
| | | return { |
| | | /*是否加载完成*/ |
| | | loading: true, |
| | | /*列表数据*/ |
| | | tableData: [], |
| | | /*一页多少条*/ |
| | | pageSize: 20, |
| | | /*一共多少条数据*/ |
| | | totalDataNumber: 0, |
| | | /*当前是第几页*/ |
| | | curPage: 1, |
| | | formInline: { |
| | | is_settled: '-1', |
| | | /*用户ID*/ |
| | | user_id: '' |
| | | }, |
| | | /*是否打开编辑弹窗*/ |
| | | open_edit: false, |
| | | /*当前编辑的对象*/ |
| | | userModel: {} |
| | | }; |
| | | }, |
| | | props: {}, |
| | | watch: { |
| | | $route(to, from) { |
| | | if (to.query.user_id != null) { |
| | | this.formInline.user_id = to.query.user_id; |
| | | } else { |
| | | this.formInline.user_id = ''; |
| | | } |
| | | this.curPage = 1; |
| | | this.getData(); |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.$route.query.user_id != null) { |
| | | this.formInline.user_id = this.$route.query.user_id; |
| | | } |
| | | /*获取列表*/ |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | /*选择第几页*/ |
| | | handleCurrentChange(val) { |
| | | let self = this; |
| | | self.curPage = val; |
| | | self.loading = true; |
| | | self.getData(); |
| | | }, |
| | | |
| | | /*获取数据*/ |
| | | getData(user_id) { |
| | | let self = this; |
| | | let Params = { |
| | | user_id: self.formInline.user_id, |
| | | page: self.curPage, |
| | | list_rows: self.pageSize, |
| | | is_settled: self.is_settled |
| | | }; |
| | | |
| | | OperationsApi.operationsOrder(Params, true) |
| | | .then(data => { |
| | | self.loading = false; |
| | | self.tableData = data.data.list.data; |
| | | self.totalDataNumber = data.data.list.total; |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | //搜索 |
| | | onSubmit() { |
| | | let self = this; |
| | | self.loading = true; |
| | | self.is_settled = self.formInline.is_settled; |
| | | self.getData(); |
| | | }, |
| | | onExport: function() { |
| | | let baseUrl = window.location.protocol + '//' + window.location.host; |
| | | window.location.href = baseUrl + '/index.php/shop/plus.operations.order/export?' + qs.stringify(this.formInline); |
| | | }, |
| | | /*每页多少条*/ |
| | | handleSizeChange(val) { |
| | | this.curPage = 1; |
| | | this.pageSize = val; |
| | | this.getData(); |
| | | }, |
| | | |
| | | /*打开弹出层编辑*/ |
| | | editClick(item) { |
| | | this.userModel = item; |
| | | this.open_edit = true; |
| | | }, |
| | | |
| | | /*关闭弹窗*/ |
| | | closeDialogFunc(e, f) { |
| | | if (f == 'add') { |
| | | this.open_add = e.openDialog; |
| | | if (e.type == 'success') { |
| | | this.getData(); |
| | | } |
| | | } |
| | | if (f == 'edit') { |
| | | this.open_edit = e.openDialog; |
| | | if (e.type == 'success') { |
| | | this.getData(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped=""> |
| | | .referee-name { |
| | | width: 33.333333%; |
| | | } |
| | | </style> |
| | |
| | | <el-radio :label="40">下级分销商总数</el-radio> |
| | | <el-radio :label="50">累计佣金总数</el-radio> |
| | | <el-radio :label="90">单次消费</el-radio> |
| | | <el-radio :label="100">购买指定商品</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="label_name" v-if="form.become!=10"> |
| | | <el-form-item :label="label_name" v-if="form.become!=10&&form.become!=100"> |
| | | <div> |
| | | <el-input v-model="form.province_condition" type="number" class="max-w460"> |
| | | <template slot="prepend">省代理满</template> |
| | | <template slot="prepend">省运营中心满</template> |
| | | <template slot="append">{{unit}}</template> |
| | | </el-input> |
| | | </div> |
| | | <div> |
| | | <el-input v-model="form.city_condition" type="number" class="max-w460 mt10"> |
| | | <template slot="prepend">市代理满</template> |
| | | <template slot="prepend">市运营中心满</template> |
| | | <template slot="append">{{unit}}</template> |
| | | </el-input> |
| | | </div> |
| | | <div> |
| | | <el-input v-model="form.area_condition" type="number" class="max-w460 mt10"> |
| | | <template slot="prepend">区/县代理满</template> |
| | | <template slot="prepend">区/县运营中心满</template> |
| | | <template slot="append">{{unit}}</template> |
| | | </el-input> |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="" v-if="form.become == 100"> |
| | | <div> |
| | | <el-row> |
| | | <el-button type="primary" @click="openProduct">选择商品</el-button> |
| | | <div v-if="form.product_image && form.product_image.length > 0" class="d-s-c f-w"> |
| | | <div v-for="(item, index) in form.product_image" :key="index" class="img pr"> |
| | | <a href="javascript:void(0)" class="delete-btn" @click="deleteFunc(index)"><i class="el-icon-error"></i></a> |
| | | <img :src="item.image" width="100" height="100" /> |
| | | <p class="text-ellipsis">{{ item.product_name }}</p> |
| | | </div> |
| | | </div> |
| | | </el-row> |
| | | </div> |
| | | </el-form-item> |
| | | <!--提交--> |
| | |
| | | <el-button size="small" type="primary" @click="onSubmit" :loading="loading">提交</el-button> |
| | | </div> |
| | | </el-form> |
| | | <!--产品列表弹出层组件--> |
| | | <Product :isproduct="isproduct" @closeDialog="closeDialogFunc($event)">产品列表弹出层</Product> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.form = this.settingData.data.basic.values; |
| | | this.form.become = parseInt(this.form.become); |
| | | this.chooseBecomeType(this.form.become); |
| | | if (!this.form.product_image) { |
| | | this.form.product_image = []; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | this.unit = '元'; |
| | | } |
| | | }, |
| | | /*删除商品*/ |
| | | deleteFunc(i) { |
| | | this.form.become__buy_product_ids.splice(i, 1); |
| | | this.form.product_image.splice(i, 1); |
| | | }, |
| | | |
| | | /*产品列表弹出层*/ |
| | | openProduct() { |
| | | this.isproduct = true; |
| | | }, |
| | | |
| | | /*关闭弹窗*/ |
| | | closeDialogFunc(e) { |
| | | this.isproduct = e.openDialog; |
| | | if (e.type == 'success') { |
| | | if (this.form.become__buy_product_ids.indexOf(e.params.product_id) == -1) { |
| | | this.form.become__buy_product_ids.push(e.params.product_id); |
| | | this.form.product_image.push({ product_id: e.params.product_id, image: e.params.image,product_name: e.params.product_name }); |
| | | } else { |
| | | this.$message({ |
| | | message: '已选择该商品', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <el-form-item label="非代理提示 "> |
| | | <el-input v-model="form.index.words.region.value" placeholder="您还不是代理,请先提交申请" class="max-w460"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="申请成为代理 "><el-input v-model="form.index.words.apply_now.value" placeholder="立即加入" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="申请运营中心 "><el-input v-model="form.index.words.apply_now.value" placeholder="立即加入" class="max-w460"></el-input></el-form-item> |
| | | <!-- <el-form-item label="推荐人 "><el-input v-model="form.index.words.referee.value" placeholder="推荐人" class="max-w460"></el-input></el-form-item> --> |
| | | <el-form-item label="可提现分红 "><el-input v-model="form.index.words.money.value" placeholder="可提现" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="待提现分红 "><el-input v-model="form.index.words.freeze_money.value" placeholder="待提现" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="已提现金额"><el-input v-model="form.index.words.total_money.value" placeholder="已提现金额" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="去提现"><el-input v-model="form.index.words.cash.value" placeholder="去提现" class="max-w460"></el-input></el-form-item> |
| | | |
| | | <div class="common-form">申请成为代理页面</div> |
| | | <div class="common-form">申请运营中心页面</div> |
| | | <el-form-item label="页面标题"> |
| | | <el-input v-model="form.apply.title.value" placeholder="申请成为代理" class="max-w460"></el-input> |
| | | <div class="tips">默认:申请成为代理</div> |
| | | <el-input v-model="form.apply.title.value" placeholder="申请运营中心" class="max-w460"></el-input> |
| | | <div class="tips">默认:申请运营中心</div> |
| | | </el-form-item> |
| | | <el-form-item label="请填写申请信息"><el-input v-model="form.apply.words.title.value" placeholder="请填写申请信息" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="代理申请协议"><el-input v-model="form.apply.words.license.value" placeholder="代理申请协议" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="申请成为代理"><el-input v-model="form.apply.words.submit.value" placeholder="申请成为代理" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="申请运营中心"><el-input v-model="form.apply.words.submit.value" placeholder="申请运营中心" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="审核中提示信息"> |
| | | <el-input v-model="form.apply.words.wait_audit.value" placeholder="您的申请已受理,正在进行信息核验,请耐心等待。" class="max-w460"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="去商城逛逛"><el-input v-model="form.apply.words.goto_mall.value" placeholder="去商城逛逛" class="max-w460"></el-input></el-form-item> |
| | | |
| | | <div class="common-form">运营中心订单页面</div> |
| | | <el-form-item label="页面标题"> |
| | | <el-input v-model="form.order.title.value" placeholder="运营中心订单" class="max-w460"></el-input> |
| | | <div class="tips">默认:运营中心订单</div> |
| | | </el-form-item> |
| | | <el-form-item label="全部"><el-input v-model="form.order.words.all.value" placeholder="全部" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="未结算"><el-input v-model="form.order.words.unsettled.value" placeholder="未结算" class="max-w460"></el-input></el-form-item> |
| | | <el-form-item label="已结算"><el-input v-model="form.order.words.settled.value" placeholder="已结算" class="max-w460"></el-input></el-form-item> |
| | | |
| | | <div class="common-form">结算明细页面</div> |
| | | <el-form-item label="页面标题"> |
| | | <el-input v-model="form.bonus_list.title.value" placeholder="结算明细" class="max-w460"></el-input> |
| | |
| | | <el-table-column prop="create_time" label="添加时间"></el-table-column> |
| | | <el-table-column prop="status" label="状态"> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox v-model="scope.row.status" :checked="scope.row.status" @change="checked => statusChange(checked,scope.row)">启用</el-checkbox> |
| | | <el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" active-text="启用" inactive-text="禁用" @change="statusChange(scope.row)" :width="55">启用</el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="100"> |
| | |
| | | }); |
| | | }, |
| | | /*启用*/ |
| | | statusChange: function(checked,row) { |
| | | statusChange: function(row) { |
| | | let self = this; |
| | | // if(row.child.length>0){ |
| | | // self.$message({ |
| | |
| | | // row.status = !checked; |
| | | // return; |
| | | // } |
| | | let status=checked?1:0; |
| | | let status=row.status?1:0; |
| | | self.loading = true; |
| | | let params={ |
| | | category_id: row.category_id, |
| | |
| | | ) |
| | | .then(data => { |
| | | self.loading = false; |
| | | row.status = checked; |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | row.status = checked?0:1; |
| | | }); |
| | | }, |
| | | } |
| | |
| | | /*商品编码*/ |
| | | product_no: '', |
| | | settlement_price: 0, |
| | | /*激活码数量*/ |
| | | activation_code_num: 0, |
| | | }, |
| | | /*多规格类别*/ |
| | | spec_many: { |
| | |
| | | <el-form-item label="商品重量(Kg):" :rules="[{ required: true, message: '请填写商品重量' }]" prop="model.sku.product_weight"> |
| | | <el-input type="number" v-model="form.model.sku.product_weight" class="max-w460"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="激活码数量:" v-if="form.model.is_activation_code==1" :rules="[{ required: true, message: '请填写激活码数量' }]" prop="model.sku.activation_code_num"> |
| | | <el-input type="number" v-model="form.model.sku.activation_code_num" class="max-w460"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <el-input size="small" v-model="batchData.settlement_price" placeholder="结算价" style="width: 160px;padding-left: 4px;"></el-input> |
| | | <el-input size="small" v-model="batchData.stock_num" placeholder="库存" style="width: 160px;padding-left: 4px;"></el-input> |
| | | <el-input size="small" v-model="batchData.product_weight" placeholder="重量" style="width: 160px;padding-left: 4px;"></el-input> |
| | | <el-input size="small" v-model="batchData.activation_code_num" placeholder="激活码数量" |
| | | style="width: 160px;padding-left: 4px;"></el-input> |
| | | <el-button size="small" @click="onSubmitBatchData">应用</el-button> |
| | | </div> |
| | | <!--多规格表格--> |
| | |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="激活码数量" v-if="form.model.is_activation_code==1"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item |
| | | label="" |
| | | :rules="[{ required: true, message: ' ' }]" |
| | | :prop="'model.spec_many.spec_list.' + scope.$index + '.spec_form.activation_code_num'" |
| | | style="margin-bottom: 0;" |
| | | > |
| | | <el-input size="small" prop="activation_code_num" v-model="scope.row.spec_form.activation_code_num"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | product_price: '', |
| | | line_price: '', |
| | | stock_num: '', |
| | | product_weight: '' |
| | | product_weight: '', |
| | | settlement_price: '', |
| | | activation_code_num: '', |
| | | }, |
| | | /*图片是否打开*/ |
| | | isupload: false, |
| | |
| | | <el-button size="small" type="primary" @click="addCategory">添加分类</el-button> |
| | | <el-select v-model="form.category_type" placeholder="选择类型" @change="getTableList" style="width: 150px; margin-left: 10px;"> |
| | | <el-option label="全部" :value="0"></el-option> |
| | | <el-option label="实物" :value="10"></el-option> |
| | | <el-option label="团购" :value="20"></el-option> |
| | | <el-option v-for="(item,index) in typeList" :key="index" :label="item" :value="index"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="table-wrap"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--添加--> |
| | | <Add v-if="open_add" :open_add="open_add" @closeDialog="closeDialogFunc($event, 'add')"></Add> |
| | | <Add v-if="open_add" :open_add="open_add" @closeDialog="closeDialogFunc($event, 'add')" :typeList="typeList"></Add> |
| | | |
| | | <!--编辑--> |
| | | <Edit v-if="open_edit" :open_edit="open_edit" :form="userModel" |
| | | <Edit v-if="open_edit" :open_edit="open_edit" :form="userModel" :typeList="typeList" |
| | | @closeDialog="closeDialogFunc($event, 'edit')"></Edit> |
| | | |
| | | </div> |
| | |
| | | commentData: [], |
| | | /*是否加载完成*/ |
| | | loading: true, |
| | | /*供应商类型列表*/ |
| | | typeList: [], |
| | | /*筛选表单*/ |
| | | form: { |
| | | category_type: 0 |
| | |
| | | { |
| | | self.loading = false; |
| | | self.categoryData = data.data.category; |
| | | self.typeList = data.data.typeList; |
| | | }) |
| | | .catch(error => |
| | | { |
| | |
| | | </el-form-item> |
| | | <el-form-item label="分类类型" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="form.category_type"> |
| | | <el-radio :label="10">实物</el-radio> |
| | | <el-radio :label="20">团购</el-radio> |
| | | <el-radio v-for="(item,index) in typeList" :key="index" :label="index">{{item}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="保证金(元)" :label-width="formLabelWidth" prop="deposit_money"> |
| | |
| | | loading: false, |
| | | }; |
| | | }, |
| | | props: ['open_add'], |
| | | props: ['open_add', 'typeList'], |
| | | created() { |
| | | this.dialogVisible = this.open_add; |
| | | }, |
| | |
| | | </el-form-item> |
| | | <el-form-item label="分类类型" :label-width="formLabelWidth"> |
| | | <el-radio-group v-model="form.category_type"> |
| | | <el-radio :label="10">实物</el-radio> |
| | | <el-radio :label="20">团购</el-radio> |
| | | <el-radio v-for="(item,index) in typeList" :key="index" :label="index">{{item}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="保证金(元)" :label-width="formLabelWidth" prop="deposit_money"> |
| | |
| | | loading: false, |
| | | }; |
| | | }, |
| | | props: ['open_edit', 'form'], |
| | | props: ['open_edit', 'form', 'typeList'], |
| | | created() { |
| | | this.dialogVisible = this.open_edit; |
| | | }, |
| | |
| | | <el-table-column prop="create_time" label="添加时间"></el-table-column> |
| | | <el-table-column prop="status" label="状态"> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox v-model="scope.row.status" :checked="scope.row.status" @change="checked => statusChange(checked,scope.row)">启用</el-checkbox> |
| | | <el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" @change="statusChange(scope.row)">启用</el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="100"> |
| | |
| | | }); |
| | | }, |
| | | /*启用*/ |
| | | statusChange: function(checked,row) { |
| | | statusChange: function(row) { |
| | | let self = this; |
| | | // if(row.child.length>0){ |
| | | // self.$message({ |
| | |
| | | // row.status = !checked; |
| | | // return; |
| | | // } |
| | | let status=checked?1:0; |
| | | let status=row.status?1:0; |
| | | self.loading = true; |
| | | let params={ |
| | | category_id: row.category_id, |
| | |
| | | ) |
| | | .then(data => { |
| | | self.loading = false; |
| | | row.status = checked; |
| | | }) |
| | | .catch(error => { |
| | | self.loading = false; |
| | | row.status = checked?0:1; |
| | | }); |
| | | }, |
| | | } |
| | |
| | | is_gift_pack: 0, |
| | | // 生成几个超级分红订单 |
| | | vip_order_num: 0, |
| | | is_vip:0 |
| | | }, |
| | | /*商品分类*/ |
| | | category: [], |
| | |
| | | <el-input type="number" min="0" v-model="form.model.deduction_price" class="max-w460"></el-input> |
| | | <div class="gray9">该券线下核销时,实际抵扣的金额</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="is_vip" label="是否是激活码商品:" > |
| | | <el-form-item v-if="form.is_vip" label="是否是激活码商品:" > |
| | | <el-radio-group v-model="form.model.is_activation_code"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="is_vip" label="是否可以被激活码兑换:" > |
| | | <el-form-item v-if="form.is_vip" label="是否可以被激活码兑换:" > |
| | | <el-radio-group v-model="form.model.activation_code_exchange"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="is_vip" label="是否升级礼包:" > |
| | | <el-form-item v-if="form.is_vip" label="是否升级礼包:" > |
| | | <el-radio-group v-model="form.model.is_gift_pack"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| | | <style> |
| | | </style> |