Sfoglia il codice sorgente

Merge branch 'master' of http://16.162.42.175:8014/guanli/ngds into feature/1916-orderLogistics

kevin_zhangl 3 anni fa
parent
commit
0ff5b88819

+ 1 - 1
backendApi/modules/v1/controllers/FinanceController.php

@@ -125,7 +125,7 @@ class FinanceController extends BaseController {
             'AUDIT_ADMIN_NAME' => 'ADMU.ADMIN_NAME',
         ]);
         $form = new FinanceExportForm();
-        $result = $form->run($filter, '会员余额调整列表');
+        $result = $form->run($filter, 'Member_Ecoin_adjustment_list'); // 会员余额调整列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }

+ 10 - 7
common/models/UserNetwork.php

@@ -171,17 +171,20 @@ class UserNetwork extends \common\components\ActiveRecord
      *
      */
 
-    public static function getBottomPlace($userId, $side){
-        $userNetInfo = static::find()->select(['LOCATION_TAG', 'TOP_DEEP'])->where('USER_ID=:USER_ID', ['USER_ID'=>$userId])->asArray()->one();
-        $userLocationTag = $userNetInfo['LOCATION_TAG'];
-        $sonUserTag = $userLocationTag . ($side=='left' ? '1' : '2');
-        $sonUser = static::find()->select('USER_ID')->where('LOCATION_TAG=:LOCATION_TAG',['LOCATION_TAG'=>$sonUserTag])->asArray()->one();
-
+    public static function getBottomPlace($userId, $userTag='', $side){
+        if(!$userTag||$userTag==''){
+            $userNetInfo = static::find()->select(['LOCATION_TAG', 'TOP_DEEP'])->where('USER_ID=:USER_ID', ['USER_ID'=>$userId])->asArray()->one();
+            $userLocationTag = $userNetInfo['LOCATION_TAG'];
+            $sonUserTag = $userLocationTag . ($side=='left' ? '1' : '2');
+        }else{
+            $sonUserTag = $userTag . ($side=='left' ? '1' : '2');
+        }
+        $sonUser = static::find()->select('USER_ID, LOCATION_TAG')->where('LOCATION_TAG=:LOCATION_TAG',['LOCATION_TAG'=>$sonUserTag])->asArray()->one();
         if(!$sonUser){// 如果没有查到,说明该位置空白,返回上级用户的信息
             $placeParentTag = substr($sonUserTag, 0, strlen($sonUserTag) - 1);
             return $placeParentTag;
         }else{
-            return self::getBottomPlace($sonUser['USER_ID'], 'left');
+            return self::getBottomPlace($sonUser['USER_ID'], $sonUser['LOCATION_TAG'], 'left');
         }
     }
 

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

@@ -464,7 +464,7 @@ class UserController extends BaseController {
         $side = \Yii::$app->request->get('side');
         $userId = Info::getUserIdByUserName($userName);
 //        print_r($userId);
-        $bottomPlace = UserNetwork::getBottomPlace($userId, $side);
+        $bottomPlace = UserNetwork::getBottomPlace($userId,'', $side);
         $bottomUser = UserNetwork::find()->select('USER_ID')->where('LOCATION_TAG=:LOCATION_TAG', ['LOCATION_TAG' => $bottomPlace])->asArray()->one();
         $bottomUser = User::findOneAsArray('ID=:ID', [':ID' => $bottomUser['USER_ID']], 'USER_NAME');
 //        print_r($bottomUser);

+ 16 - 13
frontendEle/src/views/user/dec.vue

@@ -130,13 +130,6 @@
           </el-input>
         </el-form-item>
 
-        <el-form-item label="Auto Place"><!--自动安置区位-->
-          <el-radio-group v-model="form.autoPlace" @change="setAutoPlace">
-            <el-radio-button label="left">Left</el-radio-button>
-            <el-radio-button label="right">Right</el-radio-button>
-          </el-radio-group>
-        </el-form-item>
-
         <el-form-item label="Placement code"><!--接点人编号-->
           <el-input v-model="form.conUserName" @change="handleChkConUser">
             <template slot="append">【{{conRealName}}】</template>
@@ -145,11 +138,16 @@
 
         <el-form-item label="Placement tree"><!--安置区位-->
           <el-radio-group v-model="form.location">
-            <el-radio-button :label="1">Left</el-radio-button><!--左区-->
-            <el-radio-button :label="2">Right</el-radio-button><!--中区-->
-            <!--  <el-radio-button :label="3">Right</el-radio-button> --><!--右区-->
+            <el-radio :label="1" >Left</el-radio><!--左区-->
+            <el-radio :label="2" >Right</el-radio><!--右区-->
           </el-radio-group>
         </el-form-item>
+
+        <el-form-item label=""><!--自动安置区位-->
+          <el-button type="primary" @click="setAutoPlace('left')">Placement Auto Location: L</el-button>
+          <el-button type="primary" @click="setAutoPlace('right')">Placement Auto Location: R</el-button>
+        </el-form-item>
+
         <div class="hr-tip"><span>Personal Information<!--个人信息--></span></div>
         <el-form-item>
           <template slot="label">
@@ -389,7 +387,8 @@ export default {
         lgaName: '',
         way: 'express',
         payType: '',
-        autoPlace: ''
+        autoPlace: '',
+        location: ''
       },
       conRealName: '-',
       recRealName: '-',
@@ -527,18 +526,22 @@ export default {
       }
     },
     setAutoPlace (val) {
-      this.loading = true
       if (this.recRealName !== '-') {
+        this.loading = true
         network.getData('user/get-auto-place', {userName: this.form.recUserName, side: val}).then(response => {
           // console.log(response)
           this.form.conUserName = response.USER_NAME
           this.handleChkConUser()
-          // this.form.location = 1
+          this.form.location = 1
+          this.form.autoPlace = val
           this.loading = false
         }).catch(response => {
           // this.recRealName = '-'
           this.loading = false
         })
+      } else {
+        this.form.autoPlace = ''
+        return false
       }
       // console.log(val)
     },