|
|
@@ -131,34 +131,34 @@ class DeclarationForm extends Model
|
|
|
public function attributeLabels()
|
|
|
{
|
|
|
return [
|
|
|
- 'type' => 'Entry type',//报单类型
|
|
|
- 'decLv' => 'Entry level',//报单级别
|
|
|
+ 'type' => 'Entry type', // 报单类型
|
|
|
+ 'decLv' => 'Entry level', // 报单级别
|
|
|
//'decPv' => '报单PV',
|
|
|
- 'decWay' => 'Entry method',//报单方式
|
|
|
- 'packageId' => 'Entry Package',//报单套餐
|
|
|
- 'goodsId' => 'product ID',//商品ID
|
|
|
- 'goodsNum' => 'Product quantity',//商品数量
|
|
|
+ 'decWay' => 'Entry method', // 报单方式
|
|
|
+ 'packageId' => 'Entry Package', // 报单套餐
|
|
|
+ 'goodsId' => 'product ID', // 商品ID
|
|
|
+ 'goodsNum' => 'Product quantity', // 商品数量
|
|
|
//'addType' => '新增会员方式',
|
|
|
- 'insertUserName' => 'Member user name',//会员用户名
|
|
|
- 'password' => 'Login password',//登陆密码
|
|
|
- 'payPassword' => 'Payment password',//支付密码
|
|
|
- 'realName' => 'Member name',//会员姓名
|
|
|
- 'insertUserIdCard' => 'ID',//身份证号
|
|
|
- 'mobile' => 'phone number',//手机号
|
|
|
- 'openBank' => 'openBank',//开户行
|
|
|
- 'bankAddress' => 'bankAddress',//开户支行
|
|
|
- 'bankNo' => 'bankNo',//银行账号
|
|
|
- 'bankProvince' => 'bankProvince',//银行省份
|
|
|
- 'bankCity' => 'bankCity',//银行城市
|
|
|
- 'bankCounty' => 'bankCounty',//银行县区
|
|
|
- 'conUserName' => 'Instructor user name',//指导老师用户名
|
|
|
- 'recUserName' => 'Developer user name',//开拓人用户名
|
|
|
- 'decUserName' => 'Entry center user name',//报单中心用户名
|
|
|
- 'conUid' => 'Instructor member ID',//指导老师会员ID
|
|
|
- 'recUid' => 'Pioneer member ID',//'开拓人会员ID
|
|
|
- 'location' => 'market',//市场
|
|
|
- 'consignee' => 'consignee',//收货人
|
|
|
- 'acceptMobile' => 'Consignee is phone number',//收货人手机
|
|
|
+ 'insertUserName' => 'Member user name', // 会员用户名
|
|
|
+ 'password' => 'Login password', // 登陆密码
|
|
|
+ 'payPassword' => 'Payment password', // 支付密码
|
|
|
+ 'realName' => 'Member name', // 会员姓名
|
|
|
+ 'insertUserIdCard' => 'ID', // 身份证号
|
|
|
+ 'mobile' => 'Phone Number', // 手机号
|
|
|
+ 'openBank' => 'openBank', // 开户行
|
|
|
+ 'bankAddress' => 'bankAddress', // 开户支行
|
|
|
+ 'bankNo' => 'bankNo', // 银行账号
|
|
|
+ 'bankProvince' => 'bankProvince', // 银行省份
|
|
|
+ 'bankCity' => 'bankCity', // 银行城市
|
|
|
+ 'bankCounty' => 'bankCounty', // 银行县区
|
|
|
+ 'conUserName' => 'Instructor user name', // 指导老师用户名
|
|
|
+ 'recUserName' => 'Developer user name', // 开拓人用户名
|
|
|
+ 'decUserName' => 'Stockist user name', // 报单中心用户名
|
|
|
+ 'conUid' => 'Instructor Member ID', // 指导老师会员ID
|
|
|
+ 'recUid' => 'Sponsor Member ID', // 开拓人会员ID
|
|
|
+ 'location' => 'market', // 市场
|
|
|
+ 'consignee' => 'Recipient', // 收货人
|
|
|
+ 'acceptMobile' => 'Recipient Phone Number', // 收货人手机
|
|
|
'province' => 'Receiving Province',//收货省
|
|
|
'city' => 'Receiving City',//收货市
|
|
|
'county' => 'Receiving area / county',//收货区县
|
|
|
@@ -187,7 +187,7 @@ class DeclarationForm extends Model
|
|
|
*/
|
|
|
public function issetDec($attribute){
|
|
|
if (!$decUser = User::find()->select('ID')->where('IS_DEC=1 AND USER_NAME=:USER_NAME', [':USER_NAME' => $this->decUserName])->asArray()->one()) {
|
|
|
- $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
|
|
|
+ $this->addError($attribute, 'Stockist does not exist');//报单中心不存在
|
|
|
return false;
|
|
|
} else {
|
|
|
// 判断报单中心是否在新加入会员的安置网上级中
|
|
|
@@ -200,7 +200,7 @@ class DeclarationForm extends Model
|
|
|
// exit;
|
|
|
if (!isset($flipParent[$this->decUserName])) {
|
|
|
//$this->addError($attribute, '为' . $this->insertUserName . '报单,报单中心' . $this->decUserName . '不在' . $this->insertUserName . '的安置网上级中');
|
|
|
- $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Entry Center' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
|
|
|
+ $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Stockist' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
|
|
|
return ;
|
|
|
}
|
|
|
$this->_decId = $decUser['ID'];
|
|
|
@@ -289,10 +289,10 @@ class DeclarationForm extends Model
|
|
|
if(!$recUserTemp){
|
|
|
if($this->insertUserName){
|
|
|
//$this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
|
|
|
+ $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
|
|
|
} else {
|
|
|
// $this->addError($attribute, '开拓人'.$this->recUserName.'不存在');
|
|
|
- $this->addError($attribute, 'Pioneer'.$this->recUserName.'not in exist');
|
|
|
+ $this->addError($attribute, 'Sponsor'.$this->recUserName.'not in exist');
|
|
|
}
|
|
|
|
|
|
return ;
|
|
|
@@ -322,7 +322,7 @@ class DeclarationForm extends Model
|
|
|
$this->loopFindParentToNetwork($this->insertUserName);
|
|
|
if (!$this->recUserIsInNetworkParent()) {
|
|
|
// $this->addError($attribute, '为' . $this->insertUserName . '报单,开拓人' . $this->recUserName . '不在' . $this->insertUserName . '的安置网上级中');
|
|
|
- $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Pioneer' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
|
|
|
+ $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Sponsor' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
|
|
|
return ;
|
|
|
}
|
|
|
}
|
|
|
@@ -491,7 +491,7 @@ class DeclarationForm extends Model
|
|
|
$recUserTemp = UserInfo::findOneAsArray('USER_NAME=:USER_NAME', [':USER_NAME' => $this->recUserName]);
|
|
|
if(!$recUserTemp){
|
|
|
// $this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
|
|
|
+ $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
|
|
|
return ;
|
|
|
}
|
|
|
$recUserTemp['CON_NUM'] = UserNetwork::firstFloorChildNum($recUserTemp['USER_ID']);
|
|
|
@@ -516,13 +516,13 @@ class DeclarationForm extends Model
|
|
|
// 判断接点会员的下级会员是否大于三个,如果大于三个则不允许
|
|
|
if($conUser['CON_NUM'] >= 3){
|
|
|
// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'下级点位已满');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'lower level is full');
|
|
|
+ $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'lower level is full');
|
|
|
return;
|
|
|
}
|
|
|
// 判断指导老师相应的区位是否已满
|
|
|
if($conUser['LOCATION'.$this->location]){
|
|
|
// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'该市场已存在会员');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'Members already exist in this market');
|
|
|
+ $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'Members already exist in this market');
|
|
|
return;
|
|
|
}
|
|
|
// if($conUser['CON_NUM'] == 0 && $this->location != 1){
|
|
|
@@ -568,7 +568,7 @@ class DeclarationForm extends Model
|
|
|
if(!$this->insertUserName) $this->addError($attribute, 'Membership number must be filled in for initial purchase');//首购必须填写加入会员编号
|
|
|
// if(!$this->insertUserIdCard) $this->addError($attribute, 'For the first purchase, the ID number of the member must be filled in');//首购必须填写加入会员的身份证号
|
|
|
if(!$this->conUserName) $this->addError($attribute, 'For the first purchase, you must fill in the instructor number of the member');//首购必须填写加入会员的指导老师编号
|
|
|
- if(!$this->recUserName) $this->addError($attribute, 'For the first purchase, the pioneer number of the member must be filled in');//首购必须填写加入会员的开拓人编号
|
|
|
+ if(!$this->recUserName) $this->addError($attribute, 'For the first purchase, the Sponsor number of the member must be filled in');//首购必须填写加入会员的开拓人编号
|
|
|
if(!$this->location) $this->addError($attribute, 'The first purchase must be filled in the market of the member');//首购必须填写加入会员的市场
|
|
|
}
|
|
|
} else {
|