|
|
@@ -55,7 +55,7 @@ class ApplyClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
//更新申请 shish 2021.2.27
|
|
|
- public static function updateRetailApply($data)
|
|
|
+ public static function updateRetail($data)
|
|
|
{
|
|
|
$customId = $data['customId'] ?? 0;
|
|
|
$custom = CustomClass::getById($customId);
|
|
|
@@ -72,42 +72,25 @@ class ApplyClass extends BaseClass
|
|
|
$applyMobile = $currentApply['mobile'] ?? '';
|
|
|
$mobile = $data['mobile'] ?? '';
|
|
|
if ($mobile != $applyMobile) {
|
|
|
- noticeUtil::push("供货商的客户补充开店材料出错 customId:{$customId}", '15280215347');
|
|
|
+ noticeUtil::push("二次申请开店使用的手机号不一样 customId:{$customId}", '15280215347');
|
|
|
util::fail('手机号错误,请联系管理员', '15280215347');
|
|
|
}
|
|
|
-
|
|
|
+ $data['status'] = ApplyClass::STATUS_CHECKING;
|
|
|
ApplyClass::updateById($currentApplyId, $data);
|
|
|
- ApplyExtendClass::updateByCondition(['applyId' => $currentApplyId], $data);
|
|
|
|
|
|
+ $licenseNo = $data['licenseNo'] ?? '';
|
|
|
+ $mobile = $data['mobile'] ?? '';
|
|
|
+ $extData = [
|
|
|
+ 'licenseNo' => $licenseNo,
|
|
|
+ 'mobile' => $mobile,
|
|
|
+ ];
|
|
|
+ ApplyExtendClass::updateByCondition(['applyId' => $currentApplyId], $extData);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
//新增申请开店 shish 2021.2.27
|
|
|
- public static function addRetailApply($data, $system = false)
|
|
|
+ public static function addRetail($data)
|
|
|
{
|
|
|
- $licenseNo = $data['licenseNo'] ?? '';
|
|
|
- $mobile = $data['mobile'] ?? '';
|
|
|
-
|
|
|
- $certType = $data['certType'] ?? ApplyClass::CERT_TYPE_LICENSE;
|
|
|
- if ($system == false) {
|
|
|
- //查询客户提交的证件
|
|
|
- $has = ApplyClass::getByCondition(['certType' => $certType, 'licenseNo' => $licenseNo]);
|
|
|
- if (!empty($has)) {
|
|
|
- util::fail('您已申请过了');
|
|
|
- }
|
|
|
- } else {
|
|
|
- //导入纯彩花艺已有客户判断
|
|
|
- $has = ApplyClass::getByCondition(['certType' => $certType, 'licenseNo' => $licenseNo, 'mobile' => $mobile]);
|
|
|
- if (!empty($has)) {
|
|
|
- noticeUtil::push("客户 $mobile 已经申请", '15280215347');
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $from = $data['from'] ?? 0;
|
|
|
- if (in_array($from, [ApplyClass::FROM_GHS, ApplyClass::FROM_RETAIL]) == false) {
|
|
|
- util::fail('申请没有填写来源');
|
|
|
- }
|
|
|
$prefix = $data['province'] == $data['city'] ? $data['province'] : $data['province'] . $data['city'];
|
|
|
$dist = $data['dist'] ?? '';
|
|
|
$floor = $data['floor'] ?? '';
|
|
|
@@ -116,7 +99,7 @@ class ApplyClass extends BaseClass
|
|
|
$data['style'] = MerchantClass::STYLE_RETAIL;
|
|
|
$respond = self::addApply($data);
|
|
|
$mobile = $data['mobile'];
|
|
|
- $text = "有零售商资料提交,客户(' . $mobile . ')已提交资料,";
|
|
|
+ $text = "有零售商资料提交,客户({$mobile})已提交资料,";
|
|
|
if (isset($data['introSjName']) && !empty($data['introSjName'])) {
|
|
|
$text .= "介绍人:{$data['introSjName']},";
|
|
|
}
|