Commit 834c00c8 authored by hujun's avatar hujun

楼盘列表权限控制

parent 6e647e5e
...@@ -95,7 +95,6 @@ Route::group('index', [ ...@@ -95,7 +95,6 @@ Route::group('index', [
'getBrokerList' => ['index/broker/getBrokerList',['method'=>'get']],//门店列表的经纪人 'getBrokerList' => ['index/broker/getBrokerList',['method'=>'get']],//门店列表的经纪人
'addHousesAgents' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系(案场权限人) 'addHousesAgents' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系(案场权限人)
'addHousesAgentsDish' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系(盘方) 'addHousesAgentsDish' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系(盘方)
'addHousesAgentsExclusive' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系(独家)
'delTohouses' => ['index/broker/delTohouses', ['method' => 'POST']], //解除经纪人和楼盘关系 'delTohouses' => ['index/broker/delTohouses', ['method' => 'POST']], //解除经纪人和楼盘关系
'getAgentsTohouses' => ['index/broker/getAgentsTohouses', ['method' => 'GET']], //获取经纪人和楼盘关系信息 'getAgentsTohouses' => ['index/broker/getAgentsTohouses', ['method' => 'GET']], //获取经纪人和楼盘关系信息
'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方 'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方
......
...@@ -62,9 +62,16 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin ...@@ -62,9 +62,16 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
$ (document).delegate (".submit_follow2", "click", function () {//提交独家 $ (document).delegate (".submit_follow2", "click", function () {//提交独家
business.Dujianew(); business.Dujianew();
}); });
// 提交按钮设置案场权限人 // 提交按钮设置案场权限人
$ (document).delegate (".submit_follow", "click", function () {//提交按钮设置案场权限人 $ (document).delegate (".submit_follow", "click", function () {//提交按钮设置案场权限人
business.Submit_follow(); var myModalLabel = $("#myModalLabel").html();
if (myModalLabel == '设置案场权限人') {
business.Submit_follow();
} else {
business.Submit_follow2(); // 提交按钮设置盘方
}
}); });
$ (document).delegate ("#confirm_delete", "click", function () { $ (document).delegate ("#confirm_delete", "click", function () {
...@@ -364,6 +371,43 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin ...@@ -364,6 +371,43 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
business.ldHtml.html(''); business.ldHtml.html('');
business.stopstatus = true; business.stopstatus = true;
}, },
Submit_follow2:function(){//提交盘方
var agents_id="";
var _agents_id="";
$("input[name='ues_id']").each(function() {//拼接经纪人id
var s =$(this).val();
var m = s.match(/[^-]+(?=[-])/g);
if(m === null){
return false;
}else{
agents_id += ","+ m[0];
_agents_id=agents_id.substring(1);
}
});
$.ajax({
'type': 'POST',
'url' : '/index/addHousesAgentsDish',
data: {"houses_id":business.house_id,"type":business.type,"agents_id":_agents_id},
dataType: "json",
success: function(data){
if(data.code == 200){
if (data.data) {
$("#modal-anch").hide;
}
business.getList(1);
} else {
$("#modal-anch").hide;
}
}
});
},
resetLoad:function (){//手机号
if(business.ajaxObj){
business.ajaxObj.abort();
}
business.ldHtml.html('');
business.stopstatus = true;
},
// 下拉列表 // 下拉列表
loadMain:function(phone, obj) {//手机号 loadMain:function(phone, obj) {//手机号
business.ajaxObj=$.ajax({ business.ajaxObj=$.ajax({
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<a class="btn1 btn-success anch" data-target="#modal-anch" data-toggle="modal" data-id='[%= it[item]["id"] %]'>设置案场权限人</a> <a class="btn1 btn-success anch" data-target="#modal-anch" data-toggle="modal" data-id='[%= it[item]["id"] %]'>设置案场权限人</a>
[% } %] [% } %]
[% if(check_auth('index/addHousesAgentsExclusive')) { %] [% if(check_auth('index/editExclusive')) { %]
<a class="btn1 btn-success dujia" href="#modal-dujia" data-toggle="modal" data-id='[%= it[item]["id"] %]' >是否独家</a> <a class="btn1 btn-success dujia" href="#modal-dujia" data-toggle="modal" data-id='[%= it[item]["id"] %]' >是否独家</a>
[% } %] [% } %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment