Commit 1c62df0d authored by agping's avatar agping

审核

parent 15a16892
...@@ -276,10 +276,10 @@ ...@@ -276,10 +276,10 @@
</form> </form>
</div> </div>
<div class="modal-footer pic-con2"> <div class="modal-footer pic-con2">
<button type="button btn2" class="btn btn-primary" id="savePayBtn" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary" id="save_cost" data-dismiss="modal">
保存 保存
</button> </button>
<button type="button btn2" class="btn btn-primary" id="savePayBtn" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary" id="pass_check" data-dismiss="modal">
审核通过 审核通过
</button> </button>
</div> </div>
......
...@@ -6,7 +6,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -6,7 +6,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
/*每页显示多少条*/ /*每页显示多少条*/
id: '', id: '',
url: '', url: '',
checkUrl: '',//审核url
agent_id_phone:'', agent_id_phone:'',
main_index:0,
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -57,8 +59,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -57,8 +59,10 @@ 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');
cost.url = e.target.dataset.value; cost.url = e.target.dataset.value;
cost.main_index = $(this).index();
cost.getList(1); cost.getList(1);
}); });
//搜索 //搜索
$(document).on('click','#search',function(e){ $(document).on('click','#search',function(e){
that.getList(1); that.getList(1);
...@@ -95,9 +99,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -95,9 +99,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$('.choose_store').show(); $('.choose_store').show();
}; };
}); });
//获取报销id //获取报销id
$(document).on('click','.is_del',function(e){ $(document).on('click','.is_del',function(e){
...@@ -181,7 +182,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -181,7 +182,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}); });
$(document).on('click','.add-pic',function(e){ $(document).on('click','.add-pic',function(e){
var id = e.target.dataset.id; var id = e.target.dataset.id;
$(".publicCostDetails").attr('src','/index/publicCostDetails') $(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&cost_status=' + cost.main_index)
}); });
}, },
...@@ -308,7 +309,17 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -308,7 +309,17 @@ 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.url == '/index/getCostList'){//全部
$('.add-pic').hide();
$('.is_del').hide();
}else if(cost.url == '/index/getCostListFive/4'){//三审
$('.add-pic').show();
$('.is_del').hide();
}else{
$('.add-pic').show();
$('.is_del').show();
}
/*分页代码*/ /*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList); add_page(data.data.total, no, that.pageSize, that.getList);
} else { } else {
......
...@@ -4,15 +4,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -4,15 +4,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
/*第几页*/ /*第几页*/
pageSize: 10, pageSize: 10,
/*每页显示多少条*/ /*每页显示多少条*/
checkUrl: '',
id: '', id: '',
house_id: '',
house_fatherid: '',
collection_del_id:'',
listData :"",
moneyTotal : "" ,
agent_id_phone : '',
check_status : 1 ,
deleteRefundId:'',
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -22,6 +15,18 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -22,6 +15,18 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
event: function() { event: function() {
var that = cost; var that = cost;
var _doc = $(document); var _doc = $(document);
//从连接拿数据
cost.id = getUrlParam('cost_id');
var status = getUrlParam('cost_status');
if(status == 4){
cost.checkUrl = '/index/checkCostTwo/1'
}else if(status == 0){
cost.checkUrl = '/index/checkCostThree/2'
}else if(status == 1){
cost.checkUrl = '/index/checkCostFour/3'
}else if(status == 2){
cost.checkUrl = '/index/checkCostFive/4'
}
//初始化 //初始化
$('.pic-con2').show(); $('.pic-con2').show();
$('.pic-con1').hide(); $('.pic-con1').hide();
...@@ -38,6 +43,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -38,6 +43,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$(document).on('click','#export',function(e){ $(document).on('click','#export',function(e){
that.exportExcel(); that.exportExcel();
}); });
//审核通过
$(document).on('click','#pass_check',function(e){
that.checkCost();
});
//新增报销 上传图片 //新增报销 上传图片
$('#file_input_pic').on('change', function(){ $('#file_input_pic').on('change', function(){
var _this = $(this); var _this = $(this);
...@@ -134,15 +143,14 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -134,15 +143,14 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}) })
}, },
//审核通过
//删除退款 checkCost: function() {
deleteRefund: function(id) {
$.ajax({ $.ajax({
url: '/index/delRefund', url: cost.checkUrl,
type: 'POST', type: 'POST',
async: true, async: true,
data: { data: {
"refund_id": id "id": cost.id
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
......
...@@ -56,9 +56,8 @@ ...@@ -56,9 +56,8 @@
[% } %] [% } %]
<td> <td>
<a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]'>审核</a> <a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-status='[%= it[item]["status"] %]'>审核</a>
<a class="btn1 btn-success is_del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a> <a class="btn1 btn-success is_del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</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