新增结算删除

master
chenzhi 5 years ago
parent 36d72848bb
commit 79468aa6f2

@ -306,6 +306,16 @@ class CompanyStatementController extends ThinkController
}
}
}
public function delStatement(){
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->where("id in ({$ids}) and verify_status = 0")->delete();
$this->ajaxReturn(array(
'status' => 1,
"info"=>"删除成功"
));
}
//审批通过
public function adminAgree(){
$this->setVerifyStatus(0,1,"admin");
@ -729,9 +739,9 @@ class CompanyStatementController extends ThinkController
}
}
//新增结算
//获取要结算的公司及日期
public function getNewStatement()
{
//获取要结算的公司及日期
$senddata = [
"up_company_id"=>[],
"dowm_company_id"=>[],
@ -745,8 +755,7 @@ class CompanyStatementController extends ThinkController
}else{
$dowm_company_id[]= $v['company_id'];
}
}
;
};
//获取上游
if(empty($up_company_id)){
$upwhere = "1=1";
@ -895,6 +904,7 @@ class CompanyStatementController extends ThinkController
"export"=>"<a class='butn' id='export'>批量导出</a>",
"updateNewStatement"=>"<a class='butn' id='updateNewStatement' style='background-color: green;'>新增结算</a>",
"launch"=>"<a class='butn' id='launch'>对外发起</a>",
"delStatement"=>"<a class='butn' id='delStatement' style='background-color: red;'>批量删除</a>"
];
$resarr = [];
foreach ($mentBtn as $k => $v) {

@ -443,7 +443,7 @@
});
});
$("#adminAgree,#adminRefuse,#verifyAgree,#verifyRefuse,#pool,#updateStatement").on("click",function(){
$("#adminAgree,#adminRefuse,#verifyAgree,#verifyRefuse,#pool,#updateStatement,#delStatement").on("click",function(){
var id = $(this).attr("id");
if(id == "adminAgree"){
var opname = "管理员审批通过";
@ -466,6 +466,12 @@
var opst ="[汇总撤销,管理员审批拒绝,未进行审批,管理员审批通过]";
var status = [-3,-2,-1,0,1];
var confirm = true;
}else if(id=="delStatement"){
var opname = "批量删除";
var opurl = "{:U('delStatement')}";
var opst ="[未进行审批]";
var status = [0];
var confirm = true;
}
var confirm = confirm ? confirm :false;
var flag = false;

Loading…
Cancel
Save