Commit b004d534 authored by hujun's avatar hujun

独家权限判断

parent 59e7b9b9
......@@ -336,6 +336,18 @@ class GHouses extends BaseModel
} else {
$result[$k]['auth_edit_house'] = 0;
}
//独家方
$exclusive_num = Db::table('g_houses_to_agents')->alias('a')
->field('a.id')
->join('a_agents b', 'a.agents_id=b.id', 'left')
->where('a.is_del', 0)
->where('a.type', 3)
->where('a.agents_id', $agents_id)
->count();
if ($exclusive_num > 0) {
$result[$k]['auth_edit_exclusive'] = 0;
}
}
}
return $result;
......
......@@ -94,7 +94,7 @@
<a class="btn1 btn-success anch" data-target="#modal-anch" data-toggle="modal" data-id='[%= it[item]["id"] %]'>设置案场权限人</a>
[% } %]-->
[% if(check_auth('index/editExclusive')) { %]
[% if(check_auth('index/editExclusive') || it[item][is_exclusive_type] == 0 || it[item][auth_edit_exclusive] == 0) { %]
<a class="btn1 btn-success dujia btn-default-hide-display" 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