Commit 2fd0382e authored by zw's avatar zw

Merge branch '0213-v3.0.7' of https://gitee.com/zwyjjc/tl_estate into 0213-v3.0.7

parents e4c477bc 13c8fe7a
...@@ -2622,7 +2622,8 @@ class Finance extends Basic ...@@ -2622,7 +2622,8 @@ class Finance extends Basic
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id); $list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
} 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]['is_adjustment'] = 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;
} }
$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]);
...@@ -2984,6 +2985,14 @@ class Finance extends Basic ...@@ -2984,6 +2985,14 @@ class Finance extends Basic
$source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $pay_data['id']]); $source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $pay_data['id']]);
$pay_data['source_id'] = empty($source_id) ? 0 : implode(',', $source_id); $pay_data['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
$m_refund = new ORefundModel();
$num = $m_refund->getFind('id',['pay_log_id'=>$pay_data['id'],'is_del'=>0]);
if ($num['id'] > 0) {
$pay_data['is_refund'] = 1;
} else {
$pay_data['is_refund'] = 0;
}
$m_agent_house = new GHousesToAgents(); $m_agent_house = new GHousesToAgents();
$m_store = new AStore(); $m_store = new AStore();
$m_report = new OReportModel(); $m_report = new OReportModel();
...@@ -3585,10 +3594,12 @@ class Finance extends Basic ...@@ -3585,10 +3594,12 @@ class Finance extends Basic
$agent_fee = $this->sumPayLogPriceByType(1, 1);//意向金转中介费 $agent_fee = $this->sumPayLogPriceByType(1, 1);//意向金转中介费
$case_fee = $this->sumPayLogPriceByType(2, 1);//意向金转案场费 $case_fee = $this->sumPayLogPriceByType(2, 1);//意向金转案场费
$intention_fee = $this->sumPayLogPriceByType(3, 1);//意向金转意向金 $intention_fee = $this->sumPayLogPriceByType(3, 1);//意向金转意向金
$custody_fee = $this->sumPayLogPriceByType(7, 1);//意向金转保管金
//意向金转意向金+意向金转中介费+意向金转案场费 //意向金转意向金+意向金转中介费+意向金转案场费
$data['intention_adjustment'] = $agent_fee + $case_fee + $intention_fee;//意向金调整 $data['intention_adjustment'] = $agent_fee + $case_fee + $intention_fee + $custody_fee;//意向金调整
$data['intention_refund'] = $this->sumPayLogRefundByType(0, 0, 0);//意向金退款 $data['intention_refund'] = $this->sumPayLogRefundByType(0, 0, 0);//意向金退款
$data['intention_refund'] += $this->sumPayLogRefundByType(1, 0, 0);//意向金退款 $data['intention_refund'] += $this->sumPayLogRefundByType(1, 0, 0);//意向金退款
$data['intention_refund'] = round($data['intention_refund'], 2);
//意向金入账-意向金调整-意向金退款 //意向金入账-意向金调整-意向金退款
$data['total_intention_recorded'] = $data['intention_recorded'] - $data['intention_adjustment'] - $data['intention_refund']; //账上意向金 $data['total_intention_recorded'] = $data['intention_recorded'] - $data['intention_adjustment'] - $data['intention_refund']; //账上意向金
...@@ -3605,6 +3616,7 @@ class Finance extends Basic ...@@ -3605,6 +3616,7 @@ class Finance extends Basic
//待处理款项总计:未开业佣金+账上意向金+账上保管金 //待处理款项总计:未开业佣金+账上意向金+账上保管金
$data['wait_total_fee'] = $data['not_open_commission'] + $data['total_intention_recorded'] + $data['total_custody_recorded']; $data['wait_total_fee'] = $data['not_open_commission'] + $data['total_intention_recorded'] + $data['total_custody_recorded'];
$data['wait_total_fee'] = round($data['wait_total_fee'], 2);
return $this->response( 200, '', $data); return $this->response( 200, '', $data);
} }
...@@ -4027,7 +4039,8 @@ class Finance extends Basic ...@@ -4027,7 +4039,8 @@ class Finance extends Basic
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id); $list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
} 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]['is_adjustment'] = 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;
} }
$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]);
......
...@@ -70,7 +70,7 @@ class Supervise extends Basic ...@@ -70,7 +70,7 @@ class Supervise extends Basic
} }
$visit = new AgentsVisitors(); $visit = new AgentsVisitors();
$fields = 'a.id,created,a.visitor_name,a.agentshopname,a.address,c.address as shop_address,a.scene_photo,a.distance,a.remarks'; $fields = 'a.id,a.create_time,a.visitor_name,a.agentshopname,a.address,c.address as shop_address,a.scene_photo,a.distance,a.remarks';
$where['visit_type'] = 0; $where['visit_type'] = 0;
$data['data'] = $visit->getVisitorsList($pageNo, $pageSize, 'a.id desc', $fields, $where); $data['data'] = $visit->getVisitorsList($pageNo, $pageSize, 'a.id desc', $fields, $where);
......
...@@ -79,19 +79,20 @@ class Transfer extends Basic ...@@ -79,19 +79,20 @@ class Transfer extends Basic
if($params['agent_type'] == 1){ if($params['agent_type'] == 1){
$where['c.agent_id'] = array('gt',0); $where['c.agent_id'] = array('gt',0);
}else{ }else{
$where['c.agent_id'] = 0; $where[] = ['EXP', 'c.agent_id IS NULL OR c.agent_id = 0'];
} }
} }
} }
$sublet = new SubletModel(); $sublet = new SubletModel();
$fields = 'a.id,a.shop_name,a.manage_type,a.address_detail,a.province,a.city,a.district,FORMAT(a.expected_rent/100,2) as expected_rent, $fields = 'a.id,a.shop_name,a.manage_type,a.address_detail,a.province,a.city,a.district,FORMAT(a.expected_rent/100,2) as expected_rent,
if(b.status=2,"3",a.status) as status,a.appellation,a.tel,a.create_time,a.status'; if(b.status=2,"3",a.status) as status,a.appellation,a.tel,a.create_time,a.status';
$data['list'] = $sublet->getSublet($pageNo, $pageSize, 'a.id desc', $fields, $where); $data['list'] = $sublet->getSublet($pageNo, $pageSize, 'a.id desc', $fields, $where);
$data['total'] = $sublet->getSubletTotal($where); $data['total'] = $sublet->getSubletTotal($where);
return $this->response($data['status'], $data['msg'], $data); return $this->response($data['status'], $data['msg'], $data);
} }
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
height: 30px; height: 30px;
/*border-radius: 15px;*/ /*border-radius: 15px;*/
} }
#preview img{
width: 388px;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -134,7 +137,7 @@ ...@@ -134,7 +137,7 @@
<td>{1}</td> <td>{1}</td>
<td>{2}</td> <td>{2}</td>
<td> <td>
<img src='{5}' class="diagram-image J_preview" <img src='{5}' class="diagram-image J_preview no-scroll-page-img"
data-bimg='{5}'> data-bimg='{5}'>
</td> </td>
<td>{4}</td> <td>{4}</td>
......
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
<input type="file" id="file_input" class="" data-limittop="10" /> <!--修改上传文件的最大数字--> <input type="file" id="file_input" class="" data-limittop="10" /> <!--修改上传文件的最大数字-->
<button class="btn btn-default">选择附件</button> <button class="btn btn-default">选择附件</button>
</div> </div>
<ul class="img-pre-ul" id="fujian_ul"></ul> <ul class="img-pre-ul" id="fujian_ul_liu"></ul>
<p class="text-danger">保存成功后,点击文件名称即可下载</p> <p class="text-danger">保存成功后,点击文件名称即可下载</p>
</div> </div>
</div> </div>
......
...@@ -47,19 +47,19 @@ ...@@ -47,19 +47,19 @@
class="glyphicon glyphicon-calendar"></span></span> class="glyphicon glyphicon-calendar"></span></span>
</div> </div>
</div>--> </div>-->
<span class="fore-span ld-Marheight">提交时间:</span> <!--<span class="fore-span ld-Marheight">提交时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date">
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date">-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="name" placeholder="客户姓名" data-rule-required="false" id="name" placeholder="客户姓名"
type="text" value=""> type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="phone" placeholder="手机号" type="text" data-rule-required="false" id="phone" placeholder="手机号" type="text"
value=""> value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="shop_name" placeholder="店铺名" data-rule-required="false" id="shop_name" placeholder="店铺名"
type="text" value=""> type="text" value="">-->
<select class="form-control btn2 ld-Marheight" id="is_guest"> <select class="form-control btn2 ld-Marheight" id="is_guest">
<option value="">是否有客方</option> <option value="">是否有客方</option>
<option value="1"></option> <option value="1"></option>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="text-center">店铺名</th> <!--<th class="text-center">店铺名</th>-->
<th class="text-center">称呼</th> <th class="text-center">称呼</th>
<th class="text-center">客户电话</th> <th class="text-center">客户电话</th>
<th class="text-center">经营业态</th> <th class="text-center">经营业态</th>
......
...@@ -47,26 +47,26 @@ ...@@ -47,26 +47,26 @@
class="glyphicon glyphicon-calendar"></span></span> class="glyphicon glyphicon-calendar"></span></span>
</div> </div>
</div>--> </div>-->
<span class="fore-span ld-Marheight">提交时间:</span> <!--<span class="fore-span ld-Marheight">提交时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date">
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date">-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="name" placeholder="客户姓名" data-rule-required="false" id="name" placeholder="客户姓名"
type="text" value=""> type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="phone" placeholder="手机号" type="text" data-rule-required="false" id="phone" placeholder="手机号" type="text"
value=""> value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" <!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false"
data-rule-required="false" id="shop_name" placeholder="店铺名" data-rule-required="false" id="shop_name" placeholder="店铺名"
type="text" value=""> type="text" value="">-->
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="form_search_reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="form_search_reset">重置</span>
</form> </form>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="text-center">店铺名</th> <!--<th class="text-center">店铺名</th>-->
<th class="text-center">称呼</th> <th class="text-center">称呼</th>
<th class="text-center">客户电话</th> <th class="text-center">客户电话</th>
<th class="text-center">经营业态</th> <th class="text-center">经营业态</th>
......
...@@ -5,6 +5,8 @@ namespace app\model; ...@@ -5,6 +5,8 @@ namespace app\model;
class AgentsVisitors extends BaseModel class AgentsVisitors extends BaseModel
{ {
protected $table = 'a_visiting';
/** /**
* @param int $pageNo * @param int $pageNo
* @param int $pageSize * @param int $pageSize
......
...@@ -54,6 +54,7 @@ class SubletModel extends BaseModel ...@@ -54,6 +54,7 @@ class SubletModel extends BaseModel
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->select(); ->select();
big_log($this->getLastSql());
return $result; return $result;
} }
...@@ -65,10 +66,12 @@ class SubletModel extends BaseModel ...@@ -65,10 +66,12 @@ class SubletModel extends BaseModel
*/ */
public function getSubletTotal($params) public function getSubletTotal($params)
{ {
return $this->alias("a") $result = $this->alias("a")
->join("g_houses b","a.house_id=b.id","left") ->join("g_houses b","a.house_id=b.id","left")
->join("u_users c", "a.user_id = c.id", "left") ->join("u_users c", "a.user_id = c.id", "left")
->where($params)->count(); ->where($params)
->count();
return $result;
} }
/** /**
......
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
if(!doc.addEventListener) return; if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false); win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false); doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><link href=./static/css/app.8e7a1294243657c878b001aee61ce09a.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.1b35a927314506fe4a4f.js></script><script type=text/javascript src=./static/js/app.b438912f1795b396e5e3.js></script></body></html> })(document, window);</script><link href=./static/css/app.8e7a1294243657c878b001aee61ce09a.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.1b35a927314506fe4a4f.js></script><script type=text/javascript src=./static/js/app.e7ca0de709b306c7ceae.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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