Commit 04bb9409 by zhangxw

联调

1 parent 83250fa9
...@@ -107,6 +107,7 @@ Component({ ...@@ -107,6 +107,7 @@ Component({
const selectedCount = this.data.selectedValues.length const selectedCount = this.data.selectedValues.length
if (selectedCount >= max) { if (selectedCount >= max) {
// 可根据项目规范提示用户,这里不做 UI 弹窗,保持组件纯净 // 可根据项目规范提示用户,这里不做 UI 弹窗,保持组件纯净
this.triggerEvent('maxtips')
return return
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class="gray pl-24"> <view class="gray pl-24">
<text>原价¥{{ item.totalPrice }}</text> <text>原价¥{{ item.totalPrice }}</text>
<text wx:if="{{ item.discountType != 3 && item.discountType != 5 }}" class="split">|</text> <text wx:if="{{ subItem.discountType && item.discountType != 3 && item.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ item.discountType == 1 || item.discountType == 2 }}"> <block wx:if="{{ item.discountType == 1 || item.discountType == 2 }}">
<text wx:if="{{ item.discountType == 1 }}">{{ item.discountValue }}折</text> <text wx:if="{{ item.discountType == 1 }}">{{ item.discountValue }}折</text>
<text wx:else>折扣¥{{ item.discountValue }}</text> <text wx:else>折扣¥{{ item.discountValue }}</text>
...@@ -56,13 +56,13 @@ ...@@ -56,13 +56,13 @@
</view> </view>
<view class="gray pl-24"> <view class="gray pl-24">
<text>原价¥{{ subItem.totalPrice }}</text> <text>原价¥{{ subItem.totalPrice }}</text>
<text wx:if="{{ subItem.discountType != 3 && subItem.discountType != 5 }}" class="split">|</text> <text wx:if="{{ subItem.discountType && subItem.discountType != 3 && subItem.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ subItem.discountType == 1 || subItem.discountType == 2 }}"> <block wx:if="{{ subItem.discountType == 1 || subItem.discountType == 2 }}">
<text wx:if="{{ subItem.discountType == 1 }}">{{ subItem.discountValue }}折</text> <text wx:if="{{ subItem.discountType == 1 }}">{{ subItem.discountValue }}折</text>
<text wx:else>折扣¥{{ subItem.discountValue }}</text> <text wx:else>折扣¥{{ subItem.discountValue }}</text>
</block> </block>
<block wx:if="{{ subItem.discountType == 4 }}"> <block wx:if="{{ subItem.discountType == 4 }}">
<text>赠品</text> <text class="tag">赠品</text>
</block> </block>
</view> </view>
</view> </view>
......
...@@ -18,11 +18,11 @@ Page({ ...@@ -18,11 +18,11 @@ Page({
}, },
djOrderTypeMap: { djOrderTypeMap: {
'': '订单类型', '': '订单类型',
'1': '打折策略', '2': '打折策略',
'2': '组合付款', '5': '组合付款',
'3': '买赠策略', '3': '买赠策略',
'4': '冲量活动', '4': '冲量活动',
'5': '错误订单' '1': '错误订单'
}, },
orderForm:[{ orderForm:[{
label: '订单编号', label: '订单编号',
......
...@@ -74,7 +74,7 @@ Page({ ...@@ -74,7 +74,7 @@ Page({
format: true format: true
}, { }, {
label: '原错误订单编号', label: '原错误订单编号',
key: 'errorCode' key: 'associationOrderCode'
}, { }, {
label: '提单人', label: '提单人',
key: 'sellerName' key: 'sellerName'
......
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
<view class="item-top"> <view class="item-top">
<view class="code"> <view class="code">
<text>订单编号</text> <text>订单编号</text>
<text class="code-text">{{li.applyCode}}</text> <text class="code-text">{{li.orderCode}}</text>
</view> </view>
<view class="status text-center" style="color:{{ listAuditStatusMap[li.status].color }};background-color:{{listAuditStatusMap[li.status].background }};"> <view class="status text-center" style="color:{{ listAuditStatusMap[li.status].color }};background-color:{{listAuditStatusMap[li.status].background }};">
{{listAuditStatusMap[li.status].name }} {{listAuditStatusMap[li.status].name }}
</view> </view>
</view> </view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{li.djOrderType == 5 ? errorOrderItems : orderItems }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i"> <block wx:for="{{li.associationOrderCode == 1 ? errorOrderItems : orderItems }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order flex"> <view class="order flex">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
<view class="order-value"> <view class="order-value">
......
...@@ -96,6 +96,10 @@ Page({ ...@@ -96,6 +96,10 @@ Page({
}) })
}, },
handleMaxTips() {
wx.$util.showToast('最多支持选择20位员工')
},
handlePopupConfirm(e) { handlePopupConfirm(e) {
let { selectType, singleSelectIndex, batchSingleList } = this.data let { selectType, singleSelectIndex, batchSingleList } = this.data
if (selectType == 'staff') { if (selectType == 'staff') {
......
...@@ -120,5 +120,5 @@ ...@@ -120,5 +120,5 @@
<view class="btn confirm" bindtap="handleConfirm">提交</view> <view class="btn confirm" bindtap="handleConfirm">提交</view>
</view> </view>
</view> </view>
<select-popup show="{{ showSelectPopup }}" height="{{selectType == 'staff' ? '75%' : '50%'}}" allowSearch="{{selectMultiple}}" options="{{ selectOptions }}" valueKey="{{selectType == 'staff' ? 'mobilePhone' : 'value'}}" multiple="{{ selectMultiple }}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" title="{{ selectTitle }}" bindcancel="hideSelectPopup" customIsTab="{{ true }}"></select-popup> <select-popup show="{{ showSelectPopup }}" height="{{selectType == 'staff' ? '75%' : '50%'}}" allowSearch="{{selectMultiple}}" options="{{ selectOptions }}" valueKey="{{selectType == 'staff' ? 'mobilePhone' : 'value'}}" multiple="{{ selectMultiple }}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" max="{{20}}" bindmaxtips="handleMaxTips" title="{{ selectTitle }}" bindcancel="hideSelectPopup" customIsTab="{{ true }}"></select-popup>
<help-popup show="{{showHelpPopup}}" /> <help-popup show="{{showHelpPopup}}" />
\ No newline at end of file \ No newline at end of file
...@@ -54,7 +54,7 @@ Page({ ...@@ -54,7 +54,7 @@ Page({
this.setData({ this.setData({
info: { info: {
...data, ...data,
entryDate: dayjs(data?.entryDate).format('YYYY-MM-DD') entryDate: data?.entryDate ? dayjs(data?.entryDate).format('YYYY-MM-DD') : ''
}, },
performanceInfo: { performanceInfo: {
levelCode: data?.adoptType == 1 ? data?.autoGradeCode : data?.adoptType == 2 ? data?.manualGradeCode : '', levelCode: data?.adoptType == 1 ? data?.autoGradeCode : data?.adoptType == 2 ? data?.manualGradeCode : '',
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<view class="container" style="margin-top: {{navBarHeight}}px;"> <view class="container" style="margin-top: {{navBarHeight}}px;">
<view class="content-box top"> <view class="content-box top">
<view> <view>
<view class="name">{{info.name}}<text>{{info.entryDate}}入职</text></view> <view class="name">{{info.name}}<text>{{info.entryDate || '-'}}入职</text></view>
<view class="merchant">{{info.merchantName}}</view> <view class="merchant">{{info.merchantName || '-'}}</view>
</view> </view>
<image class="bg-image" src="{{IMG_URL}}rate_bg_image.png" mode=""/> <image class="bg-image" src="{{IMG_URL}}rate_bg_image.png" mode=""/>
</view> </view>
......
...@@ -16,7 +16,9 @@ Page({ ...@@ -16,7 +16,9 @@ Page({
resultInfo: {}, resultInfo: {},
levelList: levelList, levelList: levelList,
pageQuery: {}, pageQuery: {},
performanceList: [] performanceList: [],
isT1DateRange: false,
T1EndDateStr: ''
}, },
navbarReady(e) { navbarReady(e) {
...@@ -46,6 +48,8 @@ Page({ ...@@ -46,6 +48,8 @@ Page({
this.getDetail(options.mobilePhone) this.getDetail(options.mobilePhone)
// 获取全部员工绩效 // 获取全部员工绩效
this.getList() this.getList()
// 获取算工资的时间节点
this.getCycleTime()
}) })
}, },
...@@ -64,6 +68,33 @@ Page({ ...@@ -64,6 +68,33 @@ Page({
}, },
getDayOfMonthText(dateStr) {
const date = new Date(dateStr.replace(' ', 'T'))
const day = date.getDate()
return day
},
isExpired(endDateStr) {
const now = new Date()
const endDate = new Date(endDateStr)
return now > endDate
},
getCycleTime() {
api.getPerformanceTimeCycle({}).then(res => {
let { code, data, message } = res
if (code == 0) {
const T1EndDate = data?.find(val => val.cycleCode == 'T1')?.endDate
this.setData({
isT1DateRange: this.isExpired(T1EndDate),
T1EndDateStr: this.getDayOfMonthText(T1EndDate)
})
} else {
wx.$util.showToast(message)
}
})
},
getAutoResult(mobilePhone) { getAutoResult(mobilePhone) {
let { pageQuery } = this.data let { pageQuery } = this.data
api.autoDetectResult({queryMonth: pageQuery.queryMonth, mobilePhone}).then(res => { api.autoDetectResult({queryMonth: pageQuery.queryMonth, mobilePhone}).then(res => {
...@@ -103,8 +134,8 @@ Page({ ...@@ -103,8 +134,8 @@ Page({
this.setData({ this.setData({
info: { info: {
...data, ...data,
entryDate: dayjs(data?.entryDate).format('YYYY-MM-DD'), entryDate: data?.entryDate ? dayjs(data?.entryDate).format('YYYY-MM-DD') : '',
adoptType: data?.isAutoPerformance == 0 || !data?.isAutoPerformance ? 2 : data?.adoptType adoptType: data?.isAutoPerformance == 0 || !data?.isAutoPerformance ? 2 : data?.adoptType
}, },
autoInfo: { autoInfo: {
levelCode: data?.autoGradeCode, levelCode: data?.autoGradeCode,
...@@ -115,7 +146,7 @@ Page({ ...@@ -115,7 +146,7 @@ Page({
// 非手动维护金额 计算绩效工资数 // 非手动维护金额 计算绩效工资数
if (data?.adoptType == 2 && ((data?.manualFinalPerformanceAmount ?? '') === '')) { if (data?.adoptType == 2 && ((data?.manualFinalPerformanceAmount ?? '') === '')) {
this.setData({ this.setData({
'info.performanceSalary': NP.times(NP.times(res.data.afterAttendanceTotalBasicSalary, 0.3), res.data.manualRewardCoefficient) 'info.performanceSalary': NP.round(NP.times(NP.times(res.data.afterAttendanceTotalBasicSalary, 0.3), res.data.manualRewardCoefficient), 2)
}) })
} }
this.setData({ navigating: false }) this.setData({ navigating: false })
...@@ -163,8 +194,10 @@ Page({ ...@@ -163,8 +194,10 @@ Page({
selectLevelCode() { selectLevelCode() {
let { let {
info, info,
levelList levelList,
isT1DateRange
} = this.data } = this.data
if (isT1DateRange || info.submitCount >= 2) return
this.setData({ this.setData({
showSelectPopup: true, showSelectPopup: true,
selectOptions: levelList, selectOptions: levelList,
...@@ -185,7 +218,7 @@ Page({ ...@@ -185,7 +218,7 @@ Page({
}) })
// 未输入手动维护绩效金额 根据评分等级系数计算绩效工资 // 未输入手动维护绩效金额 根据评分等级系数计算绩效工资
if (!info.manualFinalPerformanceAmount) { if (!info.manualFinalPerformanceAmount) {
const performanceSalary = NP.times(NP.times(info.afterAttendanceTotalBasicSalary, 0.3), obj.rewardCoefficient) const performanceSalary = NP.round(NP.times(NP.times(info.afterAttendanceTotalBasicSalary, 0.3), obj.rewardCoefficient), 2)
this.setData({ this.setData({
'info.performanceSalary': performanceSalary, 'info.performanceSalary': performanceSalary,
'info.basicSalary': NP.plus(performanceSalary, info.baseSalary) 'info.basicSalary': NP.plus(performanceSalary, info.baseSalary)
...@@ -229,7 +262,7 @@ Page({ ...@@ -229,7 +262,7 @@ Page({
} }
value = cleanValue value = cleanValue
// 计算绩效工资,没有手动维护金额按绩效等级系数进行计算 // 计算绩效工资,没有手动维护金额按绩效等级系数进行计算
const computedValue = value || (info.manualGradeCode ? NP.times(NP.times(info.afterAttendanceTotalBasicSalary, 0.3), info.manualRewardCoefficient) : 0) const computedValue = value || (info.manualGradeCode ? NP.round(NP.times(NP.times(info.afterAttendanceTotalBasicSalary, 0.3), info.manualRewardCoefficient), 2) : 0)
this.setData({ this.setData({
'info.manualFinalPerformanceAmount': value, 'info.manualFinalPerformanceAmount': value,
'info.performanceSalary': computedValue, 'info.performanceSalary': computedValue,
...@@ -248,6 +281,8 @@ Page({ ...@@ -248,6 +281,8 @@ Page({
// 切换 // 切换
changeRadio(e) { changeRadio(e) {
let { value } = e.currentTarget.dataset let { value } = e.currentTarget.dataset
let { isT1DateRange, info } = this.data
if (isT1DateRange || info.submitCount >= 2) return
this.setData({ this.setData({
'info.adoptType': value 'info.adoptType': value
}) })
...@@ -255,7 +290,8 @@ Page({ ...@@ -255,7 +290,8 @@ Page({
// 提交 // 提交
handleConfirm() { handleConfirm() {
let { info, pageQuery } = this.data let { info, T1EndDateStr, isT1DateRange } = this.data
if (isT1DateRange || info.submitCount >= 2) return
if (!((info.totalGrossSalary ?? '') === '')) { // 已出工资条 不能提交 if (!((info.totalGrossSalary ?? '') === '')) { // 已出工资条 不能提交
return wx.showModal({ return wx.showModal({
title: '提示', title: '提示',
...@@ -271,7 +307,7 @@ Page({ ...@@ -271,7 +307,7 @@ Page({
if (info.adoptType == 2 && !info.manualGradeCode && !info.manualFinalPerformanceAmount) return wx.$util.showToast('请配置绩效评分') if (info.adoptType == 2 && !info.manualGradeCode && !info.manualFinalPerformanceAmount) return wx.$util.showToast('请配置绩效评分')
wx.showModal({ wx.showModal({
title: '提交绩效确认', title: '提交绩效确认',
content: '确认提交驻店销售的绩效考核评分吗?当前月8号前可进行修改2次。', content: `确认提交驻店销售的绩效考核评分吗?当前月${T1EndDateStr}号前可进行修改2次。`,
complete: (res) => { complete: (res) => {
if (res.confirm) { if (res.confirm) {
wx.$util.showLoading() wx.$util.showLoading()
...@@ -289,6 +325,7 @@ Page({ ...@@ -289,6 +325,7 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
this.getDetail(info.mobilePhone)
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
icon: 'success' icon: 'success'
......
...@@ -297,5 +297,11 @@ page { ...@@ -297,5 +297,11 @@ page {
font-weight: 500; font-weight: 500;
} }
} }
.btn-disabled {
opacity: .5;
}
}
.disabled {
background: #F7F8FA !important;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<view class="container" style="margin-top: {{navBarHeight}}px;"> <view class="container" style="margin-top: {{navBarHeight}}px;">
<view class="content-box top"> <view class="content-box top">
<view> <view>
<view class="name">{{info.name}}<text>{{info.entryDate}}入职</text></view> <view class="name">{{info.name}}<text>{{info.entryDate || '-'}}入职</text></view>
<view class="merchant">{{info.merchantName}}</view> <view class="merchant">{{info.merchantName || '-'}}</view>
</view> </view>
<image class="bg-image" src="{{IMG_URL}}rate_bg_image.png" mode=""/> <image class="bg-image" src="{{IMG_URL}}rate_bg_image.png" mode=""/>
</view> </view>
...@@ -44,15 +44,15 @@ ...@@ -44,15 +44,15 @@
<view class="mar-t32">当前状态</view> <view class="mar-t32">当前状态</view>
<view class="radio-box" style="padding-bottom: {{info.adoptType == 2 ? '16rpx' : ''}}"> <view class="radio-box" style="padding-bottom: {{info.adoptType == 2 ? '16rpx' : ''}}">
<view class="radio-item flex" bindtap="changeRadio" data-value="1" wx:if="{{info.isAutoPerformance == 1}}"> <view class="radio-item flex" bindtap="changeRadio" data-value="1" wx:if="{{info.isAutoPerformance == 1}}">
<image wx:if="{{info.adoptType == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image wx:if="{{info.adoptType == 1}}" src="{{IMG_URL}}{{isT1DateRange || info.submitCount >= 2 ? 'radio-disabled' : 'radio-checked'}}.png" mode=""/>
<view wx:else class="radio"></view> <view wx:else class="radio {{isT1DateRange || info.submitCount >= 2 ? 'disabled' : ''}}"></view>
<view class="label">系统自动设置</view> <view class="label">系统自动设置</view>
<view style="margin-left: 8rpx;" wx:if="{{info.adoptType == 1 && info.autoGradeCode == 'D'}}"><level-rate info="{{autoInfo}}" hideStar="{{true}}" /></view> <view style="margin-left: 8rpx;" wx:if="{{info.adoptType == 1 && info.autoGradeCode == 'D'}}"><level-rate info="{{autoInfo}}" hideStar="{{true}}" /></view>
</view> </view>
<view wx:if="{{info.adoptType == 1 && info.autoGradeCode != 'D'}}"><level-rate info="{{autoInfo}}" /></view> <view wx:if="{{info.adoptType == 1 && info.autoGradeCode != 'D'}}"><level-rate info="{{autoInfo}}" /></view>
<view class="radio-item flex" bindtap="changeRadio" data-value="2"> <view class="radio-item flex" bindtap="changeRadio" data-value="2">
<image wx:if="{{info.adoptType == 2}}" src="{{IMG_URL}}radio-checked.png" mode=""/> <image wx:if="{{info.adoptType == 2}}" src="{{IMG_URL}}{{isT1DateRange || info.submitCount >= 2 ? 'radio-disabled' : 'radio-checked'}}.png" mode=""/>
<view wx:else class="radio"></view> <view wx:else class="radio {{isT1DateRange || info.submitCount >= 2 ? 'disabled' : ''}}"></view>
<view class="label">手动自动设置</view> <view class="label">手动自动设置</view>
</view> </view>
<block wx:if="{{info.adoptType == 2}}"> <block wx:if="{{info.adoptType == 2}}">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<view class="dot"></view> <view class="dot"></view>
<view>手动评分</view> <view>手动评分</view>
</view> </view>
<view class="select flex just-space {{info.manualGradeCode ? '' : 'gary'}}" bindtap="selectLevelCode"> <view class="select flex just-space {{info.manualGradeCode ? '' : 'gary'}} {{isT1DateRange || info.submitCount >= 2 ? 'disabled' : ''}}" bindtap="selectLevelCode">
{{info.manualGradeCode || '请选择等级'}} {{info.manualGradeCode || '请选择等级'}}
<image src="{{IMG_URL}}expand_icon.png" mode=""/> <image src="{{IMG_URL}}expand_icon.png" mode=""/>
</view> </view>
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
<view class="input-content flex"> <view class="input-content flex">
<view>手动维护最终绩效金额</view> <view>手动维护最终绩效金额</view>
<image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/> <image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view class="input-box flex"> <view class="input-box flex {{isT1DateRange || info.submitCount >= 2 ? 'disabled' : ''}}">
<input class='input' placeholder="请输入" value="{{info.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/> <input class="input" disabled="{{isT1DateRange || info.submitCount >= 2}}" placeholder="请输入" value="{{info.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<view>元</view> <view>元</view>
</view> </view>
</view> </view>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</block> </block>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view class="btn confirm" bindtap="handleConfirm">提交</view> <view class="btn confirm {{isT1DateRange || info.submitCount >= 2 ? 'btn-disabled' : ''}}" bindtap="handleConfirm">提交</view>
<view class="btn" bindtap="handleLast" wx:if="{{showLastBtn}}">上一位</view> <view class="btn" bindtap="handleLast" wx:if="{{showLastBtn}}">上一位</view>
<view class="btn" bindtap="handleNext" wx:if="{{showNextBtn}}">下一位</view> <view class="btn" bindtap="handleNext" wx:if="{{showNextBtn}}">下一位</view>
</view> </view>
......
...@@ -15,7 +15,7 @@ Page({ ...@@ -15,7 +15,7 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
monthText: `${dayjs(__CUR_YM_TS__).format('YYYY年MM月')}`, monthText: `${dayjs(__CUR_YM_TS__).format('YYYY年MM月')}`,
maxMonthDate: __CUR_YM_TS__, maxMonthDate: new Date(__NOW__.getFullYear(), __NOW__.getMonth(), 1).getTime(),
monthPickerValue: __CUR_YM_TS__, monthPickerValue: __CUR_YM_TS__,
pendingMonthValue: 0, pendingMonthValue: 0,
showRule: false, showRule: false,
...@@ -111,9 +111,9 @@ Page({ ...@@ -111,9 +111,9 @@ Page({
} = res } = res
if (code == 0) { if (code == 0) {
data?.forEach(val => { data?.forEach(val => {
val.performanceLevel = val.adoptType == 1 ? val.autoGradeCode : val.adoptType == 2 ? val.manualGradeCode : '', val.performanceLevel = val.manualGradeCode || val.autoGradeCode || '',
val.coefficient = val.adoptType == 1 ? val.autoRewardCoefficient?.toFixed(1) : val.adoptType == 2 ? val.manualRewardCoefficient?.toFixed(1) : '', val.coefficient = val.manualRewardCoefficient?.toFixed(1) || val.autoRewardCoefficient?.toFixed(1) || '',
val.symbolValue = val.adoptType == 1 ? val.autoScoreSymbolValue?.replace('=', '') : val.adoptType == 2 ? val.manualScoreSymbolValue?.replace('=', '') : '' val.symbolValue = val.manualScoreSymbolValue?.replace('=', '') || val.autoScoreSymbolValue?.replace('=', '') || ''
}) })
if (data?.length) { if (data?.length) {
this.setData({ this.setData({
...@@ -158,7 +158,8 @@ Page({ ...@@ -158,7 +158,8 @@ Page({
boardScopeActive: false boardScopeActive: false
}, () => { }, () => {
this.getRule() this.getRule()
this.getList() this.search()
this.getStatics()
}) })
} }
this.closeMonthPicker() this.closeMonthPicker()
......
...@@ -89,16 +89,22 @@ ...@@ -89,16 +89,22 @@
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">入职门店</view> <view class="label">入职门店</view>
<view class="value">{{item.merchantName}}</view> <view class="value">{{item.merchantName || '-'}}</view>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效分数</view> <view class="label">绩效分数</view>
<van-rate readonly value="{{ starCountObj[item.performanceLevel] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" /> <block wx:if="{{item.performanceLevel}}">
<view class="score">{{item.symbolValue}}分</view> <van-rate readonly value="{{ starCountObj[item.performanceLevel] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="score">{{item.symbolValue}}分</view>
</block>
<block wx:else>-</block>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效等级</view> <view class="label">绩效等级</view>
<view class="value"><text wx:if="{{item.performanceLevel}}">{{item.performanceLevel}}级</text><text wx:if="{{item.performanceLevel && item.coefficient}}" class="split">|</text><text wx:if="{{item.coefficient}}">系数{{item.coefficient}}</text></view> <block wx:if="{{item.performanceLevel}}">
<view class="value"><text wx:if="{{item.performanceLevel}}">{{item.performanceLevel}}级</text><text wx:if="{{item.performanceLevel && item.coefficient}}" class="split">|</text><text wx:if="{{item.coefficient}}">系数{{item.coefficient}}</text></view>
</block>
<block wx:else>-</block>
</view> </view>
<view class="btn-box flex"> <view class="btn-box flex">
<view bindtap="handleDetail" data-target="{{item}}" class="btn">查看</view> <view bindtap="handleDetail" data-target="{{item}}" class="btn">查看</view>
......
...@@ -10,9 +10,7 @@ Page({ ...@@ -10,9 +10,7 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
title: '', title: '',
ruleInfo: { ruleInfo: {}
},
}, },
/** /**
...@@ -39,29 +37,34 @@ Page({ ...@@ -39,29 +37,34 @@ Page({
}, },
getAutoResult(data) { getAutoResult(options) {
api.getPerformanceRule({queryMonth: data.queryMonth}).then(res => { api.getPerformanceRule({queryMonth: options.queryMonth}).then(res => {
if (['1', '2'].includes(data.autoGradeType)) { let { code, data, message } = res
this.setData({ if (code == 0) {
ruleInfo: { if (['1', '2'].includes(options.autoGradeType)) {
autoGradeType: data.autoGradeType, this.setData({
days: res.data?.autoPerformRuleDetailDTO?.monthOnboardAttendanceDays, ruleInfo: {
threshold: res.data?.autoPerformRuleDetailDTO?.monthOnboardOutputThreshold, autoGradeType: options.autoGradeType,
levelCode: res.data?.autoPerformRuleDetailDTO?.monthOnboardTriggerLevelCode, days: data?.autoPerformRuleDetailDTO?.monthOnboardAttendanceDays,
coefficient: res.data?.autoPerformRuleDetailDTO?.monthOnboardTriggerRewardCoefficient, threshold: data?.autoPerformRuleDetailDTO?.monthOnboardOutputThreshold,
defaultLevelCode: res.data?.autoPerformRuleDetailDTO?.monthOnboardDefaultLevelCode levelCode: data?.autoPerformRuleDetailDTO?.monthOnboardTriggerLevelCode,
} coefficient: data?.autoPerformRuleDetailDTO?.monthOnboardTriggerRewardCoefficient,
}) defaultLevelCode: data?.autoPerformRuleDetailDTO?.monthOnboardDefaultLevelCode
} else if (['3', '4'].includes(data.autoGradeType)) { }
this.setData({ })
ruleInfo: { } else if (['3', '4'].includes(options.autoGradeType)) {
autoGradeType: data.autoGradeType, this.setData({
threshold: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardOutputThreshold, ruleInfo: {
levelCode: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerLevelCode, autoGradeType: options.autoGradeType,
coefficient: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerRewardCoefficient, threshold: data?.autoPerformRuleDetailDTO?.noMonthOnboardOutputThreshold,
defaultLevelCode: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardDefaultLevelCode levelCode: data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerLevelCode,
} coefficient: data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerRewardCoefficient,
}) defaultLevelCode: data?.autoPerformRuleDetailDTO?.noMonthOnboardDefaultLevelCode
}
})
}
} else {
wx.$util.showToast(message)
} }
}) })
}, },
......
...@@ -55,6 +55,9 @@ page { ...@@ -55,6 +55,9 @@ page {
} }
} }
} }
.mb-0 {
margin-bottom: 0;
}
.empty-box { .empty-box {
width: 100%; width: 100%;
height: 50rpx; height: 50rpx;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!-- 影响说明 --> <!-- 影响说明 -->
<block wx:if="{{ruleInfo.autoGradeType}}"> <block wx:if="{{ruleInfo.autoGradeType}}">
<view class="cont-title"><view class="dot"></view>影响说明</view> <view class="cont-title"><view class="dot"></view>影响说明</view>
<view class="content"> <view class="content mb-0">
<view class="mb-24">对薪资的影响:</view> <view class="mb-24">对薪资的影响:</view>
<view class="mb-24 gray"> <view class="mb-24 gray">
<view>底薪:正常计算(有疑问可让驻店销售走考勤申诉通道)</view> <view>底薪:正常计算(有疑问可让驻店销售走考勤申诉通道)</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!