Commit 93842a7f by Lin

feat: 状态重置修改

1 parent 6a744556
......@@ -465,6 +465,6 @@ module.exports = {
},
// 工资申述入口判断
hasPerformanceConfig(data) {
return api.post('dj.staff.api.has.performance.config.formerchant', data)
return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router')
}
}
......@@ -244,6 +244,6 @@ module.exports = {
},
// 工资申述入口判断
hasPerformanceConfig(data) {
return api.post('dj.staff.api.has.performance.config.formerchant', data)
return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router')
}
}
......@@ -76,9 +76,6 @@ Component({
const { options, selectedValue } = this.properties
// 兼容处理:支持多种数据格式
// 1. 字符串格式:直接是 value
// 2. 对象格式1:{ staffPhone, text, value } - 组件期望的格式
// 3. 对象格式2:{ staffName, staffId, staffPhone } - 从 filters 传递过来的格式
let selectedValueObj = null
let selectedValueId = null
......
......@@ -73,7 +73,8 @@ Page({
],
orderList: [],
appealRecords: [],
dateRange: '' // 申诉时间范围
dateRange: '', // 申诉时间范围
appealDate: ''
},
/**
......@@ -255,8 +256,8 @@ Page({
case 'daily':
// 处理去补日报逻辑
wx.$router.go('tabWorkOrder.upgradeStaffDaily', {
reportDate: hasNeedReport.date
// reportDate: "2025-12-10"
// reportDate: this.data.filters.month+'-'+this.data.appealDate
reportDate: this.data.filters.month
})
break
case 'recording':
......@@ -390,6 +391,7 @@ Page({
* 获取概览信息、订单统计信息和申诉答复记录
*/
async refreshAllData() {
console.log("refreshAllData", this.data.filters.staffPhone, this.data.filters.month);
// 获取概览信息
await this.getStaffInfo()
// 获取订单统计信息
......@@ -398,17 +400,17 @@ Page({
await this.getStaffReplyList()
},
async getOrderStatistics() {
console.log("getOrderStatistics", this.data.filters.staffPhone, this.data.filters.month);
const userInfo = wx.$util.getUserInfo()
const res = await getStatistics({
staffPhone: this.data.filters.staffPhone,
appealMonth: this.data.filters.month,
sceneType: userInfo?.sceneType
})
// console.log(res, 'getStatistics')
// 根据orderFieldMap将API数据格式化为orderList
const orderList = []
if (res) {
if (res && res.data && this.orderFieldMap) {
const data = res.data
// 遍历orderFieldMap,将每个映射项转换为{label, value}格式
Object.keys(this.orderFieldMap).forEach(label => {
......@@ -447,6 +449,7 @@ Page({
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
},
async getStaffReplyList() {
console.log("getStaffReplyList");
const res = await getReplyList({
staffPhone: this.data.filters.staffPhone,
appealMonth: this.data.filters.month
......@@ -496,6 +499,9 @@ Page({
if (dates.length === 1) {
return `${dates[0]}号`
}
this.setData({
appealDate: dates[dates.length - 1]
})
return dates.slice(0, -1).join('、') + '、' + dates[dates.length - 1] + '号'
}
......@@ -513,7 +519,7 @@ Page({
if (apiData.actualAttendanceDays !== null && apiData.actualAttendanceDays !== undefined) {
salaryItems[attendanceIndex].value = `${apiData.actualAttendanceDays}天`
}
salaryItems[attendanceIndex].btnAble = !apiData.attendanceAppealable
salaryItems[attendanceIndex].btnAble = apiData.attendanceAppealable
}
// 更新daily项(日报完成天数)
......@@ -539,7 +545,7 @@ Page({
}
salaryItems[recordingIndex].centerLeftNum = apiData.touchCustomerTotal?`${apiData.touchCustomerTotal}条`:'-'
salaryItems[recordingIndex].centerRightPrice = formatDeductionAmount(apiData.padDeductionAmount)
salaryItems[recordingIndex].btnAble = !apiData.padAppealable
salaryItems[recordingIndex].btnAble = apiData.padAppealable
}
// 组成 dateRange:从 appealStartTime 和 appealEndTime 拼接
......
......@@ -100,8 +100,4 @@ module.exports = {
checkMissingReception(data) {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.check', data)
},
// 工资申述入口判断
hasPerformanceConfig(data) {
return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router')
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!