推广公会归属管理 改为公会归属不可选择

master
chenzhi 5 years ago
parent d7737291ed
commit dd86a85485

@ -1309,16 +1309,21 @@ class PromoteController extends ThinkController
//为数据权限添加 //为数据权限添加
setPowerPromoteIds($map, 'pb.promote_id'); setPowerPromoteIds($map, 'pb.promote_id');
$model = M('promote_belong', 'tab_'); $model = M('promote_belong', 'tab_');
$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,
pc.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();
// dd($model->_sql()); // 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(); $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); $page = set_pagination($count, $row);
if ($page) { if ($page) {

@ -53,29 +53,30 @@
<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"> 内团
</label > </label >
<label > <label >
<input type="radio" value="1" name="company_belong" class="company_belong"> 外团 <input type="radio" value="1" name="company_belong" class="company_belong"> 外团
</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,8 +172,16 @@
Think.setValue("category", {$data.category|default = 0}); Think.setValue("category", {$data.category|default = 0});
$(".select_gallery").select2(); $(".select_gallery").select2();
$(function(){ $(function(){
$("#promote_id").on("select2:select",function(e){ $("#promote_id").on("change",function(e){
console.log(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(); // showTab();
}); });

@ -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">
<span class="form_radio "> <input id="company_belong" name="company_belong" value="{$data['company_belong']}" type="hidden">
<label > <span class="form_radio">
{: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>

Loading…
Cancel
Save