|
|
@ -22,11 +22,12 @@ class SettlementController extends ThinkController
|
|
|
|
if (I('all_status')) {
|
|
|
|
if (I('all_status')) {
|
|
|
|
$map['all_status'] = I('all_status');
|
|
|
|
$map['all_status'] = I('all_status');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$map['_string'] = "1 = 1";
|
|
|
|
if (I('create_time_start')) {
|
|
|
|
if (I('create_time_start')) {
|
|
|
|
$map['_string'] = "create_time >= ".strtotime(I('create_time_start'));
|
|
|
|
$map['_string'] .= " and create_time >= ".strtotime(I('create_time_start'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (I('create_time_end')) {
|
|
|
|
if (I('create_time_end')) {
|
|
|
|
$map['_string'] = "create_time <= ".strtotime(I('create_time_end')) + 86400;
|
|
|
|
$map['_string'] .= " and create_time <= ".(strtotime(I('create_time_end')) + 86400);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$login_uid = is_login();
|
|
|
|
$login_uid = is_login();
|
|
|
|
$list = M('settlement_sheet', 'tab_')->where($map)->page($p, $row)->order("if (audit_user ={$login_uid}, 0,1 ) and status = 3, all_status desc, create_time desc")->select();
|
|
|
|
$list = M('settlement_sheet', 'tab_')->where($map)->page($p, $row)->order("if (audit_user ={$login_uid}, 0,1 ) and status = 3, all_status desc, create_time desc")->select();
|
|
|
@ -434,7 +435,7 @@ class SettlementController extends ThinkController
|
|
|
|
} else if ($arr_index + 1 == sizeof($info['audit_users']) && $info['status'] != 3) {
|
|
|
|
} else if ($arr_index + 1 == sizeof($info['audit_users']) && $info['status'] != 3) {
|
|
|
|
return $this->error('该结算单已经审核完毕', true, true);
|
|
|
|
return $this->error('该结算单已经审核完毕', true, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$is_last = ($info['step'] + 1 >= sizeof($info['audit_users']));
|
|
|
|
$is_last = ($info['step'] >= sizeof($info['audit_users']));
|
|
|
|
$update['remark'] = $remark;
|
|
|
|
$update['remark'] = $remark;
|
|
|
|
$update['status'] = $audit_type == 1 ? ($is_last ? 1 : 3) : 2;
|
|
|
|
$update['status'] = $audit_type == 1 ? ($is_last ? 1 : 3) : 2;
|
|
|
|
$update['step'] = ($audit_type == 1 && !$is_last) ? $info['step'] + 1 : $info['step'];
|
|
|
|
$update['step'] = ($audit_type == 1 && !$is_last) ? $info['step'] + 1 : $info['step'];
|
|
|
|