|
|
|
@ -19,13 +19,11 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
"9"=>"上游"
|
|
|
|
|
];
|
|
|
|
|
public $VerifyStatus=[
|
|
|
|
|
"-3"=>"撤销汇总",
|
|
|
|
|
"-2"=>"审核拒绝",
|
|
|
|
|
"-1"=>"管理员审批拒绝",
|
|
|
|
|
"-2"=>"撤销汇总",
|
|
|
|
|
"-1"=>"管理员审核拒绝",
|
|
|
|
|
"0"=>"未审批",
|
|
|
|
|
"1"=>"管理员审核通过",
|
|
|
|
|
"2"=>"审核通过",
|
|
|
|
|
"3"=>"已汇总"
|
|
|
|
|
"2"=>"已汇总"
|
|
|
|
|
];
|
|
|
|
|
public $ConfirmStatus=[
|
|
|
|
|
"0"=>"未发起",
|
|
|
|
@ -161,18 +159,6 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
}else{
|
|
|
|
|
$v["admin"] = '--';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($v['verify_log']['verify_user'])){
|
|
|
|
|
if($v['verify_status'] == -2){
|
|
|
|
|
$ts = "审核拒绝";
|
|
|
|
|
}else{
|
|
|
|
|
$ts = "审核通过";
|
|
|
|
|
}
|
|
|
|
|
$v["verify"]= "{$ts}({$v['verify_log']['verify_user']}) {$symbol} {$v['verify_log']['verify_time']}";
|
|
|
|
|
}else{
|
|
|
|
|
$v["verify"] = '--';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($v['confirm_log']['launch_user'])){
|
|
|
|
|
$ts = "已发起";
|
|
|
|
|
$v["launch"]= "{$ts}({$v['confirm_log']['launch_user']}) {$symbol} {$v['confirm_log']['launch_time']}";
|
|
|
|
@ -187,7 +173,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
$v["confirm"] = '--';
|
|
|
|
|
}
|
|
|
|
|
if(isset($v['verify_log']['pool_user'])){
|
|
|
|
|
if($v['verify_status'] == -3){
|
|
|
|
|
if($v['verify_status'] == -2){
|
|
|
|
|
$ts = "撤销汇总";
|
|
|
|
|
$v["pool"]= "{$ts}({$v['verify_log']['pool_user']}){$symbol} {$v['verify_log']['pool_time']}";
|
|
|
|
|
}else{
|
|
|
|
@ -327,12 +313,6 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
public function adminRefuse(){
|
|
|
|
|
$this->setVerifyStatus(0,-1,"admin");
|
|
|
|
|
}
|
|
|
|
|
public function verifyAgree(){
|
|
|
|
|
$this->setVerifyStatus(1,2,"verify");
|
|
|
|
|
}
|
|
|
|
|
public function verifyRefuse(){
|
|
|
|
|
$this->setVerifyStatus(1,-2,"verify");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function launch(){
|
|
|
|
|
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
|
|
|
@ -504,7 +484,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($dbres as $k=>$v) {
|
|
|
|
|
if($v['verify_status'] != 2) continue;
|
|
|
|
|
if($v['verify_status'] != 1) continue;
|
|
|
|
|
if($v['company_belong'] == 9){
|
|
|
|
|
//上游
|
|
|
|
|
$this->setDf($datas['up'],$v);
|
|
|
|
@ -554,7 +534,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
M("company_lack_statement_info","tab_")->where("id in ({$v['del_lack_ids']})")->save(["is_pool"=>1]);
|
|
|
|
|
}
|
|
|
|
|
//修改结算单规则
|
|
|
|
|
$this->updatePoolVerifyStatus($v['statement_ids'],2,3,"pool",$v['statement_num']);
|
|
|
|
|
$this->updatePoolVerifyStatus($v['statement_ids'],1,2,"pool",$v['statement_num']);
|
|
|
|
|
}
|
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
|
'status' => 1,
|
|
|
|
@ -877,11 +857,10 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
case '-2':
|
|
|
|
|
case '-1':
|
|
|
|
|
case '0':
|
|
|
|
|
case '1':
|
|
|
|
|
case '2':
|
|
|
|
|
$optist = ["viewStatement","editStatement","addRemark","viewRemark","editRemark"];
|
|
|
|
|
break;
|
|
|
|
|
case '3':
|
|
|
|
|
case '1':
|
|
|
|
|
case '2':
|
|
|
|
|
$optist = ["viewStatement","addRemark","viewRemark","editRemark"];
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -911,8 +890,6 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
$mentBtn = [
|
|
|
|
|
"adminAgree"=>"<a class='butn' id='adminAgree'>管理员审核通过</a>",
|
|
|
|
|
"adminRefuse"=>"<a class='butn' id='adminRefuse' style='background-color: red;'>管理员审核拒绝</a>",
|
|
|
|
|
"verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>",
|
|
|
|
|
"verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>",
|
|
|
|
|
"pool"=>"<a class='butn' id='pool'>发起汇总</a>",
|
|
|
|
|
"updateStatement"=>"<a class='butn' id='updateStatement' style='background-color: green;'>重算金额</a>",
|
|
|
|
|
"export"=>"<a class='butn' id='export'>批量导出</a>",
|
|
|
|
|