Commit 1e0867fd authored by hujun's avatar hujun

经纪人

parent 642a3fc0
...@@ -152,7 +152,7 @@ class Broker extends Basic ...@@ -152,7 +152,7 @@ class Broker extends Basic
if (!empty($list[0]['id'])) { if (!empty($list[0]['id'])) {
$client_where['b.agent_id'] = ['neq', $list[0]['id']]; $client_where['b.agent_id'] = ['neq', $list[0]['id']];
} }
$client_where['a.id'] = $this->userId; $client_where['b.id'] = $this->userId;
$client = $agents->getAgentUser($fields, $client_where); //客方 $client = $agents->getAgentUser($fields, $client_where); //客方
if (!empty($client)){ if (!empty($client)){
$client['show_content'] = '帮助客户找更多,善于了解客户需求'; $client['show_content'] = '帮助客户找更多,善于了解客户需求';
......
...@@ -2623,8 +2623,8 @@ class Finance extends Basic ...@@ -2623,8 +2623,8 @@ class Finance extends Basic
} else { } else {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $v['id']]); $source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $v['id']]);
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id); $list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
$list[$k]['is_adjustment'] = $source_id ? 1 : 0;
} }
$list[$k]['is_adjustment'] = $source_id ? 1 : 0;
$num = $m_refund->getFind('id',['pay_log_id'=>$v['id'],'is_del'=>0]); $num = $m_refund->getFind('id',['pay_log_id'=>$v['id'],'is_del'=>0]);
if ($num['id'] > 0) { if ($num['id'] > 0) {
$list[$k]['is_refund'] = 1; $list[$k]['is_refund'] = 1;
......
...@@ -1617,7 +1617,6 @@ class AAgents extends BaseModel ...@@ -1617,7 +1617,6 @@ class AAgents extends BaseModel
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getAgentUser($field, $where) { public function getAgentUser($field, $where) {
$where['a.status'] = 0;
return $this->alias('a') return $this->alias('a')
->field($field) ->field($field)
->join('u_users b','a.id = b.agent_id', 'left') ->join('u_users b','a.id = b.agent_id', 'left')
......
...@@ -160,7 +160,7 @@ class ADistrict extends BaseModel ...@@ -160,7 +160,7 @@ class ADistrict extends BaseModel
if (isset($v->id)) { if (isset($v->id)) {
if ($result[$k]['district_name']) { if ($result[$k]['district_name']) {
$agents = Db::table('a_agents')->field('name,phone')->where([ $agents = Db::table('a_agents')->field('name,phone')->where([
'status'=>0,'district_id'=>$v->id,'level'=>['in','30,40'] 'status'=>['in','0,3'],'district_id'=>$v->id,'level'=>['in','30,40']
])->find(); ])->find();
$result[$k]['name'] = $agents['name'].'-'.$agents['phone']; $result[$k]['name'] = $agents['name'].'-'.$agents['phone'];
$result[$k]['store_num'] = Db::table('a_store')->where([ $result[$k]['store_num'] = Db::table('a_store')->where([
...@@ -193,7 +193,7 @@ class ADistrict extends BaseModel ...@@ -193,7 +193,7 @@ class ADistrict extends BaseModel
if ($result[$k]['district_name']) { if ($result[$k]['district_name']) {
$result[$k]['name'] = $v['name'].'-'.$v['phone']; $result[$k]['name'] = $v['name'].'-'.$v['phone'];
$result[$k]['store_num'] = Db::table('a_store')->where([ $result[$k]['store_num'] = Db::table('a_store')->where([
'status'=>0,'district_id'=>$v->id 'status'=>['in','0,3'],'district_id'=>$v->id
])->count('store_name'); ])->count('store_name');
} else { } else {
$result[$k]['store_num'] = ''; $result[$k]['store_num'] = '';
......
...@@ -350,10 +350,8 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -350,10 +350,8 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
data: { data: {
"phone":$("#set_father_id3").val(), "phone":$("#set_father_id3").val(),
"level": "10,30,40", "level": "10,30,40",
"site_id":user_info_obj.site_id, "store_id":store.house_id,
"store_id":store.house_id "all":1,
}, },
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
...@@ -363,11 +361,9 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -363,11 +361,9 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
user_ul+='<li class="addphone" data-id="'+item.id+'">'+item.id+'-'+item.name+'-'+item.phone+'</li>'; user_ul+='<li class="addphone" data-id="'+item.id+'">'+item.id+'-'+item.name+'-'+item.phone+'</li>';
}); });
$(".user-ul").html(user_ul); $(".user-ul").html(user_ul);
} else { } else {
alert(data.msg); alert(data.msg);
} }
} }
}); });
}, },
......
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