|
|
|
@ -1022,6 +1022,13 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
|
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
|
|
|
|
|
|
|
|
|
|
if ($this->checkStatementPay($ids)) {
|
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
|
'status' => 0,
|
|
|
|
|
"info"=>"已有打款的详单,审批撤回失败"
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach($dbres as $k=>&$v){
|
|
|
|
|
$VerifyStatus = $v['verify_status'];
|
|
|
|
|
if(!in_array($VerifyStatus,[-1,1,2])) continue;
|
|
|
|
@ -1044,6 +1051,16 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function checkStatementPay($ids) {
|
|
|
|
|
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
|
|
|
|
|
foreach ($dbres as $k=>$v) {
|
|
|
|
|
if ($v['verify_status'] == 3) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function delPayInfo($id) {
|
|
|
|
|
|
|
|
|
|
$company_statement_info = M("company_statement_info","tab_")->field("id")->where("pool_id={$id}")->select();
|
|
|
|
|