Commit 8190f955 by zhangxw

bug修复

1 parent cbccf301
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-table-column> </el-table-column>
<el-table-column label="个人工资" prop="" align="center"> <el-table-column label="个人工资" prop="" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ isEmpty(scope.row.salary) ? `¥${scope.row.salary}` : '- ' }}</span> <span>{{ !isEmpty(scope.row.personalSalary) ? `¥${scope.row.personalSalary}` : '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="业务" prop="" align="center"> <el-table-column label="业务" prop="" align="center">
...@@ -175,6 +175,7 @@ import { rangePickerOptions } from '@/common/format' ...@@ -175,6 +175,7 @@ import { rangePickerOptions } from '@/common/format'
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { getStaffHistoryOrderListApi, getStaffHistoryApi, getCommissionLogicApi, getStaffSalaryStatisticsApi, getPerformancePlanDetailApi } from '@/api/resident' import { getStaffHistoryOrderListApi, getStaffHistoryApi, getCommissionLogicApi, getStaffSalaryStatisticsApi, getPerformancePlanDetailApi } from '@/api/resident'
import { filterStr, isEmpty } from '../util' import { filterStr, isEmpty } from '../util'
import BigNumber from 'bignumber.js'
export default { export default {
name: 'HistoricalPerformance', name: 'HistoricalPerformance',
components: { components: {
...@@ -362,9 +363,13 @@ export default { ...@@ -362,9 +363,13 @@ export default {
const chineseNums = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] const chineseNums = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
res?.list?.forEach(row => { res?.list?.forEach(row => {
const month = row?.salaryMonth?.split('-')?.[1] - 1 const month = row?.salaryMonth?.split('-')?.[1] - 1
const basicSalary = new BigNumber(row?.basicSalary || 0)
const commissionPrice = new BigNumber(row?.commissionPrice || 0)
const minimumSalary = new BigNumber(row?.minimumSalary || 0)
row.monthStr = chineseNums[month] row.monthStr = chineseNums[month]
row.staffSceneLabelStr = filterStr(row.staffSceneLabel, this.staffSceneLabelList) row.staffSceneLabelStr = filterStr(row.staffSceneLabel, this.staffSceneLabelList)
row.jobTypeStr = filterStr(row.jobTypes, staffLevelList, this.performanceData?.hireType) row.jobTypeStr = filterStr(row.jobTypes, staffLevelList, this.performanceData?.hireType)
row.personalSalary = basicSalary.plus(commissionPrice).toNumber() < minimumSalary ? minimumSalary.toNumber() : basicSalary.toNumber() // 基本工资+提成<保底工资,则取保底工资
}) })
this.performanceTableData = res?.list || [] this.performanceTableData = res?.list || []
}) })
......
...@@ -155,6 +155,11 @@ export default { ...@@ -155,6 +155,11 @@ export default {
if (((this.formData.sceneType ?? '') === '')) return this.$message.warning('请先选择所属业务') if (((this.formData.sceneType ?? '') === '')) return this.$message.warning('请先选择所属业务')
if (!this.formData.hireType) return this.$message.warning('请先选择适用招聘类型') if (!this.formData.hireType) return this.$message.warning('请先选择适用招聘类型')
_this.storeSelected = deepClone(_this.merchantForm.selectedMerchantList) _this.storeSelected = deepClone(_this.merchantForm.selectedMerchantList)
// 将搜索条件清空
this.storeSearchForm = {
merchantName: '',
merchantId: ''
}
_this.relateStoreVisible = true _this.relateStoreVisible = true
}, },
handleRelateStoreConfirm(selectedData) { handleRelateStoreConfirm(selectedData) {
...@@ -239,6 +244,10 @@ export default { ...@@ -239,6 +244,10 @@ export default {
addTag(row, rowIndex) { addTag(row, rowIndex) {
let _this = this let _this = this
_this.addGoodsRow = deepClone({ ...row, rowIndex }) _this.addGoodsRow = deepClone({ ...row, rowIndex })
// 清除筛选条件
this.goodsSearchForm = {
upgradeGoodsName: ''
}
_this.appliedGoodsVisible = true _this.appliedGoodsVisible = true
}, },
handleAppliedGoodsConfirm(selectedData) { handleAppliedGoodsConfirm(selectedData) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!