移动端V1.0

This commit is contained in:
2025-07-16 15:34:34 +08:00
commit 194b0750fd
1083 changed files with 178295 additions and 0 deletions

View File

@@ -0,0 +1,244 @@
<template>
<view class="detail">
<view class="card">
<view class="title">查看详细</view>
<view class="row">
<label>工作岗位</label>
<label>{{detail.postName}}</label>
</view>
<view class="row">
<label>姓名</label>
<label>{{detail.stuName}}</label>
</view>
<view class="row">
<label>总工作时长/{{ detail.postType == '固定岗位A' ? '天' : '小时' }}</label>
<label>{{detail.totalTime}}</label>
</view>
<view class="row">
<label>部门意见</label>
<uni-data-checkbox v-model="detail.deptCmt" :localdata="deptCmt" />
</view>
<button @click="doAudit" type="primary" plain>审核</button>
</view>
</view>
</template>
<script>
import {
CheckImgExists,
isEmpty
} from "@/api/helpFunc";
import {
baseUrl
} from "@/config.js";
import {
previewImg
} from "@/utils/uploadImg.js"
import {
doAudit,
} from "@/api/workStudy/money";
export default {
data() {
return {
detail: null,
attachment: [],
basePath: baseUrl,
deptCmt: [{
text: '同意',
value: '同意'
}, {
text: '拒绝',
value: '拒绝'
}, {
text: '驳回',
value: '驳回'
}],
}
},
onLoad(option) {
this.detail = JSON.parse(option.detailData);
},
methods: {
async doAudit() {
let sdata = {
...this.detail
};
if (isEmpty(sdata.deptCmt)) {
uni.showToast({
title: "请选择部门意见",
icon: "error"
});
return;
}
uni.showLoading({
title: "正在提交",
success: async () => {
try {
if (sdata.deptCmt === '驳回') {
sdata.applyStatus = "11"; // 驳回
uni.showModal({
title: '驳回原因',
content: '',
editable: true,
placeholderText: '请填写',
success: async (res) => {
if (res.confirm && res.content.trim()) {
sdata.auditRemark = res.content.trim();
uni.showLoading({
title: '处理中...'
});
try {
let response = await doAudit(sdata);
uni.hideLoading();
if (response.code === 200) {
uni.showToast({
title: "提交成功"
});
setTimeout(() => {
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length -
2]
console.log(prevPage);
if (prevPage && typeof prevPage
.getList ===
'function') {
prevPage.queryParams.pageNum = 1;
prevPage.getList();
}
}
}
})
}, 1000)
}
} catch (error) {
uni.hideLoading();
}
} else if (res.confirm) {
uni.showToast({
title: '请填写驳回原因',
icon: 'none'
});
}
}
});
} else {
sdata.applyStatus = sdata.deptCmt === '同意' ? '2' : '10';
uni.showLoading({
title: '处理中...'
});
doAudit(sdata).then(response => {
uni.hideLoading();
if (response.code === 200) {
uni.showToast({
title: "提交成功"
});
setTimeout(() => {
uni.navigateBack({
success: () => {
const pages = getCurrentPages();
if (pages.length > 0) {
const prevPage = pages[pages.length -
2]
console.log(prevPage);
if (prevPage && typeof prevPage
.getList ===
'function') {
prevPage.queryParams.pageNum = 1;
prevPage.getList();
}
}
}
})
}, 1000)
}
}).catch(() => {
uni.hideLoading();
});
}
} catch (error) {} finally {
this.isSubmitting = false;
}
}
})
// if (!CheckImgExists(this.baseurl + sdata.zdlsSign)) {
// this.$message.info("签名失效,请重新上传");
// return;
// }
// let res = await doAudit(sdata);
// if (res.code == 200) {
// uni.showToast({
// title: res.msg,
// icon: "success"
// });
// this.getList();
// this.lookV = false;
// }
},
previewImg(imgs, index) {
let images = imgs.map(img => {
return {
path: baseUrl + img
}
})
previewImg(images, index);
}
}
}
</script>
<style scoped lang="scss">
.detail {
height: calc(100vh - 44px);
background-color: #F5F5F7;
padding: 20rpx 30rpx 0;
.card {
margin: 30rpx 0rpx 0;
padding: 30rpx;
background-color: white;
border-radius: 20rpx;
.title {
font-weight: bold;
color: #202020;
display: inline-block;
font-size: 30rpx;
margin-bottom: 30rpx;
}
.row {
margin-bottom: 30rpx;
&>label:first-child {
color: #9C9C9C;
margin-right: 40rpx;
}
.photos {
margin-top: 10rpx;
display: flex;
flex-wrap: wrap;
image {
margin-bottom: 10rpx;
width: 23.5%;
border-radius: 8rpx;
height: 136rpx;
&:not(:nth-child(4n)) {
margin-right: 2%;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,228 @@
<template>
<view class="index">
<scroll-view scroll-y="true" @scrolltolower="scrolltolower">
<view class="list">
<view class="item" @tap="toDetail(item)" v-for="item in tableData" :key="item.id">
<view class="top">
岗位名称:{{item.postName}}
<DictType :types="qgzx_apply_status" :type="item.applyStatus" />
</view>
<view class="content">
<view>学号{{item.stuNo}}</view>
<view>姓名{{item.stuName}}</view>
<view>岗位类型{{item.postType}}</view>
<view>结算月份{{item.applyTime}}</view>
<view>工作时长{{ item.postType == "固定岗位A" ? item.totalTime + "天" : item.totalTime + "小时" }}</view>
</view>
<view class="status">
<view class="bottom">
<view class="edit" >
<!-- compose -->
<uni-icons color="#1890ff" type="compose" size="18"> 审批</uni-icons>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import {
doAudit,
listDept as getList,
manyAudit
} from "@/api/workStudy/money";
export default {
data() {
return {
qgzx_apply_status: [],
tableData: [],
queryParams: {
pageNum: 1,
pageSize: 10,
postName: null
},
totalPages: '',
}
},
onLoad() {
this.get_qgzx_apply_status()
this.getList()
},
methods: {
toDetail(item) {
uni.navigateTo({
url: "./detail?detailData=" + JSON.stringify(item)
})
},
async get_qgzx_apply_status() {
let res = await getDicts('qgzx_apply_status');
this.qgzx_apply_status = res.data;
},
async getList() {
let res = await getList(this.queryParams);
this.loading = false;
if (res.code == 200) {
this.tableData = [...res.rows];
this.totalPages = Math.ceil(res.total / this.queryParams.pageSize);
}
},
scrolltolower() {
if (this.queryParams.pageNum < this.totalPages) {
this.queryParams.pageNum++;
this.loading = true;
setTimeout(() => {
this.getList()
}, 1000)
} else {
}
},
}
}
</script>
<style lang="scss" scoped>
.index {
background-color: #F5F5F7;
scroll-view {
height: calc(100vh - 10px);
.no-more {
text-align: center;
color: gray;
padding-bottom: 10px;
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 200rpx;
color: #9E9E9E;
font-size: 36rpx;
image {
width: 250rpx;
margin-bottom: 50rpx;
}
}
}
.list {
padding: 20rpx 40rpx 15rpx 40rpx;
.item {
background-color: white;
margin-bottom: 20rpx;
padding: 40rpx 40rpx 80rpx;
border-radius: 16px;
border-bottom-right-radius: 0;
position: relative;
.top {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F5F5F7;
padding-bottom: 20rpx;
.uni-icons {
opacity: 0.5;
}
}
.content {
padding-top: 20rpx;
.level {
display: flex;
}
&>view:not(:last-child) {
margin-bottom: 15rpx;
.progress {
color: #1890FF;
}
}
.status {
position: absolute;
bottom: 0;
right: 0;
color: white;
.status-text {
position: absolute;
bottom: 15px;
right: 8%;
font-size: 35rpx;
}
.triangle-right {
width: 0;
height: 0;
/* 上边框设置为透明 */
border-left: 120px solid transparent;
}
&.submit {
color: #202020;
.triangle-right {
/* 左边框设置为与文本相同的颜色 */
border-bottom: 100px solid #D7D7D7;
}
}
&.agree {
.triangle-right {
/* 左边框设置为与文本相同的颜色 */
border-bottom: 100px solid #2FB15B;
}
}
&.refuse {
.triangle-right {
/* 左边框设置为与文本相同的颜色 */
border-bottom: 100px solid #FF759F;
}
}
}
}
.bottom {
position: absolute;
right: 0;
bottom: 10px;
button {
margin: 0;
background-color: transparent;
margin-right: 10px;
padding: 0px 10px;
height: 32px;
line-height: 32px;
font-size: 28rpx;
width: 160rpx;
border: 1px solid #007aff;
color: #007aff;
}
}
}
}
}
.popup-content {
align-items: center;
padding: 15px;
background-color: #fff;
}
</style>