Commit 1cc3990e authored by agping's avatar agping

运营数据 对接接口

parent 592a317f
...@@ -146,7 +146,8 @@ ...@@ -146,7 +146,8 @@
<br /> <br />
<span>商铺地址:</span><span id="bargaininfo_internal_address"></span> <span>商铺地址:</span><span id="bargaininfo_internal_address"></span>
<button type="button" class="bargain-detail-shop btn-info btn btn-sm">商铺</button> <a class="btn1 bargain-detail-shop btn-info" href="#modal_shop_detail" data-toggle="modal">商铺</a>
<!--<button type="button" class="bargain-detail-shop btn-info btn btn-sm">商铺</button>-->
<br> <br>
<span>业态:</span>&nbsp;<input class="form-control" id="bargaininfo_yetai" type="text"><br> <span>业态:</span>&nbsp;<input class="form-control" id="bargaininfo_yetai" type="text"><br>
<span>客户姓名:</span><span id="bargaininfo_user_name"></span><br> <span>客户姓名:</span><span id="bargaininfo_user_name"></span><br>
...@@ -169,13 +170,14 @@ ...@@ -169,13 +170,14 @@
</select> <br /> </select> <br />
<span>商铺号:</span><input class="form-control" id="bargaininfo_shop_num" /> <span>商铺号:</span><input class="form-control" id="bargaininfo_shop_num" />
<input type="text" id="hide-input-value" style="opacity: 0;width: 6px;"/> <input type="text" id="hide-input-value" style="opacity: 0;width: 6px;"/>
<button type="button" class="copy-text-shop btn-info btn btn-sm">复制</button> <button type="button" class="copy-text-shop btn-info btn1">复制</button>
<br> <br>
<!--<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>--> <!--<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>-->
<!--<span>预计收款时间:</span><span id="bargaininfo_expect_payback_time"></span><br>--> <!--<span>预计收款时间:</span><span id="bargaininfo_expect_payback_time"></span><br>-->
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" placeholder="请输入"><br> <span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" placeholder="请输入"><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span> <span>客户电话:</span><span id="bargaininfo_user_phone"></span>
<button type="button" class="bargain-detail-user btn-info btn btn-sm">客户</button> <a class="btn1 bargain-detail-user btn-info" href="#modal_user_detail" data-toggle="modal">客户</a>
<!--<button type="button" class="bargain-detail-user btn-info btn btn-sm">客户</button>-->
<br> <br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br> <span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number"> <span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number">
......
...@@ -26,20 +26,26 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho ...@@ -26,20 +26,26 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho
operating.mainTabIndex = _this.index(); operating.mainTabIndex = _this.index();
operating.getList(1); operating.getList(1);
}); });
$("#maintable_search").click(function() {//搜索
operating.getList(1);
});
$("#maintable_reset").click(function() { //重置
document.getElementById("maintable_form_search").reset();
});
}, },
//获取微聊 客户 商铺 不同的ajax请求url //获取微聊 客户 商铺 不同的ajax请求url
switchUrl: function(){ switchUrl: function(){
switch (Number(this.mainTabIndex)){ switch (Number(this.mainTabIndex)){
case 0: case 0:
return '/index/selectDistrictPerformance'; return '/index/operationChatUserNum';
case 1: case 1:
return '/index/selectStorePerformance'; return '/index/operationUserPhoneNum';
case 2: case 2:
return '/index/selectIndividualPerformance'; return '/index/operationLoginNum';
case 3: case 3:
return '/index/selectStorePerformance'; return '/index/operationHouseNum';
case 4: case 4:
return '/index/selectIndividualPerformance'; return '/index/operationHouseBargainNum';
default: default:
return ''; return '';
} }
...@@ -65,10 +71,8 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho ...@@ -65,10 +71,8 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho
getList: function(pageNo){ getList: function(pageNo){
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = { var params = {
'pageNo': pageNo, 'create_time_start':$('#maintable_create_time').val(),
'pageSize': operating.pageSize, 'create_time_end':$('#maintable_end_time').val(),
'start_day':$('#maintable_create_time').val(),
'end_day':$('#maintable_end_time').val(),
}; };
$.ajax({ $.ajax({
...@@ -80,18 +84,33 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho ...@@ -80,18 +84,33 @@ define(['doT', 'text!temp/operational_dataList_template_tpl.html', 'css!style/ho
beforeSend: function() {}, beforeSend: function() {},
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
// if(data.code == 200) { if(data.code == 200) {
var tpl=operating.switchTpl(); var tpl=operating.switchTpl();
console.log(tpl);
var doTtmpl = doT.template(document.getElementById(tpl).innerHTML); var doTtmpl = doT.template(document.getElementById(tpl).innerHTML);
$("#maintable_list").html(doTtmpl(data.data.list)); $("#maintable_list").html(doTtmpl(data.data));
//微聊统计
if(tpl == 'small_talk_list_tpl' && data.data){
$('#chat_user_num').html(data.data.chat_user_num);
}
//客户统计
if(tpl == 'user_total_list_tpl' && data.data){
$('#add_user_num').html(data.data.add_user_num);
$('#create_user_num').html(data.data.create_user_num);
$('#login_user_num').html(data.data.login_user_num);
}
//商铺统计
if(tpl == 'shop_number_list_tpl' && data.data){
$('#have_not_rent_num').html(data.data.have_not_rent_num);
$('#house_num').html(data.data.house_num);
}
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, operating.pageSize, operating.getList); // add_page(data.data.total, pageNo, operating.pageSize, operating.getList);
// } else { } else {
// alert(data['msg']); alert(data['msg']);
// }; };
} else { } else {
alert('数据错误'); alert('数据错误');
}; };
......
<!--微聊用户数据统计--> <!--微聊用户数据统计-->
<script id="small_talk_list_tpl" type="text/template"> <script id="small_talk_list_tpl" type="text/template">
<tr> <tr>
<th class="text-left" width="26%">发起微聊用户数:<span id=""></span></th> <th class="text-left" width="26%">发起微聊用户数:<span id="chat_user_num"></span></th>
</tr> </tr>
</script> </script>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
</tr> </tr>
[% for(var item in it){ %] [% for(var item in it){ %]
<tr> <tr>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['district_name'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['user_phone_num'] %]</td>
</tr> </tr>
[% } %] [% } %]
...@@ -30,23 +30,23 @@ ...@@ -30,23 +30,23 @@
<!--客户统计--> <!--客户统计-->
<script id="user_total_list_tpl" type="text/template"> <script id="user_total_list_tpl" type="text/template">
<tr> <tr>
<th class="text-left">新增客户数:<span id=""></span></th> <th class="text-left">新增客户数:<span id="add_user_num"></span></th>
</tr> </tr>
<tr> <tr>
<th class="text-left">注册客户数:<span id=""></span></th> <th class="text-left">注册客户数:<span id="create_user_num"></span></th>
</tr> </tr>
<tr> <tr>
<th class="text-left">登录客户数:<span id=""></span></th> <th class="text-left">登录客户数:<span id="login_user_num"></span></th>
</tr> </tr>
</script> </script>
<!--商铺统计--> <!--商铺统计-->
<script id="shop_number_list_tpl" type="text/template"> <script id="shop_number_list_tpl" type="text/template">
<tr> <tr>
<th class="text-left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商铺总量:<span id=""></span></th> <th class="text-left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商铺总量:<span id="house_num"></span></th>
</tr> </tr>
<tr> <tr>
<th class="text-left">待租商铺数量:<span id=""></span></th> <th class="text-left">待租商铺数量:<span id="have_not_rent_num"></span></th>
</tr> </tr>
</script> </script>
...@@ -65,10 +65,10 @@ ...@@ -65,10 +65,10 @@
[% for(var item in it){ %] [% for(var item in it){ %]
<tr> <tr>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['index_'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['indoor_shop_look_at_num'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['outdoor_shop_look_at_num'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['indoor_shop_bargain_num'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td> <td class="text-center">[%= it[item]['outdoor_shop_bargain_num'] %]</td>
</tr> </tr>
[% } %] [% } %]
......
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