审核子操作ok

master
chenzhi 5 years ago
parent 16d9813e18
commit fe662ce160

@ -419,6 +419,28 @@ class AggregateFinanceStatementController extends ThinkController
));
}
//撤销审核
public function cancelVerify(){
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$savedata = ["verify_status"=>1,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]];
M("aggregate_statement","tab_")->where("id ='{$id}'")->save($savedata);
$this->ajaxReturn(array(
'status' => 1,
"info"=>"撤销审核成功"
));
}
//撤销申请
public function cancelApply(){
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$savedata = ["verify_status"=>0,"create_time"=>time(),"admin_name"=>$this->admininfo["username"],"admin_id"=>$this->admininfo["uid"]];
M("aggregate_statement","tab_")->where("id ='{$id}'")->save($savedata);
$this->ajaxReturn(array(
'status' => 1,
"info"=>"撤销申请成功"
));
}
//导出
public function export()
{

@ -173,6 +173,9 @@
<a class="confirm editRemark" data-remark="{$data.remark}" data-id="{$data.id}">修改备注</a>
<a class="confirm viewRemark" data-remark="{$data.remark}" data-id="{$data.id}">查看备注</a>
<a class="confirm cancelVerify" data-id="{$data.id}" style="color: red;">撤销审核</a>
<a class="confirm cancelApply" data-id="{$data.id}" style="color: red;">撤销申请</a>
<switch name="data.verify_status">
<case value="-1">
@ -678,8 +681,51 @@
content:"<div style='width: 300;height:auto;margin: auto;padding:20px;'>"+remark+"</div>"
});
});
//撤销审核
$(".cancelVerify").click(function(){
var id = $(this).data("id");
layer.confirm("撤销审核将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){
$.ajax({
type: "POST",
url: "{:U('cancelVerify')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
// layer.close(index);
});
})
//撤销申请
$(".cancelApply").click(function(){
var id = $(this).data("id");
layer.confirm("撤销申请将回退到[未申请开票]状态,点击取消停止操作",{title:false}, function(index){
$.ajax({
type: "POST",
url: "{:U('cancelApply')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
// layer.close(index);
});
})
$(".statement_del").click(function () {
var del = $(this).data();

Loading…
Cancel
Save