Commit df132cb0 authored by hujun's avatar hujun

我的约带看

parent 6429e1ef
......@@ -199,6 +199,16 @@ class Report extends Basic
}
$params["report_agent_id"] = $params["agent_id"];
$where["agents_id"] = $this->agentId;
$where["type"] = array("in",'2,3'); //盘方和独家
$where["is_del"] = 0;
$houseToAgentModel = new GHousesToAgents();
$house_id_arr = $houseToAgentModel->getAgentHouseOne("houses_id", $where);
if (!empty($house_id_arr)) {
$params['b.house_id'] = ['in', $house_id_arr];
}
$result = $this->service_->orderListForPc($field, $params, $pageNo, $pageSize);
if (count($result) > 0) {
......
......@@ -81,7 +81,7 @@ class Report extends Basic
$where['b.id'] = $this->params['order_id'];
}
$field = 'b.id as order_id,a.user_name,a.user_phone,a.create_time,a.report_agent_name,c.internal_title,a.predict_see_time';
$field = 'b.id as order_id,a.user_name,a.user_phone,a.create_time,a.report_agent_name,c.internal_title as house_title,a.predict_see_time';
$field .= ',a.id,b.order_no';
try {
......
......@@ -54,13 +54,14 @@
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<!--同步app-->
<!--<tr>
<tr>
<td colspan="14" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">全部</a>
<a class="btn btn-default liudan_pic_btn">部门</a>
<a class="btn btn-default liudan_pic_btn">门店</a>
<a class="btn btn-info liudan_pic_btn" id="our">我的</a>
<a class="btn btn-default liudan_pic_btn" id="is_show_store">门店</a>
<a class="btn btn-default liudan_pic_btn" id="is_show_district">部门</a>
<a class="btn btn-default liudan_pic_btn" id="is_show_all">全部</a>
</td>
</tr>-->
</tr>
<tr>
<td colspan="10">
<form id="form_search">
......
......@@ -12,10 +12,10 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
stopstatus: true,
boxphoto: '',
mainTabIndex: 0,
url:'/broker/reportListForPc',
init: function() {
//初始化dot
$(document.body).append(template);
record.event();
},
......@@ -103,7 +103,29 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
record.mainTabIndex = _this.index();
record.getList(1);
});
if (!check_auth('index/inspectionRecordStore/1')) {
$("#is_show_store").hide();
}
if (!check_auth('index/inspectionRecordDistrict/2')) {
$("#is_show_district").hide();
}
if (!check_auth('index/inspectionRecordAll/3')) {
$("#is_show_all").hide();
}
$("#our").click(function () {
record.url = "/broker/reportListForPc";
});
$("#is_show_store").click(function () {
record.url = "/index/inspectionRecordStore/1";
});
$("#is_show_district").click(function () {
record.url = "/index/inspectionRecordDistrict/2";
});
$("#is_show_all").click(function () {
record.url = "/index/inspectionRecordAll/3";
});
},
//获取一级审核,二级审核,三级审核,结单不同的ajax请求url
switchUrl: function(){
......@@ -129,8 +151,10 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
params.internal_title = $('#house_title').val();
params.user_phone = $('#report_agent_phone').val();
params.order_id = $('#report_id').val();//全部约带看记录 订单id搜索
// console.log(location.href);
params.AuthToken = user_info_obj.AuthToken;
params.type = 1;
params.agent_id = user_info_obj.id;
// var start_ = $('#create_time_start').val()+" 00:00:00";
// date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
// params.start_time =date_start.getTime()*0.001;
......@@ -145,7 +169,7 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
$.ajax({
type: 'GET',
// url: record.switchUrl(), //约带看记录 对接接口(2.9.6 有权限的人 才能看到)
url: location.href, //约带看记录 对接接口(2.9.6 有权限的人 才能看到)
url: record.url, //约带看记录 对接接口(2.9.6 有权限的人 才能看到)
data: params,
timeout: 30000,
dataType: 'json',
......@@ -154,12 +178,13 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('inspectionRecordAll_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
if (data.data.list) {
$("#follow_list").html(doTtmpl(data.data.list));
} else {
$("#follow_list").html(doTtmpl(data.data.result));
}
/*分页代码*/
console.log(data.data.total);
add_page(data.data.total, pageNo, record.pageSize, record.getList);
// $(".move-block").html(' ');
} else {
alert(data['msg']);
};
......
......@@ -8,7 +8,7 @@
<td>[%= hideTel(it[item]['user_phone']) %]</td>
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['report_agent_name'] %]</td>
<td>[%= it[item]['internal_title'] %]</td>
<td>[%= it[item]['house_title'] %]</td>
<td>[%= it[item]['predict_see_time'] %]</td>
<td>
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_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