|
|
@@ -110,18 +110,10 @@ class ApplyService extends BaseService
|
|
|
}
|
|
|
}
|
|
|
$mobile = $data['mobile'] ?? '';
|
|
|
+ //暂时不需要提供证件
|
|
|
$data['hasLicense'] = 2;
|
|
|
$data['licenseNo'] = $mobile;
|
|
|
-// $licenseNo = $data['licenseNo'] ?? '';
|
|
|
-// if (empty($licenseNo)) {
|
|
|
-// util::fail('请填写营业执照编号');
|
|
|
-// }
|
|
|
-// //查询客户提交的证件
|
|
|
-// $has = ApplyClass::getByCondition(['licenseNo' => $licenseNo]);
|
|
|
-// if (!empty($has)) {
|
|
|
-// util::fail('营业执照已用过');
|
|
|
-// }
|
|
|
- $has = ApplyClass::getByCondition(['mobile' => $mobile]);
|
|
|
+ $has = ApplyClass::getByCondition(['mobile' => $mobile, 'style' => ApplyClass::FROM_RETAIL]);
|
|
|
if (!empty($has)) {
|
|
|
util::fail('手机号已经使用过了');
|
|
|
}
|
|
|
@@ -129,7 +121,7 @@ class ApplyService extends BaseService
|
|
|
if (empty($adminId)) {
|
|
|
util::fail('帐号有问题');
|
|
|
}
|
|
|
- $has = ApplyClass::getByCondition(['adminId' => $adminId]);
|
|
|
+ $has = ApplyClass::getByCondition(['adminId' => $adminId, 'style' => ApplyClass::FROM_RETAIL]);
|
|
|
if (!empty($has)) {
|
|
|
util::fail('您已经申请过');
|
|
|
}
|
|
|
@@ -158,18 +150,18 @@ class ApplyService extends BaseService
|
|
|
if (in_array($from, [ApplyClass::FROM_GHS, ApplyClass::FROM_RETAIL]) == false) {
|
|
|
util::fail('请填写来源');
|
|
|
}
|
|
|
+ //暂时不需要提供证件
|
|
|
$data['hasLicense'] = 2;
|
|
|
$data['licenseNo'] = $mobile;
|
|
|
-// $licenseNo = $data['licenseNo'] ?? '';
|
|
|
-// $has = ApplyClass::getByCondition(['licenseNo' => $licenseNo]);
|
|
|
-// if (!empty($has)) {
|
|
|
-// util::fail('营业执照已用过');
|
|
|
-// }
|
|
|
$adminId = $data['adminId'];
|
|
|
- $has = ApplyClass::getByCondition(['adminId' => $adminId]);
|
|
|
+ $has = ApplyClass::getByCondition(['adminId' => $adminId, 'style' => ApplyClass::FROM_GHS]);
|
|
|
if (!empty($has)) {
|
|
|
util::fail('您已经申请过');
|
|
|
}
|
|
|
+ $has = ApplyClass::getByCondition(['mobile' => $mobile, 'style' => ApplyClass::FROM_GHS]);
|
|
|
+ if (!empty($has)) {
|
|
|
+ util::fail('手机号已经使用过了');
|
|
|
+ }
|
|
|
|
|
|
//引荐的员工
|
|
|
$currentShopAdminId = 0;
|