Commit 34524d2a authored by agping's avatar agping

按钮显示

parent 44fec356
......@@ -125,7 +125,7 @@
<button type="button" class="choose_btn btn btn-default choose_btn3" data-value="/index/getCostListFour/3">财务二审通过</button>
<button type="button" class="choose_btn btn btn-default choose_btn4" data-value="/index/getCostListFive/4">财务三审通过</button>
<button type="button" class="choose_btn btn btn-default choose_btn5" data-value="/index/getCostListOne/0">未审核</button>
<button type="button" class="choose_btn btn btn-default choose_btn6" data-value="/index/getCostList">全部</button>
<button type="button" class="choose_btn btn btn-default choose_btn6 all_btn" data-value="/index/getCostList">全部</button>
</div>
<div class="pull-right">
<ul class="bread_btn">
......
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="publicCostDetails" />
<style>
.is_hide_details{
display: none;
}
div{
outline:none!important;
}
......
......@@ -282,7 +282,7 @@ define(['doT', 'text!temp/cost_check_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=0')
$(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&is_self=0&main_index=' + cost.main_index)
});
},
......@@ -579,6 +579,11 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var temp = document.getElementById('cost_check_template_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list));
if(cost.main_index == 5){
$('.checkCost').html('详情');
}else{
$('.checkCost').html('审核');
}
/*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList);
} else {
......
......@@ -9,7 +9,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
site_id: '',
office_id:'',
store_id:'',
main_index:'',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -19,13 +19,14 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var that = cost;
var _doc = $(document);
//从连接拿报销id
cost.id = getUrlParam('cost_id');
cost.is_self = getUrlParam('is_self');
cost.getDetails(cost.id , cost.is_self);//获取详情
//初始化
cost.id = getUrlParam('cost_id');//费用报销id
cost.is_self = getUrlParam('is_self');//费用报销0 门店明细1
cost.main_index = getUrlParam('main_index');//费用报销审核 全部 5
//初始化 显示隐藏详情tab切换
$('.pic-con2').show();
$('.pic-con1').hide();
cost.getDetails(cost.id , cost.is_self);//获取详情
//审核通过
$(document).on('click','#pass_ok_btn',function(e){
that.checkCost();
......@@ -294,10 +295,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$('.is_hide_pic').show();
}else{
$('.is_hide_pic').hide();
}
//is_self == 2 隐藏 保存 审核按钮
if(cost.is_self == 2){
if(cost.is_self == 2 || cost.main_index == 5){
$('.is_hide_details').hide();
}
......
......@@ -13,7 +13,7 @@
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['assume_fee'] %]</td>
<td>
<a class="btn1 btn-success checkCost" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-status='[%= it[item]["status"] %]'>审核</a>
<a class="btn1 btn-success checkCost" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-status='[%= it[item]["status"] %]'>详情</a>
</td>
</tr>
[% } %]
......
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