Commit 5bab1003 authored by agping's avatar agping

1

parent 134351d7
{layout name="global/frame_two_tpl" /} {layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="costOffice" /> <input type="hidden" class="page-load" id="costOffice" />
<style> <style>
#check_time{
float: left;
margin: 0 20px;
font-size: 20px;
font-weight: 600;
margin-top: 10px;
}
.modal-body-height { .modal-body-height {
overflow-y: auto; overflow-y: auto;
height: 432px; height: 432px;
...@@ -316,7 +323,10 @@ ...@@ -316,7 +323,10 @@
<span class="btn btn-info btn3 ld-Marheight" id="search" style="float:left">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search" 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="reset" style="float:left">重置</span>
<span class="btn btn-info btn3 ld-Marheight" id="export" style="float: left;">办公室租金+办公室绑定门店 核对无误</span> <span id="check_time">2019.6</span>
<span class="btn btn-info btn3 ld-Marheight" id="hedui" style="float: left;">办公室租金+办公室绑定门店 核对无误</span>
<!--<span class="btn btn-info btn3 ld-Marheight" id="" style="float: left;">返回上一页</span>-->
</form> </form>
</td> </td>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<div class="modal-body modal-body-height pic-con2" style="overflow: hidden;"> <div class="modal-body modal-body-height pic-con2" style="overflow: hidden;">
<form class=""> <form class="">
<div class="col-xs-12 margain-10"> <div class="col-xs-12 margain-10">
<div class="col-xs-6"> <div class="col-xs-6 is_hide_costID">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">费用总ID:</span></strong> <strong><span class="col-xs-4 ld-Marheight">费用总ID:</span></strong>
<span id="cost_id" class="col-xs-6 ld-Marheight"></span> <span id="cost_id" class="col-xs-6 ld-Marheight"></span>
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6 is_hide_bank">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">转账卡号:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">转账卡号:</span></strong>
<span id="" class="col-xs-6 ld-Marheight"> <span id="" class="col-xs-6 ld-Marheight">
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-12 margain-10"> <div class="col-xs-12 margain-10 is_hide_bank">
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">收款卡户名:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">收款卡户名:</span></strong>
...@@ -250,9 +250,9 @@ ...@@ -250,9 +250,9 @@
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6 is_hide_kaoqin">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">门店所在办公室考勤:</span></strong> <strong><span class="col-xs-4 ld-Marheight kaoqin_con">当月门店所在办公室考勤:</span></strong>
<span id="kaoqin" class="col-xs-6 ld-Marheight"> <span id="kaoqin" class="col-xs-6 ld-Marheight">
10 10
</span> </span>
...@@ -269,13 +269,21 @@ ...@@ -269,13 +269,21 @@
</table> </table>
</div> </div>
<p style="font-size: 16px;font-weight: 600;">审核记录</p> <p style="font-size: 16px;font-weight: 600;">审核记录</p>
<div class=""> <!--费用报销 审核记录-->
<div class="check_jilu">
<table class="table"> <table class="table">
<tbody class="text-left" id="check_list"> <tbody class="text-left" id="check_list">
</tbody> </tbody>
</table> </table>
</div> </div>
<!--详情 审核记录-->
<div class="detail_jilu">
</div>
<!--转账截图-->
<div class="pic_jilu">
<p style="font-size: 16px;font-weight: 600;">转账截图</p> <p style="font-size: 16px;font-weight: 600;">转账截图</p>
<div class=""> <div class="">
<table class="table"> <table class="table">
...@@ -286,6 +294,8 @@ ...@@ -286,6 +294,8 @@
</div> </div>
</div> </div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer pic-con2"> <div class="modal-footer pic-con2">
......
...@@ -32,7 +32,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -32,7 +32,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
//点击详情 //点击详情
$(document).on('click','.checkCost',function(e){//点击审核按钮 调整审核页面 $(document).on('click','.checkCost',function(e){//点击审核按钮 调整审核页面
var id = e.target.dataset.id; var id = e.target.dataset.id;
$(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&is_self=2') $(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&is_self=1')
}); });
//费用类型切换 //费用类型切换
$("#cost_type").change(function() { $("#cost_type").change(function() {
......
...@@ -8,9 +8,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding ...@@ -8,9 +8,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
isAdd: 0, isAdd: 0,
agent_id_phone:'', agent_id_phone:'',
store_id:'', store_id:'',
check_time:'',
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template+template1); $(document.body).append(template+template1);
cost.check_time = getUrlParam('time');//获取确认时间
$('.check_time').val(cost.check_time);
cost.getList(1); cost.getList(1);
cost.event(); cost.event();
}, },
...@@ -27,6 +30,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding ...@@ -27,6 +30,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
$(document).on('click','#reset',function(e){ $(document).on('click','#reset',function(e){
that.resetAll(); that.resetAll();
}); });
//核对无误
$(document).on('click','#hedui',function(e){
that.checkAll();
});
//获取办公室详情(点击编辑) //获取办公室详情(点击编辑)
$(document).on('click','.edit_office',function(e){ $(document).on('click','.edit_office',function(e){
cost.id = $(this).attr('data-id') cost.id = $(this).attr('data-id')
...@@ -129,6 +138,29 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding ...@@ -129,6 +138,29 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
} }
}) })
}, },
//核对无误
checkAll: function() {
var params = {};
params.type = 4;
params.setting_date = cost.check_time + '-01';
$.ajax({
url: '/index/checkCostParameter',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert(data.msg)
}else{
alert(data.msg)
}
}
})
},
//编辑办公室 //编辑办公室
editOffice: function() { editOffice: function() {
var params = {}; var params = {};
......
...@@ -296,11 +296,80 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -296,11 +296,80 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}else{ }else{
$('.is_hide_pic').hide(); $('.is_hide_pic').hide();
} }
//is_self == 2 隐藏 保存 审核按钮 //is_self == 1 隐藏 保存 审核按钮
if(cost.is_self == 2 || cost.main_index == 5){ if(cost.is_self == 1 || cost.main_index == 5){
$('.is_hide_details').hide(); $('.is_hide_details').hide();
} }
//区分明细详情 和 报销详情 字段显示
//费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。
if(cost.is_self == 1){//明细详情
if(data.data.type == 1){//办公室
$('.pic_jilu').show();//转账图片
$('.check_jilu').show();//报销审核记录
$('.detail_jilu').hide();//明细审核记录
$('.is_hide_kaoqin').show();//考勤
$('kaoqin_con').html('当月门店所在办公室考勤:');
$('.is_hide_bank').show();//收款账户
$('.is_hide_costID').show();//费用id
}else if(data.data.type == 2 ){//上海总部
$('.pic_jilu').hide();//转账图片
$('.check_jilu').hide();//报销审核记录
$('.detail_jilu').show();//明细审核记录
$('.is_hide_kaoqin').show();//考勤
$('kaoqin_con').html('当月公司考勤总人数:');
$('.is_hide_bank').hide();//收款账户
$('.is_hide_costID').hide();//费用id
}else if(data.data.type == 3){//分部成本
$('.pic_jilu').hide();//转账图片
$('.check_jilu').hide();//报销审核记录
$('.detail_jilu').show();//明细审核记录
$('.is_hide_kaoqin').show();//考勤
$('kaoqin_con').html('当月门店所在城市考勤:');
$('.is_hide_bank').hide();//收款账户
$('.is_hide_costID').hide();//费用id
}else if(data.data.type == 4){//同联基金
$('.pic_jilu').hide();//转账图片
$('.check_jilu').hide();//报销审核记录
$('.detail_jilu').show();//明细审核记录
$('.is_hide_kaoqin').show();//考勤
$('kaoqin_con').html('当月门店考勤人数:');
$('.is_hide_bank').hide();//收款账户
$('.is_hide_costID').hide();//费用id
}else if(data.data.type == 5){//门店单独成本
$('.pic_jilu').show();//转账图片
$('.check_jilu').show();//报销审核记录
$('.detail_jilu').hide();//明细审核记录
$('.is_hide_kaoqin').hide();//考勤
$('.is_hide_bank').show();//收款账户
$('.is_hide_costID').show();//费用id
}
}else{//报销详情
$('.pic_jilu').show();//转账图片
$('.check_jilu').show();//报销审核记录
$('.detail_jilu').hide();//明细审核记录
$('.is_hide_bank').show();//收款账户
$('.is_hide_costID').show();//费用id
if(data.data.type == 1){
$('.is_hide_kaoqin').show();//考勤
$('kaoqin_con').html('当月门店所在办公室考勤:');
}else{
$('.is_hide_kaoqin').hide();//考勤
}
}
} else { } else {
alert(data.msg); alert(data.msg);
......
...@@ -27,16 +27,40 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -27,16 +27,40 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
$(document).on('click','#search',function(e){ $(document).on('click','#search',function(e){
that.getList(1); that.getList(1);
}); });
//重置搜索条件 //重置搜索条件
$(document).on('click','#reset',function(e){ $(document).on('click','#reset',function(e){
that.resetAll(); that.resetAll();
}); });
//导出报表 //点击考勤
$(document).on('click','#export',function(e){ $(document).on('click','#kaoqin',function(e){
that.exportExcel(); var time = $('#comit_time_start').val();
if(time){
window.open('/index/attendanceList?time=' + time)
}else{
alert('请选择时间')
}
});
//点击办公室
$(document).on('click','#officeCheck',function(e){
var time = $('#comit_time_start').val();
if(time){
window.open('/index/costOffice?time=' + time)
}else{
alert('请选择时间')
}
});
//点击成本参数
$(document).on('click','#chengben',function(e){
var time = $('#comit_time_start').val();
if(time){
window.open('/index/costParameters?time=' + time)
}else{
alert('请选择时间')
}
}); });
//二级联动 //二级联动
that.getDistrict(function() { that.getDistrict(function() {
_doc.on('input', '#commit_home', function() { _doc.on('input', '#commit_home', function() {
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
<td>[%= it[item]['create_time'] %]</td> <td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['agent_name'] %]</td> <td>[%= it[item]['agent_name'] %]</td>
<td>[%= it[item]['total_fee'] %]</td> <td>[%= it[item]['total_fee'] %]</td>
[% if(it[item]['type'] == 1) { %] <!--费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。-->
[% if(it[item]['type'] == 2) { %]
<td>总部成本</td> <td>总部成本</td>
[% }else if (it[item]['type'] == 2) { %]
<td>分部成本</td>
[% }else if (it[item]['type'] == 3) { %] [% }else if (it[item]['type'] == 3) { %]
<td>分部成本</td>
[% }else if (it[item]['type'] == 5) { %]
<td>门店独有成本</td> <td>门店独有成本</td>
[% }else if (it[item]['type'] == 0) { %] [% }else if (it[item]['type'] == 1) { %]
<td>办公室成本</td> <td>办公室成本</td>
[% } else { %] [% } else { %]
<td>--</td> <td>--</td>
......
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