Преглед изворни кода

Merge branch 'feature/york-1365-i18n-inpro-0613' of http://18.167.157.193:1026/guanli/ngds into feature/theo-translate

# Conflicts:
#	common/models/forms/ApproachOrderForm.php
theo пре 3 година
родитељ
комит
72c81ae38a

+ 1 - 1
common/config/main.php

@@ -1,7 +1,7 @@
 <?php
 $mainConfig = require_once __DIR__ . '/config.php';
 return [
-    'language' => 'zh-CN',
+    'language' => 'en',
     'timeZone' => 'PRC',
     'aliases' => [
         '@bower' => '@vendor/bower-asset',

+ 2 - 2
common/helpers/user/Info.php

@@ -119,7 +119,7 @@ class Info {
      */
     public static function baseInfoNowPeriod($userId) {
         $data = User::find()->where('ID=:ID', [':ID' => $userId])->asArray()->one();
-        if (!$data) throw new Exception('会员不存在'.$userId);
+        if (!$data) throw new Exception('Member does not exist'.$userId);//会员不存在
         $infoData = UserInfo::find()->where('USER_ID=:USER_ID', [':USER_ID' => $userId])->select('ZC_PV,CON_UID,REC_UID,CON_NUM,REC_NUM,NETWORK_DEEP,RELATION_DEEP,SYSTEM_ID,REG_TYPE,REG_NAME,CREDIT_CODE,PREMISES,LEGAL_PERSON,CLOSE_LOGIN,IS_BIND_MAIN,HIGHEST_EMP_LV,HIGHEST_EMP_LV_PERIOD,SHOULD_REG_TYPE,IS_SYSTEM_LEADER,ALLOW_TRANSFER,TRANSFER_PROP,IS_GROUP_LEADER,GROUP_LEADER_AT,SHOW_EMP_LV')->asArray()->one();
         if ($infoData) {
             $data = array_merge($data, $infoData);
@@ -138,7 +138,7 @@ class Info {
      */
     public static function baseInfoByUserName($userName) {
         $data = User::find()->where('USER_NAME=:USER_NAME', [':USER_NAME' => $userName])->asArray()->one();
-        if (!$data) throw new Exception('会员不存在:'.$userName);
+        if (!$data) throw new Exception('Member does not exist:'.$userName);//会员不存在
         $userId  = $data['ID'];
         $infoData = UserInfo::find()
         ->where('USER_ID=:USER_ID', [':USER_ID' => $userId])

+ 14 - 14
common/models/forms/ApproachOrderForm.php

@@ -89,19 +89,19 @@ class ApproachOrderForm extends Model
     public function attributeLabels()
     {
         return [
-            'sn' => '订单号',
-            'expressCompany' => '快递公司',
-            'orderTrackNo' => '快递单号',
-            'status' => '状态',
-            'remark' => '备注',
-            'type' => '订单类型',
-            'addressId' => '收货地址',
-            'payType' => '支付方式',
-            'goodsId' => '商品ID',
-            'goodsNum' => '商品数量',
-            'userName' => '复消会员编号',
-            'consignee' => '收货人',
-            'acceptMobile' => '收货电话',
+            'sn' => 'SN',//订单号
+            'expressCompany' => 'ExpressCompany',//快递公司
+            'orderTrackNo' => 'courier number',//快递单号
+            'status' => 'status',//状态
+            'remark' => 'remark',//备注
+            'type' => 'order type',//订单类型
+            'addressId' => 'addressId',//收货地址
+            'payType' => 'payType',//支付方式
+            'goodsId' => 'Product ID',
+            'goodsNum' => 'Product quantity',//
+            'userName' => '复消会员编号',//复消会员编号
+            'consignee' => '收货人',//收货人
+            'acceptMobile' => '收货电话',//收货电话
             'province' => '省',
             'city' => '市',
             'county' => '区',
@@ -193,7 +193,7 @@ class ApproachOrderForm extends Model
         $goods = ShopGoods::find()->select('ID,CATEGORY_TYPE')->where(['in', 'ID', $this->goodsId])->andWhere(['STATUS' => 1])->asArray()->all();
         $goodsCategoryType = array_unique(array_column($goods, 'CATEGORY_TYPE'));
         if (count($goodsCategoryType) != 1) {
-            $this->addError($attribute, '订单不能包含多种商品分类');
+            $this->addError($attribute, 'Order cannot contain multiple product categories');//订单不能包含多种商品分类
             return;
         }
 

+ 4 - 3
common/models/forms/OrderForm.php

@@ -96,9 +96,9 @@ class OrderForm extends Model
             'type' => '订单类型',
             'addressId' => '收货地址',
             'payType' => '支付方式',
-            'goodsId' => '商品ID',
-            'goodsNum' => '商品数量',
-            'userName' => '复消会员编号',
+            'goodsId' => 'product ID',//商品ID
+            'goodsNum' => 'Product quantity',//商品数量
+            'userName' => 'Repeat sales Member No. does not exist',//复消会员编号
             'consignee' => '收货人',
             'acceptMobile' => '收货电话',
             'province' => '省',
@@ -111,6 +111,7 @@ class OrderForm extends Model
         ];
     }
 
+
     /**
      * 指定校验场景
      * @return array

+ 10 - 10
common/models/forms/UserForm.php

@@ -87,8 +87,8 @@ class UserForm extends Model
             [['oldPassword','verifyPassword'], 'required','on' => ['modifyPassword', 'modifyPasswordPay', 'noLoginModifyPassword']],
             [['password'], 'required','on' => ['modifyPassword', 'noLoginModifyPassword']],
             [['payPassword'], 'required','on' => ['modifyPasswordPay']],
-            ['verifyPassword', 'compare', 'compareAttribute' => 'password' ,'message'=>'两次登录密码输入不一致' ,'on' => ['modifyPassword', 'noLoginModifyPassword']],
-            ['verifyPassword', 'compare', 'compareAttribute' => 'payPassword' ,'message'=>'两次支付密码输入不一致' ,'on' => ['modifyPasswordPay']],
+            ['verifyPassword', 'compare', 'compareAttribute' => 'password' ,'message'=>'The two login passwords are inconsistent' ,'on' => ['modifyPassword', 'noLoginModifyPassword']],//两次登录密码输入不一致
+            ['verifyPassword', 'compare', 'compareAttribute' => 'payPassword' ,'message'=>'The two payment passwords are inconsistent' ,'on' => ['modifyPasswordPay']],//两次支付密码输入不一致
             [['userId'], 'unique', 'targetClass'=>UserInfo::class, 'targetAttribute'=>'USER_ID', 'on' => ['addWithUserName', 'addWithUid', 'addByAdmin']],
             [['userName'], 'unique', 'targetClass'=>UserInfo::class, 'targetAttribute'=>'USER_NAME' , 'on' => ['addWithUserName', 'addWithUid', 'addByAdmin']],
             [['conUid'], 'exist', 'targetClass'=>UserInfo::class, 'targetAttribute'=>'USER_ID', 'on' => ['addWithUserName', 'addWithUid', 'addByAdmin']],
@@ -120,10 +120,10 @@ class UserForm extends Model
             'openBank' => '银行名称',
             'bankAddress' => '开户支行',
             'bankNo' => '银行账号',
-            'verifyPassword' => '确认密码',
-            'oldPassword' => '原密码',
-            'password' => '登录密码',
-            'payPassword' => '支付密码',
+            'verifyPassword' => 'Confirm password',//确认密码
+            'oldPassword' => 'Original password',//原密码
+            'password' => 'Login password',//登录密码
+            'payPassword' => 'Payment password',//支付密码
             'email' => 'Email',
         ];
     }
@@ -576,7 +576,7 @@ class UserForm extends Model
         $uid = \Yii::$app->user->id;
         $model = User::findOne(['ID'=>$uid]);
         if ( !$model->validatePassword($this->oldPassword) ) {
-            $this->addError('modifyPassword', '原登录密码错误');
+            $this->addError('modifyPassword', 'Original login password error');//原登录密码错误
             return false;
         }
         $model->PASSWORD_HASH = \Yii::$app->security->generatePasswordHash($this->password);
@@ -596,7 +596,7 @@ class UserForm extends Model
         $uid = \Yii::$app->user->id;
         $model = User::findOne(['ID'=>$uid]);
         if ( !$model->validatePasswordPay($this->oldPassword) ) {
-            $this->addError('modifyPasswordPay', '原支付密码错误');
+            $this->addError('modifyPasswordPay', 'Original payment password error');//原支付密码错误
             return false;
         }
         $model->PAY_PASSWORD = \Yii::$app->security->generatePasswordHash($this->payPassword);
@@ -617,11 +617,11 @@ class UserForm extends Model
         }
         $model =  User::findOne(["USER_NAME"=>$this->userName]);
         if( !$model ) {
-            $this->addError('noLoginModifyPassword', '不存在的用户名');
+            $this->addError('noLoginModifyPassword', 'Nonexistent user name');//不存在的用户名
             return false;
         }
         if ( !$model->validatePassword($this->oldPassword) ) {
-            $this->addError('noLoginModifyPassword', '原登录密码错误');
+            $this->addError('noLoginModifyPassword', 'Original login password error');//原登录密码错误
             return false;
         }
         $model->PASSWORD_HASH = \Yii::$app->security->generatePasswordHash($this->password);

+ 8 - 8
frontendApi/modules/v1/controllers/UserController.php

@@ -62,7 +62,7 @@ class UserController extends BaseController {
             $post = \Yii::$app->request->post();
             $form->scenario = 'modifyProfile';
             if($form->load($post, '') && $result = $form->modifyProfile()){
-                return static::notice('个人资料修改成功');
+                return static::notice('Personal data modified successfully');//个人资料修改成功
             } else {
                 return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
             }
@@ -79,7 +79,7 @@ class UserController extends BaseController {
             $form->scenario = 'modifyPassword';
             $post = \Yii::$app->request->post();
             if($form->load($post, '') && $result = $form->modifyPassword()){
-                return static::notice('密码修改成功');
+                return static::notice('Password modified successfully');//密码修改成功
             } else {
                 return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
             }
@@ -300,7 +300,7 @@ class UserController extends BaseController {
             $post['type'] = DeclarationForm::TYPE_ZC;
             $allData['data'][] = $post;
             if ($formModel->load($post, '') && $formModel->add($post)) {
-                return static::notice('升级报单成功');
+                return static::notice('Upgrade declaration succeeded');//升级报单成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
             }
@@ -353,17 +353,17 @@ class UserController extends BaseController {
             $insertUserName = strtoupper($post['insertUserName']);
             $getRedisUserName = $redis->get('key_'.$insertUserName);
             if (!$getRedisUserName){
-                return static::notice('会员编号过期',400);
+                return static::notice('Membership number expired',400);//会员编号过期
             }
             if ($insertUserName != $getRedisUserName){
-                return static::notice('会员编号不符合',400);
+                return static::notice('Member number does not conform to',400);//会员编号不符合
             }
 
             $post['insertUserName'] = $insertUserName;
             $post['type'] = DeclarationForm::TYPE_ZC;
             $allData['data'][] = $post;
             if ($formModel->load($allData, '') && $formModel->add()) {
-                return static::notice('报单成功');
+                return static::notice('Entry success');//报单成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
             }
@@ -395,7 +395,7 @@ class UserController extends BaseController {
         // 所有开户行
         $allOpenBank = OpenBank::find()->where('STATUS=1')->orderBy('LIST_ORDER ASC')->asArray()->all();
         if (!$userName) {
-            return static::notice('会员编号生成失败', 400);
+            return static::notice('Failed to generate member number', 400);//会员编号生成失败
         }
         //随机码保存在redis中方便进行比对
         $msg = $redis->setex('key_'.$userName , 1800 , $userName);
@@ -474,7 +474,7 @@ class UserController extends BaseController {
             ];
             return static::notice($arr);
         }else{
-            return static::notice('复消会员编号不存在', 400);
+            return static::notice('Repeat sales Member No. does not exist', 400);//复消会员编号不存在
         }
     }
 }

+ 8 - 8
frontendEle/src/views/finance/recharge.vue

@@ -26,20 +26,20 @@
                     <el-table-column label="Acitons">
                       <template slot-scope="scope">
                         <template v-if="scope.row.RECHARGE_STATUS==0">
-                          <el-button type="primary" plain>去支付</el-button>
-                          <el-button type="info" plain disabled>验证</el-button>
+                          <el-button type="primary" plain>To pay<!-- 去支付 --></el-button>
+                          <el-button type="info" plain disabled>verification<!-- 验证 --></el-button>
                         </template>
                         <template v-else-if="scope.row.RECHARGE_STATUS==1">
-                          <el-button type="info" plain disabled>已支付</el-button>
-                          <el-button type="primary" plain>验证</el-button>
+                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
+                          <el-button type="primary" plain>verification<!-- 验证 --></el-button>
                         </template>
                         <template v-else-if="scope.row.RECHARGE_STATUS==2">
-                          <el-button type="info" plain disabled>已支付</el-button>
-                          <el-button type="info" plain disabled>已验证</el-button>
+                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
+                          <el-button type="info" plain disabled>Verified<!-- 已验证 --></el-button>
                         </template>
                         <template v-else>
-                          <el-button type="danger" plain disabled>支付失败</el-button>
-                          <el-button type="danger" plain disabled>验证</el-button>
+                          <el-button type="danger" plain disabled>Payment failed<!-- 支付失败 --></el-button>
+                          <el-button type="danger" plain disabled>verification<!-- 验证 --></el-button>
                         </template>
                       </template>
                     </el-table-column>