Commit 95f5c876 by zhangxw

用例评审修改

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