|
|
@ -609,14 +609,13 @@ class Message extends ApiCommon
|
|
|
|
unset($param['type']);
|
|
|
|
unset($param['type']);
|
|
|
|
unset($param['isSub']);
|
|
|
|
unset($param['isSub']);
|
|
|
|
$businessModel = model('Business');
|
|
|
|
$businessModel = model('Business');
|
|
|
|
$param['owner_user_id'] = $userInfo['id'];
|
|
|
|
// $param['owner_user_id'] = $userInfo['id'];
|
|
|
|
if ($isSub) {
|
|
|
|
if ($isSub) {
|
|
|
|
$param['owner_user_id'] = array('in', getSubUserId(false));
|
|
|
|
$param['owner_user_id'] = array('in', getSubUserId(false));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$businessIdArray = db('crm_dealt_relation')->where(['types' => ['eq', 'crm_business_new'], 'user_id' => ['eq', $param['user_id']]])->column('types_id');
|
|
|
|
$businessIdArray = db('crm_dealt_relation')->where(['types' => ['eq', 'crm_business_new'], 'user_id' => ['eq', $userInfo['id']]])->column('types_id');
|
|
|
|
$param['businessIdArray'] = !empty($businessIdArray) ? $businessIdArray : -1;
|
|
|
|
$param['businessIdArray'] = !empty($businessIdArray) ? $businessIdArray : -1;
|
|
|
|
$data = $businessModel->getDataList($param);
|
|
|
|
$data = $businessModel->getDataList($param);
|
|
|
|
// p($contractModel->getLastSql());
|
|
|
|
|
|
|
|
if ($types == 'list') {
|
|
|
|
if ($types == 'list') {
|
|
|
|
return resultArray(['data' => $data]);
|
|
|
|
return resultArray(['data' => $data]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -776,7 +775,7 @@ class Message extends ApiCommon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# 处理待审核合同、回款、发票
|
|
|
|
# 处理待审核合同、回款、发票
|
|
|
|
if (in_array($type, ['checkContract', 'checkReceivables', 'checkInvoice', 'checkBusiness','checkCustomerCheck','new_business'])) {
|
|
|
|
if (in_array($type, ['checkContract', 'checkReceivables', 'checkInvoice', 'checkBusiness', 'checkCustomerCheck', 'new_business'])) {
|
|
|
|
$where['check_status'] = ['lt', '2'];
|
|
|
|
$where['check_status'] = ['lt', '2'];
|
|
|
|
$where['check_user_id'] = ['like', ',%' . $userId . '%,'];
|
|
|
|
$where['check_user_id'] = ['like', ',%' . $userId . '%,'];
|
|
|
|
|
|
|
|
|
|
|
|