请假功能内容修改

This commit is contained in:
2025-12-03 09:59:20 +08:00
parent 3eaadca4b6
commit d05cfe8c30
9 changed files with 2065 additions and 1745 deletions

View File

@@ -371,6 +371,7 @@
getRtStuQuitSchoolByProcInsId(procInsId) {
getRtStuQuitSchoolByProcInsId(procInsId).then((res) => {
this.formData = res.data;
console.log(this.formData)
this.get_penalty_type(this.formData.quitType);
this.get_category(this.formData.quitCategory);
if (this.tag == 1) {
@@ -422,9 +423,9 @@
const pages = getCurrentPages();
if (pages && pages.length > 0) {
const prevPage = pages[pages.length - 2] || pages[pages.length - 1];
if (prevPage && typeof prevPage.handleChange === 'function') {
prevPage.handleChange(this.tag || 1);
}
if (prevPage && typeof prevPage.handleChange === 'function') {
prevPage.handleChange(2);
}
}
}
@@ -495,18 +496,18 @@
});
}
uni.hideLoading();
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages && pages.length > 0) {
const prevPage = pages[pages.length - 2] || pages[pages.length - 1];
if (prevPage && typeof prevPage.handleChange === 'function') {
prevPage.handleChange(this.tag || 1);
}
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length - 2]
if (prevPage && typeof prevPage.getList === 'function') {
prevPage.handleChange(2);
}
}
})
}
})
})
},
rejectDialogConfirm() {
@@ -528,10 +529,10 @@
const pages = getCurrentPages();
if (pages && pages.length > 0) {
const prevPage = pages[pages.length - 2] || pages[pages.length - 1];
if (prevPage && typeof prevPage.handleChange === 'function') {
prevPage.handleChange(this.tag || 1);
console.log('刷新任务数据');
}
if (prevPage && typeof prevPage.handleChange === 'function') {
prevPage.handleChange(2);
console.log('刷新已办任务数据');
}
}
}
})

View File

@@ -8,6 +8,14 @@
</view>
</view>
<view class="content" v-if="processes.length!==0">
<view class="search-bar">
<input class="input" placeholder="姓名" v-model="searchName" @confirm="doSearch" />
<picker mode="date" :value="searchDate" @change="onDateChange">
<view class="picker-text">{{ searchDate || '时间' }}</view>
</picker>
<button class="primary" @tap="doSearch">搜索</button>
<button class="reset" @tap="resetSearch">重置</button>
</view>
<view class="list">
<view class="item" v-for="(process,index) in processes" :key="index">
<view class="top">
@@ -75,7 +83,9 @@
currentPage: 1,
loading: false, // 加载状态标志
topLoading: true,
role: uni.getStorageSync("roles")
role: uni.getStorageSync("roles"),
searchName: '',
searchDate: ''
};
},
onLoad(option) {
@@ -130,12 +140,42 @@
this.topLoading = true;
this.getList();
},
doSearch() {
this.currentPage = 1;
this.processes = [];
this.topLoading = true;
this.getList();
},
resetSearch() {
this.searchName = '';
this.searchDate = '';
this.currentPage = 1;
this.processes = [];
this.topLoading = true;
this.getList();
},
onDateChange(e) {
this.searchDate = e.detail.value;
},
getList() {
this.loading = true;
let sdata = {
pageNum: this.currentPage,
pageSize: 10
pageSize: 10,
};
if (this.searchName) {
sdata.startUserName = this.searchName;
}
if (this.searchDate) {
if (this.currentTab === 2) {
// 已办任务PC端使用 startTime/endTime时间对应“提交时间”
sdata.startTime = this.searchDate;
sdata.endTime = this.searchDate;
} else {
// 我发起的、待办任务PC端使用 deployTime时间对应“提交时间”
sdata.deployTime = this.searchDate;
}
}
console.log(this.processes);
if (this.currentTab == 0) {
myProcess(sdata).then(res => {
@@ -320,6 +360,41 @@
}
}
.search-bar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
background-color: #ffffff;
border-bottom: 1px solid #EDEDED;
position: sticky;
top: 58px;
z-index: 998;
.input {
flex: 1;
border: 1px solid #EDEDED;
border-radius: 4px;
padding: 6px 8px;
height: 36px;
line-height: 36px;
box-sizing: border-box;
}
.picker-text {
border: 1px solid #EDEDED;
border-radius: 4px;
padding: 6px 8px;
color: #555555;
}
button.primary {
border: 1px solid #007aff;
color: #007aff;
}
button.reset {
border: 1px solid #909399;
color: #909399;
}
}
.empty {
display: flex;
flex-direction: column;
@@ -337,6 +412,7 @@
.content {
padding-top: 58px;
.list {
.item {
padding: 20px 10px;