Commit 83250fa9 by chenwq

fix: 修复多个页面样式、逻辑及数据展示问题

- 调整 FilterBar 组件日期范围查询逻辑,自动添加时间后缀确保范围正确
- 修复申诉表单列表页状态标签显示及筛选条件配置
- 优化引荐数列表及编辑页的按钮状态判断逻辑
- 修正考勤详情页数值颜色标记及引荐数详情页数据展示格式
- 统一图片容器的圆角及背景色样式
1 parent 0e1cbeda
...@@ -165,10 +165,10 @@ Component({ ...@@ -165,10 +165,10 @@ Component({
// Update startKey and endKey if configured // Update startKey and endKey if configured
if (filter.startKey) { if (filter.startKey) {
updates[`formData.${filter.startKey}`] = start; updates[`formData.${filter.startKey}`] = start + ' 00:00:00';
} }
if (filter.endKey) { if (filter.endKey) {
updates[`formData.${filter.endKey}`] = end; updates[`formData.${filter.endKey}`] = end + ' 23:59:59';
} }
this.setData(updates); this.setData(updates);
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
margin-right: 16rpx; margin-right: 16rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10rpx;
/* Handle wrap if many filters */ /* Handle wrap if many filters */
} }
......
...@@ -4,10 +4,9 @@ ...@@ -4,10 +4,9 @@
<view class="card header-card"> <view class="card header-card">
<view class="row-between"> <view class="row-between">
<view class="name">{{info.staffName}} <text class="time">{{info.createdDateTxt}}提交申请</text></view> <view class="name">{{info.staffName}} <text class="time">{{info.createdDateTxt}}提交申请</text></view>
<!-- <view class="status">{{info.dealStatus === 1 ? '已通过' : (info.dealStatus === 2 ? '已驳回' : '待审核')}}</view> -->
</view> </view>
<view class="row mt-20"> <view class="row mt-20">
<text class="label">申诉类型:</text> <text class="label" style="color: #666666;">申诉类型:</text>
<text class="value">{{appealTypeStr}}</text> <text class="value">{{appealTypeStr}}</text>
</view> </view>
</view> </view>
...@@ -16,19 +15,14 @@ ...@@ -16,19 +15,14 @@
<view class="card content-card"> <view class="card content-card">
<view class="card-title">申诉内容</view> <view class="card-title">申诉内容</view>
<view class="row mt-30">
<text class="label">申诉类型</text>
<text class="value ml-20 bold">{{appealTypeStr}}</text>
</view>
<block wx:if="{{info.appealType == 1}}"> <block wx:if="{{info.appealType == 1}}">
<view class="row mt-20"> <view class="row mt-20">
<text class="label">本月实际出勤天数</text> <text class="label">本月实际出勤天数</text>
<text class="value ml-20">{{info.actualAttendanceDays || ''}}天</text> <text class="value ml-20">{{(info.actualAttendanceDays === null || info.actualAttendanceDays === undefined) ? '-' : info.actualAttendanceDays}}天</text>
</view> </view>
<view class="row mt-20"> <view class="row mt-20">
<text class="label">申诉修改实际出勤天数</text> <text class="label">申诉修改实际出勤天数</text>
<text class="value ml-20">{{info.applyActualAttendanceDays || ''}}天</text> <text class="value ml-20">{{(info.applyActualAttendanceDays === null || info.applyActualAttendanceDays === undefined) ? '-' : info.applyActualAttendanceDays}}天</text>
</view> </view>
</block> </block>
...@@ -36,11 +30,11 @@ ...@@ -36,11 +30,11 @@
<block wx:if="{{info.appealType == 2}}"> <block wx:if="{{info.appealType == 2}}">
<view class="row mt-20"> <view class="row mt-20">
<text class="label">平板录音完成总数</text> <text class="label">平板录音完成总数</text>
<text class="value ml-20">{{info.padRecordNum || ''}}条</text> <text class="value ml-20">{{(info.padRecordNum === null || info.padRecordNum === undefined) ? '-' : info.padRecordNum}}条</text>
</view> </view>
<view class="row mt-20"> <view class="row mt-20">
<text class="label">申诉修改录音完成总数</text> <text class="label">申诉修改录音完成总数</text>
<text class="value ml-20">{{info.applyPadRecordNum || ''}}条</text> <text class="value ml-20">{{(info.applyPadRecordNum === null || info.applyPadRecordNum === undefined) ? '-' : info.applyPadRecordNum}}条</text>
</view> </view>
</block> </block>
...@@ -73,7 +67,7 @@ ...@@ -73,7 +67,7 @@
<block wx:if="{{info.appealType == 1}}"> <block wx:if="{{info.appealType == 1}}">
<view class="row mt-30"> <view class="row mt-30">
<text class="label">确认实际出勤天数</text> <text class="label">确认实际出勤天数</text>
<text class="value ml-20">{{info.confirmActualAttendanceDays || ''}}天</text> <text class="value ml-20">{{(info.confirmActualAttendanceDays === null || info.confirmActualAttendanceDays === undefined) ? '-' : info.confirmActualAttendanceDays}}天</text>
</view> </view>
</block> </block>
...@@ -81,7 +75,7 @@ ...@@ -81,7 +75,7 @@
<block wx:if="{{info.appealType == 2}}"> <block wx:if="{{info.appealType == 2}}">
<view class="row mt-30"> <view class="row mt-30">
<text class="label">确认平板录音数</text> <text class="label">确认平板录音数</text>
<text class="value ml-20">{{info.confirmPadRecordNum || ''}}条</text> <text class="value ml-20">{{(info.confirmPadRecordNum === null || info.confirmPadRecordNum === undefined) ? '-' : info.confirmPadRecordNum}}条</text>
</view> </view>
</block> </block>
......
// packageWorkspace/pages/appealFormManage/appealFormList/appealFormList.js // packageWorkspace/pages/appealFormManage/appealFormList/appealFormList.js
import api from '../../../api' import api from "../../../api";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -12,12 +12,32 @@ Page({ ...@@ -12,12 +12,32 @@ Page({
}, },
filterConfig: [ filterConfig: [
{ {
type: "select",
label: "申诉类型",
key: "appealType",
showKey: "appealTypeTxt",
optionId: "confId",
optionLabel: "confLabel",
optionsName: "appealTypeList",
optionList: [],
},
{
type: "date-range", type: "date-range",
label: "申诉日期", label: "申诉日期",
key: "appealDate", key: "appealDate",
startKey: "applyStartTime", startKey: "applyStartTime",
endKey: "applyEndTime", endKey: "applyEndTime",
}, },
{
type: "select",
label: "处理状态",
key: "dealStatus",
showKey: "dealStatusTxt",
optionId: "confId",
optionLabel: "confLabel",
optionsName: "dealStatusList",
optionList: [],
},
], ],
list: [], list: [],
triggered: false, triggered: false,
...@@ -26,12 +46,39 @@ Page({ ...@@ -26,12 +46,39 @@ Page({
1: "考勤", 1: "考勤",
2: "平板", 2: "平板",
}, },
dealStatusMap: {
1: "未处理",
2: "已处理",
},
baseData: {
appealTypeList: [
{
confLabel: "考勤",
confId: "1",
},
{
confLabel: "平板",
confId: "2",
},
],
dealStatusList: [
{
confLabel: "未处理",
confId: "1",
},
{
confLabel: "已处理",
confId: "2",
},
],
},
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getOptionsList("filterConfig");
this.search(); this.search();
}, },
...@@ -77,7 +124,7 @@ Page({ ...@@ -77,7 +124,7 @@ Page({
let total = 0; let total = 0;
let list = []; let list = [];
let { code, data, message } = res; let { code, data, message } = res;
console.log(data) console.log(data);
if (code == 0) { if (code == 0) {
list = data.list; list = data.list;
total = data.total; total = data.total;
...@@ -106,11 +153,35 @@ Page({ ...@@ -106,11 +153,35 @@ Page({
this.search(); this.search();
}, },
/**
* 上拉加载
*/
onReachBottom() { onReachBottom() {
this.getList() this.getList();
},
getOptionsList(formName, refreshSigle) {
const formList = this.data[formName];
const { baseData } = this.data;
if (refreshSigle) {
var item = formList.find((k) => k.key == refreshSigle);
var index = formList.findIndex((k) => k.key == refreshSigle);
this.setData({
[`${formName}[${index}].optionList`]: wx.$util.deepClone(
baseData[item.optionsName],
),
});
} else {
formList.forEach((item, index) => {
if (
["select", "radio"].includes(item.type) &&
baseData[item.optionsName].length
) {
this.setData({
[`${formName}[${index}].optionList`]: wx.$util.deepClone(
baseData[item.optionsName],
),
});
}
});
}
}, },
/** /**
......
...@@ -49,6 +49,23 @@ page { ...@@ -49,6 +49,23 @@ page {
color: #333333; color: #333333;
margin-right: 8rpx; margin-right: 8rpx;
} }
.status-tag {
font-size: 24rpx;
padding: 6rpx 12rpx;
border-radius: 8rpx;
margin-right: 8rpx;
&.status-1 {
color: #FF9D0A;
background: #ff9d0a1a;
}
&.status-2 {
color: #35C376;
background: #35c3761a;
}
}
} }
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<view class="item-header"> <view class="item-header">
<view class="name ellipsis">{{li.staffName}}</view> <view class="name ellipsis">{{li.staffName}}</view>
<view class="date-row"> <view class="date-row">
<view class="status-tag status-{{li.dealStatus}}">{{dealStatusMap[li.dealStatus]}}</view>
<van-icon name="arrow" color="#ccc" size="16px" /> <van-icon name="arrow" color="#ccc" size="16px" />
</view> </view>
</view> </view>
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<view class="label">出勤工时 (H)</view> <view class="label">出勤工时 (H)</view>
</view> </view>
<view class="grid-item"> <view class="grid-item">
<view class="value">{{summaryInfo.lateEarlyHours}}</view> <view class="value {{summaryInfo.lateEarlyHours ? 'text-red' : ''}}">{{summaryInfo.lateEarlyHours}}</view>
<view class="label">迟到早退 (H)</view> <view class="label">迟到早退 (H)</view>
</view> </view>
<view class="grid-item"> <view class="grid-item">
<view class="value">{{summaryInfo.missingPunchCount}}</view> <view class="value {{summaryInfo.missingPunchCount ? 'text-red' : ''}}">{{summaryInfo.missingPunchCount}}</view>
<view class="label">缺卡 (次数)</view> <view class="label">缺卡 (次数)</view>
</view> </view>
</view> </view>
......
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
.image-item { .image-item {
width: 192rpx; width: 192rpx;
height: 192rpx; height: 192rpx;
border-radius: 8rpx; border-radius: 12rpx;
background-color: #f0f0f0; background-color: #F5F5F7;
} }
.remark-content { .remark-content {
......
...@@ -29,17 +29,17 @@ ...@@ -29,17 +29,17 @@
<!-- Column 1: Delivery Count --> <!-- Column 1: Delivery Count -->
<view class="grid-col"> <view class="grid-col">
<view class="label-text">{{utils.formatBrandName(dto.brandName)}}交车数</view> <view class="label-text">{{utils.formatBrandName(dto.brandName)}}交车数</view>
<view class="value-text">{{dto.deliveryCount || '-'}}</view> <view class="value-text">{{(dto.deliveryCount === null || dto.deliveryCount === undefined) ? '-' : dto.deliveryCount}}</view>
</view> </view>
<!-- Column 2: Effective Referral Count --> <!-- Column 2: Effective Referral Count -->
<view class="grid-col"> <view class="grid-col">
<view class="label-text">有效引荐数</view> <view class="label-text">有效引荐数</view>
<view class="value-text">{{dto.effectiveReferralCount || '-'}}</view> <view class="value-text">{{(dto.effectiveReferralCount === null || dto.effectiveReferralCount === undefined) ? '-' : dto.effectiveReferralCount}}</view>
</view> </view>
<!-- Column 3: Reviewed Effective Count --> <!-- Column 3: Reviewed Effective Count -->
<view class="grid-col"> <view class="grid-col">
<view class="label-text">运营修正有效引荐数</view> <view class="label-text">运营修正有效引荐数</view>
<view class="value-text">{{dto.reviewedEffectiveCount || '-'}}</view> <view class="value-text">{{(dto.reviewedEffectiveCount === null || dto.reviewedEffectiveCount === undefined) ? '-' : dto.reviewedEffectiveCount}}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -151,7 +151,8 @@ ...@@ -151,7 +151,8 @@
width: 192rpx; width: 192rpx;
height: 192rpx; height: 192rpx;
display: block; display: block;
background-color: #f0f0f0; border-radius: 12rpx;
background-color: #F5F5F7;
} }
.del_icon { .del_icon {
...@@ -168,7 +169,7 @@ ...@@ -168,7 +169,7 @@
width: 192rpx; width: 192rpx;
height: 192rpx; height: 192rpx;
background: #F5F5F7; background: #F5F5F7;
border-radius: 8rpx; border-radius: 12rpx;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
......
...@@ -20,7 +20,7 @@ Page({ ...@@ -20,7 +20,7 @@ Page({
}); });
// 提交状态:0-未提交 1-已提交 // 提交状态:0-未提交 1-已提交
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: this.data.routerParams.submitStatus ? '查看门店引荐数' : '编辑门店引荐数' title: (this.data.routerParams.submitStatus == 0 && this.data.routerParams.updateFlag == 1) ? '编辑门店引荐数' : '查看门店引荐数'
}) })
this.getDetail(); this.getDetail();
}, },
......
...@@ -16,7 +16,7 @@ Page({ ...@@ -16,7 +16,7 @@ Page({
type: "month", type: "month",
label: "月份", label: "月份",
key: "reviewMonth", key: "reviewMonth",
minDate: "2026-01", minDate: "2025-11",
}, },
{ {
type: "select", type: "select",
...@@ -25,12 +25,11 @@ Page({ ...@@ -25,12 +25,11 @@ Page({
showKey: "submitStatusTxt", showKey: "submitStatusTxt",
optionId: "confId", optionId: "confId",
optionLabel: "confLabel", optionLabel: "confLabel",
optionsName: "submitStatusLit", optionsName: "submitStatusList",
optionList: [], optionList: [],
}, },
], ],
orderStatusMap: { orderStatusMap: {
// "": { name: "订单状态" },
0: { name: "未提交", color: "#FF9D0A", background: "#ff9d0a1a" }, 0: { name: "未提交", color: "#FF9D0A", background: "#ff9d0a1a" },
1: { name: "已提交", color: "#35C376", background: "#35C3761a" }, 1: { name: "已提交", color: "#35C376", background: "#35C3761a" },
}, },
...@@ -54,7 +53,7 @@ Page({ ...@@ -54,7 +53,7 @@ Page({
2: "已提交", 2: "已提交",
}, },
baseData: { baseData: {
submitStatusLit: [ submitStatusList: [
{ {
confLabel: "未提交", confLabel: "未提交",
confId: "0", confId: "0",
...@@ -75,61 +74,51 @@ Page({ ...@@ -75,61 +74,51 @@ Page({
this.setData({ this.setData({
searchObj: e.detail, searchObj: e.detail,
}); });
if(!this.data.searchObj.reviewMonth) {
this.defaultMonth()
}
this.search(); this.search();
// TODO: Call API to fetch data with new filters // TODO: Call API to fetch data with new filters
}, },
// clear() {
// this.setData({ keyword: '' })
// this.search()
// },
search() { search() {
this.setData({ this.setData({
list: [], list: [],
pageNum: 1,
flag: false,
nothing: false, nothing: false,
}); });
this.getList(); this.getList();
}, },
getList() { getList() {
let { pageNum, nothing, searchObj, keyword } = this.data; let { nothing, searchObj, flag } = this.data;
let userInfo = wx.$util.getUserInfo();
if (nothing) return; if (nothing) return;
// const auditStatus = tabIndex == 1 ? 0 : tabIndex == 2 ? 3 : ""; if (flag) return;
this.setData({
flag: true
})
wx.$util.showLoading(); wx.$util.showLoading();
api api
.getReferralList({ .getReferralList({
...searchObj, ...searchObj
pageNum,
pageSize: 10,
}) })
.then((res) => { .then((res) => {
wx.$util.hideLoading(); wx.$util.hideLoading();
// let total = 0;
let list = []; let list = [];
let { code, data, message } = res; let { code, data, message } = res;
if (code == 0) { if (code == 0) {
list = data; list = data;
// total = data.total;
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message);
} }
// if (total != 0) {
// this.setData({
// [`list[${pageNum - 1}]`]: list,
// });
// }
this.setData({ this.setData({
list: list, list: list,
// total,
flag: true,
triggered: false, triggered: false,
// pageNum: pageNum + 1,
nothing: !!list.length, nothing: !!list.length,
}); });
}).finally(() => {
this.setData({
flag: false
});
}); });
}, },
...@@ -172,12 +161,21 @@ Page({ ...@@ -172,12 +161,21 @@ Page({
}); });
}, },
defaultMonth() {
const date = new Date();
date.setMonth(date.getMonth() - 1); // 取上个月
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
this.setData({
"searchObj.reviewMonth": `${year}-${month}`,
});
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getOptionsList("filterConfig"); this.defaultMonth();
this.search();
}, },
/** /**
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</block> </block>
</view> </view>
<view class="btn-box flex"> <view class="btn-box flex">
<view bindtap="handleDetail" data-target="{{item}}" class="btn {{item.submitStatus == 0 ? 'primary' : ''}}">{{item.submitStatus == 0 ? '编辑' : '查看'}}</view> <view bindtap="handleDetail" data-target="{{item}}" class="btn {{(item.submitStatus == 0 && item.updateFlag == 1) ? 'primary' : ''}}">{{(item.submitStatus == 0 && item.updateFlag == 1) ? '编辑' : '查看'}}</view>
</view> </view>
</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!