解决冲突

master
ELF 5 years ago
commit 423b4ae77b

@ -6,6 +6,7 @@ use Base\Model\UserPlayInfoModel;
use Base\Model\UserPlayModel;
use Base\Model\UserModel;
use Base\Tool\IdCard;
use Base\Tool\Registry;
use Think\Model;
class PromoteService {
@ -942,6 +943,7 @@ class PromoteService {
'create_time' => time(),
'company_belong' => $params['company_belong'] ?? 0,
'company_relation' => $params['company_relation'] ?? 0,
'group_remark' => $params['group_remark'] ?? '',
];
if ($parent) {
@ -1019,4 +1021,62 @@ class PromoteService {
}
return true;
}
public function getPromoteGroups($topPromoteId)
{
$promoteGroups = [];
if (Registry::has('promoteGroups')) {
$promoteGroups = Registry::get('promoteGroups');
}
if (!isset($promoteGroups[$topPromoteId])) {
$data = [];
$promotes = M('promote', 'tab_')->field(['id', 'level', 'group_remark', 'parent_id'])->where(['level' => ['in', [2, 3]], 'chain' => ['like', '/'.$topPromoteId.'/%']])->select();
foreach ($promotes as $promote) {
if ($promote['level'] == 2) {
$data[$promote['id']] = [
'name' => $promote['group_remark'],
'subs' => []
];
}
}
foreach ($promotes as $promote) {
if ($promote['level'] == 3) {
$data[$promote['parent_id']]['subs'][$promote['id']] = [
'name' => $promote['group_remark'],
];
}
}
/*echo '<pre>';
var_dump($data);
echo '</pre>';die();*/
$promoteGroups[$topPromoteId] = $data;
Registry::set('promoteGroups', $promoteGroups);
}
return $promoteGroups[$topPromoteId];
}
public function getGroupNameByChain($chain, $promoteId)
{
$chain = trim($chain, '/');
if ($chain == '') {
return '';
}
$row = explode('/', $chain);
$promoteGroups = $this->getPromoteGroups($row[0]);
$groupName = '';
if (isset($row[1])) {
$groupName .= $promoteGroups[$row[1]]['name'];
if (isset($row[2])) {
$groupName .= '/' . $promoteGroups[$row[1]]['subs'][$row[2]]['name'];
}
}
if (count($row) == 2) {
$groupName .= '/' . $promoteGroups[$row[1]]['subs'][$promoteId]['name'];
}
if (count($row) == 1) {
$groupName .= $promoteGroups[$promoteId]['name'];
}
return $groupName;
}
}

@ -0,0 +1,27 @@
<?php
namespace Base\Tool;
class Registry
{
public static $data;
public static function get(string $name)
{
return self::$data[$name] ?? null;
}
public static function set(string $name, $value)
{
self::$data[$name] = $value;
}
public static function has($name)
{
return isset(self::$data[$name]);
}
public static function delete($name)
{
unset(self::$data[$name]);
}
}

@ -2983,3 +2983,8 @@ function db2csv(&$data,$title,$header=false){
unlink($filename);
die();
}
function hideRealName($realName)
{
return mb_strlen($realName,'utf-8') == 2 ? mb_substr($realName,0,1,'utf-8').'*':mb_substr($realName,0,1,'utf-8').'**';
}

@ -1651,7 +1651,7 @@ class DownloadController extends BaseController {
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$data = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level'])->where($map)->select();
$data = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level', 'chain'])->where($map)->select();
$ids = array_column($data, 'id');
$rows = [];
if (count($ids) > 0) {
@ -3352,6 +3352,7 @@ class DownloadController extends BaseController {
$xlsCell = array(
array('account','账号'),
array('real_name','姓名'),
array('promote_group', '部门/小组'),
array('create_role_count','创角数'),
array('create_role_user_count','创角用户'),
array('new_create_role_user_count','新创角用户'),
@ -3410,7 +3411,7 @@ class DownloadController extends BaseController {
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
}
$promoteService = new PromoteService();
$records = [];
if (I('p', 1) == 1) {
$selfParams = $params;
@ -3424,7 +3425,8 @@ class DownloadController extends BaseController {
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
'promote_group' => $promoteService->getGroupNameByChain($parent['chain'], $parent['id']),
'real_name' => hideRealName($parent['real_name']),
'level' => $parent['level'],
'create_role_count' => $selfCreateRoleCountList[$parent['id']],
'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']],
@ -3452,7 +3454,8 @@ class DownloadController extends BaseController {
$record = [
'id' => $id,
'account' => $promote['account'],
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
'promote_group' => $promoteService->getGroupNameByChain($promote['chain'], $promote['id']),
'real_name' => hideRealName($promote['real_name']),
'level' => $promote['level'],
'create_role_count' => $createRoleCountList[$id],
'create_role_user_count' => $createRoleUserCountList[$id],
@ -3552,7 +3555,7 @@ class DownloadController extends BaseController {
unset($map['begintime']);
unset($map['endtime']);
$map['uc.pay_status'] = 1;
$fieldS = "sum(uc.pay_amount) recharge_cost, count(*) recharge_count, uc.user_id, uc.user_account, uc.promote_account, uc.game_name, uc.sdk_version, uc.server_name, SUBSTRING_INDEX(GROUP_CONCAT(uc.game_player_name order by uc.id desc), ',', 1) as game_player_name";
$fieldS = "sum(uc.pay_amount) recharge_cost, count(*) recharge_count, uc.user_id, uc.user_account, uc.promote_id, uc.promote_account, uc.game_name, uc.sdk_version, uc.server_name, SUBSTRING_INDEX(GROUP_CONCAT(uc.game_player_name order by uc.id desc), ',', 1) as game_player_name";
$fieldUser = 'u.register_time, u.login_time';
$now = date('Y-m-d');
@ -3616,6 +3619,12 @@ class DownloadController extends BaseController {
->table($subQuery)
->limit(($i-1)*$perSize ,$perSize)
->select();
$promoteService = new PromoteService();
$promoteIds = array_column($data, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
foreach($data as $key => $value) {
// if (empty($value['user_account']) ) {
// $value['user_account'] = $users[$value['user_id']] ?? '';
@ -3639,7 +3648,12 @@ class DownloadController extends BaseController {
$csvData['create_time'] = empty($value['register_time']) ? '--' : date('Y-m-d H:i:s', $value['register_time']);
$csvData['login_time'] = empty($value['login_time']) ? '--' :date('Y-m-d H:i:s',$value['login_time']);
$csvData['promote_account'] = empty($value['promote_account']) ? '--' :$value['promote_account'];
if (isset($promotes[$value['promote_id']])) {
$groupName = $promoteService->getGroupNameByChain($promotes[$value['promote_id']]['chain'], $value['promote_id']);
if ($groupName) {
$csvData['promote_account'] .= '(' . $groupName . ')';
}
}
mb_convert_variables('GBK', 'UTF-8', $csvData);
fputcsv($fp, $csvData);
$xlsData[] = $csvData;

@ -8,6 +8,7 @@ use OT\DataDictionary;
use Base\Repository\PromoteRepository;
use Base\Repository\SpendRepository;
use Base\Repository\UserRepository;
use Base\Service\PromoteService;
/**
* 财务管理
@ -265,7 +266,7 @@ class FinanceController extends BaseController
}
}
$data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
$data = $model->field('pay_order_number,game_name,user_account,promote_id,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
->where($map)
->order('id desc')
->page($page, $row)
@ -292,6 +293,11 @@ class FinanceController extends BaseController
->where(array('id' => ['in', $withdrawIds]))
->getField('id,status');
$promoteService = new PromoteService();
$promoteIds = array_column($data, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
foreach ($data as &$list) {
//提现状态
if ($list['pay_status'] == 1) {
@ -314,6 +320,7 @@ class FinanceController extends BaseController
$list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
$list['user_account'] = encryption($list['user_account']);
$list['promote_group'] = isset($promotes[$list['promote_id']]) ? $promoteService->getGroupNameByChain($promotes[$list['promote_id']]['chain'], $list['promote_id']) : '';
}
}

@ -1088,6 +1088,7 @@ class PromoteController extends BaseController
if (!$result['status']) {
$this->ajaxReturn(['status' => 0, 'msg' => $result['message']]);
}
$status = $promoteService->addPromote($params, $parent);
if ($status) {
$this->ajaxReturn(['status' => 1, 'msg' => '添加成功']);
@ -1217,7 +1218,10 @@ class PromoteController extends BaseController
return false;
}
}
if (empty($_REQUEST['real_name'])) {
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
exit();
}
if (empty($_REQUEST['real_name'])) {
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
exit();
@ -1239,6 +1243,20 @@ class PromoteController extends BaseController
$this->error('您输入的手机号码格式不合法', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
}
$groupRemark = $_REQUEST['group_remark'] ?? '';
$promote = M('promote', 'tab_')->field(['id', 'level'])->where(['id' => $_REQUEST['id']])->find();
if (!$promote) {
$this->error('该推广员不存在', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
if ($promote['level'] == 2 && $groupRemark == '') {
$this->error('请输入部门名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
if ($promote['level'] == 3 && $groupRemark == '') {
$this->error('请输入小组名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
// if (empty($_REQUEST['email'])) {
// $this->error('电子邮箱不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
// return false;

@ -145,7 +145,7 @@ class QueryController extends BaseController
$promoteData = [];
if (!empty($promoteIdData)) {
$promoteIdData = array_unique($promoteIdData);
$promoteData = M('promote', 'tab_')->where(array('id' => ['in',$promoteIdData]))->getField('id,account,real_name');
$promoteData = M('promote', 'tab_')->where(array('id' => ['in',$promoteIdData]))->getField('id,account,real_name,group_remark');
}
foreach ($data as &$list) {
switch ($list['level']) {
@ -168,8 +168,10 @@ class QueryController extends BaseController
$chainArr = explode('/', $chain);
$list['p_p_pro_account'] = $promoteData[$chainArr[1]]['account'];
$list['p_p_pro_real_name'] = $promoteData[$chainArr[1]]['real_name'];
$list['p_p_pro_group_remark'] = $promoteData[$chainArr[1]]['group_remark'];
$list['p_pro_account'] = $promoteData[$list['parent_id']]['account'];
$list['p_pro_real_name'] = $promoteData[$list['parent_id']]['real_name'];
$list['p_pro_group_remark'] = $promoteData[$list['parent_id']]['group_remark'];
break;
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
@ -1859,7 +1861,7 @@ class QueryController extends BaseController
}
$map['s.pay_time'] = ['between', [$begTime, $endTime - 1]];
$fieldS = "sum(s.pay_amount) recharge_cost, count(*) recharge_count, s.user_id, s.user_account, s.promote_account, s.game_name, s.sdk_version, s.server_name, SUBSTRING_INDEX(GROUP_CONCAT(s.game_player_name order by s.id desc), ',', 1) as game_player_name";
$fieldS = "sum(s.pay_amount) recharge_cost, count(*) recharge_count, s.user_id, s.user_account, s.promote_id, s.promote_account, s.game_name, s.sdk_version, s.server_name, SUBSTRING_INDEX(GROUP_CONCAT(s.game_player_name order by s.id desc), ',', 1) as game_player_name";
$fieldUser = 'u.register_time, u.login_time';
$spendMap['_string'] = 'today.user_id = s.user_id and today.game_id = s.game_id and today.server_id = s.server_id and today.game_player_id = s.game_player_id and today.promote_id = s.promote_id';
@ -1902,6 +1904,10 @@ class QueryController extends BaseController
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];
if (!empty($records)) {
$promoteService = new PromoteService();
$promoteIds = array_column($records, 'promote_id');
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
foreach ($records as &$list) {
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
$list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
@ -1912,6 +1918,7 @@ class QueryController extends BaseController
$list['login_time'] = empty($list['login_time']) ? '--' : date('Y-m-d H:i:s', $list['login_time']);
$list['register_time'] = empty($list['register_time']) ? '--' : date('Y-m-d H:i:s', $list['register_time']);
$list['promote_account'] = empty($list['promote_account']) ? '--' : $list['promote_account'];
$list['promote_group'] = isset($promotes[$list['promote_id']]) ? $promoteService->getGroupNameByChain($promotes[$list['promote_id']]['chain'], $list['promote_id']) : '';
$list['recharge_cost_today'] = empty($list['recharge_cost_today']) ? '0.00' : $list['recharge_cost_today'];
}
}
@ -1968,7 +1975,7 @@ class QueryController extends BaseController
public function getSubPromotes()
{
$promoteId = I('promote_id', 0) ?: -1;
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promoteId])->select();
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'group_remark'])->where(['parent_id' => $promoteId])->select();
$this->ajaxReturn([
'status' => 1,
'msg' => '成功',
@ -2055,15 +2062,16 @@ class QueryController extends BaseController
$games = get_promote_serach_game();
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $parent['id']])->select();
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'group_remark'])->where(['parent_id' => $parent['id']])->select();
$map = ['parent_id' => $parent['id']];
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level'])->where($map);
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level', 'chain'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
$rows = [];
@ -2121,6 +2129,8 @@ class QueryController extends BaseController
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
}
$promoteService = new PromoteService();
if (I('p', 1) == 1) {
$selfParams = $params;
$selfParams['isContainSubs'] = false;
@ -2133,7 +2143,8 @@ class QueryController extends BaseController
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
'promote_group' => $promoteService->getGroupNameByChain($parent['chain'], $parent['id']),
'real_name' => hideRealName($parent['real_name']),
'level' => $parent['level'],
'create_role_count' => $selfCreateRoleCountList[$parent['id']],
'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']],
@ -2161,7 +2172,8 @@ class QueryController extends BaseController
$record = [
'id' => $id,
'account' => $promote['account'],
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
'promote_group' => $promoteService->getGroupNameByChain($promote['chain'], $promote['id']),
'real_name' => hideRealName($promote['real_name']),
'level' => $promote['level'],
'create_role_count' => $createRoleCountList[$id],
'create_role_user_count' => $createRoleUserCountList[$id],

@ -161,7 +161,7 @@
<td>{$vo.pay_order_number}</td>
<td>{$vo.game_name}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>
<td>{$vo.promote_account}<?php if($vo['promote_group']):?>({$vo.promote_group})<?php endif;?></td>
<td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1">
<td>0.00</td>

@ -70,10 +70,27 @@
<tr>
<td class="l">昵称:</td>
<td class="r">
<input type="text" class="name txt" name="nickname" id="nickname" placeholder="请输入子渠道昵称">
<input type="text" class="name txt" name="nickname" id="nickname" placeholder="请输入昵称">
<span id="nickname_tip"></span>
</td>
</tr>
<?php if(I('promote_type', 0) == 0):?>
<tr>
<td class="l"><span class="req">*</span>部门名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" id="group_remark" placeholder="请输入部门名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php elseif(I('promote_type', 0) == 1):?>
<tr>
<td class="l"><span class="req">*</span>小组名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" id="group_remark" placeholder="请输入小组名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php endif;?>
<tr>
<td class="l"></td>
<td class="r">
@ -164,6 +181,14 @@
if($('#repassword').val()!==$('#password').val()){
return json_data = {'status':0,'msg':'子渠道密码和确认密码不一致'}
}
if ((promote_type == 0 || promote_type == 1) && $.trim($('#group_remark')) == '') {
if (promote_type == 0) {
return json_data = {'status':0,'msg':'请输入部门名称'}
}
if (promote_type == 1) {
return json_data = {'status':0,'msg':'请输入小组名称'}
}
}
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
// if(!myreg.test($('#mobile_phone').val())){
// return json_data = {'status':0,'msg':'请输入正确的手机号'}

@ -62,6 +62,23 @@
<span id="email_tip"></span>
</td>
</tr>
<?php if(I('promote_type', 0) == 0):?>
<tr>
<td class="l"><span class="req">*</span>部门名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" value="{$data['group_remark']}" id="group_remark" placeholder="请输入部门名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php elseif(I('promote_type', 0) == 1):?>
<tr>
<td class="l"><span class="req">*</span>小组名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" value="{$data['group_remark']}" id="group_remark" placeholder="请输入小组名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php endif;?>
<tr>
<td class="l"></td>
<td class="r">

@ -56,10 +56,23 @@
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择{$searchLevelName}</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>
{$promote.account}({$promote.real_name})
<?=$promote['group_remark'] ? ' - ' . $promote['group_remark'] : '' ?>
</option>
</volist>
</select>
</div>
<?php if($parent['level'] + 1 == 2):?>
<div class="form-group normal_space fr">
<input type="text" class="txt" name="group_remark" placeholder="部门名称" value="{:I('group_remark')}" >
</div>
<?php endif;?>
<?php if($parent['level'] + 1 == 3):?>
<div class="form-group normal_space fr">
<input type="text" class="txt" name="group_remark" placeholder="组长名称" value="{:I('group_remark')}" >
</div>
<?php endif;?>
<div class="form-group normal_space fr">
<input type="text" class="txt range-date" name="time" placeholder="起止时间" value="{$time}" >
</div>
@ -100,7 +113,11 @@
<else />
<volist name="records" id="record" mod="2">
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.account}({$record.real_name})
<td>{$record.account}({$record.real_name}
<?php if($record['promote_group'] != ''):?>
/{$record.promote_group}
<?php endif;?>
)
<?php if($record['current_display'] != ''):?>
<span style="color: #06C;">[{$record['current_display']}]</span>
<?php endif;?>

@ -213,8 +213,8 @@
<td>{$vo.sdk_version}</td>
<td>{$vo.server_name}</td>
<td>{$vo.game_player_name}</td>
<td>{$vo.p_p_pro_account}({$vo.p_p_pro_real_name})</td>
<td>{$vo.p_pro_account}({$vo.p_pro_real_name})</td>
<td>{$vo.p_p_pro_account}({$vo.p_p_pro_real_name}/{$vo.p_p_pro_group_remark})</td>
<td>{$vo.p_pro_account}({$vo.p_pro_real_name}/{$vo.p_pro_group_remark})</td>
<td>{$vo.pro_account}({$vo.pro_real_name})</td>
<td>{$vo.pay_time}</td>
<!-- <td>-->

@ -190,7 +190,7 @@
<td>{$record.user_game_login_count}</td>
<td>{$record.register_time}</td>
<td>{$record.login_time}</td>
<td>{$record.promote_account}</td>
<td>{$record.promote_account}<?php if($record['promote_group']):?>(<?=$record['promote_group']?>)<?php endif;?></td>
</tr>
</volist>
<tr>

@ -1191,3 +1191,7 @@ ADD COLUMN `company_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '工
-- 2020-02-10 cxj 推广提现--新增审核模式
ALTER TABLE `tab_withdraw`
ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式1-人工审核 2-自动审核';
-- 2020-02-10 liaojinling 推广员组名/部门名
ALTER TABLE `tab_promote`
ADD COLUMN `group_remark` varchar(50) NOT NULL default '' COMMENT '部门分组';

@ -272,7 +272,8 @@ function getSubPromotes(url, parentId, level) {
if (defaultVal > 0 && promote.id == defaultVal) {
selected = 'selected'
}
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '(' + promote.real_name + ')' + '</option>'
var groupRemark = (promote.group_remark == '' ? '' : ' - ' + promote.group_remark);
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '(' + promote.real_name + ')' + groupRemark + '</option>'
}
selectTag.html(options)
selectTag.val(defaultVal).trigger("change")

Loading…
Cancel
Save