|
|
|
@ -218,6 +218,96 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
//获取基本信息
|
|
|
|
|
$infolist = SM("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select();
|
|
|
|
|
//获取母单
|
|
|
|
|
$pool_info = SM("company_statement_pool","tab_")
|
|
|
|
|
->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type,statement_begin_time,statement_end_time,verify_log')->where("id={$id}")->find();
|
|
|
|
|
if(!empty($pool_info['create_lack_ids'])){
|
|
|
|
|
$l_ids = $pool_info['create_lack_ids'];
|
|
|
|
|
$lack_info = SM("company_lack_statement_info","tab_")->field("*,'0' as st")->where("id in ({$l_ids})")->select();
|
|
|
|
|
$infolist =array_merge($infolist,$lack_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($is_export) {
|
|
|
|
|
$symbol = "\n";
|
|
|
|
|
} else {
|
|
|
|
|
$symbol = "<br>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$pool_info['verify_log'] = json_decode($pool_info['verify_log'], true);
|
|
|
|
|
|
|
|
|
|
if(isset($pool_info['verify_log']['firstverify_user'])){
|
|
|
|
|
if($pool_info['verify_status'] == -3){
|
|
|
|
|
$ts = "初审拒绝";
|
|
|
|
|
}else{
|
|
|
|
|
$ts = "初审通过";
|
|
|
|
|
}
|
|
|
|
|
$pool_info["firstverify"]= "{$ts}({$pool_info['verify_log']['firstverify_user']}) {$symbol} {$pool_info['verify_log']['firstverify_time']}";
|
|
|
|
|
$ts = '';
|
|
|
|
|
}else{
|
|
|
|
|
$pool_info["firstverify"] = '--';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($pool_info['verify_log']['verify_user'])){
|
|
|
|
|
if($pool_info['verify_status'] == -1){
|
|
|
|
|
$ts = "审核拒绝";
|
|
|
|
|
}else{
|
|
|
|
|
$ts = "审核通过";
|
|
|
|
|
}
|
|
|
|
|
$pool_info["verify"]= "{$ts}({$pool_info['verify_log']['verify_user']}) {$symbol} {$pool_info['verify_log']['verify_time']}";
|
|
|
|
|
}else{
|
|
|
|
|
$pool_info["verify"] = '--';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(isset($pool_info['verify_log']['payment_user'])){
|
|
|
|
|
if($pool_info['verify_status'] == -2){
|
|
|
|
|
$ts = "拒绝打款";
|
|
|
|
|
}elseif($pool_info['verify_status'] == 1){
|
|
|
|
|
$ts = "打款信息确认";
|
|
|
|
|
}elseif($pool_info['verify_status'] == 2){
|
|
|
|
|
$ts = "待打款";
|
|
|
|
|
}elseif($pool_info['verify_status'] == 3){
|
|
|
|
|
$ts = "打款中";
|
|
|
|
|
}elseif($pool_info['verify_status'] == 4){
|
|
|
|
|
$ts="打款成功";
|
|
|
|
|
}elseif($pool_info['verify_status'] == 5){
|
|
|
|
|
$ts="无需打款";
|
|
|
|
|
}
|
|
|
|
|
$pool_info["payment"]= "{$ts}({$pool_info['verify_log']['payment_user']}){$symbol} {$pool_info['verify_log']['payment_time']}";
|
|
|
|
|
}else{
|
|
|
|
|
$pool_info["payment"] = '--';
|
|
|
|
|
}
|
|
|
|
|
// dump($pool_info);die();
|
|
|
|
|
$statement_num = $pool_info['statement_num'];
|
|
|
|
|
$this->assign("pool_data",$pool_info);
|
|
|
|
|
$this->assign("title",$statement_num);
|
|
|
|
|
$this->assign("pool_status",$pool_info['verify_status']);
|
|
|
|
|
$this->assign("is_payment",$pool_info['is_payment']);
|
|
|
|
|
if($infolist[0]['company_type'] == 3){
|
|
|
|
|
//上游
|
|
|
|
|
$this->viewCpPool($infolist,$is_export);
|
|
|
|
|
}elseif($infolist[0]['company_type'] == 1){
|
|
|
|
|
//下游公司
|
|
|
|
|
$this->viewPcPool($infolist,$is_export);
|
|
|
|
|
}else{
|
|
|
|
|
$this->viewPuPool($infolist,$is_export,$pool_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查看
|
|
|
|
|
public function viewUnPaymentPool()
|
|
|
|
|
{
|
|
|
|
|
if(!isset($_REQUEST['id'])){
|
|
|
|
|
$this->error('参数错误');
|
|
|
|
|
}
|
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
|
$is_export= false;
|
|
|
|
|
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
|
|
|
|
|
$is_export = true;
|
|
|
|
|
}
|
|
|
|
|
//获取基本信息
|
|
|
|
|
$infolist = SM("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}' and pay_status!=1")->select();
|
|
|
|
|
//获取母单
|
|
|
|
|
$pool_info = SM("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type,statement_begin_time,statement_end_time')->where("id={$id}")->find();
|
|
|
|
|
if(!empty($pool_info['create_lack_ids'])){
|
|
|
|
|
$l_ids = $pool_info['create_lack_ids'];
|
|
|
|
@ -225,6 +315,8 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$infolist =array_merge($infolist,$lack_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dump($infolist);die();
|
|
|
|
|
|
|
|
|
|
$statement_num = $pool_info['statement_num'];
|
|
|
|
|
$this->assign("title",$statement_num);
|
|
|
|
|
$this->assign("pool_status",$pool_info['verify_status']);
|
|
|
|
@ -241,6 +333,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function editPool() {
|
|
|
|
|
if(!isset($_REQUEST['id'])){
|
|
|
|
|
$this->error('参数错误');
|
|
|
|
|