Commit 4e5d2bd1 by 胡悦

考勤和收入联调

1 parent 1cdbced1

2.41 MB | W: | H:

2.41 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -185,56 +185,56 @@ export default {
// this.showChart()
})
.exec()
setTimeout(() => {
const _basicSalary = {
confirmSalary: true,
basicSalary: 3000,
performanceSalary: 1000,
actualBasicSalary: 3500,
shouldWorkDay: 26,
actualWorkDay: 10,
actualPerformanceSalary: 1500,
performanceSalaryConfigItemList: [
{
assessmentType: 1,
minAssessmentValue: 0,
maxAssessmentValue: 20,
performanceSalarDeductionRatio: 10
},
{
assessmentType: 1,
minAssessmentValue: 24,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 50
},
{
assessmentType: 1,
minAssessmentValue: 23,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 60
},
{
assessmentType: 1,
minAssessmentValue: 22,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 60
},
{
assessmentType: 1,
minAssessmentValue: 21,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 100
},
{
assessmentType: 2,
minAssessmentValue: 0,
maxAssessmentValue: 20,
performanceSalarDeductionRatio: 100
}
]
}
this.basicSalary = _basicSalary
}, 100)
// setTimeout(() => {
// const _basicSalary = {
// confirmSalary: true, // 是否确认工资,核验
// basicSalary: 3000, // 基本工资/底薪
// performanceSalary: 1000, // 绩效工资
// actualBasicSalary: 3500, // 实际基本工资
// shouldWorkDay: 26, // 应出勤天数
// actualWorkDay: 10, // 实际出勤天数
// actualPerformanceSalary: 1500, // 实际绩效工资
// performanceSalaryConfigItemList: [
// {
// assessmentType: 1,
// minAssessmentValue: 0,
// maxAssessmentValue: 20,
// performanceSalarDeductionRatio: 10
// },
// {
// assessmentType: 1,
// minAssessmentValue: 24,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 50
// },
// {
// assessmentType: 1,
// minAssessmentValue: 23,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 60
// },
// {
// assessmentType: 1,
// minAssessmentValue: 22,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 60
// },
// {
// assessmentType: 1,
// minAssessmentValue: 21,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 100
// },
// {
// assessmentType: 2,
// minAssessmentValue: 0,
// maxAssessmentValue: 20,
// performanceSalarDeductionRatio: 100
// }
// ]
// }
// this.basicSalary = _basicSalary
// }, 100)
},
methods: {
isShow(key) {
......@@ -310,6 +310,7 @@ export default {
this.salaryMonth = salaryMonth
uni.$api.pointApi.monthSalaryDetail({ salaryMonth }).then(res => {
this.salaryDetail = res
this.basicSalary = res
})
const { phone: staffPhone } = uni.$storage.get('userInfo')
const params = {
......@@ -339,10 +340,10 @@ export default {
this.tipsDetail = Object.assign(item, this.basicSalary)
console.log(dayjs(new Date()).daysInMonth())
// 应出勤天数tips
const month = dayjs(new Date()).daysInMonth()
const month = dayjs(this.salaryMonth).daysInMonth()
this.tipsDetail.basicList[1].tips = `(本月${month} - ${month-this.basicSalary.shouldWorkDay})`
// 实际出勤天数tips
this.tipsDetail.basicList[2].tips = `(截至${dayjs().subtract(1, 'day').format('YYYY-MM-DD')})`
this.tipsDetail.basicList[2].tips = `(截至${dayjs(this.salaryMonth).endOf('month').format('YYYY-MM-DD')})`
} else {
this.tipsDetail = item
}
......
......@@ -221,56 +221,56 @@ export default {
},
mounted() {
this.outputList = this.outputList.filter(i => i.value == 0)
setTimeout(() => {
const _basicSalary = {
confirmSalary: false,
basicSalary: 3000,
performanceSalary: 1000,
actualBasicSalary: 3500,
shouldWorkDay: 26,
actualWorkDay: 10,
actualPerformanceSalary: 1500,
performanceSalaryConfigItemList: [
{
assessmentType: 1,
minAssessmentValue: 0,
maxAssessmentValue: 20,
performanceSalarDeductionRatio: 10
},
{
assessmentType: 1,
minAssessmentValue: 24,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 50
},
{
assessmentType: 1,
minAssessmentValue: 23,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 60
},
{
assessmentType: 1,
minAssessmentValue: 22,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 60
},
{
assessmentType: 1,
minAssessmentValue: 21,
maxAssessmentValue: 26,
performanceSalarDeductionRatio: 100
},
{
assessmentType: 2,
minAssessmentValue: 0,
maxAssessmentValue: 20,
performanceSalarDeductionRatio: 100
}
]
}
this.basicSalary = _basicSalary
}, 100)
// setTimeout(() => {
// const _basicSalary = {
// confirmSalary: false,
// basicSalary: 3000,
// performanceSalary: 1000,
// actualBasicSalary: 3500,
// shouldWorkDay: 26,
// actualWorkDay: 10,
// actualPerformanceSalary: 1500,
// performanceSalaryConfigItemList: [
// {
// assessmentType: 1,
// minAssessmentValue: 0,
// maxAssessmentValue: 20,
// performanceSalarDeductionRatio: 10
// },
// {
// assessmentType: 1,
// minAssessmentValue: 24,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 50
// },
// {
// assessmentType: 1,
// minAssessmentValue: 23,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 60
// },
// {
// assessmentType: 1,
// minAssessmentValue: 22,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 60
// },
// {
// assessmentType: 1,
// minAssessmentValue: 21,
// maxAssessmentValue: 26,
// performanceSalarDeductionRatio: 100
// },
// {
// assessmentType: 2,
// minAssessmentValue: 0,
// maxAssessmentValue: 20,
// performanceSalarDeductionRatio: 100
// }
// ]
// }
// this.basicSalary = _basicSalary
// }, 100)
},
watch: {
'form.merchantId'(val) {
......@@ -299,6 +299,7 @@ export default {
getDetail(salaryMonth) {
uni.$api.pointApi.monthSalaryDetail({ salaryMonth: `${this.year}-${(this.month + '').padStart(2, '0')}`, calculationDataFlag: 'Y' }).then(res => {
this.salaryDetail = res || {}
this.basicSalary = res || {}
})
const { phone: staffPhone } = uni.$storage.get('userInfo')
const params = {
......@@ -371,15 +372,13 @@ export default {
console.log(this.commissionsInfo, 'this.commissionsInfoQG', this.commissionsInfoQG)
},
clickTips(item) {
console.log(this.basicSalary, 'basicSalary=======')
if (item.label == '基本工资') {
this.tipsDetail = Object.assign(item, this.basicSalary)
console.log(dayjs(new Date()).daysInMonth())
// 应出勤天数tips
const month = dayjs(new Date()).daysInMonth()
this.tipsDetail.basicList[1].tips = `(本月${month} - ${month-this.basicSalary.shouldWorkDay})`
this.tipsDetail.basicList[1].tips = `(本月${month} - ${month - this.basicSalary.shouldWorkDay || 0})`
// 实际出勤天数tips
this.tipsDetail.basicList[2].tips = `(截至${dayjs().subtract(1, 'day').format('YYYY-MM-DD')})`
this.tipsDetail.basicList[2].tips = `(截至${dayjs().date() === 1 ? dayjs().format('YYYY-MM-DD') : dayjs().subtract(1, 'day').format('YYYY-MM-DD')})`
} else {
this.tipsDetail = item
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!