ソースを参照

BA会员支付、首页修改

kevin_zhangl 3 年 前
コミット
da218b9b65

+ 97 - 0
common/models/BaApproachDecOrder.php

@@ -0,0 +1,97 @@
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%APPROACH_DEC_ORDER}}".
+ *
+ * @property string $ID
+ * @property string $DEC_SN 报单编号
+ * @property string $ORDER_SN 订单编号
+ * @property string $USER_ID 会员ID
+ * @property string $TO_USER_ID 报单对象ID
+ * @property string $TYPE 报单类型
+ * @property int $IS_ADMIN 是否管理员操作
+ * @property string $DEC_AMOUNT 报单金额
+ * @property string $DEC_PV 报单PV
+ * @property string $PAID_WALLET 支付钱包
+ * @property int $IS_BATCH 是否批量报单
+ * @property string $REMARK 备注
+ * @property string $REC_USER_ID 推荐人ID
+ * @property string $CON_USER_ID 接点人ID
+ * @property string $DEC_ID 报单中心ID
+ * @property int $PERIOD_NUM 报单期数
+ * @property string $P_CALC_MONTH 分区结算月
+ * @property int $CALC_MONTH 结算月
+ * @property int $CREATED_AT 创建时间
+ * @property string $UPDATER 操作人
+ * @property string $UPDATED_AT 更新时间
+ * @property int $IS_DEL 是否删除
+ * @property int $DELETED_AT 删除时间
+ * @property int $DETAIL_TYPE 类型
+ * @property int $UPGRADE_TYPE 升级类型
+ * @property string $ORI_LV 升级前级别
+ * @property string $UPGRADE_LV 升级后级别
+ */
+class BaApproachDecOrder extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%BA_APPROACH_DEC_ORDER}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['USER_ID', 'TO_USER_ID','REC_USER_ID','CON_USER_ID','DEC_ID', 'TYPE', 'PAID_WALLET', 'PERIOD_NUM', 'P_CALC_MONTH', 'CREATED_AT'], 'required'],
+            [['IS_ADMIN', 'IS_BATCH', 'PERIOD_NUM', 'CALC_MONTH', 'CREATED_AT', 'IS_DEL', 'DELETED_AT'], 'integer'],
+            [['DEC_AMOUNT', 'DEC_PV'], 'number'],
+            [['ID', 'DEC_SN', 'ORDER_SN', 'USER_ID', 'TO_USER_ID','REC_USER_ID','CON_USER_ID','DEC_ID', 'TYPE', 'UPDATER', 'UPDATED_AT'], 'string', 'max' => 32],
+            [['PAID_WALLET'], 'string', 'max' => 48],
+            [['REMARK'], 'string', 'max' => 4000],
+            [['DEC_SN'], 'unique'],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'DEC_SN' => '报单编号',
+            'ORDER_SN' => '订单编号',
+            'USER_ID' => '会员ID',
+            'TO_USER_ID' => '报单对象ID',
+            'TYPE' => '报单类型',
+            'IS_ADMIN' => '是否管理员操作',
+            'DEC_AMOUNT' => '报单金额',
+            'DEC_PV' => '报单PV',
+            'PAID_WALLET' => '支付钱包',
+            'STATUS' => '支付状态',
+            'IS_BATCH' => '是否批量报单',
+            'REMARK' => '备注',
+            'REC_USER_ID' => '开拓人编号',
+            'CON_USER_ID' => '上级编号',
+            'DEC_ID' => '上级编号',
+            'PERIOD_NUM' => '报单期数',
+            'P_CALC_MONTH' => '分区结算月',
+            'CALC_MONTH' => '结算月',
+            'CREATED_AT' => '创建时间',
+            'UPDATER' => '操作人',
+            'UPDATED_AT' => '更新时间',
+            'IS_DEL' => '是否删除',
+            'DELETED_AT' => '删除时间',
+        ];
+    }
+}

+ 1 - 1
common/models/forms/BaApproachOrderForm.php

@@ -260,7 +260,7 @@ class BaApproachOrderForm extends Model
      * 校验PayStack支付,更新订单状态.同步到正式订单.
      * @throws Exception
      */
-    public function verifyPayStack(): ?ApproachOrder
+    public function verifyPayStack()
     {
         if (!$this->validate()) {
             return null;

+ 2 - 2
frontendApi/modules/v1/controllers/ShopController.php

@@ -1011,7 +1011,7 @@ ORDER;
         $categoryType = \Yii::$app->request->get('categoryType', 1);
 
         $condition = ' AND STATUS=1 AND (FIND_IN_SET(2,GIFT_TYPE)>0';
-        $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
+        $isStudio = BaUser::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
         if($isStudio==1){
             $condition.= " OR FIND_IN_SET(4,GIFT_TYPE)>0";
         }
@@ -1102,7 +1102,7 @@ ORDER;
      */
     public function actionBaOrderList()
     {
-        $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
+        $uname = Info::getBaUserNameByUserId(\Yii::$app->user->id);
         $condition = " (USER_ID=:USER_ID OR CREATE_USER='$uname') AND O.IS_DELETE = 0";
         $params[':USER_ID'] = \Yii::$app->user->id;
         $orderQuery = BaOrder::find()

+ 15 - 3
frontendEle/src/router/index.js

@@ -35,7 +35,19 @@ export const constantRouterMap = [
           {title: 'Dashboard', path: '/dashboard/index'} // 首页
         ]
       }
-    }]
+    },
+      {
+        path: '/dashboard/ba-index',
+        component: _import('dashboard/ba-index'),
+        name: 'dashboard_ba_index',
+        meta: {
+          title: 'Dashboard', // 控制台
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/ba-index'} // 首页
+          ]
+        }
+      },
+      ]
   },
   {
     path: '/shop',
@@ -143,7 +155,7 @@ export const constantRouterMap = [
         component: _import('shop/ba-order-list'),
         name: 'ba_order_list',
         meta: {
-          title: 'BA Order List', // BA订单列表
+          title: 'Order List', // BA订单列表
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // 首页
             {title: 'Shopping Mall', path: '/shop/ba-order-list'}// 商城管理
@@ -155,7 +167,7 @@ export const constantRouterMap = [
         component: _import('shop/ba-dec-order-list'),
         name: 'shop_ba-dec-order-list',
         meta: {
-          title: 'Welcome BA Listing', // BA报单列表
+          title: 'Welcome Listing', // BA报单列表
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // 首页
             {title: 'Shopping Mall', path: '/shop/dec-order-list'} // 商城管理

+ 1 - 26
frontendEle/src/views/dashboard/ba-index.vue

@@ -10,7 +10,6 @@
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
             <el-row :gutter="10">
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current System Time:{{nowDateTime}}</el-col> <!--当前系统时间-->
-              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Pay Cycle:{{periodNum}}</el-col><!--当前业绩期-->
             </el-row>
           </el-col>
         </el-row>
@@ -66,33 +65,9 @@ export default {
   components: {
     countUp
   },
-  mounted () {
-    network.getData(`dashboard/ba-index`).then(response => {
-      this.slides = response.slides
-      this.news = response.news
-      this.periodNum = response.periodNum
-      this.loading = false
-      this.imgLoad()
-      return network.getData(`dashboard/bonus-num`)
-    })
-    if (this.verified === '0') {
-    // '您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意'
-      this.$confirm('You do not have real name authentication, please log in the member system to complete the member information and upload ID card.', 'Please pay attention', {
-        confirmButtonText: 'Confirm', // 确定
-        type: 'warning'
-      }).then(() => {
-      }).catch(() => {
-
-      })
-    }
-    this.calcTime()
-    window.addEventListener('resize', () => {
-      this.imgLoad()
-    }, false)
-  },
   data () {
     return {
-      loading: true,
+      loading: false,
       tool: tool,
       nowTime: tool.getTimestamp(),
       userName: userInfo.userName(),