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