Commit 95f5c876 by zhangxw

用例评审修改

1 parent 90d9ba7d
......@@ -30,9 +30,6 @@ export const levelMap = {
}
export const levelList = [{
name: '全部',
value: ''
}, {
name: 'S',
value: 'S'
}, {
......@@ -62,9 +59,6 @@ export const statusMap = {
}
export const statusList = [{
name: '全部',
value: ''
}, {
name: '已处理',
value: '1'
}, {
......
......@@ -73,11 +73,26 @@ Page({
const day = date.getDate()
return day
},
// t1时间段内可编辑上月绩效
isExpired(endDateStr) {
const { pageQuery } = this.data
const now = new Date()
const endDate = new Date(endDateStr)
return now > endDate
if (now > endDate) {
return true
}
const currentYear = now.getFullYear()
const currentMonth = now.getMonth()
let lastYear, lastMonth;
if (currentMonth === 0) {
lastYear = currentYear - 1
lastMonth = 12
} else {
lastYear = currentYear
lastMonth = currentMonth
}
const lastMonthStr = `${lastYear}-${String(lastMonth).padStart(2, '0')}`
return pageQuery.queryMonth !== lastMonthStr
},
getCycleTime() {
......@@ -314,12 +329,12 @@ Page({
let params = {
mobilePhone: info.mobilePhone,
evaluationMonth: info.evaluationMonth,
adoptType: info.manualGradeCode || !((info.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1,
amountCalculationType: !((info.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1,
manualGradeCode: info.manualGradeCode || '',
manualRewardCoefficient: info.manualRewardCoefficient || '',
manualScoreSymbolValue: info.manualScoreSymbolValue || '',
manualFinalPerformanceAmount: info.manualFinalPerformanceAmount || ''
adoptType: info.adoptType,
amountCalculationType: info.adoptType == 2 && !((info.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1,
manualGradeCode: info.adoptType == 2 ? info.manualGradeCode : '',
manualRewardCoefficient: info.adoptType == 2 ? info.manualRewardCoefficient : '',
manualScoreSymbolValue: info.adoptType == 2 ? info.manualScoreSymbolValue : '',
manualFinalPerformanceAmount: info.adoptType == 2 ? info.manualFinalPerformanceAmount : ''
}
api.singleSubmit(params).then(res => {
wx.$util.hideLoading()
......
......@@ -42,8 +42,12 @@ Page({
handleStatus: ''
},
statusMap: statusMap,
statusList: statusList,
levelList: levelList,
levelList: [{name: '全部',
value: ''}].concat(levelList),
statusList: [{
name: '全部',
value: ''
}].concat(statusList),
levelMap: levelMap,
starCountObj: starCountObj,
list: []
......@@ -213,9 +217,24 @@ Page({
})
},
isExpired(endDateStr) {
const { monthPickerValue } = this.data
const now = new Date()
const endDate = new Date(endDateStr)
return now > endDate
if (now > endDate) {
return true
}
const currentYear = now.getFullYear()
const currentMonth = now.getMonth()
let lastYear, lastMonth;
if (currentMonth === 0) {
lastYear = currentYear - 1
lastMonth = 12
} else {
lastYear = currentYear
lastMonth = currentMonth
}
const lastMonthStr = `${lastYear}-${String(lastMonth).padStart(2, '0')}`
return dayjs(monthPickerValue).format('YYYY-MM') !== lastMonthStr
},
// 批量操作
handleBatch() {
......@@ -300,6 +319,7 @@ Page({
filterObj,
levelList
} = this.data
console.log(levelList)
this.setData({
showSelectPopup: true,
selectOptions: levelList,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!