Commit 34524d2a authored by agping's avatar agping

按钮显示

parent 44fec356
...@@ -125,7 +125,7 @@ ...@@ -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_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_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_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>
<div class="pull-right"> <div class="pull-right">
<ul class="bread_btn"> <ul class="bread_btn">
......
{layout name="global/frame_two_tpl" /} {layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="publicCostDetails" /> <input type="hidden" class="page-load" id="publicCostDetails" />
<style> <style>
.is_hide_details{
display: none;
}
div{ div{
outline:none!important; outline:none!important;
} }
......
...@@ -282,7 +282,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -282,7 +282,7 @@ define(['doT', 'text!temp/cost_check_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=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', ' ...@@ -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 temp = document.getElementById('cost_check_template_tpl').innerHTML;
var doTtmpl = doT.template(temp); var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list)); $("#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); add_page(data.data.total, no, that.pageSize, that.getList);
} else { } else {
......
...@@ -9,7 +9,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -9,7 +9,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
site_id: '', site_id: '',
office_id:'', office_id:'',
store_id:'', store_id:'',
main_index:'',
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -19,13 +19,14 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -19,13 +19,14 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var that = cost; var that = cost;
var _doc = $(document); var _doc = $(document);
//从连接拿报销id //从连接拿报销id
cost.id = getUrlParam('cost_id'); cost.id = getUrlParam('cost_id');//费用报销id
cost.is_self = getUrlParam('is_self'); cost.is_self = getUrlParam('is_self');//费用报销0 门店明细1
cost.getDetails(cost.id , cost.is_self);//获取详情 cost.main_index = getUrlParam('main_index');//费用报销审核 全部 5
//初始化 显示隐藏详情tab切换
//初始化
$('.pic-con2').show(); $('.pic-con2').show();
$('.pic-con1').hide(); $('.pic-con1').hide();
cost.getDetails(cost.id , cost.is_self);//获取详情
//审核通过 //审核通过
$(document).on('click','#pass_ok_btn',function(e){ $(document).on('click','#pass_ok_btn',function(e){
that.checkCost(); that.checkCost();
...@@ -294,10 +295,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -294,10 +295,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$('.is_hide_pic').show(); $('.is_hide_pic').show();
}else{ }else{
$('.is_hide_pic').hide(); $('.is_hide_pic').hide();
} }
//is_self == 2 隐藏 保存 审核按钮 //is_self == 2 隐藏 保存 审核按钮
if(cost.is_self == 2){ if(cost.is_self == 2 || cost.main_index == 5){
$('.is_hide_details').hide(); $('.is_hide_details').hide();
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<td>[%= it[item]['store_name'] %]</td> <td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['assume_fee'] %]</td> <td>[%= it[item]['assume_fee'] %]</td>
<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> </td>
</tr> </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