Commit 93842a7f by Lin

feat: 状态重置修改

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