Commit 2ac2c71b authored by agping's avatar agping

商铺查看日志 修改

parent b2879f05
<?php
namespace app\index\controller;
/**
* Created by PhpStorm.
* User: liu yin ping
* Date: 2018/3/13
* Time: 15:48
*/
use app\index\extend\Basic;
class ShopInspectionLog extends Basic
{
public function shopinspectionLogList()
{
if (!$this->request->isAjax()) {
return view('shopinspection/shopinspectionLogList');
}
}
}
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="shopInspectionLog" />
<style>
.modal-body{
/*height: 600px;*/
overflow-y: auto;
padding-bottom: 60px;
}
.user-ul2{
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
}
.user-ul2 li{
list-style: none;
line-height: 30px;
}
.money_total_two{
font-weight: bold;
font-size: 15px;
}
#search{
float: left;
}
#reset{
float: left;
}
.clear{
clear: both;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="javascript:;">商铺查看日志</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="10">
<form id="form_search">
<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_date1" type="date">
<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_date1" type="date">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_id" placeholder="商铺ID" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_name" placeholder="商铺名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="looker_name" placeholder="查看人姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="looker_phone" placeholder="查看人手机号" type="text" value="">
<div class="clear"></div>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</tr>
<tr>
<th class="text-center">查看时间</th>
<th class="text-center">商铺ID</th>
<th class="text-center">商铺名称</th>
<th class="text-center">查看人</th>
</tr>
</thead>
<tbody class="text-center" id="shop_log_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -262,6 +262,8 @@ Route::group('index', [
'followUpList' => [ 'index/HouseFollowUp/followUpList', [ 'method' => 'GET' ] ],//商铺跟进liu
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
'realtimePerformance' => [ 'index/RealTimePerformance/realtimePerformanceList', [ 'method' => 'GET' ] ],//实时业绩liu
'shopinspectionLog' => [ 'index/ShopInspectionLog/shopinspectionLogList', [ 'method' => 'GET' ] ],//商铺查看日志liu
......
define(['doT', 'text!temp/shop_inspectionlog_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
shoplog = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
id: '',
house_id: '',
house_fatherid: '',
init: function() {
//初始化dot
$(document.body).append(template);
shoplog.getList(0);
shoplog.event();
},
event: function() {
var _doc = $(document);
//搜索按钮点击事件
$("#search").click(function() {
shoplog.getList(1);
});
//重置按钮的事件
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
},
getList: function(pageNo) {
shoplog.pageNo = pageNo;
var params = {};
params.user_name = $.trim($('#customer_name').val());
params.start_time = $('#start_date').val();
params.end_time = $('#end_date').val();
params.internal_address = $('#shop_name').val();
params.user_phone = $('#customer_phone').val();
params.id = $('#shop_num').val();
params.store_name = $('#store_name').val();
params.report_phone = $('#applicant_phone').val();
params.report_name = $('#applicant_name').val();
params.pageNo = shoplog.pageNo;
params.pageSize = shoplog.pageSize;
$.ajax({
type: 'GET',
url: '/index/getCollection',//商铺查看日志
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('shop_inspectionlog_tpl').innerHTML);
$("#shop_log_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total, pageNo, shoplog.pageSize, shoplog.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
}
};
return shoplog;
});
\ No newline at end of file
<script id="shop_inspectionlog_tpl" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['user_name'] %]</td>
<td>[%= it[item]['user_phone'] %]</td>
<td>[%= it[item]['money'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
......@@ -23,14 +23,6 @@
</script>
<!--remarks string 跟进
scene_photo string 图片路径
address string 打卡地址
shop_address string 门店地址
agentshopname string 部门
distance int 距离
created string 拜访时间
visitor_name string 拜访人-->
......
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