Commit c6f12c40 authored by agping's avatar agping

后台所有

parent 2ec20608
...@@ -130,5 +130,19 @@ class RealTimePerformance extends Basic ...@@ -130,5 +130,19 @@ class RealTimePerformance extends Basic
return view('finance/fineMoney'); return view('finance/fineMoney');
} }
} }
//删除报销
public function delCost()
{
if (!$this->request->isAjax()) {
return view('cost/delCost');
}
}
//定位地图
public function locationMap()
{
if (!$this->request->isAjax()) {
return view('achievements_report/location-map');
}
}
} }
\ No newline at end of file
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="locationMap" />
<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 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="">
</select>
<div class="left-phone">
<input class="form-control" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="选择经纪人" type="text" value="">
<ul class="user-ul"></ul>
</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">图片</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>
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" 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">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body del-font">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-primary" id="confirm_delete">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
<span class="btn btn-info btn3 ld-Marheight" id="reset" style="float:left">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset" style="float:left">重置</span>
<span class="btn btn-info btn3 ld-Marheight" id="export" style="float: left;">导出报表</span> <span class="btn btn-info btn3 ld-Marheight" id="export" style="float: left;">导出报表</span>
<!--<span class="btn btn-info btn3 ld-Marheight" id="" style="float: left;">批量上传</span>--> <!--<span class="btn btn-info btn3 ld-Marheight" id="" style="float: left;">批量上传</span>-->
<div class="input_caozuo ld-Marheight btn3" style="float: left;width: 80px;position: relative;"> <div class="input_caozuo ld-Marheight btn3 file_input_div" style="float: left;width: 80px;position: relative;display: none;">
<span class="btn btn-info" id="" style="width: 80px;">批量上传</span> <span class="btn btn-info" id="" style="width: 80px;">批量上传</span>
<input type="file" id="file_input" style="width: 80px;opacity: 0;position: absolute;left: 0;top: 0;cursor: pointer;height: 35px;" class=""/> <input type="file" id="file_input" style="width: 80px;opacity: 0;position: absolute;left: 0;top: 0;cursor: pointer;height: 35px;" class=""/>
</div> </div>
......
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="delCost" />
<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" style="overflow:hidden;">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed" style="margin-top:15px">
<thead>
<tr>
<th class="text-center">费用ID</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>
<th class="text-center">来源</th>
<th class="text-center">删除人</th>
</tr>
</thead>
<tbody class="text-center" id="order_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...@@ -349,6 +349,8 @@ ...@@ -349,6 +349,8 @@
<label class="col-sm-5 control-label">滞纳金:<span id="forfeit_penalty"></span></label> <label class="col-sm-5 control-label">滞纳金:<span id="forfeit_penalty"></span></label>
<label class="col-sm-5 control-label">付款金额:<span id="money_sum"></span></label> <label class="col-sm-5 control-label">付款金额:<span id="money_sum"></span></label>
<br />&nbsp;
<label class="col-sm-6 control-label">支付宝交易号:<span id="alipay_num">123456789</span></label>
</div> </div>
......
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
<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"> <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">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_id" placeholder="客户ID" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_id" placeholder="客户ID" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="客户手机号" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="客户手机号" type="text" value="">
<select class="form-control btn2 ld-Marheight" id="cash_type">
<option value="">变动类型</option>
<option value="0">红包兑现</option>
<option value="1">提现</option>
<option value="2">过期</option>
</select>
<!-- <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="客户昵称" type="text" value="" name="store_name">--> <!-- <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="客户昵称" type="text" value="" name="store_name">-->
<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="reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
......
...@@ -376,7 +376,8 @@ Route::group('index', [ ...@@ -376,7 +376,8 @@ Route::group('index', [
'forgetSubmitFinancial' => ['index/RealTimePerformance/forgetSubmitFinancial', ['method' => 'GET']],//财务日报未提交 liu 'forgetSubmitFinancial' => ['index/RealTimePerformance/forgetSubmitFinancial', ['method' => 'GET']],//财务日报未提交 liu
'delFinanceReport' => ['index/RealTimePerformance/delFinanceReport', ['method' => 'GET']],//收款入账删除 liu 'delFinanceReport' => ['index/RealTimePerformance/delFinanceReport', ['method' => 'GET']],//收款入账删除 liu
'fineMoney' => ['index/RealTimePerformance/fineMoney', ['method' => 'GET']],//罚款 liu 'fineMoney' => ['index/RealTimePerformance/fineMoney', ['method' => 'GET']],//罚款 liu
'delCostCheck' => ['index/RealTimePerformance/delCost', ['method' => 'GET']],//删除报销 liu
'locationMap' => ['index/RealTimePerformance/locationMap', ['method' => 'GET']],//删除报销 liu
'shopinspectionLog' => ['index/ShopInspectionLog/shopinspectionLogList', ['method' => 'POST|GET']],//商铺查看日志liu 'shopinspectionLog' => ['index/ShopInspectionLog/shopinspectionLogList', ['method' => 'POST|GET']],//商铺查看日志liu
'opensquareLog' => ['index/OpenSquareLog/opensquarelogList', ['method' => 'POST|GET']],//开盘广场liu 'opensquareLog' => ['index/OpenSquareLog/opensquarelogList', ['method' => 'POST|GET']],//开盘广场liu
'redEnvelope' => ['index/RedEnvelope/redEnvelopeList', ['method' => 'POST|GET']],//活动列表liu 'redEnvelope' => ['index/RedEnvelope/redEnvelopeList', ['method' => 'POST|GET']],//活动列表liu
......
...@@ -140,6 +140,7 @@ define (['doT', 'text!temp/cash_account_list_template_tpl.html', 'css!style/home ...@@ -140,6 +140,7 @@ define (['doT', 'text!temp/cash_account_list_template_tpl.html', 'css!style/home
params.create_time_end = $('#create_time_end').val(); params.create_time_end = $('#create_time_end').val();
params.user_phone = $('#user_phone').val(); params.user_phone = $('#user_phone').val();
params.user_id = $('#user_id').val(); params.user_id = $('#user_id').val();
params.status = $('#cash_type').val();
$.ajax ({ $.ajax ({
......
...@@ -69,6 +69,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -69,6 +69,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
//点击不同审核按钮 //点击不同审核按钮
_doc.on('click','.choose_btn',function(e){ _doc.on('click','.choose_btn',function(e){
$(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default'); $(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
//显示隐藏批量上传
if($(this).html() == '财务一审' || $(this).html() == '财务二审'){
$(".file_input_div").show();
}else{
$(".file_input_div").hide();
}
cost.url = e.target.dataset.value; cost.url = e.target.dataset.value;
cost.getList(1); cost.getList(1);
}); });
......
define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker",'pagination', 'bootstrapJs','blow-up'], function(doT, template) {
cost = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
init: function() {
//初始化dot
$(document.body).append(template);
cost.getList(1);
},
//获取列表
getList : function(no){
var that = cost;
that.pageNo = no;
var params = {};
params.pageNo = that.pageNo;
params.pageSize = that.pageSize ;
$.get("/index/getCostList",params,function(data){
if(typeof data === 'object') {
if(data.code == 200) {
that.listData = data.data.list;
var temp = document.getElementById('del_cost_check_template_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},'json');
},
};
return cost;
});
\ No newline at end of file
...@@ -278,6 +278,7 @@ define(['doT', 'text!temp/fineMoney_list_template_tpl.html', 'text!temp/phoneBin ...@@ -278,6 +278,7 @@ define(['doT', 'text!temp/fineMoney_list_template_tpl.html', 'text!temp/phoneBin
$("#forfeit_penalty").html(data.data.forfeit_penalty); $("#forfeit_penalty").html(data.data.forfeit_penalty);
$("#money_sum").html(data.data.money_sum); $("#money_sum").html(data.data.money_sum);
$("#fine_money_edit").val(data.data.money); $("#fine_money_edit").val(data.data.money);
$("#alipay_num").html(data.data.alipay_num);//支付宝交易号
if(data.data.type) { if(data.data.type) {
agent.getDistrictStoreList(data.data.type, function(_data) { agent.getDistrictStoreList(data.data.type, function(_data) {
......
define(['doT', 'text!temp/day_achievements_report_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);
//二级联动
report.getDistrict(function(){
_doc.on('input', '#district_id, #district_id2', 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',$(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.type = 1;//日报
params.agent_id = report.agent_id_phone;//经纪人 姓名
params.pageNo = report.pageNo;
params.pageSize = report.pageSize;
params.level = $('#shop_type').val();//日报类型
$.ajax({
type: 'GET',
url: '/index/getPerformanceReportList',//日报
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('location_map_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('请求超时');
};
}
});
},
//调用部门 和 门店的接口
getDistrict : function (fn) {
$.ajax ({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {"pageSize":1000},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.district_name+'</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
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
...@@ -125,3 +125,51 @@ ...@@ -125,3 +125,51 @@
</tr> </tr>
[% } %] [% } %]
</script> </script>
<!--删除报销-->
<script id="del_cost_check_template_tpl" type="text/template">
[% if(it && it.length) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['count_time'] %]</td>
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['agent_name'] %]</td>
<td>[%= it[item]['total_fee'] %]</td>
<!--费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。-->
[% if(it[item]['type'] == 2) { %]
<td>总部成本</td>
[% }else if (it[item]['type'] == 3) { %]
<td>[%= switchFeeSiteId(it[item]['site_id']) %]分部成本</td>
[% }else if (it[item]['type'] == 5) { %]
<td>门店独有成本</td>
[% }else if (it[item]['type'] == 1) { %]
<td>办公室成本</td>
[% }else if (it[item]['type'] == 6) { %]
<td>不计入成本</td>
[% } else { %]
<td>--</td>
[% } %]
<td>[%= switchFeeItem(it[item]['fee_item']) %]</td>
<td>[%= it[item]['purpose'] %]</td>
[% if(it[item]['source'] == 1) { %]
<td>excel导入</td>
[% }else if (it[item]['source'] == 2) { %]
<td></td>
[% }else if (it[item]['source'] == 3) { %]
<td></td>
[% }else if (it[item]['source'] == 0) { %]
<td>app申请</td>
[% } else { %]
<td>--</td>
[% } %]
<td>[%= it[item]['payee_agent_name'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="15" style="text-align:left;border: 0;padding: 0px;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
...@@ -18,6 +18,24 @@ ...@@ -18,6 +18,24 @@
</tr> </tr>
[% } %] [% } %]
</script> </script>
<!--定位地图-->
<script id="location_map_list_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>
<a class="review-images" href="#modal-report-img" data-toggle="modal" data-img='[%= it[item]["img_file_path"] %]'>查看</a>
</td>
<td>[%= it[item]['create_time'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
......
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