Commit 90090d8d authored by hujun's avatar hujun

忠诚诚信表

parent e01b8b94
......@@ -51,6 +51,20 @@ class WorkLearning extends Basic
return $this->response($data['code'], $data['msg'], $data['data']);
}
/**
* 忠诚诚信表
*
* @return \think\Response|\think\response\View
*/
public function integrity()
{
if (!$this->request->isAjax()) {
return view('work_learning/integrity');
}
$data = $this->getList($this->params, 4);
return $this->response($data['code'], $data['msg'], $data['data']);
}
/**
* @param $params
* @param $type
......
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="integrity" />
<style>
.modal-body{
overflow-y: auto;
padding-bottom: 60px;
}
.modal-body-img{
height: 666px;
overflow-y: auto;
padding-bottom: 60px;
text-align: center;
}
.modal-body-img img{
width: 466px;
}
.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;
}
.del-font{
font-size: 16px;
font-weight: 600;
}
/*经纪人 姓名 下拉式列表*/
.user-ul{
height: auto;
float: left;
position: absolute;
width: 230px;
background: #fff;
border: 1px solid #ccc;
border-top:0;
left: 3px;
}
.user-ul li{
list-style: none;
line-height: 30px;
margin-left: -20px;
}
.left-phone{
width: 236px;
float: left;
margin-top: 7px;
margin-left: 10px;
position: relative;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="">
<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="create_time_start" 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="create_time_end" name="end_date1" type="date">
<select class="form-control btn2 input ld-Marheight" name="" id="district_id2_city">
<option value="">选择城市</option>
<option value="10001">上海市</option>
<option value="10002">杭州市</option>
<option value="10003">深圳市</option>
<option value="10004">广州市</option>
<option value="10005">北京市</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="district_id" >
<option value="">选择部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
<option value="">选择门店</option>
</select>
<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">上传人</th>
<th class="text-center">业绩图片</th>
</tr>
</thead>
<tbody class="text-center" id="report_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--业绩图片 显示-->
<div class="modal fade" id="modal-report-img" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title">
日价值观考核图片
</h4>
</div>
<div class="modal-body-img">
<img src="" alt="" class="review-images2"/>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
\ No newline at end of file
......@@ -591,6 +591,7 @@ Route::group('index', [
'methodOfAnalysis' => ['index/WorkLearning/methodOfAnalysis', ['method' => 'GET']], //方法分析
'qualityAssessment' => ['index/WorkLearning/qualityAssessment', ['method' => 'GET']], //素质测评
'valueAssessment' => ['index/WorkLearning/valueAssessment', ['method' => 'GET']], //价值观考核
'integrity' => ['index/WorkLearning/integrity', ['method' => 'GET']], //忠诚诚信
'storeDataExcel' => ['index/CostParameter/storeDataExcel', ['method' => 'POST']],
'intentionsWarning' => ['index/PayLog/intentionsWarning', ['method' => 'GET']],//意向金预警
......
define(['doT', 'text!temp/work_learn_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker", 'pagination', 'bootstrapJs','blow-up'], function(doT, template) {
report = {
pageNo: 1,
/*第几页*/
pageSize: 15,
/*每页显示多少条*/
id: '',
type: '',
ajaxObj: '',
report_id:'',
agent_id_phone:'',//经纪人 姓名搜索
init: function() {
//初始化dot
$(document.body).append(template);
report.getList(1);
report.event();
},
event: function() {
var _doc = $(document);
$(document).on("input", "#district_id2_city", function() { //点击城市
//列表选择城市
report.getDistrictList();
});
//二级联动
_doc.on('input', '#district_id', function(){
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
if(_id && _id != '0'){
report.getDistrictStoreList(_id, function(_data){
var _str = '<option value="">选择门店</option>';
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
});
_this.next().html(_str);
});
}else{
};
});
//业绩图片 显示
$ (document).delegate (".review-images", "click", function () {//提交
$('.review-images2').attr('src', ServerHostImageLiu + '/static/week_work_img/' + $(this).attr ("data-img"));
});
//经纪人 姓名下拉式
$(document).on("input", "#partical_name", function() { //手机号新增搜索客方
if($("#partical_name").val() == '') {
report.agent_id_phone='';
$(".user-ul").html('');
} else {
report.search_phone();
}
});
//点击li 列表消失
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
report.addphone(this);
});
//删除
$("#confirm_delete").click(function(){
var params = {};
params.id = report.report_id;
if(!params.id || params.id == null){
alert ("要删除的id不能为空");
return false;
}
report.delete_report(params);
});
$ (document).delegate (".report-del", "click", function () {
report.report_id = $ (this).attr ("data-id");
});
$("#search").click(function() {//搜索
report.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
$('#guest_stores').html('');
report.agent_id_phone='';
});
},
//经纪人 姓名搜索
search_phone: function() { //手机号新增客户
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"district_id": $("#district_id").val(),//部门
"store_id": $("#guest_stores").val(),//门店
"phone": $("#partical_name").val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
user_ul += '<li class="addphone" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + '</li>';
});
$(".user-ul").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(经纪人 姓名)
addphone: function(obj) {//新增客户 input赋值
var user_ht = $(obj).html();
$("#partical_name").val(user_ht);
$(".user-ul").html('');
report.agent_id_phone = $(obj).attr("data-id");
},
getList: function(pageNo) {
report.pageNo = pageNo;
var params = {};
params.start_date =$('#create_time_start').val();
params.end_date =$('#create_time_end').val();
params.district_id =$('#district_id').val();
params.store_id =$('#guest_stores').val();
params.pageNo = report.pageNo;
params.pageSize = report.pageSize;
if($("#district_id2_city").val()){
if(!$("#district_id").val()){
alert('请选择部门进行搜索');
return
}
}
$.ajax({
type: 'GET',
url: '/index/integrity',//日报
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('valueAssessment_list_tpl').innerHTML);
$("#report_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,report.pageSize,report.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//获取城市所在部门
getDistrictList: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000,
"site_id": $('#district_id2_city').val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '<option value="">选择部门</option>';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$('#district_id').html(str);
$('#guest_stores').html('<option value="">选择门店</option>');
}
}
});
},
getDistrictStoreList: function(id, fn){
$.ajax ({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id':id,
"pageSize":1000
},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
delete_report : function(params) {//删除 周报
$.ajax ({
url: '/index/delPerformanceReport',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function (data) {
if(data.code == 200){
alert ('删除成功');
}
$ ("#modal-delete").modal ('hide');
if (data.code == "101") {
alert (data.msg);
return false;
}
report.getList (report.pageNo);
}
});
},
};
return report;
});
\ No newline at end of file
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