|
|
|
@ -115,9 +115,9 @@
|
|
|
|
|
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
|
|
|
|
<a class="butn" id="agreeApply">审批通过</a>
|
|
|
|
|
<a class="butn" id="refuseApply" style="background-color: red;">审批拒绝</a>
|
|
|
|
|
<a class="butn" id="Invoiced">已开票</a>
|
|
|
|
|
<a class="butn" id="Received">已到账</a>
|
|
|
|
|
|
|
|
|
|
<a class="butn" id="upstream">已开票</a>
|
|
|
|
|
<a class="butn" id="upstream">已到账</a>
|
|
|
|
|
<a class="butn" id="upstream" style="width: 150px;background-color:green;">重算对账金额</a>
|
|
|
|
|
|
|
|
|
|
<a class="butn" id="export">批量导出</a>
|
|
|
|
@ -264,6 +264,7 @@
|
|
|
|
|
$("body").append(iframeExcel)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//审批通过
|
|
|
|
|
$("#agreeApply").on("click",function(){
|
|
|
|
|
var flag = false;
|
|
|
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
|
|
|
@ -278,7 +279,7 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(flag){
|
|
|
|
|
layer.confirm("审批成功仅会对 已申请发票结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
layer.confirm("审批成功仅会对 [已申请发票] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
_doAgreeApply();
|
|
|
|
|
layer.close(index);
|
|
|
|
|
});
|
|
|
|
@ -287,7 +288,144 @@
|
|
|
|
|
}
|
|
|
|
|
function _doAgreeApply(){
|
|
|
|
|
//执行
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('agreeApply')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//审批拒绝
|
|
|
|
|
$("#refuseApply").on("click",function(){
|
|
|
|
|
var flag = false;
|
|
|
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
|
|
|
|
if($(elem).data("status") != 1){
|
|
|
|
|
flag = true;
|
|
|
|
|
}else{
|
|
|
|
|
return $(elem).val();
|
|
|
|
|
}
|
|
|
|
|
}).get().join(",");
|
|
|
|
|
if(text == ''){
|
|
|
|
|
layer.msg("<font style='color:white'>" + '无需要审核拒绝的结算单' + "</font>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(flag){
|
|
|
|
|
layer.confirm("审批拒绝仅会对 [已申请发票] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
_doRefuseApply();
|
|
|
|
|
layer.close(index);
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
_doRefuseApply();
|
|
|
|
|
}
|
|
|
|
|
function _doRefuseApply(){
|
|
|
|
|
//执行
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('refuseApply')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//已开票
|
|
|
|
|
$("#Invoiced").on("click",function(){
|
|
|
|
|
var flag = false;
|
|
|
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
|
|
|
|
if($(elem).data("status") != 2){
|
|
|
|
|
flag = true;
|
|
|
|
|
}else{
|
|
|
|
|
return $(elem).val();
|
|
|
|
|
}
|
|
|
|
|
}).get().join(",");
|
|
|
|
|
if(text == ''){
|
|
|
|
|
layer.msg("<font style='color:white'>" + '无需要进行已开票的结算单' + "</font>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(flag){
|
|
|
|
|
layer.confirm("已开票仅会对 [审核同意] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
_doInvoiced();
|
|
|
|
|
layer.close(index);
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
_doInvoiced();
|
|
|
|
|
}
|
|
|
|
|
function _doInvoiced(){
|
|
|
|
|
//执行
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('Invoiced')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//已到账
|
|
|
|
|
$("#Received").on("click",function(){
|
|
|
|
|
var flag = false;
|
|
|
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
|
|
|
|
if($(elem).data("status") == 3 || $(elem).data("status") == 4){
|
|
|
|
|
return $(elem).val();
|
|
|
|
|
}else{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
}).get().join(",");
|
|
|
|
|
if(text == ''){
|
|
|
|
|
layer.msg("<font style='color:white'>" + '无需要进行已到账的结算单' + "</font>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(flag){
|
|
|
|
|
layer.confirm("已到账仅会对 [已开票]或[已上传凭证] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
|
|
|
|
|
_doReceived();
|
|
|
|
|
layer.close(index);
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
_doReceived();
|
|
|
|
|
}
|
|
|
|
|
function _doReceived(){
|
|
|
|
|
//执行
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('Received')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {ids:text},
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status==1){
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -509,6 +647,8 @@
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".statement_del").click(function () {
|
|
|
|
|
var del = $(this).data();
|
|
|
|
|
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
|
|
|
|