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;
}
}
/**
* 获取公会归属关系
* @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
{
//财务分类汇总统计旧数据聚合
/**
* 财务分类汇总统计旧数据聚合
*/
public function FinancialSummaryInit()
{
//清空数据库
@ -23,7 +25,9 @@ class OldCountController extends \Think\Controller
$Financial->setMonthFinancialSummary($v);
}
}
//超级签订单新增识别微信或者支付宝2019-12-11
/*
*超级签订单新增识别微信或者支付宝2019-12-11
*/
public function gameSupersignPaywayInit()
{
$map = array(
@ -103,6 +107,25 @@ class OldCountController extends \Think\Controller
}
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()
{
@ -124,4 +147,5 @@ class OldCountController extends \Think\Controller
}
}

@ -39,6 +39,9 @@ class PromoteCompanyController extends ThinkController
if (isset($_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));
@ -146,8 +149,10 @@ class PromoteCompanyController extends ThinkController
}
}
$v['can_del'] = 0;
}else{
//空值
$v['can_del'] = 1;
$v['list']=[
[
"account"=>"--",
@ -313,10 +318,23 @@ class PromoteCompanyController extends ThinkController
if(isset($save['resources'])){
$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);
if ($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'=>'推广员-推广员管理-推广公司管理-编辑推广公司']);
$array=array(

@ -50,7 +50,7 @@ class PromoteController extends ThinkController
if (isset($_REQUEST['promote_id'])) {
$promoteid = $_REQUEST['promote_id'];
$map['id'] = $_REQUEST['promote_id'];
$map['p.id'] = $_REQUEST['promote_id'];
}
if (isset($_REQUEST['parent_id'])) {
if ($_REQUEST['parent_id']=='全部') {
@ -68,12 +68,12 @@ class PromoteController extends ThinkController
if ($promoteid > 0 ) {
if (in_array($promoteid,$zidarr)) {
# code...
$map['id'] = $promoteid;
$map['p.id'] = $promoteid;
}else{
$map['id'] = 0;
$map['p.id'] = 0;
}
}else{
$map['id']=array('in',$zid);
$map['p.id']=array('in',$zid);
}
//
unset($_REQUEST['parent_id']);
@ -87,7 +87,7 @@ class PromoteController extends ThinkController
}
}
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) {
@ -95,14 +95,14 @@ class PromoteController extends ThinkController
}
if (I("promote_level")) {
$map['level'] = I("promote_level");
$map['p.level'] = I("promote_level");
}
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))) {
$map['admin_id'] = I('admin_uid');
$map['p.admin_id'] = I('admin_uid');
}
$this->m_title = '推广员列表';
@ -149,8 +149,21 @@ class PromoteController extends ThinkController
//为数据权限添加
setPowerPromoteIds($map, 'id');
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select();
setPowerPromoteIds($map, 'p.id');
$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);
$oa_data = [];
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);
if ($page) {
$this->assign('_page', $page);
@ -245,6 +284,9 @@ class PromoteController extends ThinkController
}
$company_belong = $_REQUEST['company_belong'] ?? 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(
'account'=>$account,
'password'=>$password,
@ -359,10 +401,13 @@ class PromoteController extends ThinkController
if ($promote['level'] ==1) {//如果是会长才能修改的选项
if (!is_null($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));
if (!empty(I('settlement_type')) && in_array($settlementType, [1, 2])) {
@ -373,6 +418,12 @@ class PromoteController extends ThinkController
if ($promote['level'] == 1) {//修改会长底下推广员的推广公司
$array = array();
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');
}
// if ($promote['company_belong'] != I('company_belong')) {
@ -1275,6 +1326,9 @@ class PromoteController extends ThinkController
if (strlen(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'))) {
$map['verify_status'] = I('verify_status');
@ -1309,16 +1363,22 @@ class PromoteController extends ThinkController
//为数据权限添加
setPowerPromoteIds($map, 'pb.promote_id');
$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')
->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')
->where($map)
->field('p.*,pb.*, pc.company_name')
->field($field)
->page($p, $row)
->order('verify_status asc,applicant_time asc')
->select();
// dd($model->_sql());
// dd($list_data);
// dd($list_data);
$count = $model->alias('pb') ->join('left join tab_promote as p on p.id=pb.promote_id')->where($map)->count();
$page = set_pagination($count, $row);
if ($page) {

@ -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)
{
//获取是否要隐藏重要信息
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$parseData = array();
foreach ($result as $key => $value) {
$parseData[$key] = $value;
$parseData[$key]['company_belong_str'] = $value['company_belong'] ? '外团' : '内团';
$parseData[$key]['company_relation_str'] = $value['company_relation'] ? '只维护' : '自主开发及维护';
$parseData[$key]['company_belong_str'] = getCompanyBlong($value['company_belong']);
$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;
}

@ -74,35 +74,45 @@
</volist>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="company_relation">
<option value="">归属状态</option>
<option value="0">自主开发及维护</option>
<option value="1">只维护</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="company_type">
<option value="">工会类型</option>
<option value="1">公司</option>
<option value="2">个人</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="verify_status">
<option value="">审核状态</option>
<option value="1">已审核</option>
<option value="0">待审核</option>
<option value="2">审核未通过</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="can_view_recharge">
<option value="">充值信息权限</option>
<option value="0">禁止</option>
<option value="1">开放</option>
</select>
</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-channelstatus">
<select name="company_relation" class="select_gallery">
<option value="">归属状态</option>
<volist name=":getCompanyRelation()" id="vo">
<option value="{$vo.id}" <php> if($_GET['company_relation'] !='' && $vo['id'] == $_GET['company_relation'])echo selected;</php>>{$vo.name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="company_type" class="select_gallery">
<option value="">工会类型</option>
<option value="1">公司</option>
<option value="2">个人</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="verify_status" class="select_gallery">
<option value="">审核状态</option>
<option value="1">已审核</option>
<option value="0">待审核</option>
<option value="2">审核未通过</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="can_view_recharge" class="select_gallery">
<option value="">充值信息权限</option>
<option value="0">禁止</option>
<option value="1">开放</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}">
<div class="input-list">

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

@ -50,12 +50,15 @@
<tr>
<td class="l">会长账号:</td>
<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>
<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>
</volist>
</select>
</select> -->
</td>
</tr>
<input type="hidden" name="promote_id" value="{$data['promote_id']}">
@ -64,8 +67,10 @@
<tr>
<td class="l">工会归属:</td>
<td class="r table_radio">
<span class="form_radio ">
<label >
<input id="company_belong" name="company_belong" value="{$data['company_belong']}" type="hidden">
<span class="form_radio">
{:getCompanyBlong($data['company_belong'])}
<!-- <label >
<input type="radio" value="3" name="company_belong" <?php if($data['company_belong'] ==3):?>
checked="checked"
<?php endif?> class="company_belong"> 无
@ -84,7 +89,7 @@
<input type="radio" value="2" name="company_belong" <?php if($data['company_belong'] ==2):?>
checked="checked"
<?php endif?> class="company_belong"> 外团-分发联盟
</label>
</label> -->
</span>
<!-- <span class="notice-text"></span>-->
</td>

@ -93,7 +93,7 @@
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="promote_level">
<select name="promote_level" class="select_gallery">
<option value="">推广员等级</option>
<option value="1">会长</option>
<option value="2">部门长</option>
@ -118,7 +118,7 @@
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="status">
<select name="status" class="select_gallery">
<option value="">渠道状态</option>
<option value="1">正常</option>
<option value="2">{:L('Lock')}</option>
@ -126,7 +126,7 @@
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="ver_status">
<select name="ver_status" class="select_gallery">
<option value="">审核状态</option>
<option value="0">未认证</option>
<option value="1">审核成功</option>
@ -136,7 +136,7 @@
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="oa_associated">
<select name="oa_associated" class="select_gallery">
<option value="">oa关联</option>
<option value="1">已关联</option>
<option value="0">未关联</option>
@ -144,10 +144,11 @@
</div>
<div class="input-list input-list-channelstatus">
<select name="company_belong">
<option value="">内外团</option>
<option value="0">内团</option>
<option value="1">外团</option>
<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>
<else/>
@ -201,8 +202,8 @@
<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>
@ -226,67 +227,39 @@
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.id}</td>
<td>
<if condition="$show_data_power eq true ">
{$data.account}
<else />
{$data.account|encryptStr}
</if>
{$data.account}
</td>
<td>
<if condition="$show_data_power eq true ">
{$data.mobile_phone}
<else />
{$data.mobile_phone|encryptStr}
</if>
{$data.mobile_phone}
</td>
<td>{$data.balance_coin}</td>
<td>{:sum_promote_total_money($data['id'])}</td>
<td>{:set_show_time($data['create_time'])}</td>
<td>{:set_show_time($data['last_login_time'])}</td>
<td>{:get_promote_levels($data['id'])}</td>
<td>{$data['pay_amount']}</td>
<td>{$data['create_time']}</td>
<td>{$data['last_login_time']}</td>
<td>{$data['level_name']}</td>
<td>
<if condition="$show_data_power eq true ">
{:getTopPromote($data['id'])['account']}
<else />
{:encryptStr(getTopPromote($data['id'])['account'])}
</if>
{$data['top_account']}
</td>
<td>{$data['company_belong_str']}</td>
<td>{$data['company_relation_str']}</td>
<td>{:get_admin_nickname($data['admin_id'])}</td>
<td>{:get_business_affairs_account($data['ba_id'])}</td>
<td>{$data['admin_nickname']}</td>
<td>{$data['b_account']}</td>
<td>
<?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?>
<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 " />
<span class="disabled_status">{$status_str}</span>
<span class="disabled_status">{$data.status_str}</span>
<else/>
{$status_str}
{$data.status_str}
</if>
</td>
<td>
<?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 }?>
{$data['ver_status']}
</td>
<if condition="$data['oa_associated'] eq 1">
<td>已关联</td>
<td>{$data.oa_associated_str}</td>
<else />
<td style="color: red;">未关联</td>
<td style="color: red;">{$data.oa_associated_str}</td>
</if>
<td><a class="ajax-view" data-id="{$data.id}">查看</a></td>
<td>
@ -296,9 +269,9 @@
<else/>
<a href="{:U("Promote/set_status",array('ids'=>$data['id'],"status"=>1,"msg_type"=>12,"field"=>"status"))}" class="ajax-get ">解锁</a>
</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>
</if>
</if> -->
<if condition="$data.level = 1">
<a href="{:U('certification', array('id' => $data['id']))}">资质认证</a>
</if>
@ -367,7 +340,7 @@
</div>
<div class="page">
<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>
{$_page|default=''}
</div>

@ -111,10 +111,9 @@
<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;">
<option value="">请选择团体归属</option>
<option value="0">内团</option>
<option value="1">外团</option>
<option value="2">外团-分发</option>
<option value="3">其他</option>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}">{$vo.name}</option>
</volist>
</select>
</div>
</td>

@ -115,14 +115,9 @@
<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;">
<option value="">请选择团体归属</option>
<option value="0" <if condition="$data['company_belong'] eq 0">selected
</if>>内团</option>
<option value="1" <if condition="$data['company_belong'] eq 1">selected
</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>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <php> if($data['company_belong'] !='' && $vo['id'] == $data['company_belong'])echo selected;</php>>{$vo.name}</option>
</volist>
</select>
</div>
</td>

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

@ -674,13 +674,13 @@ function get_info_status($type=null,$group=0){
33 =>array(0=>"待审核",1=>"已通过"),
34 => ["已关闭","已开启"],
35 => array(-1=>"审核中",1=>"正常",2=>"锁定",3=>"驳回"),
38 => array(0=>'待付款',1=>'交易成功',2=>'交易取消'),
39 => array(0=>'未打款',1=>'已打款',2=>'已驳回'),
38 => array(0=>'待付款',1=>'交易成功',2=>'交易取消'),
39 => array(0=>'未打款',1=>'已打款',2=>'已驳回'),
36 => array(0=>"未打款",1=>"手动打款",2=>"自动打款"),
37 => array(0=>"不参与",1=>"已参与"),
40 => array(0=>'未处理',1=>'已处理',2=>'忽略'),
41 => array(-1=>'已下架',0=>'待审核',1=>'已售出',2=>'已驳回',3=>'出售中',4=>'待发货',5=>'审核中'),
40 => array(0=>'未处理',1=>'已处理',2=>'忽略'),
41 => array(-1=>'已下架',0=>'待审核',1=>'已售出',2=>'已驳回',3=>'出售中',4=>'待发货',5=>'审核中'),
42 => array(0=>'未认证',1=>'成功',2=>'拒绝',3=>'正在审核',4=>'修改审核中'),
);
return $arr[$group][$type];

Loading…
Cancel
Save