Prechádzať zdrojové kódy

Merge branch 'master' into feature/1962-memberBrandAmbassador

kevin_zhangl 3 rokov pred
rodič
commit
b30550e91a

+ 1 - 0
backendApi/config/menu.php

@@ -293,6 +293,7 @@ return [
             ['name'=>'月业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month-export', 'routePath'=>'bonus/perf-month-export', 'show'=>0,],
 //            ['name'=>'Score-month', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],//月积分
             ['name'=>'月积分导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month-export', 'routePath'=>'bonus/score-month-export', 'show'=>0,],
+            ['name'=>'自动提现', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'auto-withdraw', 'routePath'=>'bonus/auto-withdraw', 'show'=>0,],
         ]
     ],
     /*'report'=>[

+ 1 - 0
backendApi/config/urlManagerRules.php

@@ -415,6 +415,7 @@ return [
             'GET yc-perf' => 'yc-perf',
             'GET period-perf' => 'period-perf',
             'GET period-perf-export' => 'period-perf-export',
+            'GET,POST auto-withdraw' => 'auto-withdraw'
         ],
     ],
     [

+ 21 - 0
backendApi/modules/v1/controllers/BonusController.php

@@ -62,6 +62,7 @@ use common\models\Config;
 use common\models\FlowBonus;
 use common\models\FlowExchangePoints;
 use common\models\forms\PeriodForm;
+use common\models\forms\UserBonusForm;
 use common\models\Period;
 use Exception;
 
@@ -2770,4 +2771,24 @@ class BonusController extends BaseController {
         }
         return static::notice('Starting exporting, please go to File Management - Export Files to view.'); // 导出开始,请到文件管理-导出文件查看
     }
+
+    /**
+     * 自动提现(奖金)
+     *
+     */
+    public function actionAutoWithdraw() {
+        $withdrawLock = Cache::getWithdrawLock();
+        if ($withdrawLock!=0){
+            return static::notice(Form::formatErrorsForApi('已有进程在生成'), 400);
+        }else{
+            $formModel = new UserBonusForm();
+            $formModel->scenario = 'autoWithdraw';
+            if ($formModel->autoWithdrawWebToAsync()) {
+                return static::notice('生成提现单 已开始处理,请等待');
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+            }
+        }
+    }
+
 }

+ 9 - 9
backendApi/modules/v1/models/lists/bonus/FlowBonusList.php

@@ -99,15 +99,15 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                         'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
                     ],
                 ],
-                'LAST_EMP_LV_NAME' => [
-                    'header' => 'Rank',//聘级
-                    'headerOther' => [
-                        'width' => '130',
-                    ],
-                    'valueOther' => [
-                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
-                    ],
-                ],
+//                'LAST_EMP_LV_NAME' => [
+//                    'header' => 'Rank',//聘级
+//                    'headerOther' => [
+//                        'width' => '130',
+//                    ],
+//                    'valueOther' => [
+//                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
+//                    ],
+//                ],
 //                'LAST_STATUS_NAME' => [
 //                    'header' => '会员状态',
 //                    'headerOther' => ['width' => '110'],

+ 14 - 0
backendEle/src/App.vue

@@ -18,4 +18,18 @@ export default {
     padding: 0;
     background: #f4f6f8;
   }
+  .el-table__body-wrapper::-webkit-scrollbar {
+    width: 12px; /*滚动条宽度*/
+    height: 10px; /*滚动条高度*/
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-track {
+    border-radius: 10px; /*滚动条的背景区域的圆角*/
+    -webkit-box-shadow: inset 0 0 15px rgba(238,238,238, 0.3);
+    background-color: #eeeeee; /*滚动条的背景颜色*/
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-thumb {
+    border-radius: 10px; /*滚动条的圆角*/
+    -webkit-box-shadow: inset 0 0 15px rgba(145, 143, 0143, 0.3);
+    background-color: rgb(145, 143, 143); /*滚动条的背景颜色*/
+  }
 </style>

+ 1 - 1
backendEle/src/views/bonus/cf-lx-audit-list.vue

@@ -118,7 +118,7 @@
       handleMuli(command) {
         if (this.multipleSelection.length < 1) {
           this.$message({
-            message: '请选择要操作的记录',
+            message: 'Select the record to operate on', // '请选择要操作的记录',
             type: 'warning'
           })
           return;

+ 177 - 156
backendEle/src/views/bonus/period.vue

@@ -103,177 +103,198 @@
       <div class="white-box-footer">
         <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
       </div>
+      <div>
+        <el-button type="primary" size="small" @click="doAutoWithdraw()">
+          批量提现
+        </el-button>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-  import Vue from 'vue'
-  import {BONUS_WEBSOCKET_HOST} from '@/utils/config'
-  import userInfo from '@/utils/userInfo'
-  import network from './../../utils/network'
-  import tool from './../../utils/tool'
-  import store from '@/utils/vuexStore'
-  import FilterUser from '@/components/FilterUser'
-  import permission from '@/utils/permission'
-  import Pagination from '@/components/Pagination'
-  import filterHelper from '../../utils/filterHelper'
+import Vue from 'vue'
+import {BONUS_WEBSOCKET_HOST} from '@/utils/config'
+import userInfo from '@/utils/userInfo'
+import network from './../../utils/network'
+import tool from './../../utils/tool'
+import store from '@/utils/vuexStore'
+import FilterUser from '@/components/FilterUser'
+import permission from '@/utils/permission'
+import Pagination from '@/components/Pagination'
+import filterHelper from '../../utils/filterHelper'
 
-  export default {
-    name: 'bonus-period',
-    components: {FilterUser,Pagination},
-    created() {
-      let wsServer = BONUS_WEBSOCKET_HOST
-      let webSocket = new WebSocket(wsServer)
-      webSocket.onopen = function (evt) {
-        let userId = userInfo.userId()
-        let sendData = {app: 'admin', userId: userId}
-        webSocket.send(JSON.stringify(sendData))
+export default {
+  name: 'bonus-period',
+  components: {FilterUser, Pagination},
+  created () {
+    let wsServer = BONUS_WEBSOCKET_HOST
+    let webSocket = new WebSocket(wsServer)
+    webSocket.onopen = function (evt) {
+      let userId = userInfo.userId()
+      let sendData = {app: 'admin', userId: userId}
+      webSocket.send(JSON.stringify(sendData))
+    }
+    webSocket.onmessage = (env) => {
+      let data = JSON.parse(env.data)
+      if (data.handle === 'adminAsyncPercent') {
+        this.onMessageCallback(data)
       }
-      webSocket.onmessage = (env) => {
-        let data = JSON.parse(env.data)
-        if (data.handle === 'adminAsyncPercent') {
-          this.onMessageCallback(data)
-        }
+    }
+  },
+  mounted () {
+    this.getData(this.currentPage, this.pageSize)
+    store.state.socket.onMessageCallback = this.onMessageCallback
+  },
+  data () {
+    return {
+      tableData: null,
+      loading: true,
+      multipleSelection: [],
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 10,
+      tool: tool,
+      permission: permission,
+      filterTypes: {
+        'periodNum': {isUserTable: false, name: 'Number of periods'}, // 期数
+        'year': {isUserTable: false, name: 'Bonus Year'}, // 所在结算年
+        'month': {isUserTable: false, name: 'Bonus Month'}, // 所在结算月
+        'startTime': {isUserTable: false, name: 'Period start time', other: 'date'}, // 期数开始时间
+        'endTime': {isUserTable: false, name: 'Period end time', other: 'date'}, // 期数结束时间
+        'closedAt': {isUserTable: false, name: 'Closing time', other: 'date'}, // 封期时间
+        'perfStartedAt': {isUserTable: false, name: 'Start time of generating performance sheet', other: 'date'}, // 生成业绩单开始时间
+        'perfedAt': {isUserTable: false, name: 'End time of generating performance sheet', other: 'date'}, // 生成业绩单结束时间
+        'calStartedAt': {isUserTable: false, name: 'Settlement start time', other: 'date'}, // 结算开始时间
+        'calculatedAt': {isUserTable: false, name: 'Settlement end time', other: 'date'}, // 结算结束时间
+        'sendStartedAt': {isUserTable: false, name: 'Network connection start time', other: 'date'}, // 挂网开始时间
+        'sentAt': {isUserTable: false, name: 'End time of network connection', other: 'date'} // 挂网结束时间
+      },
+      filterModel: {},
+      percentList: {
+        'PERF_PERCENT': {},
+        'CALC_PERCENT': {},
+        'SENT_PERCENT': {}
       }
+    }
+  },
+  methods: {
+    closeHandle (row) {
+      this.$confirm('Confirm to manually seal the current period?', 'Hint', { // '确定对当前期进行手动封期操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`bonus/close-period/${row.PERIOD_NUM}`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
     },
-    mounted() {
-      this.getData(this.currentPage, this.pageSize)
-      store.state.socket.onMessageCallback = this.onMessageCallback
-    },
-    data() {
-      return {
-        tableData: null,
-        loading: true,
-        multipleSelection: [],
-        currentPage: 1,
-        totalPages: 1,
-        totalCount: 1,
-        pageSize: 10,
-        tool: tool,
-        permission: permission,
-        filterTypes: {
-          'periodNum': {isUserTable: false, name: 'Number of periods'},//期数
-          'year': {isUserTable: false, name: 'Bonus Year'},//所在结算年
-          'month': {isUserTable: false, name: 'Bonus Month'},//所在结算月
-          'startTime': {isUserTable: false, name: 'Period start time', other: 'date'},//期数开始时间
-          'endTime': {isUserTable: false, name: 'Period end time', other: 'date'},//期数结束时间
-          'closedAt': {isUserTable: false, name: 'Closing time', other: 'date'},//封期时间
-          'perfStartedAt': {isUserTable: false, name: 'Start time of generating performance sheet', other: 'date'},//生成业绩单开始时间
-          'perfedAt': {isUserTable: false, name: 'End time of generating performance sheet', other: 'date'},//生成业绩单结束时间
-          'calStartedAt': {isUserTable: false, name: 'Settlement start time', other: 'date'},//结算开始时间
-          'calculatedAt': {isUserTable: false, name: 'Settlement end time', other: 'date'},//结算结束时间
-          'sendStartedAt': {isUserTable: false, name: 'Network connection start time', other: 'date'},//挂网开始时间
-          'sentAt': {isUserTable: false, name: 'End time of network connection', other: 'date'},//挂网结束时间
-        },
-        filterModel: {},
-        percentList: {
-          'PERF_PERCENT': {},
-          'CALC_PERCENT': {},
-          'SENT_PERCENT': {},
-        },
-      }
+    calcHandle (row) {
+      this.$confirm('Confirm to perform settlement operation for the current period?', 'Hint', { // '确定对当前期进行结算操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`bonus/calc-period/${row.PERIOD_NUM}`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
     },
-    methods: {
-      closeHandle(row) {
-        this.$confirm('Confirm to manually seal the current period?', 'Hint', {//'确定对当前期进行手动封期操作?', '提示'
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText: 'cancel', // 取消
-          type: 'warning'
-        }).then(() => {
-          return network.getData(`bonus/close-period/${row.PERIOD_NUM}`)
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.getData(this.currentPage, this.pageSize)
-        }).catch(response => {
+    perfHandle (row) {
+      this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`bonus/perf-period/${row.PERIOD_NUM}`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      },
-      calcHandle(row) {
-        this.$confirm('Confirm to perform settlement operation for the current period?', 'Hint', {//'确定对当前期进行结算操作?', '提示'
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText:  'cancel', // 取消
-          type: 'warning'
-        }).then(() => {
-          return network.getData(`bonus/calc-period/${row.PERIOD_NUM}`)
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.getData(this.currentPage, this.pageSize)
-        }).catch(response => {
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    sentHandle (row) {
+      this.$confirm('Are you sure to connect the current period? Performance sheet and settlement cannot be generated after network connection', 'Hint', { // '确定对当前期进行挂网操作?挂网后无法生成业绩单和结算', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`bonus/send-period/${row.PERIOD_NUM}`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      },
-      perfHandle(row) {
-        this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', {//'确定对当前期进行生成业绩单操作?', '提示'
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText:  'cancel', // 取消
-          type: 'warning'
-        }).then(() => {
-          return network.getData(`bonus/perf-period/${row.PERIOD_NUM}`)
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.getData(this.currentPage, this.pageSize)
-        }).catch(response => {
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    doAutoWithdraw () {
+      this.$confirm('全部提现?', 'Hint', {
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`bonus/auto-withdraw`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      },
-      sentHandle(row) {
-        this.$confirm('Are you sure to connect the current period? Performance sheet and settlement cannot be generated after network connection', 'Hint', {//'确定对当前期进行挂网操作?挂网后无法生成业绩单和结算', '提示'
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText:  'cancel', // 取消
-          type: 'warning'
-        }).then(() => {
-          return network.getData(`bonus/send-period/${row.PERIOD_NUM}`)
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    viewHandle (row) {
+      this.$router.push({path: `/bonus/period-detail/${row.PERIOD_NUM}`})
+    },
+    handleSelectionChange (val) {
+      this.multipleSelection = val
+    },
+    handleCurrentChange (page) {
+      this.getData(page, this.pageSize)
+    },
+    handleSizeChange (pageSize) {
+      this.getData(this.currentPage, pageSize)
+    },
+    handleFilterUser (filterData) {
+      filterHelper.handleFilterUser(this, filterData)
+    },
+    handleFilter () {
+      this.getData()
+    },
+    getData (page, pageSize) {
+      let filterData = this.filterModel
+      let vueObj = this
+      network.getPageData(this, 'bonus/period', page, pageSize, filterData, function (response) {
+        vueObj.allData = response
+      }, null, ['PERF_PERCENT', 'CALC_PERCENT', 'SENT_PERCENT'])
+    },
+    onMessageCallback (data) {
+      if (data) {
+        if (data.other && data.other.MODEL === 'PERIOD' && data.other.ID) {
+          this.$set(this.percentList[data.other.FIELD], data.other.ID, data.percent)
+        }
+        if (data.other && data.other.MODEL === 'PERIOD' && data.percent === 100) {
           this.getData(this.currentPage, this.pageSize)
-        }).catch(response => {
-        })
-      },
-      viewHandle(row) {
-        this.$router.push({path: `/bonus/period-detail/${row.PERIOD_NUM}`})
-      },
-      handleSelectionChange(val) {
-        this.multipleSelection = val
-      },
-      handleCurrentChange(page) {
-        this.getData(page, this.pageSize)
-      },
-      handleSizeChange(pageSize) {
-        this.getData(this.currentPage, pageSize)
-      },
-      handleFilterUser(filterData) {
-        filterHelper.handleFilterUser(this, filterData)
-      },
-      handleFilter() {
-        this.getData()
-      },
-      getData(page, pageSize) {
-        let filterData = this.filterModel
-        let vueObj = this
-        network.getPageData(this, 'bonus/period', page, pageSize, filterData, function (response) {
-          vueObj.allData = response
-        }, null, ['PERF_PERCENT', 'CALC_PERCENT', 'SENT_PERCENT'])
-      },
-      onMessageCallback(data) {
-        if (data) {
-          if (data.other && data.other.MODEL === 'PERIOD' && data.other.ID) {
-            this.$set(this.percentList[data.other.FIELD], data.other.ID, data.percent)
-          }
-          if (data.other && data.other.MODEL === 'PERIOD' && data.percent === 100) {
-            this.getData(this.currentPage, this.pageSize)
-          }
         }
-      },
+      }
     }
   }
+}
 </script>

+ 1 - 1
backendEle/src/views/bonus/resend-qy-audit-list.vue

@@ -98,7 +98,7 @@ export default {
     handleMuli(command) {
       if (this.multipleSelection.length < 1) {
         this.$message({
-          message: '请选择要操作的记录',
+          message: 'Select the record to operate on', // '请选择要操作的记录',
           type: 'warning'
         })
         return;

+ 1 - 1
backendEle/src/views/finance/perf-audit-list.vue

@@ -216,7 +216,7 @@
       handleMuli(command) {
         if (this.multipleSelection.length < 1) {
           this.$message({
-            message: '请选择要操作的记录',
+            message: 'Select the record to operate on', // '请选择要操作的记录',
             type: 'warning'
           })
           return;

+ 25 - 24
backendEle/src/views/finance/withdraw.vue

@@ -74,9 +74,9 @@
                   Return <!-- 设为提现退回 -->
                 </el-dropdown-item>
                 <el-dropdown-item command="status"
-                                  @click.native="handleStatusShow(scope.row, 7, '该会员已提供发票,请确认是否处理提现退回?', 'Note on withdrawal return')"
+                                  @click.native="handleStatusShow(scope.row, 7, 'The member has provided the invoice, please confirm whether to process the withdrawal return?', 'Note on withdrawal return')"
                                   v-show="(scope.row.AUDIT_STATUS === '1'||scope.row.AUDIT_STATUS === '2'||scope.row.AUDIT_STATUS === '3') && permission.hasPermission(`finance/withdraw-status`)"><!-- 提现退回备注 -->
-                  Return <!-- 设为提现退回 -->
+                  Return <!-- 该会员已提供发票,请确认是否处理提现退回 --> <!-- 设为提现退回 -->
                 </el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -95,26 +95,26 @@
             <el-dropdown-item command="7">Batch return</el-dropdown-item> <!-- 批量退回 -->
           </el-dropdown-menu>
           <el-dropdown-menu v-else-if="filterStatus==='2'" slot="dropdown">
-            <el-dropdown-item command="3">批量设为待付款</el-dropdown-item>
+            <el-dropdown-item command="3">Batch set to be paid</el-dropdown-item><!-- 批量设为待付款 -->
           </el-dropdown-menu>
           <el-dropdown-menu v-else-if="filterStatus==='3'" slot="dropdown">
-            <el-dropdown-item command="6">批量设为已付款</el-dropdown-item>
-            <el-dropdown-item command="7">批量退回</el-dropdown-item>
+            <el-dropdown-item command="6">Batch set paid</el-dropdown-item><!--批量设为已付款-->
+            <el-dropdown-item command="7">Batch return</el-dropdown-item><!--批量退回-->
           </el-dropdown-menu>
           <el-dropdown-menu v-else-if="filterStatus==='6'" slot="dropdown">
-            <el-dropdown-item command="4">批量设为付款失败</el-dropdown-item>
+            <el-dropdown-item command="4">Batch set payment failure</el-dropdown-item><!--批量设为付款失败-->
           </el-dropdown-menu>
           <el-dropdown-menu v-else-if="filterStatus==='4'" slot="dropdown">
-            <el-dropdown-item command="3">批量设为待付款</el-dropdown-item>
+            <el-dropdown-item command="3">Batch set to be paid</el-dropdown-item><!-- 批量设为待付款 -->
           </el-dropdown-menu>
         </el-dropdown>
 
         <el-button type="success" size="small" @click="handleExport"
                    v-show="permission.hasPermission(`finance/transfer-list-export`)">Export Excel
         </el-button>
-        <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange"
+        <pagination :total="totalCount" :page_size="pageSize" :page_sizes="pageSizes" @size-change="handleSizeChange"
                     @current-change="handleCurrentChange"></pagination>
-        <el-dialog title="修改提现信息" :visible.sync="dialogEditFormVisible">
+        <el-dialog title="modify the withdrawal information" :visible.sync="dialogEditFormVisible">
           <el-form :model="form" label-width="150px" style="width:500px;" v-loading="dialogEditLoading">
             <el-form-item label="会员编号">
               <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
@@ -134,7 +134,7 @@
             <el-form-item label="提现金额">
               <el-input v-model="form.amount" :disabled="true"></el-input>
             </el-form-item>
-            <el-form-item label="Estimated date of payment"> <!-- 预计付款日期 -->
+            <el-form-item label="Estimated date of payment" label-width="180"> <!-- 预计付款日期 -->
               <el-date-picker
                       v-model="form.planPaidAt"
                       type="date"
@@ -152,13 +152,13 @@
             <el-button @click="dialogEditFormVisible = false">Cancel<!-- 取 消 --></el-button>
             <el-button type="primary" @click.native="handleEdit">Edit<!-- 修 改 --></el-button>
           </div>
-        </el-dialog>
+        </el-dialog><!--修改提现信息-->
         <el-dialog title="Review withdrawal info" :visible.sync="dialogAuditFormVisible"> <!-- 审核提现信息 -->
           <el-alert
                   :title="auditForm.auditTips"
                   type="warning" :closable="false">
           </el-alert>
-          <el-form :model="auditForm" label-width="150px" style="width:500px;" v-loading="dialogAuditLoading">
+          <el-form :model="auditForm" label-width="180px" style="width:500px;" v-loading="dialogAuditLoading">
             <el-form-item label="Estimated date of payment" v-show="filterStatus==='2' || filterStatus==='4'"> <!-- 预计付款日期 -->
               <el-date-picker
                       v-model="auditForm.planPaidAt"
@@ -219,6 +219,7 @@ export default {
       totalPages: 1,
       totalCount: 1,
       pageSize: 20,
+      pageSizes:  [1, 2, 5, 10, 20, 50, 100],
       tool: tool,
       permission: permission,
       regTypes: baseInfo.regTypes(),
@@ -318,7 +319,7 @@ export default {
     handleMuli (command) {
       if (this.multipleSelection.length < 1) {
         this.$message({
-          message: '请选择要操作的记录',
+          message: 'Select the record to operate on', // 请选择要操作的记录
           type: 'warning'
         })
         return;
@@ -328,15 +329,15 @@ export default {
     handleAudit (row = null, status) {
       let title = ''
       if (status === '2') {
-        title = '确定要通过审核?备注:'
+        title = 'Be sure to pass the review?Note:'// 确定要通过审核?备注:
       }else if(status === '3') {
-        title = '确定要设为待付款?备注:'
+        title = 'Be sure to unpaid the review?Note:'// 确定要设为待付款?备注:
       }else if(status === '4') {
-        title = '确定要设为付款失败?备注:'
+        title = 'Be sure to payment failure the review?Note:'// 确定要设为付款失败?备注:
       }else if(status === '6') {
-        title = '确定要设为已付款?备注:'
+        title = 'Be sure to paid the review?Note:'// 确定要设为已付款?备注:
       }else if(status === '7') {
-        title = '确定要设为已退回?备注:'
+        title = 'Be sure to return the review?Note:'//确定要设为已退回?备注:
       }
       this.handleStatusShow(row,status,title);
     },
@@ -354,8 +355,8 @@ export default {
         filterData.selectedIds = selectedIds
       }
       this.$confirm('Are you sure you want to export the current data?', 'Hint', {
-        confirmButtonText: 'confirm', // 确定
-        cancelButtonText: 'cancel', // 取消
+        confirmButtonText: 'Confirm', // 确定
+        cancelButtonText: 'Cancel', // 取消
         type: 'warning'
       }).then(() => {
         return network.getData('finance/withdraw-export', filterData)
@@ -388,7 +389,7 @@ export default {
     handleEdit () {
       this.dialogEditFormVisible = false
       this.$message({
-        message: '正在修改数据',
+        message: 'Modifying data',//正在修改数据
         type: 'info'
       })
       this.loading = true
@@ -420,7 +421,7 @@ export default {
       }
       if (this.auditForm.selectedIds.length === 0) {
         this.$message({
-          message: '请选择数据',
+          message: 'Select the record to operate on',// 请选择数据
           type: 'warning'
         })
         return
@@ -434,8 +435,8 @@ export default {
       network.postData('finance/mult-point', {opType: 2}).then(response => {
         this.auditForm.withdrawAudit = response.withdrawAudit
         this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
-          confirmButtonText: 'confirm', // 确定
-          cancelButtonText: 'cancel', // 取消
+          confirmButtonText: 'Confirm', // 确定
+          cancelButtonText: 'Cancel', // 取消
           type: 'warning'
         }).then(() => {
           return network.postData('finance/withdraw-status', this.auditForm)

+ 1 - 1
backendEle/src/views/reconsume/change-audit-list.vue

@@ -204,7 +204,7 @@
       handleMuli(command) {
         if (this.multipleSelection.length < 1) {
           this.$message({
-            message: '请选择要操作的记录',
+            message: 'Select the record to operate on', // '请选择要操作的记录',
             type: 'warning'
           })
           return;

+ 1 - 1
backendEle/src/views/user/reg-info-audit.vue

@@ -401,7 +401,7 @@
       handleMuli(command) {
         if (this.multipleSelection.length < 1) {
           this.$message({
-            message: '请选择要操作的记录',
+            message: 'Select the record to operate on', // '请选择要操作的记录',
             type: 'warning'
           })
           return;

+ 1 - 1
backendEle/src/views/user/status-audit-list.vue

@@ -158,7 +158,7 @@
       handleMuli(command) {
         if (this.multipleSelection.length < 1) {
           this.$message({
-            message: '请选择要操作的记录',
+            message: 'Select the record to operate on', // '请选择要操作的记录',
             type: 'warning'
           })
           return;

+ 17 - 0
common/helpers/Cache.php

@@ -341,4 +341,21 @@ class Cache
         return UserRelation::getAllParentsFromRedis($userId);
     }
 
+    /**
+     * 设置 当前自动发放奖金的状态
+     *
+     *
+     */
+    public static function setWithdrawLock($status){
+        Yii::$app->cache->set('withdrawLock', $status);
+    }
+
+    /**
+     * 获取 当前自动发放奖金的状态
+     *
+     *
+     */
+    public static function getWithdrawLock(){
+        return Yii::$app->cache->get('withdrawLock');
+    }
 }

+ 5 - 3
common/helpers/user/Balance.php

@@ -269,8 +269,9 @@ class Balance {
             $periodNum = $params['PERIOD_NUM'];
         }
         $calcYearMonth = $period->getYearMonth($periodNum);
-        // 汇率
-        $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0);
+        // TODO: 汇率
+//        $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0);
+        $exchangeRate = 1;
         // redis加锁(防止并发余额数值不准确出错)
         switch ($type) {
             case 'BONUS':
@@ -435,9 +436,10 @@ class Balance {
             } else {
                 $paramData = [
                     'USER_ID'=>$userId,
-                    $type=>$amount,
+                    $type=>$issueBonus ? $amount * $exchangeRate : $amount,
                     'CREATED_AT'=>Date::nowTime()
                 ];
+
                 if (isset($params['QY'])) {
 //                    $paramData['QY_TOTAL'] = new Expression('QY_TOTAL + '.$params['QY']);
                     $paramData['QY_TOTAL'] =  ($issueBonus ? $params['QY'] * $exchangeRate : $params['QY']);

+ 1 - 1
common/models/Withdraw.php

@@ -134,7 +134,7 @@ class Withdraw extends \common\components\ActiveRecord {
             'CREATED_AT' => '创建时间',
             'UPDATED_AT' => '修改时间',
             'AUDITED_AT' => '审核时间',
-            'PLAN_PAID_AT' => '预计付款时间',
+            'PLAN_PAID_AT' => 'Estimated time of payment',  // 预计付款时间
             'PAID_AT' => '付款时间',
             'PAID_FAIL_REMARK' => '付款失败备注',
             'PAID_FAIL_AT' => '付款失败时间',

+ 16 - 0
common/models/forms/DeclarationForm.php

@@ -647,6 +647,14 @@ class DeclarationForm extends Model
                     'GOODS_TITLE' => $decPackage['PACKAGE_NAME'],
                     'EMAIL' => $this->email
                 ];
+                // 更改库存和状态
+                $data = DeclarationPackage::find()->where(['ID' => $decPackage['ID']])->one();
+                $data->STORE_NUMS = $data->STORE_NUMS - 1;
+                if($data->STORE_NUMS <= 0){
+                    $data->STATUS = 0;
+                    $data->UPDATED_AT = Date::nowTime();
+                }
+                $data->update();
             }else{
                 $ids = $this->goodsId;
                 $totalAmount = 0;
@@ -670,6 +678,14 @@ class DeclarationForm extends Model
                                 'EMAIL' => $this->email,
                                 'TAX_RATE' => $goods['TAX_RATE'],
                             ];
+                            // 更改库存和状态
+                            $data = ShopGoods::find()->where(['ID' => $goods['ID']])->one();
+                            $data->STORE_NUMS = $data->STORE_NUMS - intval($v);
+                            if($data->STORE_NUMS <= 0){
+                                $data->STATUS = 0;
+                                $data->UPDATED_AT = Date::nowTime();
+                            }
+                            $data->update();
                         }
                     }
                 }

+ 26 - 74
common/models/forms/DeclarationLoopForm.php

@@ -117,65 +117,32 @@ class DeclarationLoopForm extends Model
             foreach ($this->data as $value){
 				
 				/**
-				                 * 2022-04-29
-				                 * York
-				                 * 获取商品套餐信息
-				                 */
-				                if (isset($value['packageId']) && $value['packageId']){
-				
-				
-				                    $packagedata = DeclarationPackage::findOneAsArray('ID=:ID', [':ID' => $value['packageId']]);
-				                    //var_dump($packagedata['ID']);
-				                    if($packagedata['STORE_NUMS']>0){
-				                        $data =  DeclarationPackage::find()->where(['ID'=> $packagedata['ID'] ])->one();
-				                        $goods_store_nums = $data->STORE_NUMS - 1;
-				                        $data->STORE_NUMS = $goods_store_nums;
-				                        $data->update();
-				//                        var_dump('输出一下数量');
-				//                        var_dump($goods_store_nums);
-				                        //库存为0下架套餐
-				                        if ($goods_store_nums <= 0){
-				                            $data->STATUS = 0;
-				                            $data->UPDATED_AT = Date::nowTime();
-				//                            var_dump('购买后套餐库存为0 下架拉');
-				                        }
-				
-				                    }else{
-				                        throw new Exception($packagedata['PACKAGE_NAME'].'Insufficient inventory');// 库存不足
-				                    }
-				
-				
-				                }
-								
-								if (count($value['goodsId']) > 0 && (count($value['goodsId']) == count($value['goodsNum']))){
-								    for ($i=0;$i<count($value['goodsId']);$i++){
-								        $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $value['goodsId'][$i]]);
-								        if ($goods['STATUS'] == 1 ){
-								            if($goods['STORE_NUMS'] >= $value['goodsNum'][$i]){
-								                $data = ShopGoods::find()->where(['ID' => $value['goodsId'][$i]])->one();
-								                $goods_store_nums = $data->STORE_NUMS - $value['goodsNum'][$i];
-								                $data->STORE_NUMS = $goods_store_nums;
-								                $data->update();
-								                if($goods_store_nums <= 0){
-								                    $data->STATUS = 0;
-								                    $data->UPDATED_AT = Date::nowTime();
-								                    $data->update();
-								                }
-								            }else{
-								                throw new Exception($goods['GOODS_NAME'].'Insufficient inventory');// 商品库存不足
-								            }
-								
-								        }else{
-								            throw new Exception($goods['GOODS_NAME'].'Sold out');// 商品已下架
-								        }
-								
-								    }
-								
-								}
-				
-				
-				
-				
+                 * 2022-04-29
+                 * York
+                 * 获取商品套餐信息
+                 */
+                if (isset($value['packageId']) && $value['packageId']){
+
+                    $packagedata = DeclarationPackage::findOneAsArray('ID=:ID', [':ID' => $value['packageId']]);
+                    //var_dump($packagedata['ID']);
+                    if($packagedata['STORE_NUMS']<=0){
+                        throw new Exception($packagedata['PACKAGE_NAME'].'Insufficient inventory');// 库存不足
+                    }
+                }
+
+                if (count($value['goodsId']) > 0 && (count($value['goodsId']) == count($value['goodsNum']))){
+                    for ($i=0;$i<count($value['goodsId']);$i++){
+                        $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $value['goodsId'][$i]]);
+                        if ($goods['STATUS'] == 1 ){
+                            if($goods['STORE_NUMS'] < $value['goodsNum'][$i]){
+                                throw new Exception($goods['GOODS_NAME'].'Insufficient inventory');// 商品库存不足
+                            }
+                        }else{
+                            throw new Exception($goods['GOODS_NAME'].'Sold out');// 商品已下架
+                        }
+                    }
+                }
+
                 if(is_array($value)){
                     foreach($value as $key=>$decFormData){
                         $model->$key = $decFormData;
@@ -194,26 +161,11 @@ class DeclarationLoopForm extends Model
                     if(!$model->add($this->data)){
                         throw new Exception(Form::formatErrorsForApi($model->getErrors()));
                     }
-//                    $model->type = null;
-//                    $model->decSn = null;
-//                    $model->userId = null;
-//                    $model->toUserId = null;
-//                    $model->decPv = null;
-//                    $model->insertUserName = null;
-//                    $model->insertUserIdCard = null;
-//                    $model->conUserName = null;
-//                    $model->recUserName = null;
-//                    $model->location = null;
                 } else {
                     throw new Exception('The format of the report data is incorrect');// 报单数据格式错误
                 }
             }
 
-            // 把这几个首购单的注册用户点位绑定到一起
-//            UserBind::zcBind($allZcUserIds, $zcUserIdCard);
-//            if((microtime(true) - $startTime) >= 20)  {
-//                throw new Exception('服务端报单超时');
-//            }
             $transaction->commit();
         } catch (\Exception $e){
             $transaction->rollBack();

+ 28 - 32
common/models/forms/DeclarationUpgradeForm.php

@@ -282,39 +282,35 @@ class DeclarationUpgradeForm extends Model
                 throw new Exception(Form::formatErrorsForApi($orderModel->getErrors()));
             }
 			
-			/**
-			  * 2022-05-10
-			  * York
-			  */
-			 foreach ($this->goodsNum as $k => $v) {
-			     if ($v) {
-			         $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $this->goodsId[$k]]);
-			
-			         $storenums = $goods['STORE_NUMS'] - $this->goodsNum[$k];
-			         if($goods['STATUS']==1){
-			            if($goods['STORE_NUMS'] >=$this->goodsNum[$k]){
-			                $data = ShopGoods::find()->where(['ID' => $this->goodsId[$k]])->one();
-			                $data->STORE_NUMS = $storenums;
-			                $data->update();
-			                if ($storenums==0){
-			                    $data->STATUS = 0;
-			                    $data->UPDATED_AT = Date::nowTime();
-			                    $data->update();
-			                }
-			            }else{
-//			                throw new Exception("商品".$goods['GOODS_NAME']."库存不足");
-                            throw new Exception("product".$goods['GOODS_NAME']."Insufficient inventory");
-			            }
-			         }else{
-//			             throw new Exception("商品".$goods['GOODS_NAME']."已下架");
-                         throw new Exception("product".$goods['GOODS_NAME']."Removed from the shelf");
-			         }
-			     }
-			 }
-			// exit();
-
-
+            /**
+             * 2022-05-10
+             * York
+             */
+            foreach ($this->goodsNum as $k => $v) {
+                if ($v) {
+                    $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $this->goodsId[$k]]);
 
+                    $storenums = $goods['STORE_NUMS'] - $this->goodsNum[$k];
+                    if($goods['STATUS']==1){
+                        if($goods['STORE_NUMS'] >=$this->goodsNum[$k]){
+                            $data = ShopGoods::find()->where(['ID' => $this->goodsId[$k]])->one();
+                            $data->STORE_NUMS = $storenums;
+                            $data->update();
+                            if ($storenums==0){
+                                $data->STATUS = 0;
+                                $data->UPDATED_AT = Date::nowTime();
+                                $data->update();
+                            }
+                        }else{
+//                          throw new Exception("商品".$goods['GOODS_NAME']."库存不足");
+                            throw new Exception("product".$goods['GOODS_NAME']."Insufficient inventory");
+                        }
+                    }else{
+//                          throw new Exception("商品".$goods['GOODS_NAME']."已下架");
+                        throw new Exception("product".$goods['GOODS_NAME']."Removed from the shelf");
+                    }
+                }
+            }
 
             // 加入商品到订单商品表
             foreach($this->_orderGoods as $key=>$value){

+ 59 - 0
common/models/forms/UserBonusForm.php

@@ -0,0 +1,59 @@
+<?php
+namespace common\models\forms;
+
+use common\components\Model;
+use yii\base\Exception;
+
+/**
+ * Login form
+ */
+class UserBonusForm extends Model
+{
+    public $periodNum;
+
+    private $_periodModel;
+    private $_limit = 1000;
+
+    /**
+     * @inheritdoc
+     */
+    public function rules()
+    {
+        return [];
+    }
+
+    public function scenarios()
+    {
+        $parentScenarios =  parent::scenarios();
+        $customScenarios = [
+            'autoWithdraw' => [],
+        ];
+        return array_merge($parentScenarios, $customScenarios);
+    }
+
+    public function attributeLabels()
+    {
+        return [];
+    }
+
+    /**
+     * 页面请求异步处理,生成提现单
+     * @return string | null
+     */
+    public function autoWithdrawWebToAsync(){
+        if(!$this->validate()){
+            return null;
+        }
+        // 异步处理添加任务
+        $settings = \Yii::$app->params['swooleAsyncTimer'];
+        $bonusSettings = \Yii::$app->params['swooleBonusConfig'];
+        $settings = array_merge($settings, $bonusSettings);
+        $taskKey = \Yii::$app->swooleAsyncTimer->asyncHandle('bonus/auto-withdraw', \Yii::$app->request->get(), $settings);
+        if($taskKey === false){
+            $this->addError('perf', '请求失败');
+            return null;
+        }
+        return 1;
+    }
+
+}

+ 65 - 0
common/models/forms/WithdrawForm.php

@@ -101,6 +101,7 @@ class WithdrawForm extends Model {
             'editByAdmin' => ['id', 'planPaidAt', 'createRemark'],
             'backByUser' => ['id', 'createRemark'],
             'excelPaidFalse' => ['sn', 'withdrawPeriodNum', 'paidAt', 'paidFailRemark', 'userName', 'realName', 'amount', 'bankRealName', 'bankNo'],
+            'batchWithdraw' => ['userName', 'applyAmount']
         ];
         return array_merge($parentScenarios, $customScenarios);
     }
@@ -703,4 +704,68 @@ class WithdrawForm extends Model {
         return true;
     }
 
+    /**
+     * 批量自动提现
+     *
+     *
+     * @throws \yii\db\Exception
+     */
+    public function batchWithdraw($limit, $start){
+        $config = Cache::getSystemConfig();
+        $minAmount = $config['manualWithdrawMinAmount']['VALUE'];
+        // 查找有奖金的用户
+        $allData = UserBonus::find()->select('USER_ID, USER_NAME, ID_CARD, BONUS')->from(UserBonus::tableName().' AS UB')->join('LEFT JOIN', User::tableName().' AS U','UB.USER_ID = U.ID')->where("BONUS>$minAmount")->offset(0)->limit($limit)->orderBy('U.ID')->asArray()->all();
+        if($allData){
+            foreach ($allData as $data){
+                $db = \Yii::$app->db;
+                $transaction = $db->beginTransaction();
+                try {
+                    $nowTime = $this->createdAt ?: Date::nowTime();
+                    $period = Withdraw::getPeriod($nowTime);
+                    //扣除会员奖金
+                    Balance::changeUserBonus($data['USER_ID'], 'BONUS', -abs($data['BONUS']), ['DEAL_TYPE_ID'=>DealType::WITHDRAW,'REMARK' => 'batch withdrawal', 'TIME' => $nowTime]);
+                    //手续费
+                    $fees = $data['BONUS'] * $config['withdrawFee']['VALUE']/100;
+                    $fees = Tool::formatPrice($fees);
+                    $realAmount = $data['BONUS'] - $fees;
+                    //判断付款类型
+                    $payType = Withdraw::PAY_TYPE_NO_INVOICE;
+                    $withdrawModel = new Withdraw();
+                    $withdrawModel->SN = $this->_generateSn();
+                    $withdrawModel->USER_ID = $data['USER_ID'];
+                    $withdrawModel->ID_CARD = $data['ID_CARD'];
+                    $withdrawModel->WITHDRAW_PERIOD_NUM = $period['nowPeriodNum'];
+                    $withdrawModel->WITHDRAW_YEAR = $period['nowYear'];
+                    $withdrawModel->WITHDRAW_MONTH = $period['nowMonth'];
+                    $withdrawModel->PAY_TYPE = $payType;
+                    $withdrawModel->IS_AUTO_WITHDRAW = $this->scenario == 'batchWithdraw' ? 1 : 0;
+                    $withdrawModel->AMOUNT = $data['BONUS'];
+                    $withdrawModel->FEES = $fees;
+                    $withdrawModel->REAL_AMOUNT = $realAmount;
+                    $withdrawModel->P_MONTH = Date::ociToDate($period['yearMonth'], Date::OCI_TIME_FORMAT_SHORT_MONTH);
+                    $withdrawModel->AUDIT_STATUS = Withdraw::STATUS_APPLIED;
+                    $withdrawModel->CREATED_AT = $nowTime;
+                    //预计付款时间
+                    $withdrawModel->PLAN_PAID_AT = $period['endTime'] + $config['withdrawFreezeDays']['VALUE'] * 3600 * 24;
+
+                    if (!$withdrawModel->save()) {
+                        throw new Exception(Form::formatErrorsForApi($withdrawModel->getErrors()));
+                    }
+//                    print_r($data['BONUS'].',,'.$i.PHP_EOL);
+                    $transaction->commit();
+                    unset($withdrawModel);
+                } catch (Exception $e) {
+                    $transaction->rollBack();
+                    $this->addError('add', $e->getMessage());
+                    return false;
+                }
+            }
+            unset($allData);
+            $start = $start + $limit;
+
+            return self::batchWithdraw($limit, $start);
+        }
+        return true;
+    }
+
 }

+ 13 - 0
console/controllers/BonusController.php

@@ -53,8 +53,10 @@ use common\helpers\http\RemoteUploadApi;
 use common\helpers\Log;
 use common\libs\export\module\BonusExport;
 use common\models\forms\PeriodForm;
+use common\models\forms\WithdrawForm;
 use common\models\LogAsync;
 use common\models\Withdraw;
+use common\models\UserBonus;
 use yii\db\Exception;
 
 class BonusController extends BaseController
@@ -547,4 +549,15 @@ class BonusController extends BaseController
         unset($factory, $taskId, $className, $listName);
         return false;
     }
+
+    /**
+     * 批量提现
+     *
+     */
+    public function actionAutoWithdraw($taskKey){
+        Cache::setWithdrawLock(1);
+        $formModel = new WithdrawForm();
+        $formModel->batchWithdraw(1000,0);
+        Cache::setWithdrawLock(0);
+    }
 }

+ 1 - 1
frontendApi/config/menu.php

@@ -90,7 +90,7 @@ return [
            // ['name'=>'房产积分', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'fc-point', 'routePath'=>'bonus/fc-point', 'show'=>1,],
 //            ['name'=>'报单中心补助明细查询', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bt', 'routePath'=>'bonus/flow-bt', 'show'=>1,],
 //            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
-            ['name'=>'Withdrawal details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>1,],//提现明细
+            ['name'=>'Withdrawal details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>0,],//提现明细
             ['name'=>'申请提现', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-add', 'routePath'=>'finance/withdraw-add', 'show'=>0,],
             ['name'=>'Recharge details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],//充值明细
             ['name'=>'Apply for recharge', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>0,], // 申请充值

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

@@ -123,7 +123,7 @@ class DashboardController extends BaseController
             'slides'=>Ad::findUseSlaves()->select('ID,IMAGE,LID,TITLE,CONTENT,TYPE')->where('LID=:LID AND STATUS=1', [':LID'=>'7EFF6260A16C3CC7E053693418AC03E4'])->orderBy('SORT ASC')->asArray()->all(),
             'news'=>$news,
 //            'periodNum'=>'Period '.$periodNum.' ,'.$curYM['CALC_MONTH'].'月第'.$wkrd.'周,共'.$weeks.'周',
-            'periodNum'=>$periodNum.' ,'.$wkrd.' period  of '. $monthArray[$curYM['CALC_MONTH']],
+            'periodNum'=>$periodNum.' ,'.$wkrd.' PC of '. $monthArray[$curYM['CALC_MONTH']],
             'myRemainPv'=>$totalRemainPv,
             'activeEnd'=>$activeEnd
         ]);

+ 1 - 0
frontendApi/modules/v1/controllers/FinanceController.php

@@ -32,6 +32,7 @@ use common\models\Transfer;
 use common\models\Uploads;
 use common\models\UserInfo;
 use common\models\Withdraw;
+use common\models\UserBonus;
 use yii\helpers\Json;
 use yii\web\UploadedFile;
 

+ 14 - 0
frontendEle/src/App.vue

@@ -18,4 +18,18 @@ export default {
     padding: 0;
     background: #f4f6f8;
   }
+  .el-table__body-wrapper::-webkit-scrollbar {
+    width: 12px; /*滚动条宽度*/
+    height: 10px; /*滚动条高度*/
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-track {
+    border-radius: 10px; /*滚动条的背景区域的圆角*/
+    -webkit-box-shadow: inset 0 0 15px rgba(238,238,238, 0.3);
+    background-color: #eeeeee; /*滚动条的背景颜色*/
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-thumb {
+    border-radius: 10px; /*滚动条的圆角*/
+    -webkit-box-shadow: inset 0 0 15px rgba(145, 143, 0143, 0.3);
+    background-color: rgb(145, 143, 143); /*滚动条的背景颜色*/
+  }
 </style>

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

@@ -17,7 +17,7 @@
                   :key="key" v-if="myEmpLv['ICON_TYPE']>0">-->
               </el-col><!--聘级-->
               <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Member Level:{{decLvName}}</el-col><!--会员级别-->
-              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Period:{{periodNum}}</el-col><!--当前业绩期-->
+              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Pay Cycle:{{periodNum}}</el-col><!--当前业绩期-->
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Remain BV:{{myRemainPv}}</el-col><!--剩余的PV-->
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Active Deadline Date:{{activeEnd}}</el-col><!--活跃日期截止-->
             </el-row>

+ 2 - 0
sql/upgrade/1988.sql

@@ -2,6 +2,8 @@
 ALTER TABLE `AR_EMPLOY_LEVEL` ADD COLUMN `ACHIEVE_MEMBER_NUM` INT NOT NULL DEFAULT '0' COMMENT '推荐会员达标数' AFTER `ACHIEVE_PV`;
 ALTER TABLE `AR_EMPLOY_LEVEL` ADD COLUMN `ACHIEVE_PERF_PV` decimal(10, 2) NOT NULL DEFAULT '0.00' COMMENT '推荐会员及格后晋级达标业绩PV' AFTER `ACHIEVE_MEMBER_NUM`;
 
+UPDATE `AR_EMPLOY_LEVEL` SET `ACHIEVE_MEMBER_NUM` = 3, `ACHIEVE_PERF_PV` = 1000 WHERE ID = 'E121497617216708615';
+
 -- 蓝星管理奖增加推荐会员相关属性
 ALTER TABLE `AR_BS_BONUS_103_CALC` ADD COLUMN `ACHIEVE_MEMBER_NUM` INT NOT NULL DEFAULT '0' COMMENT '推荐会员达标数';
 ALTER TABLE `AR_BS_BONUS_103_CALC` ADD COLUMN `ACHIEVE_PERF_PV` decimal(10, 2) NOT NULL DEFAULT '0.00' COMMENT '推荐会员及格后晋级达标业绩PV';