Merge branch 'feature/change_company_belong' of wmtx/platform into release

推广员内外团归属优化
master
廖金灵 5 years ago committed by Gogs
commit 9222d99127

@ -2208,6 +2208,55 @@ function a_array_unique($array){
return $data; return $data;
} }
} }
/**
* 获取公会归属关系
* @author chenzhi 20200219
* $id 不传返回所有关系列表
* 传入ID 返回对应的团体关系
*/
function getCompanyRelation($id = -1)
{
$data = array(
["id"=>0,'name'=>"自主开发及维护"],
["id"=>1,'name'=>"只维护"],
["id"=>2,'name'=>"无"]
);
if($id > -1){
foreach($data as $k=>$v){
if($v['id'] == $id){
return $v['name'];
break;
}
}
}else{
return $data;
}
}
/**
* 获取公会等级对应名称
* @author chenzhi 20200219
* $id 不传返回所有等级名称
* 传入ID 返回对应的等级名称
*/
function getPromoteLeverName($id = -1)
{
$data = array(
["id"=>1,'name'=>"会长"],
["id"=>2,'name'=>"部门长"],
["id"=>3,'name'=>"组长"],
["id"=>4,'name'=>"组员"],
);
if($id > -1){
foreach($data as $k=>$v){
if($v['id'] == $id){
return $v['name'];
break;
}
}
}else{
return $data;
}
}
/** /**
* 操作日志 * 操作日志

@ -9,7 +9,9 @@ namespace Admin\Controller;
*/ */
class OldCountController extends \Think\Controller class OldCountController extends \Think\Controller
{ {
//财务分类汇总统计旧数据聚合 /**
* 财务分类汇总统计旧数据聚合
*/
public function FinancialSummaryInit() public function FinancialSummaryInit()
{ {
//清空数据库 //清空数据库
@ -23,7 +25,9 @@ class OldCountController extends \Think\Controller
$Financial->setMonthFinancialSummary($v); $Financial->setMonthFinancialSummary($v);
} }
} }
//超级签订单新增识别微信或者支付宝2019-12-11 /*
*超级签订单新增识别微信或者支付宝2019-12-11
*/
public function gameSupersignPaywayInit() public function gameSupersignPaywayInit()
{ {
$map = array( $map = array(
@ -103,6 +107,25 @@ class OldCountController extends \Think\Controller
} }
die("init ok"); die("init ok");
} }
/**
* 修改公会内外团关系跟随公司 旧数据跟随 20200318
*/
public function promoteCompanyBelongInit()
{
//获取所有公司
$comoany = M("PromoteCompany","tab_")->field("id,company_belong")->select();
$comoany[] = ["id"=>0,"company_belong"=>0]; //海南万盟
$count = count($comoany);
$promote = M("Promote","tab_");
for ($i=0; $i < $count; $i++) {
$savedata = array(
"company_belong"=>$comoany[$i]['company_belong']
);
$tmpid = $comoany[$i]['id'];
$promote->where("company_id ='{$tmpid}'")->save($savedata);
}
die("promoteCompanyBelongInit success");
}
//获取公司月结所需要的所有月份截止至上个月 //获取公司月结所需要的所有月份截止至上个月
public function getMonthsList() public function getMonthsList()
{ {
@ -124,4 +147,5 @@ class OldCountController extends \Think\Controller
} }
} }

@ -39,6 +39,9 @@ class PromoteCompanyController extends ThinkController
if (isset($_REQUEST['company_type'])) { if (isset($_REQUEST['company_type'])) {
$map['company_type'] = $_REQUEST['company_type']; $map['company_type'] = $_REQUEST['company_type'];
} }
if (isset($_REQUEST['company_belong'])) {
$map['company_belong'] = $_REQUEST['company_belong'];
}
$page = intval(I('get.p', 0)); $page = intval(I('get.p', 0));
@ -146,8 +149,10 @@ class PromoteCompanyController extends ThinkController
} }
} }
$v['can_del'] = 0;
}else{ }else{
//空值 //空值
$v['can_del'] = 1;
$v['list']=[ $v['list']=[
[ [
"account"=>"--", "account"=>"--",
@ -313,10 +318,23 @@ class PromoteCompanyController extends ThinkController
if(isset($save['resources'])){ if(isset($save['resources'])){
$save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE); $save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE);
} }
//判断内外团是否修改
$is_change_belong = false;
$company_id = $save['id'];
$y_belong = $model->field("company_belong")->where("id = {$save['id']}")->find()['company_belong'];
if(isset($save['company_belong']) && ($y_belong != $save['company_belong'])){
$is_change_belong = true;
}
$res = $model->save($save); $res = $model->save($save);
if ($res) { if ($res) {
\Think\Log::actionLog('PromoteCompany/edit', 'partner', $res); \Think\Log::actionLog('PromoteCompany/edit', 'partner', $res);
//处理底下所有会长的公会属性
if($is_change_belong){
$savedata = array(
"company_belong"=>$save['company_belong']
);
M("Promote","tab_")->where("company_id = '{$company_id}'")->save($savedata);
}
addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-编辑推广公司']); addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-编辑推广公司']);
$array=array( $array=array(

@ -50,7 +50,7 @@ class PromoteController extends ThinkController
if (isset($_REQUEST['promote_id'])) { if (isset($_REQUEST['promote_id'])) {
$promoteid = $_REQUEST['promote_id']; $promoteid = $_REQUEST['promote_id'];
$map['id'] = $_REQUEST['promote_id']; $map['p.id'] = $_REQUEST['promote_id'];
} }
if (isset($_REQUEST['parent_id'])) { if (isset($_REQUEST['parent_id'])) {
if ($_REQUEST['parent_id']=='全部') { if ($_REQUEST['parent_id']=='全部') {
@ -68,12 +68,12 @@ class PromoteController extends ThinkController
if ($promoteid > 0 ) { if ($promoteid > 0 ) {
if (in_array($promoteid,$zidarr)) { if (in_array($promoteid,$zidarr)) {
# code... # code...
$map['id'] = $promoteid; $map['p.id'] = $promoteid;
}else{ }else{
$map['id'] = 0; $map['p.id'] = 0;
} }
}else{ }else{
$map['id']=array('in',$zid); $map['p.id']=array('in',$zid);
} }
// //
unset($_REQUEST['parent_id']); unset($_REQUEST['parent_id']);
@ -87,7 +87,7 @@ class PromoteController extends ThinkController
} }
} }
if (I('status') || I('status', -1) == 0) { if (I('status') || I('status', -1) == 0) {
$map['status'] = I('status'); $map['p.status'] = I('status');
} }
if (I('ver_status') || I('ver_status', -1) == 0) { if (I('ver_status') || I('ver_status', -1) == 0) {
@ -95,14 +95,14 @@ class PromoteController extends ThinkController
} }
if (I("promote_level")) { if (I("promote_level")) {
$map['level'] = I("promote_level"); $map['p.level'] = I("promote_level");
} }
if (strlen(I('company_belong'))) { if (strlen(I('company_belong'))) {
$map['company_belong'] = I("company_belong"); $map['p.company_belong'] = I("company_belong");
} }
if (!is_null(I('admin_uid', null))) { if (!is_null(I('admin_uid', null))) {
$map['admin_id'] = I('admin_uid'); $map['p.admin_id'] = I('admin_uid');
} }
$this->m_title = '推广员列表'; $this->m_title = '推广员列表';
@ -149,8 +149,21 @@ class PromoteController extends ThinkController
//为数据权限添加 //为数据权限添加
setPowerPromoteIds($map, 'id'); setPowerPromoteIds($map, 'p.id');
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select(); $list_data = D(self::model_name)
->alias("p")
->field("p.*,IFNULL(m.nickname,'无') admin_nickname,IFNULL(b.account,'暂无') b_account,IFNULL(if(substring_index(substring_index(p.`chain`,'/',2),'/',-1)='',p.id,substring_index(substring_index(p.`chain`,'/',2),'/',-1)),0) top_id")
->join("sys_member m on p.admin_id = m.uid","left")
->join("tab_business_affairs b on p.ba_id = b.id","left")
->where($map)->order('id DESC');
if(isset($_REQUEST['export'])){
$list_data = $list_data->select(false);
}else{
$list_data = $list_data->page($p, $row)->select(false);
}
$list_data = M()->table("(".$list_data.") a")->field("a.*,pr.account top_account")->join("tab_promote pr on a.top_id = pr.id")->select();
$list_data = D(self::model_name)->parseListData($list_data); $list_data = D(self::model_name)->parseListData($list_data);
$oa_data = []; $oa_data = [];
if (I('oa_associated', -1) == -1) { if (I('oa_associated', -1) == -1) {
@ -178,7 +191,33 @@ class PromoteController extends ThinkController
} }
} }
} }
$count = D(self::model_name)->where($map)->count(); //导出
if(isset($_REQUEST['export'])){
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"推广员-推广员管理-推广员列表-导出"]);
data2csv($list_data,'推广员列表',array(
"id"=>"推广员ID",
"account"=>"推广员账号",
"mobile_phone"=>"手机号码",
"balance_coin"=>"平台币余额",
"pay_amount"=>"总流水",
"create_time"=>"注册时间",
"last_login_time"=>"最后登录时间",
"level_name"=>"渠道类型",
"top_account"=>"所属会长",
"company_belong_str"=>"公会归属",
"company_relation_str"=>"公会关系",
"admin_nickname"=>"归属管理员",
"b_account"=>"商务专员",
"status_str"=>"状态",
"ver_status"=>"身份状态",
"oa_associated_str"=>"oa关联"
));
}
$count = D(self::model_name)->alias("p")->where($map)->count();
$page = set_pagination($count, $row); $page = set_pagination($count, $row);
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
@ -245,6 +284,9 @@ class PromoteController extends ThinkController
} }
$company_belong = $_REQUEST['company_belong'] ?? 0; $company_belong = $_REQUEST['company_belong'] ?? 0;
$company_relation = $_REQUEST['company_relation'] ?? 0; $company_relation = $_REQUEST['company_relation'] ?? 0;
if($company_id && $company_id > 0){
$company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id = {$company_id}")->find()['company_belong'];
}
$data = array( $data = array(
'account'=>$account, 'account'=>$account,
'password'=>$password, 'password'=>$password,
@ -359,10 +401,13 @@ class PromoteController extends ThinkController
if ($promote['level'] ==1) {//如果是会长才能修改的选项 if ($promote['level'] ==1) {//如果是会长才能修改的选项
if (!is_null($company_id)) { if (!is_null($company_id)) {
$data['company_id'] = $company_id;//推广公司 $data['company_id'] = $company_id;//推广公司
if($company_id == 0){
$data['company_belong'] = 0;
}else{
$data['company_belong'] = M("PromoteCompany","tab_")->field("company_belong")->where("id = {$company_id}")->find()['company_belong'];
} }
}
$data['company_belong'] = I('company_belong');//工会归属 // $data['company_relation'] = I('company_relation');//工会关系
$data['company_relation'] = I('company_relation');//工会关系
} }
$settlementType = intval(I('settlement_type', 1)); $settlementType = intval(I('settlement_type', 1));
if (!empty(I('settlement_type')) && in_array($settlementType, [1, 2])) { if (!empty(I('settlement_type')) && in_array($settlementType, [1, 2])) {
@ -373,6 +418,12 @@ class PromoteController extends ThinkController
if ($promote['level'] == 1) {//修改会长底下推广员的推广公司 if ($promote['level'] == 1) {//修改会长底下推广员的推广公司
$array = array(); $array = array();
if ($promote['company_id'] != $company_id) { if ($promote['company_id'] != $company_id) {
//内外团关系也要跟着公司走
if($company_id == 0){
$array['company_belong'] = 0;
}else{
$array['company_belong'] = M("PromoteCompany","tab_")->field("company_belong")->where("id = {$company_id}")->find()['company_belong'];
}
$array['company_id'] = I('company_id'); $array['company_id'] = I('company_id');
} }
// if ($promote['company_belong'] != I('company_belong')) { // if ($promote['company_belong'] != I('company_belong')) {
@ -1275,6 +1326,9 @@ class PromoteController extends ThinkController
if (strlen(I('company_relation'))) { if (strlen(I('company_relation'))) {
$map['pb.company_relation'] = I('company_relation'); $map['pb.company_relation'] = I('company_relation');
} }
if (isset($_REQUEST['company_belong'])) {
$map['p.company_belong'] = $_REQUEST['company_belong'];
}
if (strlen(I('verify_status'))) { if (strlen(I('verify_status'))) {
$map['verify_status'] = I('verify_status'); $map['verify_status'] = I('verify_status');
@ -1309,11 +1363,17 @@ class PromoteController extends ThinkController
//为数据权限添加 //为数据权限添加
setPowerPromoteIds($map, 'pb.promote_id'); setPowerPromoteIds($map, 'pb.promote_id');
$model = M('promote_belong', 'tab_'); $model = M('promote_belong', 'tab_');
$default_company = C('DEFAULT_COMPANY');
$field = "
pb.id,pb.promote_id,pb.verify_status,pb.company_relation,pb.remark,pb.can_view_recharge,pb.approver_name,pb.applicant_name,pb.verify_time,pb.applicant_time,pb.company_type,
IFNULL(pc.company_name,'{$default_company}') company_name,
p.company_belong,p.account,p.mobile_phone,p.admin_id,p.ver_status,p.status,p.create_time
";
$list_data = $model->alias('pb') $list_data = $model->alias('pb')
->join('left join tab_promote as p on p.id=pb.promote_id') ->join('left join tab_promote as p on p.id=pb.promote_id')
->join('left join tab_promote_company as pc on pc.id = p.company_id') ->join('left join tab_promote_company as pc on pc.id = p.company_id')
->where($map) ->where($map)
->field('p.*,pb.*, pc.company_name') ->field($field)
->page($p, $row) ->page($p, $row)
->order('verify_status asc,applicant_time asc') ->order('verify_status asc,applicant_time asc')
->select(); ->select();

@ -1 +0,0 @@
{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":0,"active":2,"player":0,"money":0},"active":[{"time":"0:00","count":1},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]}

@ -421,13 +421,33 @@ class PromoteModel extends Model{
public function parseListData($result) public function parseListData($result)
{ {
//获取是否要隐藏重要信息
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$parseData = array(); $parseData = array();
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
$parseData[$key] = $value; $parseData[$key] = $value;
$parseData[$key]['company_belong_str'] = $value['company_belong'] ? '外团' : '内团'; $parseData[$key]['company_belong_str'] = getCompanyBlong($value['company_belong']);
$parseData[$key]['company_relation_str'] = $value['company_relation'] ? '只维护' : '自主开发及维护'; $parseData[$key]['company_relation_str'] = getCompanyRelation($value['company_relation']);
$parseData[$key]['create_time'] = set_show_time($value['create_time']);
$parseData[$key]['last_login_time'] = set_show_time($value['last_login_time']);
$parseData[$key]['level_name'] = getPromoteLeverName($value['level']);
$parseData[$key]['status_str'] = get_info_status($value['status'],3) ?:"待审核";
$parseData[$key]['ver_status'] = get_info_status($value['ver_status'],42) ?:"未认证";
$parseData[$key]['oa_associated_str'] = $value['oa_associated'] == 1 ? "已关联" : "未关联";
$parseData[$key]['pay_amount'] = sum_promote_total_money($value['id']);
if(!$show_data_power){
$parseData[$key]['account'] = encryptStr($parseData[$key]['account']);
$parseData[$key]['mobile_phone'] = encryptStr($parseData[$key]['mobile_phone']);
$parseData[$key]['top_account'] = encryptStr($parseData[$key]['top_account']);
}
} }
return $parseData; return $parseData;
} }

@ -75,21 +75,30 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="company_relation"> <select name="company_belong" class="select_gallery">
<option value="">请选择团体类型</option>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <php> if($_GET['company_belong'] !='' && $vo['id'] == $_GET['company_belong'])echo selected;</php>>{$vo.name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="company_relation" class="select_gallery">
<option value="">归属状态</option> <option value="">归属状态</option>
<option value="0">自主开发及维护</option> <volist name=":getCompanyRelation()" id="vo">
<option value="1">只维护</option> <option value="{$vo.id}" <php> if($_GET['company_relation'] !='' && $vo['id'] == $_GET['company_relation'])echo selected;</php>>{$vo.name}</option>
</volist>
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="company_type"> <select name="company_type" class="select_gallery">
<option value="">工会类型</option> <option value="">工会类型</option>
<option value="1">公司</option> <option value="1">公司</option>
<option value="2">个人</option> <option value="2">个人</option>
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="verify_status"> <select name="verify_status" class="select_gallery">
<option value="">审核状态</option> <option value="">审核状态</option>
<option value="1">已审核</option> <option value="1">已审核</option>
<option value="0">待审核</option> <option value="0">待审核</option>
@ -97,12 +106,13 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="can_view_recharge"> <select name="can_view_recharge" class="select_gallery">
<option value="">充值信息权限</option> <option value="">充值信息权限</option>
<option value="0">禁止</option> <option value="0">禁止</option>
<option value="1">开放</option> <option value="1">开放</option>
</select> </select>
</div> </div>
<input type="hidden" name="" value="" class="sortBy"> <input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}"> <input type="hidden" name="type" value="{$_GET['type']}">
<div class="input-list"> <div class="input-list">

@ -53,19 +53,20 @@
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;"> <select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">请选择会长账号</option> <option value="">请选择会长账号</option>
<volist name=":promote_listsOther(1)" id="vo"> <volist name=":promote_listsOther(1)" id="vo">
<option promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['promote_id']">selected=selected</if>>{$vo.account}</option> <option data-company_belong="{$vo['company_belong']}" data-belong="{:getCompanyBlong($vo['company_belong'])}" promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['promote_id']">selected=selected</if>>{$vo.account}</option>
</volist> </volist>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr id="company_belong_box" style="display: none;">
<td class="l">工会归属:</td> <td class="l">工会归属:</td>
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio"> <input id="company_belong" name="company_belong" value="" type="hidden">
<label > <span class="form_radio" id="company_belong_str">
<input type="radio" value="3" name="company_belong" checked="checked" class="company_belong"> <!-- <label >
<input type="radio" value="3" name="company_belong" class="company_belong" checked="checked">
</label > </label >
<label > <label >
<input type="radio" value="0" name="company_belong" class="company_belong"> 内团 <input type="radio" value="0" name="company_belong" class="company_belong"> 内团
@ -75,7 +76,7 @@
</label> </label>
<label > <label >
<input type="radio" value="2" name="company_belong" class="company_belong"> 外团-分发联盟 <input type="radio" value="2" name="company_belong" class="company_belong"> 外团-分发联盟
</label > </label > -->
</span> </span>
<!-- <span class="notice-text"></span>--> <!-- <span class="notice-text"></span>-->
</td> </td>
@ -171,41 +172,20 @@
Think.setValue("category", {$data.category|default = 0}); Think.setValue("category", {$data.category|default = 0});
$(".select_gallery").select2(); $(".select_gallery").select2();
$(function(){ $(function(){
showTab(); $("#promote_id").on("change",function(e){
prov="{:substr($data['bank_area'],0,2)}";
city="{:substr($data['bank_area'],2,2)}";
ciarea="{:substr($data['bank_area'],4,2)}";
}); var belong = $("#promote_id option:selected").data();
//得到地区码 $("#company_belong_str").html(belong.belong);
function getAreaID(){ $("#company_belong").val(belong.company_belong);
var area = 0; if(belong.company_belong > -1){
if($("#seachdistrict").val() != "0"){ $("#company_belong_box").show();
area = $("#seachdistrict").val();
}else if ($("#seachcity").val() != "0"){
area = $("#seachcity").val();
}else{ }else{
area = $("#seachprov").val(); $("#company_belong_box").hide();
}
return area;
} }
})
// showTab();
});
//根据地区码查询地区名
function getAreaNamebyID(areaID){
var areaName = "";
if(areaID.length == 2){
areaName = area_array[areaID];
}else if(areaID.length == 4){
var index1 = areaID.substring(0, 2);
areaName = area_array[index1] + " " + sub_array[index1][areaID];
}else if(areaID.length == 6){
var index1 = areaID.substring(0, 2);
var index2 = areaID.substring(0, 4);
areaName = area_array[index1] + " " + sub_array[index1][index2] + " " + sub_arr[index2][areaID];
}
return areaName;
}
</script> </script>
</block> </block>

@ -50,12 +50,15 @@
<tr> <tr>
<td class="l">会长账号:</td> <td class="l">会长账号:</td>
<td class="r"> <td class="r">
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;"> <input id="promote_id" name="promote_id" value="{$data['promote_id']}" type="hidden">
{:getPromoteName($data['promote_id'])}
<!-- <select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">请选择会长账号</option> <option value="">请选择会长账号</option>
<volist name=":promote_listsOther(1)" id="vo"> <volist name=":promote_listsOther(1)" id="vo">
<option promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $data['promote_id']">selected=selected</if>>{$vo.account}</option> <option promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $data['promote_id']">selected=selected</if>>{$vo.account}</option>
</volist> </volist>
</select> </select> -->
</td> </td>
</tr> </tr>
<input type="hidden" name="promote_id" value="{$data['promote_id']}"> <input type="hidden" name="promote_id" value="{$data['promote_id']}">
@ -64,8 +67,10 @@
<tr> <tr>
<td class="l">工会归属:</td> <td class="l">工会归属:</td>
<td class="r table_radio"> <td class="r table_radio">
<input id="company_belong" name="company_belong" value="{$data['company_belong']}" type="hidden">
<span class="form_radio"> <span class="form_radio">
<label > {:getCompanyBlong($data['company_belong'])}
<!-- <label >
<input type="radio" value="3" name="company_belong" <?php if($data['company_belong'] ==3):?> <input type="radio" value="3" name="company_belong" <?php if($data['company_belong'] ==3):?>
checked="checked" checked="checked"
<?php endif?> class="company_belong"> 无 <?php endif?> class="company_belong"> 无
@ -84,7 +89,7 @@
<input type="radio" value="2" name="company_belong" <?php if($data['company_belong'] ==2):?> <input type="radio" value="2" name="company_belong" <?php if($data['company_belong'] ==2):?>
checked="checked" checked="checked"
<?php endif?> class="company_belong"> 外团-分发联盟 <?php endif?> class="company_belong"> 外团-分发联盟
</label> </label> -->
</span> </span>
<!-- <span class="notice-text"></span>--> <!-- <span class="notice-text"></span>-->
</td> </td>

@ -93,7 +93,7 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="promote_level"> <select name="promote_level" class="select_gallery">
<option value="">推广员等级</option> <option value="">推广员等级</option>
<option value="1">会长</option> <option value="1">会长</option>
<option value="2">部门长</option> <option value="2">部门长</option>
@ -118,7 +118,7 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="status"> <select name="status" class="select_gallery">
<option value="">渠道状态</option> <option value="">渠道状态</option>
<option value="1">正常</option> <option value="1">正常</option>
<option value="2">{:L('Lock')}</option> <option value="2">{:L('Lock')}</option>
@ -126,7 +126,7 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="ver_status"> <select name="ver_status" class="select_gallery">
<option value="">审核状态</option> <option value="">审核状态</option>
<option value="0">未认证</option> <option value="0">未认证</option>
<option value="1">审核成功</option> <option value="1">审核成功</option>
@ -136,7 +136,7 @@
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="oa_associated"> <select name="oa_associated" class="select_gallery">
<option value="">oa关联</option> <option value="">oa关联</option>
<option value="1">已关联</option> <option value="1">已关联</option>
<option value="0">未关联</option> <option value="0">未关联</option>
@ -144,10 +144,11 @@
</div> </div>
<div class="input-list input-list-channelstatus"> <div class="input-list input-list-channelstatus">
<select name="company_belong"> <select name="company_belong" class="select_gallery">
<option value="">内外团</option> <option value="">请选择团体类型</option>
<option value="0">内团</option> <volist name=":getCompanyBlong()" id="vo">
<option value="1">外团</option> <option value="{$vo.id}" <php> if($_GET['company_belong'] !='' && $vo['id'] == $_GET['company_belong'])echo selected;</php>>{$vo.name}</option>
</volist>
</select> </select>
</div> </div>
<else/> <else/>
@ -201,8 +202,8 @@
<th ><a class="paixu" data-order='last_login_time'>最后登录时间</a></th> <th ><a class="paixu" data-order='last_login_time'>最后登录时间</a></th>
<th>渠道类型</th> <th>渠道类型</th>
<th>所属会长</th> <th>所属会长</th>
<th>会归属</th> <th>会归属</th>
<th>会关系</th> <th>会关系</th>
<th>归属管理员</th> <th>归属管理员</th>
<th>商务专员</th> <th>商务专员</th>
<th>状态</th> <th>状态</th>
@ -226,67 +227,39 @@
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td> <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.id}</td> <td>{$data.id}</td>
<td> <td>
<if condition="$show_data_power eq true ">
{$data.account} {$data.account}
<else />
{$data.account|encryptStr}
</if>
</td> </td>
<td> <td>
<if condition="$show_data_power eq true ">
{$data.mobile_phone} {$data.mobile_phone}
<else />
{$data.mobile_phone|encryptStr}
</if>
</td> </td>
<td>{$data.balance_coin}</td> <td>{$data.balance_coin}</td>
<td>{:sum_promote_total_money($data['id'])}</td> <td>{$data['pay_amount']}</td>
<td>{:set_show_time($data['create_time'])}</td> <td>{$data['create_time']}</td>
<td>{:set_show_time($data['last_login_time'])}</td> <td>{$data['last_login_time']}</td>
<td>{:get_promote_levels($data['id'])}</td> <td>{$data['level_name']}</td>
<td> <td>
<if condition="$show_data_power eq true "> {$data['top_account']}
{:getTopPromote($data['id'])['account']}
<else />
{:encryptStr(getTopPromote($data['id'])['account'])}
</if>
</td> </td>
<td>{$data['company_belong_str']}</td> <td>{$data['company_belong_str']}</td>
<td>{$data['company_relation_str']}</td> <td>{$data['company_relation_str']}</td>
<td>{:get_admin_nickname($data['admin_id'])}</td> <td>{$data['admin_nickname']}</td>
<td>{:get_business_affairs_account($data['ba_id'])}</td> <td>{$data['b_account']}</td>
<td> <td>
<?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?>
<if condition="$data['status'] eq 0"> <if condition="$data['status'] eq 0">
<span class="preview_status">{$status_str}</span> <span class="preview_status">{$data.status_str}</span>
<elseif condition="$data['status'] eq 2 " /> <elseif condition="$data['status'] eq 2 " />
<span class="disabled_status">{$status_str}</span> <span class="disabled_status">{$data.status_str}</span>
<else/> <else/>
{$status_str} {$data.status_str}
</if> </if>
</td> </td>
<td> <td>
{$data['ver_status']}
<?php if($data['ver_status'] == 1) {?>
<span>成功</span>
<?php }?>
<?php if(intval($data['ver_status']) == 2) {?>
<span>拒绝</span>
<?php }?>
<?php if(intval($data['ver_status']) == 3) {?>
<span>正在审核</span>
<?php }?>
<?php if(intval($data['ver_status']) == 4) {?>
<span>修改审核中</span>
<?php }?>
<?php if(intval($data['ver_status']) == 0) {?>
<span>未认证</span>
<?php }?>
</td> </td>
<if condition="$data['oa_associated'] eq 1"> <if condition="$data['oa_associated'] eq 1">
<td>已关联</td> <td>{$data.oa_associated_str}</td>
<else /> <else />
<td style="color: red;">未关联</td> <td style="color: red;">{$data.oa_associated_str}</td>
</if> </if>
<td><a class="ajax-view" data-id="{$data.id}">查看</a></td> <td><a class="ajax-view" data-id="{$data.id}">查看</a></td>
<td> <td>
@ -296,9 +269,9 @@
<else/> <else/>
<a href="{:U("Promote/set_status",array('ids'=>$data['id'],"status"=>1,"msg_type"=>12,"field"=>"status"))}" class="ajax-get ">解锁</a> <a href="{:U("Promote/set_status",array('ids'=>$data['id'],"status"=>1,"msg_type"=>12,"field"=>"status"))}" class="ajax-get ">解锁</a>
</if> </if>
<if condition="session('user_auth.uid') eq 1"> <!-- <if condition="session('user_auth.uid') eq 1">
<a class='delete' data-id="{$data.id}">删除</a> <a class='delete' data-id="{$data.id}">删除</a>
</if> </if> -->
<if condition="$data.level = 1"> <if condition="$data.level = 1">
<a href="{:U('certification', array('id' => $data['id']))}">资质认证</a> <a href="{:U('certification', array('id' => $data['id']))}">资质认证</a>
</if> </if>
@ -367,7 +340,7 @@
</div> </div>
<div class="page"> <div class="page">
<if condition="$is_admin eq true "> <if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a> <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if> </if>
{$_page|default=''} {$_page|default=''}
</div> </div>

@ -111,10 +111,9 @@
<div class="input-list input-list-server search_label_rehab" style="margin:0;"> <div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_belong" name="company_belong" class="select_gallery" style="width: 215px;"> <select id="company_belong" name="company_belong" class="select_gallery" style="width: 215px;">
<option value="">请选择团体归属</option> <option value="">请选择团体归属</option>
<option value="0">内团</option> <volist name=":getCompanyBlong()" id="vo">
<option value="1">外团</option> <option value="{$vo.id}">{$vo.name}</option>
<option value="2">外团-分发</option> </volist>
<option value="3">其他</option>
</select> </select>
</div> </div>
</td> </td>

@ -115,14 +115,9 @@
<div class="input-list input-list-server search_label_rehab" style="margin:0;"> <div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_belong" name="company_belong" class="select_gallery" style="width: 215px;"> <select id="company_belong" name="company_belong" class="select_gallery" style="width: 215px;">
<option value="">请选择团体归属</option> <option value="">请选择团体归属</option>
<option value="0" <if condition="$data['company_belong'] eq 0">selected <volist name=":getCompanyBlong()" id="vo">
</if>>内团</option> <option value="{$vo.id}" <php> if($data['company_belong'] !='' && $vo['id'] == $data['company_belong'])echo selected;</php>>{$vo.name}</option>
<option value="1" <if condition="$data['company_belong'] eq 1">selected </volist>
</if>>外团</option>
<option value="2" <if condition="$data['company_belong'] eq 2">selected
</if>>外团-分发</option>
<option value="3" <if condition="$data['company_belong'] eq 3">selected
</if>>其他</option>
</select> </select>
</div> </div>
</td> </td>

@ -39,7 +39,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3> <h3 class="page_title">{$meta_title}</h3>
<p class="description_text">说明:该功能是用于录入工会所属的推广公司名称</p> <p class="description_text">说明:该功能是用于录入工会所属的推广公司名称 / 如需删除公司请先将公司底下会长移走后方可操作</p>
</div> </div>
<div class="cf top_nav_list"> <div class="cf top_nav_list">
<div class="fl button_list"> <div class="fl button_list">
@ -65,6 +65,14 @@
</volist> </volist>
</select> </select>
</div> </div>
<div class="input-list input-list-channelstatus">
<select name="company_belong" class="select_gallery">
<option value="">请选择团体类型</option>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <php> if($_GET['company_belong'] !='' && $vo['id'] == $_GET['company_belong'])echo selected;</php>>{$vo.name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab"> <div class="input-list input-list-game search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery"> <select id="company_type" name="company_type" class="select_gallery">
<option value="">请选择公司性质</option> <option value="">请选择公司性质</option>
@ -120,7 +128,9 @@
<td rowspan="{$data.row}"> <td rowspan="{$data.row}">
<a href="{:U('view',array('id'=>$data['id']))}">查看</a> <a href="{:U('view',array('id'=>$data['id']))}">查看</a>
<a href="{:U('edit',array('id'=>$data['id']))}">编辑</a> <a href="{:U('edit',array('id'=>$data['id']))}">编辑</a>
<if condition="$data['can_del'] eq 1 ">
<a href="{:U('del',array('id'=>$data['id']))}" style="color: red;" class="confirm ajax-get">删除</a> <a href="{:U('del',array('id'=>$data['id']))}" style="color: red;" class="confirm ajax-get">删除</a>
</if>
</td> </td>
<td rowspan="{$data.row}">{$data.company_name}</td> <td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.platform_name}</td> <td rowspan="{$data.row}">{$data.platform_name}</td>

@ -678,9 +678,9 @@ function get_info_status($type=null,$group=0){
39 => array(0=>'未打款',1=>'已打款',2=>'已驳回'), 39 => array(0=>'未打款',1=>'已打款',2=>'已驳回'),
36 => array(0=>"未打款",1=>"手动打款",2=>"自动打款"), 36 => array(0=>"未打款",1=>"手动打款",2=>"自动打款"),
37 => array(0=>"不参与",1=>"已参与"), 37 => array(0=>"不参与",1=>"已参与"),
40 => array(0=>'未处理',1=>'已处理',2=>'忽略'), 40 => array(0=>'未处理',1=>'已处理',2=>'忽略'),
41 => array(-1=>'已下架',0=>'待审核',1=>'已售出',2=>'已驳回',3=>'出售中',4=>'待发货',5=>'审核中'), 41 => array(-1=>'已下架',0=>'待审核',1=>'已售出',2=>'已驳回',3=>'出售中',4=>'待发货',5=>'审核中'),
42 => array(0=>'未认证',1=>'成功',2=>'拒绝',3=>'正在审核',4=>'修改审核中'),
); );
return $arr[$group][$type]; return $arr[$group][$type];

Loading…
Cancel
Save