Commit 5bab1003 authored by agping's avatar agping

1

parent 134351d7
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="costOffice" />
<style>
#check_time{
float: left;
margin: 0 20px;
font-size: 20px;
font-weight: 600;
margin-top: 10px;
}
.modal-body-height {
overflow-y: auto;
height: 432px;
......@@ -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="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>
</td>
......
......@@ -115,7 +115,7 @@
<div class="modal-body modal-body-height pic-con2" style="overflow: hidden;">
<form class="">
<div class="col-xs-12 margain-10">
<div class="col-xs-6">
<div class="col-xs-6 is_hide_costID">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">费用总ID:</span></strong>
<span id="cost_id" class="col-xs-6 ld-Marheight"></span>
......@@ -214,7 +214,7 @@
</span>
</div>
</div>
<div class="col-xs-6">
<div class="col-xs-6 is_hide_bank">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">转账卡号:</span></strong>
<span id="" class="col-xs-6 ld-Marheight">
......@@ -223,7 +223,7 @@
</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="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">收款卡户名:</span></strong>
......@@ -250,9 +250,9 @@
</span>
</div>
</div>
<div class="col-xs-6">
<div class="col-xs-6 is_hide_kaoqin">
<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">
10
</span>
......@@ -269,21 +269,31 @@
</table>
</div>
<p style="font-size: 16px;font-weight: 600;">审核记录</p>
<div class="">
<!--费用报销 审核记录-->
<div class="check_jilu">
<table class="table">
<tbody class="text-left" id="check_list">
</tbody>
</table>
</div>
<p style="font-size: 16px;font-weight: 600;">转账截图</p>
<div class="">
<table class="table">
<tbody class="text-left" id="checkPic_list">
</tbody>
</table>
<!--详情 审核记录-->
<div class="detail_jilu">
</div>
<!--转账截图-->
<div class="pic_jilu">
<p style="font-size: 16px;font-weight: 600;">转账截图</p>
<div class="">
<table class="table">
<tbody class="text-left" id="checkPic_list">
</tbody>
</table>
</div>
</div>
</div>
</form>
......
......@@ -32,7 +32,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
//点击详情
$(document).on('click','.checkCost',function(e){//点击审核按钮 调整审核页面
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() {
......
......@@ -8,9 +8,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
isAdd: 0,
agent_id_phone:'',
store_id:'',
check_time:'',
init: function() {
//初始化dot
$(document.body).append(template+template1);
cost.check_time = getUrlParam('time');//获取确认时间
$('.check_time').val(cost.check_time);
cost.getList(1);
cost.event();
},
......@@ -27,6 +30,12 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
$(document).on('click','#reset',function(e){
that.resetAll();
});
//核对无误
$(document).on('click','#hedui',function(e){
that.checkAll();
});
//获取办公室详情(点击编辑)
$(document).on('click','.edit_office',function(e){
cost.id = $(this).attr('data-id')
......@@ -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() {
var params = {};
......
......@@ -296,11 +296,80 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}else{
$('.is_hide_pic').hide();
}
//is_self == 2 隐藏 保存 审核按钮
if(cost.is_self == 2 || cost.main_index == 5){
//is_self == 1 隐藏 保存 审核按钮
if(cost.is_self == 1 || cost.main_index == 5){
$('.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 {
alert(data.msg);
......
......@@ -27,16 +27,40 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
$(document).on('click','#search',function(e){
that.getList(1);
});
//重置搜索条件
$(document).on('click','#reset',function(e){
that.resetAll();
});
//导出报表
$(document).on('click','#export',function(e){
that.exportExcel();
//点击考勤
$(document).on('click','#kaoqin',function(e){
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() {
_doc.on('input', '#commit_home', function() {
......
......@@ -8,13 +8,14 @@
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['agent_name'] %]</td>
<td>[%= it[item]['total_fee'] %]</td>
[% if(it[item]['type'] == 1) { %]
<!--费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。-->
[% if(it[item]['type'] == 2) { %]
<td>总部成本</td>
[% }else if (it[item]['type'] == 2) { %]
<td>分部成本</td>
[% }else if (it[item]['type'] == 3) { %]
<td>分部成本</td>
[% }else if (it[item]['type'] == 5) { %]
<td>门店独有成本</td>
[% }else if (it[item]['type'] == 0) { %]
[% }else if (it[item]['type'] == 1) { %]
<td>办公室成本</td>
[% } else { %]
<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