joway hace 2 años
padre
commit
0b606f53b7
Se han modificado 6 ficheros con 969 adiciones y 197 borrados
  1. 107 0
      src/api/bonus.js
  2. 129 98
      src/lang/en.js
  3. 130 98
      src/lang/zh.js
  4. 3 0
      src/main.js
  5. 7 1
      src/router/index.js
  6. 593 0
      src/views/bonus/period.vue

+ 107 - 0
src/api/bonus.js

@@ -141,3 +141,110 @@ export function fetchPerfAdjustmentPost(data) {
     data
   })
 }
+
+export function fetchPeriod(query) {
+  return request({
+    url: '/v1/bonus/period',
+    method: 'get',
+    params: query
+  })
+}
+
+export function fetchAutoWithdraw() {
+  return request({
+    url: '/v1/bonus/auto-withdraw',
+    method: 'get'
+  })
+}
+
+export function fetchRecordList(query, paramsData) {
+  return request({
+    url: '/v1/calc/record-list/' + query,
+    method: 'get',
+    params: paramsData
+  })
+}
+
+export function fetchAutoCalc(query) {
+  return request({
+    url: '/v1/calc/auto-calc/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchPerfOrderList(query) {
+  return request({
+    url: '/v1/calc/perf-order/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchInitData(query) {
+  return request({
+    url: '/v1/calc/init-data/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchCalcPerfPeriod(query) {
+  return request({
+    url: '/v1/calc/calc-perf-period/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchPullPerfPeriod(query) {
+  return request({
+    url: '/v1/calc/pull-perf-period/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchCalcBonus(query) {
+  return request({
+    url: '/v1/calc/calc-bonus/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchSyncCalcRecord(query) {
+  return request({
+    url: '/v1/calc/sync-calc-record/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchPullBonus(query) {
+  return request({
+    url: '/v1/calc/pull-bonus/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchClosePeriod(query) {
+  return request({
+    url: '/v1/calc/close-period/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchCalcPeriod(query) {
+  return request({
+    url: '/v1/calc/calc-period/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchPerfPeriod(query) {
+  return request({
+    url: '/v1/calc/perf-period/' + query,
+    method: 'get'
+  })
+}
+
+export function fetchSendPeriod(query) {
+  return request({
+    url: '/v1/calc/send-period/' + query,
+    method: 'get'
+  })
+}

+ 129 - 98
src/lang/en.js

@@ -139,11 +139,42 @@ export default {
     welcomePackOrder: 'Welcome Pack Order',
     memberCode: 'Member Code',
     balancePerformance: 'Balance Performance',
-    entryBalancePerformance:'Entry Balance Performance',
+    entryBalancePerformance: 'Entry Balance Performance',
     reconditioningBalancePerformance: 'Reconditioning Balance Performance',
     LMarketBalancePerformance: 'L. Market Balance Performance',
     RMarketBalancePerformance: 'R. Market Balance Performance',
-    confirmAndReviseMemberPerformance: 'Confirm and revise member performance?'
+    confirmAndReviseMemberPerformance: 'Confirm and revise member performance?',
+    periodNo: 'Period No.',
+    bonusMonth: 'Bonus Month',
+    timeframe: 'time frame',
+    closingTime: 'Closing time',
+    timeOfGeneratingPerformanceSheet: 'Time of generating performance sheet',
+    settlementDate: 'Settlement Date',
+    networkConnectionTime: 'Network connection time',
+    closurePeriod: 'Closure period',
+    logRefresh: '日志刷新',
+    actionTime: '操作时间(WAT)',
+    logContent: '日志内容',
+    autoCalculation: '自动计算',
+    createPerformanceSheet: '生成业绩单',
+    initializeBasicData: '初始化基础数据',
+    generationPeriodPerformance: '生成期业绩',
+    pullPeriodPerformance: '拉取期业绩',
+    calculationOfBonus: '计算奖金',
+    pullBonusData: '拉取奖金数据',
+    bulkWithdrawal: '批量提现',
+    periodNum: 'Number of periods',
+    year: 'Bonus Year',
+    month: 'Bonus Month',
+    startTime: 'Period start time',
+    endTime: 'Period end time',
+    closedAt: 'Closing time',
+    perfStartedAt: 'Start time of generating performance sheet',
+    perfedAt: 'End time of generating performance sheet',
+    calStartedAt: 'Settlement start time',
+    calculatedAt: 'Settlement end time',
+    sendStartedAt: 'Network connection start time',
+    sentAt: 'End time of network connection'
   },
   documentation: {
     documentation: 'Documentation',
@@ -197,7 +228,7 @@ export default {
     delete: 'Delete',
     cancel: 'Cancel',
     confirm: 'Confirm',
-    adopted:'Adopted',
+    adopted: 'Adopted'
   },
   example: {
     warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details'
@@ -276,7 +307,7 @@ export default {
     pleaseInputContent: '请输入内容',
     relation: '关系',
     reset: '重置',
-    exportExcel:'Export Excel',
+    exportExcel: 'Export Excel',
     desc: '描述',
     upload: 'Upload',
     hide: 'Hide',
@@ -450,104 +481,104 @@ export default {
   // 财务管理
   financial: {
     serviceCharge: '服务费(%)',
-    all:"All",
-    toBeReviewed:'To be reviewed',
-    toBePaid:'To be paid',
-    reviewed:'Reviewed',
-    paid:'Paid',
-    paymentFailed:'Payment failed',
-    returned:'Returned',
-    approved:'Approved',
-    approve:'Approve',
-    auditReject:'Audit reject',
-    action:'Action',
-    delData:'Delete data',
-    selectedData:'Selected data',
-    batchAuditPassed:'Batch audit passed',
-    batchReturn:'Batch return',
-    batchSetToBePaid:'Batch set to be paid',
-    batchSetPaid:'Batch set paid',
-    batchSetPaymentFailure:'Batch set payment failure',
-    modifyWithdrawalInfo:'modify the withdrawal information',
-    approveWithdrawalNotice:'Are you sure to approve the current withdrawal?',
-    setWithdrawalPaymentAction:'Are you sure to set the current withdrawal as payment action?',
-    setWithdrawalPaidNotice:'Are you sure to set the current withdrawal as paid?',
-    setPayFailedWithdrawal:'Are you sure to set payment failure for the current withdrawal?',
-    setWithdrawalReturnNotice:'Determines that the current withdrawal is set to a withdrawal return operation?',
-    noteWithdrawalReturn:'Note on withdrawal return',
-    memberInvoiceWithdrawalReturnNotice:'The member has provided the invoice, please confirm whether to process the withdrawal return?',
-    withdrawSetFailed:'Failed',
-    withdrawSetReturn:'Return',
-    negativeAllowedBatchApproval:'Negative number allowed for batch approval',
-    cannotNegativeBatch:'Batch approval cannot be negative',
-    batchReject:'Batch rejection',
-    batchDel:'Delete in batches',
-    applyChangeEcoin:'Apply for change of member Ecoin',
-    modifyEcoinChangeInfo:'Modify member Ecoin change information',
-    memberCode:'Member code',
-    memberName:'Member name',
-    memberLevel:'Member level',
-    idCardNumber:'身份证号',
-    registerType:'注册类型',
-    pleaseSelectRegisterType:'请选择注册类型',
-    withdrawAmount:'提现金额',
-    estimatedDatePayment:'Estimated date of payment',
-    selectDate:'Select date',
-    accountType:'Account type',
-    pleaseSelectAccountType:'Please select account type',
-    adjustmentAmount:'Adjustment amount',
-    transactionType:'Transaction type',
-    pleaseSelectTranserType:'Please select transaction type',
-    forgeDisplayRemark:'Remarks foreground display',
-    selectRecordOperateNotice:'Please select the record to operate',
-    modifyData:'Modifying data',
-    balanceInsufficientSubmitNotice:'The member account balance is insufficient, continue to submit',
-    passingAudit:'Passing the audit',
-    handleAuditDefaultNotice:'Are you sure to pass the approval (negative number is not allowed for member account) ? Note:',
-    handleAuditRejectNotice:'Are you sure you want to reject the approval? Note:',
-    handleAuditPassNotice:'Are you sure to pass the approval (negative number is allowed for member account) ? Note:',
-    okDelData:"OK to delete the selected data?",
-    exportNotice:"Are you sure you want to export the current data?",
-    manuallyAdd:'Manually add',
-    adjustAmount:'Adjust amount',
-    ecoinInsufficientNotice:'Ecoin of member is insufficient, whether to continue to submit.',
-    reviewRemberEcoinInfo:'Review member Ecoin change information',
-    statusManagement:'Status management',
-    viewVoucher:'View voucher',
-    checkRechargeVoucher:'Check recharge voucher',
-    rechargeStatusState:'State',
-    reviewWithdrawalInfoNotice:'Review withdrawal info',
-    datePayment:'Date of payment',
-    selectRecordOperateNotice:'Select the record to operate on',
-    surePassReviewNoteNotice:'Be sure to pass the review ? Note: ',
-    sureUnpaidReviewNotice:'Be sure to unpaid the review ? Note: ',
-    surePaymentFailureReview:'Be sure to payment failure the review ? Note: ',
-    surePaidReviewNotice:'Be sure to paid the review ? Note: ',
-    sureReturnReviewNotice:'Be sure to return the review ? Note: ',
-    changeStateSelectedDataNotice:'Are you sure to change the state of the selected data',
+    all: 'All',
+    toBeReviewed: 'To be reviewed',
+    toBePaid: 'To be paid',
+    reviewed: 'Reviewed',
+    paid: 'Paid',
+    paymentFailed: 'Payment failed',
+    returned: 'Returned',
+    approved: 'Approved',
+    approve: 'Approve',
+    auditReject: 'Audit reject',
+    action: 'Action',
+    delData: 'Delete data',
+    selectedData: 'Selected data',
+    batchAuditPassed: 'Batch audit passed',
+    batchReturn: 'Batch return',
+    batchSetToBePaid: 'Batch set to be paid',
+    batchSetPaid: 'Batch set paid',
+    batchSetPaymentFailure: 'Batch set payment failure',
+    modifyWithdrawalInfo: 'modify the withdrawal information',
+    approveWithdrawalNotice: 'Are you sure to approve the current withdrawal?',
+    setWithdrawalPaymentAction: 'Are you sure to set the current withdrawal as payment action?',
+    setWithdrawalPaidNotice: 'Are you sure to set the current withdrawal as paid?',
+    setPayFailedWithdrawal: 'Are you sure to set payment failure for the current withdrawal?',
+    setWithdrawalReturnNotice: 'Determines that the current withdrawal is set to a withdrawal return operation?',
+    noteWithdrawalReturn: 'Note on withdrawal return',
+    memberInvoiceWithdrawalReturnNotice: 'The member has provided the invoice, please confirm whether to process the withdrawal return?',
+    withdrawSetFailed: 'Failed',
+    withdrawSetReturn: 'Return',
+    negativeAllowedBatchApproval: 'Negative number allowed for batch approval',
+    cannotNegativeBatch: 'Batch approval cannot be negative',
+    batchReject: 'Batch rejection',
+    batchDel: 'Delete in batches',
+    applyChangeEcoin: 'Apply for change of member Ecoin',
+    modifyEcoinChangeInfo: 'Modify member Ecoin change information',
+    memberCode: 'Member code',
+    memberName: 'Member name',
+    memberLevel: 'Member level',
+    idCardNumber: '身份证号',
+    registerType: '注册类型',
+    pleaseSelectRegisterType: '请选择注册类型',
+    withdrawAmount: '提现金额',
+    estimatedDatePayment: 'Estimated date of payment',
+    selectDate: 'Select date',
+    accountType: 'Account type',
+    pleaseSelectAccountType: 'Please select account type',
+    adjustmentAmount: 'Adjustment amount',
+    transactionType: 'Transaction type',
+    pleaseSelectTranserType: 'Please select transaction type',
+    forgeDisplayRemark: 'Remarks foreground display',
+    selectRecordOperateNotice: 'Please select the record to operate',
+    modifyData: 'Modifying data',
+    balanceInsufficientSubmitNotice: 'The member account balance is insufficient, continue to submit',
+    passingAudit: 'Passing the audit',
+    handleAuditDefaultNotice: 'Are you sure to pass the approval (negative number is not allowed for member account) ? Note:',
+    handleAuditRejectNotice: 'Are you sure you want to reject the approval? Note:',
+    handleAuditPassNotice: 'Are you sure to pass the approval (negative number is allowed for member account) ? Note:',
+    okDelData: 'OK to delete the selected data?',
+    exportNotice: 'Are you sure you want to export the current data?',
+    manuallyAdd: 'Manually add',
+    adjustAmount: 'Adjust amount',
+    ecoinInsufficientNotice: 'Ecoin of member is insufficient, whether to continue to submit.',
+    reviewRemberEcoinInfo: 'Review member Ecoin change information',
+    statusManagement: 'Status management',
+    viewVoucher: 'View voucher',
+    checkRechargeVoucher: 'Check recharge voucher',
+    rechargeStatusState: 'State',
+    reviewWithdrawalInfoNotice: 'Review withdrawal info',
+    datePayment: 'Date of payment',
+    selectRecordOperateNotice: 'Select the record to operate on',
+    surePassReviewNoteNotice: 'Be sure to pass the review ? Note: ',
+    sureUnpaidReviewNotice: 'Be sure to unpaid the review ? Note: ',
+    surePaymentFailureReview: 'Be sure to payment failure the review ? Note: ',
+    surePaidReviewNotice: 'Be sure to paid the review ? Note: ',
+    sureReturnReviewNotice: 'Be sure to return the review ? Note: ',
+    changeStateSelectedDataNotice: 'Are you sure to change the state of the selected data'
   },
 
   // 网络管理
   atlas: {
-    exportNotice:"Are you sure you want to export the current data?",
-    sponsorNetworkDiagram:'Sponsor Network Diagram',
-    sponsorNetworkList:'Sponsor Network List',
-    topMember:'Top Member',
-    spreadDepth:'Spread Depth',
-    numberOfPeriods:'Number Of Periods',
-    algebra:'Algebra',
-    memberCode:'Member Code',
-    name:'Name',
-    level:'Level',
-    highest:'Highest',
-    depth:'Depth',
-    subordinatesMember:'View the subordinates of this member',
-    getDataWait:'Getting data, please wait',
-    resettlementNetworkDiagram:'Resettlement network diagram',
-    numberOfLayers:'Number Of Layers',
-    location:'Location',
-    joiningPeriod:'Joining Period',
-    placementNetworkList:'Placement network list',
+    exportNotice: 'Are you sure you want to export the current data?',
+    sponsorNetworkDiagram: 'Sponsor Network Diagram',
+    sponsorNetworkList: 'Sponsor Network List',
+    topMember: 'Top Member',
+    spreadDepth: 'Spread Depth',
+    numberOfPeriods: 'Number Of Periods',
+    algebra: 'Algebra',
+    memberCode: 'Member Code',
+    name: 'Name',
+    level: 'Level',
+    highest: 'Highest',
+    depth: 'Depth',
+    subordinatesMember: 'View the subordinates of this member',
+    getDataWait: 'Getting data, please wait',
+    resettlementNetworkDiagram: 'Resettlement network diagram',
+    numberOfLayers: 'Number Of Layers',
+    location: 'Location',
+    joiningPeriod: 'Joining Period',
+    placementNetworkList: 'Placement network list'
   },
 
   // 管理员管理

+ 130 - 98
src/lang/zh.js

@@ -137,13 +137,45 @@ export default {
   },
   bonus: {
     welcomePackOrder: '首购单',
-    memberCode:'会员编号',
+    memberCode: '会员编号',
     balancePerformance: '综合结余业绩',
     entryBalancePerformance: '首单结余业绩',
     reconditioningBalancePerformance: '复消结余业绩',
     LMarketBalancePerformance: '一市场结余业绩',
     RMarketBalancePerformance: '二市场结余业绩',
-    confirmAndReviseMemberPerformance: '确认修改会员业绩?'
+    confirmAndReviseMemberPerformance: '确认修改会员业绩?',
+    periodNo: '期数',
+    bonusMonth: '所在结算月',
+    timeframe: '时间范围',
+    closingTime: '封期时间',
+    timeOfGeneratingPerformanceSheet: '生成业绩单时间',
+    settlementDate: '结算时间',
+    networkConnectionTime: '挂网时间',
+    closurePeriod: '封期',
+    logRefresh: '日志刷新',
+    actionTime: '操作时间(WAT)',
+    logContent: '日志内容',
+    autoCalculation: '自动计算',
+    createPerformanceSheet: '生成业绩单',
+    initializeBasicData: '初始化基础数据',
+    generationPeriodPerformance: '生成期业绩',
+    pullPeriodPerformance: '拉取期业绩',
+    calculationOfBonus: '计算奖金',
+    pullBonusData: '拉取奖金数据',
+    bulkWithdrawal: '批量提现',
+    periodNum: '期数',
+    year: '所在结算年',
+    month: '所在结算月',
+    startTime: '期数开始时间',
+    endTime: '期数结束时间',
+    closedAt: '封期时间',
+    perfStartedAt: '生成业绩单开始时间',
+    perfedAt: '生成业绩单结束时间',
+    calStartedAt: '结算开始时间',
+    calculatedAt: '结算结束时间',
+    sendStartedAt: '挂网开始时间',
+    sentAt: '挂网结束时间'
+
   },
   documentation: {
     documentation: '文档',
@@ -198,7 +230,7 @@ export default {
     delete: '删除',
     cancel: '取 消',
     confirm: '确 定',
-    adopted:'通过',
+    adopted: '通过'
   },
   example: {
     warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见'
@@ -278,7 +310,7 @@ export default {
     relation: '关系',
     reset: '重置',
     desc: '描述',
-    exportExcel:'导出Excel',
+    exportExcel: '导出Excel',
     upload: '上传',
     hide: '展示',
     unhide: '不展示',
@@ -452,104 +484,104 @@ export default {
   // 财务
   financial: {
     serviceCharge: '服务费(%)',
-    all:"全部",
-    toBeReviewed:'待审核',
-    toBePaid:'待付款',
-    paid:'已付款',
-    paymentFailed:'付款失败',
-    returned:'已退回',
-    reviewed:'已审核',
-    approved:'审核通过',
-    approve:'审核通过',
-    auditReject:'审核拒绝',
-    action:'操作',
-    delData:'删除数据',
-    selectedData:'所选数据',
-    batchAuditPassed:'批量审核通过',
-    batchReturn:'批量退回',
-    batchSetToBePaid:'批量设为待付款',
-    batchSetPaid:'批量设为已付款',
-    batchSetPaymentFailure:'批量设为付款失败',
-    modifyWithdrawalInfo:'修改提现信息',
-    approveWithdrawalNotice:'确定对当前提现进行审核通过操作?',
-    setWithdrawalPaymentAction:'确定对当前提现进行设为待付款操作?',
-    setWithdrawalPaidNotice:'确定对当前提现进行设为已付款操作',
-    setPayFailedWithdrawal:'确定对当前提现进行设为付款失败操作?',
-    setWithdrawalReturnNotice:'确定对当前提现进行设为提现退回操作?',
-    noteWithdrawalReturn:'提现退回备注',
-    memberInvoiceWithdrawalReturnNotice:'该会员已提供发票,请确认是否处理提现退回',
-    withdrawSetFailed:'设为付款失败',
-    withdrawSetReturn:'设为提现退回',
-    negativeAllowedBatchApproval:'批量审核允许为负数',
-    cannotNegativeBatch:'批量审核不允许为负数',
-    batchReject:'批量拒审',
-    batchDel:'批量删除',
-    applyChangeEcoin:'申请变动会员余额',
-    modifyEcoinChangeInfo:'修改会员余额变动信息',
-    memberCode:'会员编号',
-    memberName:'会员姓名',
-    memberLevel:'会员级别',
-    accountType:'账户类型',
-    idCardNumber:'身份证号',
-    registerType:'注册类型',
-    pleaseSelectRegisterType:'请选择注册类型',
-    withdrawAmount:'提现金额',
-    estimatedDatePayment:'预计付款日期',
-    selectDate:'选择日期',
-    pleaseSelectAccountType:'请选择账户类型',
-    adjustmentAmount:'调整金额',
-    transactionType:'交易类型',
-    pleaseSelectTranserType:'请选择交易类型',
-    forgeDisplayRemark:'备注前台显示',
-    selectRecordOperateNotice:'请选择要操作的记录',
-    modifyData:'正在修改数据',
-    balanceInsufficientSubmitNotice:'会员账户余额不足,是否继续提交',
-    passingAudit:'正在通过审核',
-    handleAuditDefaultNotice:'确定要通过审核(会员账户不允许为负数)?备注:',
-    handleAuditRejectNotice:'确定要拒绝审核?备注',
-    handleAuditPassNotice:'确定要通过审核(会员账户允许为负数)?备注',
-    okDelData:"确定删除选定的数据?",
-    exportNotice:"确定要导出当前数据吗?",
-    manuallyAdd:'手动添加',
-    adjustAmount:'调整金额',
-    ecoinInsufficientNotice:'会员账户余额不足,是否继续提交',
-    reviewRemberEcoinInfo:'审核会员余额变动信息',
-    statusManagement:'状态管理',
-    viewVoucher:'查看凭证',
-    checkRechargeVoucher:'查看充值凭证',
-    rechargeStatusState:'充值状态',
-    reviewWithdrawalInfoNotice:'审核提现信息',
-    datePayment:'付款日期',
-    selectRecordOperateNotice:'请选择要操作的记录',
-    surePassReviewNoteNotice:'确定要通过审核?备注:',
-    sureUnpaidReviewNotice:'确定要设为待付款?备注:',
-    surePaymentFailureReview:'确定要设为付款失败?备注:',
-    surePaidReviewNotice:'确定要设为已付款?备注:',
-    sureReturnReviewNotice:'确定要设为已退回?备注:',
-    changeStateSelectedDataNotice:'确定要对所选数据修改状态吗?',
+    all: '全部',
+    toBeReviewed: '待审核',
+    toBePaid: '待付款',
+    paid: '已付款',
+    paymentFailed: '付款失败',
+    returned: '已退回',
+    reviewed: '已审核',
+    approved: '审核通过',
+    approve: '审核通过',
+    auditReject: '审核拒绝',
+    action: '操作',
+    delData: '删除数据',
+    selectedData: '所选数据',
+    batchAuditPassed: '批量审核通过',
+    batchReturn: '批量退回',
+    batchSetToBePaid: '批量设为待付款',
+    batchSetPaid: '批量设为已付款',
+    batchSetPaymentFailure: '批量设为付款失败',
+    modifyWithdrawalInfo: '修改提现信息',
+    approveWithdrawalNotice: '确定对当前提现进行审核通过操作?',
+    setWithdrawalPaymentAction: '确定对当前提现进行设为待付款操作?',
+    setWithdrawalPaidNotice: '确定对当前提现进行设为已付款操作',
+    setPayFailedWithdrawal: '确定对当前提现进行设为付款失败操作?',
+    setWithdrawalReturnNotice: '确定对当前提现进行设为提现退回操作?',
+    noteWithdrawalReturn: '提现退回备注',
+    memberInvoiceWithdrawalReturnNotice: '该会员已提供发票,请确认是否处理提现退回',
+    withdrawSetFailed: '设为付款失败',
+    withdrawSetReturn: '设为提现退回',
+    negativeAllowedBatchApproval: '批量审核允许为负数',
+    cannotNegativeBatch: '批量审核不允许为负数',
+    batchReject: '批量拒审',
+    batchDel: '批量删除',
+    applyChangeEcoin: '申请变动会员余额',
+    modifyEcoinChangeInfo: '修改会员余额变动信息',
+    memberCode: '会员编号',
+    memberName: '会员姓名',
+    memberLevel: '会员级别',
+    accountType: '账户类型',
+    idCardNumber: '身份证号',
+    registerType: '注册类型',
+    pleaseSelectRegisterType: '请选择注册类型',
+    withdrawAmount: '提现金额',
+    estimatedDatePayment: '预计付款日期',
+    selectDate: '选择日期',
+    pleaseSelectAccountType: '请选择账户类型',
+    adjustmentAmount: '调整金额',
+    transactionType: '交易类型',
+    pleaseSelectTranserType: '请选择交易类型',
+    forgeDisplayRemark: '备注前台显示',
+    selectRecordOperateNotice: '请选择要操作的记录',
+    modifyData: '正在修改数据',
+    balanceInsufficientSubmitNotice: '会员账户余额不足,是否继续提交',
+    passingAudit: '正在通过审核',
+    handleAuditDefaultNotice: '确定要通过审核(会员账户不允许为负数)?备注:',
+    handleAuditRejectNotice: '确定要拒绝审核?备注',
+    handleAuditPassNotice: '确定要通过审核(会员账户允许为负数)?备注',
+    okDelData: '确定删除选定的数据?',
+    exportNotice: '确定要导出当前数据吗?',
+    manuallyAdd: '手动添加',
+    adjustAmount: '调整金额',
+    ecoinInsufficientNotice: '会员账户余额不足,是否继续提交',
+    reviewRemberEcoinInfo: '审核会员余额变动信息',
+    statusManagement: '状态管理',
+    viewVoucher: '查看凭证',
+    checkRechargeVoucher: '查看充值凭证',
+    rechargeStatusState: '充值状态',
+    reviewWithdrawalInfoNotice: '审核提现信息',
+    datePayment: '付款日期',
+    selectRecordOperateNotice: '请选择要操作的记录',
+    surePassReviewNoteNotice: '确定要通过审核?备注:',
+    sureUnpaidReviewNotice: '确定要设为待付款?备注:',
+    surePaymentFailureReview: '确定要设为付款失败?备注:',
+    surePaidReviewNotice: '确定要设为已付款?备注:',
+    sureReturnReviewNotice: '确定要设为已退回?备注:',
+    changeStateSelectedDataNotice: '确定要对所选数据修改状态吗?'
   },
 
   // 网络管理
   atlas: {
-    exportNotice:"确定要导出当前数据吗?",
-    sponsorNetworkDiagram:'开拓网络图',
-    sponsorNetworkList:'开拓网络列表',
-    topMember:'顶级会员',
-    spreadDepth:'展开深度',
-    numberOfPeriods:'期数',
-    algebra:'代数',
-    memberCode:'会员编号',
-    name:'姓名',
-    level:'级别',
-    highest:'聘级',
-    depth:'深度',
-    subordinatesMember:'查看该会员的下级',
-    getDataWait:'正在获取数据,请稍后',
-    resettlementNetworkDiagram:'安置网络图',
-    numberOfLayers:'层数',
-    location:'区位',
-    joiningPeriod:'加入期数',
-    placementNetworkList:'安置网络列表',
+    exportNotice: '确定要导出当前数据吗?',
+    sponsorNetworkDiagram: '开拓网络图',
+    sponsorNetworkList: '开拓网络列表',
+    topMember: '顶级会员',
+    spreadDepth: '展开深度',
+    numberOfPeriods: '期数',
+    algebra: '代数',
+    memberCode: '会员编号',
+    name: '姓名',
+    level: '级别',
+    highest: '聘级',
+    depth: '深度',
+    subordinatesMember: '查看该会员的下级',
+    getDataWait: '正在获取数据,请稍后',
+    resettlementNetworkDiagram: '安置网络图',
+    numberOfLayers: '层数',
+    location: '区位',
+    joiningPeriod: '加入期数',
+    placementNetworkList: '安置网络列表'
   },
 
   // 管理员管理

+ 3 - 0
src/main.js

@@ -20,6 +20,7 @@ import './permission' // permission control
 import './utils/error-log' // error log
 
 import * as filters from './filters' // global filters
+import moment from 'moment'
 
 /**
  * If you don't want to use mock-server
@@ -34,6 +35,8 @@ if (process.env.NODE_ENV === 'production') {
   mockXHR()
 }
 
+Vue.prototype.$moment = moment
+
 Vue.use(Element, {
   size: Cookies.get('size') || 'medium', // set element-ui default size
   i18n: (key, value) => i18n.t(key, value)

+ 7 - 1
src/router/index.js

@@ -361,9 +361,15 @@ export const asyncRoutes = [
   {
     path: '/bonus',
     component: Layout,
-    redirect: '/bonus/balance-list',
+    redirect: '/bonus/period',
     hidden: true,
     children: [
+      {
+        path: 'period',
+        component: () => import('@/views/bonus/period'),
+        name: 'period',
+        meta: { title: 'period', noCache: true }
+      },
       {
         path: 'balance-list',
         component: () => import('@/views/bonus/balance-list'),

+ 593 - 0
src/views/bonus/period.vue

@@ -0,0 +1,593 @@
+<template>
+  <div v-loading="loading">
+    <div class="white-box">
+      <div class="filter-box">
+        <filter-user :filter-types.sync="filterTypes" :filter-btn-name="$t('common.screen')"
+                     @select-value="handleFilterUser"></filter-user><!-- Select -->
+      </div>
+      <el-table :data="tableData" stripe style="width: 100%;" @selection-change="handleSelectionChange"
+                :height="tool.getTableHeight()">
+        <el-table-column prop="PERIOD_NUM" :label="$t('bonus.periodNo')" width="100"><!-- 期数 -->
+          <template slot-scope="scope">
+            <el-tag type="" size="small" class="no-border">{{scope.row.PERIOD_NUM}}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('bonus.bonusMonth')" width="110"><!-- 所在结算月 -->
+          <template slot-scope="scope">
+            <el-tag type="warning" size="small" class="no-border">{{scope.row.CALC_YEAR}}-{{scope.row.CALC_MONTH}}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('bonus.timeframe')" width="260"><!-- 时间范围 -->
+          <template slot-scope="scope">
+            <!-- 应开始于 -->Should start on:{{getWatTime(scope.row.START_TIME)}}<br/>
+            <!-- 应结束于 -->Should end on:{{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="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">
+            <!-- 开始 -->start:{{getWatTime(scope.row.PERF_STARTED_AT)}}<br>
+            <!-- 完成 -->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])"-->
+<!--                         :width="50" :stroke-width="3"></el-progress>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+        <el-table-column :label="$t('bonus.settlementDate')" width="230"><!-- 结算时间 -->
+          <template slot-scope="scope">
+            <!-- 开始 -->start:{{getWatTime(scope.row.CALCULATE_STARTED_AT)}}<br>
+            <!-- 完成 -->complete:{{getWatTime(scope.row.CALCULATED_AT)}}
+          </template>
+        </el-table-column>
+<!--        <el-table-column label="Network connection progress" width="80">&lt;!&ndash; 挂网进度 &ndash;&gt;-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-progress type="circle" :percentage="Number.parseInt(percentList['SENT_PERCENT'][scope.row.ID])"-->
+<!--                         :width="50" :stroke-width="3"></el-progress>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+        <el-table-column :label="$t('bonus.networkConnectionTime')" width="230"><!-- 挂网时间 -->
+          <template slot-scope="scope">
+            <!-- 开始 -->start:{{getWatTime(scope.row.SEND_STARTED_AT)}}<br/>
+            <!-- 完成 -->complete:{{getWatTime(scope.row.SENT_AT)}}
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" :label="$t('common.action')" width=""><!-- 操作 -->
+          <template slot-scope="scope">
+<!--            <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" class="button" type="primary"-->
+<!--                       @click.native="trialCalcHandle(scope.row.PERIOD_NUM)" >-->
+<!--              计算-->
+<!--            </el-button>-->
+            <el-button v-if="scope.row.IS_CAN_CLOSE || scope.row.IS_CAN_PERF" type="primary" class="button"
+                       @click="dialogTableVisible = true;currentPeriod = scope.row.PERIOD_NUM;getDialogData();">
+              {{$t('common.action')}}</el-button>
+            <el-button 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 @click.native="sentHandle(scope.row)" type="primary" class="button"
+                              v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">
+              <!-- 挂网 -->spread a net
+            </el-button>
+
+            <el-dialog :title="`第${currentPeriod}期计算任务日志`" :visible.sync="dialogTableVisible" append-to-body width="60%">
+              <el-row><el-button class="button" type="primary" @click.native="getDialogData();dialogLoading=true;" >{{$t('bonus.logRefresh')}}</el-button></el-row>
+              <div class="flex">
+                <div>
+                  <el-table :data="dialogData" height="550" v-loading="dialogLoading">
+                    <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>
+                <div style="margin-left: 15px">
+                  <el-row>
+                    <el-button class="button" type="success" @click.native="autoCalcHandle(currentPeriod)"
+                     v-if="permission.hasPermission(`bonus/calc-period`)"
+                    >{{$t('bonus.autoCalculation')}}</el-button>
+                  </el-row>
+                  <el-row><el-button class="button" type="primary" @click.native="perfOrderHandle(currentPeriod)" >{{$t('bonus.createPerformanceSheet')}}</el-button></el-row>
+                  <el-row><el-button class="button" type="primary" @click.native="initDataHandle(currentPeriod)" >{{$t('bonus.initializeBasicData')}}</el-button></el-row>
+                  <el-row><el-button class="button" type="primary" @click.native="perfPeriodHandle(currentPeriod)" >{{$t('bonus.generationPeriodPerformance')}}</el-button></el-row>
+                  <el-row><el-button class="button" type="primary" @click.native="pullPerfPeriodHandle(currentPeriod)" >{{$t('bonus.pullPeriodPerformance')}}</el-button></el-row>
+                  <el-row><el-button class="button" type="primary" @click.native="calcBonusHandle(currentPeriod)" >{{$t('bonus.calculationOfBonus')}}</el-button></el-row>
+                  <el-row><el-button class="button" 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>
+              </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">-->
+<!--              <el-button type="primary" size="small" @click.stop="">-->
+<!--                &lt;!&ndash; 操作该数据 &ndash;&gt;Action<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
+<!--              </el-button>-->
+<!--              <el-dropdown-menu slot="dropdown">-->
+<!--                <el-dropdown-item @click.native="closeHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)">Closure period&lt;!&ndash; 封期 &ndash;&gt;-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="perfHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_PERFING === '0' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">-->
+<!--                  &lt;!&ndash; 生成业绩单 &ndash;&gt;Generate performance sheet-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="perfHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_PERFING === '1' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">-->
+<!--                  &lt;!&ndash; 强制生成业绩单 &ndash;&gt;Forced generation of performance sheet-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="calcHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CALCING === '0' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">-->
+<!--                  &lt;!&ndash; 结算 &ndash;&gt;settlement-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="calcHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CALCING === '1' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">-->
+<!--                  &lt;!&ndash; 强制结算 &ndash;&gt;Forced settlement-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="sentHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">-->
+<!--                  &lt;!&ndash; 挂网 &ndash;&gt;spread a net-->
+<!--                </el-dropdown-item>-->
+<!--              </el-dropdown-menu>-->
+<!--            </el-dropdown>-->
+          </template>
+        </el-table-column>
+      </el-table>
+      <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()">
+          {{$t('bonus.bulkWithdrawal')}}
+        </el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Vue from 'vue'
+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 { fetchPeriod,fetchAutoWithdraw,fetchRecordList,fetchAutoCalc,fetchPerfOrderList,fetchInitData,fetchCalcPerfPeriod,fetchPullPerfPeriod,fetchCalcBonus,fetchSyncCalcRecord,fetchPullBonus,fetchClosePeriod,fetchCalcPeriod,fetchPerfPeriod,fetchSendPeriod } from '@/api/bonus'
+import ElementUI from 'element-ui'
+
+export default {
+  name: 'bonus-period',
+  components: {FilterUser, Pagination},
+  created () {
+    const wsServer = 'ws://127.0.0.1:9513'
+    console.log(wsServer)
+    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)
+      }
+    }
+  },
+  mounted () {
+    this.getData(this.currentPage, this.pageSize)
+    store.state.socket.onMessageCallback = this.onMessageCallback
+  },
+  data () {
+    return {
+      currentPeriod: 0,
+      tableData: null,
+      loading: true,
+      multipleSelection: [],
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 10,
+      tool: tool,
+      permission: permission,
+      filterTypes: {
+        'periodNum': {isUserTable: false, name: this.$t('bonus.periodNum')}, // 期数
+        'year': {isUserTable: false, name: this.$t('bonus.year')}, // 所在结算年
+        'month': {isUserTable: false, name: this.$t('bonus.month')}, // 所在结算月
+        'startTime': {isUserTable: false, name: this.$t('bonus.startTime'), other: 'date'}, // 期数开始时间
+        'endTime': {isUserTable: false, name: this.$t('bonus.endTime'), other: 'date'}, // 期数结束时间
+        'closedAt': {isUserTable: false, name: this.$t('bonus.closedAt'), other: 'date'}, // 封期时间
+        'perfStartedAt': {isUserTable: false, name: this.$t('bonus.perfStartedAt'), other: 'date'}, // 生成业绩单开始时间
+        'perfedAt': {isUserTable: false, name: this.$t('bonus.perfedAt'), other: 'date'}, // 生成业绩单结束时间
+        'calStartedAt': {isUserTable: false, name: this.$t('bonus.calStartedAt'), other: 'date'}, // 结算开始时间
+        'calculatedAt': {isUserTable: false, name: this.$t('bonus.calculatedAt'), other: 'date'}, // 结算结束时间
+        'sendStartedAt': {isUserTable: false, name: this.$t('bonus.sendStartedAt'), other: 'date'}, // 挂网开始时间
+        'sentAt': {isUserTable: false, name: this.$t('bonus.sentAt'), other: 'date'} // 挂网结束时间
+      },
+      filterModel: {},
+      percentList: {
+        'PERF_PERCENT': {},
+        'CALC_PERCENT': {},
+        'SENT_PERCENT': {}
+      },
+      dialogTableVisible: false,
+      dialogData: null,
+      currentDialogPage: 1,
+      dialogPageSize: 100,
+      dialogLoading: true,
+      form: {
+        name: '',
+        region: '',
+        date1: '',
+        date2: '',
+        delivery: false,
+        type: [],
+        resource: '',
+        desc: ''
+      },
+      formLabelWidth: '120px'
+    };
+
+  },
+  methods: {
+    autoCalcHandle(currentPeriod) {
+      this.$confirm('Confirm to perform settlement operation for the auto current period?', 'Hint', { // '确定对当前期进行结算操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        // return network.getData(`calc/auto-calc/${currentPeriod}`)
+        return fetchAutoCalc(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    perfOrderHandle(currentPeriod) {
+      this.$confirm('Confirm to generate performance order for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+         return fetchPerfOrderList(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+     }).catch((error) => {
+         if(error !== 'cancel'){
+             ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+         }
+     })
+    },
+    initDataHandle(currentPeriod) {
+      this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchInitData(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+     }).catch((error) => {
+         if(error !== 'cancel'){
+             ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+         }
+     })
+    },
+    perfPeriodHandle(currentPeriod) {
+      this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchCalcPerfPeriod(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    pullPerfPeriodHandle(currentPeriod) {
+      this.$confirm('Confirm to pull performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchPullPerfPeriod(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    calcBonusHandle(currentPeriod) {
+      this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchCalcBonus(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+     }).catch((error) => {
+         if(error !== 'cancel'){
+             ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+         }
+     })
+    },
+    calcBonusRecordHandle(currentPeriod) {
+      this.$confirm('Confirm to sync calculate bonus record for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+         return fetchSyncCalcRecord(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    pullBonusHandle(currentPeriod) {
+      this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchPullBonus(currentPeriod)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    // trialCalcHandle (currentPeriod) {
+    //   this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+    //     confirmButtonText: 'confirm', // 确定
+    //     cancelButtonText: 'cancel', // 取消
+    //     type: 'warning'
+    //   }).then(() => {
+    //     return network.getData(`calc/trial-calc/${currentPeriod}`)
+    //   }).then(response => {
+    //     this.$message({
+    //       message: response,
+    //       type: 'success'
+    //     })
+    //     this.getDialogData(this.currentPage, this.pageSize)
+    //   }).catch(response => {
+    //   })
+    // },
+
+    getDialogData () {
+      let vueObj = this
+      let paramsData = {
+        page: this.currentDialogPage,
+        pageSize: this.dialogPageSize,
+      }
+      fetchRecordList(this.currentPeriod,paramsData).then(response => {
+        this.dialogData = response.list
+        this.dialogLoading = false;
+      })
+    },
+
+    closeHandle (row) {
+      this.$confirm('Confirm to manually seal the current period?', 'Hint', { // '确定对当前期进行手动封期操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+         return fetchClosePeriod(row.PERIOD_NUM)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    calcHandle (row) {
+      this.$confirm('Confirm to perform settlement operation for the current period?', 'Hint', { // '确定对当前期进行结算操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchCalcPeriod(row.PERIOD_NUM)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+     }).catch((error) => {
+         if(error !== 'cancel'){
+             ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+         }
+     })
+    },
+    perfHandle (row) {
+      this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return fetchPerfPeriod(row.PERIOD_NUM)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+     }).catch((error) => {
+         if(error !== 'cancel'){
+             ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+         }
+     })
+    },
+    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 fetchSendPeriod(row.PERIOD_NUM)
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch((error) => {
+          if(error !== 'cancel'){
+              ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
+          }
+      })
+    },
+    doAutoWithdraw () {
+      this.$confirm('全部提现?', 'Hint', {
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        //return network.getData(`bonus/auto-withdraw`)
+        return fetchAutoWithdraw()
+      }).then(response => {
+        this.$message({
+          message: response.data,
+          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
+      const paramsData = Object.assign({
+        page: (page === null || page === undefined) ? 1 : page,
+        pageSize: (pageSize === null || pageSize === undefined) ? this.pageSize : pageSize
+      }, filterData)
+      // fetchPeriod(this, 'bonus/period', page, pageSize, filterData, function (response) {
+      //   vueObj.allData = response
+      // }, null, ['PERF_PERCENT', 'CALC_PERCENT', 'SENT_PERCENT'])
+      fetchPeriod(paramsData).then(response => {
+        this.tableData = response.data.list
+        this.tableHeaders = response.data.columnsShow ? response.data.columnsShow : []
+        this.loading = false
+        this.currentPage = page
+        this.totalPages = parseInt(response.data.totalPages)
+        this.totalCount = parseInt(response.data.totalCount)
+        this.pageSize = pageSize
+        this.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)
+        }
+      }
+    },
+    getWatTime (ts) {
+      ts = parseInt(ts)
+      if (ts) {
+        return this.$moment(ts * 1000).utcOffset('+0100' ).format('YYYY-MM-DD HH:mm:ss')
+      } else {
+        return ''
+      }
+    }
+  }
+}
+</script>
+<style>
+.flex{
+  display: flex;
+}
+.button{
+  margin-bottom: 10px;
+}
+.el-table__body {
+-webkit-border-horizontal-spacing: -30px;
+-webkit-border-vertical-spacing: -30px;
+}
+</style>