Browse Source

feat: NG-74: 调整奖金计算页面.

kevin 1 year ago
parent
commit
5e8660befe
4 changed files with 61 additions and 57 deletions
  1. 1 1
      src/api/bonus.js
  2. 1 1
      src/lang/en.js
  3. 1 1
      src/lang/zh.js
  4. 58 54
      src/views/bonus/period.vue

+ 1 - 1
src/api/bonus.js

@@ -230,7 +230,7 @@ export function fetchClosePeriod(query) {
 
 export function fetchCalcPeriod(query) {
   return request({
-    url: '/v1/calc/calc-period/' + query,
+    url: '/v1/bonus/calc-period/' + query,
     method: 'get'
   })
 }

+ 1 - 1
src/lang/en.js

@@ -216,7 +216,7 @@ export default {
     settlementDate: 'Settlement Date',
     networkConnectionTime: 'Network connection time',
     closurePeriod: 'Closure period',
-    logRefresh: 'Log refresh',
+    logRefresh: 'Bonus Log',
     actionTime: 'Operating time(WAT)',
     logContent: 'Log content',
     autoCalculation: 'Automatic calculation',

+ 1 - 1
src/lang/zh.js

@@ -215,7 +215,7 @@ export default {
     settlementDate: '结算时间',
     networkConnectionTime: '挂网时间',
     closurePeriod: '封期',
-    logRefresh: '日志刷新',
+    logRefresh: '日志',
     actionTime: '操作时间(WAT)',
     logContent: '日志内容',
     autoCalculation: '自动计算',

+ 58 - 54
src/views/bonus/period.vue

@@ -24,23 +24,23 @@
             <!-- 应结束于 -->{{ $t('bonus.shouldEndOn') }}:{{getWatTime(scope.row.END_TIME)}}
           </template>
         </el-table-column>
-        <el-table-column :label="$t('bonus.closingTime')" width="180"><!-- 封期时间 -->
-          <template slot-scope="scope">
-            {{getWatTime(scope.row.CLOSED_AT)}}
-          </template>
-        </el-table-column>
+<!--        <el-table-column :label="$t('bonus.closingTime')" width="180">&lt;!&ndash; 封期时间 &ndash;&gt;-->
+<!--          <template slot-scope="scope">-->
+<!--            {{getWatTime(scope.row.CLOSED_AT)}}-->
+<!--          </template>-->
+<!--        </el-table-column>-->
 <!--        <el-table-column label="Performance sheet progress" width="90">&lt;!&ndash; 业绩单进度 &ndash;&gt;-->
 <!--          <template slot-scope="scope">-->
 <!--            <el-progress type="circle" :percentage="Number.parseInt(percentList['PERF_PERCENT'][scope.row.ID])"-->
 <!--                         :width="50" :stroke-width="3"></el-progress>-->
 <!--          </template>-->
 <!--        </el-table-column>-->
-        <el-table-column :label="$t('bonus.timeOfGeneratingPerformanceSheet')" width="230"><!-- 生成业绩单时间 -->
-          <template slot-scope="scope">
-            <!-- 开始 -->{{ $t('bonus.start') }}:{{getWatTime(scope.row.PERF_STARTED_AT)}}<br>
-            <!-- 完成 -->{{ $t('bonus.complete') }}:{{getWatTime(scope.row.PERFED_AT)}}
-          </template>
-        </el-table-column>
+<!--        <el-table-column :label="$t('bonus.timeOfGeneratingPerformanceSheet')" width="230">&lt;!&ndash; 生成业绩单时间 &ndash;&gt;-->
+<!--          <template slot-scope="scope">-->
+<!--            &lt;!&ndash; 开始 &ndash;&gt;{{ $t('bonus.start') }}:{{getWatTime(scope.row.PERF_STARTED_AT)}}<br>-->
+<!--            &lt;!&ndash; 完成 &ndash;&gt;{{ $t('bonus.complete') }}:{{getWatTime(scope.row.PERFED_AT)}}-->
+<!--          </template>-->
+<!--        </el-table-column>-->
 <!--        <el-table-column label="Settlement progress" width="80">&lt;!&ndash; 结算进度 &ndash;&gt;-->
 <!--          <template slot-scope="scope">-->
 <!--            <el-progress type="circle" :percentage="Number.parseInt(percentList['CALC_PERCENT'][scope.row.ID])"-->
@@ -71,50 +71,55 @@
 <!--                       @click.native="trialCalcHandle(scope.row.PERIOD_NUM)" >-->
 <!--              计算-->
 <!--            </el-button>-->
-            <el-button v-if="(scope.row.IS_CAN_CLOSE || scope.row.IS_CAN_PERF) && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"
-                       @click="dialogTableVisible = true;currentPeriod = scope.row.PERIOD_NUM;getDialogData();">
-              {{$t('common.action')}}</el-button>
-            <el-button style="margin: 0 0 !important;" v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"
-                       @click.native="closeHandle(scope.row)">
-              {{$t('bonus.closurePeriod')}}<!-- 封期 -->
-            </el-button>
-            <el-button style="margin: 0 0 !important;" @click.native="sentHandle(scope.row)" type="primary" class="button"
-                              v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">
-              <!-- 挂网 -->{{ $t('bonus.spreadNet') }}
+<!--            <el-button v-if="(scope.row.IS_CAN_CLOSE || scope.row.IS_CAN_PERF) && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"-->
+<!--                       @click="dialogTableVisible = true;currentPeriod = scope.row.PERIOD_NUM;getDialogData();">-->
+<!--              {{$t('common.action')}}</el-button>-->
+<!--            <el-button style="margin: 0 0 !important;" v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"-->
+<!--                       @click.native="closeHandle(scope.row)">-->
+<!--              {{$t('bonus.closurePeriod')}}&lt;!&ndash; 封期 &ndash;&gt;-->
+<!--            </el-button>-->
+
+            <!-- 计算 -->
+            <el-button v-if="scope.row.IS_CAN_CALC" class="button" type="primary" @click.native="calcHandle(scope.row.PERIOD_NUM)">{{ $t('bonus.calculationOfBonus') }}</el-button>
+            <!-- 挂网 -->
+            <el-button @click.native="sentHandle(scope.row)" type="primary" class="button" v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">
+              {{ $t('bonus.spreadNet') }}
             </el-button>
+            <!-- 日志 -->
+            <el-button v-if="scope.row.IS_SHOW_LOG" class="button" type="primary" @click.native="getDialogData(scope.row.PERIOD_NUM);dialogLoading=true;" >{{$t('bonus.logRefresh')}}</el-button>
 
-						<el-button  class="button customstyle" style="margin-left:10px;" type="success" @click.native="autoCalcHandle(scope.row.PERIOD_NUM)" v-if="(scope.row.IS_CAN_CLOSE || scope.row.IS_CAN_PERF) && permission.hasPermission(`bonus/auto-calc`) && !permission.hasPermission(`bonus/close-period`)">{{$t('bonus.autoCalculation')}}</el-button>
+<!--						<el-button  class="button customstyle" style="margin-left:10px;" type="success" @click.native="autoCalcHandle(scope.row.PERIOD_NUM)" v-if="(scope.row.IS_CAN_CLOSE || scope.row.IS_CAN_PERF) && permission.hasPermission(`bonus/auto-calc`) && !permission.hasPermission(`bonus/close-period`)">{{$t('bonus.autoCalculation')}}</el-button>-->
 
-            <el-dialog :title="$t('bonus.logTitle', { currentPeriod: currentPeriod })" :visible.sync="dialogTableVisible" append-to-body :width="screenWidth">
-              <el-row>
-                <el-button style="margin-left:10px;" class="button" type="primary" @click.native="getDialogData();dialogLoading=true;" >
-                  {{$t('bonus.logRefresh')}}
-                </el-button>
-              </el-row>
-              <el-divider></el-divider>
+<!--            <el-dialog :title="$t('bonus.logTitle', { currentPeriod: currentPeriod })" :visible.sync="dialogTableVisible" append-to-body :width="screenWidth">-->
+<!--              <el-row>-->
+<!--                <el-button style="margin-left:10px;" class="button" type="primary" @click.native="getDialogData();dialogLoading=true;" >-->
+<!--                  {{$t('bonus.logRefresh')}}-->
+<!--                </el-button>-->
+<!--              </el-row>-->
+<!--              <el-divider></el-divider>-->
 
-              <el-row>
-                <el-button  class="button customstyle" v-if="permission.hasPermission(`bonus/auto-calc`)" style="margin-left:10px;" type="success" @click.native="autoCalcHandle(currentPeriod)">{{$t('bonus.autoCalculation')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="perfOrderHandle(currentPeriod)" >{{$t('bonus.createPerformanceSheet')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="initDataHandle(currentPeriod)" >{{$t('bonus.initializeBasicData')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="perfPeriodHandle(currentPeriod)" >{{$t('bonus.generationPeriodPerformance')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="pullPerfPeriodHandle(currentPeriod)" >{{$t('bonus.pullPeriodPerformance')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="calcBonusHandle(currentPeriod)" >{{$t('bonus.calculationOfBonus')}}</el-button>
-                <el-button  class="button customstyle" type="primary" @click.native="pullBonusHandle(currentPeriod)" >{{$t('bonus.pullBonusData')}}</el-button>
-              </el-row>
+<!--              <el-row>-->
+<!--                <el-button  class="button customstyle" v-if="permission.hasPermission(`bonus/auto-calc`)" style="margin-left:10px;" type="success" @click.native="autoCalcHandle(currentPeriod)">{{$t('bonus.autoCalculation')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="perfOrderHandle(currentPeriod)" >{{$t('bonus.createPerformanceSheet')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="initDataHandle(currentPeriod)" >{{$t('bonus.initializeBasicData')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="perfPeriodHandle(currentPeriod)" >{{$t('bonus.generationPeriodPerformance')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="pullPerfPeriodHandle(currentPeriod)" >{{$t('bonus.pullPeriodPerformance')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="calcBonusHandle(currentPeriod)" >{{$t('bonus.calculationOfBonus')}}</el-button>-->
+<!--                <el-button  class="button customstyle" type="primary" @click.native="pullBonusHandle(currentPeriod)" >{{$t('bonus.pullBonusData')}}</el-button>-->
+<!--              </el-row>-->
 
 <!--                  <el-row><el-button class="button" type="primary" @click.native="autoPerfHandle(currentPeriod)" >计算和拉取期业绩</el-button></el-row>-->
-                <div>
-                  <el-table :data="dialogData" height="550" v-loading="dialogLoading" style="width: 100%">
-                    <el-table-column prop="CREATED_AT" :label="$t('bonus.actionTime')" width="180">
-                      <template slot-scope="scope">
-                        {{getWatTime(scope.row.CREATED_AT)}}
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="TEXT" :label="$t('bonus.logContent')" width="650"></el-table-column>
-                  </el-table>
-              </div>
-            </el-dialog>
+<!--                <div>-->
+<!--                  <el-table :data="dialogData" height="550" v-loading="dialogLoading" style="width: 100%">-->
+<!--                    <el-table-column prop="CREATED_AT" :label="$t('bonus.actionTime')" width="180">-->
+<!--                      <template slot-scope="scope">-->
+<!--                        {{getWatTime(scope.row.CREATED_AT)}}-->
+<!--                      </template>-->
+<!--                    </el-table-column>-->
+<!--                    <el-table-column prop="TEXT" :label="$t('bonus.logContent')" width="650"></el-table-column>-->
+<!--                  </el-table>-->
+<!--              </div>-->
+<!--            </el-dialog>-->
 
 <!--            <el-dropdown size="small" trigger="click" v-if=false>-->
 <!--            <el-dropdown size="small" trigger="click" v-if="scope.row.BUTTON_IS_CAN">-->
@@ -420,13 +425,12 @@ export default {
     //   })
     // },
 
-    getDialogData () {
-      let vueObj = this
+    getDialogData (period) {
       let paramsData = {
         page: this.currentDialogPage,
         pageSize: this.dialogPageSize,
       }
-      fetchRecordList(this.currentPeriod,paramsData).then(response => {
+      fetchRecordList(period, paramsData).then(response => {
         this.dialogData = response.data.list
         this.dialogLoading = false;
       })
@@ -451,13 +455,13 @@ export default {
           }
       })
     },
-    calcHandle (row) {
+    calcHandle (period) {
       this.$confirm(this.$t('bonus.performSettlementOperationHint'), this.$t('common.hint'), { // '确定对当前期进行结算操作?', '提示'
         confirmButtonText: this.$t('common.confirm'), // 确定
         cancelButtonText: this.$t('common.cancel'), // 取消
         type: 'warning'
       }).then(() => {
-        return fetchCalcPeriod(row.PERIOD_NUM)
+        return fetchCalcPeriod(period)
       }).then(response => {
         this.$message({
           message: response.data,